summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-10-18 21:13:16 +1100
committerStefan Metzmacher <metze@samba.org>2011-10-21 08:43:10 +0200
commit083025ccd53fe3ee90fcc81eb8d4c566e11fd6ac (patch)
tree7352125c6a227d7a7d1224e2bfb00de7386f0fc7 /source3/smbd
parent915fe7981b48537bb000ae5f90e630caacf657e0 (diff)
downloadsamba-083025ccd53fe3ee90fcc81eb8d4c566e11fd6ac.tar.gz
samba-083025ccd53fe3ee90fcc81eb8d4c566e11fd6ac.tar.bz2
samba-083025ccd53fe3ee90fcc81eb8d4c566e11fd6ac.zip
s3-ntlmssp Remove auth_ntlmssp_update wrapper
We now just call gensec_update directly. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/negprot.c4
-rw-r--r--source3/smbd/seal.c15
-rw-r--r--source3/smbd/sesssetup.c14
-rw-r--r--source3/smbd/smb2_sesssetup.c23
4 files changed, 29 insertions, 27 deletions
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index 89ef52c6e8..a0ed52d659 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -208,8 +208,8 @@ DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbd_server_connection *sconn)
if (NT_STATUS_IS_OK(status)) {
status = auth_generic_start(auth_ntlmssp_state, GENSEC_OID_SPNEGO);
if (NT_STATUS_IS_OK(status)) {
- status = auth_ntlmssp_update(auth_ntlmssp_state, ctx,
- data_blob_null, &blob);
+ status = gensec_update(auth_ntlmssp_state->gensec_security, ctx,
+ NULL, data_blob_null, &blob);
/* If we get the list of OIDs, the 'OK' answer
* is NT_STATUS_MORE_PROCESSING_REQUIRED */
if (NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
diff --git a/source3/smbd/seal.c b/source3/smbd/seal.c
index f68b6c7a8f..73efc6ceff 100644
--- a/source3/smbd/seal.c
+++ b/source3/smbd/seal.c
@@ -28,6 +28,7 @@
#include "auth.h"
#include "libsmb/libsmb.h"
#include "../lib/tsocket/tsocket.h"
+#include "auth/gensec/gensec.h"
/******************************************************************************
Server side encryption.
@@ -488,9 +489,9 @@ static NTSTATUS srv_enc_ntlm_negotiate(const struct tsocket_address *remote_addr
return status;
}
- status = auth_ntlmssp_update(partial_srv_trans_enc_ctx->auth_ntlmssp_state,
- talloc_tos(),
- secblob, &chal);
+ status = gensec_update(partial_srv_trans_enc_ctx->auth_ntlmssp_state->gensec_security,
+ talloc_tos(), NULL,
+ secblob, &chal);
/* status here should be NT_STATUS_MORE_PROCESSING_REQUIRED
* for success ... */
@@ -613,7 +614,7 @@ static NTSTATUS srv_enc_spnego_ntlm_auth(connection_struct *conn,
return NT_STATUS_INVALID_PARAMETER;
}
- status = auth_ntlmssp_update(ec->auth_ntlmssp_state, talloc_tos(), auth, &auth_reply);
+ status = gensec_update(ec->auth_ntlmssp_state->gensec_security, talloc_tos(), NULL, auth, &auth_reply);
data_blob_free(&auth);
/* From RFC4178.
@@ -683,9 +684,9 @@ static NTSTATUS srv_enc_raw_ntlm_auth(connection_struct *conn,
}
/* Second step. */
- status = auth_ntlmssp_update(partial_srv_trans_enc_ctx->auth_ntlmssp_state,
- talloc_tos(),
- blob, &response);
+ status = gensec_update(partial_srv_trans_enc_ctx->auth_ntlmssp_state->gensec_security,
+ talloc_tos(), NULL,
+ blob, &response);
if (NT_STATUS_IS_OK(status)) {
/* Return the context we're using for this encryption state. */
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index a5f2030ee5..7729ff675b 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -644,8 +644,8 @@ static void reply_spnego_negotiate(struct smb_request *req,
return;
}
- status = auth_ntlmssp_update(*auth_ntlmssp_state, talloc_tos(),
- secblob, &chal);
+ status = gensec_update((*auth_ntlmssp_state)->gensec_security, talloc_tos(),
+ NULL, secblob, &chal);
data_blob_free(&secblob);
@@ -757,8 +757,8 @@ static void reply_spnego_auth(struct smb_request *req,
}
}
- status = auth_ntlmssp_update(*auth_ntlmssp_state, talloc_tos(),
- auth, &auth_reply);
+ status = gensec_update((*auth_ntlmssp_state)->gensec_security, talloc_tos(),
+ NULL, auth, &auth_reply);
data_blob_free(&auth);
@@ -1171,9 +1171,9 @@ static void reply_sesssetup_and_X_spnego(struct smb_request *req)
}
}
- status = auth_ntlmssp_update(vuser->auth_ntlmssp_state,
- talloc_tos(),
- blob1, &chal);
+ status = gensec_update(vuser->auth_ntlmssp_state->gensec_security,
+ talloc_tos(), NULL,
+ blob1, &chal);
data_blob_free(&blob1);
diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c
index aa898eaad7..059b26f0bf 100644
--- a/source3/smbd/smb2_sesssetup.c
+++ b/source3/smbd/smb2_sesssetup.c
@@ -388,10 +388,10 @@ static NTSTATUS smbd_smb2_spnego_negotiate(struct smbd_smb2_session *session,
goto out;
}
- status = auth_ntlmssp_update(session->auth_ntlmssp_state,
- talloc_tos(),
- secblob_in,
- &chal_out);
+ status = gensec_update(session->auth_ntlmssp_state->gensec_security,
+ talloc_tos(), NULL,
+ secblob_in,
+ &chal_out);
}
if (!NT_STATUS_IS_OK(status) &&
@@ -582,9 +582,10 @@ static NTSTATUS smbd_smb2_spnego_auth(struct smbd_smb2_session *session,
}
}
- status = auth_ntlmssp_update(session->auth_ntlmssp_state,
- talloc_tos(), auth,
- &auth_out);
+ status = gensec_update(session->auth_ntlmssp_state->gensec_security,
+ talloc_tos(), NULL,
+ auth,
+ &auth_out);
/* If status is NT_STATUS_OK then we need to get the token.
* Map to guest is now internal to auth_ntlmssp */
if (NT_STATUS_IS_OK(status)) {
@@ -661,10 +662,10 @@ static NTSTATUS smbd_smb2_raw_ntlmssp_auth(struct smbd_smb2_session *session,
}
/* RAW NTLMSSP */
- status = auth_ntlmssp_update(session->auth_ntlmssp_state,
- smb2req,
- in_security_buffer,
- out_security_buffer);
+ status = gensec_update(session->auth_ntlmssp_state->gensec_security,
+ smb2req, NULL,
+ in_security_buffer,
+ out_security_buffer);
if (NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
*out_session_id = session->vuid;