mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Merge pull request #21626 from rallytime/bp-21622
Backport #21622 to 2014.7
This commit is contained in:
commit
52e390184b
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user