From 7361c7a883646dd065eabf81e0b1dc60cc9d1f39 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 30 May 2006 18:17:37 +0000 Subject: r15958: Make us pass RAW-OPLOCK with kernel oplocks off. This allows a requestor to set FORCE_OPLOCK_BREAK_TO_NONE to ensure we don't break to level 2. Fixed a couple of resource leaks in error paths in open_file_ntcreatex. Jeremy. (This used to be commit c7c9adcce7f13d01445f31b07fb28a76f0a1d6df) --- source3/include/smb.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source3/include/smb.h') diff --git a/source3/include/smb.h b/source3/include/smb.h index f06c551cc0..41ffce1a15 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -1541,18 +1541,25 @@ extern int chain_size; /* * Bits we test with. + * Note these must fit into 16-bits. */ - + #define NO_OPLOCK 0 #define EXCLUSIVE_OPLOCK 1 #define BATCH_OPLOCK 2 #define LEVEL_II_OPLOCK 4 + +/* The following are Samba-private. */ #define INTERNAL_OPEN_ONLY 8 #define FAKE_LEVEL_II_OPLOCK 16 /* Client requested no_oplock, but we have to * inform potential level2 holders on * write. */ #define DEFERRED_OPEN_ENTRY 32 #define UNUSED_SHARE_MODE_ENTRY 64 +#define FORCE_OPLOCK_BREAK_TO_NONE 128 + +/* None of the following should ever appear in fsp->oplock_request. */ +#define SAMBA_PRIVATE_OPLOCK_MASK (INTERNAL_OPEN_ONLY|DEFERRED_OPEN_ENTRY|UNUSED_SHARE_MODE_ENTRY|FORCE_OPLOCK_BREAK_TO_NONE) #define EXCLUSIVE_OPLOCK_TYPE(lck) ((lck) & ((unsigned int)EXCLUSIVE_OPLOCK|(unsigned int)BATCH_OPLOCK)) #define BATCH_OPLOCK_TYPE(lck) ((lck) & (unsigned int)BATCH_OPLOCK) -- cgit