smbd: Disable smb1 in smbd_add_connection
authorDavid Mulder <dmulder@suse.com>
Fri, 18 Mar 2022 21:17:39 +0000 (15:17 -0600)
committerJeremy Allison <jra@samba.org>
Thu, 7 Apr 2022 17:37:30 +0000 (17:37 +0000)
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/process.c

index 24427968e776371b42ecbeff560ad29558e104eb..712ae075519789a011e5c2c8717f37ba66dc6ecc 100644 (file)
@@ -3449,7 +3449,9 @@ NTSTATUS smbd_add_connection(struct smbXsrv_client *client, int sock_fd,
        }
 
        xconn->transport.sock = sock_fd;
+#if defined(WITH_SMB1SERVER)
        smbd_echo_init(xconn);
+#endif
        xconn->protocol = PROTOCOL_NONE;
 
        /* Ensure child is set to blocking mode */
@@ -3591,10 +3593,12 @@ NTSTATUS smbd_add_connection(struct smbXsrv_client *client, int sock_fd,
        tmp = MAX(tmp, SMB_BUFFER_SIZE_MIN);
        tmp = MIN(tmp, SMB_BUFFER_SIZE_MAX);
 
+#if defined(WITH_SMB1SERVER)
        xconn->smb1.negprot.max_recv = tmp;
 
        xconn->smb1.sessions.done_sesssetup = false;
        xconn->smb1.sessions.max_send = SMB_BUFFER_SIZE_MAX;
+#endif
 
        xconn->transport.fde = tevent_add_fd(client->raw_ev_ctx,
                                             xconn,