fix lsattr.get in file.check_perms

This commit is contained in:
Ruggero Marchei 2018-06-25 00:00:35 +02:00 committed by rallytime
parent d5265da945
commit d6620573bb
No known key found for this signature in database
GPG key ID: E8F1A4B90D0DEA19

View file

@ -4458,7 +4458,7 @@ def check_perms(name, ret, user, group, mode, attrs=None, follow_symlinks=False)
lattrs = lsattr(name)
if lattrs is not None:
# List attributes on file
perms['lattrs'] = ''.join(lattrs.get('name', ''))
perms['lattrs'] = ''.join(lattrs.get(name, ''))
# Remove attributes on file so changes can be enforced.
if perms['lattrs']:
chattr(name, operator='remove', attributes=perms['lattrs'])