mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Make salt.modules.pw_user.get_loginclass return string rather than dict
This aligns with salt.modules.useradd.get_loginclass which is used for OpenBSD. This fixes salt.modules.pw_user.chloginclass which is used for FreeBSD and expects a string to be returned. This was therefore returning False even after successfully changing the loginclass. This also fixes salt.states.user.present on FreeBSD when loginclass is set.
This commit is contained in:
parent
2ae9eaa176
commit
d6c436246b
@ -475,7 +475,7 @@ def get_loginclass(name):
|
|||||||
userinfo = __salt__['cmd.run_stdout'](['pw', 'usershow', '-n', name])
|
userinfo = __salt__['cmd.run_stdout'](['pw', 'usershow', '-n', name])
|
||||||
userinfo = userinfo.split(':')
|
userinfo = userinfo.split(':')
|
||||||
|
|
||||||
return {'loginclass': userinfo[4] if len(userinfo) == 10 else ''}
|
return userinfo[4] if len(userinfo) == 10 else ''
|
||||||
|
|
||||||
|
|
||||||
def list_groups(name):
|
def list_groups(name):
|
||||||
|
Loading…
Reference in New Issue
Block a user