summaryrefslogtreecommitdiff
path: root/source4/torture/basic
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-03-12 22:48:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:57:06 -0500
commita1b295ed4823ce8d06f830b8db9a5d965c934b54 (patch)
tree2de735a28634c011930456f6591072a3c1471263 /source4/torture/basic
parent33647bd841c1c74e7dc50e93379e372056ac2df1 (diff)
downloadsamba-a1b295ed4823ce8d06f830b8db9a5d965c934b54.tar.gz
samba-a1b295ed4823ce8d06f830b8db9a5d965c934b54.tar.bz2
samba-a1b295ed4823ce8d06f830b8db9a5d965c934b54.zip
r14256: - rename smb_file -> smb_handle
- move it into the in/out substructs again - allow file.path only on smb_fileinfo/smb_setfileinfo metze (This used to be commit be6d5298a2cdb7e7c61d70471bad445645af5963)
Diffstat (limited to 'source4/torture/basic')
-rw-r--r--source4/torture/basic/delaywrite.c24
-rw-r--r--source4/torture/basic/delete.c4
-rw-r--r--source4/torture/basic/denytest.c30
-rw-r--r--source4/torture/basic/disconnect.c2
4 files changed, 30 insertions, 30 deletions
diff --git a/source4/torture/basic/delaywrite.c b/source4/torture/basic/delaywrite.c
index 2a41508bcc..37a9528f97 100644
--- a/source4/torture/basic/delaywrite.c
+++ b/source4/torture/basic/delaywrite.c
@@ -54,7 +54,7 @@ static BOOL test_delayed_write_update(struct smbcli_state *cli, TALLOC_CTX *mem_
}
finfo1.basic_info.level = RAW_FILEINFO_BASIC_INFO;
- finfo1.basic_info.file.fnum = fnum1;
+ finfo1.basic_info.in.file.fnum = fnum1;
finfo2 = finfo1;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo1);
@@ -148,7 +148,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
}
finfo1.basic_info.level = RAW_FILEINFO_BASIC_INFO;
- finfo1.basic_info.file.fnum = fnum1;
+ finfo1.basic_info.in.file.fnum = fnum1;
finfo2 = finfo1;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo1);
@@ -170,7 +170,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
union smb_setfileinfo sfinfo;
time_t t_set = time(NULL);
sfinfo.basic_info.level = RAW_SFILEINFO_BASIC_INFO;
- sfinfo.basic_info.file.fnum = fnum1;
+ sfinfo.basic_info.in.file.fnum = fnum1;
sfinfo.basic_info.in.create_time = finfo1.basic_info.out.create_time;
sfinfo.basic_info.in.access_time = finfo1.basic_info.out.access_time;
@@ -195,7 +195,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
t = time(NULL);
while (time(NULL) < t+120) {
- finfo2.basic_info.file.path = fname;
+ finfo2.basic_info.in.file.path = fname;
status = smb_raw_pathinfo(cli2->tree, mem_ctx, &finfo2);
@@ -223,7 +223,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
/* Now try a write to see if the write time gets reset. */
finfo1.basic_info.level = RAW_FILEINFO_BASIC_INFO;
- finfo1.basic_info.file.fnum = fnum1;
+ finfo1.basic_info.in.file.fnum = fnum1;
finfo2 = finfo1;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo1);
@@ -252,7 +252,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
printf("Doing flush after write\n");
- flsh.flush.file.fnum = fnum1;
+ flsh.flush.in.file.fnum = fnum1;
status = smb_raw_flush(cli->tree, &flsh);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("smbflush failed: %s\n", nt_errstr(status)));
@@ -330,7 +330,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
}
finfo1.basic_info.level = RAW_FILEINFO_BASIC_INFO;
- finfo1.basic_info.file.fnum = fnum2;
+ finfo1.basic_info.in.file.fnum = fnum2;
finfo2 = finfo1;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo2);
@@ -384,7 +384,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
}
finfo1.basic_info.level = RAW_FILEINFO_BASIC_INFO;
- finfo1.basic_info.file.fnum = fnum1;
+ finfo1.basic_info.in.file.fnum = fnum1;
finfo2 = finfo1;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo1);
@@ -409,7 +409,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
}
finfo1.basic_info.level = RAW_FILEINFO_BASIC_INFO;
- finfo1.basic_info.file.fnum = fnum1;
+ finfo1.basic_info.in.file.fnum = fnum1;
finfo2 = finfo1;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo2);
@@ -502,7 +502,7 @@ static BOOL test_finfo_after_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx
}
finfo1.basic_info.level = RAW_FILEINFO_BASIC_INFO;
- finfo1.basic_info.file.fnum = fnum1;
+ finfo1.basic_info.in.file.fnum = fnum1;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo1);
@@ -545,7 +545,7 @@ static BOOL test_finfo_after_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx
}
finfo2.basic_info.level = RAW_FILEINFO_BASIC_INFO;
- finfo2.basic_info.file.path = fname;
+ finfo2.basic_info.in.file.path = fname;
status = smb_raw_pathinfo(cli2->tree, mem_ctx, &finfo2);
@@ -598,7 +598,7 @@ static BOOL test_finfo_after_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx
/* This call is only for the people looking at ethereal :-) */
finfo2.basic_info.level = RAW_FILEINFO_BASIC_INFO;
- finfo2.basic_info.file.path = fname;
+ finfo2.basic_info.in.file.path = fname;
status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo2);
diff --git a/source4/torture/basic/delete.c b/source4/torture/basic/delete.c
index 6aae6d073b..98bd00010f 100644
--- a/source4/torture/basic/delete.c
+++ b/source4/torture/basic/delete.c
@@ -58,7 +58,7 @@ static BOOL check_delete_on_close(struct smbcli_state *cli, int fnum,
int nlink = expect_it ? 0 : 1;
io.all_info.level = RAW_FILEINFO_ALL_INFO;
- io.all_info.file.fnum = fnum;
+ io.all_info.in.file.fnum = fnum;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &io);
if (!NT_STATUS_IS_OK(status)) {
@@ -83,7 +83,7 @@ static BOOL check_delete_on_close(struct smbcli_state *cli, int fnum,
}
io.standard_info.level = RAW_FILEINFO_STANDARD_INFO;
- io.standard_info.file.fnum = fnum;
+ io.standard_info.in.file.fnum = fnum;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &io);
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source4/torture/basic/denytest.c b/source4/torture/basic/denytest.c
index 5715238fca..127df9052d 100644
--- a/source4/torture/basic/denytest.c
+++ b/source4/torture/basic/denytest.c
@@ -1851,7 +1851,7 @@ static BOOL torture_ntdenytest(struct smbcli_state *cli1, struct smbcli_state *c
/* we can't use smbcli_read() as we need to
set read_for_execute */
r.readx.level = RAW_READ_READX;
- r.readx.file.fnum = io2.ntcreatex.file.fnum;
+ r.readx.in.file.fnum = io2.ntcreatex.out.file.fnum;
r.readx.in.offset = 0;
r.readx.in.mincnt = sizeof(buf);
r.readx.in.maxcnt = sizeof(buf);
@@ -1864,17 +1864,17 @@ static BOOL torture_ntdenytest(struct smbcli_state *cli1, struct smbcli_state *c
if (NT_STATUS_IS_OK(status)) {
res += A_R;
}
- if (smbcli_write(cli2->tree,
- io2.ntcreatex.file.fnum, 0, buf, 0, sizeof(buf)) >= 1) {
+ if (smbcli_write(cli2->tree, io2.ntcreatex.out.file.fnum,
+ 0, buf, 0, sizeof(buf)) >= 1) {
res += A_W;
}
}
if (NT_STATUS_IS_OK(status1)) {
- smbcli_close(cli1->tree, io1.ntcreatex.file.fnum);
+ smbcli_close(cli1->tree, io1.ntcreatex.out.file.fnum);
}
if (NT_STATUS_IS_OK(status2)) {
- smbcli_close(cli2->tree, io2.ntcreatex.file.fnum);
+ smbcli_close(cli2->tree, io2.ntcreatex.out.file.fnum);
}
status2_p = predict_share_conflict(io1.ntcreatex.in.share_access,
@@ -2014,28 +2014,28 @@ BOOL torture_denydos_sharing(void)
printf("openx twice with RDWR/DENY_DOS\n");
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum1 = io.openx.file.fnum;
+ fnum1 = io.openx.out.file.fnum;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.openx.file.fnum;
+ fnum2 = io.openx.out.file.fnum;
printf("fnum1=%d fnum2=%d\n", fnum1, fnum2);
sfinfo.generic.level = RAW_SFILEINFO_POSITION_INFORMATION;
- sfinfo.position_information.file.fnum = fnum1;
+ sfinfo.position_information.in.file.fnum = fnum1;
sfinfo.position_information.in.position = 1000;
status = smb_raw_setfileinfo(cli->tree, &sfinfo);
CHECK_STATUS(status, NT_STATUS_OK);
printf("two handles should be same file handle\n");
finfo.position_information.level = RAW_FILEINFO_POSITION_INFORMATION;
- finfo.position_information.file.fnum = fnum1;
+ finfo.position_information.in.file.fnum = fnum1;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(finfo.position_information.out.position, 1000);
- finfo.position_information.file.fnum = fnum2;
+ finfo.position_information.in.file.fnum = fnum2;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(finfo.position_information.out.position, 1000);
@@ -2048,29 +2048,29 @@ BOOL torture_denydos_sharing(void)
io.openx.in.open_mode = OPENX_MODE_ACCESS_RDWR | OPENX_MODE_DENY_NONE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum1 = io.openx.file.fnum;
+ fnum1 = io.openx.out.file.fnum;
io.openx.in.open_func = OPENX_OPEN_FUNC_OPEN;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.openx.file.fnum;
+ fnum2 = io.openx.out.file.fnum;
printf("fnum1=%d fnum2=%d\n", fnum1, fnum2);
printf("two handles should be separate\n");
sfinfo.generic.level = RAW_SFILEINFO_POSITION_INFORMATION;
- sfinfo.position_information.file.fnum = fnum1;
+ sfinfo.position_information.in.file.fnum = fnum1;
sfinfo.position_information.in.position = 1000;
status = smb_raw_setfileinfo(cli->tree, &sfinfo);
CHECK_STATUS(status, NT_STATUS_OK);
finfo.position_information.level = RAW_FILEINFO_POSITION_INFORMATION;
- finfo.position_information.file.fnum = fnum1;
+ finfo.position_information.in.file.fnum = fnum1;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(finfo.position_information.out.position, 1000);
- finfo.position_information.file.fnum = fnum2;
+ finfo.position_information.in.file.fnum = fnum2;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(finfo.position_information.out.position, 0);
diff --git a/source4/torture/basic/disconnect.c b/source4/torture/basic/disconnect.c
index 8ad11ccb6c..bc892120e3 100644
--- a/source4/torture/basic/disconnect.c
+++ b/source4/torture/basic/disconnect.c
@@ -96,7 +96,7 @@ static BOOL test_disconnect_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
io.lockx.level = RAW_LOCK_LOCKX;
- io.lockx.file.fnum = fnum;
+ io.lockx.in.file.fnum = fnum;
io.lockx.in.mode = 0;
io.lockx.in.timeout = 0;
io.lockx.in.lock_cnt = 1;