summaryrefslogtreecommitdiff
path: root/source4/torture/basic
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-24 12:38:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:02:26 -0500
commite9381dfd707a7b7ff9faca6e12262a2b2f9f193a (patch)
treedaaba3d02ac9ff8acef232ac2e32bef06e1a27ec /source4/torture/basic
parent5a698367e1582876590cb553bf47e07aaa8f200a (diff)
downloadsamba-e9381dfd707a7b7ff9faca6e12262a2b2f9f193a.tar.gz
samba-e9381dfd707a7b7ff9faca6e12262a2b2f9f193a.tar.bz2
samba-e9381dfd707a7b7ff9faca6e12262a2b2f9f193a.zip
r3152: reformatted some of the delete test code
(This used to be commit d7b0dece6fbc2b5f8216b6a6a41e3db76b8627aa)
Diffstat (limited to 'source4/torture/basic')
-rw-r--r--source4/torture/basic/delete.c34
1 files changed, 22 insertions, 12 deletions
diff --git a/source4/torture/basic/delete.c b/source4/torture/basic/delete.c
index 1a469add8d..552da56420 100644
--- a/source4/torture/basic/delete.c
+++ b/source4/torture/basic/delete.c
@@ -227,11 +227,11 @@ BOOL torture_test_delete(int dummy)
/* This should succeed. */
fnum2 = smbcli_nt_create_full(cli1->tree, fname, 0, GENERIC_RIGHTS_FILE_READ,
- FILE_ATTRIBUTE_NORMAL,
- NTCREATEX_SHARE_ACCESS_READ |
- NTCREATEX_SHARE_ACCESS_WRITE |
- NTCREATEX_SHARE_ACCESS_DELETE,
- NTCREATEX_DISP_OPEN, 0, 0);
+ FILE_ATTRIBUTE_NORMAL,
+ NTCREATEX_SHARE_ACCESS_READ |
+ NTCREATEX_SHARE_ACCESS_WRITE |
+ NTCREATEX_SHARE_ACCESS_DELETE,
+ NTCREATEX_DISP_OPEN, 0, 0);
if (fnum2 == -1) {
printf("(%s) open - 2 of %s failed (%s)\n",
__location__, fname, smbcli_errstr(cli1->tree));
@@ -254,9 +254,11 @@ BOOL torture_test_delete(int dummy)
}
/* This should fail - no more opens once delete on close set. */
- fnum2 = smbcli_nt_create_full(cli1->tree, fname, 0, GENERIC_RIGHTS_FILE_READ,
- FILE_ATTRIBUTE_NORMAL, NTCREATEX_SHARE_ACCESS_READ|NTCREATEX_SHARE_ACCESS_WRITE|NTCREATEX_SHARE_ACCESS_DELETE,
- NTCREATEX_DISP_OPEN, 0, 0);
+ fnum2 = smbcli_nt_create_full(cli1->tree, fname, 0,
+ GENERIC_RIGHTS_FILE_READ,
+ FILE_ATTRIBUTE_NORMAL,
+ NTCREATEX_SHARE_ACCESS_READ|NTCREATEX_SHARE_ACCESS_WRITE|NTCREATEX_SHARE_ACCESS_DELETE,
+ NTCREATEX_DISP_OPEN, 0, 0);
if (fnum2 != -1) {
printf("(%s) open - 3 of %s succeeded ! Should have failed.\n",
__location__, fname );
@@ -461,8 +463,12 @@ BOOL torture_test_delete(int dummy)
printf("eighth delete on close test succeeded.\n");
/* This should fail - we need to set DELETE_ACCESS. */
- fnum1 = smbcli_nt_create_full(cli1->tree, fname, 0,SA_RIGHT_FILE_READ_DATA|SA_RIGHT_FILE_WRITE_DATA,
- FILE_ATTRIBUTE_NORMAL, NTCREATEX_SHARE_ACCESS_NONE, NTCREATEX_DISP_OVERWRITE_IF, NTCREATEX_OPTIONS_DELETE_ON_CLOSE, 0);
+ fnum1 = smbcli_nt_create_full(cli1->tree, fname, 0,
+ SA_RIGHT_FILE_READ_DATA|SA_RIGHT_FILE_WRITE_DATA,
+ FILE_ATTRIBUTE_NORMAL,
+ NTCREATEX_SHARE_ACCESS_NONE,
+ NTCREATEX_DISP_OVERWRITE_IF,
+ NTCREATEX_OPTIONS_DELETE_ON_CLOSE, 0);
if (fnum1 != -1) {
printf("(%s) open of %s succeeded should have failed!\n",
@@ -473,8 +479,12 @@ BOOL torture_test_delete(int dummy)
printf("ninth delete on close test succeeded.\n");
- fnum1 = smbcli_nt_create_full(cli1->tree, fname, 0, SA_RIGHT_FILE_READ_DATA|SA_RIGHT_FILE_WRITE_DATA|STD_RIGHT_DELETE_ACCESS,
- FILE_ATTRIBUTE_NORMAL, NTCREATEX_SHARE_ACCESS_NONE, NTCREATEX_DISP_OVERWRITE_IF, NTCREATEX_OPTIONS_DELETE_ON_CLOSE, 0);
+ fnum1 = smbcli_nt_create_full(cli1->tree, fname, 0,
+ SA_RIGHT_FILE_READ_DATA|SA_RIGHT_FILE_WRITE_DATA|STD_RIGHT_DELETE_ACCESS,
+ FILE_ATTRIBUTE_NORMAL,
+ NTCREATEX_SHARE_ACCESS_NONE,
+ NTCREATEX_DISP_OVERWRITE_IF,
+ NTCREATEX_OPTIONS_DELETE_ON_CLOSE, 0);
if (fnum1 == -1) {
printf("(%s) open of %s failed (%s)\n",
__location__, fname, smbcli_errstr(cli1->tree));