]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib/cmdline: Also redact --newpassword in samba_cmdline_burn()
authorAndrew Bartlett <abartlet@samba.org>
Fri, 21 Jul 2023 03:39:28 +0000 (15:39 +1200)
committerJule Anger <janger@samba.org>
Fri, 4 Aug 2023 08:05:00 +0000 (08:05 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15289

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Jul 21 06:16:30 UTC 2023 on atb-devel-224

(cherry picked from commit 76ad44f446c42832e87b2c60a4731a8de3a0018f)

RN: post-exec password redaction for samba-tool is more reliable for
 fully random passwords as it no longer uses regular expressions
 containing the password value itself.

Autobuild-User(v4-18-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-18-test): Fri Aug  4 08:05:00 UTC 2023 on atb-devel-224

lib/cmdline/cmdline.c

index d11ca46d38980851fe8d8267c70c9c318e6ba1fc..aade4ca365e9ca21585cc0bc3c1e18281b6b10da 100644 (file)
@@ -167,6 +167,9 @@ bool samba_cmdline_burn(int argc, char *argv[])
                } else if (strncmp(p, "--password", 10) == 0) {
                        ulen = 10;
                        found = true;
+               } else if (strncmp(p, "--newpassword", 13) == 0) {
+                       ulen = 13;
+                       found = true;
                }
 
                if (found) {