Re: xinit's xserverrc

2008-05-28 Thread Sven-Haegar Koch
On Wed, 28 May 2008, Kai Hendry wrote:

 On 2008-05-28T01:15+0200 Brice Goglin wrote:
  Try passing /etc/X11/xorg.webc.conf instead of a relative path. IIRC, we
  only allow alternative config files from /etc/X11.
 
 Not sure about the argument ordering:
 xinit /etc/X11/xinit/xinitrc -- /usr/bin/X -conf /etc/X11/xorg.webc.conf :1 
 -auth /tmp/serverauth.CBjhw27703
 xinit /etc/X11/xinit/xinitrc -- /usr/bin/X :1 -conf /etc/X11/xorg.webc.conf 
 -auth /tmp/serverauth.CBjhw27703
 
 However both fail with:
 
   Fatal server error:
   Unrecognized option: -conf

man Xorg says the option is named '-config', not '-conf'

 
 Still a bit confused over X  Xorg:
 
 x61:~% ll /usr/bin/Xorg /usr/bin/X
 -rwsr-sr-x 1 root root 7.4K 2008-01-06 20:20 /usr/bin/X*
 -rwxr-xr-x 1 root root 1.6M 2008-05-18 12:55 /usr/bin/Xorg
 
 
 Why can't X take Xorg's arguments? (-conf)
 
 
 Why does Xorg suffer perm problems whilst X doesn't?

X is a suid-root wrapper executing Xorg/the real xserver so that the 
server itself gets started as root

c'ya
sven

-- 

The Internet treats censorship as a routing problem, and routes around
it. (John Gilmore on http://www.cygnus.com/~gnu/)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: xinit's xserverrc

2008-05-28 Thread Kai Hendry
On 2008-05-28T01:15+0200 Brice Goglin wrote:
 Try passing /etc/X11/xorg.webc.conf instead of a relative path. IIRC, we
 only allow alternative config files from /etc/X11.

Not sure about the argument ordering:
xinit /etc/X11/xinit/xinitrc -- /usr/bin/X -conf /etc/X11/xorg.webc.conf :1 
-auth /tmp/serverauth.CBjhw27703
xinit /etc/X11/xinit/xinitrc -- /usr/bin/X :1 -conf /etc/X11/xorg.webc.conf 
-auth /tmp/serverauth.CBjhw27703

However both fail with:

Fatal server error:
Unrecognized option: -conf

Still a bit confused over X  Xorg:

x61:~% ll /usr/bin/Xorg /usr/bin/X
-rwsr-sr-x 1 root root 7.4K 2008-01-06 20:20 /usr/bin/X*
-rwxr-xr-x 1 root root 1.6M 2008-05-18 12:55 /usr/bin/Xorg


Why can't X take Xorg's arguments? (-conf)


Why does Xorg suffer perm problems whilst X doesn't?

[EMAIL PROTECTED]:~$ grep perm /home/webc/justXorg.log
(WW) xf86ReadBIOS: Failed to open /dev/mem (Operation not permitted)
(WW) xf86OpenConsole: chown /dev/tty8 failed: Operation not permitted
(WW) xf86OpenConsole: chown /dev/tty0 failed: Operation not permitted
xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
[EMAIL PROTECTED]:~$ groups
webc root kmem video


Thanks again for helping me out,
# Webconverger.com options to disable X options

Section ServerFlags
  Option  AllowMouseOpenFail
  Option  HandleSpecialKeys Never
  Option  DontZoom true
  Option  DontZap true
  Option  DontVTSwitch true
EndSection



Re: xinit's xserverrc

2008-05-28 Thread Julien Cristau
On Wed, May 28, 2008 at 01:15:25 +0200, Brice Goglin wrote:

 Kai Hendry wrote:
  # This actually works:
  xinit /etc/X11/xinit/xinitrc -- /usr/bin/X :1 -auth 
  /tmp/serverauth.CBjhw27703
  # But without xorg.webc.config
 
  Any ideas where I am going wrong here?

 
 Try passing /etc/X11/xorg.webc.conf instead of a relative path. IIRC, we
 only allow alternative config files from /etc/X11.
 
No we don't.  The /usr/bin/X setuid wrapper only allows -config for
root.

Cheers,
Julien


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: xinit's xserverrc

2008-05-28 Thread Kai Hendry
Running as the user 'webc' with groups: webc root kmem video

# ARGS=-logfile /tmp/runmeX.txt -config xorg.webc.conf
# Error: xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)

# ARGS=-logfile /tmp/runmeX.txt
# Error: The '-logfile' option can only be used by root.

ARGS= # *does work*!
xinit /etc/X11/xinit/xinitrc -- /usr/bin/X :1 ${ARGS} -auth 
/tmp/serverauth.CBjhw27703


I don't think the X-Xorg SUID wrapper is passing arguments properly. These
invocations as root run fine:

xinit /etc/X11/xinit/xinitrc -- /usr/bin/X :1 -logfile /tmp/runmeX.txt -config 
xorg.webc.conf -auth /tmp/serverauth.CBjhw27703
xinit /etc/X11/xinit/xinitrc -- /usr/bin/Xorg :1 -logfile /tmp/runmeX.txt 
-config xorg.webc.conf -auth /tmp/serverauth.CBjhw27703

So the ARGS are fine.


Kind regards,


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: xinit's xserverrc

2008-05-27 Thread Brice Goglin
Kai Hendry wrote:
 # This actually works:
 xinit /etc/X11/xinit/xinitrc -- /usr/bin/X :1 -auth /tmp/serverauth.CBjhw27703
 # But without xorg.webc.config

 Any ideas where I am going wrong here?
   

Try passing /etc/X11/xorg.webc.conf instead of a relative path. IIRC, we
only allow alternative config files from /etc/X11.

Brice


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: xinit's xserverrc

2008-05-27 Thread Kai Hendry
On Tue, May 27, 2008 at 12:16 PM, Brice Goglin
[EMAIL PROTECTED] wrote:
 I think both startx and xserverrc should do the trick.

Tried passing -config over startx and it didn't work.

Now I'm a little confused between /usr/bin/Xorg and /usr/bin/X11/X.
Shouldn't they be the same?

 These manpages are too easy to find, the one you want to look at is Xorg :)

Xorg -logfile /home/webc/X.log -config xorg.webc.conf :1
b0rks with:
xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)

same with startx inspired xinit:
xinit /etc/X11/xinit/xinitrc -- /usr/bin/Xorg -logfile
/home/webc/justX.log :1  -auth /tmp/serverauth.CBjhw27703

juggling args here:
xinit /etc/X11/xinit/xinitrc -- /usr/bin/Xorg :1 -config
xorg.webc.conf -logfile /home/webc/justXorg.log -auth
/tmp/serverauth.CBjhw27703

Still no go. Attached log.

Perms are right
[EMAIL PROTECTED]:~$ groups
webc root kmem video

Ok looking deeper I found /usr/bin/X gets further, but doesn't seem to
be take in the -config argument.

# -logfile can only be used as root??

# xinit /etc/X11/xinit/xinitrc -- /usr/bin/X -config xorg.webc.config
:1 -auth /tmp/serverauth.CBjhw27703
# is moans about not being able to move the log file

# This actually works:
xinit /etc/X11/xinit/xinitrc -- /usr/bin/X :1 -auth /tmp/serverauth.CBjhw27703
# But without xorg.webc.config

Any ideas where I am going wrong here?

Kind regards,


justXorg.log
Description: Binary data