Skip to content
Snippets Groups Projects
Commit df125b90 authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

init: only allowed to transition to logpersist or logd

Generate a compile time error if someone unexpectedly tries to
transition into logpersist or logd domain.

Test: compile
Bug: 30566487
Change-Id: Ib55f301f104ad63de5ac513cdc9dc9937e3ba48d
parent da62cb4d
No related branches found
No related tags found
No related merge requests found
...@@ -43,3 +43,7 @@ neverallow logd system_file:dir_file_class_set write; ...@@ -43,3 +43,7 @@ neverallow logd system_file:dir_file_class_set write;
# Write to files in /data/data or system files on /data # Write to files in /data/data or system files on /data
neverallow logd { app_data_file system_data_file }:dir_file_class_set write; neverallow logd { app_data_file system_data_file }:dir_file_class_set write;
# Only init is allowed to enter the logd domain via exec()
neverallow { domain -init } logd:process transition;
neverallow * logd:process dyntransition;
...@@ -14,3 +14,7 @@ neverallow logpersist domain:process ptrace; ...@@ -14,3 +14,7 @@ neverallow logpersist domain:process ptrace;
# Write to files in /data/data or system files on /data except misc_logd_file # Write to files in /data/data or system files on /data except misc_logd_file
neverallow logpersist { app_data_file system_data_file }:dir_file_class_set write; neverallow logpersist { app_data_file system_data_file }:dir_file_class_set write;
# Only init is allowed to enter the logpersist domain via exec()
neverallow { domain -init } logpersist:process transition;
neverallow * logpersist:process dyntransition;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment