Created attachment 317362 [details]
patch for testing, insert some UID except 0 instead of SOME USER ID
xorg-server shouldn't run as root.
(In reply to comment #0)
> xorg-server shouldn't run as root.
What user should X be run as?
I'm using user xorg
1. add new user xorg
useradd -u 600 -d /dev/null -s /sbin/nologin xorg
2. replace SOME USER ID with 600 in patch
Created attachment 317692 [details, diff]
1. uid of user xorg is read from /etc/passwd
2. if setuid to user xorg fails Xserver is terminated
I think USE=suid and a solution to bug 556834 will solve this in a better way.
It's not a direct duplicate, but...
*** This bug has been marked as a duplicate of bug 556834 ***