Skip to content

Commit ea64aa5

Browse files
committed
selinux: drop the BUG() in cred_has_capability()
With the compile time check located immediately above the cred_has_capability() function ensuring that we will notice if the capability set grows beyond 63 capabilities, we can safely remove the BUG() call from the cred_has_capability(). Signed-off-by: Paul Moore <paul@paul-moore.com>
1 parent b07b6f0 commit ea64aa5

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

security/selinux/hooks.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1659,7 +1659,6 @@ static int cred_has_capability(const struct cred *cred,
16591659
break;
16601660
default:
16611661
pr_err("SELinux: out of range capability %d\n", cap);
1662-
BUG();
16631662
return -EINVAL;
16641663
}
16651664

0 commit comments

Comments
 (0)