radvd (1:1.6-1.1) 0003-privsep_read_loop-should-return-on-unprivileged-daem.patch

Summary

 privsep-linux.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

    
download this patch

Patch contents

From 074816cd0b37aac7b3209987e6e998f0a847b275 Mon Sep 17 00:00:00 2001
From: Vasiliy Kulikov <segoon@openwall.com>
Date: Tue, 4 Oct 2011 00:43:20 -0700
Subject: [PATCH] privsep_read_loop() should return on unprivileged daemon
 death / socket close(), not loop forever with polling
 read() getting -1.

---
 privsep-linux.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/privsep-linux.c b/privsep-linux.c
index d6717bf..15a9e1b 100644
--- a/privsep-linux.c
+++ b/privsep-linux.c
@@ -63,7 +63,7 @@ privsep_read_loop(void)
 		}
 		if (ret != sizeof(cmd)) {
 			/* Short read, ignore */
-			continue;
+			return;
 		}
 
 		cmd.iface[IFNAMSIZ-1] = '\0';
-- 
1.7.6.3