summaryrefslogtreecommitdiff
path: root/source3/librpc/rpc/dcerpc_spnego.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2010-07-29 16:34:39 -0400
committerSimo Sorce <idra@samba.org>2010-07-30 14:55:27 -0400
commit984438ca1522bfc2d882b2e3e7e8db187577e05a (patch)
treef2dc3d43598bfe6abfd05f0d57358ac088c79309 /source3/librpc/rpc/dcerpc_spnego.c
parent0b24e8e869207dcb567b61272794daef48ee492a (diff)
downloadsamba-984438ca1522bfc2d882b2e3e7e8db187577e05a.tar.gz
samba-984438ca1522bfc2d882b2e3e7e8db187577e05a.tar.bz2
samba-984438ca1522bfc2d882b2e3e7e8db187577e05a.zip
s3-dcerpc: add sign/seal support when using SPNEGO/KRB5
Diffstat (limited to 'source3/librpc/rpc/dcerpc_spnego.c')
-rw-r--r--source3/librpc/rpc/dcerpc_spnego.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source3/librpc/rpc/dcerpc_spnego.c b/source3/librpc/rpc/dcerpc_spnego.c
index 51d294de5e..e733469ac3 100644
--- a/source3/librpc/rpc/dcerpc_spnego.c
+++ b/source3/librpc/rpc/dcerpc_spnego.c
@@ -233,3 +233,22 @@ bool spnego_require_more_processing(struct spnego_context *sp_ctx)
}
}
+NTSTATUS spnego_get_negotiated_mech(struct spnego_context *sp_ctx,
+ enum dcerpc_AuthType *auth_type,
+ void **auth_context)
+{
+ switch (sp_ctx->auth_type) {
+ case DCERPC_AUTH_TYPE_KRB5:
+ *auth_context = sp_ctx->mech_ctx.gssapi_state;
+ break;
+ case DCERPC_AUTH_TYPE_NTLMSSP:
+ *auth_context = sp_ctx->mech_ctx.auth_ntlmssp_state;
+ break;
+ default:
+ return NT_STATUS_INTERNAL_ERROR;
+ }
+
+ *auth_type = sp_ctx->auth_type;
+ return NT_STATUS_OK;
+}
+