diff options
Diffstat (limited to 'source4/torture/raw/unlink.c')
-rw-r--r-- | source4/torture/raw/unlink.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/source4/torture/raw/unlink.c b/source4/torture/raw/unlink.c index 9d6b1a0fef..9c408105df 100644 --- a/source4/torture/raw/unlink.c +++ b/source4/torture/raw/unlink.c @@ -95,6 +95,11 @@ static BOOL test_unlink(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) status = smb_raw_unlink(cli->tree, &io); CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_SYNTAX_BAD); + io.in.pattern = BASEDIR "\\..\\.."; + io.in.attrib = 0; + status = smb_raw_unlink(cli->tree, &io); + CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_SYNTAX_BAD); + io.in.pattern = BASEDIR "\\.."; io.in.attrib = 0; status = smb_raw_unlink(cli->tree, &io); @@ -107,11 +112,33 @@ static BOOL test_unlink(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) status = smb_raw_unlink(cli->tree, &io); CHECK_STATUS(status, NT_STATUS_NO_SUCH_FILE); + io.in.pattern = BASEDIR "\\z*"; + io.in.attrib = 0; + status = smb_raw_unlink(cli->tree, &io); + CHECK_STATUS(status, NT_STATUS_NO_SUCH_FILE); + + io.in.pattern = BASEDIR "\\z*"; + io.in.attrib = FILE_ATTRIBUTE_DIRECTORY; + status = smb_raw_unlink(cli->tree, &io); + CHECK_STATUS(status, NT_STATUS_NO_SUCH_FILE); + io.in.pattern = BASEDIR "\\*"; io.in.attrib = FILE_ATTRIBUTE_DIRECTORY; status = smb_raw_unlink(cli->tree, &io); CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID); + io.in.pattern = BASEDIR "\\?"; + io.in.attrib = FILE_ATTRIBUTE_DIRECTORY; + status = smb_raw_unlink(cli->tree, &io); + CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID); + + io.in.pattern = BASEDIR "\\t*"; + io.in.attrib = FILE_ATTRIBUTE_DIRECTORY; + status = smb_raw_unlink(cli->tree, &io); + CHECK_STATUS(status, NT_STATUS_OK); + + smbcli_close(cli->tree, smbcli_open(cli->tree, fname, O_RDWR|O_CREAT, DENY_NONE)); + io.in.pattern = BASEDIR "\\*.dat"; io.in.attrib = FILE_ATTRIBUTE_DIRECTORY; status = smb_raw_unlink(cli->tree, &io); |