Skip to content

Commit 8dd2e58

Browse files
Alexey Velichayshiysmfrench
authored andcommitted
ksmbd: remove redundant DACL check in smb_check_perm_dacl
A zero value of pdacl->num_aces is already handled at the start of smb_check_perm_dacl() so the second check is useless. Drop the unreachable code block, no functional impact intended. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Alexey Velichayshiy <a.velichayshiy@ispras.ru> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 0446356 commit 8dd2e58

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

fs/smb/server/smbacl.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,9 +1307,6 @@ int smb_check_perm_dacl(struct ksmbd_conn *conn, const struct path *path,
13071307
granted |= le32_to_cpu(ace->access_req);
13081308
ace = (struct smb_ace *)((char *)ace + le16_to_cpu(ace->size));
13091309
}
1310-
1311-
if (!pdacl->num_aces)
1312-
granted = GENERIC_ALL_FLAGS;
13131310
}
13141311

13151312
if (!uid)

0 commit comments

Comments
 (0)