]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
manager: make use of pid_is_valid() where appropriate
authorLennart Poettering <lennart@poettering.net>
Fri, 5 Jan 2018 11:19:22 +0000 (12:19 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 11 Jan 2018 14:12:16 +0000 (15:12 +0100)
src/core/manager.c

index 6f50b177e012a8a76b496ee49c829c5699d5b86e..35cd9ee8791f5cbe5df0404b5a2f895594c488d1 100644 (file)
@@ -1977,7 +1977,7 @@ static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t
                 }
         }
 
-        if (!ucred || ucred->pid <= 0) {
+        if (!ucred || !pid_is_valid(ucred->pid)) {
                 log_warning("Received notify message without valid credentials. Ignoring.");
                 return 0;
         }