diff options
author | Volker Lendecke <vl@samba.org> | 2012-05-16 16:51:26 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2012-05-17 13:17:22 -0700 |
commit | 49237b0cef181f51dc584c8f2b0a718c5a6a97e5 (patch) | |
tree | d03657a453276c47727c34e217a1008c41b33771 /source3/smbd | |
parent | e34b7306fc421741727f20275b9dd4878906ba05 (diff) | |
download | samba-49237b0cef181f51dc584c8f2b0a718c5a6a97e5.tar.gz samba-49237b0cef181f51dc584c8f2b0a718c5a6a97e5.tar.bz2 samba-49237b0cef181f51dc584c8f2b0a718c5a6a97e5.zip |
s3: Check for serverid_exists in find_oplock_types
Signed-off-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/open.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 8a5273ef14..f0e523dc77 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1128,6 +1128,11 @@ 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, ("find_oplock_types: 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 +1140,11 @@ 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, ("find_oplock_types: 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 +1154,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, ("find_oplock_types: Found " + "stale LevelII oplock\n")); + continue; + } smb_panic("Bad levelII oplock entry."); } *got_level2 = true; @@ -1151,6 +1166,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, ("find_oplock_types: Found " + "stale NO_OPLOCK entry\n")); + continue; + } smb_panic("Bad no oplock entry."); } *got_no_oplock = true; |