*/
bool torture_smb2_getinfo_scan(struct torture_context *torture)
{
- TALLOC_CTX *mem_ctx = talloc_new(NULL);
struct smb2_tree *tree;
NTSTATUS status;
struct smb2_getinfo io;
struct smb2_handle fhandle, dhandle;
int c, i;
- if (!torture_smb2_connection(mem_ctx, &tree)) {
+ if (!torture_smb2_connection(torture, &tree)) {
return false;
}
io.in.level = (i<<8) | c;
io.in.file.handle = fhandle;
- status = smb2_getinfo(tree, mem_ctx, &io);
+ status = smb2_getinfo(tree, torture, &io);
if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) &&
!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER) &&
!NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) {
}
io.in.file.handle = dhandle;
- status = smb2_getinfo(tree, mem_ctx, &io);
+ status = smb2_getinfo(tree, torture, &io);
if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) &&
!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER) &&
!NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) {
}
}
- talloc_free(mem_ctx);
-
return true;
}
*/
bool torture_smb2_setinfo_scan(struct torture_context *torture)
{
- TALLOC_CTX *mem_ctx = talloc_new(NULL);
struct smb2_tree *tree;
NTSTATUS status;
struct smb2_setinfo io;
struct smb2_handle handle;
int c, i;
- if (!torture_smb2_connection(mem_ctx, &tree)) {
+ if (!torture_smb2_connection(torture, &tree)) {
return false;
}
torture_smb2_testfile(tree, FNAME, &handle);
ZERO_STRUCT(io);
- io.in.blob = data_blob_talloc_zero(mem_ctx, 1024);
+ io.in.blob = data_blob_talloc_zero(torture, 1024);
for (c=1;c<5;c++) {
for (i=0;i<0x100;i++) {
}
}
- talloc_free(mem_ctx);
-
return true;
}
*/
bool torture_smb2_find_scan(struct torture_context *torture)
{
- TALLOC_CTX *mem_ctx = talloc_new(NULL);
struct smb2_tree *tree;
NTSTATUS status;
struct smb2_find io;
struct smb2_handle handle;
int i;
- if (!torture_smb2_connection(mem_ctx, &tree)) {
+ if (!torture_smb2_connection(torture, &tree)) {
return false;
}
io.in.level = i;
io.in.file.handle = handle;
- status = smb2_find(tree, mem_ctx, &io);
+ status = smb2_find(tree, torture, &io);
if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) &&
!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER) &&
!NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) {
}
}
- talloc_free(mem_ctx);
-
return true;
}