Skip to content

Commit 6f5797a

Browse files
P.Adarsh Reddyandroid-build-merge-worker-robot
P.Adarsh Reddy
authored andcommitted
Uncrypt: Allow uncrypt to write on ota_package_file. am: 5491d7e am: ce380f7
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/12133466 Change-Id: I2ea03595c621a09b0924ef2b9d2d48bfde5ef45e
2 parents 6ec36ff + ce380f7 commit 6f5797a

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

prebuilts/api/30.0/public/uncrypt.te

+6-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ allow uncrypt cache_file:dir search;
1515
allow uncrypt cache_recovery_file:dir rw_dir_perms;
1616
allow uncrypt cache_recovery_file:file create_file_perms;
1717

18-
# Read OTA zip file at /data/ota_package/.
18+
# Read and write(for f2fs_pin_file) on OTA zip file at /data/ota_package/.
1919
allow uncrypt ota_package_file:dir r_dir_perms;
20-
allow uncrypt ota_package_file:file r_file_perms;
20+
allow uncrypt ota_package_file:file rw_file_perms;
2121

2222
# Write to /dev/socket/uncrypt
2323
unix_socket_connect(uncrypt, uncrypt, uncrypt)
@@ -40,3 +40,7 @@ allow uncrypt proc_cmdline:file r_file_perms;
4040

4141
# Read files in /sys
4242
r_dir_file(uncrypt, sysfs_dt_firmware_android)
43+
44+
# Suppress the denials coming from ReadDefaultFstab call.
45+
dontaudit uncrypt gsi_metadata_file:dir search;
46+
dontaudit uncrypt metadata_file:dir search;

public/uncrypt.te

+6-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ allow uncrypt cache_file:dir search;
1515
allow uncrypt cache_recovery_file:dir rw_dir_perms;
1616
allow uncrypt cache_recovery_file:file create_file_perms;
1717

18-
# Read OTA zip file at /data/ota_package/.
18+
# Read and write(for f2fs_pin_file) on OTA zip file at /data/ota_package/.
1919
allow uncrypt ota_package_file:dir r_dir_perms;
20-
allow uncrypt ota_package_file:file r_file_perms;
20+
allow uncrypt ota_package_file:file rw_file_perms;
2121

2222
# Write to /dev/socket/uncrypt
2323
unix_socket_connect(uncrypt, uncrypt, uncrypt)
@@ -40,3 +40,7 @@ allow uncrypt proc_cmdline:file r_file_perms;
4040

4141
# Read files in /sys
4242
r_dir_file(uncrypt, sysfs_dt_firmware_android)
43+
44+
# Suppress the denials coming from ReadDefaultFstab call.
45+
dontaudit uncrypt gsi_metadata_file:dir search;
46+
dontaudit uncrypt metadata_file:dir search;

0 commit comments

Comments
 (0)