The branch, v4-22-test has been updated
       via  a210c2b2bc5 python:tdb_util: "samba-tool domain backup offline" 
hangs
      from  4d44f8c9ecd VERSION: Bump version up to Samba 4.22.0rc5...

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-22-test


- Log -----------------------------------------------------------------
commit a210c2b2bc53ebae5e0ee64eb51fcd117bd231ee
Author: Andrea Venturoli <[email protected]>
Date:   Wed Feb 19 08:51:16 2025 +0100

    python:tdb_util: "samba-tool domain backup offline" hangs
    
    GNU getopt(3) is by default non-POSIX compliant and accepts options after
    positional arguments (unless forced with POSIXLY_CORRECT). This is not 
portable,
    e..g., on FreeBSD. Put options first and then positional arguments.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15804
    
    Signed-off-by: Andrea Venturoli <[email protected]>
    Reviewed-by: Douglas Bagnall <[email protected]>
    Reviewed-by: Jennifer Sutton <[email protected]>
    (cherry picked from commit 7e083a6b3a12933b79ef19ccbd4c13bfa0203498)
    
    Autobuild-User(v4-22-test): Jule Anger <[email protected]>
    Autobuild-Date(v4-22-test): Tue Mar  4 14:57:29 UTC 2025 on atb-devel-224

-----------------------------------------------------------------------

Summary of changes:
 python/samba/tdb_util.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/python/samba/tdb_util.py b/python/samba/tdb_util.py
index 99b6e02e03f..202fbdb3f8b 100644
--- a/python/samba/tdb_util.py
+++ b/python/samba/tdb_util.py
@@ -37,9 +37,10 @@ def tdb_copy(file1, file2, readonly=False):
         raise FileNotFoundError(2, "could not find tdbbackup tool: "
                                 "is tdb-tools installed?")
 
-    tdbbackup_cmd = [toolpath, "-s", ".copy.tdb", file1]
     if readonly:
-        tdbbackup_cmd.append("-r")
+        tdbbackup_cmd = [toolpath, "-r", "-s", ".copy.tdb", file1]
+    else:
+        tdbbackup_cmd = [toolpath, "-s", ".copy.tdb", file1]
 
     status = subprocess.check_call(tdbbackup_cmd, close_fds=True, shell=False)
 


-- 
Samba Shared Repository

Reply via email to