/usr/share/acpi-support/power-funcs getXuser returns wrong $user

Bug #11035 reported by Christian Luiijten
8
Affects Status Importance Assigned to Milestone
gdm (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Line 8:
        user=`who| grep " :0" | awk '{print $1}'`

Gets incorrect username when that username is (originally) longer than 8 chars,
since 'who' only displays the first 8 chars.

Revision history for this message
Matthew Garrett (mjg59) wrote :

Seb, is there any chance we can have a file in a known location created when a
user logs in and with the name of that user? That way we can figure out who owns
the X session rather more reliably.

Revision history for this message
Matt Zimmerman (mdz) wrote :

What happens when a second user logs in to the same system?

utmp seems like the most reliable source for this data.

Revision history for this message
Matthew Garrett (mjg59) wrote :

This is now fixed.

Revision history for this message
Sebastien Bacher (seb128) wrote :

ups, I've zapped the previous comment. Nice it's fixed, but was that a gdm bug?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.