Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 1 | LOCAL_PATH:= $(call my-dir) |
William Roberts | f0e0a94 | 2012-08-27 15:41:15 -0700 | [diff] [blame] | 2 | |
Dan Cashman | 6f14f6b | 2017-04-07 16:36:23 -0700 | [diff] [blame] | 3 | # PLATFORM_SEPOLICY_VERSION is a number of the form "NN.m" with "NN" mapping to |
| 4 | # PLATFORM_SDK_VERSION and "m" as a minor number which allows for SELinux |
| 5 | # changes independent of PLATFORM_SDK_VERSION. This value will be set to |
| 6 | # 10000.0 to represent tip-of-tree development that is inherently unstable and |
| 7 | # thus designed not to work with any shipping vendor policy. This is similar in |
| 8 | # spirit to how DEFAULT_APP_TARGET_SDK is set. |
| 9 | # The minor version ('m' component) must be updated every time a platform release |
| 10 | # is made which breaks compatibility with the previous platform sepolicy version, |
| 11 | # not just on every increase in PLATFORM_SDK_VERSION. The minor version should |
| 12 | # be reset to 0 on every bump of the PLATFORM_SDK_VERSION. |
Ian Pedowitz | 4816b8f | 2017-05-04 00:09:57 +0000 | [diff] [blame] | 13 | sepolicy_major_vers := 26 |
Dan Cashman | 6f14f6b | 2017-04-07 16:36:23 -0700 | [diff] [blame] | 14 | sepolicy_minor_vers := 0 |
| 15 | |
| 16 | ifneq ($(sepolicy_major_vers), $(PLATFORM_SDK_VERSION)) |
| 17 | $(error sepolicy_major_version does not match PLATFORM_SDK_VERSION, please update.) |
| 18 | endif |
| 19 | ifneq (REL,$(PLATFORM_VERSION_CODENAME)) |
| 20 | sepolicy_major_vers := 10000 |
| 21 | sepolicy_minor_vers := 0 |
| 22 | endif |
| 23 | PLATFORM_SEPOLICY_VERSION := $(join $(addsuffix .,$(sepolicy_major_vers)), $(sepolicy_minor_vers)) |
| 24 | sepolicy_major_vers := |
| 25 | sepolicy_minor_vers := |
| 26 | |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 27 | include $(CLEAR_VARS) |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 28 | # SELinux policy version. |
Stephen Smalley | b4f1706 | 2015-03-13 10:03:52 -0400 | [diff] [blame] | 29 | # Must be <= /sys/fs/selinux/policyvers reported by the Android kernel. |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 30 | # Must be within the compatibility range reported by checkpolicy -V. |
Jeff Vander Stoep | 3a0ce49 | 2015-12-07 08:30:43 -0800 | [diff] [blame] | 31 | POLICYVERS ?= 30 |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 32 | |
| 33 | MLS_SENS=1 |
| 34 | MLS_CATS=1024 |
| 35 | |
Stephen Smalley | b4f1706 | 2015-03-13 10:03:52 -0400 | [diff] [blame] | 36 | ifdef BOARD_SEPOLICY_REPLACE |
| 37 | $(error BOARD_SEPOLICY_REPLACE is no longer supported; please remove from your BoardConfig.mk or other .mk file.) |
| 38 | endif |
| 39 | |
| 40 | ifdef BOARD_SEPOLICY_IGNORE |
| 41 | $(error BOARD_SEPOLICY_IGNORE is no longer supported; please remove from your BoardConfig.mk or other .mk file.) |
| 42 | endif |
Stephen Smalley | 5b340be | 2012-03-06 11:12:41 -0500 | [diff] [blame] | 43 | |
Stephen Smalley | 8e0ca88 | 2015-04-01 10:14:56 -0400 | [diff] [blame] | 44 | ifdef BOARD_SEPOLICY_UNION |
| 45 | $(warning BOARD_SEPOLICY_UNION is no longer required - all files found in BOARD_SEPOLICY_DIRS are implicitly unioned; please remove from your BoardConfig.mk or other .mk file.) |
| 46 | endif |
Robert Craig | 6b0ff47 | 2014-01-29 13:10:58 -0500 | [diff] [blame] | 47 | |
William Roberts | d218558 | 2015-07-16 11:28:02 -0700 | [diff] [blame] | 48 | ifdef BOARD_SEPOLICY_M4DEFS |
| 49 | LOCAL_ADDITIONAL_M4DEFS := $(addprefix -D, $(BOARD_SEPOLICY_M4DEFS)) |
| 50 | endif |
| 51 | |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 52 | # sepolicy is now divided into multiple portions: |
| 53 | # public - policy exported on which non-platform policy developers may write |
| 54 | # additional policy. types and attributes are versioned and included in |
| 55 | # delivered non-platform policy, which is to be combined with platform policy. |
| 56 | # private - platform-only policy required for platform functionality but which |
| 57 | # is not exported to vendor policy developers and as such may not be assumed |
| 58 | # to exist. |
Alex Klyubin | 5596172 | 2017-01-30 18:44:59 -0800 | [diff] [blame] | 59 | # vendor - vendor-only policy required for vendor functionality. This policy can |
| 60 | # reference the public policy but cannot reference the private policy. This |
| 61 | # policy is for components which are produced from the core/non-vendor tree and |
| 62 | # placed into a vendor partition. |
dcashman | 0779155 | 2016-12-07 11:27:47 -0800 | [diff] [blame] | 63 | # mapping - This contains policy statements which map the attributes |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 64 | # exposed in the public policy of previous versions to the concrete types used |
| 65 | # in this policy to ensure that policy targeting attributes from public |
| 66 | # policy from an older platform version continues to work. |
| 67 | |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 68 | # build process for device: |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 69 | # 1) convert policies to CIL: |
| 70 | # - private + public platform policy to CIL |
| 71 | # - mapping file to CIL (should already be in CIL form) |
| 72 | # - non-platform public policy to CIL |
| 73 | # - non-platform public + private policy to CIL |
| 74 | # 2) attributize policy |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 75 | # - run script which takes non-platform public and non-platform combined |
| 76 | # private + public policy and produces attributized and versioned |
| 77 | # non-platform policy |
| 78 | # 3) combine policy files |
| 79 | # - combine mapping, platform and non-platform policy. |
| 80 | # - compile output binary policy file |
| 81 | |
| 82 | PLAT_PUBLIC_POLICY := $(LOCAL_PATH)/public |
Dan Cashman | 51455fe | 2017-05-23 14:47:16 -0700 | [diff] [blame^] | 83 | ifneq ( ,$(BOARD_PLAT_PUBLIC_SEPOLICY_DIR)) |
| 84 | ifneq (1, $(words $(BOARD_PLAT_PUBLIC_SEPOLICY_DIR))) |
| 85 | $(error BOARD_PLAT_PUBLIC_SEPOLICY_DIR must only contain one directory) |
| 86 | else |
| 87 | PLAT_PUBLIC_POLICY += $(BOARD_PLAT_PUBLIC_SEPOLICY_DIR) |
| 88 | endif |
| 89 | endif |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 90 | PLAT_PRIVATE_POLICY := $(LOCAL_PATH)/private |
Dan Cashman | 51455fe | 2017-05-23 14:47:16 -0700 | [diff] [blame^] | 91 | ifneq ( ,$(BOARD_PLAT_PRIVATE_SEPOLICY_DIR)) |
| 92 | ifneq (1, $(words $(BOARD_PLAT_PRIVATE_SEPOLICY_DIR))) |
| 93 | $(error BOARD_PLAT_PRIVATE_SEPOLICY_DIR must only contain one directory) |
| 94 | else |
| 95 | PLAT_PRIVATE_POLICY += $(BOARD_PLAT_PRIVATE_SEPOLICY_DIR) |
| 96 | endif |
| 97 | endif |
Alex Klyubin | 5596172 | 2017-01-30 18:44:59 -0800 | [diff] [blame] | 98 | PLAT_VENDOR_POLICY := $(LOCAL_PATH)/vendor |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 99 | REQD_MASK_POLICY := $(LOCAL_PATH)/reqd_mask |
| 100 | |
| 101 | # TODO: move to README when doing the README update and finalizing versioning. |
Sandeep Patil | 42f9598 | 2017-04-07 14:18:48 -0700 | [diff] [blame] | 102 | # BOARD_SEPOLICY_VERS must take the format "NN.m" and contain the sepolicy |
| 103 | # version identifier corresponding to the sepolicy on which the non-platform |
| 104 | # policy is to be based. If unspecified, this will build against the current |
| 105 | # public platform policy in tree |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 106 | ifndef BOARD_SEPOLICY_VERS |
| 107 | $(warning BOARD_SEPOLICY_VERS not specified, assuming current platform version) |
Sandeep Patil | 42f9598 | 2017-04-07 14:18:48 -0700 | [diff] [blame] | 108 | # The default platform policy version. |
Dan Cashman | 6f14f6b | 2017-04-07 16:36:23 -0700 | [diff] [blame] | 109 | BOARD_SEPOLICY_VERS := $(PLATFORM_SEPOLICY_VERSION) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 110 | endif |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 111 | |
Dan Cashman | 4d24a77 | 2017-04-12 14:28:34 -0700 | [diff] [blame] | 112 | |
| 113 | platform_mapping_file := $(BOARD_SEPOLICY_VERS).cil |
| 114 | |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 115 | ########################################################### |
| 116 | # Compute policy files to be used in policy build. |
| 117 | # $(1): files to include |
| 118 | # $(2): directories in which to find files |
| 119 | ########################################################### |
| 120 | |
| 121 | define build_policy |
| 122 | $(foreach type, $(1), $(foreach file, $(addsuffix /$(type), $(2)), $(sort $(wildcard $(file))))) |
| 123 | endef |
William Roberts | 29d1468 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 124 | |
William Roberts | 49693f1 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 125 | # Builds paths for all policy files found in BOARD_SEPOLICY_DIRS. |
| 126 | # $(1): the set of policy name paths to build |
Alex Klyubin | 5596172 | 2017-01-30 18:44:59 -0800 | [diff] [blame] | 127 | build_device_policy = $(call build_policy, $(1), $(PLAT_VENDOR_POLICY) $(BOARD_SEPOLICY_DIRS)) |
William Roberts | 49693f1 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 128 | |
Richard Haines | c8801fe | 2015-12-11 10:39:19 +0000 | [diff] [blame] | 129 | # Add a file containing only a newline in-between each policy configuration |
| 130 | # 'contexts' file. This will allow OEM policy configuration files without a |
| 131 | # final newline (0x0A) to be built correctly by the m4(1) macro processor. |
| 132 | # $(1): the set of contexts file names. |
| 133 | # $(2): the file containing only 0x0A. |
| 134 | add_nl = $(foreach entry, $(1), $(subst $(entry), $(entry) $(2), $(entry))) |
| 135 | |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 136 | sepolicy_build_files := security_classes \ |
| 137 | initial_sids \ |
| 138 | access_vectors \ |
| 139 | global_macros \ |
Nick Kralevich | a17a266 | 2014-11-05 15:30:41 -0800 | [diff] [blame] | 140 | neverallow_macros \ |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 141 | mls_macros \ |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 142 | mls_decl \ |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 143 | mls \ |
| 144 | policy_capabilities \ |
| 145 | te_macros \ |
| 146 | attributes \ |
Jeff Vander Stoep | cbaa2b7 | 2015-12-22 10:39:34 -0800 | [diff] [blame] | 147 | ioctl_defines \ |
Jeff Vander Stoep | de9b530 | 2015-06-05 15:28:55 -0700 | [diff] [blame] | 148 | ioctl_macros \ |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 149 | *.te \ |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 150 | roles_decl \ |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 151 | roles \ |
| 152 | users \ |
| 153 | initial_sid_contexts \ |
| 154 | fs_use \ |
| 155 | genfs_contexts \ |
| 156 | port_contexts |
| 157 | |
Alex Klyubin | 7cda44f | 2017-03-21 14:28:53 -0700 | [diff] [blame] | 158 | # CIL files which contain workarounds for current limitation of human-readable |
| 159 | # module policy language. These files are appended to the CIL files produced |
| 160 | # from module language files. |
| 161 | sepolicy_build_cil_workaround_files := technical_debt.cil |
| 162 | |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 163 | my_target_arch := $(TARGET_ARCH) |
| 164 | ifneq (,$(filter mips mips64,$(TARGET_ARCH))) |
| 165 | my_target_arch := mips |
| 166 | endif |
| 167 | |
Jeff Vander Stoep | d2053bd | 2017-03-15 13:37:35 -0700 | [diff] [blame] | 168 | intermediates := $(TARGET_OUT_INTERMEDIATES)/ETC/sepolicy_intermediates |
| 169 | |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 170 | with_asan := false |
| 171 | ifneq (,$(filter address,$(SANITIZE_TARGET))) |
| 172 | with_asan := true |
| 173 | endif |
| 174 | |
Dan Cashman | 4f9a648 | 2017-04-10 12:27:18 -0700 | [diff] [blame] | 175 | include $(CLEAR_VARS) |
| 176 | LOCAL_MODULE := selinux_policy |
| 177 | LOCAL_MODULE_TAGS := optional |
| 178 | # Include SELinux policy. We do this here because different modules |
| 179 | # need to be included based on the value of PRODUCT_FULL_TREBLE. This |
| 180 | # type of conditional inclusion cannot be done in top-level files such |
| 181 | # as build/target/product/embedded.mk. |
| 182 | # This conditional inclusion closely mimics the conditional logic |
| 183 | # inside init/init.cpp for loading SELinux policy from files. |
| 184 | ifeq ($(PRODUCT_FULL_TREBLE),true) |
| 185 | |
Dan Cashman | 4f9a648 | 2017-04-10 12:27:18 -0700 | [diff] [blame] | 186 | # Use split SELinux policy |
| 187 | LOCAL_REQUIRED_MODULES += \ |
| 188 | $(platform_mapping_file) \ |
| 189 | nonplat_sepolicy.cil \ |
| 190 | plat_sepolicy.cil \ |
| 191 | plat_and_mapping_sepolicy.cil.sha256 \ |
| 192 | secilc \ |
| 193 | nonplat_file_contexts \ |
| 194 | plat_file_contexts \ |
| 195 | plat_sepolicy_vers.txt |
| 196 | |
| 197 | # Include precompiled policy, unless told otherwise |
| 198 | ifneq ($(PRODUCT_PRECOMPILED_SEPOLICY),false) |
| 199 | LOCAL_REQUIRED_MODULES += precompiled_sepolicy precompiled_sepolicy.plat_and_mapping.sha256 |
| 200 | endif |
| 201 | |
| 202 | else |
| 203 | # Use monolithic SELinux policy |
| 204 | LOCAL_REQUIRED_MODULES += sepolicy \ |
| 205 | file_contexts.bin |
| 206 | endif |
| 207 | include $(BUILD_PHONY_PACKAGE) |
| 208 | |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 209 | ################################## |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 210 | # reqd_policy_mask - a policy.conf file which contains only the bare minimum |
| 211 | # policy necessary to use checkpolicy. This bare-minimum policy needs to be |
| 212 | # present in all policy.conf files, but should not necessarily be exported as |
| 213 | # part of the public policy. The rules generated by reqd_policy_mask will allow |
| 214 | # the compilation of public policy and subsequent removal of CIL policy that |
| 215 | # should not be exported. |
| 216 | |
| 217 | reqd_policy_mask.conf := $(intermediates)/reqd_policy_mask.conf |
| 218 | $(reqd_policy_mask.conf): PRIVATE_MLS_SENS := $(MLS_SENS) |
| 219 | $(reqd_policy_mask.conf): PRIVATE_MLS_CATS := $(MLS_CATS) |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 220 | $(reqd_policy_mask.conf): PRIVATE_TGT_ARCH := $(my_target_arch) |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 221 | $(reqd_policy_mask.conf): PRIVATE_TGT_WITH_ASAN := $(with_asan) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 222 | $(reqd_policy_mask.conf): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 223 | $(reqd_policy_mask.conf): $(call build_policy, $(sepolicy_build_files), $(REQD_MASK_POLICY)) |
| 224 | @mkdir -p $(dir $@) |
| 225 | $(hide) m4 $(PRIVATE_ADDITIONAL_M4DEFS) \ |
| 226 | -D mls_num_sens=$(PRIVATE_MLS_SENS) -D mls_num_cats=$(PRIVATE_MLS_CATS) \ |
| 227 | -D target_build_variant=$(TARGET_BUILD_VARIANT) \ |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 228 | -D target_with_dexpreopt=$(WITH_DEXPREOPT) \ |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 229 | -D target_arch=$(PRIVATE_TGT_ARCH) \ |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 230 | -D target_with_asan=$(PRIVATE_TGT_WITH_ASAN) \ |
Alex Klyubin | f5446eb | 2017-03-23 14:27:32 -0700 | [diff] [blame] | 231 | -D target_full_treble=$(PRODUCT_FULL_TREBLE) \ |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 232 | -s $^ > $@ |
| 233 | |
| 234 | reqd_policy_mask.cil := $(intermediates)/reqd_policy_mask.cil |
| 235 | $(reqd_policy_mask.cil): $(reqd_policy_mask.conf) $(HOST_OUT_EXECUTABLES)/checkpolicy |
| 236 | @mkdir -p $(dir $@) |
| 237 | $(hide) $(HOST_OUT_EXECUTABLES)/checkpolicy -C -M -c $(POLICYVERS) -o $@ $< |
| 238 | |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 239 | reqd_policy_mask.conf := |
| 240 | |
| 241 | ################################## |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 242 | # plat_pub_policy - policy that will be exported to be a part of non-platform |
| 243 | # policy corresponding to this platform version. This is a limited subset of |
| 244 | # policy that would not compile in checkpolicy on its own. To get around this |
| 245 | # limitation, add only the required files from private policy, which will |
| 246 | # generate CIL policy that will then be filtered out by the reqd_policy_mask. |
| 247 | plat_pub_policy.conf := $(intermediates)/plat_pub_policy.conf |
| 248 | $(plat_pub_policy.conf): PRIVATE_MLS_SENS := $(MLS_SENS) |
| 249 | $(plat_pub_policy.conf): PRIVATE_MLS_CATS := $(MLS_CATS) |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 250 | $(plat_pub_policy.conf): PRIVATE_TGT_ARCH := $(my_target_arch) |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 251 | $(plat_pub_policy.conf): PRIVATE_TGT_WITH_ASAN := $(with_asan) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 252 | $(plat_pub_policy.conf): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 253 | $(plat_pub_policy.conf): $(call build_policy, $(sepolicy_build_files), \ |
Dan Cashman | 6bf50e5 | 2017-04-12 11:12:17 -0700 | [diff] [blame] | 254 | $(PLAT_PUBLIC_POLICY) $(REQD_MASK_POLICY)) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 255 | @mkdir -p $(dir $@) |
| 256 | $(hide) m4 $(PRIVATE_ADDITIONAL_M4DEFS) \ |
| 257 | -D mls_num_sens=$(PRIVATE_MLS_SENS) -D mls_num_cats=$(PRIVATE_MLS_CATS) \ |
| 258 | -D target_build_variant=$(TARGET_BUILD_VARIANT) \ |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 259 | -D target_with_dexpreopt=$(WITH_DEXPREOPT) \ |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 260 | -D target_arch=$(PRIVATE_TGT_ARCH) \ |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 261 | -D target_with_asan=$(PRIVATE_TGT_WITH_ASAN) \ |
Alex Klyubin | f5446eb | 2017-03-23 14:27:32 -0700 | [diff] [blame] | 262 | -D target_full_treble=$(PRODUCT_FULL_TREBLE) \ |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 263 | -s $^ > $@ |
| 264 | |
| 265 | plat_pub_policy.cil := $(intermediates)/plat_pub_policy.cil |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 266 | $(plat_pub_policy.cil): PRIVATE_POL_CONF := $(plat_pub_policy.conf) |
| 267 | $(plat_pub_policy.cil): PRIVATE_REQD_MASK := $(reqd_policy_mask.cil) |
| 268 | $(plat_pub_policy.cil): $(HOST_OUT_EXECUTABLES)/checkpolicy $(plat_pub_policy.conf) $(reqd_policy_mask.cil) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 269 | @mkdir -p $(dir $@) |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 270 | $(hide) $< -C -M -c $(POLICYVERS) -o $@.tmp $(PRIVATE_POL_CONF) |
| 271 | $(hide) grep -Fxv -f $(PRIVATE_REQD_MASK) $@.tmp > $@ |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 272 | |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 273 | plat_pub_policy.conf := |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 274 | |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 275 | ################################## |
| 276 | include $(CLEAR_VARS) |
| 277 | |
| 278 | LOCAL_MODULE := sectxfile_nl |
| 279 | LOCAL_MODULE_CLASS := ETC |
| 280 | LOCAL_MODULE_TAGS := optional |
| 281 | |
| 282 | # Create a file containing newline only to add between context config files |
| 283 | include $(BUILD_SYSTEM)/base_rules.mk |
| 284 | $(LOCAL_BUILT_MODULE): |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 285 | @mkdir -p $(dir $@) |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 286 | $(hide) echo > $@ |
| 287 | |
| 288 | built_nl := $(LOCAL_BUILT_MODULE) |
| 289 | |
| 290 | ################################# |
| 291 | include $(CLEAR_VARS) |
| 292 | |
| 293 | LOCAL_MODULE := plat_sepolicy.cil |
| 294 | LOCAL_MODULE_CLASS := ETC |
| 295 | LOCAL_MODULE_TAGS := optional |
Alex Klyubin | 052b0bb | 2017-03-02 12:39:25 -0800 | [diff] [blame] | 296 | LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/selinux |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 297 | |
| 298 | include $(BUILD_SYSTEM)/base_rules.mk |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 299 | |
| 300 | # plat_policy.conf - A combination of the private and public platform policy |
| 301 | # which will ship with the device. The platform will always reflect the most |
| 302 | # recent platform version and is not currently being attributized. |
| 303 | plat_policy.conf := $(intermediates)/plat_policy.conf |
| 304 | $(plat_policy.conf): PRIVATE_MLS_SENS := $(MLS_SENS) |
| 305 | $(plat_policy.conf): PRIVATE_MLS_CATS := $(MLS_CATS) |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 306 | $(plat_policy.conf): PRIVATE_TGT_ARCH := $(my_target_arch) |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 307 | $(plat_policy.conf): PRIVATE_TGT_WITH_ASAN := $(with_asan) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 308 | $(plat_policy.conf): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 309 | $(plat_policy.conf): $(call build_policy, $(sepolicy_build_files), \ |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 310 | $(PLAT_PUBLIC_POLICY) $(PLAT_PRIVATE_POLICY)) |
| 311 | @mkdir -p $(dir $@) |
| 312 | $(hide) m4 $(PRIVATE_ADDITIONAL_M4DEFS) \ |
| 313 | -D mls_num_sens=$(PRIVATE_MLS_SENS) -D mls_num_cats=$(PRIVATE_MLS_CATS) \ |
| 314 | -D target_build_variant=$(TARGET_BUILD_VARIANT) \ |
Jorge Lucangeli Obes | 84db84e | 2016-11-18 08:42:35 -0500 | [diff] [blame] | 315 | -D target_with_dexpreopt=$(WITH_DEXPREOPT) \ |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 316 | -D target_arch=$(PRIVATE_TGT_ARCH) \ |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 317 | -D target_with_asan=$(PRIVATE_TGT_WITH_ASAN) \ |
Alex Klyubin | f5446eb | 2017-03-23 14:27:32 -0700 | [diff] [blame] | 318 | -D target_full_treble=$(PRODUCT_FULL_TREBLE) \ |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 319 | -s $^ > $@ |
| 320 | $(hide) sed '/dontaudit/d' $@ > $@.dontaudit |
| 321 | |
Jeff Vander Stoep | b878769 | 2017-04-21 15:57:07 -0700 | [diff] [blame] | 322 | $(LOCAL_BUILT_MODULE): PRIVATE_ADDITIONAL_CIL_FILES := \ |
Alex Klyubin | 7cda44f | 2017-03-21 14:28:53 -0700 | [diff] [blame] | 323 | $(call build_policy, $(sepolicy_build_cil_workaround_files), $(PLAT_PRIVATE_POLICY)) |
Jeff Vander Stoep | b878769 | 2017-04-21 15:57:07 -0700 | [diff] [blame] | 324 | $(LOCAL_BUILT_MODULE): $(plat_policy.conf) $(HOST_OUT_EXECUTABLES)/checkpolicy \ |
| 325 | $(HOST_OUT_EXECUTABLES)/secilc \ |
Alex Klyubin | 7cda44f | 2017-03-21 14:28:53 -0700 | [diff] [blame] | 326 | $(call build_policy, $(sepolicy_build_cil_workaround_files), $(PLAT_PRIVATE_POLICY)) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 327 | @mkdir -p $(dir $@) |
dcashman | 0779155 | 2016-12-07 11:27:47 -0800 | [diff] [blame] | 328 | $(hide) $(HOST_OUT_EXECUTABLES)/checkpolicy -M -C -c $(POLICYVERS) -o $@ $< |
Alex Klyubin | 7cda44f | 2017-03-21 14:28:53 -0700 | [diff] [blame] | 329 | $(hide) cat $(PRIVATE_ADDITIONAL_CIL_FILES) >> $@ |
Jeff Vander Stoep | b878769 | 2017-04-21 15:57:07 -0700 | [diff] [blame] | 330 | $(hide) $(HOST_OUT_EXECUTABLES)/secilc -M true -G -N -c $(POLICYVERS) $@ -o /dev/null -f /dev/null |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 331 | |
Alex Klyubin | 8f7173b | 2017-02-25 14:47:53 -0800 | [diff] [blame] | 332 | built_plat_cil := $(LOCAL_BUILT_MODULE) |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 333 | plat_policy.conf := |
| 334 | |
| 335 | ################################# |
| 336 | include $(CLEAR_VARS) |
| 337 | |
Dan Cashman | 4f9a648 | 2017-04-10 12:27:18 -0700 | [diff] [blame] | 338 | LOCAL_MODULE := plat_sepolicy_vers.txt |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 339 | LOCAL_MODULE_CLASS := ETC |
| 340 | LOCAL_MODULE_TAGS := optional |
Dan Cashman | 4f9a648 | 2017-04-10 12:27:18 -0700 | [diff] [blame] | 341 | LOCAL_PROPRIETARY_MODULE := true |
| 342 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
| 343 | |
| 344 | include $(BUILD_SYSTEM)/base_rules.mk |
| 345 | |
| 346 | $(LOCAL_BUILT_MODULE) : PRIVATE_PLAT_SEPOL_VERS := $(BOARD_SEPOLICY_VERS) |
| 347 | $(LOCAL_BUILT_MODULE) : |
| 348 | mkdir -p $(dir $@) |
| 349 | echo $(PRIVATE_PLAT_SEPOL_VERS) > $@ |
| 350 | |
| 351 | ################################# |
| 352 | include $(CLEAR_VARS) |
| 353 | |
| 354 | LOCAL_MODULE := $(platform_mapping_file) |
| 355 | LOCAL_MODULE_CLASS := ETC |
| 356 | LOCAL_MODULE_TAGS := optional |
| 357 | LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/selinux/mapping |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 358 | |
| 359 | include $(BUILD_SYSTEM)/base_rules.mk |
| 360 | |
Dan Cashman | 1b0a71f | 2017-05-08 14:26:52 -0700 | [diff] [blame] | 361 | current_mapping.cil := $(intermediates)/mapping/$(PLATFORM_SEPOLICY_VERSION).cil |
| 362 | ifeq ($(BOARD_SEPOLICY_VERS), $(PLATFORM_SEPOLICY_VERSION)) |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 363 | # auto-generate the mapping file for current platform policy, since it needs to |
| 364 | # track platform policy development |
Dan Cashman | 6f14f6b | 2017-04-07 16:36:23 -0700 | [diff] [blame] | 365 | $(current_mapping.cil) : PRIVATE_VERS := $(PLATFORM_SEPOLICY_VERSION) |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 366 | $(current_mapping.cil) : $(plat_pub_policy.cil) $(HOST_OUT_EXECUTABLES)/version_policy |
| 367 | @mkdir -p $(dir $@) |
| 368 | $(hide) $(HOST_OUT_EXECUTABLES)/version_policy -b $< -m -n $(PRIVATE_VERS) -o $@ |
| 369 | |
Dan Cashman | 1b0a71f | 2017-05-08 14:26:52 -0700 | [diff] [blame] | 370 | else # ifeq ($(BOARD_SEPOLICY_VERS), $(PLATFORM_SEPOLICY_VERSION)) |
| 371 | prebuilt_mapping_files := $(wildcard $(addsuffix /mapping/$(BOARD_SEPOLICY_VERS).cil, $(PLAT_PRIVATE_POLICY))) |
| 372 | $(current_mapping.cil) : $(prebuilt_mapping_files) |
| 373 | @mkdir -p $(dir $@) |
| 374 | cat $^ > $@ |
Sandeep Patil | 42f9598 | 2017-04-07 14:18:48 -0700 | [diff] [blame] | 375 | |
Dan Cashman | 1b0a71f | 2017-05-08 14:26:52 -0700 | [diff] [blame] | 376 | prebuilt_mapping_files := |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 377 | endif |
| 378 | |
Dan Cashman | 1b0a71f | 2017-05-08 14:26:52 -0700 | [diff] [blame] | 379 | $(LOCAL_BUILT_MODULE): $(current_mapping.cil) $(ACP) |
Jeff Vander Stoep | b878769 | 2017-04-21 15:57:07 -0700 | [diff] [blame] | 380 | $(hide) $(ACP) $< $@ |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 381 | |
Alex Klyubin | 8f7173b | 2017-02-25 14:47:53 -0800 | [diff] [blame] | 382 | built_mapping_cil := $(LOCAL_BUILT_MODULE) |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 383 | current_mapping.cil := |
| 384 | |
| 385 | ################################# |
| 386 | include $(CLEAR_VARS) |
| 387 | |
Dan Cashman | 0e9c47c | 2017-04-04 14:27:41 -0700 | [diff] [blame] | 388 | LOCAL_MODULE := plat_and_mapping_sepolicy.cil.sha256 |
| 389 | LOCAL_MODULE_CLASS := ETC |
| 390 | LOCAL_MODULE_TAGS := optional |
| 391 | LOCAL_MODULE_PATH = $(TARGET_OUT)/etc/selinux |
| 392 | |
| 393 | include $(BUILD_SYSTEM)/base_rules.mk |
| 394 | |
| 395 | $(LOCAL_BUILT_MODULE): $(built_plat_cil) $(built_mapping_cil) |
| 396 | cat $^ | sha256sum | cut -d' ' -f1 > $@ |
| 397 | |
| 398 | ################################# |
| 399 | include $(CLEAR_VARS) |
| 400 | |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 401 | LOCAL_MODULE := nonplat_sepolicy.cil |
| 402 | LOCAL_MODULE_CLASS := ETC |
| 403 | LOCAL_MODULE_TAGS := optional |
Alex Klyubin | 052b0bb | 2017-03-02 12:39:25 -0800 | [diff] [blame] | 404 | LOCAL_PROPRIETARY_MODULE := true |
| 405 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 406 | |
| 407 | include $(BUILD_SYSTEM)/base_rules.mk |
| 408 | |
Alex Klyubin | 5596172 | 2017-01-30 18:44:59 -0800 | [diff] [blame] | 409 | # nonplat_policy.conf - A combination of the non-platform private, vendor and |
| 410 | # the exported platform policy associated with the version the non-platform |
| 411 | # policy targets. This needs attributization and to be combined with the |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 412 | # platform-provided policy. Like plat_pub_policy.conf, this needs to make use |
| 413 | # of the reqd_policy_mask files from private policy in order to use checkpolicy. |
| 414 | nonplat_policy.conf := $(intermediates)/nonplat_policy.conf |
| 415 | $(nonplat_policy.conf): PRIVATE_MLS_SENS := $(MLS_SENS) |
| 416 | $(nonplat_policy.conf): PRIVATE_MLS_CATS := $(MLS_CATS) |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 417 | $(nonplat_policy.conf): PRIVATE_TGT_ARCH := $(my_target_arch) |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 418 | $(nonplat_policy.conf): PRIVATE_TGT_WITH_ASAN := $(with_asan) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 419 | $(nonplat_policy.conf): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 420 | $(nonplat_policy.conf): $(call build_policy, $(sepolicy_build_files), \ |
Dan Cashman | 6bf50e5 | 2017-04-12 11:12:17 -0700 | [diff] [blame] | 421 | $(PLAT_PUBLIC_POLICY) $(REQD_MASK_POLICY) $(PLAT_VENDOR_POLICY) $(BOARD_SEPOLICY_DIRS)) |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 422 | @mkdir -p $(dir $@) |
William Roberts | d218558 | 2015-07-16 11:28:02 -0700 | [diff] [blame] | 423 | $(hide) m4 $(PRIVATE_ADDITIONAL_M4DEFS) \ |
| 424 | -D mls_num_sens=$(PRIVATE_MLS_SENS) -D mls_num_cats=$(PRIVATE_MLS_CATS) \ |
Nick Kralevich | 623975f | 2014-01-11 01:31:03 -0800 | [diff] [blame] | 425 | -D target_build_variant=$(TARGET_BUILD_VARIANT) \ |
Jorge Lucangeli Obes | 84db84e | 2016-11-18 08:42:35 -0500 | [diff] [blame] | 426 | -D target_with_dexpreopt=$(WITH_DEXPREOPT) \ |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 427 | -D target_arch=$(PRIVATE_TGT_ARCH) \ |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 428 | -D target_with_asan=$(PRIVATE_TGT_WITH_ASAN) \ |
Alex Klyubin | f5446eb | 2017-03-23 14:27:32 -0700 | [diff] [blame] | 429 | -D target_full_treble=$(PRODUCT_FULL_TREBLE) \ |
Nick Kralevich | 623975f | 2014-01-11 01:31:03 -0800 | [diff] [blame] | 430 | -s $^ > $@ |
Robert Craig | 65d4f44 | 2013-03-27 06:30:25 -0400 | [diff] [blame] | 431 | $(hide) sed '/dontaudit/d' $@ > $@.dontaudit |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 432 | |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 433 | nonplat_policy_raw := $(intermediates)/nonplat_policy_raw.cil |
| 434 | $(nonplat_policy_raw): PRIVATE_POL_CONF := $(nonplat_policy.conf) |
| 435 | $(nonplat_policy_raw): PRIVATE_REQD_MASK := $(reqd_policy_mask.cil) |
| 436 | $(nonplat_policy_raw): $(HOST_OUT_EXECUTABLES)/checkpolicy $(nonplat_policy.conf) \ |
| 437 | $(reqd_policy_mask.cil) |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 438 | @mkdir -p $(dir $@) |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 439 | $(hide) $< -C -M -c $(POLICYVERS) -o $@.tmp $(PRIVATE_POL_CONF) |
| 440 | $(hide) grep -Fxv -f $(PRIVATE_REQD_MASK) $@.tmp > $@ |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 441 | |
Jeff Vander Stoep | b878769 | 2017-04-21 15:57:07 -0700 | [diff] [blame] | 442 | $(LOCAL_BUILT_MODULE) : PRIVATE_VERS := $(BOARD_SEPOLICY_VERS) |
| 443 | $(LOCAL_BUILT_MODULE) : PRIVATE_TGT_POL := $(nonplat_policy_raw) |
| 444 | $(LOCAL_BUILT_MODULE) : PRIVATE_DEP_CIL_FILES := $(built_plat_cil) $(built_mapping_cil) |
| 445 | $(LOCAL_BUILT_MODULE) : $(plat_pub_policy.cil) $(nonplat_policy_raw) \ |
| 446 | $(HOST_OUT_EXECUTABLES)/version_policy $(HOST_OUT_EXECUTABLES)/secilc \ |
Jeff Vander Stoep | 5edd96d | 2017-04-24 16:46:40 -0700 | [diff] [blame] | 447 | $(built_plat_cil) $(built_mapping_cil) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 448 | @mkdir -p $(dir $@) |
| 449 | $(HOST_OUT_EXECUTABLES)/version_policy -b $< -t $(PRIVATE_TGT_POL) -n $(PRIVATE_VERS) -o $@ |
Jeff Vander Stoep | b878769 | 2017-04-21 15:57:07 -0700 | [diff] [blame] | 450 | $(hide) $(HOST_OUT_EXECUTABLES)/secilc -M true -G -N -c $(POLICYVERS) \ |
Alex Klyubin | 8f7173b | 2017-02-25 14:47:53 -0800 | [diff] [blame] | 451 | $(PRIVATE_DEP_CIL_FILES) $@ -o /dev/null -f /dev/null |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 452 | |
Alex Klyubin | 193dccd | 2017-03-07 14:05:57 -0800 | [diff] [blame] | 453 | built_nonplat_cil := $(LOCAL_BUILT_MODULE) |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 454 | nonplat_policy.conf := |
| 455 | nonplat_policy_raw := |
| 456 | |
| 457 | ################################# |
| 458 | include $(CLEAR_VARS) |
Alex Klyubin | 193dccd | 2017-03-07 14:05:57 -0800 | [diff] [blame] | 459 | |
| 460 | LOCAL_MODULE := precompiled_sepolicy |
| 461 | LOCAL_MODULE_CLASS := ETC |
| 462 | LOCAL_MODULE_TAGS := optional |
| 463 | LOCAL_PROPRIETARY_MODULE := true |
| 464 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
| 465 | |
| 466 | include $(BUILD_SYSTEM)/base_rules.mk |
| 467 | |
| 468 | $(LOCAL_BUILT_MODULE): PRIVATE_CIL_FILES := \ |
| 469 | $(built_plat_cil) $(built_mapping_cil) $(built_nonplat_cil) |
| 470 | $(LOCAL_BUILT_MODULE): $(HOST_OUT_EXECUTABLES)/secilc \ |
| 471 | $(built_plat_cil) $(built_mapping_cil) $(built_nonplat_cil) |
Jeff Vander Stoep | ac171b4 | 2017-04-12 17:01:54 -0700 | [diff] [blame] | 472 | $(hide) $(HOST_OUT_EXECUTABLES)/secilc -M true -G -c $(POLICYVERS) \ |
Alex Klyubin | 193dccd | 2017-03-07 14:05:57 -0800 | [diff] [blame] | 473 | $(PRIVATE_CIL_FILES) -o $@ -f /dev/null |
| 474 | |
| 475 | built_precompiled_sepolicy := $(LOCAL_BUILT_MODULE) |
| 476 | |
| 477 | ################################# |
Dan Cashman | 0e9c47c | 2017-04-04 14:27:41 -0700 | [diff] [blame] | 478 | # SHA-256 digest of the plat_sepolicy.cil and mapping_sepolicy.cil files against |
| 479 | # which precompiled_policy was built. |
Alex Klyubin | 193dccd | 2017-03-07 14:05:57 -0800 | [diff] [blame] | 480 | ################################# |
| 481 | include $(CLEAR_VARS) |
Dan Cashman | 0e9c47c | 2017-04-04 14:27:41 -0700 | [diff] [blame] | 482 | LOCAL_MODULE := precompiled_sepolicy.plat_and_mapping.sha256 |
Alex Klyubin | 193dccd | 2017-03-07 14:05:57 -0800 | [diff] [blame] | 483 | LOCAL_MODULE_CLASS := ETC |
| 484 | LOCAL_MODULE_TAGS := optional |
| 485 | LOCAL_PROPRIETARY_MODULE := true |
| 486 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
| 487 | |
| 488 | include $(BUILD_SYSTEM)/base_rules.mk |
| 489 | |
Dan Cashman | 0e9c47c | 2017-04-04 14:27:41 -0700 | [diff] [blame] | 490 | $(LOCAL_BUILT_MODULE): PRIVATE_CIL_FILES := $(built_plat_cil) $(built_mapping_cil) |
| 491 | $(LOCAL_BUILT_MODULE): $(built_precompiled_sepolicy) $(built_plat_cil) $(built_mapping_cil) |
| 492 | cat $(PRIVATE_CIL_FILES) | sha256sum | cut -d' ' -f1 > $@ |
Alex Klyubin | 193dccd | 2017-03-07 14:05:57 -0800 | [diff] [blame] | 493 | |
| 494 | ################################# |
| 495 | include $(CLEAR_VARS) |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 496 | # build this target so that we can still perform neverallow checks |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 497 | |
| 498 | LOCAL_MODULE := sepolicy |
| 499 | LOCAL_MODULE_CLASS := ETC |
| 500 | LOCAL_MODULE_TAGS := optional |
Daniel Cashman | 65d0134 | 2016-12-17 00:53:26 +0000 | [diff] [blame] | 501 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 502 | |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 503 | include $(BUILD_SYSTEM)/base_rules.mk |
| 504 | |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 505 | all_cil_files := \ |
Jeff Vander Stoep | b878769 | 2017-04-21 15:57:07 -0700 | [diff] [blame] | 506 | $(built_plat_cil) \ |
| 507 | $(built_mapping_cil) \ |
| 508 | $(built_nonplat_cil) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 509 | |
| 510 | $(LOCAL_BUILT_MODULE): PRIVATE_CIL_FILES := $(all_cil_files) |
| 511 | $(LOCAL_BUILT_MODULE): $(HOST_OUT_EXECUTABLES)/secilc $(HOST_OUT_EXECUTABLES)/sepolicy-analyze $(all_cil_files) |
| 512 | @mkdir -p $(dir $@) |
Jeff Vander Stoep | 748cae8 | 2017-04-13 14:16:29 -0700 | [diff] [blame] | 513 | $(hide) $< -M true -G -c $(POLICYVERS) $(PRIVATE_CIL_FILES) -o $@.tmp -f /dev/null |
Nick Kralevich | bca98ef | 2016-02-26 20:06:52 -0800 | [diff] [blame] | 514 | $(hide) $(HOST_OUT_EXECUTABLES)/sepolicy-analyze $@.tmp permissive > $@.permissivedomains |
| 515 | $(hide) if [ "$(TARGET_BUILD_VARIANT)" = "user" -a -s $@.permissivedomains ]; then \ |
| 516 | echo "==========" 1>&2; \ |
| 517 | echo "ERROR: permissive domains not allowed in user builds" 1>&2; \ |
| 518 | echo "List of invalid domains:" 1>&2; \ |
| 519 | cat $@.permissivedomains 1>&2; \ |
| 520 | exit 1; \ |
| 521 | fi |
| 522 | $(hide) mv $@.tmp $@ |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 523 | |
Ying Wang | d8b122c | 2012-10-25 19:01:31 -0700 | [diff] [blame] | 524 | built_sepolicy := $(LOCAL_BUILT_MODULE) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 525 | all_cil_files := |
Stephen Smalley | 01a58af | 2012-10-02 12:46:37 -0400 | [diff] [blame] | 526 | |
Alex Klyubin | 84aa742 | 2017-03-10 09:36:07 -0800 | [diff] [blame] | 527 | ################################# |
| 528 | include $(CLEAR_VARS) |
| 529 | |
| 530 | # keep concrete sepolicy for neverallow checks |
| 531 | |
| 532 | LOCAL_MODULE := sepolicy.recovery |
Alex Klyubin | ec78c37 | 2017-03-10 12:44:16 -0800 | [diff] [blame] | 533 | LOCAL_MODULE_STEM := sepolicy |
Alex Klyubin | 84aa742 | 2017-03-10 09:36:07 -0800 | [diff] [blame] | 534 | LOCAL_MODULE_CLASS := ETC |
| 535 | LOCAL_MODULE_TAGS := optional |
Alex Klyubin | ec78c37 | 2017-03-10 12:44:16 -0800 | [diff] [blame] | 536 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT) |
Alex Klyubin | 84aa742 | 2017-03-10 09:36:07 -0800 | [diff] [blame] | 537 | |
| 538 | include $(BUILD_SYSTEM)/base_rules.mk |
| 539 | |
Dan Cashman | c8d4535 | 2017-04-11 07:38:48 -0700 | [diff] [blame] | 540 | sepolicy.recovery.conf := $(intermediates)/sepolicy.recovery.conf |
| 541 | $(sepolicy.recovery.conf): PRIVATE_MLS_SENS := $(MLS_SENS) |
| 542 | $(sepolicy.recovery.conf): PRIVATE_MLS_CATS := $(MLS_CATS) |
| 543 | $(sepolicy.recovery.conf): PRIVATE_TGT_ARCH := $(my_target_arch) |
| 544 | $(sepolicy.recovery.conf): PRIVATE_TGT_WITH_ASAN := $(with_asan) |
| 545 | $(sepolicy.recovery.conf): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 546 | $(sepolicy.recovery.conf): $(call build_policy, $(sepolicy_build_files), \ |
| 547 | $(PLAT_PUBLIC_POLICY) $(PLAT_PRIVATE_POLICY) \ |
| 548 | $(PLAT_VENDOR_POLICY) $(BOARD_SEPOLICY_DIRS)) |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 549 | @mkdir -p $(dir $@) |
| 550 | $(hide) m4 $(PRIVATE_ADDITIONAL_M4DEFS) \ |
| 551 | -D mls_num_sens=$(PRIVATE_MLS_SENS) -D mls_num_cats=$(PRIVATE_MLS_CATS) \ |
| 552 | -D target_build_variant=$(TARGET_BUILD_VARIANT) \ |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 553 | -D target_with_dexpreopt=$(WITH_DEXPREOPT) \ |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 554 | -D target_arch=$(PRIVATE_TGT_ARCH) \ |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 555 | -D target_with_asan=$(PRIVATE_TGT_WITH_ASAN) \ |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 556 | -D target_recovery=true \ |
| 557 | -s $^ > $@ |
| 558 | $(hide) sed '/dontaudit/d' $@ > $@.dontaudit |
| 559 | |
Dan Cashman | c8d4535 | 2017-04-11 07:38:48 -0700 | [diff] [blame] | 560 | $(LOCAL_BUILT_MODULE): $(sepolicy.recovery.conf) $(HOST_OUT_EXECUTABLES)/checkpolicy \ |
| 561 | $(HOST_OUT_EXECUTABLES)/sepolicy-analyze |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 562 | @mkdir -p $(dir $@) |
Dan Cashman | c8d4535 | 2017-04-11 07:38:48 -0700 | [diff] [blame] | 563 | $(hide) $(HOST_OUT_EXECUTABLES)/checkpolicy -M -c $(POLICYVERS) -o $@.tmp $< |
Nick Kralevich | bca98ef | 2016-02-26 20:06:52 -0800 | [diff] [blame] | 564 | $(hide) $(HOST_OUT_EXECUTABLES)/sepolicy-analyze $@.tmp permissive > $@.permissivedomains |
| 565 | $(hide) if [ "$(TARGET_BUILD_VARIANT)" = "user" -a -s $@.permissivedomains ]; then \ |
| 566 | echo "==========" 1>&2; \ |
| 567 | echo "ERROR: permissive domains not allowed in user builds" 1>&2; \ |
| 568 | echo "List of invalid domains:" 1>&2; \ |
| 569 | cat $@.permissivedomains 1>&2; \ |
| 570 | exit 1; \ |
| 571 | fi |
| 572 | $(hide) mv $@.tmp $@ |
Stephen Smalley | e60723a | 2014-05-29 16:40:15 -0400 | [diff] [blame] | 573 | |
Dan Cashman | c8d4535 | 2017-04-11 07:38:48 -0700 | [diff] [blame] | 574 | sepolicy.recovery.conf := |
Stephen Smalley | e60723a | 2014-05-29 16:40:15 -0400 | [diff] [blame] | 575 | |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 576 | ################################## |
Alex Klyubin | 446279a | 2017-04-06 14:45:50 -0700 | [diff] [blame] | 577 | # SELinux policy embedded into CTS. |
| 578 | # CTS checks neverallow rules of this policy against the policy of the device under test. |
| 579 | ################################## |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 580 | include $(CLEAR_VARS) |
| 581 | |
| 582 | LOCAL_MODULE := general_sepolicy.conf |
| 583 | LOCAL_MODULE_CLASS := ETC |
| 584 | LOCAL_MODULE_TAGS := tests |
| 585 | |
| 586 | include $(BUILD_SYSTEM)/base_rules.mk |
| 587 | |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 588 | $(LOCAL_BUILT_MODULE): PRIVATE_MLS_SENS := $(MLS_SENS) |
| 589 | $(LOCAL_BUILT_MODULE): PRIVATE_MLS_CATS := $(MLS_CATS) |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 590 | $(LOCAL_BUILT_MODULE): PRIVATE_TGT_ARCH := $(my_target_arch) |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 591 | $(LOCAL_BUILT_MODULE): $(call build_policy, $(sepolicy_build_files), \ |
| 592 | $(PLAT_PUBLIC_POLICY) $(PLAT_PRIVATE_POLICY)) |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 593 | mkdir -p $(dir $@) |
| 594 | $(hide) m4 -D mls_num_sens=$(PRIVATE_MLS_SENS) -D mls_num_cats=$(PRIVATE_MLS_CATS) \ |
| 595 | -D target_build_variant=user \ |
Jorge Lucangeli Obes | 84db84e | 2016-11-18 08:42:35 -0500 | [diff] [blame] | 596 | -D target_with_dexpreopt=$(WITH_DEXPREOPT) \ |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 597 | -D target_arch=$(PRIVATE_TGT_ARCH) \ |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 598 | -D target_with_asan=false \ |
Alex Klyubin | 446279a | 2017-04-06 14:45:50 -0700 | [diff] [blame] | 599 | -D target_full_treble=cts \ |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 600 | -s $^ > $@ |
| 601 | $(hide) sed '/dontaudit/d' $@ > $@.dontaudit |
| 602 | |
William Roberts | b876993 | 2015-06-29 16:31:23 -0700 | [diff] [blame] | 603 | ################################## |
dcashman | d225b69 | 2016-12-12 09:29:04 -0800 | [diff] [blame] | 604 | # TODO - remove this. Keep around until we get the filesystem creation stuff taken care of. |
| 605 | # |
William Roberts | b876993 | 2015-06-29 16:31:23 -0700 | [diff] [blame] | 606 | include $(CLEAR_VARS) |
| 607 | |
Richard Haines | c2d0191 | 2015-08-06 17:43:52 +0100 | [diff] [blame] | 608 | LOCAL_MODULE := file_contexts.bin |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 609 | LOCAL_MODULE_CLASS := ETC |
| 610 | LOCAL_MODULE_TAGS := optional |
| 611 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
| 612 | |
Stephen Smalley | 5b340be | 2012-03-06 11:12:41 -0500 | [diff] [blame] | 613 | include $(BUILD_SYSTEM)/base_rules.mk |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 614 | |
William Roberts | 49693f1 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 615 | # The file_contexts.bin is built in the following way: |
| 616 | # 1. Collect all file_contexts files in THIS repository and process them with |
| 617 | # m4 into a tmp file called file_contexts.local.tmp. |
| 618 | # 2. Collect all device specific file_contexts files and process them with m4 |
| 619 | # into a tmp file called file_contexts.device.tmp. |
| 620 | # 3. Run checkfc -e (allow no device fc entries ie empty) and fc_sort on |
| 621 | # file_contexts.device.tmp and output to file_contexts.device.sorted.tmp. |
| 622 | # 4. Concatenate file_contexts.local.tmp and file_contexts.device.tmp into |
| 623 | # file_contexts.concat.tmp. |
| 624 | # 5. Run checkfc and sefcontext_compile on file_contexts.concat.tmp to produce |
| 625 | # file_contexts.bin. |
| 626 | # |
| 627 | # Note: That a newline file is placed between each file_context file found to |
| 628 | # ensure a proper build when an fc file is missing an ending newline. |
William Roberts | 29d1468 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 629 | |
Dan Cashman | 1b0a71f | 2017-05-08 14:26:52 -0700 | [diff] [blame] | 630 | local_fc_files := $(call build_policy, file_contexts, $(PLAT_PRIVATE_POLICY)) |
| 631 | |
William Roberts | 49693f1 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 632 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
Dan Cashman | 1b0a71f | 2017-05-08 14:26:52 -0700 | [diff] [blame] | 633 | local_fc_files := $(local_fc_files) $(wildcard $(addsuffix /file_contexts_asan, $(PLAT_PRIVATE_POLICY))) |
William Roberts | 49693f1 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 634 | endif |
| 635 | local_fcfiles_with_nl := $(call add_nl, $(local_fc_files), $(built_nl)) |
| 636 | |
| 637 | file_contexts.local.tmp := $(intermediates)/file_contexts.local.tmp |
| 638 | $(file_contexts.local.tmp): $(local_fcfiles_with_nl) |
Stephen Smalley | 5b340be | 2012-03-06 11:12:41 -0500 | [diff] [blame] | 639 | @mkdir -p $(dir $@) |
William Roberts | 49693f1 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 640 | $(hide) m4 -s $^ > $@ |
| 641 | |
| 642 | device_fc_files := $(call build_device_policy, file_contexts) |
| 643 | device_fcfiles_with_nl := $(call add_nl, $(device_fc_files), $(built_nl)) |
| 644 | |
| 645 | file_contexts.device.tmp := $(intermediates)/file_contexts.device.tmp |
| 646 | $(file_contexts.device.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 647 | $(file_contexts.device.tmp): $(device_fcfiles_with_nl) |
| 648 | @mkdir -p $(dir $@) |
| 649 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $^ > $@ |
| 650 | |
| 651 | file_contexts.device.sorted.tmp := $(intermediates)/file_contexts.device.sorted.tmp |
| 652 | $(file_contexts.device.sorted.tmp): PRIVATE_SEPOLICY := $(built_sepolicy) |
| 653 | $(file_contexts.device.sorted.tmp): $(file_contexts.device.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/fc_sort $(HOST_OUT_EXECUTABLES)/checkfc |
| 654 | @mkdir -p $(dir $@) |
dcashman | 0779155 | 2016-12-07 11:27:47 -0800 | [diff] [blame] | 655 | $(hide) $(HOST_OUT_EXECUTABLES)/checkfc -e $(PRIVATE_SEPOLICY) $< |
William Roberts | 49693f1 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 656 | $(hide) $(HOST_OUT_EXECUTABLES)/fc_sort $< $@ |
| 657 | |
| 658 | file_contexts.concat.tmp := $(intermediates)/file_contexts.concat.tmp |
| 659 | $(file_contexts.concat.tmp): $(file_contexts.local.tmp) $(file_contexts.device.sorted.tmp) |
| 660 | @mkdir -p $(dir $@) |
| 661 | $(hide) m4 -s $^ > $@ |
Stephen Smalley | 5b340be | 2012-03-06 11:12:41 -0500 | [diff] [blame] | 662 | |
William Roberts | 3746a0a | 2015-09-25 10:18:44 -0700 | [diff] [blame] | 663 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
William Roberts | 49693f1 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 664 | $(LOCAL_BUILT_MODULE): $(file_contexts.concat.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/sefcontext_compile $(HOST_OUT_EXECUTABLES)/checkfc |
Richard Haines | c2d0191 | 2015-08-06 17:43:52 +0100 | [diff] [blame] | 665 | @mkdir -p $(dir $@) |
dcashman | 0779155 | 2016-12-07 11:27:47 -0800 | [diff] [blame] | 666 | $(hide) $(HOST_OUT_EXECUTABLES)/checkfc $(PRIVATE_SEPOLICY) $< |
Richard Haines | c2d0191 | 2015-08-06 17:43:52 +0100 | [diff] [blame] | 667 | $(hide) $(HOST_OUT_EXECUTABLES)/sefcontext_compile -o $@ $< |
| 668 | |
Robert Craig | 8b7545b | 2014-03-20 09:35:08 -0400 | [diff] [blame] | 669 | built_fc := $(LOCAL_BUILT_MODULE) |
William Roberts | 49693f1 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 670 | local_fc_files := |
| 671 | local_fcfiles_with_nl := |
| 672 | device_fc_files := |
| 673 | device_fcfiles_with_nl := |
| 674 | file_contexts.concat.tmp := |
| 675 | file_contexts.device.sorted.tmp := |
| 676 | file_contexts.device.tmp := |
| 677 | file_contexts.local.tmp := |
William Roberts | 171a062 | 2012-08-16 10:55:05 -0700 | [diff] [blame] | 678 | |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 679 | ################################## |
| 680 | include $(CLEAR_VARS) |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 681 | |
Alex Klyubin | ec78c37 | 2017-03-10 12:44:16 -0800 | [diff] [blame] | 682 | LOCAL_MODULE := file_contexts.bin.recovery |
| 683 | LOCAL_MODULE_STEM := file_contexts.bin |
| 684 | LOCAL_MODULE_CLASS := ETC |
| 685 | LOCAL_MODULE_TAGS := optional |
| 686 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT) |
| 687 | |
| 688 | include $(BUILD_SYSTEM)/base_rules.mk |
| 689 | |
| 690 | $(LOCAL_BUILT_MODULE): $(built_fc) |
| 691 | $(hide) cp -f $< $@ |
| 692 | |
| 693 | ################################## |
| 694 | include $(CLEAR_VARS) |
| 695 | |
dcashman | d225b69 | 2016-12-12 09:29:04 -0800 | [diff] [blame] | 696 | LOCAL_MODULE := plat_file_contexts |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 697 | LOCAL_MODULE_CLASS := ETC |
dcashman | d225b69 | 2016-12-12 09:29:04 -0800 | [diff] [blame] | 698 | LOCAL_MODULE_TAGS := optional |
Jeff Vander Stoep | 0cb417a | 2017-03-08 14:12:54 -0800 | [diff] [blame] | 699 | LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/selinux |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 700 | |
| 701 | include $(BUILD_SYSTEM)/base_rules.mk |
| 702 | |
Dan Cashman | 1b0a71f | 2017-05-08 14:26:52 -0700 | [diff] [blame] | 703 | local_fc_files := $(call build_policy, file_contexts, $(PLAT_PRIVATE_POLICY)) |
dcashman | d225b69 | 2016-12-12 09:29:04 -0800 | [diff] [blame] | 704 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
Dan Cashman | 1b0a71f | 2017-05-08 14:26:52 -0700 | [diff] [blame] | 705 | local_fc_files += $(wildcard $(addsuffix /file_contexts_asan, $(PLAT_PRIVATE_POLICY))) |
dcashman | d225b69 | 2016-12-12 09:29:04 -0800 | [diff] [blame] | 706 | endif |
Alex Klyubin | e4665d7 | 2017-01-19 19:58:34 -0800 | [diff] [blame] | 707 | local_fcfiles_with_nl := $(call add_nl, $(local_fc_files), $(built_nl)) |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 708 | |
Alex Klyubin | e4665d7 | 2017-01-19 19:58:34 -0800 | [diff] [blame] | 709 | $(LOCAL_BUILT_MODULE): PRIVATE_FC_FILES := $(local_fcfiles_with_nl) |
dcashman | d225b69 | 2016-12-12 09:29:04 -0800 | [diff] [blame] | 710 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
Alex Klyubin | e4665d7 | 2017-01-19 19:58:34 -0800 | [diff] [blame] | 711 | $(LOCAL_BUILT_MODULE): PRIVATE_FC_SORT := $(HOST_OUT_EXECUTABLES)/fc_sort |
| 712 | $(LOCAL_BUILT_MODULE): $(HOST_OUT_EXECUTABLES)/checkfc $(HOST_OUT_EXECUTABLES)/fc_sort \ |
| 713 | $(local_fcfiles_with_nl) $(built_sepolicy) |
Richard Haines | c2d0191 | 2015-08-06 17:43:52 +0100 | [diff] [blame] | 714 | @mkdir -p $(dir $@) |
Alex Klyubin | e4665d7 | 2017-01-19 19:58:34 -0800 | [diff] [blame] | 715 | $(hide) m4 -s $(PRIVATE_FC_FILES) > $@.tmp |
| 716 | $(hide) $< $(PRIVATE_SEPOLICY) $@.tmp |
| 717 | $(hide) $(PRIVATE_FC_SORT) $@.tmp $@ |
Richard Haines | c2d0191 | 2015-08-06 17:43:52 +0100 | [diff] [blame] | 718 | |
dcashman | d225b69 | 2016-12-12 09:29:04 -0800 | [diff] [blame] | 719 | built_plat_fc := $(LOCAL_BUILT_MODULE) |
| 720 | local_fc_files := |
Alex Klyubin | e4665d7 | 2017-01-19 19:58:34 -0800 | [diff] [blame] | 721 | local_fcfiles_with_nl := |
dcashman | d225b69 | 2016-12-12 09:29:04 -0800 | [diff] [blame] | 722 | |
| 723 | ################################## |
| 724 | include $(CLEAR_VARS) |
| 725 | |
| 726 | LOCAL_MODULE := nonplat_file_contexts |
| 727 | LOCAL_MODULE_CLASS := ETC |
| 728 | LOCAL_MODULE_TAGS := optional |
Jeff Vander Stoep | 0cb417a | 2017-03-08 14:12:54 -0800 | [diff] [blame] | 729 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
dcashman | d225b69 | 2016-12-12 09:29:04 -0800 | [diff] [blame] | 730 | |
| 731 | include $(BUILD_SYSTEM)/base_rules.mk |
| 732 | |
| 733 | nonplat_fc_files := $(call build_device_policy, file_contexts) |
| 734 | nonplat_fcfiles_with_nl := $(call add_nl, $(nonplat_fc_files), $(built_nl)) |
| 735 | |
| 736 | $(LOCAL_BUILT_MODULE): PRIVATE_FC_FILES := $(nonplat_fcfiles_with_nl) |
| 737 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
| 738 | $(LOCAL_BUILT_MODULE): PRIVATE_FC_SORT := $(HOST_OUT_EXECUTABLES)/fc_sort |
| 739 | $(LOCAL_BUILT_MODULE): $(HOST_OUT_EXECUTABLES)/checkfc $(HOST_OUT_EXECUTABLES)/fc_sort \ |
Alex Klyubin | e4665d7 | 2017-01-19 19:58:34 -0800 | [diff] [blame] | 740 | $(nonplat_fcfiles_with_nl) $(built_sepolicy) |
dcashman | d225b69 | 2016-12-12 09:29:04 -0800 | [diff] [blame] | 741 | @mkdir -p $(dir $@) |
| 742 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_FC_FILES) > $@.tmp |
| 743 | $(hide) $< $(PRIVATE_SEPOLICY) $@.tmp |
| 744 | $(hide) $(PRIVATE_FC_SORT) $@.tmp $@ |
| 745 | |
| 746 | built_nonplat_fc := $(LOCAL_BUILT_MODULE) |
| 747 | nonplat_fc_files := |
| 748 | nonplat_fcfiles_with_nl := |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 749 | |
| 750 | ################################## |
| 751 | include $(CLEAR_VARS) |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 752 | LOCAL_MODULE := plat_seapp_contexts |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 753 | LOCAL_MODULE_CLASS := ETC |
| 754 | LOCAL_MODULE_TAGS := optional |
Jeff Vander Stoep | 4e3a4c7 | 2017-03-08 22:28:03 -0800 | [diff] [blame] | 755 | ifeq ($(PRODUCT_FULL_TREBLE),true) |
| 756 | LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/selinux |
| 757 | else |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 758 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
Jeff Vander Stoep | 4e3a4c7 | 2017-03-08 22:28:03 -0800 | [diff] [blame] | 759 | endif |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 760 | |
William Roberts | 171a062 | 2012-08-16 10:55:05 -0700 | [diff] [blame] | 761 | include $(BUILD_SYSTEM)/base_rules.mk |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 762 | |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 763 | plat_sc_files := $(call build_policy, seapp_contexts, $(PLAT_PRIVATE_POLICY)) |
William Roberts | 171a062 | 2012-08-16 10:55:05 -0700 | [diff] [blame] | 764 | |
Ying Wang | d8b122c | 2012-10-25 19:01:31 -0700 | [diff] [blame] | 765 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 766 | $(LOCAL_BUILT_MODULE): PRIVATE_SC_FILES := $(plat_sc_files) |
| 767 | $(LOCAL_BUILT_MODULE): $(built_sepolicy) $(plat_sc_files) $(HOST_OUT_EXECUTABLES)/checkseapp |
William Roberts | f0e0a94 | 2012-08-27 15:41:15 -0700 | [diff] [blame] | 768 | @mkdir -p $(dir $@) |
William Roberts | 99fe8df | 2015-06-30 13:53:51 -0700 | [diff] [blame] | 769 | $(hide) $(HOST_OUT_EXECUTABLES)/checkseapp -p $(PRIVATE_SEPOLICY) -o $@ $(PRIVATE_SC_FILES) |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 770 | |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 771 | built_plat_sc := $(LOCAL_BUILT_MODULE) |
| 772 | plat_sc_files := |
Robert Craig | 8b7545b | 2014-03-20 09:35:08 -0400 | [diff] [blame] | 773 | |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 774 | ################################## |
Stephen Smalley | 124720a | 2012-04-04 10:11:16 -0400 | [diff] [blame] | 775 | include $(CLEAR_VARS) |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 776 | LOCAL_MODULE := nonplat_seapp_contexts |
Stephen Smalley | 3771287 | 2015-03-12 15:46:36 -0400 | [diff] [blame] | 777 | LOCAL_MODULE_CLASS := ETC |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 778 | LOCAL_MODULE_TAGS := optional |
Jeff Vander Stoep | 4e3a4c7 | 2017-03-08 22:28:03 -0800 | [diff] [blame] | 779 | ifeq ($(PRODUCT_FULL_TREBLE),true) |
| 780 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
| 781 | else |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 782 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
Jeff Vander Stoep | 4e3a4c7 | 2017-03-08 22:28:03 -0800 | [diff] [blame] | 783 | endif |
Stephen Smalley | 3771287 | 2015-03-12 15:46:36 -0400 | [diff] [blame] | 784 | |
| 785 | include $(BUILD_SYSTEM)/base_rules.mk |
| 786 | |
Alex Klyubin | 5596172 | 2017-01-30 18:44:59 -0800 | [diff] [blame] | 787 | nonplat_sc_files := $(call build_policy, seapp_contexts, $(PLAT_VENDOR_POLICY) $(BOARD_SEPOLICY_DIRS) $(REQD_MASK_POLICY)) |
Dan Cashman | 1b0a71f | 2017-05-08 14:26:52 -0700 | [diff] [blame] | 788 | plat_sc_neverallow_files := $(call build_policy, seapp_contexts, $(PLAT_PRIVATE_POLICY)) |
Stephen Smalley | 3771287 | 2015-03-12 15:46:36 -0400 | [diff] [blame] | 789 | |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 790 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
| 791 | $(LOCAL_BUILT_MODULE): PRIVATE_SC_FILES := $(nonplat_sc_files) |
Jeff Vander Stoep | 87ae5f7 | 2017-03-06 22:53:09 -0800 | [diff] [blame] | 792 | $(LOCAL_BUILT_MODULE): PRIVATE_SC_NEVERALLOW_FILES := $(plat_sc_neverallow_files) |
| 793 | $(LOCAL_BUILT_MODULE): $(built_sepolicy) $(nonplat_sc_files) $(HOST_OUT_EXECUTABLES)/checkseapp $(plat_sc_neverallow_files) |
Stephen Smalley | 3771287 | 2015-03-12 15:46:36 -0400 | [diff] [blame] | 794 | @mkdir -p $(dir $@) |
Xin Li | ec6f393 | 2017-03-14 16:51:13 -0700 | [diff] [blame] | 795 | $(hide) grep -ie '^neverallow' $(PRIVATE_SC_NEVERALLOW_FILES) > $@.tmp |
| 796 | $(hide) $(HOST_OUT_EXECUTABLES)/checkseapp -p $(PRIVATE_SEPOLICY) -o $@ $(PRIVATE_SC_FILES) $@.tmp |
Stephen Smalley | 3771287 | 2015-03-12 15:46:36 -0400 | [diff] [blame] | 797 | |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 798 | built_nonplat_sc := $(LOCAL_BUILT_MODULE) |
| 799 | nonplat_sc_files := |
Stephen Smalley | 3771287 | 2015-03-12 15:46:36 -0400 | [diff] [blame] | 800 | |
| 801 | ################################## |
| 802 | include $(CLEAR_VARS) |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 803 | LOCAL_MODULE := plat_seapp_neverallows |
William Roberts | 4ee7131 | 2015-06-25 11:59:30 -0700 | [diff] [blame] | 804 | LOCAL_MODULE_CLASS := ETC |
| 805 | LOCAL_MODULE_TAGS := tests |
| 806 | |
| 807 | include $(BUILD_SYSTEM)/base_rules.mk |
| 808 | |
Jeff Vander Stoep | 87ae5f7 | 2017-03-06 22:53:09 -0800 | [diff] [blame] | 809 | $(LOCAL_BUILT_MODULE): $(plat_sc_neverallow_files) |
William Roberts | 4ee7131 | 2015-06-25 11:59:30 -0700 | [diff] [blame] | 810 | @mkdir -p $(dir $@) |
| 811 | - $(hide) grep -ie '^neverallow' $< > $@ |
| 812 | |
Jeff Vander Stoep | 87ae5f7 | 2017-03-06 22:53:09 -0800 | [diff] [blame] | 813 | plat_sc_neverallow_files := |
William Roberts | 4ee7131 | 2015-06-25 11:59:30 -0700 | [diff] [blame] | 814 | |
| 815 | ################################## |
| 816 | include $(CLEAR_VARS) |
Stephen Smalley | 124720a | 2012-04-04 10:11:16 -0400 | [diff] [blame] | 817 | |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 818 | LOCAL_MODULE := plat_property_contexts |
Stephen Smalley | 124720a | 2012-04-04 10:11:16 -0400 | [diff] [blame] | 819 | LOCAL_MODULE_CLASS := ETC |
| 820 | LOCAL_MODULE_TAGS := optional |
Alex Klyubin | 9d59041 | 2017-03-08 13:10:05 -0800 | [diff] [blame] | 821 | |
| 822 | ifeq ($(PRODUCT_FULL_TREBLE),true) |
| 823 | LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/selinux |
| 824 | else |
Stephen Smalley | 124720a | 2012-04-04 10:11:16 -0400 | [diff] [blame] | 825 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
Alex Klyubin | 9d59041 | 2017-03-08 13:10:05 -0800 | [diff] [blame] | 826 | endif |
Stephen Smalley | 124720a | 2012-04-04 10:11:16 -0400 | [diff] [blame] | 827 | |
| 828 | include $(BUILD_SYSTEM)/base_rules.mk |
| 829 | |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 830 | plat_pcfiles := $(call build_policy, property_contexts, $(PLAT_PRIVATE_POLICY)) |
William Roberts | 6aabc1c | 2015-07-30 11:44:26 -0700 | [diff] [blame] | 831 | |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 832 | plat_property_contexts.tmp := $(intermediates)/plat_property_contexts.tmp |
| 833 | $(plat_property_contexts.tmp): PRIVATE_PC_FILES := $(plat_pcfiles) |
| 834 | $(plat_property_contexts.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 835 | $(plat_property_contexts.tmp): $(plat_pcfiles) |
William Roberts | 7f81b33 | 2015-09-29 13:52:37 -0700 | [diff] [blame] | 836 | @mkdir -p $(dir $@) |
Colin Cross | 9eb6c87 | 2015-10-01 21:25:09 +0000 | [diff] [blame] | 837 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_PC_FILES) > $@ |
William Roberts | dcffd2b | 2015-09-29 13:52:37 -0700 | [diff] [blame] | 838 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 839 | $(LOCAL_BUILT_MODULE): $(plat_property_contexts.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc |
William Roberts | dcffd2b | 2015-09-29 13:52:37 -0700 | [diff] [blame] | 840 | @mkdir -p $(dir $@) |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 841 | $(hide) sed -e 's/#.*$$//' -e '/^$$/d' $< | sort -u -o $@ |
dcashman | 0779155 | 2016-12-07 11:27:47 -0800 | [diff] [blame] | 842 | $(hide) $(HOST_OUT_EXECUTABLES)/checkfc -p $(PRIVATE_SEPOLICY) $@ |
Stephen Smalley | 124720a | 2012-04-04 10:11:16 -0400 | [diff] [blame] | 843 | |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 844 | built_plat_pc := $(LOCAL_BUILT_MODULE) |
| 845 | plat_pcfiles := |
| 846 | plat_property_contexts.tmp := |
Robert Craig | 8b7545b | 2014-03-20 09:35:08 -0400 | [diff] [blame] | 847 | |
Stephen Smalley | 124720a | 2012-04-04 10:11:16 -0400 | [diff] [blame] | 848 | ################################## |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 849 | include $(CLEAR_VARS) |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 850 | LOCAL_MODULE := nonplat_property_contexts |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 851 | LOCAL_MODULE_CLASS := ETC |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 852 | LOCAL_MODULE_TAGS := optional |
Alex Klyubin | 9d59041 | 2017-03-08 13:10:05 -0800 | [diff] [blame] | 853 | |
| 854 | ifeq ($(PRODUCT_FULL_TREBLE),true) |
| 855 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
| 856 | else |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 857 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
Alex Klyubin | 9d59041 | 2017-03-08 13:10:05 -0800 | [diff] [blame] | 858 | endif |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 859 | |
Stephen Smalley | c936173 | 2015-03-13 09:36:57 -0400 | [diff] [blame] | 860 | include $(BUILD_SYSTEM)/base_rules.mk |
| 861 | |
Alex Klyubin | 5596172 | 2017-01-30 18:44:59 -0800 | [diff] [blame] | 862 | nonplat_pcfiles := $(call build_policy, property_contexts, $(PLAT_VENDOR_POLICY) $(BOARD_SEPOLICY_DIRS) $(REQD_MASK_POLICY)) |
Sandeep Patil | 262edc3 | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 863 | |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 864 | nonplat_property_contexts.tmp := $(intermediates)/nonplat_property_contexts.tmp |
| 865 | $(nonplat_property_contexts.tmp): PRIVATE_PC_FILES := $(nonplat_pcfiles) |
| 866 | $(nonplat_property_contexts.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 867 | $(nonplat_property_contexts.tmp): $(nonplat_pcfiles) |
William Roberts | dcffd2b | 2015-09-29 13:52:37 -0700 | [diff] [blame] | 868 | @mkdir -p $(dir $@) |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 869 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_PC_FILES) > $@ |
| 870 | |
| 871 | |
| 872 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
| 873 | $(LOCAL_BUILT_MODULE): $(nonplat_property_contexts.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc |
| 874 | @mkdir -p $(dir $@) |
| 875 | $(hide) sed -e 's/#.*$$//' -e '/^$$/d' $< | sort -u -o $@ |
dcashman | 0779155 | 2016-12-07 11:27:47 -0800 | [diff] [blame] | 876 | $(hide) $(HOST_OUT_EXECUTABLES)/checkfc -p $(PRIVATE_SEPOLICY) $@ |
William Roberts | dcffd2b | 2015-09-29 13:52:37 -0700 | [diff] [blame] | 877 | |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 878 | built_nonplat_pc := $(LOCAL_BUILT_MODULE) |
| 879 | nonplat_pcfiles := |
| 880 | nonplat_property_contexts.tmp := |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 881 | |
| 882 | ################################## |
| 883 | include $(CLEAR_VARS) |
| 884 | |
Alex Klyubin | ec78c37 | 2017-03-10 12:44:16 -0800 | [diff] [blame] | 885 | LOCAL_MODULE := plat_property_contexts.recovery |
| 886 | LOCAL_MODULE_STEM := plat_property_contexts |
| 887 | LOCAL_MODULE_CLASS := ETC |
| 888 | LOCAL_MODULE_TAGS := optional |
| 889 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT) |
| 890 | |
| 891 | include $(BUILD_SYSTEM)/base_rules.mk |
| 892 | |
| 893 | $(LOCAL_BUILT_MODULE): $(built_plat_pc) |
| 894 | $(hide) cp -f $< $@ |
| 895 | |
| 896 | ################################## |
| 897 | include $(CLEAR_VARS) |
Alex Klyubin | ec78c37 | 2017-03-10 12:44:16 -0800 | [diff] [blame] | 898 | LOCAL_MODULE := nonplat_property_contexts.recovery |
| 899 | LOCAL_MODULE_STEM := nonplat_property_contexts |
| 900 | LOCAL_MODULE_CLASS := ETC |
| 901 | LOCAL_MODULE_TAGS := optional |
| 902 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT) |
| 903 | |
| 904 | include $(BUILD_SYSTEM)/base_rules.mk |
| 905 | |
| 906 | $(LOCAL_BUILT_MODULE): $(built_nonplat_pc) |
| 907 | $(hide) cp -f $< $@ |
| 908 | |
| 909 | ################################## |
| 910 | include $(CLEAR_VARS) |
| 911 | |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 912 | LOCAL_MODULE := plat_service_contexts |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 913 | LOCAL_MODULE_CLASS := ETC |
| 914 | LOCAL_MODULE_TAGS := optional |
Jeff Vander Stoep | 4e3a4c7 | 2017-03-08 22:28:03 -0800 | [diff] [blame] | 915 | ifeq ($(PRODUCT_FULL_TREBLE),true) |
| 916 | LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/selinux |
| 917 | else |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 918 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
Jeff Vander Stoep | 4e3a4c7 | 2017-03-08 22:28:03 -0800 | [diff] [blame] | 919 | endif |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 920 | |
| 921 | include $(BUILD_SYSTEM)/base_rules.mk |
| 922 | |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 923 | plat_svcfiles := $(call build_policy, service_contexts, $(PLAT_PRIVATE_POLICY)) |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 924 | |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 925 | plat_service_contexts.tmp := $(intermediates)/plat_service_contexts.tmp |
| 926 | $(plat_service_contexts.tmp): PRIVATE_SVC_FILES := $(plat_svcfiles) |
| 927 | $(plat_service_contexts.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 928 | $(plat_service_contexts.tmp): $(plat_svcfiles) |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 929 | @mkdir -p $(dir $@) |
William Roberts | 6aabc1c | 2015-07-30 11:44:26 -0700 | [diff] [blame] | 930 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_SVC_FILES) > $@ |
William Roberts | 7fc865a | 2015-09-29 14:17:38 -0700 | [diff] [blame] | 931 | |
| 932 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 933 | $(LOCAL_BUILT_MODULE): $(plat_service_contexts.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc $(ACP) |
William Roberts | 7fc865a | 2015-09-29 14:17:38 -0700 | [diff] [blame] | 934 | @mkdir -p $(dir $@) |
William Roberts | c9fce3f | 2016-04-06 11:53:04 -0700 | [diff] [blame] | 935 | sed -e 's/#.*$$//' -e '/^$$/d' $< > $@ |
dcashman | 0779155 | 2016-12-07 11:27:47 -0800 | [diff] [blame] | 936 | $(HOST_OUT_EXECUTABLES)/checkfc -s $(PRIVATE_SEPOLICY) $@ |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 937 | |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 938 | built_plat_svc := $(LOCAL_BUILT_MODULE) |
| 939 | plat_svcfiles := |
| 940 | plat_service_contexts.tmp := |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 941 | |
| 942 | ################################## |
rpcraig | b19665c | 2012-07-30 09:33:03 -0400 | [diff] [blame] | 943 | include $(CLEAR_VARS) |
| 944 | |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 945 | LOCAL_MODULE := nonplat_service_contexts |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 946 | LOCAL_MODULE_CLASS := ETC |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 947 | LOCAL_MODULE_TAGS := optional |
Jeff Vander Stoep | 4e3a4c7 | 2017-03-08 22:28:03 -0800 | [diff] [blame] | 948 | ifeq ($(PRODUCT_FULL_TREBLE),true) |
| 949 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
| 950 | else |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 951 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
Jeff Vander Stoep | 4e3a4c7 | 2017-03-08 22:28:03 -0800 | [diff] [blame] | 952 | endif |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 953 | |
| 954 | include $(BUILD_SYSTEM)/base_rules.mk |
| 955 | |
Alex Klyubin | 5596172 | 2017-01-30 18:44:59 -0800 | [diff] [blame] | 956 | nonplat_svcfiles := $(call build_policy, service_contexts, $(PLAT_VENDOR_POLICY) $(BOARD_SEPOLICY_DIRS) $(REQD_MASK_POLICY)) |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 957 | |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 958 | nonplat_service_contexts.tmp := $(intermediates)/nonplat_service_contexts.tmp |
| 959 | $(nonplat_service_contexts.tmp): PRIVATE_SVC_FILES := $(nonplat_svcfiles) |
| 960 | $(nonplat_service_contexts.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 961 | $(nonplat_service_contexts.tmp): $(nonplat_svcfiles) |
| 962 | @mkdir -p $(dir $@) |
| 963 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_SVC_FILES) > $@ |
| 964 | |
| 965 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
| 966 | $(LOCAL_BUILT_MODULE): $(nonplat_service_contexts.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc $(ACP) |
William Roberts | 7fc865a | 2015-09-29 14:17:38 -0700 | [diff] [blame] | 967 | @mkdir -p $(dir $@) |
William Roberts | c9fce3f | 2016-04-06 11:53:04 -0700 | [diff] [blame] | 968 | sed -e 's/#.*$$//' -e '/^$$/d' $< > $@ |
dcashman | 0779155 | 2016-12-07 11:27:47 -0800 | [diff] [blame] | 969 | $(hide) $(HOST_OUT_EXECUTABLES)/checkfc -s $(PRIVATE_SEPOLICY) $@ |
William Roberts | 7fc865a | 2015-09-29 14:17:38 -0700 | [diff] [blame] | 970 | |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 971 | built_nonplat_svc := $(LOCAL_BUILT_MODULE) |
| 972 | nonplat_svcfiles := |
| 973 | nonplat_service_contexts.tmp := |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 974 | |
| 975 | ################################## |
| 976 | include $(CLEAR_VARS) |
| 977 | |
Martijn Coenen | 3ea47b9 | 2017-04-07 16:14:43 -0700 | [diff] [blame] | 978 | LOCAL_MODULE := plat_hwservice_contexts |
| 979 | LOCAL_MODULE_CLASS := ETC |
| 980 | LOCAL_MODULE_TAGS := optional |
| 981 | ifeq ($(PRODUCT_FULL_TREBLE),true) |
| 982 | LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/selinux |
| 983 | else |
| 984 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
| 985 | endif |
| 986 | |
| 987 | include $(BUILD_SYSTEM)/base_rules.mk |
| 988 | |
| 989 | plat_hwsvcfiles := $(call build_policy, hwservice_contexts, $(PLAT_PRIVATE_POLICY)) |
| 990 | |
| 991 | plat_hwservice_contexts.tmp := $(intermediates)/plat_hwservice_contexts.tmp |
| 992 | $(plat_hwservice_contexts.tmp): PRIVATE_SVC_FILES := $(plat_hwsvcfiles) |
| 993 | $(plat_hwservice_contexts.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 994 | $(plat_hwservice_contexts.tmp): $(plat_hwsvcfiles) |
| 995 | @mkdir -p $(dir $@) |
| 996 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_SVC_FILES) > $@ |
| 997 | |
| 998 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
| 999 | $(LOCAL_BUILT_MODULE): $(plat_hwservice_contexts.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc $(ACP) |
| 1000 | @mkdir -p $(dir $@) |
| 1001 | sed -e 's/#.*$$//' -e '/^$$/d' $< > $@ |
| 1002 | $(HOST_OUT_EXECUTABLES)/checkfc -e -l $(PRIVATE_SEPOLICY) $@ |
| 1003 | |
| 1004 | plat_hwsvcfiles := |
| 1005 | plat_hwservice_contexts.tmp := |
| 1006 | |
| 1007 | ################################## |
| 1008 | include $(CLEAR_VARS) |
| 1009 | |
| 1010 | LOCAL_MODULE := nonplat_hwservice_contexts |
| 1011 | LOCAL_MODULE_CLASS := ETC |
| 1012 | LOCAL_MODULE_TAGS := optional |
| 1013 | ifeq ($(PRODUCT_FULL_TREBLE),true) |
| 1014 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
| 1015 | else |
| 1016 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
| 1017 | endif |
| 1018 | |
| 1019 | include $(BUILD_SYSTEM)/base_rules.mk |
| 1020 | |
| 1021 | nonplat_hwsvcfiles := $(call build_policy, hwservice_contexts, $(PLAT_VENDOR_POLICY) $(BOARD_SEPOLICY_DIRS) $(REQD_MASK_POLICY)) |
| 1022 | |
| 1023 | nonplat_hwservice_contexts.tmp := $(intermediates)/nonplat_hwservice_contexts.tmp |
| 1024 | $(nonplat_hwservice_contexts.tmp): PRIVATE_SVC_FILES := $(nonplat_hwsvcfiles) |
| 1025 | $(nonplat_hwservice_contexts.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 1026 | $(nonplat_hwservice_contexts.tmp): $(nonplat_hwsvcfiles) |
| 1027 | @mkdir -p $(dir $@) |
| 1028 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_SVC_FILES) > $@ |
| 1029 | |
| 1030 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
| 1031 | $(LOCAL_BUILT_MODULE): $(nonplat_hwservice_contexts.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc $(ACP) |
| 1032 | @mkdir -p $(dir $@) |
| 1033 | sed -e 's/#.*$$//' -e '/^$$/d' $< > $@ |
| 1034 | $(hide) $(HOST_OUT_EXECUTABLES)/checkfc -e -l $(PRIVATE_SEPOLICY) $@ |
| 1035 | |
| 1036 | nonplat_hwsvcfiles := |
| 1037 | nonplat_hwservice_contexts.tmp := |
| 1038 | |
| 1039 | ################################## |
| 1040 | include $(CLEAR_VARS) |
| 1041 | |
Martijn Coenen | 6676c23 | 2017-03-31 17:29:53 -0700 | [diff] [blame] | 1042 | LOCAL_MODULE := vndservice_contexts |
| 1043 | LOCAL_MODULE_CLASS := ETC |
| 1044 | LOCAL_MODULE_TAGS := optional |
| 1045 | ifeq ($(PRODUCT_FULL_TREBLE),true) |
| 1046 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
| 1047 | else |
| 1048 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
| 1049 | endif |
| 1050 | |
| 1051 | include $(BUILD_SYSTEM)/base_rules.mk |
| 1052 | |
| 1053 | vnd_svcfiles := $(call build_policy, vndservice_contexts, $(PLAT_VENDOR_POLICY) $(BOARD_SEPOLICY_DIRS) $(REQD_MASK_POLICY)) |
| 1054 | |
| 1055 | vndservice_contexts.tmp := $(intermediates)/vndservice_contexts.tmp |
| 1056 | $(vndservice_contexts.tmp): PRIVATE_SVC_FILES := $(vnd_svcfiles) |
| 1057 | $(vndservice_contexts.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 1058 | $(vndservice_contexts.tmp): $(vnd_svcfiles) |
| 1059 | @mkdir -p $(dir $@) |
| 1060 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_SVC_FILES) > $@ |
| 1061 | |
| 1062 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
| 1063 | $(LOCAL_BUILT_MODULE): $(vndservice_contexts.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc $(ACP) |
| 1064 | @mkdir -p $(dir $@) |
| 1065 | sed -e 's/#.*$$//' -e '/^$$/d' $< > $@ |
Martijn Coenen | ee97662 | 2017-04-07 10:08:55 -0700 | [diff] [blame] | 1066 | $(hide) $(HOST_OUT_EXECUTABLES)/checkfc -e -v $(PRIVATE_SEPOLICY) $@ |
Martijn Coenen | 6676c23 | 2017-03-31 17:29:53 -0700 | [diff] [blame] | 1067 | |
| 1068 | vnd_svcfiles := |
| 1069 | vndservice_contexts.tmp := |
| 1070 | ################################## |
| 1071 | include $(CLEAR_VARS) |
| 1072 | |
dcashman | 90b3b94 | 2016-12-14 13:47:55 -0800 | [diff] [blame] | 1073 | LOCAL_MODULE := plat_mac_permissions.xml |
rpcraig | b19665c | 2012-07-30 09:33:03 -0400 | [diff] [blame] | 1074 | LOCAL_MODULE_CLASS := ETC |
| 1075 | LOCAL_MODULE_TAGS := optional |
Jeff Vander Stoep | bba9e7b | 2017-03-10 15:51:23 -0800 | [diff] [blame] | 1076 | LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/selinux |
rpcraig | b19665c | 2012-07-30 09:33:03 -0400 | [diff] [blame] | 1077 | |
William Roberts | 2c8a55d | 2012-11-30 14:59:09 -0800 | [diff] [blame] | 1078 | include $(BUILD_SYSTEM)/base_rules.mk |
rpcraig | b19665c | 2012-07-30 09:33:03 -0400 | [diff] [blame] | 1079 | |
Geremy Condra | cd4104e | 2013-03-26 18:19:12 +0000 | [diff] [blame] | 1080 | # Build keys.conf |
dcashman | 90b3b94 | 2016-12-14 13:47:55 -0800 | [diff] [blame] | 1081 | plat_mac_perms_keys.tmp := $(intermediates)/plat_keys.tmp |
| 1082 | $(plat_mac_perms_keys.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 1083 | $(plat_mac_perms_keys.tmp): $(call build_policy, keys.conf, $(PLAT_PRIVATE_POLICY)) |
Geremy Condra | cd4104e | 2013-03-26 18:19:12 +0000 | [diff] [blame] | 1084 | @mkdir -p $(dir $@) |
William Roberts | d218558 | 2015-07-16 11:28:02 -0700 | [diff] [blame] | 1085 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $^ > $@ |
Geremy Condra | cd4104e | 2013-03-26 18:19:12 +0000 | [diff] [blame] | 1086 | |
dcashman | 90b3b94 | 2016-12-14 13:47:55 -0800 | [diff] [blame] | 1087 | all_plat_mac_perms_files := $(call build_policy, mac_permissions.xml, $(PLAT_PRIVATE_POLICY)) |
rpcraig | b19665c | 2012-07-30 09:33:03 -0400 | [diff] [blame] | 1088 | |
Shinichiro Hamaji | ef0c14d | 2016-05-13 16:04:58 +0900 | [diff] [blame] | 1089 | # Should be synced with keys.conf. |
dcashman | 90b3b94 | 2016-12-14 13:47:55 -0800 | [diff] [blame] | 1090 | all_plat_keys := platform media shared testkey |
| 1091 | all_plat_keys := $(all_keys:%=$(dir $(DEFAULT_SYSTEM_DEV_CERTIFICATE))/%.x509.pem) |
Shinichiro Hamaji | ef0c14d | 2016-05-13 16:04:58 +0900 | [diff] [blame] | 1092 | |
dcashman | 90b3b94 | 2016-12-14 13:47:55 -0800 | [diff] [blame] | 1093 | $(LOCAL_BUILT_MODULE): PRIVATE_MAC_PERMS_FILES := $(all_plat_mac_perms_files) |
| 1094 | $(LOCAL_BUILT_MODULE): $(plat_mac_perms_keys.tmp) $(HOST_OUT_EXECUTABLES)/insertkeys.py \ |
| 1095 | $(all_plat_mac_perms_files) $(all_plat_keys) |
Geremy Condra | cd4104e | 2013-03-26 18:19:12 +0000 | [diff] [blame] | 1096 | @mkdir -p $(dir $@) |
Nick Kralevich | c3c9052 | 2013-10-25 12:25:36 -0700 | [diff] [blame] | 1097 | $(hide) DEFAULT_SYSTEM_DEV_CERTIFICATE="$(dir $(DEFAULT_SYSTEM_DEV_CERTIFICATE))" \ |
William Roberts | 6aabc1c | 2015-07-30 11:44:26 -0700 | [diff] [blame] | 1098 | $(HOST_OUT_EXECUTABLES)/insertkeys.py -t $(TARGET_BUILD_VARIANT) -c $(TOP) $< -o $@ $(PRIVATE_MAC_PERMS_FILES) |
Geremy Condra | cd4104e | 2013-03-26 18:19:12 +0000 | [diff] [blame] | 1099 | |
William Roberts | 6aabc1c | 2015-07-30 11:44:26 -0700 | [diff] [blame] | 1100 | all_mac_perms_files := |
dcashman | 90b3b94 | 2016-12-14 13:47:55 -0800 | [diff] [blame] | 1101 | all_plat_keys := |
| 1102 | plat_mac_perms_keys.tmp := |
| 1103 | |
| 1104 | ################################## |
| 1105 | include $(CLEAR_VARS) |
| 1106 | |
| 1107 | LOCAL_MODULE := nonplat_mac_permissions.xml |
| 1108 | LOCAL_MODULE_CLASS := ETC |
| 1109 | LOCAL_MODULE_TAGS := optional |
Jeff Vander Stoep | bba9e7b | 2017-03-10 15:51:23 -0800 | [diff] [blame] | 1110 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
dcashman | 90b3b94 | 2016-12-14 13:47:55 -0800 | [diff] [blame] | 1111 | |
| 1112 | include $(BUILD_SYSTEM)/base_rules.mk |
| 1113 | |
| 1114 | # Build keys.conf |
| 1115 | nonplat_mac_perms_keys.tmp := $(intermediates)/nonplat_keys.tmp |
| 1116 | $(nonplat_mac_perms_keys.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
Alex Klyubin | 5596172 | 2017-01-30 18:44:59 -0800 | [diff] [blame] | 1117 | $(nonplat_mac_perms_keys.tmp): $(call build_policy, keys.conf, $(PLAT_VENDOR_POLICY) $(BOARD_SEPOLICY_DIRS) $(REQD_MASK_POLICY)) |
dcashman | 90b3b94 | 2016-12-14 13:47:55 -0800 | [diff] [blame] | 1118 | @mkdir -p $(dir $@) |
| 1119 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $^ > $@ |
| 1120 | |
Alex Klyubin | 5596172 | 2017-01-30 18:44:59 -0800 | [diff] [blame] | 1121 | all_nonplat_mac_perms_files := $(call build_policy, mac_permissions.xml, $(PLAT_VENDOR_POLICY) $(BOARD_SEPOLICY_DIRS) $(REQD_MASK_POLICY)) |
dcashman | 90b3b94 | 2016-12-14 13:47:55 -0800 | [diff] [blame] | 1122 | |
| 1123 | $(LOCAL_BUILT_MODULE): PRIVATE_MAC_PERMS_FILES := $(all_nonplat_mac_perms_files) |
| 1124 | $(LOCAL_BUILT_MODULE): $(nonplat_mac_perms_keys.tmp) $(HOST_OUT_EXECUTABLES)/insertkeys.py \ |
| 1125 | $(all_nonplat_mac_perms_files) |
| 1126 | @mkdir -p $(dir $@) |
| 1127 | $(hide) $(HOST_OUT_EXECUTABLES)/insertkeys.py -t $(TARGET_BUILD_VARIANT) -c $(TOP) $< -o $@ $(PRIVATE_MAC_PERMS_FILES) |
| 1128 | |
| 1129 | nonplat_mac_perms_keys.tmp := |
| 1130 | all_nonplat_mac_perms_files := |
William Roberts | 6aabc1c | 2015-07-30 11:44:26 -0700 | [diff] [blame] | 1131 | |
rpcraig | b19665c | 2012-07-30 09:33:03 -0400 | [diff] [blame] | 1132 | ################################## |
rpcraig | 47cd396 | 2012-10-17 21:09:52 -0400 | [diff] [blame] | 1133 | |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 1134 | add_nl := |
William Roberts | 49693f1 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 1135 | build_device_policy := |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 1136 | build_policy := |
dcashman | d225b69 | 2016-12-12 09:29:04 -0800 | [diff] [blame] | 1137 | built_plat_fc := |
| 1138 | built_nonplat_fc := |
Richard Haines | c8801fe | 2015-12-11 10:39:19 +0000 | [diff] [blame] | 1139 | built_nl := |
Alex Klyubin | 8f7173b | 2017-02-25 14:47:53 -0800 | [diff] [blame] | 1140 | built_plat_cil := |
Alex Klyubin | 8f7173b | 2017-02-25 14:47:53 -0800 | [diff] [blame] | 1141 | built_mapping_cil := |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 1142 | built_plat_pc := |
Alex Klyubin | 193dccd | 2017-03-07 14:05:57 -0800 | [diff] [blame] | 1143 | built_nonplat_cil := |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 1144 | built_nonplat_pc := |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 1145 | built_nonplat_sc := |
| 1146 | built_plat_sc := |
Alex Klyubin | 193dccd | 2017-03-07 14:05:57 -0800 | [diff] [blame] | 1147 | built_precompiled_sepolicy := |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 1148 | built_sepolicy := |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 1149 | built_plat_svc := |
| 1150 | built_nonplat_svc := |
Jeff Vander Stoep | b878769 | 2017-04-21 15:57:07 -0700 | [diff] [blame] | 1151 | mapping_policy := |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 1152 | my_target_arch := |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 1153 | plat_pub_policy.cil := |
| 1154 | reqd_policy_mask.cil := |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 1155 | sepolicy_build_files := |
Alex Klyubin | 7cda44f | 2017-03-21 14:28:53 -0700 | [diff] [blame] | 1156 | sepolicy_build_cil_workaround_files := |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 1157 | with_asan := |
Alice Chu | cdfb06f | 2012-11-01 11:33:04 -0700 | [diff] [blame] | 1158 | |
| 1159 | include $(call all-makefiles-under,$(LOCAL_PATH)) |