diff options
author | Jeremy Allison <jra@samba.org> | 2006-07-26 02:15:01 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:38:22 -0500 |
commit | f6aeba37ff3fbfb3b7d3ff5a3878348e0b3acc39 (patch) | |
tree | a7045d557970a9b593cd1fc48dd1f4a6a6f88dbe /source3/smbd | |
parent | f43522856bb4a6824447524c612a98fec1f991ef (diff) | |
download | samba-f6aeba37ff3fbfb3b7d3ff5a3878348e0b3acc39.tar.gz samba-f6aeba37ff3fbfb3b7d3ff5a3878348e0b3acc39.tar.bz2 samba-f6aeba37ff3fbfb3b7d3ff5a3878348e0b3acc39.zip |
r17248: Ensure we definately add the WRITE_DATA on O_TRUNC.
Jeremy.
(This used to be commit 8eed82d5d5ba34cc0a6b99b9d0df45eec5f788fa)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/open.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 95c70dff54..fd2f1ae54f 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1297,9 +1297,6 @@ NTSTATUS open_file_ntcreate(connection_struct *conn, /* This is a nasty hack - must fix... JRA. */ if (access_mask == MAXIMUM_ALLOWED_ACCESS) { open_access_mask = access_mask = FILE_GENERIC_ALL; - if (flags2 & O_TRUNC) { - open_access_mask |= FILE_WRITE_DATA; /* This will cause oplock breaks. */ - } } /* @@ -1309,6 +1306,10 @@ NTSTATUS open_file_ntcreate(connection_struct *conn, se_map_generic(&access_mask, &file_generic_mapping); open_access_mask = access_mask; + if (flags2 & O_TRUNC) { + open_access_mask |= FILE_WRITE_DATA; /* This will cause oplock breaks. */ + } + DEBUG(10, ("open_file_ntcreate: fname=%s, after mapping " "access_mask=0x%x\n", fname, access_mask )); |