r17249: Ensure we only set the FILE_WRITE_DATA on O_TRUNC
authorJeremy Allison <jra@samba.org>
Wed, 26 Jul 2006 04:42:18 +0000 (04:42 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:38:22 +0000 (11:38 -0500)
in one place.
Jeremy.
(This used to be commit f326bae3e269046b6f087626240cddbb5dafb0e4)

source3/smbd/open.c

index fd2f1ae54f1993ce023ec8ad324e9a68a7f154b2..9bd4e36d5a8569744fe756d09f47e69c5e6b88d6 100644 (file)
@@ -1212,14 +1212,12 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
                        /* 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 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
                                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: