summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-01-10 00:21:15 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-01-10 00:21:15 +0000
commita316b019505b09179c434084af97e17f186e5855 (patch)
tree33ff36695c7881211de5761dd2d33197faf12312
parentcb7a2296d6f14e6be9d4110bb9b77d0702a01e34 (diff)
parentdb0a7dd6820c5bc77f5e00241390b0e97c616ca0 (diff)
downloadpixel-sepolicy-android13-qpr3-s14-release.tar.gz
Change-Id: Ifbdb0ee91bfc8036f15f77686895497246500b8d
-rw-r--r--googlebattery/dumpstate.te9
-rw-r--r--mm/gki/vendor_init.te3
-rw-r--r--pixelstats/pixelstats_vendor.te1
-rw-r--r--wifi_diagnostic/file_contexts1
-rw-r--r--wifi_diagnostic/hal_wifi_supplicant_default.te3
-rw-r--r--wifi_diagnostic/logger_app.te3
-rw-r--r--wifi_diagnostic/property.te1
-rw-r--r--wifi_diagnostic/property_contexts2
-rw-r--r--wifi_diagnostic/wifi_diagnostic.te29
9 files changed, 46 insertions, 6 deletions
diff --git a/googlebattery/dumpstate.te b/googlebattery/dumpstate.te
index b84095c..5de6a2e 100644
--- a/googlebattery/dumpstate.te
+++ b/googlebattery/dumpstate.te
@@ -1,6 +1,3 @@
-userdebug_or_eng(`
- # To find and bind Google Battery HAL
- allow dumpstate hal_googlebattery_service:service_manager find;
- binder_call(dumpstate, hal_googlebattery)
-')
-
+# To find and bind Google Battery HAL
+allow dumpstate hal_googlebattery_service:service_manager find;
+binder_call(dumpstate, hal_googlebattery)
diff --git a/mm/gki/vendor_init.te b/mm/gki/vendor_init.te
index 5bedbad..018b318 100644
--- a/mm/gki/vendor_init.te
+++ b/mm/gki/vendor_init.te
@@ -1,3 +1,6 @@
allow vendor_init proc_watermark_boost_factor:file w_file_perms;
allow vendor_init proc_lowmem_reserve_ratio:file w_file_perms;
allow vendor_init proc_min_free_kbytes:file w_file_perms;
+
+allow vendor_init debugfs_tracing_instances:dir create_dir_perms;
+allow vendor_init debugfs_tracing_instances:file w_file_perms;
diff --git a/pixelstats/pixelstats_vendor.te b/pixelstats/pixelstats_vendor.te
index ed506e9..75fd6fe 100644
--- a/pixelstats/pixelstats_vendor.te
+++ b/pixelstats/pixelstats_vendor.te
@@ -24,6 +24,7 @@ allow pixelstats_vendor sysfs_pixel_stat:dir r_dir_perms;
allow pixelstats_vendor sysfs_pixel_stat:file r_file_perms;
userdebug_or_eng(`
+ allow pixelstats_vendor { proc_pressure_cpu proc_pressure_io proc_pressure_mem }:file r_file_perms;
allow pixelstats_vendor proc_vmstat:file r_file_perms;
allow pixelstats_vendor sysfs_ion:dir search;
allow pixelstats_vendor sysfs_ion:file r_file_perms;
diff --git a/wifi_diagnostic/file_contexts b/wifi_diagnostic/file_contexts
new file mode 100644
index 0000000..f0a40d5
--- /dev/null
+++ b/wifi_diagnostic/file_contexts
@@ -0,0 +1 @@
+/vendor/bin/wifi_diagnostic u:object_r:wifi_diagnostic_exec:s0
diff --git a/wifi_diagnostic/hal_wifi_supplicant_default.te b/wifi_diagnostic/hal_wifi_supplicant_default.te
new file mode 100644
index 0000000..9cd58c1
--- /dev/null
+++ b/wifi_diagnostic/hal_wifi_supplicant_default.te
@@ -0,0 +1,3 @@
+userdebug_or_eng(`
+allow hal_wifi_supplicant_default wifi_diagnostic:unix_dgram_socket sendto;
+')
diff --git a/wifi_diagnostic/logger_app.te b/wifi_diagnostic/logger_app.te
new file mode 100644
index 0000000..0fc09a3
--- /dev/null
+++ b/wifi_diagnostic/logger_app.te
@@ -0,0 +1,3 @@
+userdebug_or_eng(`
+ set_prop(logger_app, vendor_wifi_diagnostic_prop)
+')
diff --git a/wifi_diagnostic/property.te b/wifi_diagnostic/property.te
new file mode 100644
index 0000000..ad69f65
--- /dev/null
+++ b/wifi_diagnostic/property.te
@@ -0,0 +1 @@
+vendor_internal_prop(vendor_wifi_diagnostic_prop)
diff --git a/wifi_diagnostic/property_contexts b/wifi_diagnostic/property_contexts
new file mode 100644
index 0000000..2348204
--- /dev/null
+++ b/wifi_diagnostic/property_contexts
@@ -0,0 +1,2 @@
+vendor.wifi.diagnostic.start u:object_r:vendor_wifi_diagnostic_prop:s0
+vendor.wifi.diagnostic.reassocBssid u:object_r:vendor_wifi_diagnostic_prop:s0
diff --git a/wifi_diagnostic/wifi_diagnostic.te b/wifi_diagnostic/wifi_diagnostic.te
new file mode 100644
index 0000000..23a39d3
--- /dev/null
+++ b/wifi_diagnostic/wifi_diagnostic.te
@@ -0,0 +1,29 @@
+type wifi_diagnostic, domain;
+type wifi_diagnostic_exec, exec_type, vendor_file_type, file_type;
+
+# make transition from init to its domain
+userdebug_or_eng(`
+init_daemon_domain(wifi_diagnostic)
+net_domain(wifi_diagnostic)
+
+# daemon
+allow wifi_diagnostic wifi_logging_data_file:dir create_dir_perms;
+allow wifi_diagnostic wifi_logging_data_file:file create_file_perms;
+allow wifi_diagnostic vendor_shell_exec:file execute_no_trans;
+allow wifi_diagnostic wifi_diagnostic_exec:file execute_no_trans;
+allow wifi_diagnostic self:capability net_admin;
+allow wifi_diagnostic self:udp_socket ioctl;
+allowxperm wifi_diagnostic self:udp_socket ioctl { SIOCETHTOOL SIOCDEVPRIVATE };
+
+# wpa_cli
+allow wifi_diagnostic self:capability { setgid setuid };
+allow wifi_diagnostic wpa_data_file:dir w_dir_perms;
+allow wifi_diagnostic wpa_data_file:sock_file { create setattr write unlink };
+allow wifi_diagnostic hal_wifi_supplicant_default:unix_dgram_socket sendto;
+allow wifi_diagnostic vendor_file:file execute_no_trans;
+allow wifi_diagnostic vendor_file:dir r_dir_perms;
+
+# property
+get_prop(wifi_diagnostic, vendor_wifi_diagnostic_prop)
+set_prop(wifi_diagnostic, vendor_wifi_diagnostic_prop)
+')