Any ideas with xterm/xfree problem?
Pierre A. Humblet
Pierre.Humblet@ieee.org
Mon Jul 1 15:39:00 GMT 2002
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;
}
More information about the Cygwin-patches
mailing list