Merge pull request #21626 from rallytime/bp-21622

Backport #21622 to 2014.7
This commit is contained in:
Thomas S Hatch 2015-03-13 16:26:40 -06:00
commit 52e390184b

View File

@ -2714,9 +2714,13 @@ def check_perms(name, ret, user, group, mode, follow_symlinks=False):
ret['changes']['mode'] = mode
# user/group changes if needed, then check if it worked
if user:
if isinstance(user, int):
user = uid_to_user(user)
if user != perms['luser']:
perms['cuser'] = user
if group:
if isinstance(group, int):
group = gid_to_group(group)
if group != perms['lgroup']:
perms['cgroup'] = group
if 'cuser' in perms or 'cgroup' in perms: