s4 torture: RAW-STREAMS-NAMES Make sure the create time of the streams are different...
authorTim Prouty <tprouty@samba.org>
Thu, 17 Dec 2009 21:42:24 +0000 (13:42 -0800)
committerTim Prouty <tprouty@samba.org>
Fri, 18 Dec 2009 02:13:54 +0000 (18:13 -0800)
source4/torture/raw/streams.c

index 6e5479d9677731fc520b4e21e1d8abc90f7c490c..79cacffe10b10f12fe40c74ca93c22c67a031a85 100644 (file)
@@ -704,6 +704,30 @@ static bool test_stream_names(struct torture_context *tctx,
        snamer2 = talloc_asprintf(tctx, "%s:%s:$DATA", fname, "AfterRename");
 
        printf("(%s) testing stream names\n", __location__);
+       io.generic.level = RAW_OPEN_NTCREATEX;
+       io.ntcreatex.in.root_fid.fnum = 0;
+       io.ntcreatex.in.flags = 0;
+       io.ntcreatex.in.access_mask = SEC_FILE_WRITE_DATA;
+       io.ntcreatex.in.create_options = 0;
+       io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
+       io.ntcreatex.in.share_access = 0;
+       io.ntcreatex.in.alloc_size = 0;
+       io.ntcreatex.in.open_disposition = NTCREATEX_DISP_CREATE;
+       io.ntcreatex.in.impersonation = NTCREATEX_IMPERSONATION_ANONYMOUS;
+       io.ntcreatex.in.security_flags = 0;
+       io.ntcreatex.in.fname = fname;
+
+       status = smb_raw_open(cli->tree, tctx, &io);
+       CHECK_STATUS(status, NT_STATUS_OK);
+       fnum1 = io.ntcreatex.out.file.fnum;
+
+       /*
+        * Make sure the create time of the streams are different from the
+        * base file.
+        */
+       sleep(2);
+       smbcli_close(cli->tree, fnum1);
+
        io.generic.level = RAW_OPEN_NTCREATEX;
        io.ntcreatex.in.root_fid.fnum = 0;
        io.ntcreatex.in.flags = 0;