From 0e741fc858bd63d4039ac9a0ef8301baf6e6f9db Mon Sep 17 00:00:00 2001 From: Andrew Wellington Date: Tue, 4 Aug 2015 15:12:24 +1000 Subject: [PATCH] LU-6950 utils: support SELinux context labelling SELinux contexts are applied by the kernel if mount options are not binary. As we don't use any binary mount options in Lustre, remove the binary mount option flag. Signed-off-by: Andrew Wellington Signed-off-by: John L. Hammond Change-Id: I363886f58939c1f7384de2ff579968a19f1460bc Reviewed-on: http://review.whamcloud.com/15840 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Dmitry Eremin Reviewed-by: Sebastien Buisson Reviewed-by: Oleg Drokin --- lustre/llite/llite_lib.c | 12 ++++++++++++ lustre/obdclass/obd_mount.c | 3 +-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 78a3495..72b178e 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -828,6 +828,18 @@ static int ll_options(char *options, int *flags) *flags &= ~tmp; goto next; } + tmp = ll_set_opt("context", s1, 1); + if (tmp) + goto next; + tmp = ll_set_opt("fscontext", s1, 1); + if (tmp) + goto next; + tmp = ll_set_opt("defcontext", s1, 1); + if (tmp) + goto next; + tmp = ll_set_opt("rootcontext", s1, 1); + if (tmp) + goto next; tmp = ll_set_opt("remote_client", s1, LL_SBI_RMT_CLIENT); if (tmp) { *flags |= tmp; diff --git a/lustre/obdclass/obd_mount.c b/lustre/obdclass/obd_mount.c index 32f78e5..5037f5e 100644 --- a/lustre/obdclass/obd_mount.c +++ b/lustre/obdclass/obd_mount.c @@ -1404,8 +1404,7 @@ static struct file_system_type lustre_fs_type = { .get_sb = lustre_get_sb, #endif .kill_sb = lustre_kill_super, - .fs_flags = FS_BINARY_MOUNTDATA | FS_REQUIRES_DEV | - FS_HAS_FIEMAP | FS_RENAME_DOES_D_MOVE, + .fs_flags = FS_REQUIRES_DEV | FS_HAS_FIEMAP | FS_RENAME_DOES_D_MOVE, }; MODULE_ALIAS_FS("lustre"); -- 1.8.3.1