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>
This commit is contained in:
Al Viro
2018-12-01 22:42:44 -05:00
parent 6466f3d193
commit 6be8750b4c
6 changed files with 31 additions and 54 deletions

View File

@@ -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;
}