smbd: Refactor check_access()
authorVolker Lendecke <vl@samba.org>
Tue, 17 Nov 2015 13:57:50 +0000 (14:57 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 17 Nov 2015 18:53:24 +0000 (19:53 +0100)
This is a micro-patch to make the next ones just obvious

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/trans2.c

index e2e4c8047aedc12ac6adb1db97648a01a16c1beb..ec6d91bbd09f2e44657428b174ee3f428b20d182 100644 (file)
@@ -67,6 +67,7 @@ NTSTATUS check_access(connection_struct *conn,
                if (!(fsp->access_mask & access_mask)) {
                        return NT_STATUS_ACCESS_DENIED;
                }
+               return NT_STATUS_OK;
        } else {
                NTSTATUS status = smbd_check_access_rights(conn,
                                        smb_fname,
@@ -75,8 +76,8 @@ NTSTATUS check_access(connection_struct *conn,
                if (!NT_STATUS_IS_OK(status)) {
                        return status;
                }
+               return NT_STATUS_OK;
        }
-       return NT_STATUS_OK;
 }
 
 /********************************************************************