summaryrefslogtreecommitdiffstats
path: root/init/sigchld_handler.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Re-land "If enablefilecrypto or init_user0 fails, reboot into recovery."Paul Crowley2018-04-171-6/+5
| | | | | | | | | An earlier such change was reverted in commit e242a97db547dc73efea1b5287536be66637dc33. Bug: 70487538 Test: ensure that angler can boot Merged-In: Id5f57fce1c9b817a2650e0c848143d8a0d286bf0 Change-Id: Id5f57fce1c9b817a2650e0c848143d8a0d286bf0
* Revert "If enablefilecrypto or init_user0 fails, reboot into recovery."Paul Crowley2018-03-011-5/+6
| | | | | | | | | | This reverts commit 959b05553576ffc15da4334a5917ce763611ab82. Reason for revert: b/73968735 Bug: 73968735 Test: b/73968735#comment5 Change-Id: Ifce4c029bab7380c60e20cc2b2885beb4a097456
* If enablefilecrypto or init_user0 fails, reboot into recovery.Paul Crowley2018-02-151-6/+5
| | | | | | Test: Roll back PLATFORM_SECURITY_PATCH, ensure recovery dialog is seen Bug: 70487538 Change-Id: Iceb6af3f9d6aea6bc646dbb4b5d29dffcb284736
* init: run vendor commands in a separate SELinux contextTom Cherry2017-09-291-13/+19
| | | | | | | | | | | | | | | | | | | | | | One of the major aspects of treble is the compartmentalization of system and vendor components, however init leaves a huge gap here, as vendor init scripts run in the same context as system init scripts and thus can access and modify the same properties, files, etc as the system can. This change is meant to close that gap. It forks a separate 'subcontext' init that runs in a different SELinux context with permissions that match what vendors should have access to. Commands get sent over a socket to this 'subcontext' init that then runs them in this SELinux context and returns the result. Note that not all commands run in the subcontext; some commands such as those dealing with services only make sense in the context of the main init process. Bug: 62875318 Test: init unit tests, boot bullhead, boot sailfish Change-Id: Idf4a4ebf98842d27b8627f901f961ab9eb412aee
* init: cleanup exit() usesTom Cherry2017-09-261-2/+1
| | | | | | | | | | | | | Primarily, this fixes a bug where a forked child of property service uses exit() instead of _exit, which has the unintended consequences of running the global destructors of init proper, which leads to unintended cleanup. Secondly, this replaces the remaining calls of exit() that really should be LOG(FATAL). Test: boot sailfish Change-Id: I779228e7d44a73186bc7685bb723c4b9278a0a2d
* init: Allow clean system shutdown upon SIGTERMLuis Hector Chavez2017-09-071-0/+142
This allows Android to cleanly shutdown when running in a PID namespace in a way that does not rely on adbd running. This is useful to allow Android to be running in a container and its lifetime managed by an OCI-compliant tool. Bug: 65415372 Test: `kill -TERM 1` as root is correctly dropped. Test: `kill -TERM 1` from the init PID namespace causes init to cleanly shutdown. Change-Id: Ia66ebdb436221919081bc4723337c0c7f1e53b09