Bug 32606 - not authorized to connect to X after 2 invocations of su
Summary: not authorized to connect to X after 2 invocations of su
Status: NEW
Alias: None
Product: Sisyphus
Classification: Development
Component: su (show other bugs)
Version: unstable
Hardware: all Linux
: P3 minor
Assignee: placeholder@altlinux.org
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-12 18:20 MSK by Ivan Zakharyaschev
Modified: 2016-10-20 13:47 MSK (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ~]$