mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
25329b3863
If argv contains a secret option without an '=' (or in the case of "-U", the username is separated by space), we will get to the `if (strlen(p) == ulen) { continue; }` without resetting the found and is_user variables. This *sometimes* has the right effect, because the next string in argv ought to contain the secret. But in a case like {"--password", "1234567890"}, where the secret string is the same length as the option, we *again* take that branch and the password is not redacted, though the argument after it will be unless it is also of the same length. If we always set the flags at the start we avoid this. This makes things worse in the short term for secrets that are not the same length as their options, but we'll get to that in another commit soon. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15674 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Jo Sutton <josutton@catalyst.net.nz> (cherry picked from commit 2f6020cf3dadf484251701040e09a10fba2f644e)
compression - Various compression algorithms (MSZIP, lzxpress) popt - Command-line option parsing library replace - Provides replacements for standard (POSIX, C99) functions not provided by the host platform. subunit - Utilities and bindings for working with the Subunit test result reporting protocol. talloc - Hierarchical pool based memory allocator tdb - Simple but fast key/value database library, supporting multiple writers torture - Simple unit testing helper library