[PATCH xserver] check for elevated privileges not uid=0 (V2)
antoine at nagafix.co.uk
Mon Oct 10 07:07:30 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:
Changes from the previous version of this patch:
* moved variables inside the function (thx to Tormod Volden)
* fallback code (when both HASSETUGID and HASGETRESUID are unset) now
correctly returns FALSE if uid is already 0. (thx to Michal Suchanek)
* consistently use "TRUE" constant rather than "1" value
You can find some ready made Fedora 15 test RPMs here:
I have been using this patch for days without any visible side effects.
Can I please get some reviewed-by / acks?
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the xorg-devel