From 2f819505afe2a5f1bd244a625861f7b07c78ae8f Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 7 Sep 2010 11:24:52 +0200 Subject: s3-rpc_client: Added dcerpc_lsa_open_policy. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Günther Deschner --- source3/rpc_client/cli_lsarpc.c | 43 ++++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 9 deletions(-) (limited to 'source3/rpc_client/cli_lsarpc.c') diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c index 29cb09cddd..59f377ac9d 100644 --- a/source3/rpc_client/cli_lsarpc.c +++ b/source3/rpc_client/cli_lsarpc.c @@ -41,14 +41,12 @@ * security authority", which is half of a password database. **/ -/** Open a LSA policy handle - * - * @param cli Handle on an initialised SMB connection */ - -NTSTATUS rpccli_lsa_open_policy(struct rpc_pipe_client *cli, +NTSTATUS dcerpc_lsa_open_policy(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, - bool sec_qos, uint32 des_access, - struct policy_handle *pol) + bool sec_qos, + uint32_t des_access, + struct policy_handle *pol, + NTSTATUS *result) { struct lsa_ObjectAttribute attr; struct lsa_QosInfo qos; @@ -67,11 +65,38 @@ NTSTATUS rpccli_lsa_open_policy(struct rpc_pipe_client *cli, attr.sec_qos = &qos; } - return rpccli_lsa_OpenPolicy(cli, mem_ctx, + return dcerpc_lsa_OpenPolicy(h, + mem_ctx, &system_name, &attr, des_access, - pol); + pol, + result); +} + +/** Open a LSA policy handle + * + * @param cli Handle on an initialised SMB connection */ + +NTSTATUS rpccli_lsa_open_policy(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + bool sec_qos, uint32 des_access, + struct policy_handle *pol) +{ + NTSTATUS status; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + status = dcerpc_lsa_open_policy(cli->binding_handle, + mem_ctx, + sec_qos, + des_access, + pol, + &result); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + return result; } /** Open a LSA policy handle -- cgit