From b8c3bfa55b574633bed10925d35dc23bc9e3853c Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 29 Aug 2011 09:49:22 +0200 Subject: s3-lib: If we create a pipe socket, don't start to listen. The create_pipe_sock() function should only create the socket as the name states and not start to listen on it too. We should start to listen on in the individual places as we need different backlog values. Autobuild-User: Andreas Schneider Autobuild-Date: Mon Aug 29 13:21:43 CEST 2011 on sn-devel-104 --- source3/winbindd/winbindd.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source3/winbindd') diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index cb9d70c5f3..b33328c8d3 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -957,6 +957,7 @@ static bool winbindd_setup_listeners(void) struct winbindd_listen_state *pub_state = NULL; struct winbindd_listen_state *priv_state = NULL; struct tevent_fd *fde; + int rc; pub_state = talloc(winbind_event_context(), struct winbindd_listen_state); @@ -970,6 +971,10 @@ static bool winbindd_setup_listeners(void) if (pub_state->fd == -1) { goto failed; } + rc = listen(pub_state->fd, 5); + if (rc < 0) { + goto failed; + } fde = tevent_add_fd(winbind_event_context(), pub_state, pub_state->fd, TEVENT_FD_READ, winbindd_listen_fde_handler, @@ -992,6 +997,10 @@ static bool winbindd_setup_listeners(void) if (priv_state->fd == -1) { goto failed; } + rc = listen(priv_state->fd, 5); + if (rc < 0) { + goto failed; + } fde = tevent_add_fd(winbind_event_context(), priv_state, priv_state->fd, TEVENT_FD_READ, -- cgit