From 95ac3fa103ce26b91a978aa12d162a18e00f6eab Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Fri, 14 Jul 2017 16:38:36 +0200 Subject: [PATCH] s3/notifyd: ensure notifyd doesn't return from smbd_notifyd_init Bug: https://bugzilla.samba.org/show_bug.cgi?id=12910 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit 7f4e7cfd1b0bd917395c631a1a8195fffd13bbad) --- source3/smbd/server.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source3/smbd/server.c b/source3/smbd/server.c index fa13dbc9b18..55fc25c77ef 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -386,6 +386,7 @@ static bool smbd_notifyd_init(struct messaging_context *msg, bool interactive, struct tevent_req *req; pid_t pid; NTSTATUS status; + bool ok; if (interactive) { req = notifyd_req(msg, ev); @@ -427,7 +428,12 @@ static bool smbd_notifyd_init(struct messaging_context *msg, bool interactive, messaging_send(msg, pid_to_procid(getppid()), MSG_SMB_NOTIFY_STARTED, NULL); - return tevent_req_poll(req, ev); + ok = tevent_req_poll(req, ev); + if (!ok) { + DBG_WARNING("tevent_req_poll returned %s\n", strerror(errno)); + exit(1); + } + exit(0); } static void notifyd_init_trigger(struct tevent_req *req); -- 2.14.0.rc0.284.gd933b75aa4-goog