summaryrefslogtreecommitdiffstats
path: root/init/init.h
Commit message (Collapse)AuthorAgeFilesLines
* Implement exec.Elliott Hughes2015-02-251-25/+28
| | | | Change-Id: I20329bc9b378479d745b498d6a00eca0872cd5ab
* Build init as C++.Elliott Hughes2015-02-041-1/+2
| | | | | | This is just the minimal change to keep it building. Change-Id: I245c5b8413a1db114576c81462eb5737f5ffcef2
* init: Implement 'exec' command.San Mehat2015-02-021-0/+1
| | | | | | (cherry-pick of d05ab3952ec0e38f33a0e80ce6b9eb45b0064ba4.) Change-Id: Id6d9bb32e51a0ad090ed8240cc505dc45b57b35d
* init: Add support "&&" operator in property triggersBadhri Jagan Sridharan2015-02-021-1/+9
| | | | | | | | | | | | | | | | | | "&&" operator can now be used to test the validity of two of more properties. For example: on property:test.a=1 && property:test.b=1 setprop test.c 1 The above stub sets the test.c to 1 only when both test.a=1 and test.b=1 (cherry-pick of 162f7d797c67019a7a3f08c3b0f0ffc91d548ddc.) Change-Id: I72c19f7aa92231372a416193618ee6c7fd368141 Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
* Improve init's debug printing.Riley Andrews2014-06-261-2/+6
| | | | | | | | | | | | | + Make prints of rc commands significantly more verbose. All commands will log all arguments, file/line number of the command, return value, and parent action which triggered the command. init: command 'mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000' action=init status=0 (/init.rc:89) init: command 'setprop net.tcp.default_init_rwnd 60' action=boot status=0 (/init.rc:403) Change-Id: I5498c7258e4891706be4a12546df4231d14d86c4
* init: add 'enable <service>' to negate "service <service>... disabled"JP Abgrall2014-05-031-0/+1
| | | | | | | | | | | enable <servicename> Turns a disabled service into an enabled one as if the service did not specify disabled in the rc file. It will also start the service if needed. Bug: 14472973 Change-Id: Id0b49cc687a2bc74f6f92e066c617724cc94908d Signed-off-by: JP Abgrall <jpa@google.com>
* init: remove obsolete rle logoMarcin Chojnacki2013-10-161-4/+0
| | | | | | | | | Obsolete RLE 565 logo is used nowhere, because 565 framebuffer isn't used for years. It's not necessary to keep this thing alive anymore. Change-Id: Ie61e168790f791230530cd3eb1c68b1f7344c9a7
* Add support for socket security context specification.Stephen Smalley2013-08-231-0/+1
| | | | | | | | | | | | | | | | | | | Add an optional argument to the socket option for specifying a SELinux security context for the socket. Normally the socket security context is automatically computed from the service security context or set using the seclabel option, but this facility allows dealing with two scenarios that cannot be addressed using the existing mechanisms: 1) Use of logwrapper to wrap a service. In this case, init cannot determine the service security context as it does not directly execute it and we do not want logwrapper to run in the same domain as the service. 2) Situations where a service has multiple sockets and we want to label them distinctly. Change-Id: I7ae9088c326a2140e56a8044bfb21a91505aea11 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* Merge changes Ib54f39fd,I7e36edd8Colin Cross2013-06-241-0/+2
|\ | | | | | | | | | | * changes: init: Retain traditional restart behavior for critical and oneshot services. init: Safely restart services to avoid race conditions.
| * init: Retain traditional restart behavior for critical and oneshot services.Mike Kasick2012-03-221-0/+2
| | | | | | | | | | | | | | | | Adds an SVC_RESTART state that's used for an explicit "restart" of a running service. This retains the traditional restart behavior for critical and oneshot services (previously altered by 7e36edd8), whereby these services are "simply restarted" instead of counting as a crash (for a critical serivce) or going into the disabled state (for a oneshot service).
* | Remove HAVE_SELINUX guardsKenny Root2012-10-161-4/+0
| | | | | | | | Change-Id: I8272c573b3c5dc663203bafab68fad5e94d89364
* | Implement SELinux/MAC checks for property service.rpcraig2012-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | This is a set of changes to the init property service implementation to apply a SELinux check over who can change what properties. Also included control hooks for the 'ctl' keys. Change-Id: I5a18809bf5536f6459a36b6bf0d622b9f5061aa0 Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
* | Add support for reloading policy from /data/system.Stephen Smalley2012-08-091-0/+1
|/ | | | | | | | | | | | | To support runtime policy management, add support for reloading policy from /data/system. This can be triggered by setting the selinux.loadpolicy property to 1, whether from init.rc after mounting /data or from the system_server (e.g. upon invocation of a new device admin API for provisioning policy). ueventd and installd are restarted upon policy reloads to pick up the new policy configurations relevant to their operation. Change-Id: I97479aecef8cec23b32f60e09cc778cc5520b691 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* Extend init and ueventd for SE Android.Stephen Smalley2012-02-011-0/+8
| | | | | | | | | | | | | | | Add SE Android support for init and ueventd. init: - Load policy at boot. - Set the security context for service daemons and their sockets. - New built-in commands: setcon, setenforce, restorecon, setsebool. - New option for services: seclabel. ueventd: - Set the security context for device directories and nodes. Change-Id: I98ed752cde503c94d99dfa5b5a47e3c33db16aac
* Fix the class_reset commandKen Sumrall2011-10-261-0/+1
| | | | | | | | | | The class_reset command used to reset services that had been set to "disabled" in the init.rc file to a non-disabled state. Now, if the service was originally set to "disabled", have the reset command set it back to disabled. Otherwise, set it to the "reset" state as it currently does. Change-Id: I0c10582e46a8e443d4748d9d893ae762b19b653a
* init/cutils: move list utility code to cutils from initDima Zavin2011-09-021-1/+1
| | | | | Change-Id: I357ceee813700297d8343159f22a07659e768d41 Signed-off-by: Dima Zavin <dima@android.com>
* Changes to init to support encrypted filesystems.Ken Sumrall2010-12-181-0/+3
| | | | | | | | | These are the changes to init and init.rc necessary to support booting with and encrypted /data filesystem. A corresponding change to init.<device>.rc goes along with this change. Change-Id: I0c7e2cc39568358014a82e317735c0eae14dd683
* Revert "Add "slow_start" keyword to init"Iliyan Malchev2010-12-081-1/+0
| | | | This reverts commit 50b3afd9f39619f69dc6f4efc29be88933eb3614.
* Add "slow_start" keyword to initPaul Eastham2010-12-041-0/+1
| | | | | | | This keyword will cause init to wait a few seconds before exec'ing the target binary. Maybe only useful for hacks and debugging. Change-Id: I85caa0bcbc0be7e48bd21eb9e31e039c0740c8d5
* init: Split parser into generic parser and init parserColin Cross2010-04-211-4/+2
| | | | Change-Id: I451ebc4ff12f2ac660eb533fa10ad561fa25c9dd
* init: Move list and log handling to list.h and log.hColin Cross2010-04-211-39/+2
| | | | Change-Id: I298f575c590d0f28b7ad78747f3ebdbba56b7a27
* init: Handle commands in event queue loopColin Cross2010-04-161-0/+2
| | | | Change-Id: I679059dae43143f3c8f16b68de5694539b699e50
* init: Move prototypes for util.c into util.hColin Cross2010-04-131-10/+0
| | | | Change-Id: I46a91849ce5297eb2597dd6134412f817564ec24
* init: Move signal handling to signal_handler.cColin Cross2010-04-131-0/+2
| | | | Change-Id: I3a24afa28a1cd279c749d6f384f687b8de56067e
* init: Move gettime() to util.cColin Cross2010-04-131-0/+1
| | | | Change-Id: I1df96964763f8baedbc1cea6875d3dfc5e48c065
* init: Move parser prototypes to parser.hColin Cross2010-04-131-8/+0
| | | | Change-Id: I31db51eb8e8a33a0bd06b41206bc9f9147d16d41
* MOAR GROUPSNick Pelly2010-03-231-1/+1
| | | | | | We were hitting the old limit with mediaserver. Change-Id: Ia8217a9f2a1076fa247d7f5ed5159e3c91244d78
* init: Add support for specifying a services i/o prioritySan Mehat2010-02-261-0/+3
| | | | Signed-off-by: San Mehat <san@google.com>
* completed implementation of "trigger" for initJay Freeman (saurik)2009-08-251-0/+1
|
* init: Add the ability to start services with dynamic arguments.San Mehat2009-05-191-1/+3
| | | | | | | | | | | | | | To add arguments dynamically to a service, start the service like so: setprop ctl.start service_to_run:arg1 arg2 arg3... To start a service with *no* dynamic arguments, start the service normally: setprop ctl.start service_to_run Dynamic arguments are only supported on 'oneshot' services Signed-off-by: San Mehat <san@google.com>
* init: Fix heap corruption for services with argumentsSan Mehat2009-05-141-3/+5
| | | | | | | | | | | | The 'args' array *must* be the last entry in the structure. This fixes a longstanding issue (apparently since tc3) where a service with an argument would corrupt the heap. The more arguments, the more corruption :|. This will probably also end up making key-code bound services more reliable (ie: bugreports triggered via the keyboard) Signed-off-by: San Mehat <san@google.com>
* init: Fix segfault when log_write() was missing an arg to format.Dima Zavin2009-05-051-1/+2
| | | | | | Also, flag log_write() as a printf-like beast to gcc. Signed-off-by: Dima Zavin <dima@android.com>
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+174
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-174/+0
|
* auto import from //branches/cupcake/...@125939The Android Open Source Project2009-01-091-0/+7
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+167