Skip to content

Commit 040d9e2

Browse files
committed
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: d9f02d9 ("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>
1 parent d8a5b80 commit 040d9e2

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎security/apparmor/apparmorfs.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,9 +1189,7 @@ static int seq_ns_level_show(struct seq_file *seq, void *v)
11891189
static int seq_ns_name_show(struct seq_file *seq, void *v)
11901190
{
11911191
struct aa_label *label = begin_current_label_crit_section();
1192-
1193-
seq_printf(seq, "%s\n", aa_ns_name(labels_ns(label),
1194-
labels_ns(label), true));
1192+
seq_printf(seq, "%s\n", labels_ns(label)->base.name);
11951193
end_current_label_crit_section(label);
11961194

11971195
return 0;

0 commit comments

Comments
 (0)