diff options
author | martinwu <martinwu@google.com> | 2023-04-24 02:20:40 +0000 |
---|---|---|
committer | Martin Wu <martinwu@google.com> | 2023-04-27 01:37:20 +0000 |
commit | 6a41ee1f215576718a60eaba539e501ea1bd21a8 (patch) | |
tree | 6d340aa5f8771b2ab9664fb7e2ed43a6adcec6fe | |
parent | 6c4c5cdf2625559c524d68f6f59bce00799994df (diff) | |
download | gs-common-6a41ee1f215576718a60eaba539e501ea1bd21a8.tar.gz |
Add sepolicy for dumpstate to zip tcpdump into bugreport
Bug: 264490014
Test: 1. Enable tcpdump_logger always-on function
2. Dump bugreport
3. Pull dumpstate_board.bin and chagne it to zip
4. Unzip dumpstate_board.zip and check if tcpdump files
are there.
Change-Id: I420f26f17260dff34617c8c723f126ee9e56bb27
-rw-r--r-- | radio/sepolicy/dump_radio.te | 2 | ||||
-rw-r--r-- | radio/sepolicy/file.te | 6 | ||||
-rw-r--r-- | radio/sepolicy/file_contexts | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/radio/sepolicy/dump_radio.te b/radio/sepolicy/dump_radio.te index 146776c..7970f08 100644 --- a/radio/sepolicy/dump_radio.te +++ b/radio/sepolicy/dump_radio.te @@ -3,6 +3,8 @@ pixel_bugreport(dump_radio) userdebug_or_eng(` allow dump_radio radio_vendor_data_file:dir create_dir_perms; allow dump_radio radio_vendor_data_file:file create_file_perms; + allow dump_radio tcpdump_vendor_data_file:dir r_dir_perms; + allow dump_radio tcpdump_vendor_data_file:file r_file_perms; get_prop(dump_radio, vendor_rild_prop) get_prop(dump_radio vendor_tcpdump_log_prop) ') diff --git a/radio/sepolicy/file.te b/radio/sepolicy/file.te new file mode 100644 index 0000000..02d0209 --- /dev/null +++ b/radio/sepolicy/file.te @@ -0,0 +1,6 @@ +# Data +type tcpdump_vendor_data_file, file_type, data_file_type; + +userdebug_or_eng(` + typeattribute tcpdump_vendor_data_file mlstrustedobject; +') diff --git a/radio/sepolicy/file_contexts b/radio/sepolicy/file_contexts index 558beb3..20d786c 100644 --- a/radio/sepolicy/file_contexts +++ b/radio/sepolicy/file_contexts @@ -1 +1,2 @@ /vendor/bin/dump/dump_radio u:object_r:dump_radio_exec:s0 +/data/vendor/tcpdump_logger(/.*)? u:object_r:tcpdump_vendor_data_file:s0 |