smbd panic at find_oplock_types().
Jeremy Allison
jra at samba.org
Sat Sep 6 10:55:40 MDT 2014
On Sat, Sep 06, 2014 at 09:50:25AM -0700, Jeremy Allison wrote:
>
> INTERNAL_OPEN_ONLY is a synonym for req==NULL,
> and we probably can now just remove it as a
> flag ever passed into SMB_VFS_CREATE_FILE(),
> at least in master. It represents an open that
> is being done on behalf of the smbd to achieve
> another task, and not at the direct request of
> the client (which is why req == NULL).
Yeah, looking inside master in open_file_ntcreate()
we have:
if (req == NULL) {
/* Ensure req == NULL means INTERNAL_OPEN_ONLY */
SMB_ASSERT(((oplock_request & INTERNAL_OPEN_ONLY) != 0));
} else {
/* And req != NULL means no INTERNAL_OPEN_ONLY */
SMB_ASSERT(((oplock_request & INTERNAL_OPEN_ONLY) == 0));
}
so once we've fixed this we can add a patch
that removes all uses of INTERNAL_OPEN_ONLY
from all other files except open.c, and moves
this block of header:
/* The following are Samba-private. */
#define INTERNAL_OPEN_ONLY 0x8
/* #define FAKE_LEVEL_II_OPLOCK 0x10 */ /* Not used anymore */
/* Client requested no_oplock, but we have to
* inform potential level2 holders on
* write. */
/* #define DEFERRED_OPEN_ENTRY 0x20 */ /* Not used anymore */
/* #define UNUSED_SHARE_MODE_ENTRY 0x40 */ /* Not used anymore */
/* #define FORCE_OPLOCK_BREAK_TO_NONE 0x80 */ /* Not used anymore */
/* None of the following should ever appear in fsp->oplock_request. */
#define SAMBA_PRIVATE_OPLOCK_MASK (INTERNAL_OPEN_ONLY)
from smb.h into source3/smbd/open.c as it should
be an entirely private matter in the open code,
and never exposed in callers.
More information about the samba-technical
mailing list