This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: Any ideas with xterm/xfree problem?
- From: "Pierre A. Humblet" <Pierre dot Humblet at ieee dot org>
- To: cygwin-patches at cygwin dot com
- Date: Mon, 01 Jul 2002 18:39:20 -0400
- Subject: Re: Any ideas with xterm/xfree problem?
- References: <20020701204140.GA25217@redhat.com> <3D20C1DA.26509E01@ieee.org> <20020701212139.GE25306@redhat.com>
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;
}