No description
Find a file
Nick Kralevich 4800dbf1da init: refuse to start process if domain transition not defined
When SELinux is in enforcing mode, any process executed by
init must have a domain transition defined. See
https://android-review.googlesource.com/108640 for details. This
prevents an executable spawned by init from remaining in init's
(very powerful) SELinux domain.

However, this is only enforced when SELinux is in enforcing mode.
During new device bringup, it's common to run an Android device
in globally permissive mode. In globally permissive mode, SELinux
denials are logged only, but otherwise ignored. If appropriate
SELinux domain transitions are not defined from init to init spawned
processes, this could cause misleading SELinux denials attributed
to init instead of the child process.

To help address these misleading denials, modify init to not spawn
processes unless a domain transition is defined. This essentially
enforces the rules in https://android-review.googlesource.com/108640
on both permissive and enforcing kernels.

While I'm here, change some "freecon()" calls to "free()", with the
long term goal of deleting freecon() entirely.

Change-Id: I3ef3a372bb85df61a3f6234cb1113cc25fc6506a
2015-07-16 11:32:19 -07:00
adb Revert "Turn on -Wformat-nonliteral." 2015-07-09 20:35:09 +00:00
adf libadf: enable -Werror 2015-03-10 15:14:38 -07:00
base Revert "Turn on -Wformat-nonliteral." 2015-07-09 20:35:09 +00:00
cpio makebootfs: use libcutils shared libraries 2015-04-15 10:32:19 -07:00
debuggerd Merge "Dump memory going from unreadable to readable." 2015-07-09 23:38:26 +00:00
fastboot Rename ZipEntryName to ZipString 2015-06-26 10:34:01 -07:00
fs_mgr Update partition.*.verified even with ro.boot.veritymode set 2015-07-15 09:11:13 +00:00
gpttool gpttool: turn on -Werror 2014-05-05 10:30:04 -07:00
healthd Move away from gr_surface. 2015-04-15 10:25:55 -07:00
include Rename ZipEntryName to ZipString 2015-06-26 10:34:01 -07:00
init init: refuse to start process if domain transition not defined 2015-07-16 11:32:19 -07:00
libbacktrace Use delete[] to de-allocate pointers from new[] 2015-07-09 10:50:04 -07:00
libcutils libcutils: fs_config: Add folders normally created in init.rc 2015-07-08 16:37:13 -07:00
libdiskconfig am eb075e28: am c8179498: am 2f62edf7: Merge "libdiskconfig: Turn on -Werror" 2014-05-21 21:19:27 +00:00
libion Remove LOCAL_ADDITIONAL_DEPENDENCIES in cases where it's not needed. 2015-04-02 14:31:07 -07:00
liblog Merge "liblog: __android_log_is_loggable support global properties" 2015-06-15 14:32:20 +00:00
libmemtrack Add missing <malloc.h> and <string.h> includes. 2015-01-28 11:37:57 -08:00
libmincrypt Enable clang compilation. 2015-05-14 10:53:48 -07:00
libnativebridge Allow native bridge to work without a code cache 2015-07-10 11:22:09 +08:00
libnetutils Add a command to call libnetutils' do_dhcp. 2015-04-21 19:31:43 -07:00
libpixelflinger pixelflinger: make self-contained 2015-03-19 12:34:35 -07:00
libprocessgroup Remove uses of libcxx.mk. 2015-03-27 11:24:04 -07:00
libsparse libsparse: Wrap sparse_crc32.h to be C++ compatible. 2015-07-11 12:48:42 -07:00
libsuspend Libsuspend: Remove unused variable 2014-11-24 18:53:44 -08:00
libsync Remove LOCAL_ADDITIONAL_DEPENDENCIES in cases where it's not needed. 2015-04-02 14:31:07 -07:00
libsysutils Add missing <malloc.h> and <string.h> includes. 2015-01-28 11:37:57 -08:00
libusbhost am 0d8943c2: am e4c5b614: Merge "libusbhost: Fix IOCTL call during usb_request_cancel" 2014-08-12 21:05:43 +00:00
libutils Consistently use strerror in libutils. 2015-06-30 10:41:15 -07:00
libziparchive Fix ODR issues in ART. 2015-06-29 16:27:44 -07:00
lmkd Lmkd: Fix unused variables 2014-11-24 20:32:42 -08:00
logcat Lower the priority of the threads in logd/logcat. 2015-06-09 12:40:20 -07:00
logd logd: serialize accesses to stats helpers 2015-06-25 07:39:24 -07:00
logwrapper Fix "ptsname is not thread-safe; use ptsname_r instead" build break. 2014-07-29 11:06:53 -07:00
mkbootimg mkbootimg: misc typo fixes 2015-06-04 09:59:01 -07:00
reboot reboot: Turn on -Werror 2014-05-21 12:58:38 -07:00
rootdir Remove creation of root directory folders 2015-07-08 16:37:13 -07:00
run-as package missing include for string.h 2015-04-01 11:15:37 -07:00
sdcard Correct magic number on umount2 2015-04-24 01:13:35 +00:00
toolbox Switch to toybox mount(1). 2015-06-08 14:52:25 -07:00
tzdatacheck Executable to run on boot that removes old tzdata if needed 2015-04-13 11:38:32 +01:00
.gitignore Don't compile abort_socket.c for host targets. It is only intended to run on Linux targets. 2009-05-26 13:23:23 -07:00
Android.mk Remove the simulator target from all makefiles. 2011-07-11 22:12:32 -07:00
CleanSpec.mk Add a CleanSpec for grep/toolbox. 2015-03-22 18:04:54 -07:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2013-07-30 13:56:49 -07:00
NOTICE Fix omission in NOTICE file. 2013-07-30 13:56:55 -07:00