Whamcloud - gitweb
LU-6950 utils: support SELinux context labelling 40/15840/6
authorAndrew Wellington <andrew.wellington@anu.edu.au>
Tue, 4 Aug 2015 05:12:24 +0000 (15:12 +1000)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 24 Sep 2015 17:59:12 +0000 (17:59 +0000)
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 <andrew.wellington@anu.edu.au>
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I363886f58939c1f7384de2ff579968a19f1460bc
Reviewed-on: http://review.whamcloud.com/15840
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Sebastien Buisson <sebastien.buisson@bull.net>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/llite/llite_lib.c
lustre/obdclass/obd_mount.c

index 78a3495..72b178e 100644 (file)
@@ -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;
index 32f78e5..5037f5e 100644 (file)
@@ -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");