diff options
author | Kees Cook <kees@ubuntu.com> | 2012-01-26 16:29:22 -0800 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2012-02-27 11:38:18 -0800 |
commit | a9bf8e9fd561ba9ff1f0f2a1d96e439fcedaaaa4 (patch) | |
tree | fb477507408c30384d6725a3418eef92b09148e9 /security/apparmor/apparmorfs.c | |
parent | e74abcf3359d0130e99a6511ac484a3ea9e6e988 (diff) |
AppArmor: add "file" details to securityfs
Create the "file" directory in the securityfs for tracking features
related to files.
Signed-off-by: Kees Cook <kees@ubuntu.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/apparmorfs.c')
-rw-r--r-- | security/apparmor/apparmorfs.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c index f30dada0dca2..f9d0b5087bea 100644 --- a/security/apparmor/apparmorfs.c +++ b/security/apparmor/apparmorfs.c @@ -154,6 +154,9 @@ static int aa_fs_seq_show(struct seq_file *seq, void *v) case AA_FS_TYPE_BOOLEAN: seq_printf(seq, "%s\n", fs_file->v.boolean ? "yes" : "no"); break; + case AA_FS_TYPE_STRING: + seq_printf(seq, "%s\n", fs_file->v.string); + break; case AA_FS_TYPE_U64: seq_printf(seq, "%#08lx\n", fs_file->v.u64); break; @@ -180,6 +183,12 @@ const struct file_operations aa_fs_seq_file_ops = { /** Base file system setup **/ +static struct aa_fs_entry aa_fs_entry_file[] = { + AA_FS_FILE_STRING("mask", "create read write exec append mmap_exec " \ + "link lock"), + { } +}; + static struct aa_fs_entry aa_fs_entry_domain[] = { AA_FS_FILE_BOOLEAN("change_hat", 1), AA_FS_FILE_BOOLEAN("change_hatv", 1), @@ -190,6 +199,7 @@ static struct aa_fs_entry aa_fs_entry_domain[] = { static struct aa_fs_entry aa_fs_entry_features[] = { AA_FS_DIR("domain", aa_fs_entry_domain), + AA_FS_DIR("file", aa_fs_entry_file), AA_FS_FILE_U64("capability", VFS_CAP_FLAGS_MASK), { } }; |