summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-02-03 16:33:44 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-02-24 11:23:18 +1100
commite3cebef0cf93ddade8e698ea292d2c03cf005a7b (patch)
treeb100ab80d0f342a6a2ea7dbabce3248ce81ecaf9
parent8a9b6fe26dc347afd6dc17570354e0af391b351d (diff)
downloadsamba-e3cebef0cf93ddade8e698ea292d2c03cf005a7b.tar.gz
samba-e3cebef0cf93ddade8e698ea292d2c03cf005a7b.tar.bz2
samba-e3cebef0cf93ddade8e698ea292d2c03cf005a7b.zip
auth: Rename some elements of auth4_context
These operate on NTLM authentication, so make that clear. Andrew Bartlett
-rw-r--r--auth/common_auth.h14
-rw-r--r--auth/ntlmssp/gensec_ntlmssp_server.c20
-rw-r--r--source3/auth/auth_generic.c6
-rw-r--r--source4/auth/ntlm/auth.c6
4 files changed, 23 insertions, 23 deletions
diff --git a/auth/common_auth.h b/auth/common_auth.h
index c0fd6b6d60..cf21543a91 100644
--- a/auth/common_auth.h
+++ b/auth/common_auth.h
@@ -105,17 +105,17 @@ struct auth4_context {
/* Private data for the callbacks on this auth context */
void *private_data;
- NTSTATUS (*check_password)(struct auth4_context *auth_ctx,
- TALLOC_CTX *mem_ctx,
- const struct auth_usersupplied_info *user_info,
- void **server_returned_info,
- DATA_BLOB *nt_session_key, DATA_BLOB *lm_session_key);
+ NTSTATUS (*check_ntlm_password)(struct auth4_context *auth_ctx,
+ TALLOC_CTX *mem_ctx,
+ const struct auth_usersupplied_info *user_info,
+ void **server_returned_info,
+ DATA_BLOB *nt_session_key, DATA_BLOB *lm_session_key);
- NTSTATUS (*get_challenge)(struct auth4_context *auth_ctx, uint8_t chal[8]);
+ NTSTATUS (*get_ntlm_challenge)(struct auth4_context *auth_ctx, uint8_t chal[8]);
bool (*challenge_may_be_modified)(struct auth4_context *auth_ctx);
- NTSTATUS (*set_challenge)(struct auth4_context *auth_ctx, const uint8_t chal[8], const char *set_by);
+ NTSTATUS (*set_ntlm_challenge)(struct auth4_context *auth_ctx, const uint8_t chal[8], const char *set_by);
NTSTATUS (*generate_session_info)(struct auth4_context *auth_context,
TALLOC_CTX *mem_ctx,
diff --git a/auth/ntlmssp/gensec_ntlmssp_server.c b/auth/ntlmssp/gensec_ntlmssp_server.c
index a1d43e6bca..ba32a2b1b0 100644
--- a/auth/ntlmssp/gensec_ntlmssp_server.c
+++ b/auth/ntlmssp/gensec_ntlmssp_server.c
@@ -90,8 +90,8 @@ static NTSTATUS auth_ntlmssp_get_challenge(const struct ntlmssp_state *ntlmssp_s
struct auth4_context *auth_context = gensec_ntlmssp->gensec_security->auth_context;
NTSTATUS status = NT_STATUS_NOT_IMPLEMENTED;
- if (auth_context->get_challenge) {
- status = auth_context->get_challenge(auth_context, chal);
+ if (auth_context->get_ntlm_challenge) {
+ status = auth_context->get_ntlm_challenge(auth_context, chal);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(1, ("auth_ntlmssp_get_challenge: failed to get challenge: %s\n",
nt_errstr(status)));
@@ -139,8 +139,8 @@ static NTSTATUS auth_ntlmssp_set_challenge(struct ntlmssp_state *ntlmssp_state,
chal = challenge->data;
- if (auth_context->set_challenge) {
- nt_status = auth_context->set_challenge(auth_context,
+ if (auth_context->set_ntlm_challenge) {
+ nt_status = auth_context->set_ntlm_challenge(auth_context,
chal,
"NTLMSSP callback (NTLM2)");
}
@@ -183,12 +183,12 @@ static NTSTATUS auth_ntlmssp_check_password(struct ntlmssp_state *ntlmssp_state,
user_info->password.response.nt = ntlmssp_state->nt_resp;
user_info->password.response.nt.data = talloc_steal(user_info, ntlmssp_state->nt_resp.data);
- if (auth_context->check_password) {
- nt_status = auth_context->check_password(auth_context,
- gensec_ntlmssp,
- user_info,
- &gensec_ntlmssp->server_returned_info,
- user_session_key, lm_session_key);
+ if (auth_context->check_ntlm_password) {
+ nt_status = auth_context->check_ntlm_password(auth_context,
+ gensec_ntlmssp,
+ user_info,
+ &gensec_ntlmssp->server_returned_info,
+ user_session_key, lm_session_key);
}
talloc_free(user_info);
diff --git a/source3/auth/auth_generic.c b/source3/auth/auth_generic.c
index 681989e16b..cf6866c2dd 100644
--- a/source3/auth/auth_generic.c
+++ b/source3/auth/auth_generic.c
@@ -163,10 +163,10 @@ static struct auth4_context *make_auth4_context_s3(TALLOC_CTX *mem_ctx, struct a
}
auth4_context->generate_session_info_pac = auth3_generate_session_info_pac;
auth4_context->generate_session_info = auth3_generate_session_info;
- auth4_context->get_challenge = auth3_get_challenge;
- auth4_context->set_challenge = auth3_set_challenge;
+ auth4_context->get_ntlm_challenge = auth3_get_challenge;
+ auth4_context->set_ntlm_challenge = auth3_set_challenge;
auth4_context->challenge_may_be_modified = auth3_may_set_challenge;
- auth4_context->check_password = auth3_check_password;
+ auth4_context->check_ntlm_password = auth3_check_password;
auth4_context->private_data = talloc_steal(auth4_context, auth_context);
return auth4_context;
}
diff --git a/source4/auth/ntlm/auth.c b/source4/auth/ntlm/auth.c
index 5c65da955d..58a12fbc53 100644
--- a/source4/auth/ntlm/auth.c
+++ b/source4/auth/ntlm/auth.c
@@ -605,9 +605,9 @@ _PUBLIC_ NTSTATUS auth_context_create_methods(TALLOC_CTX *mem_ctx, const char **
DLIST_ADD_END(ctx->methods, method, struct auth_method_context *);
}
- ctx->check_password = auth_check_password_wrapper;
- ctx->get_challenge = auth_get_challenge;
- ctx->set_challenge = auth_context_set_challenge;
+ ctx->check_ntlm_password = auth_check_password_wrapper;
+ ctx->get_ntlm_challenge = auth_get_challenge;
+ ctx->set_ntlm_challenge = auth_context_set_challenge;
ctx->challenge_may_be_modified = auth_challenge_may_be_modified;
ctx->generate_session_info = auth_generate_session_info_wrapper;
ctx->generate_session_info_pac = auth_generate_session_info_pac;