summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-26 05:33:23 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:43 -0500
commit3511e5e8061f0c563b076af165d1afb5ca3b2a78 (patch)
tree929a2d33892324cdfbc8e87e5c5e40340db31a7a
parent1f7fbaf4937405a654f4f2e63e35a43a1390eabc (diff)
downloadsamba-3511e5e8061f0c563b076af165d1afb5ca3b2a78.tar.gz
samba-3511e5e8061f0c563b076af165d1afb5ca3b2a78.tar.bz2
samba-3511e5e8061f0c563b076af165d1afb5ca3b2a78.zip
r3236: test a few more combinations in RAW-UNLINK
(This used to be commit 5b239ad57be93fabd50760b12878e32df53e939d)
-rw-r--r--source4/torture/raw/unlink.c27
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);