From: Andrew Wellington Date: Tue, 4 Aug 2015 05:12:24 +0000 (+1000) Subject: LU-6950 utils: support SELinux context labelling X-Git-Tag: 2.7.61~19 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F40%2F15840%2F6;p=fs%2Flustre-release.git 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 --- 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");