[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: X authentication and su (Re: changing framebuffer device owner during login)



On Sun, 1 Jul 2001, Herbert Xu wrote:

> Matt Zimmerman <mdz@debian.org> wrote:
> 
> > introduce a dependency on X by using the library routines.  Does anyone know
> > how to gen xauth to cooperate, or am I stuck using a temporary file?
> 
> Would /dev/stdout work?

   It does not work: xauth tries to lock /dev/stdout and fails:

$ xauth -f /dev/stdout generate $DISPLAY . untrusted timeout 10
xauth:  timeout in locking authority file /dev/stdout

   The problem is xauth expects this file to be in the .Xauthority
format and thus I guess it tries to lock it, read it and rewrite it to
add the new cookie. Maybe the intention was that user X would directly
add the cookie to uer Y's .Xauthority file but of course it cannot work
because of the access right issues. Even if X were root it would no work
because roout would end up owning Y's file.

   What's needed is for xauth to output the generated cookie in
extract/nextract or list mode. Then it makes sense to send it to stdout.
But how would you choose the output format, I'm not sure. Or maybe '-f'
should mean read from stdin and write to stdout. Then you would do:

$ xauth -f - generate $DISPLAY . untrusted timeout 10 | xauth -f - extract


   Also the role of '-f' wrt. '~/.Xauthority' when generate is used
really needs clarification in the documentation.


--
Francois Gouget         fgouget@free.fr        http://fgouget.free.fr/
     The software said it requires Win95 or better, so I installed Linux.





Reply to: