/[packages]/cauldron/sudo/current/SOURCES/sudo-1.7.4p3-sudolist.patch
ViewVC logotype

Contents of /cauldron/sudo/current/SOURCES/sudo-1.7.4p3-sudolist.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 17466 - (show annotations) (download)
Fri Jan 14 12:18:05 2011 UTC (13 years, 3 months ago) by blino
File size: 2082 byte(s)
imported package sudo
1 diff -up sudo-1.7.4p3/parse.c.orig sudo-1.7.4p3/parse.c
2 --- sudo-1.7.4p3/parse.c.orig 2010-09-07 15:00:12.728260953 +0200
3 +++ sudo-1.7.4p3/parse.c 2010-09-07 15:00:38.950188803 +0200
4 @@ -158,8 +158,8 @@ sudo_file_lookup(nss, validated, pwflag)
5
6 /*
7 * Only check the actual command if pwflag is not set.
8 - * It is set for the "validate", "list" and "kill" pseudo-commands.
9 - * Always check the host and user.
10 + * It is set for the "sudovalidate", "sudolist" and "sudokill"
11 + * pseudo-commands. Always check the host and user.
12 */
13 if (pwflag) {
14 int nopass;
15 diff -up sudo-1.7.4p3/sudo.c.orig sudo-1.7.4p3/sudo.c
16 --- sudo-1.7.4p3/sudo.c.orig 2010-09-07 14:57:08.201198517 +0200
17 +++ sudo-1.7.4p3/sudo.c 2010-09-07 14:55:47.208260545 +0200
18 @@ -232,7 +232,7 @@ main(argc, argv, envp)
19
20 pwflag = 0;
21 if (ISSET(sudo_mode, MODE_SHELL))
22 - user_cmnd = "shell";
23 + user_cmnd = "sudoshell";
24 else if (ISSET(sudo_mode, MODE_EDIT))
25 user_cmnd = "sudoedit";
26 else {
27 @@ -245,12 +245,12 @@ main(argc, argv, envp)
28 break;
29 case MODE_VALIDATE:
30 case MODE_VALIDATE|MODE_INVALIDATE:
31 - user_cmnd = "validate";
32 + user_cmnd = "sudovalidate";
33 pwflag = I_VERIFYPW;
34 break;
35 case MODE_KILL:
36 case MODE_INVALIDATE:
37 - user_cmnd = "kill";
38 + user_cmnd = "sudokill";
39 pwflag = -1;
40 break;
41 case MODE_LISTDEFS:
42 @@ -259,7 +259,7 @@ main(argc, argv, envp)
43 break;
44 case MODE_LIST:
45 case MODE_LIST|MODE_INVALIDATE:
46 - user_cmnd = "list";
47 + user_cmnd = "sudolist";
48 pwflag = I_LISTPW;
49 break;
50 case MODE_CHECK:
51 @@ -701,13 +701,13 @@ init_vars(envp)
52 set_perms(PERM_ROOT);
53
54 /*
55 - * If we were given the '-e', '-i' or '-s' options we need to redo
56 + * If we were given the '-e', '-i', '-l' or '-s' options we need to redo
57 * NewArgv and NewArgc.
58 */
59 - if (ISSET(sudo_mode, MODE_EDIT)) {
60 + if (ISSET(sudo_mode, MODE_EDIT|MODE_LIST)) {
61 NewArgv--;
62 NewArgc++;
63 - NewArgv[0] = "sudoedit";
64 + NewArgv[0] = user_cmnd;
65 } else if (ISSET(sudo_mode, MODE_SHELL)) {
66 char **av;
67

  ViewVC Help
Powered by ViewVC 1.1.30