summaryrefslogtreecommitdiff
path: root/source4/torture/basic/base.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/basic/base.c')
-rw-r--r--source4/torture/basic/base.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index f2b7b9b225..ea7b6c08fd 100644
--- a/source4/torture/basic/base.c
+++ b/source4/torture/basic/base.c
@@ -57,7 +57,8 @@ static struct smbcli_state *open_nbt_connection(struct torture_context *tctx)
if (!smbcli_socket_connect(cli, host, lp_smb_ports(tctx->lp_ctx), tctx->ev,
lp_resolve_context(tctx->lp_ctx), &options,
- lp_iconv_convenience(tctx->lp_ctx))) {
+ lp_iconv_convenience(tctx->lp_ctx),
+ lp_socket_options(tctx->lp_ctx))) {
torture_comment(tctx, "Failed to connect with %s\n", host);
goto failed;
}
@@ -1449,14 +1450,8 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx)
const char *os2_fname = ".+,;=[].";
const char *dname = "samba3_errordir";
union smb_open io;
- TALLOC_CTX *mem_ctx = talloc_init("samba3_errorpaths");
NTSTATUS status;
- if (mem_ctx == NULL) {
- torture_comment(tctx, "talloc_init failed\n");
- return false;
- }
-
nt_status_support = lp_nt_status_support(tctx->lp_ctx);
if (!lp_set_cmdline(tctx->lp_ctx, "nt status support", "yes")) {
@@ -1505,14 +1500,14 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx)
io.ntcreatex.in.security_flags = 0;
io.ntcreatex.in.fname = dname;
- status = smb_raw_open(cli_nt->tree, mem_ctx, &io);
+ status = smb_raw_open(cli_nt->tree, tctx, &io);
if (!NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION)) {
torture_comment(tctx, "(%s) incorrect status %s should be %s\n",
__location__, nt_errstr(status),
nt_errstr(NT_STATUS_OBJECT_NAME_COLLISION));
goto fail;
}
- status = smb_raw_open(cli_dos->tree, mem_ctx, &io);
+ status = smb_raw_open(cli_dos->tree, tctx, &io);
if (!NT_STATUS_EQUAL(status, NT_STATUS_DOS(ERRDOS, ERRfilexists))) {
torture_comment(tctx, "(%s) incorrect status %s should be %s\n",
__location__, nt_errstr(status),
@@ -1562,7 +1557,7 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx)
}
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
- status = smb_raw_open(cli_nt->tree, mem_ctx, &io);
+ status = smb_raw_open(cli_nt->tree, tctx, &io);
if (!NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION)) {
torture_comment(tctx, "(%s) incorrect status %s should be %s\n",
__location__, nt_errstr(status),
@@ -1570,7 +1565,7 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx)
goto fail;
}
- status = smb_raw_open(cli_dos->tree, mem_ctx, &io);
+ status = smb_raw_open(cli_dos->tree, tctx, &io);
if (!NT_STATUS_EQUAL(status, NT_STATUS_DOS(ERRDOS, ERRfilexists))) {
torture_comment(tctx, "(%s) incorrect status %s should be %s\n",
__location__, nt_errstr(status),
@@ -1643,7 +1638,7 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx)
io.ntcreatex.in.fname = fname;
io.ntcreatex.in.flags = 0;
- status = smb_raw_open(cli_nt->tree, mem_ctx, &io);
+ status = smb_raw_open(cli_nt->tree, tctx, &io);
if (!NT_STATUS_EQUAL(status, NT_STATUS_NOT_A_DIRECTORY)) {
torture_comment(tctx, "ntcreate as dir gave %s, "
"expected NT_STATUS_NOT_A_DIRECTORY\n",
@@ -1655,7 +1650,7 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx)
smbcli_close(cli_nt->tree, io.ntcreatex.out.file.fnum);
}
- status = smb_raw_open(cli_dos->tree, mem_ctx, &io);
+ status = smb_raw_open(cli_dos->tree, tctx, &io);
if (!NT_STATUS_EQUAL(status, NT_STATUS_DOS(ERRDOS,
ERRbaddirectory))) {
torture_comment(tctx, "ntcreate as dir gave %s, "