summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-11-30 15:52:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:27 -0500
commit2fffc40b1ddcd8a89160db877bd868f6e7fa8b72 (patch)
tree4a0e79add9afa417919cd7de3e0f9d4765f363a1
parent01533404b11661d1cfa74b73d6bc4def1ba0bb8d (diff)
downloadsamba-2fffc40b1ddcd8a89160db877bd868f6e7fa8b72.tar.gz
samba-2fffc40b1ddcd8a89160db877bd868f6e7fa8b72.tar.bz2
samba-2fffc40b1ddcd8a89160db877bd868f6e7fa8b72.zip
r4018: * move claim_connection from the netbios session request
reply code to the negprot reply code to cope with client connections on port 445. Fixes the spurious "register_message_flags: tdb fetch failed" errors. * don't run the backgroup LPQ daemon when we are running in interactive mode. (This used to be commit 88747a7da351261185222e78e9c8d470ff53a246)
-rw-r--r--source3/smbd/negprot.c6
-rw-r--r--source3/smbd/reply.c2
-rw-r--r--source3/smbd/server.c2
3 files changed, 7 insertions, 3 deletions
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index 7da9d1281e..9aaa818c62 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -523,6 +523,12 @@ int reply_negprot(connection_struct *conn,
/* possibly reload - change of architecture */
reload_services(True);
+
+ /* moved from the netbios session setup code since we don't have that
+ when the client connects to port 445. Of course there is a small
+ window where we are listening to messages -- jerry */
+
+ claim_connection(NULL,"",0,True,FLAG_MSG_GENERAL|FLAG_MSG_SMBD|FLAG_MSG_PRINT_GENERAL);
/* Check for protocols, most desirable first */
for (protocol = 0; supported_protocols[protocol].proto_name; protocol++) {
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 2806b796b3..eda523e73a 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -259,8 +259,6 @@ int reply_special(char *inbuf,char *outbuf)
reload_services(True);
reopen_logs();
- claim_connection(NULL,"",0,True,FLAG_MSG_GENERAL|FLAG_MSG_SMBD|FLAG_MSG_PRINT_GENERAL);
-
already_got_session = True;
break;
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 156755a5b8..724a49321a 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -864,7 +864,7 @@ void build_options(BOOL screen);
smbd is launched via inetd and we fork a copy of
ourselves here */
- if ( is_daemon )
+ if ( is_daemon && !interactive )
start_background_queue();
if (!open_sockets_smbd(is_daemon, interactive, ports))