r4407: stricter checking of parameters on hard link creation in the RAW-RENAME test
authorAndrew Tridgell <tridge@samba.org>
Thu, 30 Dec 2004 05:48:32 +0000 (05:48 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:07:44 +0000 (13:07 -0500)
(This used to be commit b239589b00e673ae2d6254083cd324bc3b54bcdf)

source4/torture/raw/rename.c

index 9a41a25e64c095c85f644ec359b7fbe20689f89e..3d71790736610d4c93e860420ead4ad28127e96d 100644 (file)
@@ -268,6 +268,7 @@ static BOOL test_ntrename(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo);
        CHECK_STATUS(status, NT_STATUS_OK);
        CHECK_VALUE(finfo.all_info.out.nlink, 1);
+       CHECK_VALUE(finfo.all_info.out.attrib, FILE_ATTRIBUTE_NORMAL);
 
        printf("Checking copy\n");
        io.ntrename.in.old_name = fname1;
@@ -277,6 +278,13 @@ static BOOL test_ntrename(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        status = smb_raw_rename(cli->tree, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
 
+       finfo.generic.level = RAW_FILEINFO_ALL_INFO;
+       finfo.generic.in.fname = fname1;
+       status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo);
+       CHECK_STATUS(status, NT_STATUS_OK);
+       CHECK_VALUE(finfo.all_info.out.nlink, 1);
+       CHECK_VALUE(finfo.all_info.out.attrib, FILE_ATTRIBUTE_NORMAL);
+
        torture_set_file_attribute(cli->tree, fname1, FILE_ATTRIBUTE_SYSTEM);
 
        finfo.generic.level = RAW_FILEINFO_ALL_INFO;