Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285031
b: refs/heads/master
c: c7eba4a
h: refs/heads/master
i:
  285029: 02d7fde
  285027: c761a24
  285023: f797c2f
v: v3
  • Loading branch information
Eric Paris committed Jan 5, 2012
1 parent e4be59e commit 623200e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b7e724d303b684655e4ca3dabd5a6840ad19012d
refs/heads/master: c7eba4a97563fd8b431787f7ad623444f2da80c6
7 changes: 7 additions & 0 deletions trunk/include/linux/security.h
Original file line number Diff line number Diff line change
Expand Up @@ -1668,6 +1668,8 @@ int security_capset(struct cred *new, const struct cred *old,
const kernel_cap_t *permitted);
int security_capable(const struct cred *cred, struct user_namespace *ns,
int cap);
int security_capable_noaudit(const struct cred *cred, struct user_namespace *ns,
int cap);
int security_real_capable(struct task_struct *tsk, struct user_namespace *ns,
int cap);
int security_real_capable_noaudit(struct task_struct *tsk,
Expand Down Expand Up @@ -1869,6 +1871,11 @@ static inline int security_capable(const struct cred *cred,
return cap_capable(cred, ns, cap, SECURITY_CAP_AUDIT);
}

static inline int security_capable_noaudit(const struct cred *cred,
struct user_namespace *ns, int cap) {
return cap_capable(cred, ns, cap, SECURITY_CAP_NOAUDIT);
}

static inline int security_real_capable(struct task_struct *tsk, struct user_namespace *ns, int cap)
{
int ret;
Expand Down
6 changes: 6 additions & 0 deletions trunk/security/security.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ int security_capable(const struct cred *cred, struct user_namespace *ns,
return security_ops->capable(cred, ns, cap, SECURITY_CAP_AUDIT);
}

int security_capable_noaudit(const struct cred *cred, struct user_namespace *ns,
int cap)
{
return security_ops->capable(cred, ns, cap, SECURITY_CAP_NOAUDIT);
}

int security_real_capable(struct task_struct *tsk, struct user_namespace *ns,
int cap)
{
Expand Down

0 comments on commit 623200e

Please sign in to comment.