[PATCH] Allow multiple accounts on Windows 9x/Me

Corinna Vinschen vinschen at redhat.com
Fri Jan 10 09:27:30 EST 2003


Hi,

the following patch by Pierre A. Humblet <Pierre.Humblet at ieee.org>
allows to use more than one uid on 9x/Me boxes which is currently
blocked due to the behaviour of Cygwin's security code.  After this
patch is applied to sshd, we can safely change the affected code in
Cygwin.

Thanks,
Corinna

Index: session.c
===================================================================
RCS file: /cvs/openssh_cvs/session.c,v
retrieving revision 1.227
diff -u -p -r1.227 session.c
--- session.c	7 Jan 2003 06:38:59 -0000	1.227
+++ session.c	9 Jan 2003 22:23:15 -0000
@@ -1204,7 +1204,7 @@ void
 do_setusercontext(struct passwd *pw)
 {
 #ifdef HAVE_CYGWIN
-	if (is_winnt) {
+	{
 #else /* HAVE_CYGWIN */
 	if (getuid() == 0 || geteuid() == 0) {
 #endif /* HAVE_CYGWIN */
@@ -1257,6 +1257,9 @@ 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);
 }

-- 
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.
mailto:vinschen at redhat.com



More information about the openssh-unix-dev mailing list