Bug 83007

Summary: Running clients as root via sudo chowns the user's runtime directory to root
Product: PulseAudio Reporter: Tanu Kaskinen <tanuk>
Component: clientsAssignee: pulseaudio-bugs
Status: RESOLVED FIXED QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: lennart
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 75721    

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.