diff options
author | Günther Deschner <gd@samba.org> | 2008-02-14 14:34:10 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-02-14 14:40:26 +0100 |
commit | 96aa5dea8e53eaa96511d8091101da7d88046396 (patch) | |
tree | e2bd8c12ce1666f01e1bbde36f71bf059cc7fd6d /source3/utils | |
parent | b9bc1ac1b92f993a71f6eb64b15f486538bf50d7 (diff) | |
download | samba-96aa5dea8e53eaa96511d8091101da7d88046396.tar.gz samba-96aa5dea8e53eaa96511d8091101da7d88046396.tar.bz2 samba-96aa5dea8e53eaa96511d8091101da7d88046396.zip |
Use rpccli_lsa_AddAccountRights in net and rpcclient.
Guenther
(This used to be commit e94ded74d6541d1d8954cfbbbd577ca0c83ecd4c)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_rpc_rights.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/source3/utils/net_rpc_rights.c b/source3/utils/net_rpc_rights.c index d8c7462c0d..9ba0eaae00 100644 --- a/source3/utils/net_rpc_rights.c +++ b/source3/utils/net_rpc_rights.c @@ -431,6 +431,8 @@ static NTSTATUS rpc_rights_grant_internal(const DOM_SID *domain_sid, { POLICY_HND dom_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + struct lsa_RightSet rights; + int i; DOM_SID sid; @@ -450,8 +452,21 @@ static NTSTATUS rpc_rights_grant_internal(const DOM_SID *domain_sid, if (!NT_STATUS_IS_OK(result)) return result; - result = rpccli_lsa_add_account_rights(pipe_hnd, mem_ctx, &dom_pol, sid, - 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_AddAccountRights(pipe_hnd, mem_ctx, + &dom_pol, + &sid, + &rights); if (!NT_STATUS_IS_OK(result)) goto done; |