summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-10-10 01:30:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:42 -0500
commit594082233fda1e0fa82edaddd6584087d73b26c8 (patch)
tree9f2d901121ea11c1bf17765820b0c56bae1926d9 /source4/torture/rpc
parent19a242eb3a32961fcc9119e8a4e31829359fb1bd (diff)
downloadsamba-594082233fda1e0fa82edaddd6584087d73b26c8.tar.gz
samba-594082233fda1e0fa82edaddd6584087d73b26c8.tar.bz2
samba-594082233fda1e0fa82edaddd6584087d73b26c8.zip
r2888: - add 'Ds' prefix to Bind and Unbind call on drsuapi
- rename handle -> bind_handle - change function types to NTSTATUS metze (This used to be commit de73676342be8dbf39df8d3fe68817932ee71ccb)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/autoidl.c8
-rw-r--r--source4/torture/rpc/drsuapi.c32
2 files changed, 20 insertions, 20 deletions
diff --git a/source4/torture/rpc/autoidl.c b/source4/torture/rpc/autoidl.c
index 44e0edb1c3..8ec4a19787 100644
--- a/source4/torture/rpc/autoidl.c
+++ b/source4/torture/rpc/autoidl.c
@@ -32,14 +32,14 @@ static BOOL get_policy_handle(struct dcerpc_pipe *p,
struct policy_handle *handle)
{
NTSTATUS status;
- struct drsuapi_Bind r;
+ struct drsuapi_DsBind r;
ZERO_STRUCT(r);
- r.out.handle = handle;
+ r.out.bind_handle = handle;
- status = dcerpc_drsuapi_Bind(p, mem_ctx, &r);
+ status = dcerpc_drsuapi_DsBind(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
- printf("drsuapi_Bind failed - %s\n", nt_errstr(status));
+ printf("drsuapi_DsBind failed - %s\n", nt_errstr(status));
return False;
}
diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c
index 309427048f..907183083b 100644
--- a/source4/torture/rpc/drsuapi.c
+++ b/source4/torture/rpc/drsuapi.c
@@ -25,46 +25,46 @@
#define TEST_MACHINE_NAME "torturetest"
-static BOOL test_Bind(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
- struct policy_handle *handle)
+static BOOL test_DsBind(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
+ struct policy_handle *bind_handle)
{
NTSTATUS status;
- struct drsuapi_Bind r;
+ struct drsuapi_DsBind r;
BOOL ret = True;
ZERO_STRUCT(r);
- r.out.handle = handle;
+ r.out.bind_handle = bind_handle;
- status = dcerpc_drsuapi_Bind(p, mem_ctx, &r);
+ status = dcerpc_drsuapi_DsBind(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
const char *errstr = nt_errstr(status);
if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
errstr = dcerpc_errstr(mem_ctx, p->last_fault_code);
}
- printf("drsuapi_Bind level failed - %s\n", errstr);
+ printf("drsuapi_DsBind failed - %s\n", errstr);
ret = False;
}
return ret;
}
-static BOOL test_Unbind(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
- struct policy_handle *handle)
+static BOOL test_DsUnbind(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
+ struct policy_handle *bind_handle)
{
NTSTATUS status;
- struct drsuapi_Unbind r;
+ struct drsuapi_DsUnbind r;
BOOL ret = True;
- r.in.handle = handle;
- r.out.handle = handle;
+ r.in.bind_handle = bind_handle;
+ r.out.bind_handle = bind_handle;
- status = dcerpc_drsuapi_Unbind(p, mem_ctx, &r);
+ status = dcerpc_drsuapi_DsUnbind(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
const char *errstr = nt_errstr(status);
if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
errstr = dcerpc_errstr(mem_ctx, p->last_fault_code);
}
- printf("drsuapi_Unbind level failed - %s\n", errstr);
+ printf("drsuapi_DsUnbind failed - %s\n", errstr);
ret = False;
}
@@ -77,7 +77,7 @@ BOOL torture_rpc_drsuapi(int dummy)
struct dcerpc_pipe *p;
TALLOC_CTX *mem_ctx;
BOOL ret = True;
- struct policy_handle handle;
+ struct policy_handle bind_handle;
status = torture_rpc_connection(&p,
DCERPC_DRSUAPI_NAME,
@@ -91,11 +91,11 @@ BOOL torture_rpc_drsuapi(int dummy)
mem_ctx = talloc_init("torture_rpc_drsuapi");
- if (!test_Bind(p, mem_ctx, &handle)) {
+ if (!test_DsBind(p, mem_ctx, &bind_handle)) {
ret = False;
}
- if (!test_Unbind(p, mem_ctx, &handle)) {
+ if (!test_DsUnbind(p, mem_ctx, &bind_handle)) {
ret = False;
}