Skip to content

Commit 7d06324

Browse files
Alexey Velichayshiynamjaejeon
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> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
1 parent aa0be2e commit 7d06324

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

smbacl.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,9 +1454,6 @@ int smb_check_perm_dacl(struct ksmbd_conn *conn, const struct path *path,
14541454
granted |= le32_to_cpu(ace->access_req);
14551455
ace = (struct smb_ace *)((char *)ace + le16_to_cpu(ace->size));
14561456
}
1457-
1458-
if (!pdacl->num_aces)
1459-
granted = GENERIC_ALL_FLAGS;
14601457
}
14611458

14621459
if (!uid)

0 commit comments

Comments
 (0)