summaryrefslogtreecommitdiff
path: root/source4/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-04-25 03:48:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:11:38 -0500
commit4c6db04124b7866c1584fa76610da3921d75164e (patch)
treeded7c9df3f938f4f58e88d8bf43c0a7c59956486 /source4/auth
parent53079da638e6e45e9e0a352f532e05073e60d3fb (diff)
downloadsamba-4c6db04124b7866c1584fa76610da3921d75164e.tar.gz
samba-4c6db04124b7866c1584fa76610da3921d75164e.tar.bz2
samba-4c6db04124b7866c1584fa76610da3921d75164e.zip
r6455: Remove wrapper functions, and ntlmssp_end (which is well handed by talloc() now).
Andrew Bartlett (This used to be commit fc3e3653ebc3accf94f9264d2bbfe1cb71b017d0)
Diffstat (limited to 'source4/auth')
-rw-r--r--source4/auth/gensec/ntlmssp.c46
1 files changed, 5 insertions, 41 deletions
diff --git a/source4/auth/gensec/ntlmssp.c b/source4/auth/gensec/ntlmssp.c
index c17352a469..5b40a412bd 100644
--- a/source4/auth/gensec/ntlmssp.c
+++ b/source4/auth/gensec/ntlmssp.c
@@ -325,9 +325,12 @@ static NTSTATUS gensec_ntlmssp_update(struct gensec_security *gensec_security, T
* @param ntlmssp_state NTLMSSP State
*/
-NTSTATUS ntlmssp_session_key(struct ntlmssp_state *ntlmssp_state,
- DATA_BLOB *session_key)
+NTSTATUS gensec_ntlmssp_session_key(struct gensec_security *gensec_security,
+ DATA_BLOB *session_key)
{
+ struct gensec_ntlmssp_state *gensec_ntlmssp_state = gensec_security->private_data;
+ struct ntlmssp_state *ntlmssp_state = gensec_ntlmssp_state->ntlmssp_state;
+
if (!ntlmssp_state->session_key.data) {
return NT_STATUS_NO_USER_SESSION_KEY;
}
@@ -337,24 +340,6 @@ NTSTATUS ntlmssp_session_key(struct ntlmssp_state *ntlmssp_state,
}
/**
- * End an NTLMSSP state machine
- *
- * @param ntlmssp_state NTLMSSP State, free()ed by this function
- */
-
-void ntlmssp_end(struct ntlmssp_state **ntlmssp_state)
-{
- (*ntlmssp_state)->ref_count--;
-
- if ((*ntlmssp_state)->ref_count == 0) {
- talloc_free(*ntlmssp_state);
- }
-
- *ntlmssp_state = NULL;
- return;
-}
-
-/**
* Determine correct target name flags for reply, given server role
* and negotiated flags
*
@@ -1440,17 +1425,6 @@ static NTSTATUS auth_ntlmssp_check_password(struct ntlmssp_state *ntlmssp_state,
return nt_status;
}
-static int gensec_ntlmssp_destroy(void *ptr)
-{
- struct gensec_ntlmssp_state *gensec_ntlmssp_state = ptr;
-
- if (gensec_ntlmssp_state->ntlmssp_state) {
- ntlmssp_end(&gensec_ntlmssp_state->ntlmssp_state);
- }
-
- return 0;
-}
-
static NTSTATUS gensec_ntlmssp_start(struct gensec_security *gensec_security)
{
struct gensec_ntlmssp_state *gensec_ntlmssp_state;
@@ -1465,8 +1439,6 @@ static NTSTATUS gensec_ntlmssp_start(struct gensec_security *gensec_security)
gensec_ntlmssp_state->server_info = NULL;
gensec_ntlmssp_state->have_features = 0;
- talloc_set_destructor(gensec_ntlmssp_state, gensec_ntlmssp_destroy);
-
gensec_security->private_data = gensec_ntlmssp_state;
return NT_STATUS_OK;
}
@@ -1560,14 +1532,6 @@ static NTSTATUS gensec_ntlmssp_client_start(struct gensec_security *gensec_secur
return NT_STATUS_OK;
}
-static NTSTATUS gensec_ntlmssp_session_key(struct gensec_security *gensec_security,
- DATA_BLOB *session_key)
-{
- struct gensec_ntlmssp_state *gensec_ntlmssp_state = gensec_security->private_data;
-
- return ntlmssp_session_key(gensec_ntlmssp_state->ntlmssp_state, session_key);
-}
-
/**
* Return the credentials of a logged on user, including session keys
* etc.