mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-29 13:28:10 +00:00
if SHELL_IF_NO_ARGS is set, "sudo -- foo" now runs a shell
and passes along foo as the arguments
This commit is contained in:
parent
ec56686b89
commit
dff189d000
4
sudo.c
4
sudo.c
@ -551,6 +551,10 @@ static int parse_args()
|
|||||||
Argc--;
|
Argc--;
|
||||||
Argv++;
|
Argv++;
|
||||||
Argv[0] = progname;
|
Argv[0] = progname;
|
||||||
|
#ifdef SHELL_IF_NO_ARGS
|
||||||
|
if (ret == MODE_RUN)
|
||||||
|
ret |= MODE_SHELL;
|
||||||
|
#endif /* SHELL_IF_NO_ARGS */
|
||||||
return(ret);
|
return(ret);
|
||||||
case '\0':
|
case '\0':
|
||||||
(void) fprintf(stderr, "%s: '-' requires an argument\n",
|
(void) fprintf(stderr, "%s: '-' requires an argument\n",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user