diff options
| author | Paul Moore <paul@paul-moore.com> | 2026-01-14 16:00:14 -0500 |
|---|---|---|
| committer | Paul Moore <paul@paul-moore.com> | 2026-01-14 16:15:09 -0500 |
| commit | b07b6f0c5d27fafb12ae98d889ae944d308fe9f6 (patch) | |
| tree | 26b0d14cd670bc97f31cd8690f8128d794d652e0 /security/selinux | |
| parent | 5473a722f782f79f96b4691400d681c01fcacc2f (diff) | |
selinux: fix a capabilities parsing typo in selinux_bpf_token_capable()
There was a typo, likely a cut-n-paste bug, where we were checking for
SECCLASS_CAPABILITY instead of SECCLASS_CAPABILITY2.
Fixes: 5473a722f782 ("selinux: add support for BPF token access control")
Reported-by: Christian Göttsche <cgzones@googlemail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux')
| -rw-r--r-- | security/selinux/hooks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index c7c19ceeeb2f..9289ed89a8ec 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -7260,7 +7260,7 @@ static int selinux_bpf_token_capable(const struct bpf_token *token, int cap) sclass = initns ? SECCLASS_CAPABILITY : SECCLASS_CAP_USERNS; break; case 1: - sclass = initns ? SECCLASS_CAPABILITY : SECCLASS_CAP2_USERNS; + sclass = initns ? SECCLASS_CAPABILITY2 : SECCLASS_CAP2_USERNS; break; default: pr_err("SELinux: out of range capability %d\n", cap); |
