git.samba.org
/
idra
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
135543b
)
tsocket/bsd: fix bug #7140 use calculated sa_socklen for bind() in tstream_bsd_connec...
author
Stefan Metzmacher
<metze@samba.org>
Wed, 17 Feb 2010 07:45:58 +0000
(08:45 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Wed, 17 Feb 2010 13:45:34 +0000
(14:45 +0100)
This is needed because, we can't use sizeof(sockaddr_storage) for AF_UNIX
sockets. Also some platforms require exact values for AF_INET and AF_INET6.
metze
lib/tsocket/tsocket_bsd.c
patch
|
blob
|
history
diff --git
a/lib/tsocket/tsocket_bsd.c
b/lib/tsocket/tsocket_bsd.c
index 5cd7702ff6b1aded6a814e43ae3f630b24c32451..8d1fe3208342c9a6f3bd37aab183aa71e033b0fc 100644
(file)
--- a/
lib/tsocket/tsocket_bsd.c
+++ b/
lib/tsocket/tsocket_bsd.c
@@
-2025,7
+2025,7
@@
static struct tevent_req * tstream_bsd_connect_send(TALLOC_CTX *mem_ctx,
}
if (do_bind) {
- ret = bind(state->fd, &lbsda->u.sa, s
izeof(lbsda->u.ss)
);
+ ret = bind(state->fd, &lbsda->u.sa, s
a_socklen
);
if (ret == -1) {
tevent_req_error(req, errno);
goto post;