summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-02-25 14:26:29 +0100
committerGünther Deschner <gd@samba.org>2011-03-08 11:41:30 +0100
commit0f97f789b2d675f2059f65383a573edb695ca8c6 (patch)
tree84a81b6f8279b297e3c8f1f02eda4bd9997c003f /source3/rpc_server
parent53018dc37dffc1d2eba08347cac3f3db723f741d (diff)
downloadsamba-0f97f789b2d675f2059f65383a573edb695ca8c6.tar.gz
samba-0f97f789b2d675f2059f65383a573edb695ca8c6.tar.bz2
samba-0f97f789b2d675f2059f65383a573edb695ca8c6.zip
s3-rpc_server: Fixed ncalrpc connection accept.
Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/rpc_server.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c
index 4cab4f1521..db11bc1d1c 100644
--- a/source3/rpc_server/rpc_server.c
+++ b/source3/rpc_server/rpc_server.c
@@ -1012,10 +1012,12 @@ static void dcerpc_ncalrpc_listener(struct tevent_context *ev,
struct tsocket_address *cli_addr = NULL;
struct sockaddr_un sunaddr;
struct sockaddr *addr = (struct sockaddr *)(void *)&sunaddr;
- socklen_t len;
+ socklen_t len = sizeof(sunaddr);
int sd = -1;
int rc;
+ ZERO_STRUCT(sunaddr);
+
while (sd == -1) {
sd = accept(state->fd, addr, &len);
if (sd == -1 && errno != EINTR) {