summaryrefslogtreecommitdiff
path: root/source4/torture/raw/oplock.c
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/raw/oplock.c
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/raw/oplock.c')
-rw-r--r--source4/torture/raw/oplock.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c
index 3d804f8572..65a72818cf 100644
--- a/source4/torture/raw/oplock.c
+++ b/source4/torture/raw/oplock.c
@@ -88,7 +88,7 @@ static BOOL oplock_handler_close(struct smbcli_transport *transport, uint16_t ti
printf("Closing in oplock handler\n");
io.close.level = RAW_CLOSE_CLOSE;
- io.close.file.fnum = fnum;
+ io.close.in.file.fnum = fnum;
io.close.in.write_time = 0;
req = smb_raw_close_send(tree, &io);
if (req == NULL) {
@@ -141,7 +141,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, EXCLUSIVE_OPLOCK_RETURN);
printf("unlink it - should be no break\n");
@@ -164,7 +164,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
printf("unlink should generate a break\n");
@@ -188,7 +188,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
unl.unlink.in.pattern = fname;
@@ -212,11 +212,11 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
rd.read.level = RAW_READ_READ;
- rd.read.file.fnum = fnum;
+ rd.read.in.file.fnum = fnum;
rd.read.in.count = 1;
rd.read.in.offset = 0;
rd.read.in.remaining = 0;
@@ -235,7 +235,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
ZERO_STRUCT(break_info);
@@ -259,7 +259,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.file.fnum;
+ fnum2 = io.ntcreatex.out.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
ZERO_STRUCT(break_info);
@@ -269,7 +269,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
CHECK_VAL(break_info.count, 1);
@@ -288,7 +288,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
ZERO_STRUCT(break_info);
@@ -300,7 +300,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.access_mask = SEC_FILE_READ_ATTRIBUTE|SEC_FILE_WRITE_ATTRIBUTE|SEC_STD_SYNCHRONIZE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.file.fnum;
+ fnum2 = io.ntcreatex.out.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, NO_OPLOCK_RETURN);
CHECK_VAL(break_info.count, 0);
CHECK_VAL(break_info.fnum, 0);
@@ -319,7 +319,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_CREATE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
printf("Subsequent normal open should break oplock on attribute only open to level II\n");
@@ -334,7 +334,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.file.fnum;
+ fnum2 = io.ntcreatex.out.file.fnum;
CHECK_VAL(break_info.count, 1);
CHECK_VAL(break_info.fnum, fnum);
CHECK_VAL(break_info.failures, 0);
@@ -351,7 +351,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.file.fnum;
+ fnum2 = io.ntcreatex.out.file.fnum;
CHECK_VAL(break_info.count, 0);
CHECK_VAL(break_info.failures, 0);
CHECK_VAL(io.ntcreatex.out.oplock_level, LEVEL_II_OPLOCK_RETURN);
@@ -362,7 +362,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
{
union smb_write wr;
wr.write.level = RAW_WRITE_WRITE;
- wr.write.file.fnum = fnum2;
+ wr.write.in.file.fnum = fnum2;
wr.write.in.count = 1;
wr.write.in.offset = 0;
wr.write.in.remaining = 0;
@@ -379,7 +379,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
{
union smb_write wr;
wr.write.level = RAW_WRITE_WRITE;
- wr.write.file.fnum = fnum2;
+ wr.write.in.file.fnum = fnum2;
wr.write.in.count = 1;
wr.write.in.offset = 0;
wr.write.in.remaining = 0;
@@ -407,7 +407,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
CHECK_VAL(break_info.count, 0);
CHECK_VAL(break_info.fnum, 0);
CHECK_VAL(break_info.failures, 0);
@@ -423,7 +423,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.file.fnum;
+ fnum2 = io.ntcreatex.out.file.fnum;
CHECK_VAL(break_info.count, 0);
CHECK_VAL(break_info.fnum, 0);
CHECK_VAL(break_info.failures, 0);
@@ -433,7 +433,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
{
union smb_write wr;
wr.write.level = RAW_WRITE_WRITE;
- wr.write.file.fnum = fnum;
+ wr.write.in.file.fnum = fnum;
wr.write.in.count = 1;
wr.write.in.offset = 0;
wr.write.in.remaining = 0;
@@ -450,7 +450,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
{
union smb_write wr;
wr.write.level = RAW_WRITE_WRITE;
- wr.write.file.fnum = fnum;
+ wr.write.in.file.fnum = fnum;
wr.write.in.count = 1;
wr.write.in.offset = 0;
wr.write.in.remaining = 0;