2016-09-30 08:17:15 +02:00
|
|
|
From ddcd0b726adfd78260ec3d6a446800d85980069e Mon Sep 17 00:00:00 2001
|
2016-09-29 15:04:00 +02:00
|
|
|
From: Jorge Niedbalski <jorge.niedbalski@canonical.com>
|
|
|
|
Date: Wed, 28 Sep 2016 18:25:50 -0300
|
|
|
|
Subject: [PATCH 1/1] If the notification message length is 0, ignore the
|
|
|
|
message (#4237)
|
|
|
|
|
|
|
|
Fixes #4234.
|
|
|
|
|
|
|
|
Signed-off-by: Jorge Niedbalski <jnr@metaklass.org>
|
2016-09-30 08:17:15 +02:00
|
|
|
(cherry picked from commit 531ac2b2349da02acc9c382849758e07eb92b020)
|
2016-09-29 15:04:00 +02:00
|
|
|
---
|
|
|
|
src/core/manager.c | 4 ++++
|
|
|
|
1 file changed, 4 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/src/core/manager.c b/src/core/manager.c
|
2016-09-30 08:17:15 +02:00
|
|
|
index 229cb31..56ca9cf 100644
|
2016-09-29 15:04:00 +02:00
|
|
|
--- a/src/core/manager.c
|
|
|
|
+++ b/src/core/manager.c
|
2016-09-30 08:17:15 +02:00
|
|
|
@@ -1565,6 +1565,10 @@ static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t
|
2016-09-29 15:04:00 +02:00
|
|
|
|
|
|
|
return -errno;
|
|
|
|
}
|
|
|
|
+ if (n == 0) {
|
|
|
|
+ log_debug("Got zero-length notification message. Ignoring.");
|
|
|
|
+ return 0;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
CMSG_FOREACH(cmsg, &msghdr) {
|
|
|
|
if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) {
|
|
|
|
--
|
|
|
|
2.10.0
|
|
|
|
|