summaryrefslogtreecommitdiff
path: root/platform.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2016-03-15 09:24:43 +1100
committerDarren Tucker <dtucker@zip.com.au>2016-03-15 09:24:43 +1100
commit8c4739338f5e379d05b19d6e544540114965f07e (patch)
treee4c29cf0627f30e3ff0487b7eef3142ddd7ee7f0 /platform.c
parentcff26f373c58457a32cb263e212cfff53fca987b (diff)
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.
Diffstat (limited to 'platform.c')
-rw-r--r--platform.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/platform.c b/platform.c
index ee313da55..1f68df3a6 100644
--- a/platform.c
+++ b/platform.c
@@ -107,8 +107,12 @@ platform_setusercontext(struct passwd *pw)
107#endif 107#endif
108 108
109#ifdef USE_SOLARIS_PROJECTS 109#ifdef USE_SOLARIS_PROJECTS
110 /* if solaris projects were detected, set the default now */ 110 /*
111 if (getuid() == 0 || geteuid() == 0) 111 * If solaris projects were detected, set the default now, unless
112 * we are using PAM in which case it is the responsibility of the
113 * PAM stack.
114 */
115 if (!options.use_pam && (getuid() == 0 || geteuid() == 0))
112 solaris_set_default_project(pw); 116 solaris_set_default_project(pw);
113#endif 117#endif
114 118