summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-02-26 12:52:46 +0100
committerStefan Metzmacher <metze@samba.org>2008-02-26 13:53:33 +0100
commit2b94ffe5e7303c1d321b9a9c6a612f77f1ac58b2 (patch)
treea784d3bb8ba969f443614aae82123a6603cc0cbd /source4/ntvfs
parent55377f0352d73fa354e8abcf3e644c63c78d0ca6 (diff)
downloadsamba-2b94ffe5e7303c1d321b9a9c6a612f77f1ac58b2.tar.gz
samba-2b94ffe5e7303c1d321b9a9c6a612f77f1ac58b2.tar.bz2
samba-2b94ffe5e7303c1d321b9a9c6a612f77f1ac58b2.zip
opendb_tdb: with break_to_none attribute only opens also break oplocks
metze (This used to be commit c475353e34154eb13e35cc8b6cf553e3986f8677)
Diffstat (limited to 'source4/ntvfs')
-rw-r--r--source4/ntvfs/common/opendb_tdb.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source4/ntvfs/common/opendb_tdb.c b/source4/ntvfs/common/opendb_tdb.c
index 73c04b7c4f..fe5a0a8864 100644
--- a/source4/ntvfs/common/opendb_tdb.c
+++ b/source4/ntvfs/common/opendb_tdb.c
@@ -288,7 +288,8 @@ static NTSTATUS odb_oplock_break_send(struct odb_context *odb,
}
static bool access_attributes_only(uint32_t access_mask,
- uint32_t open_disposition)
+ uint32_t open_disposition,
+ bool break_to_none)
{
switch (open_disposition) {
case NTCREATEX_DISP_SUPERSEDE:
@@ -298,6 +299,11 @@ static bool access_attributes_only(uint32_t access_mask,
default:
break;
}
+
+ if (break_to_none) {
+ return false;
+ }
+
#define CHECK_MASK(m,g) ((m) && (((m) & ~(g))==0) && (((m) & (g)) != 0))
return CHECK_MASK(access_mask,
SEC_STD_SYNCHRONIZE |
@@ -326,7 +332,8 @@ static NTSTATUS odb_tdb_open_can_internal(struct odb_context *odb,
* but we'll not grant the oplock below
*/
attrs_only = access_attributes_only(access_mask,
- open_disposition);
+ open_disposition,
+ break_to_none);
if (attrs_only) {
break;
}