summaryrefslogtreecommitdiff
path: root/source4/torture/raw/streams.c
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-02-18 22:51:27 -0800
committerTim Prouty <tprouty@samba.org>2009-02-18 23:48:35 -0800
commit7a2c4acf8631813889982f6059f17a1954308906 (patch)
tree31c09111114c038801ea10786da5557363c14d72 /source4/torture/raw/streams.c
parent053e1873c5dd30e7bb3102692ba79e280034c392 (diff)
downloadsamba-7a2c4acf8631813889982f6059f17a1954308906.tar.gz
samba-7a2c4acf8631813889982f6059f17a1954308906.tar.bz2
samba-7a2c4acf8631813889982f6059f17a1954308906.zip
s4 torture: Add additional streams create disposition test
Diffstat (limited to 'source4/torture/raw/streams.c')
-rw-r--r--source4/torture/raw/streams.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source4/torture/raw/streams.c b/source4/torture/raw/streams.c
index aff97d08ed..6105fb230f 100644
--- a/source4/torture/raw/streams.c
+++ b/source4/torture/raw/streams.c
@@ -1439,6 +1439,26 @@ static bool test_stream_create_disposition(struct torture_context *tctx,
}
/*
+ * check ntcreatex overwrite_if on a stream.
+ */
+ printf("(%s) Checking ntcreatex disp: overwrite_if on stream\n",
+ __location__);
+ smbcli_unlink(cli->tree, fname);
+ if (!create_file_with_stream(tctx, cli, mem_ctx, fname,
+ fname_stream)) {
+ goto done;
+ }
+
+ io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OVERWRITE_IF;
+ io.ntcreatex.in.fname = fname_stream;
+ status = smb_raw_open(cli->tree, mem_ctx, &io);
+ CHECK_STATUS(status, NT_STATUS_OK);
+ smbcli_close(cli->tree, io.ntcreatex.out.file.fnum);
+ if (!check_stream_list(cli, fname, 2, &default_stream_name)) {
+ goto done;
+ }
+
+ /*
* check openx overwrite_if
*/
printf("(%s) Checking openx disp: overwrite_if\n", __location__);