[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1367893269-9308-42-git-send-email-gaofeng@cn.fujitsu.com>
Date: Tue, 7 May 2013 10:21:02 +0800
From: Gao feng <gaofeng@...fujitsu.com>
To: viro@...iv.linux.org.uk, eparis@...hat.com, ebiederm@...ssion.com,
sgrubb@...hat.com, akpm@...ux-foundation.org,
serge.hallyn@...ntu.com, davem@...emloft.net
Cc: netdev@...r.kernel.org, containers@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org, linux-audit@...hat.com,
Gao feng <gaofeng@...fujitsu.com>
Subject: [PATCH RFC 41/48] Audit: lsm: translate audit_log_start to audit_log_start_ns
Now we can log audit message in the user namespace which current
task belongs to.
Signed-off-by: Gao feng <gaofeng@...fujitsu.com>
---
security/lsm_audit.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/security/lsm_audit.c b/security/lsm_audit.c
index 8d8d97d..90fcd08 100644
--- a/security/lsm_audit.c
+++ b/security/lsm_audit.c
@@ -392,11 +392,15 @@ void common_lsm_audit(struct common_audit_data *a,
void (*post_audit)(struct audit_buffer *, void *))
{
struct audit_buffer *ab;
+ struct user_namespace *ns;
if (a == NULL)
return;
+
+ ns = current_user_ns();
/* we use GFP_ATOMIC so we won't sleep */
- ab = audit_log_start(current->audit_context, GFP_ATOMIC, AUDIT_AVC);
+ ab = audit_log_start_ns(ns, current->audit_context,
+ GFP_ATOMIC, AUDIT_AVC);
if (ab == NULL)
return;
@@ -409,5 +413,5 @@ void common_lsm_audit(struct common_audit_data *a,
if (post_audit)
post_audit(ab, a);
- audit_log_end(ab);
+ audit_log_end_ns(ns, ab);
}
--
1.8.1.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists