summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-05-20 10:46:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:11 -0500
commite306c5bf129a981693bd251d45597f1e584ee850 (patch)
tree54e78bf5ba441d9f780d1e987cd9ff72b0911f23 /source4/torture
parent2de1d5f7a8c2a3a815d81c217c274d2d5f1768cb (diff)
downloadsamba-e306c5bf129a981693bd251d45597f1e584ee850.tar.gz
samba-e306c5bf129a981693bd251d45597f1e584ee850.tar.bz2
samba-e306c5bf129a981693bd251d45597f1e584ee850.zip
r15741: move smb2 request structures into the main smb request structs
as new levels metze (This used to be commit 91806353174704857dfcc15a730af7232cfde660)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/smb2/connect.c18
-rw-r--r--source4/torture/smb2/find.c8
-rw-r--r--source4/torture/smb2/scan.c10
-rw-r--r--source4/torture/smb2/util.c16
4 files changed, 26 insertions, 26 deletions
diff --git a/source4/torture/smb2/connect.c b/source4/torture/smb2/connect.c
index 349fcda992..77b5d5c40d 100644
--- a/source4/torture/smb2/connect.c
+++ b/source4/torture/smb2/connect.c
@@ -38,8 +38,8 @@ static NTSTATUS torture_smb2_close(struct smb2_tree *tree, struct smb2_handle ha
TALLOC_CTX *tmp_ctx = talloc_new(tree);
ZERO_STRUCT(io);
- io.in.flags = SMB2_CLOSE_FLAGS_FULL_INFORMATION;
- io.in.handle = handle;
+ io.in.file.handle = handle;
+ io.in.flags = SMB2_CLOSE_FLAGS_FULL_INFORMATION;
status = smb2_close(tree, &io);
if (!NT_STATUS_IS_OK(status)) {
printf("close failed - %s\n", nt_errstr(status));
@@ -85,8 +85,8 @@ static NTSTATUS torture_smb2_write(struct smb2_tree *tree, struct smb2_handle ha
}
ZERO_STRUCT(w);
+ w.in.file.handle = handle;
w.in.offset = 0;
- w.in.handle = handle;
w.in.data = data;
status = smb2_write(tree, &w);
@@ -106,7 +106,7 @@ static NTSTATUS torture_smb2_write(struct smb2_tree *tree, struct smb2_handle ha
torture_smb2_all_info(tree, handle);
ZERO_STRUCT(f);
- f.in.handle = handle;
+ f.in.file.handle = handle;
status = smb2_flush(tree, &f);
if (!NT_STATUS_IS_OK(status)) {
@@ -115,9 +115,9 @@ static NTSTATUS torture_smb2_write(struct smb2_tree *tree, struct smb2_handle ha
}
ZERO_STRUCT(r);
+ r.in.file.handle = handle;
r.in.length = data.length;
r.in.offset = 0;
- r.in.handle = handle;
status = smb2_read(tree, tree, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -160,7 +160,7 @@ static struct smb2_handle torture_smb2_create(struct smb2_tree *tree,
status = smb2_create(tree, tmp_ctx, &io);
if (!NT_STATUS_IS_OK(status)) {
printf("create1 failed - %s\n", nt_errstr(status));
- return io.out.handle;
+ return io.out.file.handle;
}
if (DEBUGLVL(1)) {
@@ -175,13 +175,13 @@ static struct smb2_handle torture_smb2_create(struct smb2_tree *tree,
printf("size = %lld\n", (long long)io.out.size);
printf("file_attr = 0x%x\n", io.out.file_attr);
printf("handle = %016llx%016llx\n",
- (long long)io.out.handle.data[0],
- (long long)io.out.handle.data[1]);
+ (long long)io.out.file.handle.data[0],
+ (long long)io.out.file.handle.data[1]);
}
talloc_free(tmp_ctx);
- return io.out.handle;
+ return io.out.file.handle;
}
diff --git a/source4/torture/smb2/find.c b/source4/torture/smb2/find.c
index 49b4030c07..2edcdc427c 100644
--- a/source4/torture/smb2/find.c
+++ b/source4/torture/smb2/find.c
@@ -121,10 +121,10 @@ static BOOL torture_smb2_find_levels(struct smb2_tree *tree)
}
ZERO_STRUCT(f);
- f.in.handle = handle;
- f.in.pattern = FNAME;
- f.in.continue_flags = SMB2_CONTINUE_FLAG_RESTART;
- f.in.max_response_size = 0x10000;
+ f.in.file.handle = handle;
+ f.in.pattern = FNAME;
+ f.in.continue_flags = SMB2_CONTINUE_FLAG_RESTART;
+ f.in.max_response_size = 0x10000;
for (i=0;i<ARRAY_SIZE(levels);i++) {
union smb_search_data *d;
diff --git a/source4/torture/smb2/scan.c b/source4/torture/smb2/scan.c
index 8e339c4080..a1eb2e80e0 100644
--- a/source4/torture/smb2/scan.c
+++ b/source4/torture/smb2/scan.c
@@ -171,15 +171,15 @@ BOOL torture_smb2_find_scan(struct torture_context *torture)
}
ZERO_STRUCT(io);
- io.in.pattern = "*";
- io.in.continue_flags = SMB2_CONTINUE_FLAG_RESTART;
- io.in.max_response_size = 0x10000;
- io.in.handle = handle;
+ io.in.file.handle = handle;
+ io.in.pattern = "*";
+ io.in.continue_flags = SMB2_CONTINUE_FLAG_RESTART;
+ io.in.max_response_size = 0x10000;
for (i=1;i<0x100;i++) {
io.in.level = i;
- io.in.handle = handle;
+ io.in.file.handle = handle;
status = smb2_find(tree, mem_ctx, &io);
if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) &&
!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER) &&
diff --git a/source4/torture/smb2/util.c b/source4/torture/smb2/util.c
index 70be00f5fd..89c5488426 100644
--- a/source4/torture/smb2/util.c
+++ b/source4/torture/smb2/util.c
@@ -37,7 +37,7 @@ NTSTATUS smb2_util_close(struct smb2_tree *tree, struct smb2_handle h)
struct smb2_close c;
ZERO_STRUCT(c);
- c.in.handle = h;
+ c.in.file.handle = h;
return smb2_close(tree, &c);
}
@@ -67,7 +67,7 @@ NTSTATUS smb2_util_unlink(struct smb2_tree *tree, const char *fname)
}
NT_STATUS_NOT_OK_RETURN(status);
- return smb2_util_close(tree, io.out.handle);
+ return smb2_util_close(tree, io.out.file.handle);
}
/*
@@ -80,8 +80,8 @@ NTSTATUS smb2_util_write(struct smb2_tree *tree,
struct smb2_write w;
ZERO_STRUCT(w);
+ w.in.file.handle = handle;
w.in.offset = offset;
- w.in.handle = handle;
w.in.data = data_blob_const(buf, size);
return smb2_write(tree, &w);
@@ -135,7 +135,7 @@ static NTSTATUS smb2_create_complex(struct smb2_tree *tree, const char *fname,
talloc_free(tmp_ctx);
NT_STATUS_NOT_OK_RETURN(status);
- *handle = io.out.handle;
+ *handle = io.out.file.handle;
if (!dir) {
status = smb2_util_write(tree, *handle, buf, 0, sizeof(buf));
@@ -332,12 +332,12 @@ NTSTATUS torture_smb2_testfile(struct smb2_tree *tree, const char *fname,
status = smb2_create(tree, tree, &io);
NT_STATUS_NOT_OK_RETURN(status);
- *handle = io.out.handle;
+ *handle = io.out.file.handle;
ZERO_STRUCT(r);
+ r.in.file.handle = *handle;
r.in.length = 5;
r.in.offset = 0;
- r.in.handle = *handle;
smb2_read(tree, tree, &r);
@@ -365,7 +365,7 @@ NTSTATUS torture_smb2_testdir(struct smb2_tree *tree, const char *fname,
status = smb2_create(tree, tree, &io);
NT_STATUS_NOT_OK_RETURN(status);
- *handle = io.out.handle;
+ *handle = io.out.file.handle;
return NT_STATUS_OK;
}
@@ -417,7 +417,7 @@ NTSTATUS smb2_util_roothandle(struct smb2_tree *tree, struct smb2_handle *handle
status = smb2_create(tree, tree, &io);
NT_STATUS_NOT_OK_RETURN(status);
- *handle = io.out.handle;
+ *handle = io.out.file.handle;
return NT_STATUS_OK;
}