From 02bce09010f66422affc478a1d2fd7bc3d1d4b4b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 2 Mar 2005 18:19:32 +0000 Subject: r5623: Horrible band-aid patch to fix Blue-Arc torture tester. I know this isn't right but will work until I can refactor the deny mode code with the Samba4 algorithm. Jeremy. (This used to be commit f38f464c722a441402e2d6e2622bcce9227c33b5) --- source3/smbd/open.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 70632a20eb..fc4f97ad16 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -491,7 +491,13 @@ existing desired access (0x%x).\n", fname, (unsigned int)desired_access, (unsign unix_ERR_class = ERRDOS; unix_ERR_code = ERRbadshare; unix_ERR_ntstatus = NT_STATUS_SHARING_VIOLATION; + return False; + } + if (deny_mode == DENY_ALL || old_deny_mode == DENY_ALL) { + unix_ERR_class = ERRDOS; + unix_ERR_code = ERRbadshare; + unix_ERR_ntstatus = NT_STATUS_SHARING_VIOLATION; return False; } @@ -502,7 +508,7 @@ existing desired access (0x%x).\n", fname, (unsigned int)desired_access, (unsign if ( !(desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE)) || !(share->desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE)) ) { - DEBUG(5,("check_share_mode: Allowing open on file %s as desired access (0x%x) doesn't conflict with\ + DEBUG(5,("check_share_mode: Allowing open on file %s as desired access (0x%x) doesn't conflict with \ existing desired access (0x%x).\n", fname, (unsigned int)desired_access, (unsigned int)share->desired_access )); return True; } -- cgit