[Bug 747380] New: "su -l <user>" does not set $XDG_RUNTIME_DIR for the new <user>
https://bugzilla.novell.com/show_bug.cgi?id=747380 https://bugzilla.novell.com/show_bug.cgi?id=747380#c0 Summary: "su -l <user>" does not set $XDG_RUNTIME_DIR for the new <user> Classification: openSUSE Product: openSUSE 12.1 Version: Final Platform: i586 OS/Version: openSUSE 12.1 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: werner.lueckel@aon.at QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0) Gecko/20100101 Firefox/10.0 If I login to another <user> with "su -l <user>", $XDG_RUNTIME_DIR is not set for that <user> but keeps set as for the calling user. As a result, 'dconf' doesn't work since 'dconf' relies on $XDG_RUNTIME_DIR/ beeing there and accessable for writing. I found a "work-around": insert in "/etc/pam.d/su-l" the entry: "session required pam_loginuid.so" before: "session include common-session" Now /run/user/<user>/ is made and $XDG_RUNTIME_DIR is set properly. Reproducible: Always Steps to Reproduce: 1. echo $XDG_RUNTIME_DIR -> e.g.: /run/user/lueckel 2. su -l guest 3. echo $XDG_RUNTIME_DIR -> also: /run/user/lueckel Actual Results: $XDG_RUNTIME_DIR points to the "old" location: /run/user/lueckel and there is no directory /run/user/guest/ Expected Results: $XDG_RUNTIME_DIR should point to /run/user/guest/ and a directory /run/user/guest/ should be made -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=747380 https://bugzilla.novell.com/show_bug.cgi?id=747380#c kk zhang <kkzhang@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kkzhang@novell.com AssignedTo|bnc-team-screening@forge.pr |kernel-maintainers@forge.pr |ovo.novell.com |ovo.novell.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=747380 https://bugzilla.novell.com/show_bug.cgi?id=747380#c kk zhang <kkzhang@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |lnussel@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=747380 https://bugzilla.novell.com/show_bug.cgi?id=747380#c2 Ludwig Nussel <lnussel@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lnussel@suse.com AssignedTo|lnussel@suse.com |fcrozat@suse.com --- Comment #2 from Ludwig Nussel <lnussel@suse.com> 2012-04-11 09:38:05 CEST --- bug in pam_systemd. calling pam_loginuid in su would defeat it's purpose -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=747380 https://bugzilla.novell.com/show_bug.cgi?id=747380#c3 Frederic Crozat <fcrozat@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID --- Comment #3 from Frederic Crozat <fcrozat@suse.com> 2012-04-11 13:28:29 UTC --- after discussing with upstream, this behaviour is normal, so closing as invalid (extract from irc conversation attached): <fcrozat> hmm, when logging to another user using "su -l", should /run/user/<new_user> be created ?(currently, it isn't) <mezcalero> fcrozat: no, the runtime dir is not changed when you su <fcrozat> mezcalero: and not even with su -l ? I mean, what is the rationale ? (so I can close the bug with a "correct" explanation) <mezcalero> fcrozat: "su" is a command that only minimally transitions to the new session fcrozat: for example, most env vars are left as is fcrozat: basically, only the UID is updated fcrozat: and most other stuff is left as is fcrozat: the audit session and audit login uid for example is left untouched <mezcalero> and we follow this scheme we don't transition XDG_RUNTIME_DIR we don't open a new cgroup if the user just uses "su" <mezcalero> fcrozat: basically we want a unified definition of what a login session is <fcrozat> and for "su -l" ? :) <mezcalero> fcrozat: and thus bind all this stuff together <mezcalero> su -l just says that a different set of scripts is executed by the shell after the transition <mezcalero> fcrozat: basically we piggyback everything to the definition of an audit session fcrozat: and the lifetime of the runtime dir is bound to that too fcrozat: i.e. the cgroup, the audit session, the runtime dir are all created and deleted together <mezcalero> that's how we do the ref counting basically <fcrozat> mezcalero: ok. But this mean the only way to get a new session is either tty (or graphical login) or ssh, not through "su -l" <mezcalero> fcrozat: no, with su you do get a limited new session, where su and HOME are changed, but little else -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=747380 https://bugzilla.novell.com/show_bug.cgi?id=747380#c4 Ludwig Nussel <lnussel@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID | --- Comment #4 from Ludwig Nussel <lnussel@suse.com> 2012-04-11 15:35:09 CEST --- it should unset XDG_RUNTIME dir then. pointing it to a location that is either not writable by the target user or potentially leaves root owned files is stupid. I agree that 'su' is only a limited session and broken by design for interactive use but "su -" is meant to reset the environment. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=747380 https://bugzilla.novell.com/show_bug.cgi?id=747380#c Frederic Crozat <fcrozat@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|fcrozat@suse.com |systemd-maintainers@suse.de -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=747380 https://bugzilla.novell.com/show_bug.cgi?id=747380#c5 Stefan Fent <stefan.fent@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #5 from Stefan Fent <stefan.fent@suse.com> 2014-03-10 10:00:40 UTC --- This is fixed in 13.1 - XDG_RUNTIME_DIR is unset with su -l. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com