summaryrefslogtreecommitdiff
path: root/source3/smbd/nttrans.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-05-30 05:08:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:17:14 -0500
commit41f139c0bbe02ac4abe15d1e540fe9bff8cff5a5 (patch)
tree69b6506dd34e80455baa7ab6e72647d77b4c4644 /source3/smbd/nttrans.c
parent0a1ca7fa3d19f46c4bcb0c80c78a619c90fe5f2a (diff)
downloadsamba-41f139c0bbe02ac4abe15d1e540fe9bff8cff5a5.tar.gz
samba-41f139c0bbe02ac4abe15d1e540fe9bff8cff5a5.tar.bz2
samba-41f139c0bbe02ac4abe15d1e540fe9bff8cff5a5.zip
r15949: Patch for bug #3308 to stop us returning duplicate
mid replies on path based set-eof trans2 calls. Needs modification for HEAD (as in head open_file_ntcreateX properly returns NTSTATUS - I'll fix this tomorrow my time). Secondly it still fails the Samba4 RAW-OPLOCK smbtorture because of an interesting case. Our oplock code always returns "break to level 2" if it can. In this case (path-based set-eof or set-allocation size on an exclusive oplocked file) W2K3 always sends a break-to-none. We send the break to none (from level2) after we've done the write for eof or allocation size. I need to work out some way of telling our break code to always break to none (might need to extend the message field). Jeremy. (This used to be commit ad9895c654f400e242adcd4099f7cd004521ee92)
Diffstat (limited to 'source3/smbd/nttrans.c')
-rw-r--r--source3/smbd/nttrans.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index e2a2543e30..5d19d496fd 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -1652,11 +1652,11 @@ static NTSTATUS copy_internals(connection_struct *conn, char *oldname, char *new
fsp1 = open_file_ntcreate(conn,oldname,&sbuf1,
FILE_READ_DATA, /* Read-only. */
- 0, /* No sharing. */
+ FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
FILE_OPEN,
0, /* No create options. */
FILE_ATTRIBUTE_NORMAL,
- INTERNAL_OPEN_ONLY,
+ NO_OPLOCK,
&info);
if (!fsp1) {
@@ -1669,12 +1669,12 @@ static NTSTATUS copy_internals(connection_struct *conn, char *oldname, char *new
}
fsp2 = open_file_ntcreate(conn,newname,&sbuf2,
- FILE_WRITE_DATA, /* Read-only. */
- 0, /* No sharing. */
+ FILE_WRITE_DATA, /* Write-only. */
+ FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
FILE_CREATE,
0, /* No create options. */
fattr,
- INTERNAL_OPEN_ONLY,
+ NO_OPLOCK,
&info);
if (!fsp2) {