]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Don't call Solaris setproject() with UsePAM=yes.
authorDarren Tucker <dtucker@zip.com.au>
Mon, 14 Mar 2016 22:24:43 +0000 (09:24 +1100)
committerDarren Tucker <dtucker@zip.com.au>
Mon, 14 Mar 2016 22:24:43 +0000 (09:24 +1100)
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

index ee313da55930a8b1b7401cf7bc3093d54a6a0ab9..1f68df3a682fde3926249eaea4795d9fecd971f4 100644 (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