sudo/sudo-1.7.4p3-sudolist.patch
dnk 520e07da9c - update to new upstream version
- new command available: sudoreplay
- use native audit support
- corrected license field value: BSD -> ISC
2010-09-07 16:28:31 +02:00

68 lines
2.0 KiB
Diff

diff -up sudo-1.7.4p3/parse.c.orig sudo-1.7.4p3/parse.c
--- sudo-1.7.4p3/parse.c.orig 2010-09-07 15:00:12.728260953 +0200
+++ sudo-1.7.4p3/parse.c 2010-09-07 15:00:38.950188803 +0200
@@ -158,8 +158,8 @@ sudo_file_lookup(nss, validated, pwflag)
/*
* Only check the actual command if pwflag is not set.
- * It is set for the "validate", "list" and "kill" pseudo-commands.
- * Always check the host and user.
+ * It is set for the "sudovalidate", "sudolist" and "sudokill"
+ * pseudo-commands. Always check the host and user.
*/
if (pwflag) {
int nopass;
diff -up sudo-1.7.4p3/sudo.c.orig sudo-1.7.4p3/sudo.c
--- sudo-1.7.4p3/sudo.c.orig 2010-09-07 14:57:08.201198517 +0200
+++ sudo-1.7.4p3/sudo.c 2010-09-07 14:55:47.208260545 +0200
@@ -232,7 +232,7 @@ main(argc, argv, envp)
pwflag = 0;
if (ISSET(sudo_mode, MODE_SHELL))
- user_cmnd = "shell";
+ user_cmnd = "sudoshell";
else if (ISSET(sudo_mode, MODE_EDIT))
user_cmnd = "sudoedit";
else {
@@ -245,12 +245,12 @@ main(argc, argv, envp)
break;
case MODE_VALIDATE:
case MODE_VALIDATE|MODE_INVALIDATE:
- user_cmnd = "validate";
+ user_cmnd = "sudovalidate";
pwflag = I_VERIFYPW;
break;
case MODE_KILL:
case MODE_INVALIDATE:
- user_cmnd = "kill";
+ user_cmnd = "sudokill";
pwflag = -1;
break;
case MODE_LISTDEFS:
@@ -259,7 +259,7 @@ main(argc, argv, envp)
break;
case MODE_LIST:
case MODE_LIST|MODE_INVALIDATE:
- user_cmnd = "list";
+ user_cmnd = "sudolist";
pwflag = I_LISTPW;
break;
case MODE_CHECK:
@@ -701,13 +701,13 @@ init_vars(envp)
set_perms(PERM_ROOT);
/*
- * If we were given the '-e', '-i' or '-s' options we need to redo
+ * If we were given the '-e', '-i', '-l' or '-s' options we need to redo
* NewArgv and NewArgc.
*/
- if (ISSET(sudo_mode, MODE_EDIT)) {
+ if (ISSET(sudo_mode, MODE_EDIT|MODE_LIST)) {
NewArgv--;
NewArgc++;
- NewArgv[0] = "sudoedit";
+ NewArgv[0] = user_cmnd;
} else if (ISSET(sudo_mode, MODE_SHELL)) {
char **av;