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