On Wednesday 12 October 2011 18:50:32 Keith Packard wrote:
> On Thu, 6 Oct 2011 13:19:35 +0100, Barry Scott <[email protected]> 
> wrote:
> 
> > Is there anything else I need to do to make this patch acceptable
> > for inclusion in Xorg?
> 
> Two things:
> 
>  1. This option needs to be restricted to root, much like many other
>     options in the server (-modulepath, etc). There's a patch in the
>     queue which regularizes this, but the xf86 DDX uses:
> 
>     if ( (geteuid() == 0) && (getuid() != 0) ) {
>       FatalError("The '%s' option can only be used by root.\n", argv[i]);
>     }

understood, if Xorg is SUID then this is a problem. I can fix that.

> 
>  2. I'd love to figure out how to fork at the time of the error; this
>     would encourage people to actually use this option regularly.
> 
>     posix threads makes the usual libc fork() function take the malloc
>     mutex across its operations, but I wonder if syscall(SYS_fork) is
>     portable enough to be used instead?

Pre forking means that the handler is not dependent on sanity of libc.
The last serious Xorg bug we where trying to fix was a malloc heap corruption
that prevented the "fork on demand" patch from working at all.

Would a fix for the SUID security issue bring this patch up to a suitable
level of usefulness to include in Xorg? Leaving improvements like
fork on demand to a later patch?

Barry
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to