summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/torture/raw/samba3misc.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/source4/torture/raw/samba3misc.c b/source4/torture/raw/samba3misc.c
index 66462ca5b1..695abfbb8a 100644
--- a/source4/torture/raw/samba3misc.c
+++ b/source4/torture/raw/samba3misc.c
@@ -496,6 +496,22 @@ BOOL torture_samba3_badpath(struct torture_context *torture)
status = smbcli_setatr(cli_dos->tree, invname, 0, 0);
CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRbadfile));
+ status = smbcli_unlink(cli_nt->tree, invpath);
+ CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ status = smbcli_unlink(cli_dos->tree, invpath);
+ CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRbadpath));
+
+ /*
+ * W2k3 returns INVALID_PARAMETER for a wildcard unlink if the
+ * directory does not exist. They seem to use the t2ffirst, this also
+ * returns INVALID_PARAMETER under this condition.
+ */
+
+ status = smbcli_unlink(cli_nt->tree, "test.txt\\*.*");
+ CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER);
+ status = smbcli_unlink(cli_dos->tree, "test.txt\\*.*");
+ CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidparam));
+
/*
* reply_search returns STATUS_NO_MORE_FILES on invalid path
*/
@@ -622,11 +638,6 @@ BOOL torture_samba3_badpath(struct torture_context *torture)
#endif
}
- status = smbcli_unlink(cli_nt->tree, invpath);
- CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
- status = smbcli_unlink(cli_dos->tree, invpath);
- CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRbadpath));
-
status = smbcli_mkdir(cli_nt->tree, invpath);
CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_NOT_FOUND);
status = smbcli_mkdir(cli_dos->tree, invpath);