2 libmpathpersist/mpath_updatepr.c | 3 ++-
3 libmultipath/uxsock.c | 4 ++--
4 2 files changed, 4 insertions(+), 3 deletions(-)
6 Index: multipath-tools-130222/libmpathpersist/mpath_updatepr.c
7 ===================================================================
8 --- multipath-tools-130222.orig/libmpathpersist/mpath_updatepr.c
9 +++ multipath-tools-130222/libmpathpersist/mpath_updatepr.c
13 #include "../libmultipath/uxsock.h"
14 +#include "../libmultipath/defaults.h"
16 unsigned long mem_allocated; /* Total memory used in Bytes */
18 @@ -25,7 +26,7 @@ int update_prflag(char * arg1, char * ar
22 - fd = ux_socket_connect("/var/run/multipathd.sock");
23 + fd = ux_socket_connect(DEFAULT_SOCKET);
25 condlog (0, "ux socket connect error");
27 Index: multipath-tools-130222/libmultipath/uxsock.c
28 ===================================================================
29 --- multipath-tools-130222.orig/libmultipath/uxsock.c
30 +++ multipath-tools-130222/libmultipath/uxsock.c
31 @@ -31,7 +31,7 @@ int ux_socket_connect(const char *name)
32 memset(&addr, 0, sizeof(addr));
33 addr.sun_family = AF_LOCAL;
34 addr.sun_path[0] = '\0';
35 - len = strlen(name) + 1;
36 + len = strlen(name) + 1 + sizeof(sa_family_t);
37 strncpy(&addr.sun_path[1], name, len);
39 fd = socket(AF_LOCAL, SOCK_STREAM, 0);
40 @@ -62,7 +62,7 @@ int ux_socket_listen(const char *name)
41 memset(&addr, 0, sizeof(addr));
42 addr.sun_family = AF_LOCAL;
43 addr.sun_path[0] = '\0';
44 - len = strlen(name) + 1;
45 + len = strlen(name) + 1 + sizeof(sa_family_t);
46 strncpy(&addr.sun_path[1], name, len);
48 if (bind(fd, (struct sockaddr *)&addr, len) == -1) {