summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-03-03 15:31:04 +0100
committerGünther Deschner <gd@samba.org>2011-03-08 11:41:31 +0100
commitbb201fac2bc9233fcc00f48e88cc97e92181ca4e (patch)
treedf76da44be274d3faa4dcab28c3ad2203a9fd778
parent69a9b9b8d0ea0d9566b306fca23bc241b8e35125 (diff)
downloadsamba-bb201fac2bc9233fcc00f48e88cc97e92181ca4e.tar.gz
samba-bb201fac2bc9233fcc00f48e88cc97e92181ca4e.tar.bz2
samba-bb201fac2bc9233fcc00f48e88cc97e92181ca4e.zip
s3-winbind: Fixed the accept() for new_connection.
Signed-off-by: Günther Deschner <gd@samba.org>
-rw-r--r--source3/winbindd/winbindd.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index a9ff410f52..766d8ef401 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -769,13 +769,15 @@ static void new_connection(int listen_sock, bool privileged)
len = sizeof(sunaddr);
- do {
- sock = accept(listen_sock, (struct sockaddr *)(void *)&sunaddr,
- &len);
- } while (sock == -1 && errno == EINTR);
+ sock = accept(listen_sock, (struct sockaddr *)(void *)&sunaddr, &len);
- if (sock == -1)
+ if (sock == -1) {
+ if (errno != EINTR) {
+ DEBUG(0, ("Faild to accept socket - %s\n",
+ strerror(errno)));
+ }
return;
+ }
DEBUG(6,("accepted socket %d\n", sock));