summaryrefslogtreecommitdiffstats
path: root/session.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2010-11-05 04:47:01 +0100
committerDarren Tucker <dtucker@zip.com.au>2010-11-05 04:47:01 +0100
commitb12fe272a0e850175417aa56e6efef8f08250977 (patch)
treeabd6a1ee2fefd9b12525a85d21667bee3b8cb99a /session.c
parent - (dtucker) [platform.c session.c] Move PAM credential establishment for the (diff)
downloadopenssh-b12fe272a0e850175417aa56e6efef8f08250977.tar.xz
openssh-b12fe272a0e850175417aa56e6efef8f08250977.zip
- (dtucker) [platform.c platform.h session.c] Move the Cygwin special-case
check into platform.c
Diffstat (limited to '')
-rw-r--r--session.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/session.c b/session.c
index f1f26ef69..58e681282 100644
--- a/session.c
+++ b/session.c
@@ -1471,10 +1471,7 @@ do_setusercontext(struct passwd *pw)
platform_setusercontext(pw);
-#ifndef HAVE_CYGWIN
- if (getuid() == 0 || geteuid() == 0)
-#endif /* HAVE_CYGWIN */
- {
+ if (platform_privileged_uidswap()) {
#ifdef HAVE_LOGIN_CAP
if (setusercontext(lc, pw, pw->pw_uid,
(LOGIN_SETALL & ~(LOGIN_SETPATH|LOGIN_SETUSER))) < 0) {