commit e7f50f81abeeb6b4348ec1d884728ad220c15463
Author: Hannes Reinecke <hare@suse.de>
Date:   Mon Feb 23 09:26:27 2009 +0100

    /var/run/multipathd.sock is world-writable
    
    Due to an stray 'umask()' the socket file is in fact world-writable,
    allowing for an easy exploit.
    
    References: 458598
    
    Signed-off-by: Hannes Reinecke <hare@suse.de>

Index: multipath-tools-0.4.7/multipathd/main.c
===================================================================
--- multipath-tools-0.4.7.orig/multipathd/main.c
+++ multipath-tools-0.4.7/multipathd/main.c
@@ -1400,8 +1400,9 @@ daemonize(void)
 
 	close(in_fd);
 	close(out_fd);
-	chdir("/");
-	umask(0);
+	if (chdir("/") < 0)
+		fprintf(stderr, "cannot chdir to '/', continuing\n");
+
 	return 0;
 }
 
