1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/lib/cmdline
Douglas Bagnall 8684368541 cmdline:burn: list commands to always burn; warn on unknown
We burn arguments to all unknown options containing "pass" (e.g.
"--passionate=false") in case they are a password option, but is bad
in the case where the unknown option takes no argument but the next
option *is* a password (like "--overpass --password2 barney". In that
case "--password2" would be burnt and not "barney".

The burning behaviour doesn't change with this commit, but users will now
see an error message explaining that the option was unknown. This is not
so much aimed at end users -- for who an invalid option will hopefully
lead to --help like output -- but to developers who add a new "pass"
option.

This also slightly speeds up the processing of known password options,
which is a little bit important because we are in a race to replace the
command line in /proc before an attacker sees it.

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>

Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Wed Jul 10 06:28:08 UTC 2024 on atb-devel-224
2024-07-10 06:28:08 +00:00
..
tests cmdline: test_cmdline tests more burning 2024-07-03 01:35:31 +00:00
closefrom_except.c lib: Move closefrom_except*() to a separate file 2021-09-21 01:12:12 +00:00
closefrom_except.h lib: Move closefrom_except*() to a separate file 2021-09-21 01:12:12 +00:00
cmdline_private.h lib:cmdline: Fix code spelling 2023-12-21 20:21:34 +00:00
cmdline_s3.c cmdline: Make -P work in clustered mode 2021-11-17 18:29:09 +00:00
cmdline_s4.c cmdline_s4: re-initialise logging once loadparm is ready 2022-05-30 10:11:28 +00:00
cmdline.c cmdline:burn: list commands to always burn; warn on unknown 2024-07-10 06:28:08 +00:00
cmdline.h lib/cmdline: Return if the commandline was redacted in samba_cmdline_burn() 2023-07-21 05:23:32 +00:00
wscript cmdline: Make -P work in clustered mode 2021-11-17 18:29:09 +00:00