summaryrefslogtreecommitdiff
path: root/source3
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
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')
-rw-r--r--source3/include/smb.h12
-rw-r--r--source3/torture/torture.c26
2 files changed, 28 insertions, 10 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 8ec092e623..f2d67b992f 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -74,12 +74,12 @@ typedef int BOOL;
#define DIR_STRUCT_SIZE 43
/* these define the attribute byte as seen by DOS */
-#define aRONLY (1L<<0)
-#define aHIDDEN (1L<<1)
-#define aSYSTEM (1L<<2)
-#define aVOLID (1L<<3)
-#define aDIR (1L<<4)
-#define aARCH (1L<<5)
+#define aRONLY (1L<<0) /* 0x01 */
+#define aHIDDEN (1L<<1) /* 0x02 */
+#define aSYSTEM (1L<<2) /* 0x04 */
+#define aVOLID (1L<<3) /* 0x08 */
+#define aDIR (1L<<4) /* 0x10 */
+#define aARCH (1L<<5) /* 0x20 */
/* deny modes */
#define DENY_DOS 0
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));