From b12fe272a0e850175417aa56e6efef8f08250977 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Fri, 5 Nov 2010 14:47:01 +1100 Subject: - (dtucker) [platform.c platform.h session.c] Move the Cygwin special-case check into platform.c --- session.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'session.c') 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) { -- cgit v1.2.3