summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-10-26 17:16:37 -0700
committerTim Prouty <tprouty@samba.org>2009-12-07 16:52:15 -0800
commit6bc8a2bf0a180c86c12f6ce9a587ab869ee91e2d (patch)
tree1091c3d7557727fb2a1f2b15d85f6f22780e7f45
parentcd72301efa13f5c77a6d0e3e8f25330fbe62ed41 (diff)
downloadsamba-6bc8a2bf0a180c86c12f6ce9a587ab869ee91e2d.tar.gz
samba-6bc8a2bf0a180c86c12f6ce9a587ab869ee91e2d.tar.bz2
samba-6bc8a2bf0a180c86c12f6ce9a587ab869ee91e2d.zip
s4 torture: Update RAW-RENAME to pass against win7
-rw-r--r--source4/torture/raw/rename.c32
1 files changed, 27 insertions, 5 deletions
diff --git a/source4/torture/raw/rename.c b/source4/torture/raw/rename.c
index 28def7bd85..7c9d15b534 100644
--- a/source4/torture/raw/rename.c
+++ b/source4/torture/raw/rename.c
@@ -426,15 +426,27 @@ static bool test_ntrename(struct torture_context *tctx,
io.ntrename.in.attrib = 0;
io.ntrename.in.flags = 0;
status = smb_raw_rename(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED);
+ if (TARGET_IS_WIN7(tctx)) {
+ CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER);
+ } else {
+ CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED);
+ }
io.ntrename.in.flags = 300;
status = smb_raw_rename(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED);
+ if (TARGET_IS_WIN7(tctx)) {
+ CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER);
+ } else {
+ CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED);
+ }
io.ntrename.in.flags = 0x106;
status = smb_raw_rename(cli->tree, &io);
- CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED);
+ if (TARGET_IS_WIN7(tctx)) {
+ CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER);
+ } else {
+ CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED);
+ }
torture_comment(tctx, "Checking unknown field\n");
io.ntrename.in.old_name = fname1;
@@ -505,8 +517,18 @@ static bool test_ntrename(struct torture_context *tctx,
io.ntrename.in.attrib = 0;
io.ntrename.in.cluster_size = 0;
status = smb_raw_rename(cli->tree, &io);
- if (!NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) {
- torture_warning(tctx, "flags=0x%x status=%s\n", i, nt_errstr(status));
+ if (TARGET_IS_WIN7(tctx)){
+ if (!NT_STATUS_EQUAL(status,
+ NT_STATUS_INVALID_PARAMETER)) {
+ torture_warning(tctx, "flags=0x%x status=%s\n",
+ i, nt_errstr(status));
+ }
+ } else {
+ if (!NT_STATUS_EQUAL(status,
+ NT_STATUS_ACCESS_DENIED)) {
+ torture_warning(tctx, "flags=0x%x status=%s\n",
+ i, nt_errstr(status));
+ }
}
}