diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-08-31 10:25:06 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-08-31 15:45:04 +0200 |
commit | ee043777be58251e7441b4f04594e9e3792d7fb2 (patch) | |
tree | 7f9be35e5c483853e5feab9e914a3099d322ea32 /src/login | |
parent | Merge pull request #6704 from andir/fix_vrf_table_identifier (diff) | |
download | systemd-ee043777be58251e7441b4f04594e9e3792d7fb2.tar.xz systemd-ee043777be58251e7441b4f04594e9e3792d7fb2.zip |
tree-wide: use pid_is_valid() at more places
Diffstat (limited to 'src/login')
-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 d66022f802..1aa6760665 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -344,7 +344,7 @@ static int method_get_session_by_pid(sd_bus_message *message, void *userdata, sd r = sd_bus_message_read(message, "u", &pid); if (r < 0) return r; - if (pid < 0) + if (!pid_is_valid((pid_t) pid)) return -EINVAL; if (pid == 0) { @@ -407,7 +407,7 @@ static int method_get_user_by_pid(sd_bus_message *message, void *userdata, sd_bu r = sd_bus_message_read(message, "u", &pid); if (r < 0) return r; - if (pid < 0) + if (!pid_is_valid((pid_t) pid)) return -EINVAL; if (pid == 0) { |