summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-05-08 00:03:45 +0000
committerJeremy Allison <jra@samba.org>2001-05-08 00:03:45 +0000
commit061beddc6187e710ceb9409baeba15f15eb7f30c (patch)
tree2124cb091f1ba9237a218a39c1c36a3c437bf1b1
parentb50d07252945b8026d0194809dde95c201489804 (diff)
downloadsamba-061beddc6187e710ceb9409baeba15f15eb7f30c.tar.gz
samba-061beddc6187e710ceb9409baeba15f15eb7f30c.tar.bz2
samba-061beddc6187e710ceb9409baeba15f15eb7f30c.zip
Patch from ackley@cs.unm.edu to clear server_fd/client_fd in root daemon to stop
%I getpeername() failure. Jeremy. (This used to be commit 15584d30cd51650752fcbdd4f0dfc193fed18e5a)
-rw-r--r--source3/smbd/server.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index d2a9a64966..6f4f18562e 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -277,6 +277,16 @@ max can be %d\n",
/* The parent doesn't need this socket */
close(smbd_server_fd());
+ /* Sun May 6 18:56:14 2001 ackley@cs.unm.edu:
+ Clear the closed fd info out of server_fd --
+ and more importantly, out of client_fd in
+ util_sock.c, to avoid a possible
+ getpeername failure if we reopen the logs
+ and use %I in the filename.
+ */
+
+ smbd_set_server_fd(-1);
+
/* Force parent to check log size after
* spawning child. Fix from
* klausr@ITAP.Physik.Uni-Stuttgart.De. The