summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-06-19 17:25:28 +0200
committerLennart Poettering <lennart@poettering.net>2012-06-19 17:29:22 +0200
commit2138e96918c7ed6fbf31f5df509f337a1973dfdd (patch)
tree4f09a3ca18f0dfadc62624279e659ac354176791 /src
parentd305a67b46644d6360ef557109384c831ee8e018 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/login/logind-user.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
index 4622812e3c..0a3f22ce99 100644
--- a/src/login/logind-user.c
+++ b/src/login/logind-user.c
@@ -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;
}