Skip to content
Snippets Groups Projects
Commit bffe163b authored by Neda Topoljanac's avatar Neda Topoljanac
Browse files

SELinux policy for new managed system update APIs

We introduced a new API to allow Device Owner to install an OTA file on disk.
This in turn requires system_server to be able to copy the OTA file to a known
OTA file location, call into update_engine to start the installation and let
update_engine to call back to the system_server to deliver any error conditions
asynchronously. This CL modifies the SELinux policy to allow these interaction.

Test: manual in TestDPC, CTS tests for negative cases: atest com.android.cts.devicepolicy.DeviceOwnerTest#testInstallUpdate
Change-Id: Id1fbea9111f753c5c80f270c269ecb9ef141cd79
Bug: 111173669
parent ac317b91
No related branches found
No related tags found
No related merge requests found
...@@ -190,6 +190,7 @@ binder_call(system_server, incidentd) ...@@ -190,6 +190,7 @@ binder_call(system_server, incidentd)
binder_call(system_server, netd) binder_call(system_server, netd)
binder_call(system_server, statsd) binder_call(system_server, statsd)
binder_call(system_server, storaged) binder_call(system_server, storaged)
binder_call(system_server, update_engine)
binder_call(system_server, vold) binder_call(system_server, vold)
binder_call(system_server, wificond) binder_call(system_server, wificond)
binder_call(system_server, wpantund) binder_call(system_server, wpantund)
...@@ -344,6 +345,10 @@ allow system_server audio_device:chr_file rw_file_perms; ...@@ -344,6 +345,10 @@ allow system_server audio_device:chr_file rw_file_perms;
allow system_server tun_device:chr_file rw_file_perms; allow system_server tun_device:chr_file rw_file_perms;
allowxperm system_server tun_device:chr_file ioctl { TUNGETIFF TUNSETIFF }; allowxperm system_server tun_device:chr_file ioctl { TUNGETIFF TUNSETIFF };
# Manage data/ota_package
allow system_server ota_package_file:dir rw_dir_perms;
allow system_server ota_package_file:file create_file_perms;
# Manage system data files. # Manage system data files.
allow system_server system_data_file:dir create_dir_perms; allow system_server system_data_file:dir create_dir_perms;
allow system_server system_data_file:notdevfile_class_set create_file_perms; allow system_server system_data_file:notdevfile_class_set create_file_perms;
...@@ -680,6 +685,7 @@ allow system_server stats_service:service_manager find; ...@@ -680,6 +685,7 @@ allow system_server stats_service:service_manager find;
allow system_server thermal_service:service_manager find; allow system_server thermal_service:service_manager find;
allow system_server storaged_service:service_manager find; allow system_server storaged_service:service_manager find;
allow system_server surfaceflinger_service:service_manager find; allow system_server surfaceflinger_service:service_manager find;
allow system_server update_engine_service:service_manager find;
allow system_server vold_service:service_manager find; allow system_server vold_service:service_manager find;
allow system_server wificond_service:service_manager find; allow system_server wificond_service:service_manager find;
userdebug_or_eng(` userdebug_or_eng(`
......
...@@ -39,6 +39,9 @@ add_service(update_engine, update_engine_service) ...@@ -39,6 +39,9 @@ add_service(update_engine, update_engine_service)
# Allow update_engine to call the callback function provided by priv_app. # Allow update_engine to call the callback function provided by priv_app.
binder_call(update_engine, priv_app) binder_call(update_engine, priv_app)
# Allow update_engine to call the callback function provided by system_server.
binder_call(update_engine, system_server)
# Read OTA zip file at /data/ota_package/. # Read OTA zip file at /data/ota_package/.
allow update_engine ota_package_file:file r_file_perms; allow update_engine ota_package_file:file r_file_perms;
allow update_engine ota_package_file:dir r_dir_perms; allow update_engine ota_package_file:dir r_dir_perms;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment