diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-09-21 07:32:01 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:58:56 -0500 |
commit | 5d7f0dec9e4eb14fa792e0218b0571ba779bbf59 (patch) | |
tree | d006094959be864ca59390d749d04f1a75550844 | |
parent | 6625d9745dd75ce1bebc54bb41b24608289152da (diff) | |
download | samba-5d7f0dec9e4eb14fa792e0218b0571ba779bbf59.tar.gz samba-5d7f0dec9e4eb14fa792e0218b0571ba779bbf59.tar.bz2 samba-5d7f0dec9e4eb14fa792e0218b0571ba779bbf59.zip |
r2465: modify the autoidl hack to work for DRSUAPI
(This used to be commit 59b3d68bd047231d72fa3299e7289aef25702e9b)
-rw-r--r-- | source4/torture/rpc/autoidl.c | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/source4/torture/rpc/autoidl.c b/source4/torture/rpc/autoidl.c index d05390cb5a..a0d36ecc86 100644 --- a/source4/torture/rpc/autoidl.c +++ b/source4/torture/rpc/autoidl.c @@ -23,8 +23,31 @@ #include "includes.h" +#if 1 /* - get a handle - doesn't really matter what type + get a DRSUAPI policy handle +*/ +static BOOL get_policy_handle(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx, + struct policy_handle *handle) +{ + NTSTATUS status; + struct drsuapi_Bind r; + + ZERO_STRUCT(r); + r.out.handle = handle; + + status = dcerpc_drsuapi_Bind(p, mem_ctx, &r); + if (!NT_STATUS_IS_OK(status)) { + printf("drsuapi_Bind failed - %s\n", nt_errstr(status)); + return False; + } + + return True; +} +#else +/* + get a SAMR handle */ static BOOL get_policy_handle(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *handle) @@ -44,6 +67,7 @@ static BOOL get_policy_handle(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, return True; } +#endif static void fill_blob_handle(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, struct policy_handle *handle) @@ -227,7 +251,7 @@ static void test_scan_call(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_ta static void test_auto_scan(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_table *iface) { - test_scan_call(mem_ctx, iface, 0x42); + test_scan_call(mem_ctx, iface, 2); } BOOL torture_rpc_autoidl(int dummy) @@ -235,7 +259,7 @@ BOOL torture_rpc_autoidl(int dummy) TALLOC_CTX *mem_ctx; const struct dcerpc_interface_table *iface; - iface = idl_iface_by_name("samr"); + iface = idl_iface_by_name("drsuapi"); if (!iface) { printf("Unknown interface!\n"); return False; |