aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/security.h
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2008-07-03 19:47:13 -0400
committerJames Morris <jmorris@namei.org>2008-07-14 01:02:05 -0400
commit2069f457848f846cb31149c9aa29b330a6b66d1b (patch)
tree199e7bb15e7d7b5cf008cd6fdb6cefc0d6af7f13 /include/linux/security.h
parent811f3799279e567aa354c649ce22688d949ac7a9 (diff)
LSM/SELinux: show LSM mount options in /proc/mounts
This patch causes SELinux mount options to show up in /proc/mounts. As with other code in the area seq_put errors are ignored. Other LSM's will not have their mount options displayed until they fill in their own security_sb_show_options() function. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'include/linux/security.h')
-rw-r--r--include/linux/security.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/security.h b/include/linux/security.h
index 62bd80cb7f87..c8ad8ec684b4 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -80,6 +80,7 @@ struct xfrm_selector;
80struct xfrm_policy; 80struct xfrm_policy;
81struct xfrm_state; 81struct xfrm_state;
82struct xfrm_user_sec_ctx; 82struct xfrm_user_sec_ctx;
83struct seq_file;
83 84
84extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); 85extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb);
85extern int cap_netlink_recv(struct sk_buff *skb, int cap); 86extern int cap_netlink_recv(struct sk_buff *skb, int cap);
@@ -1331,6 +1332,7 @@ struct security_operations {
1331 void (*sb_free_security) (struct super_block *sb); 1332 void (*sb_free_security) (struct super_block *sb);
1332 int (*sb_copy_data) (char *orig, char *copy); 1333 int (*sb_copy_data) (char *orig, char *copy);
1333 int (*sb_kern_mount) (struct super_block *sb, void *data); 1334 int (*sb_kern_mount) (struct super_block *sb, void *data);
1335 int (*sb_show_options) (struct seq_file *m, struct super_block *sb);
1334 int (*sb_statfs) (struct dentry *dentry); 1336 int (*sb_statfs) (struct dentry *dentry);
1335 int (*sb_mount) (char *dev_name, struct path *path, 1337 int (*sb_mount) (char *dev_name, struct path *path,
1336 char *type, unsigned long flags, void *data); 1338 char *type, unsigned long flags, void *data);
@@ -1610,6 +1612,7 @@ int security_sb_alloc(struct super_block *sb);
1610void security_sb_free(struct super_block *sb); 1612void security_sb_free(struct super_block *sb);
1611int security_sb_copy_data(char *orig, char *copy); 1613int security_sb_copy_data(char *orig, char *copy);
1612int security_sb_kern_mount(struct super_block *sb, void *data); 1614int security_sb_kern_mount(struct super_block *sb, void *data);
1615int security_sb_show_options(struct seq_file *m, struct super_block *sb);
1613int security_sb_statfs(struct dentry *dentry); 1616int security_sb_statfs(struct dentry *dentry);
1614int security_sb_mount(char *dev_name, struct path *path, 1617int security_sb_mount(char *dev_name, struct path *path,
1615 char *type, unsigned long flags, void *data); 1618 char *type, unsigned long flags, void *data);
@@ -1887,6 +1890,12 @@ static inline int security_sb_kern_mount(struct super_block *sb, void *data)
1887 return 0; 1890 return 0;
1888} 1891}
1889 1892
1893static inline int security_sb_show_options(struct seq_file *m,
1894 struct super_block *sb)
1895{
1896 return 0;
1897}
1898
1890static inline int security_sb_statfs(struct dentry *dentry) 1899static inline int security_sb_statfs(struct dentry *dentry)
1891{ 1900{
1892 return 0; 1901 return 0;