summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-03-07 02:16:25 +0000
committerJeremy Allison <jra@samba.org>2002-03-07 02:16:25 +0000
commit0876fb4113e17c772561c84d7fb09cbec4a66c82 (patch)
treeb386c2ab84894c134af4e12e4476cf11857760cd /source3/torture
parent43ca6e3ef80f89a0e188a6aa86c6979e01804af2 (diff)
downloadsamba-0876fb4113e17c772561c84d7fb09cbec4a66c82.tar.gz
samba-0876fb4113e17c772561c84d7fb09cbec4a66c82.tar.bz2
samba-0876fb4113e17c772561c84d7fb09cbec4a66c82.zip
Change xcopy test to use defined constants rather than magic hex
values so we can see what's going on. Jeremy. (This used to be commit 5ba4ba36339269b2059da7c103e63ecd948f7938)
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/torture.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 3c20a2896a..e0da287c38 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -2632,6 +2632,24 @@ static BOOL run_deletetest(int dummy)
return correct;
}
+/* FIRST_DESIRED_ACCESS 0xf019f */
+#define FIRST_DESIRED_ACCESS FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|\
+ FILE_READ_EA| /* 0xf */ \
+ FILE_WRITE_EA|FILE_READ_ATTRIBUTES| /* 0x90 */ \
+ FILE_WRITE_ATTRIBUTES| /* 0x100 */ \
+ DELETE_ACCESS|READ_CONTROL_ACCESS|\
+ WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS /* 0xf0000 */
+/* SECOND_DESIRED_ACCESS 0xe0080 */
+#define SECOND_DESIRED_ACCESS FILE_READ_ATTRIBUTES| /* 0x80 */ \
+ READ_CONTROL_ACCESS|WRITE_DAC_ACCESS|\
+ WRITE_OWNER_ACCESS /* 0xe0000 */
+
+#if 0
+#define THIRD_DESIRED_ACCESS FILE_READ_ATTRIBUTES| /* 0x80 */ \
+ READ_CONTROL_ACCESS|WRITE_DAC_ACCESS|\
+ FILE_READ_DATA|\
+ WRITE_OWNER_ACCESS /* */
+#endif
/*
Test ntcreate calls made by xcopy
@@ -2650,8 +2668,8 @@ static BOOL run_xcopy(int dummy)
}
fnum1 = cli_nt_create_full(&cli1, fname,
- 0xf019f, 0x20,
- 0, 5,
+ FIRST_DESIRED_ACCESS, FILE_ATTRIBUTE_ARCHIVE,
+ FILE_SHARE_NONE, FILE_OVERWRITE_IF,
0x4044);
if (fnum1 == -1) {
@@ -2660,8 +2678,8 @@ static BOOL run_xcopy(int dummy)
}
fnum2 = cli_nt_create_full(&cli1, fname,
- 0xe0080, 0,
- 0x7, 1,
+ SECOND_DESIRED_ACCESS, 0,
+ FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, FILE_OPEN,
0x200000);
if (fnum2 == -1) {
printf("second open failed - %s\n", cli_errstr(&cli1));