[PATCH] permanently_set_uid fails on Cygwin :-(

Corinna Vinschen vinschen at redhat.com
Wed Sep 17 00:57:57 EST 2003


On Tue, Sep 16, 2003 at 04:53:09PM +0200, Corinna Vinschen wrote:
> Index: uidswap.c

Sigh, new patch.  Should be #ifndef, not #ifdef.

Corinna

===================================================================
RCS file: /cvs/openssh_cvs/uidswap.c,v
retrieving revision 1.39
diff -p -u -r1.39 uidswap.c
--- uidswap.c	6 Sep 2003 06:44:39 -0000	1.39
+++ uidswap.c	16 Sep 2003 14:47:54 -0000
@@ -191,10 +191,12 @@ permanently_set_uid(struct passwd *pw)
 		    (u_int)pw->pw_gid);
 	}
 
+#ifndef HAVE_CYGWIN
 	/* Try restoration of UID if changed (test clearing of saved uid) */
 	if (old_uid != pw->pw_uid && 
 	    (setuid(old_uid) != -1 || seteuid(old_uid) != -1))
 		fatal("%s: was able to restore old [e]uid", __func__);
+#endif
 
 	/* Verify UID drop was successful */
 	if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid) {


-- 
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.




More information about the openssh-unix-dev mailing list