summaryrefslogtreecommitdiff
path: root/source4/torture/libnet/userman.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-03-15 09:37:42 +0100
committerStefan Metzmacher <metze@samba.org>2010-03-15 09:40:28 +0100
commitf49d5e3288bc1b45d22fff0e68b11add2c4691ab (patch)
treed2eb6ff1b0d347a10b74867af28edf9b913c6004 /source4/torture/libnet/userman.c
parenteb8c8a0ecaa9bfd29f090db21fccdad7751767ae (diff)
downloadsamba-f49d5e3288bc1b45d22fff0e68b11add2c4691ab.tar.gz
samba-f49d5e3288bc1b45d22fff0e68b11add2c4691ab.tar.bz2
samba-f49d5e3288bc1b45d22fff0e68b11add2c4691ab.zip
s4:tortore/libnet: fix crash bugs because of incorrect function prototypes
metze
Diffstat (limited to 'source4/torture/libnet/userman.c')
-rw-r--r--source4/torture/libnet/userman.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/source4/torture/libnet/userman.c b/source4/torture/libnet/userman.c
index a5d8540d7b..72c87ab8bd 100644
--- a/source4/torture/libnet/userman.c
+++ b/source4/torture/libnet/userman.c
@@ -311,6 +311,7 @@ bool torture_useradd(struct torture_context *torture)
const char *name = TEST_USERNAME;
TALLOC_CTX *mem_ctx;
bool ret = true;
+ struct dcerpc_binding_handle *b;
mem_ctx = talloc_init("test_useradd");
@@ -319,9 +320,10 @@ bool torture_useradd(struct torture_context *torture)
&ndr_table_samr);
torture_assert_ntstatus_ok(torture, status, "RPC connect failed");
+ b = p->binding_handle;
domain_name.string = lp_workgroup(torture->lp_ctx);
- if (!test_opendomain(torture, p, mem_ctx, &h, &domain_name, &sid)) {
+ if (!test_opendomain(torture, b, mem_ctx, &h, &domain_name, &sid)) {
ret = false;
goto done;
}
@@ -331,12 +333,12 @@ bool torture_useradd(struct torture_context *torture)
goto done;
}
- if (!test_user_cleanup(torture, p, mem_ctx, &h, name)) {
+ if (!test_user_cleanup(torture, b, mem_ctx, &h, name)) {
ret = false;
goto done;
}
- if (!test_opendomain(torture, p, mem_ctx, &h, &domain_name, &sid)) {
+ if (!test_opendomain(torture, b, mem_ctx, &h, &domain_name, &sid)) {
ret = false;
goto done;
}
@@ -346,7 +348,7 @@ bool torture_useradd(struct torture_context *torture)
goto done;
}
- if (!test_user_cleanup(torture, p, mem_ctx, &h, name)) {
+ if (!test_user_cleanup(torture, b, mem_ctx, &h, name)) {
ret = false;
goto done;
}
@@ -368,6 +370,7 @@ bool torture_userdel(struct torture_context *torture)
const char *name = TEST_USERNAME;
TALLOC_CTX *mem_ctx;
bool ret = true;
+ struct dcerpc_binding_handle *b;
mem_ctx = talloc_init("test_userdel");
@@ -378,14 +381,15 @@ bool torture_userdel(struct torture_context *torture)
if (!NT_STATUS_IS_OK(status)) {
return false;
}
+ b = p->binding_handle;
domain_name.string = lp_workgroup(torture->lp_ctx);
- if (!test_opendomain(torture, p, mem_ctx, &h, &domain_name, &sid)) {
+ if (!test_opendomain(torture, b, mem_ctx, &h, &domain_name, &sid)) {
ret = false;
goto done;
}
- if (!test_user_create(torture, p, mem_ctx, &h, name, &rid)) {
+ if (!test_user_create(torture, b, mem_ctx, &h, name, &rid)) {
ret = false;
goto done;
}
@@ -413,6 +417,7 @@ bool torture_usermod(struct torture_context *torture)
char *name;
TALLOC_CTX *mem_ctx;
bool ret = true;
+ struct dcerpc_binding_handle *b;
mem_ctx = talloc_init("test_userdel");
@@ -421,16 +426,17 @@ bool torture_usermod(struct torture_context *torture)
&ndr_table_samr);
torture_assert_ntstatus_ok(torture, status, "RPC connect");
+ b = p->binding_handle;
domain_name.string = lp_workgroup(torture->lp_ctx);
name = talloc_strdup(mem_ctx, TEST_USERNAME);
- if (!test_opendomain(torture, p, mem_ctx, &h, &domain_name, &sid)) {
+ if (!test_opendomain(torture, b, mem_ctx, &h, &domain_name, &sid)) {
ret = false;
goto done;
}
- if (!test_user_create(torture, p, mem_ctx, &h, name, &rid)) {
+ if (!test_user_create(torture, b, mem_ctx, &h, name, &rid)) {
ret = false;
goto done;
}
@@ -450,7 +456,7 @@ bool torture_usermod(struct torture_context *torture)
}
cleanup:
- if (!test_user_cleanup(torture, p, mem_ctx, &h, name)) {
+ if (!test_user_cleanup(torture, b, mem_ctx, &h, name)) {
ret = false;
goto done;
}