From 57c07e27853442e95e19c7f746ef1f4681bda48a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 30 Jun 2004 01:35:01 +0000 Subject: r1304: Turns out non-io opens that cause oplock breaks are a *different* set of desired access flags from those that cause sharing violations. Oplock breaks are caused by : ~(SYNCHRONIZE_ACCESS|FILE_READ_ATTRIBUTES|FILE_WRITE_ATTRIBUTES) Sharing violations are caused by : ~(SYNCHRONIZE_ACCESS|READ_CONTROL_ACCESS|FILE_READ_ATTRIBUTES|FILE_WRITE_ATTRIBUTES) We now pass the torture rename test again. I still need to work out if subsequent opens will cause sharing violations with an existing open mode of SYNCHRONIZE_ACCESS|READ_CONTROL_ACCESS|FILE_READ_ATTRIBUTES|FILE_WRITE_ATTRIBUTES; Jeremy. (This used to be commit 38002bfc1c0981a2dba3f2319624c1ef055a3648) --- source3/smbd/open.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/smbd/open.c') diff --git a/source3/smbd/open.c b/source3/smbd/open.c index d38d94e5aa..65500c65ce 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -381,13 +381,13 @@ static BOOL check_share_mode(connection_struct *conn, share_mode_entry *share, i if(!lp_share_modes(SNUM(conn))) return True; - if (desired_access & ~(SYNCHRONIZE_ACCESS|FILE_READ_ATTRIBUTES|FILE_WRITE_ATTRIBUTES)) { + if (desired_access & ~(SYNCHRONIZE_ACCESS|READ_CONTROL_ACCESS|FILE_READ_ATTRIBUTES|FILE_WRITE_ATTRIBUTES)) { non_io_open_request = False; } else { non_io_open_request = True; } - if (share->desired_access & ~(SYNCHRONIZE_ACCESS|FILE_READ_ATTRIBUTES|FILE_WRITE_ATTRIBUTES)) { + if (share->desired_access & ~(SYNCHRONIZE_ACCESS|READ_CONTROL_ACCESS|FILE_READ_ATTRIBUTES|FILE_WRITE_ATTRIBUTES)) { non_io_open_existing = False; } else { non_io_open_existing = True; -- cgit