From e911424161d838ab09cc582ae56843c84ee52bc1 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 21 Jul 2023 15:39:28 +1200 Subject: [PATCH] lib/cmdline: Also redact --newpassword in samba_cmdline_burn() BUG: https://bugzilla.samba.org/show_bug.cgi?id=15289 Signed-off-by: Andrew Bartlett Reviewed-by: Douglas Bagnall Autobuild-User(master): Andrew Bartlett 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 Autobuild-Date(v4-18-test): Fri Aug 4 08:05:00 UTC 2023 on atb-devel-224 --- lib/cmdline/cmdline.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/cmdline/cmdline.c b/lib/cmdline/cmdline.c index d11ca46d389..aade4ca365e 100644 --- a/lib/cmdline/cmdline.c +++ b/lib/cmdline/cmdline.c @@ -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) { -- 2.47.3