Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 1 | # surfaceflinger - display compositor service |
| 2 | type surfaceflinger, domain; |
Stephen Smalley | 52a8523 | 2013-10-29 14:42:40 -0400 | [diff] [blame] | 3 | permissive surfaceflinger; |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 4 | type surfaceflinger_exec, exec_type, file_type; |
| 5 | |
| 6 | init_daemon_domain(surfaceflinger) |
Stephen Smalley | 52a8523 | 2013-10-29 14:42:40 -0400 | [diff] [blame] | 7 | typeattribute surfaceflinger mlstrustedsubject; |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 8 | |
| 9 | # Talk to init over the property socket. |
| 10 | unix_socket_connect(surfaceflinger, property, init) |
Stephen Smalley | 52a8523 | 2013-10-29 14:42:40 -0400 | [diff] [blame] | 11 | |
| 12 | # Perform Binder IPC. |
| 13 | binder_use(surfaceflinger) |
| 14 | binder_call(surfaceflinger, system_server) |
| 15 | binder_service(surfaceflinger) |
| 16 | allow surfaceflinger init:binder transfer; |
| 17 | |
Stephen Smalley | 3ba9012 | 2013-12-12 09:09:53 -0500 | [diff] [blame^] | 18 | # Access the GPU. |
| 19 | allow surfaceflinger gpu_device:chr_file rw_file_perms; |
| 20 | |
Stephen Smalley | 52a8523 | 2013-10-29 14:42:40 -0400 | [diff] [blame] | 21 | # Access /dev/graphics/fb0. |
| 22 | allow surfaceflinger graphics_device:dir search; |
| 23 | allow surfaceflinger graphics_device:chr_file rw_file_perms; |
| 24 | |
| 25 | # Access /dev/video1. |
| 26 | allow surfaceflinger video_device:chr_file rw_file_perms; |
| 27 | |
| 28 | # Create and use netlink kobject uevent sockets. |
| 29 | allow surfaceflinger self:netlink_kobject_uevent_socket *; |
| 30 | |
| 31 | # Set properties. |
| 32 | allow surfaceflinger system_prop:property_service set; |
| 33 | allow surfaceflinger ctl_default_prop:property_service set; |
| 34 | |
| 35 | # Use open files supplied by an app. |
| 36 | allow surfaceflinger appdomain:fd use; |
| 37 | allow surfaceflinger platform_app_data_file:file { read write }; |
| 38 | allow surfaceflinger app_data_file:file { read write }; |