]> git.pld-linux.org Git - packages/sudo.git/blob - sudo-pam-login.patch
- silly typos
[packages/sudo.git] / sudo-pam-login.patch
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 @@ -394,6 +394,18 @@
4                 ;;
5  esac])
6  
7 +AC_ARG_WITH(pam-login, [AS_HELP_STRING([--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 +               ;;
15 +     *)                AC_MSG_ERROR(["--with-pam-login does not take an argument."])
16 +               ;;
17 +esac])
18 +
19  AC_ARG_WITH(AFS, [AS_HELP_STRING([--with-AFS], [enable AFS support])],
20  [case $with_AFS in
21      yes)       AC_DEFINE(HAVE_AFS)
22 --- sudo-1.6.9p3/sudo.c.orig    2007-08-04 22:30:23.307231082 +0200
23 +++ sudo-1.6.9p3/sudo.c 2007-08-04 22:31:28.238931329 +0200
24 @@ -157,6 +157,7 @@
25  static char *runas_user;
26  static char *runas_group;
27  static struct sudo_nss_list *snl;
28 +int sudo_mode;
29  
30  /* For getopt(3) */
31  extern char *optarg;
32 @@ -169,7 +170,7 @@
33      char **envp;
34  {
35      int sources = 0, validated;
36 -    int fd, cmnd_status, sudo_mode, pwflag, rc = 0;
37 +    int fd, cmnd_status, pwflag, rc = 0;
38      sigaction_t sa;
39      struct sudo_nss *nss;
40  #if defined(SUDO_DEVEL) && defined(__OpenBSD__)
41 --- sudo-1.6.8p12/auth/pam.c.login      2006-07-16 15:41:59.000000000 +0200
42 +++ sudo-1.6.8p12/auth/pam.c    2006-07-16 15:45:15.000000000 +0200
43 @@ -89,7 +89,12 @@
44      if (auth != NULL)
45         auth->data = (VOID *) &pam_status;
46      pam_conv.conv = sudo_conv;
47 -    pam_status = pam_start("sudo", pw->pw_name, &pam_conv, &pamh);
48 +#ifdef HAVE_PAM_LOGIN
49 +    if (ISSET(sudo_mode, MODE_LOGIN_SHELL))
50 +           pam_status = pam_start("sudo-i", pw->pw_name, &pam_conv, &pamh);
51 +    else
52 +#endif
53 +           pam_status = pam_start("sudo", pw->pw_name, &pam_conv, &pamh);
54      if (pam_status != PAM_SUCCESS) {
55         log_error(USE_ERRNO|NO_EXIT|NO_MAIL, "unable to initialize PAM");
56         return(AUTH_FATAL);
57 --- sudo-1.6.9p3/sudo.h.orig    2007-07-06 16:14:34.000000000 +0200
58 +++ sudo-1.6.9p3/sudo.h 2007-08-04 22:32:18.353787210 +0200
59 @@ -268,6 +268,7 @@
60  extern FILE *sudoers_fp;
61  extern int tgetpass_flags;
62  extern uid_t timestamp_uid;
63 +extern int sudo_mode;
64  #endif
65  #ifndef errno
66  extern int errno;
67 --- sudo-1.6.8p12/config.h.in.login     2006-07-16 15:32:09.000000000 +0200
68 +++ sudo-1.6.8p12/config.h.in   2006-07-16 15:32:56.000000000 +0200
69 @@ -230,6 +230,9 @@
70  /* Define to 1 if you use PAM authentication. */
71  #undef HAVE_PAM
72  
73 +/* Define to 1 if you use specific PAM session for sodo -i. */
74 +#undef HAVE_PAM_LOGIN
75 +
76  /* Define to 1 if you have the <pam/pam_appl.h> header file. */
77  #undef HAVE_PAM_PAM_APPL_H
78  
This page took 0.041208 seconds and 3 git commands to generate.