mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
python/samba: Adjust tarfile extraction filter
The 'data_filter' is far too restrictive, this filter doesn't apply any mode bits to directories which in turn will result in unexpected directory permissions of the amongst others msg.[ls]ock directories. With 'data_filter' and a 'patched' python at best we experience CI failures with samba-ad-back1 & samba-ad-back2 CI jobs due to server startup failures, at worst user/admins will need to adjust directory permissions post backup. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15390 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
5e473cba0d
commit
e401ae44b2
@ -31,7 +31,7 @@ class TarFile(UnsafeTarFile):
|
||||
# New in version 3.11.4 (also has been backported)
|
||||
# https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extraction_filter
|
||||
# https://peps.python.org/pep-0706/
|
||||
extraction_filter = staticmethod(tarfile.data_filter)
|
||||
extraction_filter = staticmethod(tarfile.tar_filter)
|
||||
except AttributeError:
|
||||
def extract(self, member, path="", set_attrs=True, *,
|
||||
numeric_owner=False):
|
||||
|
Loading…
Reference in New Issue
Block a user