summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-01-31 15:50:15 +1100
committerStefan Metzmacher <metze@samba.org>2012-02-17 10:48:09 +0100
commitdb1ea56d8bdcfdeaddab3dfcb550bf7a45908918 (patch)
tree169ed4f9403ba07549efbc4be8dac39c8688c0e0 /source3/auth
parent725d55183287acfa3a0c87ce95ff140740ddbe45 (diff)
downloadsamba-db1ea56d8bdcfdeaddab3dfcb550bf7a45908918.tar.gz
samba-db1ea56d8bdcfdeaddab3dfcb550bf7a45908918.tar.bz2
samba-db1ea56d8bdcfdeaddab3dfcb550bf7a45908918.zip
s3-auth: Remove a layer of indirection and reorder to match gensec_ntlmssp_server_start()
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_ntlmssp.c33
1 files changed, 15 insertions, 18 deletions
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c
index 66d31d5f23..6bfd4e0ee8 100644
--- a/source3/auth/auth_ntlmssp.c
+++ b/source3/auth/auth_ntlmssp.c
@@ -255,6 +255,9 @@ static NTSTATUS gensec_ntlmssp3_server_start(struct gensec_security *gensec_secu
if (!ntlmssp_state) {
return NT_STATUS_NO_MEMORY;
}
+ gensec_ntlmssp->ntlmssp_state = ntlmssp_state;
+
+ ntlmssp_state->callback_private = gensec_ntlmssp;
ntlmssp_state->role = NTLMSSP_SERVER;
@@ -290,35 +293,29 @@ static NTSTATUS gensec_ntlmssp3_server_start(struct gensec_security *gensec_secu
}
ntlmssp_state->server.dns_name = talloc_strdup(ntlmssp_state, dns_name);
if (!ntlmssp_state->server.dns_name) {
- talloc_free(ntlmssp_state);
return NT_STATUS_NO_MEMORY;
}
ntlmssp_state->server.dns_domain = talloc_strdup(ntlmssp_state, dns_domain);
if (!ntlmssp_state->server.dns_domain) {
- talloc_free(ntlmssp_state);
return NT_STATUS_NO_MEMORY;
}
- gensec_ntlmssp->ntlmssp_state = ntlmssp_state;
-
- gensec_ntlmssp->ntlmssp_state->callback_private = gensec_ntlmssp;
-
- gensec_ntlmssp->ntlmssp_state->get_challenge = auth_ntlmssp_get_challenge;
- gensec_ntlmssp->ntlmssp_state->may_set_challenge = auth_ntlmssp_may_set_challenge;
- gensec_ntlmssp->ntlmssp_state->set_challenge = auth_ntlmssp_set_challenge;
- gensec_ntlmssp->ntlmssp_state->check_password = auth_ntlmssp_check_password;
-
- if (gensec_ntlmssp->gensec_security->want_features & GENSEC_FEATURE_SESSION_KEY) {
- gensec_ntlmssp->ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_SIGN;
+ if (gensec_security->want_features & GENSEC_FEATURE_SESSION_KEY) {
+ ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_SIGN;
}
- if (gensec_ntlmssp->gensec_security->want_features & GENSEC_FEATURE_SIGN) {
- gensec_ntlmssp->ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_SIGN;
+ if (gensec_security->want_features & GENSEC_FEATURE_SIGN) {
+ ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_SIGN;
}
- if (gensec_ntlmssp->gensec_security->want_features & GENSEC_FEATURE_SEAL) {
- gensec_ntlmssp->ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_SIGN;
- gensec_ntlmssp->ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_SEAL;
+ if (gensec_security->want_features & GENSEC_FEATURE_SEAL) {
+ ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_SIGN;
+ ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_SEAL;
}
+ ntlmssp_state->get_challenge = auth_ntlmssp_get_challenge;
+ ntlmssp_state->may_set_challenge = auth_ntlmssp_may_set_challenge;
+ ntlmssp_state->set_challenge = auth_ntlmssp_set_challenge;
+ ntlmssp_state->check_password = auth_ntlmssp_check_password;
+
return NT_STATUS_OK;
}