device-mapper-multipath/0019-RH-fix-sockets.patch
Benjamin Marzinski d1207a7795 device-mapper-multipath-0.4.9-45
Updated to latest upstrem 0.4.9 code: multipath-tools-130222
  (git commit id: 67b82ad6fe280caa1770025a6bb8110b633fa136)
Refresh 0001-RH-dont_start_with_no_config.patch
Modify 0002-RH-multipath.rules.patch
Modify 0003-RH-Make-build-system-RH-Fedora-friendly.patch
Refresh 0004-RH-multipathd-blacklist-all-by-default.patch
Refresh 0005-RH-add-mpathconf.patch
Refresh 0006-RH-add-find-multipaths.patch
Add 0008-RH-revert-partition-changes.patch
Rename 0008-RH-RHEL5-style-partitions.patch to
       0009-RH-RHEL5-style-partitions.patch
Rename 0009-RH-dont-remove-map-on-enomem.patch to
       0010-RH-dont-remove-map-on-enomem.patch
Rename 0010-RH-deprecate-uid-gid-mode.patch to
       0011-RH-deprecate-uid-gid-mode.patch
Rename 0013-RH-kpartx-msg.patch to 0012-RH-kpartx-msg.patch
Rename 0035-RHBZ-883981-cleanup-rpmdiff-issues.patch to
       0013-RHBZ-883981-cleanup-rpmdiff-issues.patch
Rename 0039-RH-handle-other-sector-sizes.patch to
       0014-RH-handle-other-sector-sizes.patch
Rename 0040-RH-fix-output-buffer.patch to 0015-RH-fix-output-buffer.patch
Add 0016-RH-dont-print-ghost-messages.patch
Add 0017-RH-fix-sigusr1.patch
  * Actually this fixes a number of issues related to signals
Rename 0018-RH-remove-config-dups.patch to 0018-RH-fix-factorize.patch
  * just the part that isn't upstream
Add 0019-RH-fix-sockets.patch
  * makes abstract multipathd a cli sockets use the correct name.
Set find_multipaths in the default config
2013-03-02 17:03:30 -06:00

49 lines
1.7 KiB
Diff

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