summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-01-04 11:36:35 +0100
committerLennart Poettering <lennart@poettering.net>2018-01-05 13:59:12 +0100
commit2ac0ab5921a3153e0334b4342554fc0c87ab01c3 (patch)
treebc614377cf272bb2e6a527cf8b620043daed00ca
parentc3cd7cc9297f44a2c856b74a510fdac14bd3ec61 (diff)
downloadsystemd-2ac0ab5921a3153e0334b4342554fc0c87ab01c3.tar.gz
logind: fix user_object_find()
The logic was completely borked since e4d2984bf8514ab576a66d5ac1f1cde746bb32a3, correct that. CID #1384234
-rw-r--r--src/login/logind-user-dbus.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/login/logind-user-dbus.c b/src/login/logind-user-dbus.c
index 9fca5ce0cd..d5d086cfe0 100644
--- a/src/login/logind-user-dbus.c
+++ b/src/login/logind-user-dbus.c
@@ -288,13 +288,13 @@ int user_object_find(sd_bus *bus, const char *path, const char *interface, void
return 0;
r = parse_uid(p, &uid);
- }
- if (r < 0)
- return 0;
+ if (r < 0)
+ return 0;
- user = hashmap_get(m->users, UID_TO_PTR(uid));
- if (!user)
- return 0;
+ user = hashmap_get(m->users, UID_TO_PTR(uid));
+ if (!user)
+ return 0;
+ }
*found = user;
return 1;