From 3511e5e8061f0c563b076af165d1afb5ca3b2a78 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 26 Oct 2004 05:33:23 +0000 Subject: r3236: test a few more combinations in RAW-UNLINK (This used to be commit 5b239ad57be93fabd50760b12878e32df53e939d) --- source4/torture/raw/unlink.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'source4/torture') 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); -- cgit