diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-10 12:12:22 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-10 12:12:22 +0000 |
commit | 4659d4f9e2bfdbd253ff14e9181dd65023ff6c6a (patch) | |
tree | 5306b99dbe6c2cac68b8755c1a21fec127a84068 /source4/torture | |
parent | a9fbdd4838a40b51df592023f5507b3db0923668 (diff) | |
download | samba-4659d4f9e2bfdbd253ff14e9181dd65023ff6c6a.tar.gz samba-4659d4f9e2bfdbd253ff14e9181dd65023ff6c6a.tar.bz2 samba-4659d4f9e2bfdbd253ff14e9181dd65023ff6c6a.zip |
added IDL and test for lsa_EnumAccountRights()
interestingly, win2000 doesn't return the same list of rights via
lsa_EnumAccountRights() and lsa_EnumPrivsAccount()
(This used to be commit 447c5f13d40d05a49b8bfa1c28c2797371ff5352)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/lsa.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index f4c4858c8e..0e316ff395 100644 --- a/source4/torture/rpc/lsa.c +++ b/source4/torture/rpc/lsa.c @@ -305,6 +305,36 @@ static BOOL test_EnumPrivsAccount(struct dcerpc_pipe *p, return True; } +static BOOL test_EnumAccountRights(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx, + struct policy_handle *acct_handle, + struct dom_sid *sid) +{ + NTSTATUS status; + struct lsa_EnumAccountRights r; + struct lsa_RightSet rights; + int i; + + printf("Testing EnumAccountRights\n"); + + r.in.handle = acct_handle; + r.in.sid = sid; + r.out.rights = &rights; + + status = dcerpc_lsa_EnumAccountRights(p, mem_ctx, &r); + if (!NT_STATUS_IS_OK(status)) { + printf("EnumAccountRights failed - %s\n", nt_errstr(status)); + return False; + } + + printf("received %d rights\n", rights.count); + for (i=0;i<rights.count;i++) { + printf("\t'%s'\n", rights.names[i].name); + } + + return True; +} + static BOOL test_OpenAccount(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *handle, @@ -372,9 +402,10 @@ static BOOL test_EnumAccounts(struct dcerpc_pipe *p, printf("testing all accounts\n"); for (i=0;i<sids1.num_sids;i++) { test_OpenAccount(p, mem_ctx, handle, sids1.sids[i].sid); + test_EnumAccountRights(p, mem_ctx, handle, sids1.sids[i].sid); } printf("\n"); - + if (sids1.num_sids < 3) { return True; } |