Bug 83007 - Running clients as root via sudo chowns the user's runtime directory to root
Summary: Running clients as root via sudo chowns the user's runtime directory to root
Status: RESOLVED FIXED
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: 75721
  Show dependency treegraph
 
Reported: 2014-08-24 10:46 UTC by Tanu Kaskinen
Modified: 2014-09-08 11:53 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Tanu Kaskinen 2014-08-24 10:46:06 UTC
When using su or sudo to switch users, XDG_RUNTIME_DIR is not updated automatically. This is especially problematic when switching to root, because the client library will always chown the runtime directory to the running user. I believe the proper fix would be to fail if the runtime directory exists but is owned by some other user, instead chowning the directory. Also, if the runtime directory doesn't exist, it should not be created by clients.
Comment 1 David Henningsson 2014-08-29 10:05:22 UTC
How about applying this patch, but skip the "systemd blaming" in the log message?

http://lists.freedesktop.org/archives/pulseaudio-discuss/2013-November/019121.html
Comment 2 Tanu Kaskinen 2014-09-07 12:00:14 UTC
Yes, I think that patch is good. It doesn't solve the problem that clients create the runtime directory if it doesn't exist, but that's not as serious problem as chowning existing directories to root.

Will you update your patch, or should someone else do that?


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.