summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/globals.h2
-rw-r--r--source3/smbd/negprot.c5
-rw-r--r--source3/smbd/smb2_negprot.c2
3 files changed, 4 insertions, 5 deletions
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index 91712ea3c9..31d001b185 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -136,7 +136,7 @@ struct smbd_smb2_request;
struct smbd_smb2_session;
struct smbd_smb2_tcon;
-DATA_BLOB negprot_spnego(void);
+DATA_BLOB negprot_spnego(struct smbd_server_connection *sconn);
void smbd_lock_socket(struct smbd_server_connection *sconn);
void smbd_unlock_socket(struct smbd_server_connection *sconn);
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index 6c4646102c..0a928a23d6 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -177,7 +177,7 @@ static void reply_lanman2(struct smb_request *req, uint16 choice)
Generate the spnego negprot reply blob. Return the number of bytes used.
****************************************************************************/
-DATA_BLOB negprot_spnego(void)
+DATA_BLOB negprot_spnego(struct smbd_server_connection *sconn)
{
DATA_BLOB blob;
nstring dos_name;
@@ -191,7 +191,6 @@ DATA_BLOB negprot_spnego(void)
OID_NTLMSSP,
NULL};
const char *OIDs_plain[] = {OID_NTLMSSP, NULL};
- struct smbd_server_connection *sconn = smbd_server_conn;
sconn->smb1.negprot.spnego = true;
@@ -383,7 +382,7 @@ static void reply_nt1(struct smb_request *req, uint16 choice)
}
DEBUG(3,("not using SPNEGO\n"));
} else {
- DATA_BLOB spnego_blob = negprot_spnego();
+ DATA_BLOB spnego_blob = negprot_spnego(req->sconn);
if (spnego_blob.data == NULL) {
reply_nterror(req, NT_STATUS_NO_MEMORY);
diff --git a/source3/smbd/smb2_negprot.c b/source3/smbd/smb2_negprot.c
index 5a216b27e4..99eeb8fc6a 100644
--- a/source3/smbd/smb2_negprot.c
+++ b/source3/smbd/smb2_negprot.c
@@ -119,7 +119,7 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req)
}
/* negprot_spnego() returns a the server guid in the first 16 bytes */
- negprot_spnego_blob = negprot_spnego();
+ negprot_spnego_blob = negprot_spnego(req->sconn);
if (negprot_spnego_blob.data == NULL) {
return smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY);
}