From 7f468a902fedabe3dede9f7d0825480b05eb225d Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Mon, 3 Feb 2025 07:06:54 +0000 Subject: [PATCH] Add astd sepolicy to gs-common for P26 factory builds Bug: 391090956 Bug: 393999182 Flag: EXEMPT bugFix Test: Compile successful. Change-Id: Idfcbf96a52326b613684b680676f5213136f2326 --- astd/astd.mk | 9 +++++++++ astd/sepolicy/astd.te | 10 ++++++++++ astd/sepolicy/file_contexts | 3 +++ 3 files changed, 22 insertions(+) create mode 100644 astd/astd.mk create mode 100644 astd/sepolicy/astd.te create mode 100644 astd/sepolicy/file_contexts diff --git a/astd/astd.mk b/astd/astd.mk new file mode 100644 index 0000000..0dfa4f9 --- /dev/null +++ b/astd/astd.mk @@ -0,0 +1,9 @@ +# This module is only for factory targets, please include this makefile +# with check: +# +# ifneq ($(filter factory_%,$(TARGET_PRODUCT)),) +# include device/google/gs-common/astd/astd.mk +# endif +SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += device/google/gs-common/astd/sepolicy + +PRODUCT_PACKAGES_DEBUG += astd diff --git a/astd/sepolicy/astd.te b/astd/sepolicy/astd.te new file mode 100644 index 0000000..815e832 --- /dev/null +++ b/astd/sepolicy/astd.te @@ -0,0 +1,10 @@ +# astd service +type astd, domain; +type astd_exec, exec_type, file_type, system_file_type; + +typeattribute astd coredomain; + +userdebug_or_eng(` + init_daemon_domain(astd) +') + diff --git a/astd/sepolicy/file_contexts b/astd/sepolicy/file_contexts new file mode 100644 index 0000000..17ac54c --- /dev/null +++ b/astd/sepolicy/file_contexts @@ -0,0 +1,3 @@ +/system_ext/bin/astc u:object_r:astd_exec:s0 +/system_ext/bin/astd u:object_r:astd_exec:s0 +