s3: Be less picky on stale share mode entries
authorVolker Lendecke <vl@samba.org>
Mon, 14 May 2012 12:57:34 +0000 (14:57 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 25 May 2012 16:19:38 +0000 (09:19 -0700)
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>
source3/locking/locking.c

index 45074f408677832e2983e4801c403f5795ea79e4..00a46fa6190e1b1ef8567e1c18c8dc87b2dd6ee6 100644 (file)
@@ -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);
 }