The call to share_mode_have_entries() was put in before
fresh_share_mode_lock() initialized d->flags to be completely
permissive. With that correct initialization the call to
share_conflict() a few lines down will also make open_mode_check()
pass for any share_access/access_mask.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
uint32_t share_access)
{
struct open_mode_check_state state;
- bool ok, conflict, have_share_entries;
+ bool ok, conflict;
bool modified = false;
if (is_oplock_stat_open(access_mask)) {
}
#endif
- have_share_entries = share_mode_have_entries(lck);
- if (!have_share_entries) {
- /*
- * This is a fresh share mode lock where no conflicts
- * can happen.
- */
- return NT_STATUS_OK;
- }
-
share_mode_flags_get(
lck, &state.access_mask, &state.share_access, NULL);