summaryrefslogtreecommitdiff
path: root/source4/torture/libnet/libnet_share.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-08-28 19:03:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:03:03 -0500
commit3e7203d0b34a031e10aeaaf04f246a1de8376ab4 (patch)
treecb3b6303112f2b945650b2a778d2eb32cbba3e59 /source4/torture/libnet/libnet_share.c
parent53d10b44faa77293e380bd1cda6168acc05a5493 (diff)
downloadsamba-3e7203d0b34a031e10aeaaf04f246a1de8376ab4.tar.gz
samba-3e7203d0b34a031e10aeaaf04f246a1de8376ab4.tar.bz2
samba-3e7203d0b34a031e10aeaaf04f246a1de8376ab4.zip
r24755: Use common code for finding the RPC binding in the torture tests.
(This used to be commit e3310e773924ddd2129e8ca1a86e23d0f713c19c)
Diffstat (limited to 'source4/torture/libnet/libnet_share.c')
-rw-r--r--source4/torture/libnet/libnet_share.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source4/torture/libnet/libnet_share.c b/source4/torture/libnet/libnet_share.c
index a4d94a6b9c..b6b0b37d01 100644
--- a/source4/torture/libnet/libnet_share.c
+++ b/source4/torture/libnet/libnet_share.c
@@ -121,15 +121,12 @@ BOOL torture_listshares(struct torture_context *torture)
int i;
BOOL ret = True;
struct libnet_context* libnetctx;
- const char *binding;
struct dcerpc_binding *bind;
TALLOC_CTX *mem_ctx;
mem_ctx = talloc_init("test_listshares");
- binding = torture_setting_string(torture, "binding", NULL);
- status = dcerpc_parse_binding(mem_ctx, binding, &bind);
+ status = torture_rpc_binding(torture, &bind);
if (!NT_STATUS_IS_OK(status)) {
- printf("Error while parsing the binding string\n");
ret = False;
goto done;
}
@@ -203,7 +200,7 @@ BOOL torture_delshare(struct torture_context *torture)
struct dcerpc_pipe *p;
struct dcerpc_binding *bind;
struct libnet_context* libnetctx;
- const char *host, *binding;
+ const char *host;
TALLOC_CTX *mem_ctx;
NTSTATUS status;
BOOL ret = True;
@@ -211,10 +208,8 @@ BOOL torture_delshare(struct torture_context *torture)
mem_ctx = talloc_init("test_listshares");
host = torture_setting_string(torture, "host", NULL);
- binding = torture_setting_string(torture, "binding", NULL);
- status = dcerpc_parse_binding(mem_ctx, binding, &bind);
+ status = torture_rpc_binding(torture, &bind);
if (!NT_STATUS_IS_OK(status)) {
- printf("Error while parsing the binding string\n");
ret = False;
goto done;
}