summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-01-07 10:29:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:37:11 -0500
commit3bc9704ce0210ea86c916eacc1755f3d0308ff00 (patch)
tree4a0dd7c470ec8df53f20e23e1d8752722b752b17
parent2ed6f2927b10edc51e4ccb3d9796b25079354a80 (diff)
downloadsamba-3bc9704ce0210ea86c916eacc1755f3d0308ff00.tar.gz
samba-3bc9704ce0210ea86c916eacc1755f3d0308ff00.tar.bz2
samba-3bc9704ce0210ea86c916eacc1755f3d0308ff00.zip
r20595: W2k and XP don't always show the top directory as hidden, w2k3 does. I think
Samba should follow w2k3 in this respect. Volker (This used to be commit 6094ee9df5820cd26858e9c4eff5dfc7e60181ab)
-rw-r--r--source4/torture/raw/samba3misc.c40
1 files changed, 23 insertions, 17 deletions
diff --git a/source4/torture/raw/samba3misc.c b/source4/torture/raw/samba3misc.c
index 490b0c8cde..eea6fe2bc6 100644
--- a/source4/torture/raw/samba3misc.c
+++ b/source4/torture/raw/samba3misc.c
@@ -229,6 +229,8 @@ BOOL torture_samba3_badpath(struct torture_context *torture)
BOOL ret = True;
TALLOC_CTX *mem_ctx;
BOOL nt_status_support;
+ uint16_t attr;
+
if (!(mem_ctx = talloc_init("torture_samba3_badpath"))) {
d_printf("talloc_init failed\n");
@@ -385,8 +387,13 @@ BOOL torture_samba3_badpath(struct torture_context *torture)
status = smbcli_getatr(cli_dos->tree, "<\\bla", NULL, NULL, NULL);
CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
- {
- uint16_t attr;
+ if (lp_parm_bool(-1, "torture", "w2k3", False) ||
+ lp_parm_bool(-1, "torture", "samba3", False)) {
+
+ /*
+ * XP and w2k don't show this behaviour, but I think
+ * Samba3 should follow W2k3
+ */
status = smbcli_getatr(cli_nt->tree, "", &attr, NULL, NULL);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -397,22 +404,21 @@ BOOL torture_samba3_badpath(struct torture_context *torture)
|FILE_ATTRIBUTE_DIRECTORY);
ret = False;
}
-
- status = smbcli_setatr(cli_nt->tree, "",
- FILE_ATTRIBUTE_DIRECTORY, -1);
- CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED);
- status = smbcli_setatr(cli_dos->tree, "",
- FILE_ATTRIBUTE_DIRECTORY, -1);
- CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRnoaccess));
-
- status = smbcli_setatr(cli_nt->tree, ".",
- FILE_ATTRIBUTE_DIRECTORY, -1);
- CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
- status = smbcli_setatr(cli_dos->tree, ".",
- FILE_ATTRIBUTE_DIRECTORY, -1);
- CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
}
-
+
+ status = smbcli_setatr(cli_nt->tree, "",
+ FILE_ATTRIBUTE_DIRECTORY, -1);
+ CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED);
+ status = smbcli_setatr(cli_dos->tree, "",
+ FILE_ATTRIBUTE_DIRECTORY, -1);
+ CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRnoaccess));
+
+ status = smbcli_setatr(cli_nt->tree, ".",
+ FILE_ATTRIBUTE_DIRECTORY, -1);
+ CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
+ status = smbcli_setatr(cli_dos->tree, ".",
+ FILE_ATTRIBUTE_DIRECTORY, -1);
+ CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS, ERRinvalidname));
/* Try the same set with openX. */