summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/ctdbd_conn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c
index 84f26e00d3..5417c67268 100644
--- a/source3/lib/ctdbd_conn.c
+++ b/source3/lib/ctdbd_conn.c
@@ -213,7 +213,7 @@ static NTSTATUS ctdbd_connect(TALLOC_CTX *mem_ctx,
ZERO_STRUCT(addr);
addr.sun_family = AF_UNIX;
- strncpy(addr.sun_path, sockname, sizeof(addr.sun_path));
+ snprintf(addr.sun_path, sizeof(addr.sun_path), "%s", sockname);
salen = sizeof(struct sockaddr_un);
if (connect(fd, (struct sockaddr *)(void *)&addr, salen) == -1) {