Merge pull request #51044 from terminalmage/issue47043

archive.extracted: Don't run lsattr when enforcing user/group ownership
This commit is contained in:
Gareth J. Greenaway 2019-01-03 11:26:02 -08:00 committed by GitHub
commit aeeb047f18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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