2012-01-04 18:33:27 +01:00
|
|
|
# surfaceflinger - display compositor service
|
|
|
|
type surfaceflinger, domain;
|
2014-01-07 17:52:15 +01:00
|
|
|
permissive surfaceflinger;
|
2012-01-04 18:33:27 +01:00
|
|
|
type surfaceflinger_exec, exec_type, file_type;
|
|
|
|
|
|
|
|
init_daemon_domain(surfaceflinger)
|
2013-10-29 19:42:40 +01:00
|
|
|
typeattribute surfaceflinger mlstrustedsubject;
|
2012-01-04 18:33:27 +01:00
|
|
|
|
|
|
|
# Talk to init over the property socket.
|
|
|
|
unix_socket_connect(surfaceflinger, property, init)
|
2013-10-29 19:42:40 +01:00
|
|
|
|
|
|
|
# Perform Binder IPC.
|
|
|
|
binder_use(surfaceflinger)
|
|
|
|
binder_call(surfaceflinger, system_server)
|
|
|
|
binder_service(surfaceflinger)
|
|
|
|
|
2013-12-12 15:09:53 +01:00
|
|
|
# Access the GPU.
|
|
|
|
allow surfaceflinger gpu_device:chr_file rw_file_perms;
|
|
|
|
|
2013-10-29 19:42:40 +01:00
|
|
|
# Access /dev/graphics/fb0.
|
|
|
|
allow surfaceflinger graphics_device:dir search;
|
|
|
|
allow surfaceflinger graphics_device:chr_file rw_file_perms;
|
|
|
|
|
|
|
|
# Access /dev/video1.
|
2014-01-06 21:39:19 +01:00
|
|
|
allow surfaceflinger video_device:dir r_dir_perms;
|
2013-10-29 19:42:40 +01:00
|
|
|
allow surfaceflinger video_device:chr_file rw_file_perms;
|
|
|
|
|
|
|
|
# Create and use netlink kobject uevent sockets.
|
|
|
|
allow surfaceflinger self:netlink_kobject_uevent_socket *;
|
|
|
|
|
|
|
|
# Set properties.
|
|
|
|
allow surfaceflinger system_prop:property_service set;
|
|
|
|
allow surfaceflinger ctl_default_prop:property_service set;
|
|
|
|
|
|
|
|
# Use open files supplied by an app.
|
|
|
|
allow surfaceflinger appdomain:fd use;
|
|
|
|
allow surfaceflinger platform_app_data_file:file { read write };
|
|
|
|
allow surfaceflinger app_data_file:file { read write };
|
2013-12-11 21:17:53 +01:00
|
|
|
|
|
|
|
# Use open file provided by bootanim.
|
|
|
|
allow surfaceflinger bootanim:fd use;
|
2014-01-06 23:04:34 +01:00
|
|
|
|
|
|
|
# Allow a dumpstate triggered screenshot
|
|
|
|
binder_call(surfaceflinger, dumpstate)
|
|
|
|
allow surfaceflinger shell_data_file:file write;
|