smbd: Slightly simplify open_mode_check()
authorVolker Lendecke <vl@samba.org>
Thu, 4 Jul 2019 11:55:41 +0000 (13:55 +0200)
committerRalph Boehme <slow@samba.org>
Mon, 8 Jul 2019 16:22:37 +0000 (16:22 +0000)
If there are no share modes, we'll just not enter the loop.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/open.c

index a598b3dd03f3d20939dd49f18dedf2c3ca046b8c..ef73aa219eae1464536bcfb92893b08698417f44 100644 (file)
@@ -1644,10 +1644,6 @@ static NTSTATUS open_mode_check(connection_struct *conn,
 {
        uint32_t i;
 
-       if(lck->data->num_share_modes == 0) {
-               return NT_STATUS_OK;
-       }
-
        if (is_stat_open(access_mask)) {
                /* Stat open that doesn't trigger oplock breaks or share mode
                 * checks... ! JRA. */