Merge pull request #133 from Dzejrou/main
Do not unset user timeout when no default timeout is set.
This commit is contained in:
@@ -836,7 +836,7 @@ sudoers_policy_store_result(bool accepted, char *argv[], char *envp[],
|
|||||||
|
|
||||||
if (def_command_timeout > 0 || user_timeout > 0) {
|
if (def_command_timeout > 0 || user_timeout > 0) {
|
||||||
int timeout = user_timeout;
|
int timeout = user_timeout;
|
||||||
if (timeout == 0 || def_command_timeout < timeout)
|
if (timeout == 0 || (def_command_timeout > 0 && def_command_timeout < timeout))
|
||||||
timeout = def_command_timeout;
|
timeout = def_command_timeout;
|
||||||
if (asprintf(&command_info[info_len++], "timeout=%u", timeout) == -1)
|
if (asprintf(&command_info[info_len++], "timeout=%u", timeout) == -1)
|
||||||
goto oom;
|
goto oom;
|
||||||
|
Reference in New Issue
Block a user