This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: xfree problem
- From: Harold L Hunt <huntharo at msu dot edu>
- To: "Pierre A. Humblet" <Pierre dot Humblet at ieee dot org>
- Cc: cygwin-xfree at cygwin dot com
- Date: Mon, 01 Jul 2002 17:37:25 EDT
- Subject: Re: xfree problem
Pierre,
We're going to have to make this discussion public because I don't know enough
about setuid, getuid, and xterm to answer all questions. I'll be sure to cc
you on any replies and I ask the anyone else replying do the same (Pierre is
not subscribed to the cygwin-xfree@cygwin.com mailing list).
> Have you run xterm under strace?
I've done straces and posted links to them in the following emails:
http://cygwin.com/ml/cygwin-xfree/2002-07/msg00014.html
http://cygwin.com/ml/cygwin-xfree/2002-07/msg00011.html
> Why does xterm do setuid? Is it privileged?
I have no idea. xterm is a well-known program and I'm sure someone else can
explain why this is done.
> Where is the screen uid/gid set?
> One recent change is that the gid must be valid
> for setuid to work.
The email that I gave you a link to below has a link to xterm's main.c, which
is all I can do for you. I don't know enough about getuid/setuid to tell you
what is happening in xterm's main (). You'll have to look for yourself. For
your convenience I've given you a direct link to the file:
http://cvsweb.xfree86.org/cvsweb/xc/programs/xterm/main.c
Harold
"Pierre A. Humblet" <Pierre.Humblet@ieee.org> said:
> Harold,
>
> Have you run xterm under strace?
>
> Why does xterm do setuid? Is it privileged?
>
> Where is the screen uid/gid set?
> One recent change is that the gid must be valid
> for setuid to work.
>
> Pierre
>
> Harold L Hunt wrote:
> >
> > Pierre,
> >
> > When you launch Cygwin/XFree86 (XWin.exe) and xterm.exe you get an error from
> > xterm (if you use the -hold parameter, which causes the xterm window to remain
> > open after the shell exits) that says:
> >
> > setuid failed: Permission denied
> >
> > I posted links to the xterm source code and an explanation of what happens
> > last week:
> > http://cygwin.com/ml/cygwin-xfree/2002-06/msg00418.html
> >
> > This could be a simple problem with user permissions that is actually related
> > to setuid and getuid, or it could be that some recent change to cygwin1.dll
> > tries to write to HKEY_LOCAL_MACHINE, which users of Windows NT Domains don't
> > always have permission to write to. I've got a machine at work where this is
> > the case and it is the only machine I have access to that exhibits this
problem.
> >
> > Hope that helps,
> >
> > Harold
> >
> > "Pierre A. Humblet" <Pierre.Humblet@ieee.org> said:
> >
> > > Harold,
> > >
> > > I hear xfree has setuid problems.
> > > That may be because of changes I introduced in cygwin.
> > > Can you give a url describing the problem? I will take a look.
> > >
> > > Pierre
> > >
> > > P.S.: please reply directly, I don't subscribe to the xfree list
> > >
>