From 5569a3d9d0933a226860284cbad8b0c04f1ba0e5 Mon Sep 17 00:00:00 2001
From: Jan Vesely <jvesely@redhat.com>
Date: Wed, 26 Jun 2013 14:45:57 +0200
Subject: iscsid: Fix strlen parameter
The target socket name is passed as parameter, don't use the hardwired
one.
Signed-off-by: Jan Vesely <jvesely@redhat.com>
---
usr/iscsid_req.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr/iscsid_req.c b/usr/iscsid_req.c
index 15f6353..715c0aa 100644
--- a/usr/iscsid_req.c
+++ b/usr/iscsid_req.c
@@ -67,7 +67,7 @@ static int ipc_connect(int *fd, char *unix_sock_name, int start_iscsid)
return ISCSI_ERR_ISCSID_NOTCONN;
}
- addr_len = offsetof(struct sockaddr_un, sun_path) + strlen(ISCSIADM_NAMESPACE) + 1;
+ addr_len = offsetof(struct sockaddr_un, sun_path) + strlen(unix_sock_name) + 1;
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_LOCAL;
--
1.8.1.4