diff options
author | Darren Tucker <dtucker@zip.com.au> | 2010-11-05 03:32:52 +0100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2010-11-05 03:32:52 +0100 |
commit | cc12418e18242ce1f61d7035da4956274ba13a96 (patch) | |
tree | 78f4ed69e3190a3bae84cf2e64c7c37382cbe106 /platform.c | |
parent | - (dtucker) [platform.c session.c] Move irix setusercontext fragment into (diff) | |
download | openssh-cc12418e18242ce1f61d7035da4956274ba13a96.tar.xz openssh-cc12418e18242ce1f61d7035da4956274ba13a96.zip |
- (dtucker) [platform.c session.c] Move PAM credential establishment for the
non-LOGIN_CAP case into platform.c.
Diffstat (limited to 'platform.c')
-rw-r--r-- | platform.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/platform.c b/platform.c index c8163f901..b4fb88e5f 100644 --- a/platform.c +++ b/platform.c @@ -1,4 +1,4 @@ -/* $Id: platform.c,v 1.12 2010/11/05 02:29:25 dtucker Exp $ */ +/* $Id: platform.c,v 1.13 2010/11/05 02:32:53 dtucker Exp $ */ /* * Copyright (c) 2006 Darren Tucker. All rights reserved. @@ -102,6 +102,17 @@ platform_setusercontext(struct passwd *pw) void platform_setusercontext_post_groups(struct passwd *pw) { +#if !defined(HAVE_LOGIN_CAP) && defined(USE_PAM) + /* + * PAM credentials may take the form of supplementary groups. + * These will have been wiped by the above initgroups() call. + * Reestablish them here. + */ + if (options.use_pam) { + do_pam_setcred(use_privsep); + } +#endif /* USE_PAM */ + #if !defined(HAVE_LOGIN_CAP) && (defined(WITH_IRIX_PROJECT) || \ defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY)) irix_setusercontext(pw); |