]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r4018: * move claim_connection from the netbios session request
authorGerald Carter <jerry@samba.org>
Tue, 30 Nov 2004 15:52:46 +0000 (15:52 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:53:27 +0000 (10:53 -0500)
  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.

source/smbd/negprot.c
source/smbd/reply.c
source/smbd/server.c

index 7da9d1281e1419a0a3ddca2ba0d9f8d6a20bb1c8..9aaa818c62a2449e7bb1ed30623a55d62a4934e9 100644 (file)
@@ -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++) {
index 2806b796b35740df0b9301d3093d4861571f8f7b..eda523e73a9008976e072a713807d64a7f08d42a 100644 (file)
@@ -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;
                
index 156755a5b853bc82b3ca8e117a4ec19332b23089..724a49321a27bf5b544e939b3566577887ff2bd2 100644 (file)
@@ -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))