<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - libpam-systemd does not change XDG_RUNTIME_DIR when using su - username"
href="https://bugs.freedesktop.org/show_bug.cgi?id=70810#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - libpam-systemd does not change XDG_RUNTIME_DIR when using su - username"
href="https://bugs.freedesktop.org/show_bug.cgi?id=70810">bug 70810</a>
from <span class="vcard"><a class="email" href="mailto:gabisoft@freesurf.ch" title="Gabriel Mainberger <gabisoft@freesurf.ch>"> <span class="fn">Gabriel Mainberger</span></a>
</span></b>
<pre>If getting the struct passwd * allways by username, it is working with su.
src/login/pam-module.c:166:static int get_user_data
/*r = audit_loginuid_from_pid(0, &uid);
if (r >= 0)
pw = pam_modutil_getpwuid(handle, uid);
else {*/
r = pam_get_user(handle, &username, NULL);
Oct 27 08:40:11 andromeda su[8585]: pam_unix(su:session): session closed for
user root
Oct 27 08:40:16 andromeda su[8601]: Successful su for root by gabriel
Oct 27 08:40:16 andromeda su[8601]: + /dev/pts/2 gabriel:root
Oct 27 08:40:16 andromeda su[8601]: pam_unix(su:session): session opened for
user root by gabriel(uid=1000)
Oct 27 08:40:16 andromeda su[8601]: pam_systemd(su:session): Asking logind to
create session: uid=0 pid=8601 service=su type=tty class=user seat=seat0 vtnr=7
tty=/dev/pts/2 display= remote=no remote_user=gabriel remote_host=
Oct 27 08:40:16 andromeda su[8601]: pam_systemd(su:session): Reply from logind:
id=2 object_path=/org/freedesktop/login1/session/_32
runtime_path=/run/user/1000 session_fd=6 seat=seat0 vtnr=7
Oct 27 08:42:31 andromeda su[8601]: pam_unix(su:session): session closed for
user root
The runtime_path is still wrong, but the correct uid is overgiven.
Is there any reason to use the function audit_loginuid_from_pid?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>