FS#12557 - Terminals in X-Sessions do not report to /var/run/utmp

Attached to Project: Arch Linux
Opened by Janis Hamme (xblax) - Tuesday, 23 December 2008, 21:10 GMT
Last edited by Aaron Griffin (phrakture) - Wednesday, 24 December 2008, 15:48 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Aaron Griffin (phrakture)
Architecture All
Severity Medium
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Terminals in X-Sessions do not report to /var/run/utmp and therefore are not listest by commands like who, w

I think that the reason is wrong permissions. If I add write permissions for group to /var/run/utmp, everything seems to work fine.

Correct permissions should be assigned on bootup by the init scripts.
This task depends upon

Closed by  Aaron Griffin (phrakture)
Wednesday, 24 December 2008, 15:48 GMT
Reason for closing:  Fixed
Additional comments about closing:  In git. Will be in next initscripts release
Comment by Aaron Griffin (phrakture) - Tuesday, 23 December 2008, 21:52 GMT
  • Field changed: Status (Unconfirmed → Waiting on Response)
  • Field changed: Category (System → Packages: Core)
  • Task assigned to Aaron Griffin (phrakture)
Which group did you give write permissions to?
Can you show me output of: stat /var/run/utmp ?

I'll gladly change this in the filesystem package. This shouldn't be done at bootup though, as the filesystem should keep its permissions on its own.
Comment by Janis Hamme (xblax) - Tuesday, 23 December 2008, 22:32 GMT
[root@eee ~]# stat /var/run/utmp
File: `/var/run/utmp'
Size: 6912 Blocks: 16 IO Block: 4096 regular file
Device: 805h/2053d Inode: 87650 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2008-12-23 16:04:19.000000000 +0100
Modify: 2008-12-24 00:21:37.000000000 +0100
Change: 2008-12-24 00:21:37.000000000 +0100

/var/log/wtmp has als group write permissiosn and the file should work in the same way like utmp
In other distros /var/run/utmp is owned by the group "utmp" but I dont't know what's the reason for this.

The proper permissions should be assigned in the init scripts because /var/run/utmp is re-created on every bootup in /etc/rc.sysinit, wtmp is not.
Comment by Aaron Griffin (phrakture) - Tuesday, 23 December 2008, 22:46 GMT

Loading...