diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-06-28 18:16:32 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-06-28 19:25:08 +0200 |
commit | 38f3fc7da74d5d82cd0e4282e45bac32152ea076 (patch) | |
tree | b62d9721ca158d760e510a5f99df1b28405f9bf7 | |
parent | cd9e5d0a7697b3ccbc4dcb04444e6b42f5d309d1 (diff) |
logind: when changing linger stetings, make sure they take place immediately
-rw-r--r-- | src/logind-dbus.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/logind-dbus.c b/src/logind-dbus.c index 320bb35efd..af5176ca32 100644 --- a/src/logind-dbus.c +++ b/src/logind-dbus.c @@ -928,17 +928,29 @@ static DBusHandlerResult manager_message_handler( goto oom; if (b) { + User *u; + r = touch(path); free(path); if (r < 0) return bus_send_error_reply(connection, message, &error, r); + + if (manager_add_user_by_uid(m, uid, &u) >= 0) + user_start(u); + } else { + User *u; + r = unlink(path); free(path); if (r < 0 && errno != ENOENT) return bus_send_error_reply(connection, message, &error, -errno); + + u = hashmap_get(m->users, ULONG_TO_PTR((unsigned long) uid)); + if (u) + user_add_to_gc_queue(u); } reply = dbus_message_new_method_return(message); |