diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-04-03 17:15:32 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2004-04-03 17:15:32 +0000 |
commit | 84d009d52ecfff08e01374de91260aeffe40b9d9 (patch) | |
tree | d60ca8bb12d7a0e0d2d4d0b1dba32aad4c2d6eca /source4/torture | |
parent | 9bc3b91cca4a93ec70406d1e92680033ad531aae (diff) | |
download | samba-84d009d52ecfff08e01374de91260aeffe40b9d9.tar.gz samba-84d009d52ecfff08e01374de91260aeffe40b9d9.tar.bz2 samba-84d009d52ecfff08e01374de91260aeffe40b9d9.zip |
added IDL and test suite for lsa_CreateSecret()
(This used to be commit 4de08b64ddb3851e90a8dadd7d0d0991e933abf5)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/lsa.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index 3b7e4dbe5d..f50d189dd2 100644 --- a/source4/torture/rpc/lsa.c +++ b/source4/torture/rpc/lsa.c @@ -380,6 +380,35 @@ static BOOL test_CreateTrustedDomain(struct dcerpc_pipe *p, return True; } +static BOOL test_CreateSecret(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx, + struct policy_handle *handle) +{ + NTSTATUS status; + struct lsa_CreateSecret r; + struct policy_handle sec_handle; + + printf("Testing CreateSecret\n"); + + init_lsa_Name(&r.in.name, "torturesecret"); + + r.in.handle = handle; + r.in.desired_access = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.out.sec_handle = &sec_handle; + + status = dcerpc_lsa_CreateSecret(p, mem_ctx, &r); + if (!NT_STATUS_IS_OK(status)) { + printf("CreateSecret failed - %s\n", nt_errstr(status)); + return False; + } + + if (!test_Delete(p, mem_ctx, &sec_handle)) { + return False; + } + + return True; +} + static BOOL test_EnumAccountRights(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *acct_handle, @@ -675,6 +704,10 @@ BOOL torture_rpc_lsa(int dummy) ret = False; } + if (!test_CreateSecret(p, mem_ctx, &handle)) { + ret = False; + } + if (!test_CreateTrustedDomain(p, mem_ctx, &handle)) { ret = False; } |