summaryrefslogtreecommitdiff
path: root/source4/torture/raw/streams.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-03-13 10:00:57 +1100
committerAndrew Bartlett <abartlet@samba.org>2008-03-13 10:00:57 +1100
commit3d9056aa863c8e1307709bcbbdbd3305e9bfe62f (patch)
tree49224fa1f8e5bc488e01f709015ed37be9b9d898 /source4/torture/raw/streams.c
parent07a7c8fa0d76cb7cb10cc88fb5bbe5439b746d01 (diff)
parent50243cdbbda8a1f14e56c684281a93614aab0103 (diff)
downloadsamba-3d9056aa863c8e1307709bcbbdbd3305e9bfe62f.tar.gz
samba-3d9056aa863c8e1307709bcbbdbd3305e9bfe62f.tar.bz2
samba-3d9056aa863c8e1307709bcbbdbd3305e9bfe62f.zip
Merge branch 'v4-0-test' of git://git.samba.org/samba into 4-0-local
(This used to be commit e9567e39106efb7443ed2c5df3492208b1c1d766)
Diffstat (limited to 'source4/torture/raw/streams.c')
-rw-r--r--source4/torture/raw/streams.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source4/torture/raw/streams.c b/source4/torture/raw/streams.c
index ca6b488af5..1dab36c28b 100644
--- a/source4/torture/raw/streams.c
+++ b/source4/torture/raw/streams.c
@@ -356,22 +356,24 @@ static bool test_stream_sharemodes(struct torture_context *tctx,
* A different stream does not give a sharing violation
*/
+ io.ntcreatex.in.fname = sname2;
+ status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum1 = io.ntcreatex.out.file.fnum;
+ fnum2 = io.ntcreatex.out.file.fnum;
/*
* ... whereas the same stream does with unchanged access/share_access
* flags
*/
+ io.ntcreatex.in.fname = sname1;
io.ntcreatex.in.open_disposition = 0;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_SHARING_VIOLATION);
io.ntcreatex.in.fname = sname2;
status = smb_raw_open(cli->tree, mem_ctx, &io);
- CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.out.file.fnum;
+ CHECK_STATUS(status, NT_STATUS_SHARING_VIOLATION);
done:
if (fnum1 != -1) smbcli_close(cli->tree, fnum1);
@@ -558,7 +560,9 @@ bool torture_raw_streams(struct torture_context *torture,
}
ret &= test_stream_io(torture, cli, torture);
+ smb_raw_exit(cli->session);
ret &= test_stream_sharemodes(torture, cli, torture);
+ smb_raw_exit(cli->session);
if (!torture_setting_bool(torture, "samba4", false)) {
ret &= test_stream_delete(torture, cli, torture);
}