diff options
Diffstat (limited to 'security/security.c')
| -rw-r--r-- | security/security.c | 25 |
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, | |||
| 154 | effective, inheritable, permitted); | 154 | effective, inheritable, permitted); |
| 155 | } | 155 | } |
| 156 | 156 | ||
| 157 | int security_capable(int cap) | 157 | int security_capable(struct task_struct *tsk, int cap) |
| 158 | { | 158 | { |
| 159 | return security_ops->capable(cap, SECURITY_CAP_AUDIT); | 159 | return security_ops->capable(tsk, cap, SECURITY_CAP_AUDIT); |
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | int security_task_capable(struct task_struct *tsk, int cap) | 162 | int security_capable_noaudit(struct task_struct *tsk, int cap) |
| 163 | { | 163 | { |
| 164 | const struct cred *cred; | 164 | return security_ops->capable(tsk, cap, SECURITY_CAP_NOAUDIT); |
| 165 | int ret; | ||
| 166 | |||
| 167 | cred = get_task_cred(tsk); | ||
| 168 | ret = security_ops->task_capable(tsk, cred, cap, SECURITY_CAP_AUDIT); | ||
| 169 | put_cred(cred); | ||
| 170 | return ret; | ||
| 171 | } | ||
| 172 | |||
| 173 | int security_task_capable_noaudit(struct task_struct *tsk, int cap) | ||
| 174 | { | ||
| 175 | const struct cred *cred; | ||
| 176 | int ret; | ||
| 177 | |||
| 178 | cred = get_task_cred(tsk); | ||
| 179 | ret = security_ops->task_capable(tsk, cred, cap, SECURITY_CAP_NOAUDIT); | ||
| 180 | put_cred(cred); | ||
| 181 | return ret; | ||
| 182 | } | 165 | } |
| 183 | 166 | ||
| 184 | int security_acct(struct file *file) | 167 | int security_acct(struct file *file) |
