diff options
author | Günther Deschner <gd@samba.org> | 2008-02-14 12:13:13 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-02-14 13:13:09 +0100 |
commit | eccaf125a9e3590af0a0ef84980314ea5190e586 (patch) | |
tree | c54e0311ffc647b0ff4ac0d4c8649ae89adf4a58 /source3 | |
parent | d0ae7cfb6fb3ed85d87334ce42ed7d3ce84a91a0 (diff) | |
download | samba-eccaf125a9e3590af0a0ef84980314ea5190e586.tar.gz samba-eccaf125a9e3590af0a0ef84980314ea5190e586.tar.bz2 samba-eccaf125a9e3590af0a0ef84980314ea5190e586.zip |
Use rpccli_lsa_EnumPrivsAccount() in rpcclient.
Guenther
(This used to be commit c28b52dcfedd575f5ae4ed7942857d3853bdd051)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpcclient/cmd_lsarpc.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c index 6e12a90982..bd9d3c03cd 100644 --- a/source3/rpcclient/cmd_lsarpc.c +++ b/source3/rpcclient/cmd_lsarpc.c @@ -652,10 +652,8 @@ static NTSTATUS cmd_lsa_enum_privsaccounts(struct rpc_pipe_client *cli, POLICY_HND user_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; uint32 access_desired = 0x000f000f; - DOM_SID sid; - uint32 count=0; - LUID_ATTR *set; + struct lsa_PrivilegeSet *privs = NULL; int i; if (argc != 2 ) { @@ -683,17 +681,22 @@ static NTSTATUS cmd_lsa_enum_privsaccounts(struct rpc_pipe_client *cli, if (!NT_STATUS_IS_OK(result)) goto done; - result = rpccli_lsa_enum_privsaccount(cli, mem_ctx, &user_pol, &count, &set); + result = rpccli_lsa_EnumPrivsAccount(cli, mem_ctx, + &user_pol, + &privs); if (!NT_STATUS_IS_OK(result)) goto done; /* Print results */ - printf("found %d privileges for SID %s\n\n", count, argv[1]); + printf("found %d privileges for SID %s\n\n", privs->count, argv[1]); printf("high\tlow\tattribute\n"); - for (i = 0; i < count; i++) { - printf("%u\t%u\t%u\n", set[i].luid.high, set[i].luid.low, set[i].attr); + for (i = 0; i < privs->count; i++) { + printf("%u\t%u\t%u\n", + privs->set[i].luid.high, + privs->set[i].luid.low, + privs->set[i].attribute); } rpccli_lsa_Close(cli, mem_ctx, &dom_pol); |