]> git.proxmox.com Git - mirror_ubuntu-kernels.git/blobdiff - fs/proc/base.c
Merge tag 'apparmor-pr-2020-06-07' of git://git.kernel.org/pub/scm/linux/kernel/git...
[mirror_ubuntu-kernels.git] / fs / proc / base.c
index b1d94d14ed5a761e20b25fa246dd8aec9b0bc8c4..066d9c0f4664a8069d356a71620ef228ecb85679 100644 (file)
@@ -2778,6 +2778,15 @@ static const struct pid_entry smack_attr_dir_stuff[] = {
 LSM_DIR_OPS(smack);
 #endif
 
+#ifdef CONFIG_SECURITY_APPARMOR
+static const struct pid_entry apparmor_attr_dir_stuff[] = {
+       ATTR("apparmor", "current",     0666),
+       ATTR("apparmor", "prev",        0444),
+       ATTR("apparmor", "exec",        0666),
+};
+LSM_DIR_OPS(apparmor);
+#endif
+
 static const struct pid_entry attr_dir_stuff[] = {
        ATTR(NULL, "current",           0666),
        ATTR(NULL, "prev",              0444),
@@ -2789,6 +2798,10 @@ static const struct pid_entry attr_dir_stuff[] = {
        DIR("smack",                    0555,
            proc_smack_attr_dir_inode_ops, proc_smack_attr_dir_ops),
 #endif
+#ifdef CONFIG_SECURITY_APPARMOR
+       DIR("apparmor",                 0555,
+           proc_apparmor_attr_dir_inode_ops, proc_apparmor_attr_dir_ops),
+#endif
 };
 
 static int proc_attr_dir_readdir(struct file *file, struct dir_context *ctx)