diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2012-03-24 14:48:56 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2012-03-24 14:48:56 +0100 |
commit | eb3617c426b8efc9021c94d2e1b9669eebbe1034 (patch) | |
tree | ea04f17e3fb02c8d27a5e20b254f72ecf7dc0916 /source3 | |
parent | d4c4cb06c52f6ded7d55d75201fb2107e76c1586 (diff) | |
download | samba-eb3617c426b8efc9021c94d2e1b9669eebbe1034.tar.gz samba-eb3617c426b8efc9021c94d2e1b9669eebbe1034.tar.bz2 samba-eb3617c426b8efc9021c94d2e1b9669eebbe1034.zip |
ctdb_conn: Avoid sys_connect.
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); |