aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/capability.h
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <linux@treblig.org>2024-12-19 17:28:59 +0000
committerSerge Hallyn <sergeh@kernel.org>2025-03-07 22:03:09 -0600
commit4ae89b1fe7c2e37a8f2ea39765e4c40c9d42a101 (patch)
tree1628063855da804e4802a89fe3fb50f31e77e961 /include/linux/capability.h
parentLinux 6.14-rc1 (diff)
downloadwireguard-linux-4ae89b1fe7c2e37a8f2ea39765e4c40c9d42a101.tar.xz
wireguard-linux-4ae89b1fe7c2e37a8f2ea39765e4c40c9d42a101.zip
capability: Remove unused has_capability
The vanilla has_capability() function has been unused since 2018's commit dcb569cf6ac9 ("Smack: ptrace capability use fixes") Remove it. Fixup a comment in security/commoncap.c that referenced it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Paul Moore <paul@paul-moore.com> Signed-off-by: Serge Hallyn <sergeh@kernel.org>
Diffstat (limited to 'include/linux/capability.h')
-rw-r--r--include/linux/capability.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/include/linux/capability.h b/include/linux/capability.h
index 0c356a517991..1fb08922552c 100644
--- a/include/linux/capability.h
+++ b/include/linux/capability.h
@@ -139,7 +139,6 @@ static inline kernel_cap_t cap_raise_nfsd_set(const kernel_cap_t a,
}
#ifdef CONFIG_MULTIUSER
-extern bool has_capability(struct task_struct *t, int cap);
extern bool has_ns_capability(struct task_struct *t,
struct user_namespace *ns, int cap);
extern bool has_capability_noaudit(struct task_struct *t, int cap);
@@ -150,10 +149,6 @@ extern bool ns_capable(struct user_namespace *ns, int cap);
extern bool ns_capable_noaudit(struct user_namespace *ns, int cap);
extern bool ns_capable_setid(struct user_namespace *ns, int cap);
#else
-static inline bool has_capability(struct task_struct *t, int cap)
-{
- return true;
-}
static inline bool has_ns_capability(struct task_struct *t,
struct user_namespace *ns, int cap)
{