summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--platform.c13
-rw-r--r--session.c10
3 files changed, 14 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index c82f56b87..cc6e09ad5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,6 +38,8 @@
38 - (dtucker) [platform.c session.c] Move aix_usrinfo frament into platform.c. 38 - (dtucker) [platform.c session.c] Move aix_usrinfo frament into platform.c.
39 - (dtucker) [platform.c session.c] Move irix setusercontext fragment into 39 - (dtucker) [platform.c session.c] Move irix setusercontext fragment into
40 platform.c. 40 platform.c.
41 - (dtucker) [platform.c session.c] Move PAM credential establishment for the
42 non-LOGIN_CAP case into platform.c.
41 43
4220101025 4420101025
43 - (tim) [openbsd-compat/glob.h] Remove sys/cdefs.h include that came with 45 - (tim) [openbsd-compat/glob.h] Remove sys/cdefs.h include that came with
diff --git a/platform.c b/platform.c
index c8163f901..b4fb88e5f 100644
--- a/platform.c
+++ b/platform.c
@@ -1,4 +1,4 @@
1/* $Id: platform.c,v 1.12 2010/11/05 02:29:25 dtucker Exp $ */ 1/* $Id: platform.c,v 1.13 2010/11/05 02:32:53 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2006 Darren Tucker. All rights reserved. 4 * Copyright (c) 2006 Darren Tucker. All rights reserved.
@@ -102,6 +102,17 @@ platform_setusercontext(struct passwd *pw)
102void 102void
103platform_setusercontext_post_groups(struct passwd *pw) 103platform_setusercontext_post_groups(struct passwd *pw)
104{ 104{
105#if !defined(HAVE_LOGIN_CAP) && defined(USE_PAM)
106 /*
107 * PAM credentials may take the form of supplementary groups.
108 * These will have been wiped by the above initgroups() call.
109 * Reestablish them here.
110 */
111 if (options.use_pam) {
112 do_pam_setcred(use_privsep);
113 }
114#endif /* USE_PAM */
115
105#if !defined(HAVE_LOGIN_CAP) && (defined(WITH_IRIX_PROJECT) || \ 116#if !defined(HAVE_LOGIN_CAP) && (defined(WITH_IRIX_PROJECT) || \
106 defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY)) 117 defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY))
107 irix_setusercontext(pw); 118 irix_setusercontext(pw);
diff --git a/session.c b/session.c
index 002cfd844..f1f26ef69 100644
--- a/session.c
+++ b/session.c
@@ -1500,16 +1500,6 @@ do_setusercontext(struct passwd *pw)
1500 exit(1); 1500 exit(1);
1501 } 1501 }
1502 endgrent(); 1502 endgrent();
1503# ifdef USE_PAM
1504 /*
1505 * PAM credentials may take the form of supplementary groups.
1506 * These will have been wiped by the above initgroups() call.
1507 * Reestablish them here.
1508 */
1509 if (options.use_pam) {
1510 do_pam_setcred(use_privsep);
1511 }
1512# endif /* USE_PAM */
1513#endif 1503#endif
1514 1504
1515 platform_setusercontext_post_groups(pw); 1505 platform_setusercontext_post_groups(pw);