blob: 1963e07542998a64405514fac3f946be250b566f [file] [log] [blame]
Stephen Smalley2dd4e512012-01-04 12:33:27 -05001#
2# Rules to allow the Android CTS to run.
3# Do not enable in production policy.
4#
5
6bool android_cts false;
7if (android_cts) {
Stephen Smalley10a2ac22013-04-04 11:57:44 -04008# For TestDeviceSetup (RootProcessScanner).
9# Reads /proc/pid/status and statm entries to check that
10# no unexpected root processes are running.
11# Also for android.security.cts.VoldExploitTest.
12# Requires ability to read /proc/pid/cmdline of vold.
Stephen Smalley2dd4e512012-01-04 12:33:27 -050013allow appdomain domain:dir r_dir_perms;
14allow appdomain domain:{ file lnk_file } r_file_perms;
15
16# Will still fail when trying to read other app /proc/pid
17# entries due to MLS constraints. Just silence the denials.
18dontaudit appdomain appdomain:dir r_dir_perms;
19dontaudit appdomain appdomain:file r_file_perms;
20
Stephen Smalley10a2ac22013-04-04 11:57:44 -040021# For android.permission.cts.FileSystemPermissionTest.
22# Walk the file tree, stat any file in order to check file permissions.
Stephen Smalley2dd4e512012-01-04 12:33:27 -050023allow appdomain fs_type:dir r_dir_perms;
24allow appdomain dev_type:dir r_dir_perms;
25allow appdomain file_type:dir_file_class_set getattr;
26allow appdomain dev_type:dir_file_class_set getattr;
27allow appdomain fs_type:dir_file_class_set getattr;
28
Stephen Smalley2dd4e512012-01-04 12:33:27 -050029# Tries to open /dev/alarm for writing but expects failure.
30dontaudit appdomain alarm_device:chr_file write;
31
Stephen Smalley10a2ac22013-04-04 11:57:44 -040032# For android.security.cts.VoldExploitTest.
Stephen Smalley2dd4e512012-01-04 12:33:27 -050033# Tries to create and use a netlink kobject uevent socket
34# to test for a vulnerable vold.
35dontaudit appdomain self:netlink_kobject_uevent_socket create;
36
37# Tries to override DAC restrictions but expects to fail.
38dontaudit shell self:capability dac_override;
39}