return True;
}
+
+#if defined(DEVELOPER)
+static void validate_my_share_entries(share_mode_entry *share_entry)
+{
+ files_struct *fsp;
+
+ if (share_entry->pid != sys_getpid())
+ return;
+
+ fsp = file_find_dif(share_entry->dev, share_entry->inode, share_entry->share_file_id);
+ if (!fsp) {
+ smb_panic("validate_my_share_entries: Cannot match a share entry with an open file\n");
+ }
+
+ if (((uint16)fsp->oplock_type) != share_entry->op_type) {
+ pstring str;
+ slprintf(str, sizeof(str)-1, "validate_my_share_entries: file %s, oplock_type = 0x%x, op_type = 0x%x\n",
+ fsp->fsp_name, (unsigned int)fsp->oplock_type, (unsigned int)share_entry->op_type );
+ smb_panic(str);
+ }
+}
+#endif
+
/****************************************************************************
Deal with open deny mode and oplock break processing.
Invarient: Share mode must be locked on entry and exit.
for(i = 0; i < num_share_modes; i++) {
share_mode_entry *share_entry = &old_shares[i];
+#if defined(DEVELOPER)
+ validate_my_share_entries(share_entry);
+#endif
+
/*
* By observation of NetBench, oplocks are broken *before* share
* modes are checked. This allows a file to be closed by the client