mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-12-27 06:05:24 +07:00
login: initialize XDG_RUNTIME_DIR as /run/user/$UID instead of /run/user/$USER
The sssd folks would like to place the kerberos credential cache in XDG_RUNTIME_DIR, but need to do that in the PAM auth hooks, before pam_systemd is run as part of the PAM session setup. Hence, in order to make this easy for them: avoid usage of usernames, and use user IDs instead thus making an additional NSS lookup unnecessary in the kerberos bits, but still have the directory well-defined so that the kerberos bits can determine it before pam_systemd is run.
This commit is contained in:
parent
d305a67b46
commit
2138e96918
@ -259,9 +259,7 @@ static int user_mkdir_runtime_path(User *u) {
|
||||
}
|
||||
|
||||
if (!u->runtime_path) {
|
||||
p = strappend("/run/user/", u->name);
|
||||
|
||||
if (!p) {
|
||||
if (asprintf(&p, "/run/user/%lu", (unsigned long) u->uid) < 0) {
|
||||
log_error("Out of memory");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user