summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2018-12-02 04:42:44 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2018-12-21 17:45:30 +0100
commit6be8750b4cba8c37170f46b29841d112f1be749b (patch)
tree0b3386c080d73fc666afcdcd1db5290b990af349 /include
parentsmack: make smack_parse_opts_str() clean up on failure (diff)
downloadlinux-6be8750b4cba8c37170f46b29841d112f1be749b.tar.xz
linux-6be8750b4cba8c37170f46b29841d112f1be749b.zip
LSM: lift parsing LSM options into the caller of ->sb_kern_mount()
This paves the way for retaining the LSM options from a common filesystem mount context during a mount parameter parsing phase to be instituted prior to actual mount/reconfiguration actions. Reviewed-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/lsm_hooks.h3
-rw-r--r--include/linux/security.h6
2 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h
index aaeb7fa24dc4..c7f67341fd1d 100644
--- a/include/linux/lsm_hooks.h
+++ b/include/linux/lsm_hooks.h
@@ -1463,7 +1463,8 @@ union security_list_options {
void (*sb_free_security)(struct super_block *sb);
int (*sb_copy_data)(char *orig, char *copy);
int (*sb_remount)(struct super_block *sb, void *data);
- int (*sb_kern_mount)(struct super_block *sb, int flags, void *data);
+ int (*sb_kern_mount)(struct super_block *sb, int flags,
+ struct security_mnt_opts *opts);
int (*sb_show_options)(struct seq_file *m, struct super_block *sb);
int (*sb_statfs)(struct dentry *dentry);
int (*sb_mount)(const char *dev_name, const struct path *path,
diff --git a/include/linux/security.h b/include/linux/security.h
index d170a5b031f3..f2f88e41f35f 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -250,7 +250,8 @@ int security_sb_alloc(struct super_block *sb);
void security_sb_free(struct super_block *sb);
int security_sb_copy_data(char *orig, char *copy);
int security_sb_remount(struct super_block *sb, void *data);
-int security_sb_kern_mount(struct super_block *sb, int flags, void *data);
+int security_sb_kern_mount(struct super_block *sb, int flags,
+ struct security_mnt_opts *opts);
int security_sb_show_options(struct seq_file *m, struct super_block *sb);
int security_sb_statfs(struct dentry *dentry);
int security_sb_mount(const char *dev_name, const struct path *path,
@@ -565,7 +566,8 @@ static inline int security_sb_remount(struct super_block *sb, void *data)
return 0;
}
-static inline int security_sb_kern_mount(struct super_block *sb, int flags, void *data)
+static inline int security_sb_kern_mount(struct super_block *sb, int flags,
+ struct security_mnt_opts *opts)
{
return 0;
}