Commit 040d9e2b authored by John Johansen's avatar John Johansen

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: d9f02d9c ("apparmor: fix display of ns name")
Cc: Stable <stable@vger.kernel.org>
Reported-by: default avatarSerge Hallyn <serge@hallyn.com>
Tested-by: default avatarSerge Hallyn <serge@hallyn.com>
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
parent d8a5b805
...@@ -1189,9 +1189,7 @@ static int seq_ns_level_show(struct seq_file *seq, void *v) ...@@ -1189,9 +1189,7 @@ static int seq_ns_level_show(struct seq_file *seq, void *v)
static int seq_ns_name_show(struct seq_file *seq, void *v) static int seq_ns_name_show(struct seq_file *seq, void *v)
{ {
struct aa_label *label = begin_current_label_crit_section(); struct aa_label *label = begin_current_label_crit_section();
seq_printf(seq, "%s\n", labels_ns(label)->base.name);
seq_printf(seq, "%s\n", aa_ns_name(labels_ns(label),
labels_ns(label), true));
end_current_label_crit_section(label); end_current_label_crit_section(label);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment