]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r5623: Horrible band-aid patch to fix Blue-Arc torture tester.
authorJeremy Allison <jra@samba.org>
Wed, 2 Mar 2005 18:19:32 +0000 (18:19 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:55:51 +0000 (10:55 -0500)
I know this isn't right but will work until I can refactor
the deny mode code with the Samba4 algorithm.
Jeremy.

source/smbd/open.c

index 70632a20eb71d3c806079d93fbda46d1da0c3c19..fc4f97ad16d929516c8a892a972542ce2d9a0f79 100644 (file)
@@ -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;
        }