summaryrefslogtreecommitdiffstats
path: root/source3/smbd/smb2_create.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/smb2_create.c
parent454b0b3f20ee8bdf56a12930261391e06567169c (diff)
downloadsamba-4955ccfff52c18a37cf0ec6e547bb8da0f7269a2.tar.gz
samba-4955ccfff52c18a37cf0ec6e547bb8da0f7269a2.tar.xz
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/smb2_create.c')
-rw-r--r--source3/smbd/smb2_create.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index eb8b2c527b1..25e995c3bd1 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -52,7 +52,12 @@ static uint8_t map_samba_oplock_levels_to_smb2(int oplock_type)
return SMB2_OPLOCK_LEVEL_BATCH;
} else if (EXCLUSIVE_OPLOCK_TYPE(oplock_type)) {
return SMB2_OPLOCK_LEVEL_EXCLUSIVE;
- } else if (LEVEL_II_OPLOCK_TYPE(oplock_type)) {
+ } else if (oplock_type == LEVEL_II_OPLOCK) {
+ /*
+ * Don't use LEVEL_II_OPLOCK_TYPE here as
+ * this also includes FAKE_LEVEL_II_OPLOCKs
+ * which are internal only.
+ */
return SMB2_OPLOCK_LEVEL_II;
} else {
return SMB2_OPLOCK_LEVEL_NONE;