seandroid: Restructuring sepolicy codebase
Seandroid codebase is restructured using this gerrit
All the sepolicies which are common acress all the
chipsets needs to be kept inside common folder. And
all the other policies which are specific to target,
should be kept inside the folder with the chipset name
i.e, all the policies specific to 8084 should be
inside apq8084 folder.
Change-Id: I14734e2d3b9d6a0846a2c99e942c8da9495fa6ab
diff --git a/Android.mk b/Android.mk
index b8473cf..ef4ed9a 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,7 +1,9 @@
# Board specific SELinux policy variable definitions
BOARD_SEPOLICY_DIRS := \
device/qcom/sepolicy \
- device/qcom/sepolicy/test
+ device/qcom/sepolicy/common \
+ device/qcom/sepolicy/test \
+ device/qcom/sepolicy/$(TARGET_BOARD_PLATFORM)
BOARD_SEPOLICY_UNION := \
genfs_contexts \
@@ -34,4 +36,5 @@
sensors.te \
sensors_test.te \
system_app.te \
- thermal-engine.te
+ thermal-engine.te \
+ global_macros.te
diff --git a/apq8084/Android.mk b/apq8084/Android.mk
new file mode 100644
index 0000000..c750eef
--- /dev/null
+++ b/apq8084/Android.mk
@@ -0,0 +1,2 @@
+BOARD_SEPOLICY_DIRS := \
+ device/qcom/sepolicy/$(TARGET_BOARD_PLATFORM)
\ No newline at end of file
diff --git a/atfwd.te b/atfwd.te
deleted file mode 100644
index ad7ce48..0000000
--- a/atfwd.te
+++ /dev/null
@@ -1,24 +0,0 @@
-type atfwd, domain;
-type atfwd_exec, exec_type, file_type;
-
-# Started by init
-init_daemon_domain(atfwd)
-
-#============= atfwd ==============
-#Set CTL property
-allow atfwd ctl_default_prop:property_service set;
-
-#Allow logging
-allow atfwd diag_device:chr_file { read write open };
-
-# Talks to init via the property socket.
-unix_socket_connect(atfwd, property, init);
-
-# Creates/Talks to qmuxd via the qmux_radio socket.
-unix_socket_connect(atfwd, qmux_radio, qmuxd);
-allow atfwd qmux_radio_socket:sock_file create;
-allow atfwd qmux_radio_socket:dir { write search add_name };
-
-#Allow IPC binding with ServiceManager & System apps
-allow atfwd servicemanager:binder call;
-allow atfwd system_app:binder call;
diff --git a/adbd.te b/common/adbd.te
similarity index 100%
rename from adbd.te
rename to common/adbd.te
diff --git a/app.te b/common/app.te
similarity index 100%
rename from app.te
rename to common/app.te
diff --git a/common/atfwd.te b/common/atfwd.te
new file mode 100644
index 0000000..4108a5c
--- /dev/null
+++ b/common/atfwd.te
@@ -0,0 +1,24 @@
+type atfwd, domain;
+type atfwd_exec, exec_type, file_type;
+
+# Started by init
+#init_daemon_domain(atfwd)
+
+#============= atfwd ==============
+#Set CTL property
+#allow atfwd ctl_default_prop:property_service set;
+
+#Allow logging
+#allow atfwd diag_device:chr_file { read write open };
+
+# Talks to init via the property socket.
+#unix_socket_connect(atfwd, property, init);
+
+# Creates/Talks to qmuxd via the qmux_radio socket.
+#unix_socket_connect(atfwd, qmux_radio, qmuxd);
+#allow atfwd qmux_radio_socket:sock_file create;
+#allow atfwd qmux_radio_socket:dir { write search add_name };
+
+#Allow IPC binding with ServiceManager & System apps
+#allow atfwd servicemanager:binder call;
+#allow atfwd system_app:binder call;
diff --git a/audiod.te b/common/audiod.te
similarity index 100%
rename from audiod.te
rename to common/audiod.te
diff --git a/cnd.te b/common/cnd.te
similarity index 100%
rename from cnd.te
rename to common/cnd.te
diff --git a/device.te b/common/device.te
similarity index 100%
rename from device.te
rename to common/device.te
diff --git a/diag.te b/common/diag.te
similarity index 100%
rename from diag.te
rename to common/diag.te
diff --git a/drmserver.te b/common/drmserver.te
similarity index 100%
rename from drmserver.te
rename to common/drmserver.te
diff --git a/file.te b/common/file.te
similarity index 100%
rename from file.te
rename to common/file.te
diff --git a/file_contexts b/common/file_contexts
similarity index 100%
rename from file_contexts
rename to common/file_contexts
diff --git a/genfs_contexts b/common/genfs_contexts
similarity index 100%
rename from genfs_contexts
rename to common/genfs_contexts
diff --git a/common/global_macros.te b/common/global_macros.te
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/common/global_macros.te
diff --git a/init.te b/common/init.te
similarity index 100%
rename from init.te
rename to common/init.te
diff --git a/irsc_util.te b/common/irsc_util.te
similarity index 100%
rename from irsc_util.te
rename to common/irsc_util.te
diff --git a/mediaserver.te b/common/mediaserver.te
similarity index 100%
rename from mediaserver.te
rename to common/mediaserver.te
diff --git a/msm_irqbalanced.te b/common/msm_irqbalanced.te
similarity index 100%
rename from msm_irqbalanced.te
rename to common/msm_irqbalanced.te
diff --git a/netd.te b/common/netd.te
similarity index 100%
rename from netd.te
rename to common/netd.te
diff --git a/netmgrd.te b/common/netmgrd.te
similarity index 100%
rename from netmgrd.te
rename to common/netmgrd.te
diff --git a/qmuxd.te b/common/qmuxd.te
similarity index 100%
rename from qmuxd.te
rename to common/qmuxd.te
diff --git a/radio.te b/common/radio.te
similarity index 100%
rename from radio.te
rename to common/radio.te
diff --git a/rild.te b/common/rild.te
similarity index 100%
rename from rild.te
rename to common/rild.te
diff --git a/sensors.te b/common/sensors.te
similarity index 100%
rename from sensors.te
rename to common/sensors.te
diff --git a/system_server.te b/common/system_server.te
similarity index 100%
rename from system_server.te
rename to common/system_server.te
diff --git a/thermal-engine.te b/common/thermal-engine.te
similarity index 100%
rename from thermal-engine.te
rename to common/thermal-engine.te
diff --git a/ueventd.te b/common/ueventd.te
similarity index 100%
rename from ueventd.te
rename to common/ueventd.te
diff --git a/vold.te b/common/vold.te
similarity index 100%
rename from vold.te
rename to common/vold.te
diff --git a/wpa_supplicant.te b/common/wpa_supplicant.te
similarity index 100%
rename from wpa_supplicant.te
rename to common/wpa_supplicant.te
diff --git a/mpq8064/Android.mk b/mpq8064/Android.mk
new file mode 100644
index 0000000..c750eef
--- /dev/null
+++ b/mpq8064/Android.mk
@@ -0,0 +1,2 @@
+BOARD_SEPOLICY_DIRS := \
+ device/qcom/sepolicy/$(TARGET_BOARD_PLATFORM)
\ No newline at end of file
diff --git a/mpq8092/Android.mk b/mpq8092/Android.mk
new file mode 100644
index 0000000..c750eef
--- /dev/null
+++ b/mpq8092/Android.mk
@@ -0,0 +1,2 @@
+BOARD_SEPOLICY_DIRS := \
+ device/qcom/sepolicy/$(TARGET_BOARD_PLATFORM)
\ No newline at end of file
diff --git a/msm8916/Android.mk b/msm8916/Android.mk
new file mode 100644
index 0000000..c750eef
--- /dev/null
+++ b/msm8916/Android.mk
@@ -0,0 +1,2 @@
+BOARD_SEPOLICY_DIRS := \
+ device/qcom/sepolicy/$(TARGET_BOARD_PLATFORM)
\ No newline at end of file
diff --git a/msm8939/Android.mk b/msm8939/Android.mk
new file mode 100644
index 0000000..c750eef
--- /dev/null
+++ b/msm8939/Android.mk
@@ -0,0 +1,2 @@
+BOARD_SEPOLICY_DIRS := \
+ device/qcom/sepolicy/$(TARGET_BOARD_PLATFORM)
\ No newline at end of file
diff --git a/msm8960/Android.mk b/msm8960/Android.mk
new file mode 100644
index 0000000..c750eef
--- /dev/null
+++ b/msm8960/Android.mk
@@ -0,0 +1,2 @@
+BOARD_SEPOLICY_DIRS := \
+ device/qcom/sepolicy/$(TARGET_BOARD_PLATFORM)
\ No newline at end of file
diff --git a/msm8974/Android.mk b/msm8974/Android.mk
new file mode 100644
index 0000000..c750eef
--- /dev/null
+++ b/msm8974/Android.mk
@@ -0,0 +1,2 @@
+BOARD_SEPOLICY_DIRS := \
+ device/qcom/sepolicy/$(TARGET_BOARD_PLATFORM)
\ No newline at end of file
diff --git a/msm8994/Android.mk b/msm8994/Android.mk
new file mode 100644
index 0000000..c750eef
--- /dev/null
+++ b/msm8994/Android.mk
@@ -0,0 +1,2 @@
+BOARD_SEPOLICY_DIRS := \
+ device/qcom/sepolicy/$(TARGET_BOARD_PLATFORM)
\ No newline at end of file
diff --git a/msm8x10/Android.mk b/msm8x10/Android.mk
new file mode 100644
index 0000000..c750eef
--- /dev/null
+++ b/msm8x10/Android.mk
@@ -0,0 +1,2 @@
+BOARD_SEPOLICY_DIRS := \
+ device/qcom/sepolicy/$(TARGET_BOARD_PLATFORM)
\ No newline at end of file
diff --git a/msm8x26/Android.mk b/msm8x26/Android.mk
new file mode 100644
index 0000000..c750eef
--- /dev/null
+++ b/msm8x26/Android.mk
@@ -0,0 +1,2 @@
+BOARD_SEPOLICY_DIRS := \
+ device/qcom/sepolicy/$(TARGET_BOARD_PLATFORM)
\ No newline at end of file