Blob Blame History Raw
From 6cd1d682d6e073a5e78fb006a9187febee802738 Mon Sep 17 00:00:00 2001
From: John Johansen <john.johansen@canonical.com>
Date: Fri, 9 Jun 2017 02:11:29 -0700
Subject: [PATCH 34/65] apparmor: fix display of ns name
Git-commit: d9f02d9c237aa603d781fe5165ebe383c554376d
Patch-mainline: v4.13-rc1
References: FATE#323500

The ns name being displayed should go through an ns view lookup.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
---
 security/apparmor/apparmorfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
index 818b70130bae..b64ea21a42ad 100644
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -1105,7 +1105,7 @@ static int seq_ns_name_show(struct seq_file *seq, void *v)
 {
 	struct aa_ns *ns = aa_current_profile()->ns;
 
-	seq_printf(seq, "%s\n", ns->base.name);
+	seq_printf(seq, "%s\n", aa_ns_name(ns, ns, true));
 
 	return 0;
 }
-- 
2.12.3