summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-08-09 16:11:08 +0200
committerMichael Adam <obnox@samba.org>2012-08-09 16:22:50 +0200
commitdb160bf5100b7c8bd7a1712c76354b30cd7c4925 (patch)
tree012f70499806156d90e709a08e58362e0bdc367c /source3/torture
parent2e53fb109f36faa8781ce92b8171d8dd0f4f971f (diff)
downloadsamba-db160bf5100b7c8bd7a1712c76354b30cd7c4925.tar.gz
samba-db160bf5100b7c8bd7a1712c76354b30cd7c4925.tar.bz2
samba-db160bf5100b7c8bd7a1712c76354b30cd7c4925.zip
s3:torture:delete: fix 11th test to work against windows
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/torture.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 8324db2ecd..e0570c5dc6 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -4259,8 +4259,7 @@ static bool run_deletetest(int dummy)
cli_setatr(cli1, fname, 0, 0);
cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN);
- /* What error do we get when attempting to open a read-only file with
- delete access ? */
+ /* Can we open a read-only file with delete access? */
/* Create a readonly file. */
status = cli_ntcreate(cli1, fname, 0, FILE_READ_DATA|FILE_WRITE_DATA,
@@ -4282,16 +4281,14 @@ static bool run_deletetest(int dummy)
FILE_READ_ATTRIBUTES|DELETE_ACCESS,
0,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
- if (NT_STATUS_IS_OK(status)) {
- printf("[11] open of %s succeeded should have been denied with ACCESS_DENIED!\n", fname);
- cli_close(cli1, fnum1);
- goto fail;
- } else if (!NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) {
- printf("[11] open of %s should have been denied with ACCESS_DENIED! Got error %s\n", fname, nt_errstr(status));
+ FILE_OPEN, 0, 0, &fnum1);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("[11] open of %s failed: %s\n", fname, nt_errstr(status));
goto fail;
}
+ cli_close(cli1, fnum1);
+
printf("eleventh delete on close test succeeded.\n");
printf("finished delete test\n");