summaryrefslogtreecommitdiff
path: root/source4/torture/raw/samba3hide.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-04-30 14:05:19 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-04-30 07:00:05 +0200
commit7e9ed052778d22e4d70bed444b226461dced01b6 (patch)
tree6eb7ef5e5e326d996749ae43b22d51d20503e9af /source4/torture/raw/samba3hide.c
parent773304ec8b52d718bd3ca9e1b2543a50d7f4843e (diff)
downloadsamba-7e9ed052778d22e4d70bed444b226461dced01b6.tar.gz
s4-torture: Move various samba3 tests to the torture_suite_add_1smb_test wrapper
Diffstat (limited to 'source4/torture/raw/samba3hide.c')
-rw-r--r--source4/torture/raw/samba3hide.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/source4/torture/raw/samba3hide.c b/source4/torture/raw/samba3hide.c
index c3a572c21cf..f980ffceb6d 100644
--- a/source4/torture/raw/samba3hide.c
+++ b/source4/torture/raw/samba3hide.c
@@ -154,21 +154,14 @@ static NTSTATUS smbcli_chmod(struct smbcli_tree *tree, const char *fname,
return smb_raw_setpathinfo(tree, &sfinfo);
}
-bool torture_samba3_hide(struct torture_context *torture)
+bool torture_samba3_hide(struct torture_context *torture, struct smbcli_state *cli)
{
- struct smbcli_state *cli;
const char *fname = "test.txt";
int fnum;
NTSTATUS status;
struct smbcli_tree *hideunread;
struct smbcli_tree *hideunwrite;
- if (!torture_open_connection_share(
- torture, &cli, torture, torture_setting_string(torture, "host", NULL),
- torture_setting_string(torture, "share", NULL), torture->ev)) {
- torture_fail(torture, "torture_open_connection_share failed\n");
- }
-
status = smbcli_setup_unix(cli->tree);
if (!NT_STATUS_IS_OK(status)) {
torture_fail(torture,
@@ -277,19 +270,14 @@ bool torture_samba3_hide(struct torture_context *torture)
* close. smb_close should return NT_STATUS_ACCESS_DENIED.
*/
-bool torture_samba3_closeerr(struct torture_context *tctx)
+bool torture_samba3_closeerr(struct torture_context *tctx, struct smbcli_state *cli)
{
- struct smbcli_state *cli = NULL;
bool result = false;
NTSTATUS status;
const char *dname = "closeerr.dir";
const char *fname = "closeerr.dir\\closerr.txt";
int fnum;
- if (!torture_open_connection(&cli, tctx, 0)) {
- goto fail;
- }
-
smbcli_deltree(cli->tree, dname);
torture_assert_ntstatus_ok(
@@ -334,9 +322,5 @@ bool torture_samba3_closeerr(struct torture_context *tctx)
result = true;
- fail:
- if (cli) {
- torture_close_connection(cli);
- }
return result;
}