2019-01-08 01:43:31 +01:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE := plat_mac_permissions.xml
|
2021-02-04 08:07:40 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_unencumbered
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice unencumbered
|
|
|
|
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
|
2019-01-08 01:43:31 +01:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/selinux
|
|
|
|
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
|
|
|
|
2019-09-09 16:05:49 +02:00
|
|
|
all_plat_mac_perms_keys := $(call build_policy, keys.conf, $(PLAT_PRIVATE_POLICY) $(SYSTEM_EXT_PRIVATE_POLICY) $(PRODUCT_PRIVATE_POLICY))
|
2019-06-19 19:52:50 +02:00
|
|
|
all_plat_mac_perms_files := $(call build_policy, mac_permissions.xml, $(PLAT_PRIVATE_POLICY))
|
|
|
|
|
2019-01-08 01:43:31 +01:00
|
|
|
# Build keys.conf
|
|
|
|
plat_mac_perms_keys.tmp := $(intermediates)/plat_keys.tmp
|
|
|
|
$(plat_mac_perms_keys.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS)
|
2019-06-19 19:52:50 +02:00
|
|
|
$(plat_mac_perms_keys.tmp): PRIVATE_KEYS := $(all_plat_mac_perms_keys)
|
|
|
|
$(plat_mac_perms_keys.tmp): $(all_plat_mac_perms_keys) $(M4)
|
2019-01-08 01:43:31 +01:00
|
|
|
@mkdir -p $(dir $@)
|
2019-06-19 19:52:50 +02:00
|
|
|
$(hide) $(M4) --fatal-warnings -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_KEYS) > $@
|
2019-01-08 01:43:31 +01:00
|
|
|
|
|
|
|
# Should be synced with keys.conf.
|
2022-03-15 18:28:02 +01:00
|
|
|
all_plat_keys := platform media networkstack sdk_sandbox shared testkey
|
2019-05-28 23:20:08 +02:00
|
|
|
all_plat_keys := $(all_plat_keys:%=$(dir $(DEFAULT_SYSTEM_DEV_CERTIFICATE))/%.x509.pem)
|
2019-01-08 01:43:31 +01:00
|
|
|
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_MAC_PERMS_FILES := $(all_plat_mac_perms_files)
|
2021-12-03 03:38:04 +01:00
|
|
|
$(LOCAL_BUILT_MODULE): $(plat_mac_perms_keys.tmp) $(HOST_OUT_EXECUTABLES)/insertkeys \
|
2019-01-08 01:43:31 +01:00
|
|
|
$(all_plat_mac_perms_files) $(all_plat_keys)
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
$(hide) DEFAULT_SYSTEM_DEV_CERTIFICATE="$(dir $(DEFAULT_SYSTEM_DEV_CERTIFICATE))" \
|
2019-08-07 11:23:47 +02:00
|
|
|
MAINLINE_SEPOLICY_DEV_CERTIFICATES="$(MAINLINE_SEPOLICY_DEV_CERTIFICATES)" \
|
2021-12-03 03:38:04 +01:00
|
|
|
$(HOST_OUT_EXECUTABLES)/insertkeys -t $(TARGET_BUILD_VARIANT) -c $(TOP) $< -o $@ $(PRIVATE_MAC_PERMS_FILES)
|
2019-01-08 01:43:31 +01:00
|
|
|
|
|
|
|
all_plat_keys :=
|
2019-06-19 19:52:50 +02:00
|
|
|
all_plat_mac_perms_files :=
|
|
|
|
all_plat_mac_perms_keys :=
|
2019-01-08 01:43:31 +01:00
|
|
|
plat_mac_perms_keys.tmp :=
|
|
|
|
|
|
|
|
##################################
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2019-09-09 16:05:49 +02:00
|
|
|
LOCAL_MODULE := system_ext_mac_permissions.xml
|
2021-02-04 08:07:40 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_unencumbered
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice unencumbered
|
|
|
|
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
|
2019-09-09 16:05:49 +02:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_SYSTEM_EXT)/etc/selinux
|
|
|
|
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
|
|
|
|
|
|
|
all_system_ext_mac_perms_keys := $(call build_policy, keys.conf, $(SYSTEM_EXT_PRIVATE_POLICY) $(REQD_MASK_POLICY))
|
|
|
|
all_system_ext_mac_perms_files := $(call build_policy, mac_permissions.xml, $(SYSTEM_EXT_PRIVATE_POLICY) $(REQD_MASK_POLICY))
|
|
|
|
|
|
|
|
# Build keys.conf
|
|
|
|
system_ext_mac_perms_keys.tmp := $(intermediates)/system_ext_keys.tmp
|
|
|
|
$(system_ext_mac_perms_keys.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS)
|
|
|
|
$(system_ext_mac_perms_keys.tmp): PRIVATE_KEYS := $(all_system_ext_mac_perms_keys)
|
2020-07-24 02:59:38 +02:00
|
|
|
$(system_ext_mac_perms_keys.tmp): $(all_system_ext_mac_perms_keys) $(M4)
|
2019-09-09 16:05:49 +02:00
|
|
|
@mkdir -p $(dir $@)
|
2020-07-24 02:59:38 +02:00
|
|
|
$(hide) $(M4) --fatal-warnings -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_KEYS) > $@
|
2019-09-09 16:05:49 +02:00
|
|
|
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_MAC_PERMS_FILES := $(all_system_ext_mac_perms_files)
|
2021-12-03 03:38:04 +01:00
|
|
|
$(LOCAL_BUILT_MODULE): $(system_ext_mac_perms_keys.tmp) $(HOST_OUT_EXECUTABLES)/insertkeys \
|
2019-09-09 16:05:49 +02:00
|
|
|
$(all_system_ext_mac_perms_files)
|
|
|
|
@mkdir -p $(dir $@)
|
2021-12-03 03:38:04 +01:00
|
|
|
$(hide) $(HOST_OUT_EXECUTABLES)/insertkeys -t $(TARGET_BUILD_VARIANT) -c $(TOP) $< -o $@ $(PRIVATE_MAC_PERMS_FILES)
|
2019-09-09 16:05:49 +02:00
|
|
|
|
|
|
|
system_ext_mac_perms_keys.tmp :=
|
|
|
|
all_system_ext_mac_perms_files :=
|
|
|
|
all_system_ext_mac_perms_keys :=
|
|
|
|
|
|
|
|
##################################
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2019-01-08 01:43:31 +01:00
|
|
|
LOCAL_MODULE := product_mac_permissions.xml
|
2021-02-04 08:07:40 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_unencumbered
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice unencumbered
|
|
|
|
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
|
2019-01-08 01:43:31 +01:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/etc/selinux
|
|
|
|
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
|
|
|
|
2019-06-19 19:52:50 +02:00
|
|
|
all_product_mac_perms_keys := $(call build_policy, keys.conf, $(PRODUCT_PRIVATE_POLICY) $(REQD_MASK_POLICY))
|
|
|
|
all_product_mac_perms_files := $(call build_policy, mac_permissions.xml, $(PRODUCT_PRIVATE_POLICY) $(REQD_MASK_POLICY))
|
|
|
|
|
2019-01-08 01:43:31 +01:00
|
|
|
# Build keys.conf
|
|
|
|
product_mac_perms_keys.tmp := $(intermediates)/product_keys.tmp
|
|
|
|
$(product_mac_perms_keys.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS)
|
2019-06-19 19:52:50 +02:00
|
|
|
$(product_mac_perms_keys.tmp): PRIVATE_KEYS := $(all_product_mac_perms_keys)
|
2020-07-24 02:59:38 +02:00
|
|
|
$(product_mac_perms_keys.tmp): $(all_product_mac_perms_keys) $(M4)
|
2019-01-08 01:43:31 +01:00
|
|
|
@mkdir -p $(dir $@)
|
2020-07-24 02:59:38 +02:00
|
|
|
$(hide) $(M4) --fatal-warnings -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_KEYS) > $@
|
2019-01-08 01:43:31 +01:00
|
|
|
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_MAC_PERMS_FILES := $(all_product_mac_perms_files)
|
2021-12-03 03:38:04 +01:00
|
|
|
$(LOCAL_BUILT_MODULE): $(product_mac_perms_keys.tmp) $(HOST_OUT_EXECUTABLES)/insertkeys \
|
2019-01-08 01:43:31 +01:00
|
|
|
$(all_product_mac_perms_files)
|
|
|
|
@mkdir -p $(dir $@)
|
2021-12-03 03:38:04 +01:00
|
|
|
$(hide) $(HOST_OUT_EXECUTABLES)/insertkeys -t $(TARGET_BUILD_VARIANT) -c $(TOP) $< -o $@ $(PRIVATE_MAC_PERMS_FILES)
|
2019-01-08 01:43:31 +01:00
|
|
|
|
|
|
|
product_mac_perms_keys.tmp :=
|
|
|
|
all_product_mac_perms_files :=
|
2019-06-19 19:52:50 +02:00
|
|
|
all_product_mac_perms_keys :=
|
2019-01-08 01:43:31 +01:00
|
|
|
|
|
|
|
##################################
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE := vendor_mac_permissions.xml
|
2021-02-04 08:07:40 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_unencumbered
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice unencumbered
|
|
|
|
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
|
2019-01-08 01:43:31 +01:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux
|
|
|
|
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
|
|
|
|
2021-12-08 14:45:58 +01:00
|
|
|
all_vendor_mac_perms_keys := $(call build_policy, keys.conf, $(BOARD_PLAT_VENDOR_POLICY) $(BOARD_VENDOR_SEPOLICY_DIRS) $(BOARD_REQD_MASK_POLICY))
|
|
|
|
all_vendor_mac_perms_files := $(call build_policy, mac_permissions.xml, $(BOARD_PLAT_VENDOR_POLICY) $(BOARD_VENDOR_SEPOLICY_DIRS) $(BOARD_REQD_MASK_POLICY))
|
2019-06-19 19:52:50 +02:00
|
|
|
|
2019-01-08 01:43:31 +01:00
|
|
|
# Build keys.conf
|
|
|
|
vendor_mac_perms_keys.tmp := $(intermediates)/vendor_keys.tmp
|
|
|
|
$(vendor_mac_perms_keys.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS)
|
2019-06-19 19:52:50 +02:00
|
|
|
$(vendor_mac_perms_keys.tmp): PRIVATE_KEYS := $(all_vendor_mac_perms_keys)
|
|
|
|
$(vendor_mac_perms_keys.tmp): $(all_vendor_mac_perms_keys) $(M4)
|
2019-01-08 01:43:31 +01:00
|
|
|
@mkdir -p $(dir $@)
|
2019-06-19 19:52:50 +02:00
|
|
|
$(hide) $(M4) --fatal-warnings -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_KEYS) > $@
|
2019-01-08 01:43:31 +01:00
|
|
|
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_MAC_PERMS_FILES := $(all_vendor_mac_perms_files)
|
2021-12-03 03:38:04 +01:00
|
|
|
$(LOCAL_BUILT_MODULE): $(vendor_mac_perms_keys.tmp) $(HOST_OUT_EXECUTABLES)/insertkeys \
|
2019-01-08 01:43:31 +01:00
|
|
|
$(all_vendor_mac_perms_files)
|
|
|
|
@mkdir -p $(dir $@)
|
2020-06-02 16:16:12 +02:00
|
|
|
$(hide) DEFAULT_SYSTEM_DEV_CERTIFICATE="$(dir $(DEFAULT_SYSTEM_DEV_CERTIFICATE))" \
|
2021-12-03 03:38:04 +01:00
|
|
|
$(HOST_OUT_EXECUTABLES)/insertkeys -t $(TARGET_BUILD_VARIANT) -c $(TOP) $< -o $@ $(PRIVATE_MAC_PERMS_FILES)
|
2019-01-08 01:43:31 +01:00
|
|
|
|
|
|
|
vendor_mac_perms_keys.tmp :=
|
|
|
|
all_vendor_mac_perms_files :=
|
2019-06-19 19:52:50 +02:00
|
|
|
all_vendor_mac_perms_keys :=
|
2019-01-08 01:43:31 +01:00
|
|
|
|
|
|
|
##################################
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE := odm_mac_permissions.xml
|
2021-02-04 08:07:40 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_unencumbered
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice unencumbered
|
|
|
|
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
|
2019-01-08 01:43:31 +01:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_ODM)/etc/selinux
|
|
|
|
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
|
|
|
|
2019-06-19 19:52:50 +02:00
|
|
|
all_odm_mac_perms_keys := $(call build_policy, keys.conf, $(BOARD_ODM_SEPOLICY_DIRS) $(REQD_MASK_POLICY))
|
|
|
|
all_odm_mac_perms_files := $(call build_policy, mac_permissions.xml, $(BOARD_ODM_SEPOLICY_DIRS) $(REQD_MASK_POLICY))
|
|
|
|
|
2019-01-08 01:43:31 +01:00
|
|
|
# Build keys.conf
|
|
|
|
odm_mac_perms_keys.tmp := $(intermediates)/odm_keys.tmp
|
|
|
|
$(odm_mac_perms_keys.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS)
|
2019-06-19 19:52:50 +02:00
|
|
|
$(odm_mac_perms_keys.tmp): PRIVATE_KEYS := $(all_odm_mac_perms_keys)
|
|
|
|
$(odm_mac_perms_keys.tmp): $(all_odm_mac_perms_keys) $(M4)
|
2019-01-08 01:43:31 +01:00
|
|
|
@mkdir -p $(dir $@)
|
2019-06-19 19:52:50 +02:00
|
|
|
$(hide) $(M4) --fatal-warnings -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_KEYS) > $@
|
2019-01-08 01:43:31 +01:00
|
|
|
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_MAC_PERMS_FILES := $(all_odm_mac_perms_files)
|
2021-12-03 03:38:04 +01:00
|
|
|
$(LOCAL_BUILT_MODULE): $(odm_mac_perms_keys.tmp) $(HOST_OUT_EXECUTABLES)/insertkeys \
|
2019-01-08 01:43:31 +01:00
|
|
|
$(all_odm_mac_perms_files)
|
|
|
|
@mkdir -p $(dir $@)
|
2021-12-03 03:38:04 +01:00
|
|
|
$(hide) $(HOST_OUT_EXECUTABLES)/insertkeys -t $(TARGET_BUILD_VARIANT) -c $(TOP) $< -o $@ $(PRIVATE_MAC_PERMS_FILES)
|
2019-01-08 01:43:31 +01:00
|
|
|
|
|
|
|
odm_mac_perms_keys.tmp :=
|
|
|
|
all_odm_mac_perms_files :=
|