From f21cdab938a0a94405d595bb80fbda724315d984 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 14 Feb 2008 15:28:26 +0100 Subject: Use rpccli_lsa_RemoveAccountRights() in net and rpcclient. Guenther (This used to be commit 78200d88924bbef3df7185fc3a0e1753160a592f) --- source3/rpcclient/cmd_lsarpc.c | 21 ++++++++++++++++++--- source3/utils/net_rpc_rights.c | 21 ++++++++++++++++++--- 2 files changed, 36 insertions(+), 6 deletions(-) (limited to 'source3') diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c index d7f5e55df4..3fe8bc8e52 100644 --- a/source3/rpcclient/cmd_lsarpc.c +++ b/source3/rpcclient/cmd_lsarpc.c @@ -816,8 +816,9 @@ static NTSTATUS cmd_lsa_remove_acct_rights(struct rpc_pipe_client *cli, { POLICY_HND dom_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - + struct lsa_RightSet rights; DOM_SID sid; + int i; if (argc < 3 ) { printf("Usage: %s SID [rights...]\n", argv[0]); @@ -835,8 +836,22 @@ static NTSTATUS cmd_lsa_remove_acct_rights(struct rpc_pipe_client *cli, if (!NT_STATUS_IS_OK(result)) goto done; - result = rpccli_lsa_remove_account_rights(cli, mem_ctx, &dom_pol, sid, - False, argc-2, argv+2); + rights.count = argc-2; + rights.names = TALLOC_ARRAY(mem_ctx, struct lsa_StringLarge, + rights.count); + if (!rights.names) { + return NT_STATUS_NO_MEMORY; + } + + for (i=0; i \n"); @@ -521,8 +522,22 @@ static NTSTATUS rpc_rights_revoke_internal(const DOM_SID *domain_sid, if (!NT_STATUS_IS_OK(result)) return result; - result = rpccli_lsa_remove_account_rights(pipe_hnd, mem_ctx, &dom_pol, sid, - False, argc-1, argv+1); + rights.count = argc-1; + rights.names = TALLOC_ARRAY(mem_ctx, struct lsa_StringLarge, + rights.count); + if (!rights.names) { + return NT_STATUS_NO_MEMORY; + } + + for (i=0; i