Xorg 6.8.1: can't switch VT or resolution (partially solved)

Corey Hickey bugfood-ml at fatooh.org
Sat Oct 2 22:18:47 PDT 2004


Erik Harrison wrote:
> I dunno. Could you wrap X in a starter script that was suid root, and
> sets LD* to whatever you need?
> 
> -Erik

As far as I can tell, setuid scripts don't exist because the interpreter
(e.g. /bin/bash) would need to be setuid root, and scripts running
setuid would be easily exploitable anyway. Here's a good link (read the
follow-ups):

http://mail.linux-sxs.org/pipermail/linux-users/2003-May/046643.html

Thanks for the idea, though. A follow-up to the URL above mentions using
sudo. I thought maybe (but probably not) I could use sudo to run a
script that sets LD_LIBRARY_PATH and then uses su to run xorg as my
normal user. I tried this:

#!/bin/bash
XORG=/usr/local/X11R6.8
export LD_LIBRARY_PATH=$XORG/lib
export PATH=$XORG/bin:$PATH
su bugfood "xinit $XORG/bin/xterm -- $XORG/bin/Xorg :1 vt8"

..and simply ran it as root, to test. But it didn't work; the library
path probably gets stripped when su runs Xorg as bugfood. Removing the
setuid bit from Xorg results in Xorg saying it needs to be setuid root,
as it did before.

Thanks,
Corey



More information about the xorg mailing list