]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
samba-tool/backup: set the right permissions on our root dir
authorBjörn Jacke <bjacke@samba.org>
Tue, 15 Oct 2024 09:43:58 +0000 (11:43 +0200)
committerBjörn Baumbach <bb@sernet.de>
Tue, 10 Dec 2024 11:40:27 +0000 (11:40 +0000)
Since processes can run under the UID of the logged in user, it's required
to make sure that the users have the permissions here.

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Björn Baumbach <bbaumbach@samba.org>
Autobuild-User(master): Björn Baumbach <bb@sernet.de>
Autobuild-Date(master): Tue Dec 10 11:40:27 UTC 2024 on atb-devel-224

python/samba/netcmd/domain/backup.py

index b1b57c04a7fb74a5f24fad7bf91cec4790788419..a72c6daadedec56de071adbfadb5c2a3ad809df7 100644 (file)
@@ -500,6 +500,8 @@ class cmd_domain_backup_restore(cmd_fsmo_seize):
         tf = tarfile.open(backup_file)
         tf.extractall(targetdir)
         tf.close()
+        # set the permissions on the target dir strict but also relaxed enough
+        os.chmod(targetdir, mode=0o755)
 
         # use the smb.conf that got backed up, by default (save what was
         # actually backed up, before we mess with it)