Skip to content
Snippets Groups Projects
Commit 56240c67 authored by Alex Deymo's avatar Alex Deymo Committed by android-build-merger
Browse files

Allow postinstall_file to be an entrypoint. am: a9671c6b

am: 786926a9

* commit '786926a9':
  Allow postinstall_file to be an entrypoint.

Change-Id: I88c40cec600f7c573ca623059322e64f61b6951c
parents 1a351a47 786926a9
No related branches found
No related tags found
No related merge requests found
...@@ -201,8 +201,8 @@ neverallow { domain -init } kernel:security setsecparam; ...@@ -201,8 +201,8 @@ neverallow { domain -init } kernel:security setsecparam;
# Only init, ueventd and system_server should be able to access HW RNG # Only init, ueventd and system_server should be able to access HW RNG
neverallow { domain -init -system_server -ueventd } hw_random_device:chr_file *; neverallow { domain -init -system_server -ueventd } hw_random_device:chr_file *;
# Ensure that all entrypoint executables are in exec_type. # Ensure that all entrypoint executables are in exec_type or postinstall_file.
neverallow * { file_type -exec_type }:file entrypoint; neverallow * { file_type -exec_type -postinstall_file }:file entrypoint;
# Ensure that nothing in userspace can access /dev/mem or /dev/kmem # Ensure that nothing in userspace can access /dev/mem or /dev/kmem
neverallow { domain -kernel -ueventd -init } kmem_device:chr_file *; neverallow { domain -kernel -ueventd -init } kmem_device:chr_file *;
......
...@@ -124,7 +124,7 @@ type storage_stub_file, file_type; ...@@ -124,7 +124,7 @@ type storage_stub_file, file_type;
# /postinstall: Mount point used by update_engine to run postinstall. # /postinstall: Mount point used by update_engine to run postinstall.
type postinstall_mnt_dir, file_type; type postinstall_mnt_dir, file_type;
# Files inside the /postinstall mountpoint are all labeled as postinstall_file. # Files inside the /postinstall mountpoint are all labeled as postinstall_file.
type postinstall_file, file_type, exec_type; type postinstall_file, file_type;
# /data/misc subdirectories # /data/misc subdirectories
type adb_keys_file, file_type, data_file_type; type adb_keys_file, file_type, data_file_type;
......
...@@ -18,3 +18,7 @@ allow postinstall postinstall_file:dir r_dir_perms; ...@@ -18,3 +18,7 @@ allow postinstall postinstall_file:dir r_dir_perms;
allow postinstall shell_exec:file rx_file_perms; allow postinstall shell_exec:file rx_file_perms;
allow postinstall system_file:file rx_file_perms; allow postinstall system_file:file rx_file_perms;
allow postinstall toolbox_exec:file rx_file_perms; allow postinstall toolbox_exec:file rx_file_perms;
# No domain other than update_engine should transition to postinstall, as it is
# only meant to run during the update.
neverallow { domain -update_engine } postinstall:process { transition dyntransition };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment