diff --git a/native/jni/Android.mk b/native/jni/Android.mk index 564b02645..fe4867c0c 100644 --- a/native/jni/Android.mk +++ b/native/jni/Android.mk @@ -43,10 +43,9 @@ include $(BUILD_EXECUTABLE) endif -include $(CLEAR_VARS) - ifdef B_INIT +include $(CLEAR_VARS) LOCAL_MODULE := magiskinit LOCAL_STATIC_LIBRARIES := libsepol libxz libutils diff --git a/native/jni/external/Android.mk b/native/jni/external/Android.mk index 0acb6d7ef..02916387b 100644 --- a/native/jni/external/Android.mk +++ b/native/jni/external/Android.mk @@ -191,7 +191,6 @@ LOCAL_SRC_FILES := \ selinux/libsepol/src/context.c \ selinux/libsepol/src/context_record.c \ selinux/libsepol/src/debug.c \ - selinux/libsepol/src/deprecated_funcs.c \ selinux/libsepol/src/ebitmap.c \ selinux/libsepol/src/expand.c \ selinux/libsepol/src/handle.c \ @@ -217,9 +216,9 @@ LOCAL_SRC_FILES := \ selinux/libsepol/src/policydb.c \ selinux/libsepol/src/policydb_convert.c \ selinux/libsepol/src/policydb_public.c \ + selinux/libsepol/src/policydb_validate.c \ selinux/libsepol/src/port_record.c \ selinux/libsepol/src/ports.c \ - selinux/libsepol/src/roles.c \ selinux/libsepol/src/services.c \ selinux/libsepol/src/sidtab.c \ selinux/libsepol/src/symtab.c \ @@ -246,7 +245,9 @@ LOCAL_SRC_FILES := \ selinux/libsepol/cil/src/cil_strpool.c \ selinux/libsepol/cil/src/cil_symtab.c \ selinux/libsepol/cil/src/cil_tree.c \ - selinux/libsepol/cil/src/cil_verify.c + selinux/libsepol/cil/src/cil_verify.c \ + selinux/libsepol/cil/src/cil_write_ast.c + LOCAL_CFLAGS := -Dgetline=__getline -Wno-implicit-function-declaration include $(BUILD_STATIC_LIBRARY) diff --git a/native/jni/external/selinux b/native/jni/external/selinux index 969114cff..d0f582372 160000 --- a/native/jni/external/selinux +++ b/native/jni/external/selinux @@ -1 +1 @@ -Subproject commit 969114cff6ee973f47a3c84cacdef77e504d7bd9 +Subproject commit d0f582372b0bafe0fe0cf7bb12f9e88857d65b92 diff --git a/native/jni/magiskpolicy/policydb.cpp b/native/jni/magiskpolicy/policydb.cpp index ef39852cd..2438d7e96 100644 --- a/native/jni/magiskpolicy/policydb.cpp +++ b/native/jni/magiskpolicy/policydb.cpp @@ -110,7 +110,7 @@ sepolicy *sepolicy::compile_split() { #if MAGISK_DEBUG cil_set_log_level(CIL_INFO); #endif - cil_set_log_handler(+[](int lvl, char* msg) { + cil_set_log_handler(+[](int lvl, const char *msg) { if (lvl == CIL_ERR) { LOGE("cil: %s", msg); } else if (lvl == CIL_WARN) {