Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

If running X11 as root is not a very good idea, then can anyone mention a method/solution, how to still use a GUI, and not having X11 as root?

share|improve this question
2  
Don't run as root as just use sudo when you need to elevate privilege? Why the hell do you NEED to run as root in the first place? –  Bruno Rohée May 3 '11 at 8:01
    
can you give more detail? Is it just for X that you require higher privs? If so, Bruno has the answer (and in fact should post it as an answer) –  Rory Alsop May 3 '11 at 8:30
    
I don't have an obsd right next to me, that's why I'm asking. So "X11" doesn't runs by default with root priviledges? ok! –  LanceBaynes May 3 '11 at 10:05
    
Yeah that's the point X11 is privilege separated on OpenBSD –  Bruno Rohée May 3 '11 at 14:18
    
"X11 is privilege separated on OpenBSD" - thank you! –  LanceBaynes May 4 '11 at 4:47
add comment

1 Answer

up vote 4 down vote accepted

(I speak here more generically than in the specific case of OpenBSD.)

X11 needs some direct access to the underlying hardware, something which requires some extra privileges which are not given to just any process (such privileges can be used to mess with memory transfers, e.g. between system memory and hard disks). So there must be some root-or-equivalent involved at some point. However, once the said privileges have been granted, nothing says that the process which runs the X server must keep on being root. Of course, if a non-root-but-with-hardware-access X server gets subverted, it still may gain, theoretically, strong access to the machine through DMA manipulations, but this does not look easy at all.

(Also, there can be totally unprivileged X11 servers which use a framebuffer interface, although this tends not to be very compatible with support for accelerated graphics.)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.