mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
capability: Remove unused has_capability
The vanilla has_capability() function has been unused since 2018's
commit dcb569cf6a ("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>
This commit is contained in:
committed by
Serge Hallyn
parent
2014c95afe
commit
4ae89b1fe7
@@ -285,22 +285,6 @@ bool has_ns_capability(struct task_struct *t,
|
||||
return (ret == 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* has_capability - Does a task have a capability in init_user_ns
|
||||
* @t: The task in question
|
||||
* @cap: The capability to be tested for
|
||||
*
|
||||
* Return true if the specified task has the given superior capability
|
||||
* currently in effect to the initial user namespace, false if not.
|
||||
*
|
||||
* Note that this does not set PF_SUPERPRIV on the task.
|
||||
*/
|
||||
bool has_capability(struct task_struct *t, int cap)
|
||||
{
|
||||
return has_ns_capability(t, &init_user_ns, cap);
|
||||
}
|
||||
EXPORT_SYMBOL(has_capability);
|
||||
|
||||
/**
|
||||
* has_ns_capability_noaudit - Does a task have a capability (unaudited)
|
||||
* in a specific user ns.
|
||||
|
||||
Reference in New Issue
Block a user