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