From 623200ece49e382ab59304215727a263345fc1b7 Mon Sep 17 00:00:00 2001 From: Eric Paris Date: Tue, 3 Jan 2012 12:25:15 -0500 Subject: [PATCH] --- yaml --- r: 285031 b: refs/heads/master c: c7eba4a97563fd8b431787f7ad623444f2da80c6 h: refs/heads/master i: 285029: 02d7fde4fc1f0b12ee105bff642fe5201c86f369 285027: c761a24902731d04bb8f25820a7c27c1b5e14707 285023: f797c2f5499f5f8ba599e39cc0bdb8aff48e5e2d v: v3 --- [refs] | 2 +- trunk/include/linux/security.h | 7 +++++++ trunk/security/security.c | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 539a2e66781f..13fabedecbc4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b7e724d303b684655e4ca3dabd5a6840ad19012d +refs/heads/master: c7eba4a97563fd8b431787f7ad623444f2da80c6 diff --git a/trunk/include/linux/security.h b/trunk/include/linux/security.h index ee969ff40a26..caff54eee686 100644 --- a/trunk/include/linux/security.h +++ b/trunk/include/linux/security.h @@ -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, @@ -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; diff --git a/trunk/security/security.c b/trunk/security/security.c index b9e57f4fc44a..b7edaae77d1d 100644 --- a/trunk/security/security.c +++ b/trunk/security/security.c @@ -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) {