s3:smb2_negprot: set the 'remote_proto' value
authorStefan Metzmacher <metze@samba.org>
Thu, 13 Dec 2012 09:44:07 +0000 (10:44 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 9 Jan 2013 08:11:20 +0000 (09:11 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/smbd/smb2_negprot.c

index 6adc5819ecd92f5c3a249f87b294343246cbffe8..963a5572532491461a65e34044d950fe5043f47f 100644 (file)
@@ -25,6 +25,8 @@
 #include "../lib/tsocket/tsocket.h"
 #include "../librpc/ndr/libndr.h"
 
+extern fstring remote_proto;
+
 /*
  * this is the entry point if SMB2 is selected via
  * the SMB negprot and the given dialect.
@@ -234,6 +236,12 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req)
                set_remote_arch(RA_VISTA);
        }
 
+       fstr_sprintf(remote_proto, "SMB%X_%02X",
+                    (dialect >> 8) & 0xFF, dialect & 0xFF);
+
+       reload_services(req->sconn, conn_snum_used, true);
+       DEBUG(3,("Selected protocol %s\n", remote_proto));
+
        /* negprot_spnego() returns a the server guid in the first 16 bytes */
        negprot_spnego_blob = negprot_spnego(req, req->sconn);
        if (negprot_spnego_blob.data == NULL) {