Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
X running at root?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
BK201
Tux's lil' helper
Tux's lil' helper


Joined: 14 Dec 2008
Posts: 83
Location: Ohio

PostPosted: Mon Apr 26, 2010 3:30 pm    Post subject: X running at root? Reply with quote

Issuing startx from TTY1 as non root user is running X as root?? I've had this setup running for a few weeks and I just noticed this, no idea how long its been going on for though. How could this be happening? xorg-server-1.8 BTW

Last edited by BK201 on Mon Apr 26, 2010 4:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7105
Location: almost Mile High in the USA

PostPosted: Mon Apr 26, 2010 3:43 pm    Post subject: Reply with quote

This has been normal behavior for a long time. This is because the X11 server needs to control the hardware directly as the services needed to access the video card are not all available in the kernel and thus require root privileges to access.

This is facilitated by SUID root:
Code:
subaru:~/c/Program Files/World of Warcraft$ ls -l /usr/bin/Xorg
-rws--x--x 1 root root 1722076 Dec 12 12:30 /usr/bin/Xorg*

I believe that if you were using fbcon X11 you would then not need root privileges, but lose out on non-kernel available acceleration. It may still end up running as root due to the unified structure...

After setting up graphics, Xorg will drop root privileges before handing over library interfaces to your X clients.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?


Last edited by eccerr0r on Mon Apr 26, 2010 3:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3789
Location: sleeping in the bathtub

PostPosted: Mon Apr 26, 2010 3:46 pm    Post subject: Reply with quote

This is pretty much the way it's always been, `ls -l /usr/bin/Xorg` should show you the permissions on the Xorg binary itself being set to 'rws--x--x', meaning it'll run with the permissions of the file owner, which is root.

This is required because the X server requires certain hardware access to do it's job, access which unprivileged users should not have.
It's really not a huge issue security wise, everything else (window manager & co) are all run under your normal user.

There is supposedly some work into finally changing this, which should be possible since KMS went mainline, but I haven't heard a peep about it in ages, IMO it should have been here with xserver 1.8 but it doesn't even appear to be listed as a work in progress...

Anyways, it's perfectly normal, nothing to worrry about.

This doesn't belong in Unsupported Software, though.

edit: gah, slowpoke...
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
BK201
Tux's lil' helper
Tux's lil' helper


Joined: 14 Dec 2008
Posts: 83
Location: Ohio

PostPosted: Mon Apr 26, 2010 4:08 pm    Post subject: Reply with quote

huh, I (don't think) I've ever seen X running as root before, but then again this is the first time I've used KMS.

Quote:
This doesn't belong in Unsupported Software, though


I put it here since 1.8 is not in portage yet.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum