summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-05-07 15:23:29 +0200
committerJeremy Allison <jra@samba.org>2012-05-25 09:19:38 -0700
commit1b15d8b3da19c2f43f41632cd3e1fe20f5088bbb (patch)
treedb2b53431c82a2ad915e6e8081e53b8020177a29 /source3/smbd
parent6666de1975e596990cc7b031a89ce67000093987 (diff)
downloadsamba-1b15d8b3da19c2f43f41632cd3e1fe20f5088bbb.tar.gz
samba-1b15d8b3da19c2f43f41632cd3e1fe20f5088bbb.tar.bz2
samba-1b15d8b3da19c2f43f41632cd3e1fe20f5088bbb.zip
s3: Check for serverid_exists in find_oplock_types
Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/open.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 8a5273ef14..774b5fc938 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1128,6 +1128,10 @@ static void find_oplock_types(files_struct *fsp,
if (BATCH_OPLOCK_TYPE(lck->data->share_modes[i].op_type)) {
/* batch - can only be one. */
+ if (share_mode_stale_pid(lck->data, i)) {
+ DEBUG(10, ("Found stale batch oplock\n"));
+ continue;
+ }
if (*pp_ex_or_batch || *pp_batch || *got_level2 || *got_no_oplock) {
smb_panic("Bad batch oplock entry.");
}
@@ -1135,6 +1139,10 @@ static void find_oplock_types(files_struct *fsp,
}
if (EXCLUSIVE_OPLOCK_TYPE(lck->data->share_modes[i].op_type)) {
+ if (share_mode_stale_pid(lck->data, i)) {
+ DEBUG(10, ("Found stale duplicate oplock\n"));
+ continue;
+ }
/* Exclusive or batch - can only be one. */
if (*pp_ex_or_batch || *got_level2 || *got_no_oplock) {
smb_panic("Bad exclusive or batch oplock entry.");
@@ -1144,6 +1152,11 @@ static void find_oplock_types(files_struct *fsp,
if (LEVEL_II_OPLOCK_TYPE(lck->data->share_modes[i].op_type)) {
if (*pp_batch || *pp_ex_or_batch) {
+ if (share_mode_stale_pid(lck->data, i)) {
+ DEBUG(10, ("Found stale LevelII "
+ "oplock\n"));
+ continue;
+ }
smb_panic("Bad levelII oplock entry.");
}
*got_level2 = true;
@@ -1151,6 +1164,11 @@ static void find_oplock_types(files_struct *fsp,
if (lck->data->share_modes[i].op_type == NO_OPLOCK) {
if (*pp_batch || *pp_ex_or_batch) {
+ if (share_mode_stale_pid(lck->data, i)) {
+ DEBUG(10, ("Found stale NO_OPLOCK "
+ "entry\n"));
+ continue;
+ }
smb_panic("Bad no oplock entry.");
}
*got_no_oplock = true;