aboutsummaryrefslogtreecommitdiffstats
path: root/security/security.c
diff options
context:
space:
mode:
authorOlga Kornievskaia <kolga@netapp.com>2021-02-26 22:37:55 -0500
committerPaul Moore <paul@paul-moore.com>2021-03-22 14:53:37 -0400
commit69c4a42d72eb9b41e1c6e4bc9ab7f3650bf35f62 (patch)
tree564b363284f41cce68ff9b55a2d0fa811bd8bfcf /security/security.c
parentselinux: fix misspellings using codespell tool (diff)
downloadlinux-dev-69c4a42d72eb9b41e1c6e4bc9ab7f3650bf35f62.tar.xz
linux-dev-69c4a42d72eb9b41e1c6e4bc9ab7f3650bf35f62.zip
lsm,selinux: add new hook to compare new mount to an existing mount
Add a new hook that takes an existing super block and a new mount with new options and determines if new options confict with an existing mount or not. A filesystem can use this new hook to determine if it can share the an existing superblock with a new superblock for the new mount. Signed-off-by: Olga Kornievskaia <kolga@netapp.com> Acked-by: Anna Schumaker <Anna.Schumaker@Netapp.com> [PM: tweak the subject line, fix tab/space problems] Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to '')
-rw-r--r--security/security.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/security/security.c b/security/security.c
index 5ac96b16f8fa..a4e7d50c3e39 100644
--- a/security/security.c
+++ b/security/security.c
@@ -890,6 +890,13 @@ int security_sb_eat_lsm_opts(char *options, void **mnt_opts)
}
EXPORT_SYMBOL(security_sb_eat_lsm_opts);
+int security_sb_mnt_opts_compat(struct super_block *sb,
+ void *mnt_opts)
+{
+ return call_int_hook(sb_mnt_opts_compat, 0, sb, mnt_opts);
+}
+EXPORT_SYMBOL(security_sb_mnt_opts_compat);
+
int security_sb_remount(struct super_block *sb,
void *mnt_opts)
{