s3:smbd: move pending_auth_data list to struct smbd_server_connection
[kai/samba.git] / source3 / smbd / negprot.c
index 57608a9b406785b507a29af8fe74b7b4ecebac02..6d15f486df3a480bf44d08a0ace8ba8a74ba696d 100644 (file)
@@ -27,7 +27,6 @@ extern enum protocol_types Protocol;
 static void get_challenge(uint8 buff[8])
 {
        NTSTATUS nt_status;
-       const uint8 *cryptkey;
 
        /* We might be called more than once, multiple negprots are
         * permitted */
@@ -42,8 +41,8 @@ static void get_challenge(uint8 buff[8])
                smb_panic("cannot make_negprot_global_auth_context!");
        }
        DEBUG(10, ("get challenge: getting challenge\n"));
-       cryptkey = negprot_global_auth_context->get_ntlm_challenge(negprot_global_auth_context);
-       memcpy(buff, cryptkey, 8);
+       negprot_global_auth_context->get_ntlm_challenge(
+               negprot_global_auth_context, buff);
 }
 
 /****************************************************************************
@@ -167,7 +166,7 @@ static void reply_lanman2(struct smb_request *req, uint16 choice)
  Generate the spnego negprot reply blob. Return the number of bytes used.
 ****************************************************************************/
 
-static DATA_BLOB negprot_spnego(void)
+DATA_BLOB negprot_spnego(void)
 {
        DATA_BLOB blob;
        nstring dos_name;
@@ -317,7 +316,7 @@ static void reply_nt1(struct smb_request *req, uint16 choice)
                        capabilities &= ~CAP_RAW_MODE;
                        if (lp_server_signing() == Required)
                                secword |=NEGOTIATE_SECURITY_SIGNATURES_REQUIRED;
-                       srv_set_signing_negotiated();
+                       srv_set_signing_negotiated(smbd_server_conn);
                } else {
                        DEBUG(0,("reply_nt1: smb signing is incompatible with share level security !\n"));
                        if (lp_server_signing() == Required) {
@@ -482,6 +481,7 @@ static const struct {
        void (*proto_reply_fn)(struct smb_request *req, uint16 choice);
        int protocol_level;
 } supported_protocols[] = {
+       {"SMB 2.002",               "SMB2",     reply_smb2002,  PROTOCOL_SMB2},
        {"NT LANMAN 1.0",           "NT1",      reply_nt1,      PROTOCOL_NT1},
        {"NT LM 0.12",              "NT1",      reply_nt1,      PROTOCOL_NT1},
        {"POSIX 2",                 "NT1",      reply_nt1,      PROTOCOL_NT1},