This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Any ideas with xterm/xfree problem?


Chris,

The following bandaid should take care of the problem,
until we determine exactly what's going on and how
prevalent it is.

xterm does
	    (void) setgid(screen->gid);
<snip>
	    if (setuid(screen->uid)) {
		perror("setuid failed");
		exit(errno);
	    }
For some unknown reason the process has no right to
setgid(screen->gid);
but the problem does not show up until the setuid ().

2002-07-01  Pierre Humblet <pierre.humblet@ieee.org>

	* syscalls.c (seteuid32): Do not return an error when
	the token cannot be created only because of a problem
	with the gid.

--- syscalls.cc.orig    2002-06-26 21:19:38.000000000 -0400
+++ syscalls.cc 2002-07-01 18:22:18.000000000 -0400
@@ -2104,6 +2104,7 @@
   if (cygheap->user.issetuid ()
        && !ImpersonateLoggedOnUser (cygheap->user.token))
     system_printf ("Impersonating in seteuid failed: %E");
+  if (uid == myself->uid) return 0;
   return -1;
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]