summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-05-14 14:57:34 +0200
committerJeremy Allison <jra@samba.org>2012-05-25 09:19:38 -0700
commitbc3b7d76a8ea1b96668163af9379ba4be3771466 (patch)
tree193b5fdef1cf8d7ca86912d3691f535bebb0c8f2 /source3/locking
parent1b15d8b3da19c2f43f41632cd3e1fe20f5088bbb (diff)
downloadsamba-bc3b7d76a8ea1b96668163af9379ba4be3771466.tar.gz
samba-bc3b7d76a8ea1b96668163af9379ba4be3771466.tar.bz2
samba-bc3b7d76a8ea1b96668163af9379ba4be3771466.zip
s3: Be less picky on stale share mode entries
If a process died, the share mode entry might be bogus. Ignore those entries. Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/locking.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 45074f4086..00a46fa619 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -620,7 +620,9 @@ bool is_valid_share_mode_entry(const struct share_mode_entry *e)
num_props += (EXCLUSIVE_OPLOCK_TYPE(e->op_type) ? 1 : 0);
num_props += (LEVEL_II_OPLOCK_TYPE(e->op_type) ? 1 : 0);
- SMB_ASSERT(num_props <= 1);
+ if (serverid_exists(&e->pid) && (num_props > 1)) {
+ smb_panic("Invalid share mode entry");
+ }
return (num_props != 0);
}