diff options
author | Darren Tucker <dtucker@zip.com.au> | 2010-11-05 14:47:01 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2010-11-05 14:47:01 +1100 |
commit | b12fe272a0e850175417aa56e6efef8f08250977 (patch) | |
tree | abd6a1ee2fefd9b12525a85d21667bee3b8cb99a /session.c | |
parent | cc12418e18242ce1f61d7035da4956274ba13a96 (diff) |
- (dtucker) [platform.c platform.h session.c] Move the Cygwin special-case
check into platform.c
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -1471,10 +1471,7 @@ do_setusercontext(struct passwd *pw) | |||
1471 | 1471 | ||
1472 | platform_setusercontext(pw); | 1472 | platform_setusercontext(pw); |
1473 | 1473 | ||
1474 | #ifndef HAVE_CYGWIN | 1474 | if (platform_privileged_uidswap()) { |
1475 | if (getuid() == 0 || geteuid() == 0) | ||
1476 | #endif /* HAVE_CYGWIN */ | ||
1477 | { | ||
1478 | #ifdef HAVE_LOGIN_CAP | 1475 | #ifdef HAVE_LOGIN_CAP |
1479 | if (setusercontext(lc, pw, pw->pw_uid, | 1476 | if (setusercontext(lc, pw, pw->pw_uid, |
1480 | (LOGIN_SETALL & ~(LOGIN_SETPATH|LOGIN_SETUSER))) < 0) { | 1477 | (LOGIN_SETALL & ~(LOGIN_SETPATH|LOGIN_SETUSER))) < 0) { |