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