]>
Commit | Line | Data |
---|---|---|
940ad429 JR |
1 | --- sudo-1.6.8p12/configure.in.login 2006-07-16 15:25:33.000000000 +0200 |
2 | +++ sudo-1.6.8p12/configure.in 2006-07-16 15:49:08.000000000 +0200 | |
3 | @@ -357,6 +357,17 @@ | |
4 | ;; | |
5 | esac]) | |
6 | ||
7 | +AC_ARG_WITH(pam-login, [ --with-pam-login enable specific PAM session for sudo -i], | |
8 | +[case $with_pam_login in | |
9 | + yes) AC_DEFINE(HAVE_PAM_LOGIN) | |
10 | + AC_MSG_CHECKING(whether to use PAM login) | |
11 | + AC_MSG_RESULT(yes) | |
12 | + ;; | |
13 | + no) ;; | |
14 | + *) AC_MSG_ERROR(["--with-pam-login does not take an argument."]) | |
15 | + ;; | |
16 | +esac]) | |
17 | + | |
18 | AC_ARG_WITH(AFS, [ --with-AFS enable AFS support], | |
19 | [case $with_AFS in | |
20 | yes) AC_DEFINE(HAVE_AFS) | |
dc214b6e JB |
21 | --- sudo-1.6.9p3/sudo.c.orig 2007-08-04 22:30:23.307231082 +0200 |
22 | +++ sudo-1.6.9p3/sudo.c 2007-08-04 22:31:28.238931329 +0200 | |
23 | @@ -164,6 +164,7 @@ | |
24 | char *login_style; | |
940ad429 JR |
25 | #endif /* HAVE_BSD_AUTH_H */ |
26 | sigaction_t saved_sa_int, saved_sa_quit, saved_sa_tstp, saved_sa_chld; | |
940ad429 JR |
27 | +int sudo_mode; |
28 | ||
dc214b6e JB |
29 | #ifdef WITH_SELINUX |
30 | security_context_t setup_tty_context(int fd, char *ttyn, security_context_t new_context) { | |
31 | @@ -319,7 +320,6 @@ | |
940ad429 JR |
32 | int validated; |
33 | int fd; | |
34 | int cmnd_status; | |
35 | - int sudo_mode; | |
36 | int pwflag; | |
940ad429 | 37 | sigaction_t sa; |
dc214b6e | 38 | extern int printmatches; |
940ad429 JR |
39 | --- sudo-1.6.8p12/auth/pam.c.login 2006-07-16 15:41:59.000000000 +0200 |
40 | +++ sudo-1.6.8p12/auth/pam.c 2006-07-16 15:45:15.000000000 +0200 | |
41 | @@ -89,7 +89,12 @@ | |
42 | if (auth != NULL) | |
43 | auth->data = (VOID *) &pam_status; | |
44 | pam_conv.conv = sudo_conv; | |
45 | - pam_status = pam_start("sudo", pw->pw_name, &pam_conv, &pamh); | |
46 | +#ifdef HAVE_PAM_LOGIN | |
47 | + if (ISSET(sudo_mode, MODE_LOGIN_SHELL)) | |
48 | + pam_status = pam_start("sudo-i", pw->pw_name, &pam_conv, &pamh); | |
49 | + else | |
50 | +#endif | |
51 | + pam_status = pam_start("sudo", pw->pw_name, &pam_conv, &pamh); | |
52 | if (pam_status != PAM_SUCCESS) { | |
53 | log_error(USE_ERRNO|NO_EXIT|NO_MAIL, "unable to initialize PAM"); | |
54 | return(AUTH_FATAL); | |
dc214b6e JB |
55 | --- sudo-1.6.9p3/sudo.h.orig 2007-07-06 16:14:34.000000000 +0200 |
56 | +++ sudo-1.6.9p3/sudo.h 2007-08-04 22:32:18.353787210 +0200 | |
57 | @@ -268,6 +268,7 @@ | |
940ad429 JR |
58 | extern FILE *sudoers_fp; |
59 | extern int tgetpass_flags; | |
60 | extern uid_t timestamp_uid; | |
61 | +extern int sudo_mode; | |
940ad429 | 62 | #endif |
dc214b6e JB |
63 | #ifndef errno |
64 | extern int errno; | |
940ad429 JR |
65 | --- sudo-1.6.8p12/config.h.in.login 2006-07-16 15:32:09.000000000 +0200 |
66 | +++ sudo-1.6.8p12/config.h.in 2006-07-16 15:32:56.000000000 +0200 | |
67 | @@ -230,6 +230,9 @@ | |
68 | /* Define to 1 if you use PAM authentication. */ | |
69 | #undef HAVE_PAM | |
70 | ||
71 | +/* Define to 1 if you use specific PAM session for sodo -i. */ | |
72 | +#undef HAVE_PAM_LOGIN | |
73 | + | |
74 | /* Define to 1 if you have the <pam/pam_appl.h> header file. */ | |
75 | #undef HAVE_PAM_PAM_APPL_H | |
76 |