summaryrefslogtreecommitdiff
path: root/sepolicy/te_macros
diff options
context:
space:
mode:
Diffstat (limited to 'sepolicy/te_macros')
-rw-r--r--sepolicy/te_macros17
1 files changed, 17 insertions, 0 deletions
diff --git a/sepolicy/te_macros b/sepolicy/te_macros
new file mode 100644
index 0000000..632389c
--- /dev/null
+++ b/sepolicy/te_macros
@@ -0,0 +1,17 @@
+#####################################
+# Userfastboot only
+# SELinux rules which apply only to userfastboot mode
+#
+define(`userfastboot_only', ifelse(target_userfastboot, `true', $1, ))
+
+define(`notuserfastboot', ifelse(target_userfastboot, `true', -userfastboot, ))
+
+
+#####################################
+# target_only(target, rules)
+# SELinux rules which only apply to a particular target
+# target - the target name in TARGET_PRODUCT. Note this is a substring search
+# so target_only(`coh', `rules') is the same as target_only(`coho', `rules')
+# rules - Any rules you wish to add, make sure to quote them with `'
+#
+define(`target_only', `ifelse(eval(index(board_sepolicy_target_product, $1) >= 0),1,$2)')