X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;ds=sidebyside;f=security%2Fsecurity.c;h=d85dbb37c97261a37b96e5ddfee3e8ea1599ff3d;hb=29881c4502ba05f46bc12ae8053d4e08d7e2615c;hp=9bbc8e57b8c6744627c02df9d5ea76ca8fc1e765;hpb=76f7ba35d4b5219fcc4cb072134c020ec77d030d;p=safe%2Fjmp%2Flinux-2.6 diff --git a/security/security.c b/security/security.c index 9bbc8e5..d85dbb3 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)