mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
samba-tool domain backup: backup but do not follow symlinks
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14918 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
697abc15ea
commit
0f7e58b0e2
@ -1128,9 +1128,9 @@ class cmd_domain_backup_offline(samba.netcmd.Command):
|
||||
# duplicates if one backup dir is a subdirectory of another,
|
||||
# or if backup dirs contain hardlinks.
|
||||
try:
|
||||
s = os.stat(full_path)
|
||||
s = os.stat(full_path, follow_symlinks=False)
|
||||
except FileNotFoundError:
|
||||
logger.info(f"{full_path} does not exist (dangling symlink?)")
|
||||
logger.warning(f"{full_path} does not exist!")
|
||||
continue
|
||||
|
||||
if (s.st_ino, s.st_dev) in all_stats:
|
||||
|
Loading…
Reference in New Issue
Block a user