[Bug 374694] [NEW] pulseaudio suspend/resume script fails for accounts with 8 char username

2009-05-10 Thread stephane
Public bug reported:

Binary package hint: pulseaudio

The suspend/resume script for this package (located at /usr/lib/pm-
utils/sleep.d/01PulseAudio) will fail if a user has a username longer
than eight characters.  This is because it relies on the output of 'ps
aux', which will display usernames longer than eight characters as their
numeric uids.  The resulting sudo command generated by the script will
then fail, because if sudoing to a uid, the sudo command would need to
be specified as sudo -u #1000 rather than sudo -u 1000.

I observed this issue on 9.04 (Jaunty).  The pulseaudio package version
is 0.9.14-0ubuntu20.  I expected suspend to work (as it did in
Intrepid).  It didn't.  I had a look at /var/log/pm-suspend.log, and now
here we are. :)

The attached diff represents one way of fixing this issue.

** Affects: pulseaudio (Ubuntu)
 Importance: Undecided
 Status: New

-- 
pulseaudio suspend/resume script fails for accounts with 8 char username
https://bugs.launchpad.net/bugs/374694
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 374694] [NEW] pulseaudio suspend/resume script fails for accounts with 8 char username

2009-05-10 Thread Luke Yelavich
Thanks for your bug report.
I think using the UID instead of the user name is actually a much better idea. 
Each user's UID is unique, and there is no chance of the script choaking on the 
many different characters that are possible in usernames.

I'll work on a patch to use the UID instead, thanks again.

 affects ubuntu/pulseaudio
 status confirmed
 assignee themuso 


** Changed in: pulseaudio (Ubuntu)
   Status: New = Confirmed

** Changed in: pulseaudio (Ubuntu)
 Assignee: (unassigned) = Luke Yelavich (themuso)

-- 
pulseaudio suspend/resume script fails for accounts with 8 char username
https://bugs.launchpad.net/bugs/374694
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs