Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
SE Android policy.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephensmalley committed Jan 4, 2012
0 parents commit 2dd4e51
Show file tree
Hide file tree
Showing 48 changed files with 2,761 additions and 0 deletions.
34 changes: 34 additions & 0 deletions Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

# SELinux policy version.
# Must be <= /selinux/policyvers reported by the Android kernel.
# Must be within the compatibility range reported by checkpolicy -V.
POLICYVERS := 24

MLS_SENS=1
MLS_CATS=1024

file := $(TARGET_ROOT_OUT)/policy.$(POLICYVERS)
$(file) : $(LOCAL_PATH)/policy.$(POLICYVERS) | $(ACP)
$(transform-prebuilt-to-target)
ALL_PREBUILT += $(file)
$(INSTALLED_RAMDISK_TARGET): $(file)

$(LOCAL_PATH)/policy.$(POLICYVERS): $(LOCAL_PATH)/policy.conf
checkpolicy -M -c $(POLICYVERS) -o $@ $<

$(LOCAL_PATH)/policy.conf: $(wildcard $(addprefix $(LOCAL_PATH)/,security_classes initial_sids access_vectors global_macros mls_macros mls policy_capabilities te_macros attributes *.te roles users ocontexts))
m4 -D mls_num_sens=$(MLS_SENS) -D mls_num_cats=$(MLS_CATS) -s $^ > $@

file := $(TARGET_ROOT_OUT)/file_contexts
$(file) : $(LOCAL_PATH)/file_contexts | $(ACP)
$(transform-prebuilt-to-target)
ALL_PREBUILT += $(file)
$(INSTALLED_RAMDISK_TARGET): $(file)

file := $(TARGET_ROOT_OUT)/seapp_contexts
$(file) : $(LOCAL_PATH)/seapp_contexts | $(ACP)
$(transform-prebuilt-to-target)
ALL_PREBUILT += $(file)
$(INSTALLED_RAMDISK_TARGET): $(file)
Loading

0 comments on commit 2dd4e51

Please sign in to comment.