From fa63e50707738ea1699b8b0672dbd873a3c12220 Mon Sep 17 00:00:00 2001 From: Ricardo Cerqueira Date: Thu, 27 Nov 2014 18:17:06 +0000 Subject: [PATCH] selinux: Add a rule to label the extended keyhandler dex files These should be treated as regular dex cache files, but they're expanded outside of the normal cache dir Change-Id: Id046e1b90116b35d2e7817ed4717fcef78135f08 --- sepolicy/file_contexts | 3 +++ sepolicy/system.te | 1 + 2 files changed, 4 insertions(+) diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index dc770f26..7d7a2b47 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -19,3 +19,6 @@ # Superuser's control sockets /dev/com.android.settings.daemon(/.*)? u:object_r:superuser_device:s0 /dev/com.android.settings(/.*)? u:object_r:superuser_device:s0 + +# Expansion of these hooks is a bit unconventional +/cache/com.cyanogenmod.keyhandler.dex u:object_r:dalvikcache_data_file:s0 diff --git a/sepolicy/system.te b/sepolicy/system.te index 4c6de38f..01972d48 100644 --- a/sepolicy/system.te +++ b/sepolicy/system.te @@ -1 +1,2 @@ allow system_server wallpaper_file:file relabelto; +allow system_server dalvikcache_data_file:file write;