Bug 32606

Summary: not authorized to connect to X after 2 invocations of su
Product: Sisyphus Reporter: Ivan Zakharyaschev <imz>
Component: suAssignee: placeholder <placeholder>
Status: NEW --- QA Contact: qa-sisyphus
Severity: minor    
Priority: P3 CC: glebfm, ldv, mike, placeholder
Version: unstable   
Hardware: all   
OS: Linux   

Description Ivan Zakharyaschev 2016-10-12 18:20:25 MSK
$ rpm -qf "$(which su)"
su-0.60-alt34

(I'm using the fresh regular-wmaker with Sisyphus.)

If I do "su" a single time (in an X terminal in my X session), I can connect to X (example: xmessage hi):

either

su -

or (a user named "test")

su - test

-- both work. "xauth list" lists one cookie.

But after doing "su" 2 times (with a different user, not to re-use the same cookie, probably), the X clients fail to connect:

[imz@baseimz ~]$ su -
Password: 
[root@baseimz ~]# xmessage hi
Warning: Cannot convert string "vlines2" to type Pixmap
[root@baseimz ~]# su - test
[test@baseimz ~]$ xmessage hi
No protocol specified
Error: Can't open display: :0
[test@baseimz ~]$ echo $DISPLAY 
:0
[test@baseimz ~]$ xauth list
xauth:  file /home/test/.Xauthority does not exist
[test@baseimz ~]$