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
f3b240da5c209a51fa43de23e8ecfea2f32bbfd5)
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;
}