mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
archive.extracted: Don't run lsattr when enforcing user/group ownership
This changes file.check_perms such that it doesn't run lsattr if no attrs are passed in.
This commit is contained in:
parent
04fdae5bbd
commit
787b79a1b2
1 changed files with 3 additions and 1 deletions
|
@ -4478,7 +4478,9 @@ def check_perms(name, ret, user, group, mode, attrs=None, follow_symlinks=False)
|
|||
|
||||
is_dir = os.path.isdir(name)
|
||||
is_link = os.path.islink(name)
|
||||
if not salt.utils.platform.is_windows() and not is_dir and not is_link:
|
||||
if attrs is not None \
|
||||
and not salt.utils.platform.is_windows() \
|
||||
and not is_dir and not is_link:
|
||||
try:
|
||||
lattrs = lsattr(name)
|
||||
except SaltInvocationError:
|
||||
|
|
Loading…
Add table
Reference in a new issue