diff options
author | Simo Sorce <idra@samba.org> | 2010-08-02 12:15:43 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2010-08-17 06:33:13 -0400 |
commit | 86914b8fab764667ca5021f44b61c0222dbb2e09 (patch) | |
tree | 9b94e7ed6c25030dc6a7889bae90759441c2d534 /source3/librpc/rpc/dcerpc_spnego.c | |
parent | 26a3ba60e661bc2eaf05a2c03f8851d252515d3e (diff) | |
download | samba-86914b8fab764667ca5021f44b61c0222dbb2e09.tar.gz samba-86914b8fab764667ca5021f44b61c0222dbb2e09.tar.bz2 samba-86914b8fab764667ca5021f44b61c0222dbb2e09.zip |
s3-dcerpc: properly implement gse/spnego_get_session_key
Diffstat (limited to 'source3/librpc/rpc/dcerpc_spnego.c')
-rw-r--r-- | source3/librpc/rpc/dcerpc_spnego.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/librpc/rpc/dcerpc_spnego.c b/source3/librpc/rpc/dcerpc_spnego.c index 5627a0d7e7..ec81a2c701 100644 --- a/source3/librpc/rpc/dcerpc_spnego.c +++ b/source3/librpc/rpc/dcerpc_spnego.c @@ -338,14 +338,19 @@ NTSTATUS spnego_get_negotiated_mech(struct spnego_context *sp_ctx, return NT_STATUS_OK; } -DATA_BLOB spnego_get_session_key(struct spnego_context *sp_ctx) +DATA_BLOB spnego_get_session_key(TALLOC_CTX *mem_ctx, + struct spnego_context *sp_ctx) { + DATA_BLOB sk; + switch (sp_ctx->auth_type) { case DCERPC_AUTH_TYPE_KRB5: - return gse_get_session_key(sp_ctx->mech_ctx.gssapi_state); + return gse_get_session_key(mem_ctx, + sp_ctx->mech_ctx.gssapi_state); case DCERPC_AUTH_TYPE_NTLMSSP: - return auth_ntlmssp_get_session_key( + sk = auth_ntlmssp_get_session_key( sp_ctx->mech_ctx.ntlmssp_state); + return data_blob_dup_talloc(mem_ctx, &sk); default: DEBUG(0, ("Unsupported type in request!\n")); return data_blob_null; |