blob: 2a3087b6f9f6648272c5f31a26868c68f6149bf1 [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)
Nick Kralevich629c98c2014-02-05 11:25:24 -080015binder_call(surfaceflinger, nfc)
rpcraige21871c2014-02-04 16:24:08 -050016binder_call(surfaceflinger, mediaserver)
Stephen Smalley52a85232013-10-29 14:42:40 -040017binder_service(surfaceflinger)
Stephen Smalley52a85232013-10-29 14:42:40 -040018
Stephen Smalley3ba90122013-12-12 09:09:53 -050019# Access the GPU.
20allow surfaceflinger gpu_device:chr_file rw_file_perms;
21
Stephen Smalley52a85232013-10-29 14:42:40 -040022# Access /dev/graphics/fb0.
23allow surfaceflinger graphics_device:dir search;
24allow surfaceflinger graphics_device:chr_file rw_file_perms;
25
26# Access /dev/video1.
Nick Kralevich37339c72014-01-06 12:39:19 -080027allow surfaceflinger video_device:dir r_dir_perms;
Stephen Smalley52a85232013-10-29 14:42:40 -040028allow surfaceflinger video_device:chr_file rw_file_perms;
29
30# Create and use netlink kobject uevent sockets.
31allow surfaceflinger self:netlink_kobject_uevent_socket *;
32
33# Set properties.
34allow surfaceflinger system_prop:property_service set;
35allow surfaceflinger ctl_default_prop:property_service set;
36
37# Use open files supplied by an app.
38allow surfaceflinger appdomain:fd use;
39allow surfaceflinger platform_app_data_file:file { read write };
40allow surfaceflinger app_data_file:file { read write };
Stephen Smalleyacde43f2013-12-11 15:17:53 -050041
42# Use open file provided by bootanim.
43allow surfaceflinger bootanim:fd use;
Nick Kralevich3d770d22014-01-06 14:04:34 -080044
45# Allow a dumpstate triggered screenshot
46binder_call(surfaceflinger, dumpstate)
Stephen Smalleya5066132014-01-07 13:25:25 -050047binder_call(surfaceflinger, shell)
Nick Kraleviche45603d2014-01-08 11:19:52 -080048
49# Needed on some devices for playing DRM protected content,
50# but seems expected and appropriate for all devices.
51allow surfaceflinger tee:unix_stream_socket connectto;
52allow surfaceflinger tee_device:chr_file rw_file_perms;