aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
Diffstat (limited to 'security')
-rw-r--r--security/selinux/ss/mls.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/security/selinux/ss/mls.c b/security/selinux/ss/mls.c
index aaefac2921f1..640d0bfdbc68 100644
--- a/security/selinux/ss/mls.c
+++ b/security/selinux/ss/mls.c
@@ -262,8 +262,11 @@ int mls_context_to_sid(char oldc,
262 struct cat_datum *catdatum, *rngdatum; 262 struct cat_datum *catdatum, *rngdatum;
263 int l, rc = -EINVAL; 263 int l, rc = -EINVAL;
264 264
265 if (!selinux_mls_enabled) 265 if (!selinux_mls_enabled) {
266 if (def_sid != SECSID_NULL && oldc)
267 *scontext += strlen(*scontext);
266 return 0; 268 return 0;
269 }
267 270
268 /* 271 /*
269 * No MLS component to the security context, try and map to 272 * No MLS component to the security context, try and map to