]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python:netcmd: Only put regular files into the tarball
authorAndreas Schneider <asn@samba.org>
Wed, 15 Feb 2023 07:05:42 +0000 (08:05 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 6 Jun 2024 20:25:36 +0000 (20:25 +0000)
We also have ldapi, other sockets or pipes around, we don't want to
add. This will be relevant for adding checksums later.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/netcmd/domain/backup.py

index a9a5a5beacf779503462cbc23c40e0bd4572d6bb..936e277d0bf0a8a1faafcb1299790cf78ffc3172 100644 (file)
@@ -1238,7 +1238,7 @@ class cmd_domain_backup_offline(samba.netcmd.Command):
                 os.remove(path + self.backup_ext)
             elif path.endswith('.ldb') or path.endswith('.tdb'):
                 logger.info('   skipping ' + arc_path)
-            else:
+            elif os.path.isfile(path):
                 logger.info('   adding misc file ' + arc_path)
                 tar.add(path, arcname=arc_path)