]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
samba_dnsupdate: slightly clarify handling of args
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 29 May 2025 23:31:24 +0000 (11:31 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Thu, 5 Jun 2025 23:06:37 +0000 (23:06 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13613

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
source4/scripting/bin/samba_dnsupdate

index 6d9d5bc3deebcdd002d38d40425e5deac9050621..ec8aed6edbecf157ccfe24d2e0e63b7c08420caf 100755 (executable)
@@ -589,10 +589,11 @@ def call_samba_tool(d, op="add", zone=None):
     global error_count
     try:
         cmd = cmd_dns()
+        full_args = ["dns", op, "--use-kerberos", "off", "-P"] + args
         if opts.verbose:
-            print(f'Calling samba-tool dns {op} --use-kerberos off -P {args}')
-        command, args = cmd._resolve("dns", op, "--use-kerberos", "off", "-P", *args)
-        ret = command._run(*args)
+            print(f'Calling samba-tool {" ".join(full_args)}')
+        command, resolved_args = cmd._resolve(*full_args)
+        ret = command._run(*resolved_args)
         if ret == -1:
             if opts.fail_immediately:
                 sys.exit(1)