Revert "TODO SMB2_NETNAME_NEGOTIATE_CONTEXT_ID"
authorStefan Metzmacher <metze@samba.org>
Wed, 14 Jul 2021 12:26:13 +0000 (14:26 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 8 Feb 2023 09:28:42 +0000 (10:28 +0100)
This reverts commit 01ab2a6f02118f01cc6a7641260ed99111738824.

source3/smbd/smb2_negprot.c

index fe5a59dc01ebd49836d03f23bb906ef17998d0be..408faf1481d47ddb053d1cf1cab361bb2930e462 100644 (file)
@@ -159,7 +159,6 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req)
        struct smb2_negotiate_context *in_preauth = NULL;
        struct smb2_negotiate_context *in_cipher = NULL;
        struct smb2_negotiate_context *in_sign_algo = NULL;
-       struct smb2_negotiate_context *in_netname = NULL;
        struct smb2_negotiate_contexts out_c = { .num_contexts = 0, };
        struct smb2_negotiate_context *in_posix = NULL;
        const struct smb311_capabilities default_smb3_capabilities =
@@ -354,8 +353,6 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req)
                                        SMB2_ENCRYPTION_CAPABILITIES);
        in_sign_algo = smb2_negotiate_context_find(&in_c,
                                        SMB2_SIGNING_CAPABILITIES);
-       in_netname = smb2_negotiate_context_find(&in_c,
-                                       SMB2_NETNAME_NEGOTIATE_CONTEXT_ID);
 
        /* negprot_spnego() returns a the server guid in the first 16 bytes */
        negprot_spnego_blob = negprot_spnego(req, xconn);
@@ -675,17 +672,6 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req)
                return smbd_smb2_request_error(req, status);
        }
 
-       if (in_netname != NULL) {
-               size_t needed = 2;
-
-               if (in_sign_algo->data.length < needed) {
-                       return smbd_smb2_request_error(req,
-                                       NT_STATUS_INVALID_PARAMETER);
-               }
-
-               // TODO convert to UTF8 and call set_local_machine_name(...
-       }
-
        if (protocol >= PROTOCOL_SMB3_00 &&
            xconn->client->server_multi_channel_enabled)
        {