From 32e036b9baa6e9c9ecc90ae5db558db0a93847b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 30 Dec 2013 11:21:56 -0500 Subject: [PATCH] core/service: check if mainpid matches only if it is set https://bugzilla.redhat.com/show_bug.cgi?id=1047304 Conflicts: src/core/service.c --- src/core/service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/service.c b/src/core/service.c index 62ae8f0..f0acda1 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -3400,7 +3400,7 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags) { return; } - if (s->notify_access == NOTIFY_MAIN && pid != s->main_pid) { + if (s->notify_access == NOTIFY_MAIN && s->main_pid != 0 && pid != s->main_pid) { log_warning_unit(u->id, "%s: Got notification message from PID %lu, but reception only permitted for PID %lu", u->id, (unsigned long) pid, (unsigned long) s->main_pid);