summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-07-04 07:43:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:59:05 -0500
commit3381a5c3a45e7c7d1c6cf65325b7fb6f6d5ef3a6 (patch)
tree9c26f7fabb2de9c4641cbe274a34508caa075545 /source4
parent2a8f9213a4d945834271f23da538bd20310f90a1 (diff)
downloadsamba-3381a5c3a45e7c7d1c6cf65325b7fb6f6d5ef3a6.tar.gz
samba-3381a5c3a45e7c7d1c6cf65325b7fb6f6d5ef3a6.tar.bz2
samba-3381a5c3a45e7c7d1c6cf65325b7fb6f6d5ef3a6.zip
r23701: when we create a new socket with socket_accept(), clear any flags that
were set in the old one. Otherwise SOCKET_FLAG_NOCLOSE causes a major fd leak (This used to be commit 4e31eda055781a710d285c509d0c51b42e351431)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/socket/socket.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source4/lib/socket/socket.c b/source4/lib/socket/socket.c
index 548b11ebcc..89f8fe5a56 100644
--- a/source4/lib/socket/socket.c
+++ b/source4/lib/socket/socket.c
@@ -166,6 +166,7 @@ _PUBLIC_ NTSTATUS socket_accept(struct socket_context *sock, struct socket_conte
if (NT_STATUS_IS_OK(status)) {
talloc_set_destructor(*new_sock, socket_destructor);
+ (*new_sock)->flags = 0;
}
return status;