summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-03-24 19:09:29 +0100
committerSimo Sorce <idra@samba.org>2010-07-07 23:45:51 -0400
commit0f02dda9154aeeda20d7bb3ca88bbaf89174e3ce (patch)
tree87025344f4fd9dfbfb3093a092496c7fc31d59c6 /source3/rpc_client
parent257f5145b571960fce0e12ce0cd04dbd0ac83f6a (diff)
downloadsamba-0f02dda9154aeeda20d7bb3ca88bbaf89174e3ce.tar.gz
samba-0f02dda9154aeeda20d7bb3ca88bbaf89174e3ce.tar.bz2
samba-0f02dda9154aeeda20d7bb3ca88bbaf89174e3ce.zip
s3-dcerpc: add dcerpc_push_dcerpc_auth().
Guenther Signed-off-by: Simo Sorce <idra@samba.org>
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_pipe.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index d4ff89849b..b793938f9e 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -1651,6 +1651,40 @@ static NTSTATUS rpc_api_pipe_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
}
/*******************************************************************
+ ********************************************************************/
+
+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.
********************************************************************/