|
Bugzilla – Full Text Bug Listing |
| Summary: | Pulseaudio fails to start after running yast or other xdg-su programs | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 13.1 | Reporter: | Forgotten User O0tUa48jAE <forgotten_O0tUa48jAE> |
| Component: | Basesystem | Assignee: | systemd maintainers <systemd-maintainers> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Major | ||
| Priority: | P5 - None | CC: | caf4926, dimstar, forgotten_bjrImjCDxY, forgotten_DV81ZEWZkN, systemd-maintainers, tiwai, werner |
| Version: | Final | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | openSUSE 13.1 | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | 1012-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch | ||
|
Description
Forgotten User O0tUa48jAE
2013-11-24 13:43:26 UTC
Very similar bug in ubuntu: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1197395 @Johan, please test polkit packages from http://download.opensuse.org/repositories/home:/sumski:/bnc852015/openSUSE_13.1/ I added the repository you linked to, but it turns out it was older and it did not get installed. My installed version is 112-2.1. (In reply to comment #3) > I added the repository you linked to, but it turns out it was older and it did > not get installed. http://en.opensuse.org/SDB:Vendor_change_update#Full_repository_Vendor_change Tested, no difference. When starting up computer /run/user/1000/pulse is owned by me and pulseaudio works. After running yast it is owned by root and pulseaudio says: "Failed to create secure directory (/run/user/1000/pulse): Permission denied" Reading through Ubuntu and Redhat bugs, it seems that we need a fix in systemd. Added Werner and Frederic to Cc. The patch https://bugzilla.redhat.com/attachment.cgi?id=823388 doesn't work unfortunately in our case, because uid referred at that point is actually the user who called (xdg-)su. The patch has to be improved, as the patch author mentioned: https://bugzilla.redhat.com/show_bug.cgi?id=753882#c69 Meanwhile, we need a fix for this bad bug, and the fix below can be applied in parallel with systemd side: http://lists.freedesktop.org/archives/pulseaudio-discuss/2013-November/019121.html This should be harmless if the fix will be fixed in systemd side. So, basically we can take it as a temporary fix for 13.1 for now. I built a package with the fix (removing a text blaming systemd developers as it's just annoying) at OBS home:tiwai:branches:openSUSE:13.1:Update/pulseaudio. Give it a try. Updating only libpulse0.rpm should suffice, I guess, but in doubt, just update all :) Hmmm ... IMHO xdg-su nore any tool using xdg-su should change the ownership nor the permissions of and below /run/user/<pid>/ ... shouldn't it? Right, it shouldn't. PA currently doesn't check the validity of the given environment, so the root can override it. One can fix in PA side. This is what I did now. OTOH, the root cause is that xdg-su passes the invalid $XDG_RUNTIME_DIR. It's added explicitly in pam_systemd, and it's wrong. So, fixing each application isn't the best fix for all these issues. What is the URL to this one, so I can try it? OBS home:tiwai:branches:openSUSE:13.1:Update/pulseaudio. Yes, it contains the fixed packages. Do you have an URL, like this? http://download.opensuse.org/repositories/home:/sumski:/bnc852015/openSUSE_13.1/ I'm not familiar with opensuse and do not know where to find fixed package. The project isn't published, so you need to retrieve packages via osc. % osc getbinaries home:tiwai:branches:openSUSE:13.1:Update pulseaudio standard x86_64 Got it. Unfortunately it didn't help. I installed: libpulse0-4.0.git.270.g9490a-3.1.x86_64.rpm pulseaudio-4.0.git.270.g9490a-3.1.x86_64.rpm the restarted pulseaudio with: pulseaudio -k Same problem after running yast. You need to relogin. rebooted just to be sure, no difference. Scratch the packages. The fixes haven't been committed into that repo properly. The right packages are being built now. Retest later if you want. I'm playing around with the current upstream patch (backported to systemd 208) http://cgit.freedesktop.org/systemd/systemd/commit/src?id=baae0358f349870544884e405e82e4be7d8add9f and found that this does avoid setting XDG_RUNTIME_DIR but if this variable already exists in the environment then this will *not* help. Hrm, can't do just pam_putenv(handle, "XDG_RUNTIME_DIR") in the error case work?
diff --git a/src/login/pam-module.c b/src/login/pam-module.c
index be5901fd7735..b9f6a98e44b7 100644
--- a/src/login/pam-module.c
+++ b/src/login/pam-module.c
@@ -388,6 +388,8 @@ _public_ PAM_EXTERN int pam_sm_open_session(
pam_syslog(handle, LOG_ERR, "Failed to set runtime dir.");
return r;
}
+ } else {
+ pam_putenv(handle, "XDG_RUNTIME_DIR");
}
if (!isempty(seat)) {
Something similar I've added to the backport of the upstream patch ... build is running (In reply to comment #19) ... this has some side effect. Using su or sudo twice on the same XTerm does a logout of the full Xsession. With SR#208541 it works ... the trick is not to check for errors in this case *and* to use unsetenv() to remove the curent existing XDG_RUNTIME_DIR variable of the current process. Great. I checked the package in Base:System/systemd, and it looks fine. The bug is no longer seen as far as I've tested on KVM. Could you submit the fix for openSUSE 13.1, too? Created attachment 569177 [details]
1012-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch
and this is the patch
This is an autogenerated message for OBS integration: This bug (852015) was mentioned in https://build.opensuse.org/request/show/208541 Factory / systemd That might be related to bug 814626 This is an autogenerated message for OBS integration: This bug (852015) was mentioned in https://build.opensuse.org/request/show/209274 13.1 / systemd fixed This is an autogenerated message for OBS integration: This bug (852015) was mentioned in https://build.opensuse.org/request/show/209283 13.1 / systemd openSUSE-RU-2013:1850-1: An update that has three recommended fixes can now be installed. Category: recommended (moderate) Bug References: 849071,851393,852015 CVE References: Sources used: openSUSE 13.1 (src): systemd-208-9.1, systemd-mini-208-9.1, systemd-rpm-macros-2-9.1 *** Bug 829076 has been marked as a duplicate of this bug. *** *** Bug 814626 has been marked as a duplicate of this bug. *** openSUSE-RU-2016:0320-1: An update that has 146 recommended fixes can now be installed. Category: recommended (moderate) Bug References: 737690,742774,750845,818044,838475,841544,849870,852015,852021,852232,853293,854884,856389,856392,856858,857204,858864,859072,859365,860574,860937,861316,861489,863217,864745,864904,865834,866732,866933,867128,867663,867664,867840,868019,868230,868439,868931,869142,869603,872929,873432,873444,874665,875502,876587,876694,877021,877674,878525,880438,880732,881125,881559,881942,882393,882714,883565,884271,884403,885232,885288,886211,886599,886852,888178,888215,888612,889297,889357,890977,892096,892162,892300,893797,895087,896664,897799,897801,897803,898233,898240,898432,900558,901481,902240,902901,903009,903963,904214,904517,904828,905550,906709,906900,907318,907393,908476,909358,910643,911347,912030,912334,913517,916420,918118,919095,920195,921831,921898,921920,926169,927250,927457,928265,931388,932284,933365,933512,933521,933533,934077,934901,937512,937900,938908,939571,940264,941576,944132,944799,945282,947212,948458,948555,948705,949574,949683,949739,950510,951265,951663,953241,954336,954781,955635,961576 CVE References: Sources used: openSUSE 13.1 (src): systemd-210-40.1, systemd-mini-210-40.1 |