[PATCH V4] xserver: check for elevated privileges not uid=0

Antoine Martin antoine at nagafix.co.uk
Tue Oct 11 01:02:50 PDT 2011

This allows us to run the server as a normal user whilst still
being able to use the -modulepath, -logfile and -config switches
We define a xf86PrivsElevated which will do the checks and cache
the result in case it is called more than once.
Also renamed the paths #defines to match their new meaning.
Original discussion which led to this patch can be found here:

Signed-off-by: Antoine Martin <antoine at nagafix.co.uk>

Changes from the previous version of this patch:
* use FatalError() rather than exit() (thx to Julien Cristau)
* remove comment superseded by FatalError message (thx to Tormod Volden)
* more defensive code: print warning and assume privs are elevated if 
getresuid or getresgid fail, ensure all codepaths set privsElevated 
explicitly and make it default to TRUE (in case we ever miss one)
* email title includes patch version in the right location
(btw, there are changes in xserver's autoconf, not just hw/xfree86)


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-xserver-check-for-elevated-privileges-not-uid-0.patch
URL: <http://lists.x.org/archives/xorg-devel/attachments/20111011/5b83901f/attachment.ksh>

More information about the xorg-devel mailing list