From: Tim Prouty Date: Thu, 19 Feb 2009 06:51:27 +0000 (-0800) Subject: s4 torture: Add additional streams create disposition test X-Git-Tag: samba-4.0.0alpha7~139 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a2c4acf8631813889982f6059f17a1954308906;p=thirdparty%2Fsamba.git s4 torture: Add additional streams create disposition test --- diff --git a/source4/torture/raw/streams.c b/source4/torture/raw/streams.c index aff97d08ed6..6105fb230fc 100644 --- a/source4/torture/raw/streams.c +++ b/source4/torture/raw/streams.c @@ -1438,6 +1438,26 @@ static bool test_stream_create_disposition(struct torture_context *tctx, goto done; } + /* + * 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 */