summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-06-12 11:25:41 +0200
committerVolker Lendecke <vl@samba.org>2010-06-12 15:42:50 +0200
commita45ea200c67ea1be4accc17d05513653c454556e (patch)
tree57c482b536710b7afec2f5e5753db64b2e5e2c15 /source3/smbd
parentb82fc135a760fc9d153e0fe5e86b28a08c98f92c (diff)
downloadsamba-a45ea200c67ea1be4accc17d05513653c454556e.tar.gz
samba-a45ea200c67ea1be4accc17d05513653c454556e.tar.bz2
samba-a45ea200c67ea1be4accc17d05513653c454556e.zip
s3: Explicitly pass sconn to negprot_spnego()
Diffstat (limited to 'source3/smbd')
-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);
}