summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2018-12-01 23:06:57 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2018-12-21 11:45:41 -0500
commitc039bc3c2498724946304a8f964244a9b6af1043 (patch)
treece98ee8e698a28cbaed969460457941e8b34f2e3 /include
parent6be8750b4cba8c37170f46b29841d112f1be749b (diff)
downloadlinux-c039bc3c2498724946304a8f964244a9b6af1043.tar.gz
linux-c039bc3c2498724946304a8f964244a9b6af1043.tar.bz2
linux-c039bc3c2498724946304a8f964244a9b6af1043.zip
LSM: lift extracting and parsing LSM options into the caller of ->sb_remount()
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.h5
2 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h
index c7f67341fd1d..e1a12a1e2b32 100644
--- a/include/linux/lsm_hooks.h
+++ b/include/linux/lsm_hooks.h
@@ -1462,7 +1462,8 @@ union security_list_options {
int (*sb_alloc_security)(struct super_block *sb);
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_remount)(struct super_block *sb,
+ struct security_mnt_opts *opts);
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);
diff --git a/include/linux/security.h b/include/linux/security.h
index f2f88e41f35f..4fc6d98bc7a6 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -249,7 +249,7 @@ void security_bprm_committed_creds(struct linux_binprm *bprm);
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_remount(struct super_block *sb, struct security_mnt_opts *opts);
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);
@@ -561,7 +561,8 @@ static inline int security_sb_copy_data(char *orig, char *copy)
return 0;
}
-static inline int security_sb_remount(struct super_block *sb, void *data)
+static inline int security_sb_remount(struct super_block *sb,
+ struct security_mnt_opts *opts)
{
return 0;
}