Skip to content

Commit

Permalink
selinux: add domain for Gallery
Browse files Browse the repository at this point in the history
Gallery needs to read vendor files on treble enabled devices.

This is based on policies written by Eino-Ville Talvala <[email protected]> for Google camera
app.

Change-Id: I0e591c9b2a54c781203d5c49e6d6d65c2f477eaf
  • Loading branch information
codeworkx committed Dec 26, 2018
1 parent 8857acd commit 75ac3aa
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
19 changes: 19 additions & 0 deletions common/private/gallery_app.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
app_domain(gallery_app)
net_domain(gallery_app)

# Access standard system services
allow gallery_app app_api_service:service_manager find;
allow gallery_app audioserver_service:service_manager find;
allow gallery_app cameraserver_service:service_manager find;
allow gallery_app drmserver_service:service_manager find;
allow gallery_app mediacodec_service:service_manager find;
allow gallery_app mediaextractor_service:service_manager find;
allow gallery_app mediaserver_service:service_manager find;
allow gallery_app mediametrics_service:service_manager find;
allow gallery_app nfc_service:service_manager find;
allow gallery_app surfaceflinger_service:service_manager find;

allow gallery_app hidl_token_hwservice:hwservice_manager find;

# Allow to read and execute camera app modules
allow gallery_app vendor_file:file { rx_file_perms };
1 change: 1 addition & 0 deletions common/private/seapp_contexts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
user=_app isPrivApp=true seinfo=platform name=com.android.gallery3d domain=gallery_app type=app_data_file levelFrom=user
user=_app isPrivApp=true seinfo=platform name=org.lineageos.snap domain=snap_app type=app_data_file levelFrom=user
1 change: 1 addition & 0 deletions common/public/gallery_app.te
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
type gallery_app, domain, coredomain;

0 comments on commit 75ac3aa

Please sign in to comment.