01Pulseaudio does nothing due to misuse of su -l and shell misquoting

Bug #572391 reported by Chow Loong Jin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Fix Released
High
Chow Loong Jin
Lucid
Won't Fix
Undecided
Daniel T Chen

Bug Description

  affects ubuntu/pulseaudio
  status triaged
  assignee hyperair
  importance high
  tag patch regression-release

PROBLEM:
These few days, I noticed pulseaudio making weird sounds during and after
suspending, as well as hanging and wrecking havoc in every sound-using application.

This is with a kernel with sound-2.6.git merged in, so it's not about broken
outdated audio drivers.

REASON:
01Pulseaudio pm-utils hook script is broken in several places.

FIX:
1. Remove -l from all instances of su invocations. -l causes a login shell which
immediately causes the script to fail silently since all the su invocations go
to /dev/null.

2. Fix su quoting.

Regarding #2, There were several instances of 'blahblah${var}', which was
intended to sub in ${var}, but obviously wouldn't work because they was not
exported in the first place. So the patch changes ' to " for these cases.

Then there are the savestate/restorestate/state_exists shell functions which
were within the quotes of the command passed to su. This broke the script as well.

Attached is a patch which combined fixes for all the above issues. Do what you
will with it. I've tested it, and it works on my system.

--
Kind regards,
Chow Loong Jin

Revision history for this message
Chow Loong Jin (hyperair) wrote : 01Pulseaudio does nothing
description: updated
Daniel T Chen (crimsun)
Changed in pulseaudio (Ubuntu):
status: Triaged → Fix Committed
Changed in pulseaudio (Ubuntu Lucid):
status: New → Fix Committed
assignee: nobody → Daniel T Chen (crimsun)
milestone: none → lucid-updates
summary: - 01Pulseaudio does nothing
+ 01Pulseaudio does nothing due to misuse of su -l and shell misquoting
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 1:0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu15

---------------
pulseaudio (1:0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu15) maverick; urgency=low

  * 0093-backport-fixes-stable-queue-head.patch: Backport the following
    changesets from the stable-queue branch:
    + bc7314f (name all threads for /proc/$PID/task/$TID/comm)
    + d519ca4 (prevent crash on jack server shutdown) (LP: #538815)
    + 65f89dc (fix bracketing in pa_rtp_recv())
  * debian/01PulseAudio: modify the ConsoleKit active seat checks in the
    pm-utils hook so that:
    - pre-suspend: all users' sink & source states are stored, then only
      the active seat's sinks and sources are muted
    - post-resume: all users' sink & source pre-suspend states are
      restored
    This resolves the issue where users' post-resume sink & source
    states don't correspond with their pre-suspend ones.
    (LP: #569395)
  * debian/01PulseAudio: fix broken quoting and misuse of su -l. Merged
    from lp:~hyperair/pulseaudio/fix-01Pulseaudio-quoting. Thanks,
    Chow Loong Jin! (LP: #572391)
  * debian/control: Update bzr branch for maverick.
 -- Daniel T Chen <email address hidden> Sat, 08 May 2010 11:08:56 -0400

Changed in pulseaudio (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Rolf Leggewie (r0lf) wrote :

lucid has seen the end of its life and is no longer receiving any updates. Marking the lucid task for this ticket as "Won't Fix".

Changed in pulseaudio (Ubuntu Lucid):
status: Fix Committed → Won't Fix
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.