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) |
Stephen Smalley | 52a8523 | 2013-10-29 14:42:40 -0400 | [diff] [blame] | 16 | |
Stephen Smalley | 3ba9012 | 2013-12-12 09:09:53 -0500 | [diff] [blame] | 17 | # Access the GPU. |
| 18 | allow surfaceflinger gpu_device:chr_file rw_file_perms; |
| 19 | |
Stephen Smalley | 52a8523 | 2013-10-29 14:42:40 -0400 | [diff] [blame] | 20 | # Access /dev/graphics/fb0. |
| 21 | allow surfaceflinger graphics_device:dir search; |
| 22 | allow surfaceflinger graphics_device:chr_file rw_file_perms; |
| 23 | |
| 24 | # Access /dev/video1. |
| 25 | allow surfaceflinger video_device:chr_file rw_file_perms; |
| 26 | |
| 27 | # Create and use netlink kobject uevent sockets. |
| 28 | allow surfaceflinger self:netlink_kobject_uevent_socket *; |
| 29 | |
| 30 | # Set properties. |
| 31 | allow surfaceflinger system_prop:property_service set; |
| 32 | allow surfaceflinger ctl_default_prop:property_service set; |
| 33 | |
| 34 | # Use open files supplied by an app. |
| 35 | allow surfaceflinger appdomain:fd use; |
| 36 | allow surfaceflinger platform_app_data_file:file { read write }; |
| 37 | allow surfaceflinger app_data_file:file { read write }; |
Stephen Smalley | acde43f | 2013-12-11 15:17:53 -0500 | [diff] [blame^] | 38 | |
| 39 | # Use open file provided by bootanim. |
| 40 | allow surfaceflinger bootanim:fd use; |