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.
This commit is contained in:
Darren Tucker 2016-03-15 09:24:43 +11:00
parent cff26f373c
commit 8c4739338f
1 changed files with 6 additions and 2 deletions

View File

@ -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