summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-06-05 02:27:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:28 -0500
commita851ab6fdbf8dc02fe9f7d0dd5541e0d01b5a2c1 (patch)
tree0e33df1de3350a31ae21121afbc46c8e883085e3 /source4
parent42b6b7149350b1d0f188e2aeec88bce3fe229423 (diff)
downloadsamba-a851ab6fdbf8dc02fe9f7d0dd5541e0d01b5a2c1.tar.gz
samba-a851ab6fdbf8dc02fe9f7d0dd5541e0d01b5a2c1.tar.bz2
samba-a851ab6fdbf8dc02fe9f7d0dd5541e0d01b5a2c1.zip
r1022: add the session_info() call to the dcerpc server auth backends
metze (This used to be commit d1ab26b907f1eb2be31fe6946ffa5b8255fc6ac9)
Diffstat (limited to 'source4')
-rw-r--r--source4/rpc_server/dcerpc_server.h1
-rw-r--r--source4/rpc_server/dcesrv_crypto.c8
-rw-r--r--source4/rpc_server/dcesrv_crypto_ntlmssp.c13
3 files changed, 21 insertions, 1 deletions
diff --git a/source4/rpc_server/dcerpc_server.h b/source4/rpc_server/dcerpc_server.h
index 386da6fc57..bc5376b6ce 100644
--- a/source4/rpc_server/dcerpc_server.h
+++ b/source4/rpc_server/dcerpc_server.h
@@ -100,6 +100,7 @@ struct dcesrv_crypto_ops {
NTSTATUS (*start)(struct dcesrv_auth *auth);
NTSTATUS (*update)(struct dcesrv_auth *auth, TALLOC_CTX *out_mem_ctx,
const DATA_BLOB in, DATA_BLOB *out);
+ NTSTATUS (*session_info)(struct dcesrv_auth *auth, struct auth_session_info **session_info);
NTSTATUS (*seal)(struct dcesrv_auth *auth, TALLOC_CTX *sig_mem_ctx,
uint8_t *data, size_t length, DATA_BLOB *sig);
NTSTATUS (*sign)(struct dcesrv_auth *auth, TALLOC_CTX *sig_mem_ctx,
diff --git a/source4/rpc_server/dcesrv_crypto.c b/source4/rpc_server/dcesrv_crypto.c
index 6d46388c97..b8dfe46835 100644
--- a/source4/rpc_server/dcesrv_crypto.c
+++ b/source4/rpc_server/dcesrv_crypto.c
@@ -84,6 +84,14 @@ NTSTATUS dcesrv_crypto_update(struct dcesrv_auth *auth,
}
/*
+ get auth_session_info state
+*/
+NTSTATUS dcesrv_crypto_session_info(struct dcesrv_auth *auth, struct auth_session_info **session_info)
+{
+ return auth->crypto_ctx.ops->session_info(auth, session_info);
+}
+
+/*
seal a packet
*/
NTSTATUS dcesrv_crypto_seal(struct dcesrv_auth *auth, TALLOC_CTX *sig_mem_ctx,
diff --git a/source4/rpc_server/dcesrv_crypto_ntlmssp.c b/source4/rpc_server/dcesrv_crypto_ntlmssp.c
index 0f1939ea1b..5fb6345599 100644
--- a/source4/rpc_server/dcesrv_crypto_ntlmssp.c
+++ b/source4/rpc_server/dcesrv_crypto_ntlmssp.c
@@ -52,7 +52,17 @@ static NTSTATUS dcesrv_crypto_ntlmssp_update(struct dcesrv_auth *auth, TALLOC_CT
{
struct auth_ntlmssp_state *auth_ntlmssp_state = auth->crypto_ctx.private_data;
- return ntlmssp_update(auth_ntlmssp_state->ntlmssp_state, out_mem_ctx, in, out);
+ return auth_ntlmssp_update(auth_ntlmssp_state, out_mem_ctx, in, out);
+}
+
+/*
+ get auth_session_info state
+*/
+static NTSTATUS dcesrv_crypto_ntlmssp_session_info(struct dcesrv_auth *auth, struct auth_session_info **session_info)
+{
+ struct auth_ntlmssp_state *auth_ntlmssp_state = auth->crypto_ctx.private_data;
+
+ return auth_ntlmssp_get_session_info(auth_ntlmssp_state, session_info);
}
/*
@@ -118,6 +128,7 @@ static const struct dcesrv_crypto_ops dcesrv_crypto_ntlmssp_ops = {
.auth_type = DCERPC_AUTH_TYPE_NTLMSSP,
.start = dcesrv_crypto_ntlmssp_start,
.update = dcesrv_crypto_ntlmssp_update,
+ .session_info = dcesrv_crypto_ntlmssp_session_info,
.seal = dcesrv_crypto_ntlmssp_seal,
.sign = dcesrv_crypto_ntlmssp_sign,
.check_sig = dcesrv_crypto_ntlmssp_check_sig,