summaryrefslogtreecommitdiff
path: root/source3/smbd/trans2.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-05-11 14:00:38 -0700
committerJeremy Allison <jra@samba.org>2010-05-11 14:00:38 -0700
commit4955ccfff52c18a37cf0ec6e547bb8da0f7269a2 (patch)
tree9754dd1c9bc3b54718887462326eea0d3368a4b8 /source3/smbd/trans2.c
parent454b0b3f20ee8bdf56a12930261391e06567169c (diff)
downloadsamba-4955ccfff52c18a37cf0ec6e547bb8da0f7269a2.tar.gz
samba-4955ccfff52c18a37cf0ec6e547bb8da0f7269a2.tar.bz2
samba-4955ccfff52c18a37cf0ec6e547bb8da0f7269a2.zip
Fix more SMB2-OPLOCK bugs. Only 3 more issues to address then we're good to go on this test.
Jeremy.
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r--source3/smbd/trans2.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 25ca3fd3ae..5d51a7fb90 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -5951,7 +5951,15 @@ static NTSTATUS smb2_file_rename_information(connection_struct *conn,
return status;
}
- if (fsp && fsp->base_fsp) {
+ /* Ok, this looks wrong to me, but appears to
+ * be how SMB2 renames work. CHECK WITH Microsoft !
+ * jra.
+ */
+ if (fsp->oplock_type != NO_OPLOCK) {
+ return NT_STATUS_SHARING_VIOLATION;
+ }
+
+ if (fsp->base_fsp) {
/* newname must be a stream name. */
if (newname[0] != ':') {
return NT_STATUS_NOT_SUPPORTED;