From 8c4739338f5e379d05b19d6e544540114965f07e Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Tue, 15 Mar 2016 09:24:43 +1100 Subject: Don't call Solaris setproject() with UsePAM=yes. When Solaris Projects are enabled along with PAM setting the project is PAM's responsiblity. bz#2425, based on patch from brent.paulson at gmail.com. --- platform.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'platform.c') diff --git a/platform.c b/platform.c index ee313da5..1f68df3a 100644 --- a/platform.c +++ b/platform.c @@ -107,8 +107,12 @@ platform_setusercontext(struct passwd *pw) #endif #ifdef USE_SOLARIS_PROJECTS - /* if solaris projects were detected, set the default now */ - if (getuid() == 0 || geteuid() == 0) + /* + * If solaris projects were detected, set the default now, unless + * we are using PAM in which case it is the responsibility of the + * PAM stack. + */ + if (!options.use_pam && (getuid() == 0 || geteuid() == 0)) solaris_set_default_project(pw); #endif -- cgit v1.2.1