The Samba-Bugzilla – Attachment 18073 Details for
Bug 15462
samba-tool gpo restore does not work without --tmpdir
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch for bug #15462
gpo_restore_bug_15462.patch (text/plain), 1.43 KB, created by
Kacper
on 2023-08-29 07:38:11 UTC
(
hide
)
Description:
Proposed patch for bug #15462
Filename:
MIME Type:
Creator:
Kacper
Created:
2023-08-29 07:38:11 UTC
Size:
1.43 KB
patch
obsolete
>diff -Naur a/python/samba/netcmd/gpo.py b/python/samba/netcmd/gpo.py >--- a/python/samba/netcmd/gpo.py 2023-01-18 16:32:24.126552000 +0100 >+++ b/python/samba/netcmd/gpo.py 2023-08-28 13:55:12.334134925 +0200 >@@ -1175,7 +1175,7 @@ > ] > > def run(self, displayname, H=None, tmpdir=None, sambaopts=None, credopts=None, >- versionopts=None): >+ versionopts=None, tmpdir_cleanup=True): > > self.lp = sambaopts.get_loadparm() > self.creds = credopts.get_credentials(self.lp, fallback_machine=True) >@@ -1296,7 +1296,7 @@ > else: > self.samdb.transaction_commit() > >- if tmpdir is None: >+ if tmpdir is None and tmpdir_cleanup: > # Without --tmpdir, we created one in /tmp/. It must go. > shutil.rmtree(self.tmpdir) > >@@ -1423,7 +1423,7 @@ > dtd_header += '\n]>\n' > > super(cmd_restore, self).run(displayname, H, tmpdir, sambaopts, >- credopts, versionopts) >+ credopts, versionopts, False) > > try: > # Iterate over backup files and restore with DTD >@@ -1454,6 +1454,10 @@ > > self.samdb.modify(m) > >+ if tmpdir is None: >+ # Without --tmpdir, we created one in /tmp/. It must go. >+ shutil.rmtree(self.tmpdir) >+ > except Exception as e: > import traceback > traceback.print_exc()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 15462
: 18073