summaryrefslogtreecommitdiff
path: root/source4/torture/raw
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/raw')
-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));
+ }
}
}