From: Douglas Bagnall Date: Thu, 20 Jun 2024 21:21:43 +0000 (+1200) Subject: cmdline:burn: '-U' does not imply secrets without '%' X-Git-Tag: tdb-1.4.11~213 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=f3b240da5c209a51fa43de23e8ecfea2f32bbfd5;p=thirdparty%2Fsamba.git cmdline:burn: '-U' does not imply secrets without '%' We return true from this function when a secret has been erased, and were accidentally treating as if it had secrets. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15671 Signed-off-by: Douglas Bagnall Reviewed-by: Jo Sutton --- diff --git a/lib/cmdline/cmdline.c b/lib/cmdline/cmdline.c index 93d59d4f9d3..8d5dc36e42b 100644 --- a/lib/cmdline/cmdline.c +++ b/lib/cmdline/cmdline.c @@ -182,9 +182,11 @@ bool samba_cmdline_burn(int argc, char *argv[]) if (is_user) { q = strchr_m(p, '%'); - if (q != NULL) { - p = q; + if (q == NULL) { + /* -U without '%' has no secret */ + continue; } + p = q; } else { p += ulen; }