File bnc721968_3.patch of Package radvd

References: CVE-2011-3603, bnc#721968
commit 2c50375043186e133f15135f4c93ca964238ee60
Author: Vasiliy Kulikov <segoon@openwall.com>
Date:   Tue Oct 4 00:35:20 2011 -0700

    main() must fail on privsep_init() errors, it must not run
    without privilege separation as privsep is expected.

commit 7dc53cc3b792775369bf0b2f053a3f4ed5d87e3d
Author: Vasiliy Kulikov <segoon@openwall.com>
Date:   Tue Oct 4 18:12:26 2011 +0400

    Really exit on privsep init failure.

Index: radvd-1.3/radvd.c
===================================================================
--- radvd-1.3.orig/radvd.c	2009-06-19 09:37:11.000000000 +0200
+++ radvd-1.3/radvd.c	2011-10-19 12:18:57.000000000 +0200
@@ -223,8 +223,10 @@ main(int argc, char *argv[])
 	if (username) {
 		if (!singleprocess) {
 		 	dlog(LOG_DEBUG, 3, "Initializing privsep");
-		 	if (privsep_init() < 0)
-				flog(LOG_WARNING, "Failed to initialize privsep.");
+			if (privsep_init() < 0) {
+				perror("Failed to initialize privsep.");
+				exit(1);
+			}
 		}
 
 		if (drop_root_privileges(username) < 0)
openSUSE Build Service is sponsored by