Bug 50977 - Using applications with sudo is more cumbersome than necessary.
Summary: Using applications with sudo is more cumbersome than necessary.
Status: RESOLVED MOVED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: clients (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-11 11:04 UTC by Tanu Kaskinen
Modified: 2018-07-30 10:27 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Tanu Kaskinen 2012-06-11 11:04:00 UTC
Depending on system configuration, sudo will by default keep HOME unchanged or will change it to the target user's home directory. In case HOME is kept unchanged, running applications with sudo fails, because HOME is not owned by the current user. However, if the target user is root, like it usually is, HOME will still be readable, so there's probably no good reason to fail just because HOME is not owned by root. So, instead of checking whether HOME is owned by the current user, libpulse should fail only if reading the necessary files fails.

If this is fixed simply by dropping the ownership test, then there will be the problem that if ~/.config/pulse et al don't exist, then root will create them, causing access problems when running as non-root. It's not necessary for libpulse to create anything, that's just how things are currently implemented. So, changing things so that libpulse never creates anything is another thing that needs to be implemented in order to properly fix this bug.

Currently it's necessary to set PULSE_SERVER to point to the normal user's native protocol socket in order to run programs with sudo. That extra step could be avoided with these changes (when sudo doesn't touch HOME, that is. If sudo changes HOME, then making things "just work" is much more tricky).
Comment 1 GitLab Migration User 2018-07-30 10:27:27 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/433.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.