summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2026-01-14 16:23:47 -0500
committerPaul Moore <paul@paul-moore.com>2026-01-14 16:26:21 -0500
commitea64aa57d596c4cbe518ffd043c52ef64089708d (patch)
tree06eae605a4e7fccae6d08058bee9e999e63e7640
parentb07b6f0c5d27fafb12ae98d889ae944d308fe9f6 (diff)
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>
-rw-r--r--security/selinux/hooks.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 9289ed89a8ec..feda34b18d83 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -1659,7 +1659,6 @@ static int cred_has_capability(const struct cred *cred,
break;
default:
pr_err("SELinux: out of range capability %d\n", cap);
- BUG();
return -EINVAL;
}