Blame SOURCES/0019-RH-fix-sockets.patch

671555
---
671555
 libmpathpersist/mpath_updatepr.c |    3 ++-
671555
 libmultipath/uxsock.c            |    4 ++--
671555
 2 files changed, 4 insertions(+), 3 deletions(-)
671555
671555
Index: multipath-tools-130222/libmpathpersist/mpath_updatepr.c
671555
===================================================================
671555
--- multipath-tools-130222.orig/libmpathpersist/mpath_updatepr.c
671555
+++ multipath-tools-130222/libmpathpersist/mpath_updatepr.c
671555
@@ -14,6 +14,7 @@
671555
 #include <debug.h>
671555
 #include "memory.h"
671555
 #include "../libmultipath/uxsock.h"
671555
+#include "../libmultipath/defaults.h"
671555
 
671555
 unsigned long mem_allocated;    /* Total memory used in Bytes */
671555
 
671555
@@ -25,7 +26,7 @@ int update_prflag(char * arg1, char * ar
671555
 	size_t len;
671555
 	int ret = 0;
671555
 
671555
-	fd = ux_socket_connect("/var/run/multipathd.sock");
671555
+	fd = ux_socket_connect(DEFAULT_SOCKET);
671555
 	if (fd == -1) {
671555
 		condlog (0, "ux socket connect error");
671555
 		return 1 ;
671555
Index: multipath-tools-130222/libmultipath/uxsock.c
671555
===================================================================
671555
--- multipath-tools-130222.orig/libmultipath/uxsock.c
671555
+++ multipath-tools-130222/libmultipath/uxsock.c
671555
@@ -31,7 +31,7 @@ int ux_socket_connect(const char *name)
671555
 	memset(&addr, 0, sizeof(addr));
671555
 	addr.sun_family = AF_LOCAL;
671555
 	addr.sun_path[0] = '\0';
671555
-	len = strlen(name) + 1;
671555
+	len = strlen(name) + 1 + sizeof(sa_family_t);
671555
 	strncpy(&addr.sun_path[1], name, len);
671555
 
671555
 	fd = socket(AF_LOCAL, SOCK_STREAM, 0);
671555
@@ -62,7 +62,7 @@ int ux_socket_listen(const char *name)
671555
 	memset(&addr, 0, sizeof(addr));
671555
 	addr.sun_family = AF_LOCAL;
671555
 	addr.sun_path[0] = '\0';
671555
-	len = strlen(name) + 1;
671555
+	len = strlen(name) + 1 + sizeof(sa_family_t);
671555
 	strncpy(&addr.sun_path[1], name, len);
671555
 
671555
 	if (bind(fd, (struct sockaddr *)&addr, len) == -1) {