From 15e23e8cdf19ecb2a253d12fd53c88856a529f7d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 5 Jan 2018 12:19:22 +0100 Subject: [PATCH] manager: make use of pid_is_valid() where appropriate --- src/core/manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/manager.c b/src/core/manager.c index 6f50b177e01..35cd9ee8791 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -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; }