blob: 9c58afafc6b186c527d2d25005846d25de9a4398 [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)
Stephen Smalley52a85232013-10-29 14:42:40 -040016binder_service(surfaceflinger)
Stephen Smalley52a85232013-10-29 14:42:40 -040017
Stephen Smalley3ba90122013-12-12 09:09:53 -050018# Access the GPU.
19allow surfaceflinger gpu_device:chr_file rw_file_perms;
20
Stephen Smalley52a85232013-10-29 14:42:40 -040021# Access /dev/graphics/fb0.
22allow surfaceflinger graphics_device:dir search;
23allow surfaceflinger graphics_device:chr_file rw_file_perms;
24
25# Access /dev/video1.
Nick Kralevich37339c72014-01-06 12:39:19 -080026allow surfaceflinger video_device:dir r_dir_perms;
Stephen Smalley52a85232013-10-29 14:42:40 -040027allow surfaceflinger video_device:chr_file rw_file_perms;
28
29# Create and use netlink kobject uevent sockets.
30allow surfaceflinger self:netlink_kobject_uevent_socket *;
31
32# Set properties.
33allow surfaceflinger system_prop:property_service set;
34allow surfaceflinger ctl_default_prop:property_service set;
35
36# Use open files supplied by an app.
37allow surfaceflinger appdomain:fd use;
38allow surfaceflinger platform_app_data_file:file { read write };
39allow surfaceflinger app_data_file:file { read write };
Stephen Smalleyacde43f2013-12-11 15:17:53 -050040
41# Use open file provided by bootanim.
42allow surfaceflinger bootanim:fd use;
Nick Kralevich3d770d22014-01-06 14:04:34 -080043
44# Allow a dumpstate triggered screenshot
45binder_call(surfaceflinger, dumpstate)
Stephen Smalleya5066132014-01-07 13:25:25 -050046binder_call(surfaceflinger, shell)
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;