summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-14 15:28:26 +0100
committerGünther Deschner <gd@samba.org>2008-02-14 15:28:26 +0100
commitf21cdab938a0a94405d595bb80fbda724315d984 (patch)
treed3aa9a988cf87f1c662e849bffb4e924134d1e39 /source3/utils
parent10462a5a795fe357c6487a85fedcb23adf8ab886 (diff)
downloadsamba-f21cdab938a0a94405d595bb80fbda724315d984.tar.gz
samba-f21cdab938a0a94405d595bb80fbda724315d984.tar.bz2
samba-f21cdab938a0a94405d595bb80fbda724315d984.zip
Use rpccli_lsa_RemoveAccountRights() in net and rpcclient.
Guenther (This used to be commit 78200d88924bbef3df7185fc3a0e1753160a592f)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_rpc_rights.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/source3/utils/net_rpc_rights.c b/source3/utils/net_rpc_rights.c
index a0df5d8980..16d75e57d9 100644
--- a/source3/utils/net_rpc_rights.c
+++ b/source3/utils/net_rpc_rights.c
@@ -502,8 +502,9 @@ static NTSTATUS rpc_rights_revoke_internal(const DOM_SID *domain_sid,
{
POLICY_HND dom_pol;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
+ struct lsa_RightSet rights;
DOM_SID sid;
+ int i;
if (argc < 2 ) {
d_printf("Usage: net rpc rights revoke <name|SID> <rights...>\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<argc-1; i++) {
+ init_lsa_StringLarge(&rights.names[i], argv[i+1]);
+ }
+
+ result = rpccli_lsa_RemoveAccountRights(pipe_hnd, mem_ctx,
+ &dom_pol,
+ &sid,
+ false,
+ &rights);
if (!NT_STATUS_IS_OK(result))
goto done;