blob: edbe22ff2e11d66fb42284a9173d0c4e2a0fb7d5 [file] [log] [blame]
Stephen Smalley2dd4e512012-01-04 12:33:27 -05001# surfaceflinger - display compositor service
2type surfaceflinger, domain;
Nick Kralevich623975f2014-01-11 01:31:03 -08003permissive_or_unconfined(surfaceflinger)
Stephen Smalley2dd4e512012-01-04 12:33:27 -05004type surfaceflinger_exec, exec_type, file_type;
5
6init_daemon_domain(surfaceflinger)
Stephen Smalley52a85232013-10-29 14:42:40 -04007typeattribute surfaceflinger mlstrustedsubject;
Stephen Smalley2dd4e512012-01-04 12:33:27 -05008
9# Talk to init over the property socket.
10unix_socket_connect(surfaceflinger, property, init)
Stephen Smalley52a85232013-10-29 14:42:40 -040011
12# Perform Binder IPC.
13binder_use(surfaceflinger)
14binder_call(surfaceflinger, system_server)
15binder_service(surfaceflinger)
Stephen Smalley52a85232013-10-29 14:42:40 -040016
Stephen Smalley3ba90122013-12-12 09:09:53 -050017# Access the GPU.
18allow surfaceflinger gpu_device:chr_file rw_file_perms;
19
Stephen Smalley52a85232013-10-29 14:42:40 -040020# Access /dev/graphics/fb0.
21allow surfaceflinger graphics_device:dir search;
22allow surfaceflinger graphics_device:chr_file rw_file_perms;
23
24# Access /dev/video1.
Nick Kralevich37339c72014-01-06 12:39:19 -080025allow surfaceflinger video_device:dir r_dir_perms;
Stephen Smalley52a85232013-10-29 14:42:40 -040026allow surfaceflinger video_device:chr_file rw_file_perms;
27
28# Create and use netlink kobject uevent sockets.
29allow surfaceflinger self:netlink_kobject_uevent_socket *;
30
31# Set properties.
32allow surfaceflinger system_prop:property_service set;
33allow surfaceflinger ctl_default_prop:property_service set;
34
35# Use open files supplied by an app.
36allow surfaceflinger appdomain:fd use;
37allow surfaceflinger platform_app_data_file:file { read write };
38allow surfaceflinger app_data_file:file { read write };
Stephen Smalleyacde43f2013-12-11 15:17:53 -050039
40# Use open file provided by bootanim.
41allow surfaceflinger bootanim:fd use;
Nick Kralevich3d770d22014-01-06 14:04:34 -080042
43# Allow a dumpstate triggered screenshot
44binder_call(surfaceflinger, dumpstate)
Stephen Smalleya5066132014-01-07 13:25:25 -050045binder_call(surfaceflinger, shell)
Nick Kralevich3d770d22014-01-06 14:04:34 -080046allow surfaceflinger shell_data_file:file write;
Nick Kraleviche45603d2014-01-08 11:19:52 -080047
48# Needed on some devices for playing DRM protected content,
49# but seems expected and appropriate for all devices.
50allow surfaceflinger tee:unix_stream_socket connectto;
51allow surfaceflinger tee_device:chr_file rw_file_perms;