diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/login/logind-user.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/login/logind-user.c b/src/login/logind-user.c index 8cc407c20..7ab3e7513 100644 --- a/src/login/logind-user.c +++ b/src/login/logind-user.c @@ -362,6 +362,7 @@ static void user_start_service(User *u) { * start the per-user slice or the elogind-runtime-dir@.service instance, as those are pulled in both by * start the per-user slice or the elogind-runtime-dir@.service instance, as those are pulled in both by * start the per-user slice or the elogind-runtime-dir@.service instance, as those are pulled in both by + * start the per-user slice or the elogind-runtime-dir@.service instance, as those are pulled in both by * user@.service and the session scopes as dependencies. */ hashmap_put(u->manager->user_units, u->service, u); @@ -403,6 +404,7 @@ int user_start(User *u) { * elogind --user. We need to do user_save_internal() because we have not "officially" started yet. */ * elogind --user. We need to do user_save_internal() because we have not "officially" started yet. */ * elogind --user. We need to do user_save_internal() because we have not "officially" started yet. */ + * elogind --user. We need to do user_save_internal() because we have not "officially" started yet. */ user_save_internal(u); /* Spawn user systemd */ @@ -610,8 +612,14 @@ int user_check_linger_file(User *u) { return -ENOMEM; p = strjoina("/var/lib/elogind/linger/", cc); + if (access(p, F_OK) < 0) { + if (errno != ENOENT) + return -errno; + + return false; + } - return access(p, F_OK) >= 0; + return true; } bool user_may_gc(User *u, bool drop_not_started) { |