]> git.pld-linux.org Git - packages/systemd.git/blame - systemd-logind_restart.patch
sync steam controller rules with latest steam launcher
[packages/systemd.git] / systemd-logind_restart.patch
CommitLineData
a961acde
JP
1From 0664daffee63648ff93b5571421149383501d356 Mon Sep 17 00:00:00 2001
2From: Jan Palus <atler@pld-linux.org>
3Date: Thu, 11 Jun 2020 18:23:28 +0200
4Subject: [PATCH] login: filenames in /run/systemd/users are uids
5
6Fixes: #16146
7Signed-off-by: Jan Palus <atler@pld-linux.org>
8---
9 src/login/logind.c | 9 ++++++++-
10 1 file changed, 8 insertions(+), 1 deletion(-)
11
12diff --git a/src/login/logind.c b/src/login/logind.c
13index 5a556f9ea4..3239f7d18a 100644
14--- a/src/login/logind.c
15+++ b/src/login/logind.c
16@@ -328,11 +328,18 @@ static int manager_enumerate_users(Manager *m) {
17
18 FOREACH_DIRENT(de, d, return -errno) {
19 User *u;
20+ uid_t uid;
21
22 if (!dirent_is_file(de))
23 continue;
24
25- k = manager_add_user_by_name(m, de->d_name, &u);
26+ k = safe_atou(de->d_name, &uid);
27+ if (k < 0) {
28+ r = log_warning_errno(k, "Failed to add user by file name %s, ignoring: %m", de->d_name);
29+ continue;
30+ }
31+
32+ k = manager_add_user_by_uid(m, uid, &u);
33 if (k < 0) {
34 r = log_warning_errno(k, "Failed to add user by file name %s, ignoring: %m", de->d_name);
35 continue;
36--
372.27.0
38
This page took 0.094223 seconds and 4 git commands to generate.