summaryrefslogtreecommitdiff
path: root/src/logind.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/logind.c')
-rw-r--r--src/logind.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/logind.c b/src/logind.c
index f96ace2315..a081501a8c 100644
--- a/src/logind.c
+++ b/src/logind.c
@@ -509,19 +509,19 @@ int manager_enumerate_users(Manager *m) {
}
while ((de = readdir(d))) {
- unsigned long ul;
+ uid_t uid;
User *u;
if (!dirent_is_file(de))
continue;
- k = safe_atolu(de->d_name, &ul);
+ k = parse_uid(de->d_name, &uid);
if (k < 0) {
log_error("Failed to parse file name %s: %s", de->d_name, strerror(-k));
continue;
}
- u = hashmap_get(m->users, ULONG_TO_PTR(ul));
+ u = hashmap_get(m->users, ULONG_TO_PTR(uid));
if (!u) {
unlinkat(dirfd(d), de->d_name, 0);
continue;