Whamcloud - gitweb
LU-9578 llite: use security context if it's enabled in the kernel 37/29737/2
authorAlex Zhuravlev <alexey.zhuravlev@intel.com>
Thu, 1 Jun 2017 07:20:12 +0000 (11:20 +0400)
committerJohn L. Hammond <john.hammond@intel.com>
Wed, 15 Nov 2017 17:42:18 +0000 (17:42 +0000)
if it's disabled, then Lustre stop to work properly (can not create
files, etc)

Lustre-change: https://review.whamcloud.com/27364
Lustre-commmit: 61f26ea47f96632a90702f2b404e845a01498612

Change-Id: I1e431ec95a2b0613b43893567eb6d1a64ec832de
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29737
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/llite/llite_lib.c

index 0824fa2..40b57d9 100644 (file)
@@ -258,7 +258,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
        if (sbi->ll_flags & LL_SBI_ALWAYS_PING)
                data->ocd_connect_flags &= ~OBD_CONNECT_PINGLESS;
 
-#ifdef HAVE_SECURITY_DENTRY_INIT_SECURITY
+#if defined(HAVE_SECURITY_DENTRY_INIT_SECURITY) && defined(CONFIG_SECURITY)
        data->ocd_connect_flags2 |= OBD_CONNECT2_FILE_SECCTX;
 #endif /* HAVE_SECURITY_DENTRY_INIT_SECURITY */