summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-03-12 14:21:21 +0100
committerStefan Metzmacher <metze@samba.org>2008-03-12 14:23:30 +0100
commit6e9d25157d896763ea16520ba9cc44099b62ce72 (patch)
treee1989c366458748cd6f6699594ee450b7c057e8c
parent799cfe0d76c7d10979809db786be17d7fda875d0 (diff)
downloadsamba-6e9d25157d896763ea16520ba9cc44099b62ce72.tar.gz
samba-6e9d25157d896763ea16520ba9cc44099b62ce72.tar.xz
samba-6e9d25157d896763ea16520ba9cc44099b62ce72.zip
RAW-STREAMS: do what the comments say
metze (This used to be commit eb68a8ed4fa214ad2e858a7fbdf9b5376cda6e04)
-rw-r--r--source4/torture/raw/streams.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/torture/raw/streams.c b/source4/torture/raw/streams.c
index ca6b488af5a..b6680e081e6 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);