summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-02-24 13:04:01 +1100
committerDamien Miller <djm@mindrot.org>2003-02-24 13:04:01 +1100
commit1a3ccb07c5709672d327afefd7fb6971e96b1ef7 (patch)
tree80fe70a7dd73c5271a52158f9140d147654e59f4
parent8d8168a255c17ca343865d1ee4962f2cba46b2d8 (diff)
- (djm) Bug #494: Allow multiple accounts on Windows 9x/Me;
From vinschen@redhat.com
-rw-r--r--ChangeLog7
-rw-r--r--session.c12
2 files changed, 13 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 008a7f4f..0fc1191b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -81,8 +81,11 @@
- (djm) Add new object files to Makefile and reorder
- (djm) Bug #501: gai_strerror should return char*;
fix from dtucker@zip.com.au
- - (djm) Most of Bug #499: Cygwin compile fixes for new progressmeter
+ - (djm) Most of Bug #499: Cygwin compile fixes for new progressmeter;
+ From vinschen@redhat.com
- (djm) Rest of Bug #499: Import a basename() function from OpenBSD libc
+ - (djm) Bug #494: Allow multiple accounts on Windows 9x/Me;
+ From vinschen@redhat.com
20030211
- (djm) Cygwin needs libcrypt too. Patch from vinschen@redhat.com
@@ -1183,4 +1186,4 @@
save auth method before monitor_reset_key_state(); bugzilla bug #284;
ok provos@
-$Id: ChangeLog,v 1.2619 2003/02/24 01:55:55 djm Exp $
+$Id: ChangeLog,v 1.2620 2003/02/24 02:04:01 djm Exp $
diff --git a/session.c b/session.c
index c64240cf..a1586d3b 100644
--- a/session.c
+++ b/session.c
@@ -1205,11 +1205,11 @@ do_nologin(struct passwd *pw)
void
do_setusercontext(struct passwd *pw)
{
-#ifdef HAVE_CYGWIN
- if (is_winnt) {
-#else /* HAVE_CYGWIN */
- if (getuid() == 0 || geteuid() == 0) {
+#ifndef HAVE_CYGWIN
+ if (getuid() == 0 || geteuid() == 0)
#endif /* HAVE_CYGWIN */
+ {
+
#ifdef HAVE_SETPCRED
setpcred(pw->pw_name);
#endif /* HAVE_SETPCRED */
@@ -1259,6 +1259,10 @@ do_setusercontext(struct passwd *pw)
permanently_set_uid(pw);
#endif
}
+
+#ifdef HAVE_CYGWIN
+ if (is_winnt)
+#endif
if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid)
fatal("Failed to set uids to %u.", (u_int) pw->pw_uid);
}