diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/ctdbd_conn.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index b5c8280c4d..36e9e508f0 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -203,6 +203,7 @@ static NTSTATUS ctdbd_connect(TALLOC_CTX *mem_ctx, const char *sockname = lp_ctdbd_socket(); struct sockaddr_un addr; int fd; + socklen_t salen; if (!sockname || !*sockname) { sockname = CTDB_PATH; @@ -218,7 +219,8 @@ static NTSTATUS ctdbd_connect(TALLOC_CTX *mem_ctx, addr.sun_family = AF_UNIX; strncpy(addr.sun_path, sockname, sizeof(addr.sun_path)); - if (sys_connect(fd, (struct sockaddr *)(void *)&addr) == -1) { + salen = sizeof(struct sockaddr_un); + if (connect(fd, (struct sockaddr *)(void *)&addr, salen) == -1) { DEBUG(1, ("connect(%s) failed: %s\n", sockname, strerror(errno))); close(fd); |