mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fixed win_useradd.py
The real fix. Instead of getting vdata in the calling function, _get_userprofile_from_registry should return just the profile and not a dict full of a bunch of crap. This also fixes the debug log for the _get_userprofile_from_registry function.
This commit is contained in:
parent
fd2ca2df1b
commit
af2c5ab759
1 changed files with 2 additions and 2 deletions
|
@ -341,7 +341,7 @@ def info(name):
|
|||
ret['logonscript'] = items['script_path']
|
||||
ret['profile'] = items['profile']
|
||||
if not ret['profile']:
|
||||
ret['profile'] = _get_userprofile_from_registry(name, ret['uid'])['vdata']
|
||||
ret['profile'] = _get_userprofile_from_registry(name, ret['uid'])
|
||||
ret['home'] = items['home_dir']
|
||||
if not ret['home']:
|
||||
ret['home'] = ret['profile']
|
||||
|
@ -360,7 +360,7 @@ def _get_userprofile_from_registry(user, sid):
|
|||
'HKEY_LOCAL_MACHINE',
|
||||
u'SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\{0}'.format(sid),
|
||||
'ProfileImagePath'
|
||||
)
|
||||
)['vdata']
|
||||
log.debug(u'user {0} with sid={2} profile is located at "{1}"'.format(user, profile_dir, sid))
|
||||
return profile_dir
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue