diff options
Diffstat (limited to 'platform.c')
-rw-r--r-- | platform.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/platform.c b/platform.c index ee313da55..acf8554cd 100644 --- a/platform.c +++ b/platform.c | |||
@@ -18,8 +18,6 @@ | |||
18 | 18 | ||
19 | #include "includes.h" | 19 | #include "includes.h" |
20 | 20 | ||
21 | #include <sys/types.h> | ||
22 | |||
23 | #include <stdarg.h> | 21 | #include <stdarg.h> |
24 | #include <unistd.h> | 22 | #include <unistd.h> |
25 | 23 | ||
@@ -107,8 +105,12 @@ platform_setusercontext(struct passwd *pw) | |||
107 | #endif | 105 | #endif |
108 | 106 | ||
109 | #ifdef USE_SOLARIS_PROJECTS | 107 | #ifdef USE_SOLARIS_PROJECTS |
110 | /* if solaris projects were detected, set the default now */ | 108 | /* |
111 | if (getuid() == 0 || geteuid() == 0) | 109 | * If solaris projects were detected, set the default now, unless |
110 | * we are using PAM in which case it is the responsibility of the | ||
111 | * PAM stack. | ||
112 | */ | ||
113 | if (!options.use_pam && (getuid() == 0 || geteuid() == 0)) | ||
112 | solaris_set_default_project(pw); | 114 | solaris_set_default_project(pw); |
113 | #endif | 115 | #endif |
114 | 116 | ||