1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 09:56:51 +03:00

manager: make use of pid_is_valid() where appropriate

This commit is contained in:
Lennart Poettering 2018-01-05 12:19:22 +01:00
parent 007e4b5490
commit 15e23e8cdf

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;
}