1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

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 <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
(cherry picked from commit f3b240da5c)
This commit is contained in:
Douglas Bagnall 2024-06-21 09:21:43 +12:00 committed by Jule Anger
parent 73207ff834
commit 5d99875ba0

View File

@ -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;
}