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