diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-07-14 18:57:04 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-07-14 18:57:04 +0200 |
commit | 8f9f2b00171e6d93453ca23e208bb866f46aad41 (patch) | |
tree | f58cfabb27b691b0999059323c227c4830416c67 /src/login/logind-dbus.c | |
parent | 7fe5c6eb45196b75cd48b500af6ad8dc28115ff4 (diff) |
core, sd-bus, logind: make use of uid_is_valid() in more places
Diffstat (limited to 'src/login/logind-dbus.c')
-rw-r--r-- | src/login/logind-dbus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 70d2b1ffc..0b0109ad3 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -92,7 +92,7 @@ int manager_get_user_from_creds(Manager *m, sd_bus_message *message, uid_t uid, assert(message); assert(ret); - if (uid == UID_INVALID) { + if (!uid_is_valid(uid)) { _cleanup_(sd_bus_creds_unrefp) sd_bus_creds *creds = NULL; /* Note that we get the owner UID of the session, not the actual client UID here! */ @@ -1147,7 +1147,7 @@ static int method_set_user_linger(sd_bus_message *message, void *userdata, sd_bu if (r < 0) return r; - if (uid == UID_INVALID) { + if (!uid_is_valid(uid)) { _cleanup_(sd_bus_creds_unrefp) sd_bus_creds *creds = NULL; /* Note that we get the owner UID of the session, not the actual client UID here! */ |