summaryrefslogtreecommitdiffstats
path: root/security/security.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2009-01-07 09:21:54 +1100
committerJames Morris <jmorris@namei.org>2009-01-07 09:21:54 +1100
commit29881c4502ba05f46bc12ae8053d4e08d7e2615c (patch)
tree536ea4ac63554e836438bd5f370ddecaa343f1f4 /security/security.c
parent76f7ba35d4b5219fcc4cb072134c020ec77d030d (diff)
downloadlinux-29881c4502ba05f46bc12ae8053d4e08d7e2615c.tar.bz2
Revert "CRED: Fix regression in cap_capable() as shown up by sys_faccessat() [ver #2]"
This reverts commit 14eaddc967b16017d4a1a24d2be6c28ecbe06ed8. David has a better version to come.
Diffstat (limited to 'security/security.c')
-rw-r--r--security/security.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/security/security.c b/security/security.c
index 9bbc8e57b8c6..d85dbb37c972 100644
--- a/security/security.c
+++ b/security/security.c
@@ -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)