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:
Erik Johnson 2016-11-30 13:10:55 -06:00
parent e539a94a56
commit e5ee721696

View file

@ -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: