summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-01-13 13:20:27 +0100
committerStefan Metzmacher <metze@samba.org>2012-01-31 20:17:10 +0100
commitec0142dd3197a9cd429ee925486d2fc87509706f (patch)
tree94856b9d700dbbf059129f5ee8bfbb7af761e536 /source3
parentee15790d7a28aff22efc7b95f86f70078322241d (diff)
downloadsamba-ec0142dd3197a9cd429ee925486d2fc87509706f.tar.gz
samba-ec0142dd3197a9cd429ee925486d2fc87509706f.tar.bz2
samba-ec0142dd3197a9cd429ee925486d2fc87509706f.zip
s3:smbd: rework reply_spnego_ntlmssp to reply_spnego_generic
This removes the unused spnego_gen_auth_response() wrapping. metze
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/sesssetup.c32
1 files changed, 5 insertions, 27 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 2c0587803d..a42d0d0a48 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -130,23 +130,12 @@ static NTSTATUS check_guest_password(const struct tsocket_address *remote_addres
return nt_status;
}
-/****************************************************************************
- Send a session setup reply, wrapped in SPNEGO.
- Get vuid and check first.
- End the NTLMSSP exchange context if we are OK/complete fail
- This should be split into two functions, one to handle each
- leg of the NTLM auth steps.
-***************************************************************************/
-
-static void reply_spnego_ntlmssp(struct smb_request *req,
+static void reply_spnego_generic(struct smb_request *req,
uint16 vuid,
struct gensec_security **gensec_security,
- DATA_BLOB *ntlmssp_blob, NTSTATUS nt_status,
- const char *OID,
- bool wrap)
+ DATA_BLOB *blob, NTSTATUS nt_status)
{
bool do_invalidate = true;
- DATA_BLOB response;
struct auth_session_info *session_info = NULL;
struct smbd_server_connection *sconn = req->sconn;
@@ -193,18 +182,7 @@ static void reply_spnego_ntlmssp(struct smb_request *req,
out:
- if (wrap) {
- response = spnego_gen_auth_response(talloc_tos(),
- ntlmssp_blob,
- nt_status, OID);
- } else {
- response = *ntlmssp_blob;
- }
-
- reply_sesssetup_blob(req, response, nt_status);
- if (wrap) {
- data_blob_free(&response);
- }
+ reply_sesssetup_blob(req, *blob, nt_status);
/* NT_STATUS_MORE_PROCESSING_REQUIRED from our NTLMSSP code tells us,
and the other end, that we are not finished yet. */
@@ -360,9 +338,9 @@ static void reply_sesssetup_and_X_spnego(struct smb_request *req)
data_blob_free(&blob1);
- reply_spnego_ntlmssp(req, vuid,
+ reply_spnego_generic(req, vuid,
&vuser->gensec_security,
- &chal, status, NULL, false);
+ &chal, status);
data_blob_free(&chal);
return;
}