FS#23795 - [consolekit] new consolekit does not change tty owner when opening X session

Attached to Project: Arch Linux
Opened by Vladimir (Psycho_zs) - Saturday, 16 April 2011, 13:48 GMT
Last edited by Tom Gundersen (tomegun) - Saturday, 18 June 2011, 19:43 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
Somewhere after upgrade to consolekit 0.4.3, when I start X session, tty used by X remains owned by root.

I login to tty1, it becomes owned by me, group tty, perms 0600. Then I run startx
my main exec line in .xinitrc:
exec ck-launch-session dbus-launch --exit-with-session openbox-session

X starts on tty7, but /dev/tty7 remains owned by root, group tty, perms 0620. It breaks scripts relying on fgconsole


$ ck-list-sessions
Session2:
unix-user = '1000'
realname = ''
seat = 'Seat1'
session-type = ''
active = TRUE
x11-display = ':0'
x11-display-device = '/dev/tty7'
display-device = '/dev/tty1'
remote-host-name = ''
is-local = TRUE
on-since = '2011-04-16T13:41:35.057401Z'
login-session-id = '1'

$ stat /dev/tty7
File: `/dev/tty7'
Size: 0 Blocks: 0 IO Block: 4096 character special file
Device: 5h/5d Inode: 865 Links: 1 Device type: 4,7
Access: (0620/crw--w----) Uid: ( 0/ root) Gid: ( 5/ tty)
Access: 2011-04-16 17:40:55.696666642 +0400
Modify: 2011-04-16 17:41:00.519999798 +0400
Change: 2011-04-16 17:40:55.696666642 +0400
Birth: -

This task depends upon

Closed by  Tom Gundersen (tomegun)
Saturday, 18 June 2011, 19:43 GMT
Reason for closing:  Not a bug
Comment by Jan de Groot (JGC) - Monday, 18 April 2011, 07:01 GMT
Xorg is the process owning the tty, and as it's setuid root, it runs as root. This is not a consolekit bug, afaik consolekit doesn't even set permissions anywhere.

Loading...