diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-03-28 12:09:33 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-03-28 12:09:33 -0700 |
commit | 78fb88eca684ed6f09f01a232c925b6da75d8131 (patch) | |
tree | c08af208456f79b57ff3c00762169db97526134e /security | |
parent | a2d4f473df1117e437fee125fa7e9420e19207ec (diff) | |
parent | 4ae89b1fe7c2e37a8f2ea39765e4c40c9d42a101 (diff) |
Merge tag 'caps-pr-20250327' of git://git.kernel.org/pub/scm/linux/kernel/git/sergeh/linux
Pull capabilities update from Serge Hallyn:
"This contains just one patch that removes a helper function whose last
user (smack) stopped using it in 2018"
* tag 'caps-pr-20250327' of git://git.kernel.org/pub/scm/linux/kernel/git/sergeh/linux:
capability: Remove unused has_capability
Diffstat (limited to 'security')
-rw-r--r-- | security/commoncap.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/security/commoncap.c b/security/commoncap.c index 58a0c1c3e409..28d4248bf001 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -115,10 +115,11 @@ static inline int cap_capable_helper(const struct cred *cred, * Determine whether the nominated task has the specified capability amongst * its effective set, returning 0 if it does, -ve if it does not. * - * NOTE WELL: cap_has_capability() cannot be used like the kernel's capable() - * and has_capability() functions. That is, it has the reverse semantics: - * cap_has_capability() returns 0 when a task has a capability, but the - * kernel's capable() and has_capability() returns 1 for this case. + * NOTE WELL: cap_capable() has reverse semantics to the capable() call + * and friends. That is cap_capable() returns an int 0 when a task has + * a capability, while the kernel's capable(), has_ns_capability(), + * has_ns_capability_noaudit(), and has_capability_noaudit() return a + * bool true (1) for this case. */ int cap_capable(const struct cred *cred, struct user_namespace *target_ns, int cap, unsigned int opts) |