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 | |
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')
-rw-r--r-- | source4/librpc/idl/lsa.idl | 6 | ||||
-rw-r--r-- | source4/torture/rpc/lsa.c | 26 |
2 files changed, 31 insertions, 1 deletions
diff --git a/source4/librpc/idl/lsa.idl b/source4/librpc/idl/lsa.idl index f71a4e4c8c..8a1b4d546f 100644 --- a/source4/librpc/idl/lsa.idl +++ b/source4/librpc/idl/lsa.idl @@ -13,6 +13,7 @@ [in,ref] policy_handle *handle ); + /******************/ /* Function: 0x01 */ NTSTATUS lsa_Delete (); @@ -51,7 +52,9 @@ security_descriptor *sec_desc; lsa_QosInfo *sec_qos; } lsa_ObjectAttribute; - + + /* notice the screwup with the system_name - thats why MS created + OpenPolicy2 */ NTSTATUS lsa_OpenPolicy ( [in] uint16 *system_name, [in,ref] lsa_ObjectAttribute *attr, @@ -60,6 +63,7 @@ ); + /******************/ /* Function: 0x07 */ NTSTATUS lsa_QueryInfoPolicy (); 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; |