Fix build with modern NDK and policy parsing on newer Android devices#19
Open
datalocaltmp wants to merge 1 commit into
Open
Fix build with modern NDK and policy parsing on newer Android devices#19datalocaltmp wants to merge 1 commit into
datalocaltmp wants to merge 1 commit into
Conversation
NDK build fixes: - Application.mk: drop deprecated ABIs (armeabi, mips, mips64) and bump APP_PLATFORM to android-21, required by NDK r23+ - libapol/util.c: guard swab() definition with #ifndef __BIONIC__ since newer Bionic already defines it as an inline in <unistd.h> - libapol/render.c: add #include <unistd.h> so the Bionic inline swab() is visible at compile time (fixes linker error in render.c) Policy parsing fixes: - libsepol/avtab.h: add AVTAB_XPERMS_NLMSG (0x03) for netlink message extended permissions added in newer kernels - libsepol/avtab.c: add AVTAB_NEVERALLOW and AVTAB_XPERMS_NEVERALLOW to spec_order[] so runtime-neverallow policy entries are accepted; extend XPERMS read branch to cover AVTAB_XPERMS_NEVERALLOW; add AVTAB_XPERMS_NLMSG to the Android-M compat heuristic exclusion list so policies containing nlmsg xperms entries are not mistakenly parsed in compat mode (which consumed one fewer byte per entry, desyncing the entire avtab stream) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NDK build fixes:
Policy parsing fixes: