Bug 138688 - The setuid patch for x11-base/xorg-server-1.0.2 is broken.
Bug#: 138688 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: x11@gentoo.org Reported By: rudo@matfyz.cz
Component: Applications
URL: 
Summary: The setuid patch for x11-base/xorg-server-1.0.2 is broken.
Keywords:  
Status Whiteboard: 
Opened: 2006-07-01 04:12 0000
Description:   Opened: 2006-07-01 04:12 0000
Hi,

I have looked at the x11-base/xorg-server/files/x11r7.0-setuid.diff file in the
portage tree and found the patch broken.

As of revision 1.1 of the file in portage CVS, the write.c hunk says:

-                       setuid(getuid());
+                       if (setuid(getuid() == -1)
+                           FatalError("xf86writeConfigFile(): "

Note the missing closing parenthesis after getuid(). I wonder how it could even
compile (haven't tried it myself though).

Please fix the patch.

Bye for now.

Rudo.

------- Comment #1 From Joshua Baergen (RETIRED) 2006-07-01 09:31:06 0000 -------
It probably doesn't compile the parser, then.  I'll fix this up anyway.  Good
catch :)

Donnie, this is broken in the 1.1 patch as well, which probably means it's
broken in git upstream.

------- Comment #2 From Donnie Berkholz 2006-07-01 12:43:10 0000 -------
I've also committed your fix upstream.

------- Comment #3 From Curtis 2007-01-24 21:26:19 0000 -------
Created an attachment (id=108057) [details]
dev-perl:XML-Parser-2.34:20070124-212406.log