aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2018-01-23 04:47:42 -0500
committerJohn Johansen <john.johansen@canonical.com>2018-02-09 14:30:00 -0500
commit040d9e2bce0a5b321c402b79ee43a8e8d2fd3b06 (patch)
tree6fae38476b2272d2db582cd8bed3fa60b0fec0aa /security
parentd8a5b80568a9cb66810e75b182018e9edb68e8ff (diff)
apparmor: fix display of .ns_name for containers
The .ns_name should not be virtualized by the current ns view. It needs to report the ns base name as that is being used during startup as part of determining apparmor policy namespace support. BugLink: http://bugs.launchpad.net/bugs/1746463 Fixes: d9f02d9c237aa ("apparmor: fix display of ns name") Cc: Stable <stable@vger.kernel.org> Reported-by: Serge Hallyn <serge@hallyn.com> Tested-by: Serge Hallyn <serge@hallyn.com> Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security')
-rw-r--r--security/apparmor/apparmorfs.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
index d4fa04d91439..a23b0ca19fd0 100644
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -1189,9 +1189,7 @@ static int seq_ns_level_show(struct seq_file *seq, void *v)
1189static int seq_ns_name_show(struct seq_file *seq, void *v) 1189static int seq_ns_name_show(struct seq_file *seq, void *v)
1190{ 1190{
1191 struct aa_label *label = begin_current_label_crit_section(); 1191 struct aa_label *label = begin_current_label_crit_section();
1192 1192 seq_printf(seq, "%s\n", labels_ns(label)->base.name);
1193 seq_printf(seq, "%s\n", aa_ns_name(labels_ns(label),
1194 labels_ns(label), true));
1195 end_current_label_crit_section(label); 1193 end_current_label_crit_section(label);
1196 1194
1197 return 0; 1195 return 0;