diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-09 09:04:28 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-09 09:04:28 +0000 |
commit | e3581c28bbc43c0c74f8f0622a464856ad243fb0 (patch) | |
tree | cb44e73581a7bbb37d307195d6352393c2af39c3 /source4/torture | |
parent | 2f6adaadbb127549e17b893d678dfe1a91eed812 (diff) | |
download | samba-e3581c28bbc43c0c74f8f0622a464856ad243fb0.tar.gz samba-e3581c28bbc43c0c74f8f0622a464856ad243fb0.tar.bz2 samba-e3581c28bbc43c0c74f8f0622a464856ad243fb0.zip |
added a test for lsa_Close()
(This used to be commit dbadbbf1a7de011305c7f9d5d8d92467cb6e1c61)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/lsa.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index 9df5dc0078..a22e2d6e32 100644 --- a/source4/torture/rpc/lsa.c +++ b/source4/torture/rpc/lsa.c @@ -329,6 +329,28 @@ static BOOL test_EnumAccounts(struct dcerpc_pipe *p, return True; } + +static BOOL test_Close(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx, + struct policy_handle *handle) +{ + NTSTATUS status; + struct lsa_Close r; + + printf("\ntesting Close\n"); + + r.in.handle = handle; + status = dcerpc_lsa_Close(p, mem_ctx, &r); + if (!NT_STATUS_IS_OK(status)) { + printf("Close failed - %s\n", nt_errstr(status)); + return False; + } + + printf("\n"); + + return True; +} + BOOL torture_rpc_lsa(int dummy) { NTSTATUS status; @@ -356,6 +378,10 @@ BOOL torture_rpc_lsa(int dummy) ret = False; } + if (!test_Close(p, mem_ctx, &handle)) { + ret = False; + } + torture_rpc_close(p); return ret; |