[PATCH 11/20] audit: use proper audit namespace in audit_receive_msg

Gao feng gaofeng at cn.fujitsu.com
Thu Oct 24 07:31:56 UTC 2013


Signed-off-by: Gao feng <gaofeng at cn.fujitsu.com>
---
 kernel/audit.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/kernel/audit.c b/kernel/audit.c
index 2132929..5524deb 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -662,11 +662,11 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
 	case AUDIT_GET:
 		status_set.enabled	 = audit_enabled;
 		status_set.failure	 = audit_failure;
-		status_set.pid		 = init_audit_ns.pid;
+		status_set.pid		 = ns->pid;
 		status_set.rate_limit	 = audit_rate_limit;
 		status_set.backlog_limit = audit_backlog_limit;
 		status_set.lost		 = atomic_read(&audit_lost);
-		status_set.backlog	 = skb_queue_len(&init_audit_ns.queue);
+		status_set.backlog	 = skb_queue_len(&ns->queue);
 
 		rcu_read_lock();
 		{
@@ -696,12 +696,12 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
 				new_pid = task_pid_nr_ns(task, &init_pid_ns);
 
 			if (audit_enabled != AUDIT_OFF)
-				audit_log_config_change("audit_pid", new_pid, init_audit_ns.pid, 1);
+				audit_log_config_change("audit_pid", new_pid, ns->pid, 1);
 
-			init_audit_ns.pid = new_pid;
+			ns->pid = new_pid;
 			rcu_read_unlock();
 
-			init_audit_ns.portid = NETLINK_CB(skb).portid;
+			ns->portid = NETLINK_CB(skb).portid;
 		}
 
 		/* Right now, only audit_pid and audit_portid are namesapce
-- 
1.8.3.1



More information about the Containers mailing list