Bug 36686 - as root "su <user> -c ls" exits with su: System error
Summary: as root "su <user> -c ls" exits with su: System error
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Lennart Poettering
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-29 09:54 UTC by Alban Browaeys
Modified: 2012-07-20 15:05 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Fix pam su exit error (11.70 KB, patch)
2011-04-29 09:54 UTC, Alban Browaeys
Details | Splinter Review

Description Alban Browaeys 2011-04-29 09:54:43 UTC
Created attachment 46159 [details] [review]
Fix pam su exit error

The are various issue with cgroups in the pam module as is when su is involved and started from root then switched to a lower access account.
This patch fixes those: ie /user/.pam-systemd-lock access, permissions of cgroups items and intermediate cgroups "directories" to allow them to be removed at the end of the session.
It needs review though I tested it on debian for the last few monthes (quality side).
Any questions or comments welcomed (I need to refresh my insights of this code I made monthes ago but sadly did not send to the bug tracker sooner)
Comment 1 Lennart Poettering 2011-04-29 15:53:30 UTC
Your su implementation is broken, if it does not run the session close hooks as privileged user.

Which one are you using?

We are using the one from coreutils, which gets this right.
Comment 2 Alban Browaeys 2011-09-01 19:41:31 UTC
(In reply to comment #1)
> Your su implementation is broken, if it does not run the session close hooks as
> privileged user.
> 
> Which one are you using?
> 
> We are using the one from coreutils, which gets this right.

the "shadow" one (ie from login package on debian).

sorry for the lag.
Comment 3 Lennart Poettering 2012-07-20 15:05:26 UTC
We don't use lock files in pam_systemd anymore, so I assume this bug is fixed for good.


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.