[RFC] Xdummy standalone binary or "-dummy" switch

Antoine Martin antoine at nagafix.co.uk
Sun Oct 2 22:50:51 PDT 2011


[snip]
> Others will have an easier time
> reviewing and merging your patch if you follow these guidelines:
>
> http://wiki.x.org/wiki/Development/Documentation/SubmittingPatches
Will do, I just thought this would be ok for the RFC stage.
>> The only other patch required to make this useful for non-root users is
>> the one that allows for absolute config files I had posted earlier,
>> otherwise I don't see how one can launch using custom config files as
>> the "-config" option does not seem to honour the "-configdir" option.
>> Obviously this would now need an extra euid!=uid check.
>> Or am I missing something again?
> Looks to me like all you need for this bit is to fix the getuid check
> in xf86HandleConfigFile. The USER_CONFIGPATH lists both absolute and
> relative paths as the first things it checks, and this also takes care
> of -configdir. (But -configdir doesn't do what you think it does.)
Hah, so I guess you are suggesting that USER_CONFIGPATH is used when not
running with elevated privileges?
I'll have to check which paths are used carefully as this could cause a
change in behaviour...
>>>> If that's all the issues you've had, I'm hoping that just fixing the
>>>> stupid "am I root?" checks will take care of everything you need.
>>>> Anything missing?
>> I don't think so - works-for-me(tm)
> Hooray!
>
>> I guess distributors will then have to ship two copies of /usr/bin/Xorg,
>> one that is suid-root and one that isn't? (until we can get rid of the
>> suid one entirely, one day)
> Amusingly, any user can get a non-suid copy of a suid binary. "cp"
> will do.
On Fedora, /usr/bin/Xorg is not world readable, so you can't do that.
I've never understood the reasoning behind this decision since anyone
can easily get hold of the exact same binary file from a CD or rpm mirror.

Antoine
>  But I think adding a "-dropprivs" flag wouldn't be a terrible
> plan. It should wait until we find out if distros actually have this
> problem, though, especially since apparently it's hard to fully drop
> privileges correctly and portably.
>
> Jamey



More information about the xorg-devel mailing list