aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2014-10-31 12:40:12 -0700
committerIliyan Malchev <malchev@google.com>2014-10-31 20:19:26 +0000
commitd7e004ebf949ae21b299a49cff9917f6560200a3 (patch)
tree23eadd57aee5343e0f081422d88168f7bf4019d5
parentf7ccfd003c07cf14159740748ab8aedfdeebc6b8 (diff)
downloadsepolicy-d7e004ebf949ae21b299a49cff9917f6560200a3.tar.gz
allow coredump functionality
Change-Id: I7993698ac96f21db0039681275280dbd43ff61ba
-rw-r--r--domain.te4
-rw-r--r--file.te2
-rw-r--r--file_contexts3
3 files changed, 9 insertions, 0 deletions
diff --git a/domain.te b/domain.te
index 6b025e3..43e9f4a 100644
--- a/domain.te
+++ b/domain.te
@@ -59,6 +59,10 @@ userdebug_or_eng(`
# allow "gdbserver --attach" to work for su.
allow domain su:process sigchld;
+
+ # Allow writing coredumps to /cores/*
+ allow domain coredump_file:file create_file_perms;
+ allow domain coredump_file:dir ra_dir_perms;
')
###
diff --git a/file.te b/file.te
index 112406b..4edbca1 100644
--- a/file.te
+++ b/file.te
@@ -43,6 +43,8 @@ type usbfs, fs_type;
type unlabeled, file_type;
# Default type for anything under /system.
type system_file, file_type;
+# /cores for coredumps on userdebug / eng builds
+type coredump_file, file_type;
# Default type for anything under /data.
type system_data_file, file_type, data_file_type;
# /data/.layout_version or other installd-created files that
diff --git a/file_contexts b/file_contexts
index ec91425..ee5967c 100644
--- a/file_contexts
+++ b/file_contexts
@@ -218,6 +218,9 @@
/data/misc/wifi/hostapd(/.*)? u:object_r:wpa_socket:s0
/data/misc/zoneinfo(/.*)? u:object_r:zoneinfo_data_file:s0
+# coredump directory for userdebug/eng devices
+/cores(/.*)? u:object_r:coredump_file:s0
+
# Wallpaper file for other users
/data/system/users/[0-9]+/wallpaper u:object_r:wallpaper_file:s0
#############################