mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
Revert "CRED: Fix regression in cap_capable() as shown up by sys_faccessat() [ver #2]"
This reverts commit 14eaddc967
.
David has a better version to come.
This commit is contained in:
parent
76f7ba35d4
commit
29881c4502
9 changed files with 35 additions and 129 deletions
|
@ -154,31 +154,14 @@ int security_capset(struct cred *new, const struct cred *old,
|
|||
effective, inheritable, permitted);
|
||||
}
|
||||
|
||||
int security_capable(int cap)
|
||||
int security_capable(struct task_struct *tsk, int cap)
|
||||
{
|
||||
return security_ops->capable(cap, SECURITY_CAP_AUDIT);
|
||||
return security_ops->capable(tsk, cap, SECURITY_CAP_AUDIT);
|
||||
}
|
||||
|
||||
int security_task_capable(struct task_struct *tsk, int cap)
|
||||
int security_capable_noaudit(struct task_struct *tsk, int cap)
|
||||
{
|
||||
const struct cred *cred;
|
||||
int ret;
|
||||
|
||||
cred = get_task_cred(tsk);
|
||||
ret = security_ops->task_capable(tsk, cred, cap, SECURITY_CAP_AUDIT);
|
||||
put_cred(cred);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int security_task_capable_noaudit(struct task_struct *tsk, int cap)
|
||||
{
|
||||
const struct cred *cred;
|
||||
int ret;
|
||||
|
||||
cred = get_task_cred(tsk);
|
||||
ret = security_ops->task_capable(tsk, cred, cap, SECURITY_CAP_NOAUDIT);
|
||||
put_cred(cred);
|
||||
return ret;
|
||||
return security_ops->capable(tsk, cap, SECURITY_CAP_NOAUDIT);
|
||||
}
|
||||
|
||||
int security_acct(struct file *file)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue