diff options
author | Stephen Smalley <sds@tycho.nsa.gov> | 2013-10-01 09:21:47 -0400 |
---|---|---|
committer | Stephen Smalley <sds@tycho.nsa.gov> | 2013-10-01 09:21:47 -0400 |
commit | deb41e512760f9d18cb718b007ced367018b3667 (patch) | |
tree | 8c2089884cbf925d3e1546766c970ff070f123cd /rootdir | |
parent | 61afb07b9b14233f76a969840f74ce1ced22bf58 (diff) | |
download | system_core-deb41e512760f9d18cb718b007ced367018b3667.zip system_core-deb41e512760f9d18cb718b007ced367018b3667.tar.gz system_core-deb41e512760f9d18cb718b007ced367018b3667.tar.bz2 |
Set security context of /adb_keys and /data/misc/adb/adb_keys.
I97b3d86a69681330bba549491a2fb39df6cf20ef introduced a separate type
for the adb_keys file. Set the security context of the adb_keys file
accordingly by adding restorecon commands to init.rc.
Change-Id: I30e4d2a1ae223a03eadee58a883c79932fff59fe
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Diffstat (limited to 'rootdir')
-rw-r--r-- | rootdir/init.rc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/rootdir/init.rc b/rootdir/init.rc index 88dee10..0d53ae1 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -16,6 +16,9 @@ on early-init # This should occur before anything else (e.g. ueventd) is started. setcon u:r:init:s0 + # Set the security context of /adb_keys if present. + restorecon /adb_keys + start ueventd # create mountpoints @@ -208,6 +211,10 @@ on post-fs-data mkdir /data/local 0751 root root mkdir /data/misc/media 0700 media media + # Set security context of any pre-existing /data/misc/adb/adb_keys file. + restorecon /data/misc/adb + restorecon /data/misc/adb/adb_keys + # For security reasons, /data/local/tmp should always be empty. # Do not place files or directories in /data/local/tmp mkdir /data/local/tmp 0771 shell shell |