From abc299c09f23a01be299dc2e891cc8ea57868a4f Mon Sep 17 00:00:00 2001 From: Makornthawat Emery Date: Fri, 29 Mar 2019 13:45:22 +0000 Subject: Correct return case for context check in /cache/recovery Change-Id: If9eca1b7f6b781542194a6b39c19ee03a521f94b --- twrp-functions.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/twrp-functions.cpp b/twrp-functions.cpp index 84451b3b6..0730ca849 100755 --- a/twrp-functions.cpp +++ b/twrp-functions.cpp @@ -1206,10 +1206,7 @@ void TWFunc::check_selinux_support() { } if (TWFunc::Path_Exists(se_context_check)) { ret = lgetfilecon(se_context_check.c_str(), &contexts); - if (ret > 0) { - lsetfilecon(se_context_check.c_str(), "test"); - lgetfilecon(se_context_check.c_str(), &contexts); - } else { + if (ret < 0) { LOGINFO("Could not check %s SELinux contexts, using /sbin/teamwin instead which may be inaccurate.\n", se_context_check.c_str()); lgetfilecon("/sbin/teamwin", &contexts); } -- cgit v1.2.3