svn commit: samba r3152 - in branches/SAMBA_4_0/source/torture/basic: .

tridge at samba.org tridge at samba.org
Sun Oct 24 12:38:32 GMT 2004


Author: tridge
Date: 2004-10-24 12:38:32 +0000 (Sun, 24 Oct 2004)
New Revision: 3152

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/torture/basic&rev=3152&nolog=1

Log:
reformatted some of the delete test code



Modified:
   branches/SAMBA_4_0/source/torture/basic/delete.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/basic/delete.c
===================================================================
--- branches/SAMBA_4_0/source/torture/basic/delete.c	2004-10-24 11:50:24 UTC (rev 3151)
+++ branches/SAMBA_4_0/source/torture/basic/delete.c	2004-10-24 12:38:32 UTC (rev 3152)
@@ -227,11 +227,11 @@
 
 	/* 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 @@
 	}
 	
 	/* 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 @@
 		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 @@
 
 	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));



More information about the samba-cvs mailing list