]> granicus.if.org Git - sudo/commitdiff
o Add pam_prep_user function to call pam_setcred() for the target user;
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 31 Dec 2001 17:18:05 +0000 (17:18 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 31 Dec 2001 17:18:05 +0000 (17:18 +0000)
  on Linux this often sets resource limits.

set_perms.c
sudo.h

index 0c161348cce6e4ef79c1129137038a478c1c5dbe..428fd986430fbe4ea7d7e1049728afb733d1cbf3 100644 (file)
@@ -281,6 +281,10 @@ runas_setup()
 #endif
 
     if (runas_pw->pw_name != NULL) {
+#ifdef HAVE_PAM
+       pam_prep_user(runas_pw);
+#endif /* HAVE_PAM */
+
 #ifdef HAVE_LOGIN_CAP_H
        if (def_flag(I_USE_LOGINCLASS)) {
            /*
diff --git a/sudo.h b/sudo.h
index 942326be9fc216313846f6ce74c91223228869ea..062355ebd34892cb3a3b89ec4af73d35532eb98b 100644 (file)
--- a/sudo.h
+++ b/sudo.h
@@ -222,6 +222,7 @@ int touch           __P((char *, time_t));
 int user_is_exempt     __P((void));
 void set_fqdn          __P((void));
 char *sudo_getepw      __P((struct passwd *));
+int pam_prep_user      __P((struct passwd *));
 YY_DECL;
 
 /* Only provide extern declarations outside of sudo.c. */