]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib/cmdline: Also burn the --password2 parameter if given
authorAndrew Bartlett <abartlet@samba.org>
Fri, 21 Jul 2023 02:35:20 +0000 (14:35 +1200)
committerJule Anger <janger@samba.org>
Fri, 4 Aug 2023 07:02:15 +0000 (07:02 +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>
(cherry picked from commit 414b3803bb6a1b12c44b52ab1ff64a8b7f61fd03)

lib/cmdline/cmdline.c

index 2f11804fe5e6dae985188a3c97b68c415cbcac0e..d11ca46d38980851fe8d8267c70c9c318e6ba1fc 100644 (file)
@@ -149,6 +149,10 @@ bool samba_cmdline_burn(int argc, char *argv[])
                        return false;
                }
 
+               /*
+                * Take care that this list must be in longest-match
+                * first order
+                */
                if (strncmp(p, "-U", 2) == 0) {
                        ulen = 2;
                        found = true;
@@ -157,6 +161,9 @@ bool samba_cmdline_burn(int argc, char *argv[])
                        ulen = 6;
                        found = true;
                        is_user = true;
+               } else if (strncmp(p, "--password2", 11) == 0) {
+                       ulen = 11;
+                       found = true;
                } else if (strncmp(p, "--password", 10) == 0) {
                        ulen = 10;
                        found = true;