manager: make use of pid_is_valid() where appropriate

This commit is contained in:
Lennart Poettering
2018-01-11 15:12:16 +01:00
parent 007e4b5490
commit 15e23e8cdf
+1 -1
View 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;
}