mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't use simple boolean check on uid/gid
This breaks setting the user/group to root as its uid/gid is 0.
This commit is contained in:
parent
e539a94a56
commit
e5ee721696
1 changed files with 2 additions and 2 deletions
|
@ -600,7 +600,7 @@ def extracted(name,
|
|||
|
||||
if user:
|
||||
uid = __salt__['file.user_to_uid'](user)
|
||||
if not uid:
|
||||
if uid == '':
|
||||
ret['comment'] = 'User {0} does not exist'.format(user)
|
||||
return ret
|
||||
else:
|
||||
|
@ -608,7 +608,7 @@ def extracted(name,
|
|||
|
||||
if group:
|
||||
gid = __salt__['file.group_to_gid'](group)
|
||||
if not gid:
|
||||
if gid == '':
|
||||
ret['comment'] = 'Group {0} does not exist'.format(group)
|
||||
return ret
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue