Author: jra Date: 2006-07-26 04:42:18 +0000 (Wed, 26 Jul 2006) New Revision: 17249
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17249 Log: Ensure we only set the FILE_WRITE_DATA on O_TRUNC in one place. Jeremy. Modified: branches/SAMBA_3_0/source/smbd/open.c branches/SAMBA_3_0_23/source/smbd/open.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/open.c =================================================================== --- branches/SAMBA_3_0/source/smbd/open.c 2006-07-26 02:15:01 UTC (rev 17248) +++ branches/SAMBA_3_0/source/smbd/open.c 2006-07-26 04:42:18 UTC (rev 17249) @@ -1212,14 +1212,12 @@ /* If file exists replace/overwrite. If file doesn't * exist create. */ flags2 |= (O_CREAT | O_TRUNC); - open_access_mask |= FILE_WRITE_DATA; /* This will cause oplock breaks. */ break; case FILE_OVERWRITE_IF: /* If file exists replace/overwrite. If file doesn't * exist create. */ flags2 |= (O_CREAT | O_TRUNC); - open_access_mask |= FILE_WRITE_DATA; /* This will cause oplock breaks. */ break; case FILE_OPEN: @@ -1244,7 +1242,6 @@ return NT_STATUS_OBJECT_NAME_NOT_FOUND; } flags2 |= O_TRUNC; - open_access_mask |= FILE_WRITE_DATA; /* This will cause oplock breaks. */ break; case FILE_CREATE: Modified: branches/SAMBA_3_0_23/source/smbd/open.c =================================================================== --- branches/SAMBA_3_0_23/source/smbd/open.c 2006-07-26 02:15:01 UTC (rev 17248) +++ branches/SAMBA_3_0_23/source/smbd/open.c 2006-07-26 04:42:18 UTC (rev 17249) @@ -1204,14 +1204,12 @@ /* If file exists replace/overwrite. If file doesn't * exist create. */ flags2 |= (O_CREAT | O_TRUNC); - open_access_mask |= FILE_WRITE_DATA; /* This will cause oplock breaks. */ break; case FILE_OVERWRITE_IF: /* If file exists replace/overwrite. If file doesn't * exist create. */ flags2 |= (O_CREAT | O_TRUNC); - open_access_mask |= FILE_WRITE_DATA; /* This will cause oplock breaks. */ break; case FILE_OPEN: @@ -1238,7 +1236,6 @@ return NULL; } flags2 |= O_TRUNC; - open_access_mask |= FILE_WRITE_DATA; /* This will cause oplock breaks. */ break; case FILE_CREATE: