1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s3-dcerpc: add dcerpc_push_dcerpc_auth().

Guenther

Signed-off-by: Simo Sorce <idra@samba.org>
This commit is contained in:
Günther Deschner 2009-03-24 19:09:29 +01:00 committed by Simo Sorce
parent 257f5145b5
commit 0f02dda915

View File

@ -1650,6 +1650,40 @@ static NTSTATUS rpc_api_pipe_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
return NT_STATUS_OK;
}
/*******************************************************************
********************************************************************/
static NTSTATUS dcerpc_push_dcerpc_auth(TALLOC_CTX *mem_ctx,
enum dcerpc_AuthType auth_type,
enum dcerpc_AuthLevel auth_level,
uint8_t auth_pad_length,
uint32_t auth_context_id,
const DATA_BLOB *credentials,
DATA_BLOB *blob)
{
struct dcerpc_auth r;
enum ndr_err_code ndr_err;
r.auth_type = auth_type;
r.auth_level = auth_level;
r.auth_pad_length = auth_pad_length;
r.auth_reserved = 0;
r.auth_context_id = auth_context_id;
r.credentials = *credentials;
ndr_err = ndr_push_struct_blob(blob, mem_ctx, &r,
(ndr_push_flags_fn_t)ndr_push_dcerpc_auth);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return ndr_map_error2ntstatus(ndr_err);
}
if (DEBUGLEVEL >= 10) {
NDR_PRINT_DEBUG(dcerpc_auth, &r);
}
return NT_STATUS_OK;
}
/*******************************************************************
Creates krb5 auth bind.
********************************************************************/