Add support for "Defaults" line in sudoers to make configuration variables
changable at runtime (and on a global, per-host and per-user basis). Both the names and the internal representation are still subject to change. It was necessary to make sudo_user.runas but a char ** instead of a char * since this value can be changed by a Defaults line. There is a similar (but more complicated) issue with sudo_user.prompt but it is handled differently at the moment. Add a "-L" flag to list the name of options with their descriptions. This may only be temporary. Move some prototypes to parse.h Be much less restrictive on what is allowed for a username.
This commit is contained in:
@@ -80,8 +80,8 @@ sudo_collect(timeout, rendition, title, nprompts, prompts)
|
||||
switch (rendition) {
|
||||
case SIAFORM:
|
||||
case SIAONELINER:
|
||||
if (timeout <= 0 || timeout > PASSWORD_TIMEOUT * 60)
|
||||
timeout = PASSWORD_TIMEOUT * 60;
|
||||
if (timeout <= 0 || timeout > sudo_inttable[I_PW_TIMEOUT] * 60)
|
||||
timeout = sudo_inttable[I_PW_TIMEOUT] * 60;
|
||||
/*
|
||||
* Substitute custom prompt if a) the sudo prompt is not "Password:"
|
||||
* and b) the SIA prompt is "Password:" (so we know it is safe).
|
||||
|
Reference in New Issue
Block a user