ronnie
2022-10-23 3eef1810ec35005e8bcaaee0957166baba31b68c
android/system/core/init/selinux.cpp
....@@ -97,6 +97,8 @@
9797 }
9898
9999 bool IsEnforcing() {
100
+ //edit by ronnie at 20220413
101
+ return false;
100102 if (ALLOW_PERMISSIVE_SELINUX) {
101103 return StatusFromCmdline() == SELINUX_ENFORCING;
102104 }
....@@ -430,6 +432,8 @@
430432
431433 bool kernel_enforcing = (security_getenforce() == 1);
432434 bool is_enforcing = IsEnforcing();
435
+ is_enforcing=false;//by Lyle,220111
436
+ security_setenforce(is_enforcing);//by Lyle,220111
433437 if (kernel_enforcing != is_enforcing) {
434438 if (security_setenforce(is_enforcing)) {
435439 PLOG(FATAL) << "security_setenforce(%s) failed" << (is_enforcing ? "true" : "false");