History log of /system/core/init/init.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
80c7a5e8a861de42ddade15704f1785953cee345 12-Jul-2014 Riley Andrews <riandrews@google.com> Move unlink("/dev/.booting") until after filesystems are mounted.

Move the unlink out of init.c and into init.rc, so that the file
will be removed after all the filesystems with firmware are up.

Change-Id: Ifdd5dd1e95d7e064dde5c80b70198882d949a710
/system/core/init/init.c
381341f5f72a46b34126e5c8e6f62f04b702ba47 16-May-2014 James Morrissey <james.morrissey@arm.com> Fix environment variable assignment in init

The init process allows environment variables to be specified in
the rc script globally, via 'export', and for a specific process,
via the 'setenv' option.

However, the mechanism for assembling the environment simply
appended the new variable without checking whether it was already
defined, so it was not possible to overwrite an existing entry.
This patch fixes that behaviour.

Limitations and concerns:

The limit of a maximum number of 31 variables is unchanged.

Currently, most callers of "add_environment" do not check the return
value, but the function now logs the failure rather than failing
silently.

Change-Id: Ie9a68c37a0f55c5b40e904e695cd35514f67f480
/system/core/init/init.c
24a3b783d5fcf55fdc9034ef395a5fbc77290c75 26-Jun-2014 Riley Andrews <riandrews@google.com> Improve init's debug printing.

+ 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
/system/core/init/init.c
439224e27530353351c7df504fb29fad9ac776a0 24-Jun-2014 Stephen Smalley <sds@tycho.nsa.gov> Redirect libselinux logging to dmesg for ueventd.

We already do this for init, but had failed to do it for ueventd
and could not capture any logging from libselinux calls made by
ueventd.

Truly enabling non-error logging also requires uncommenting a line
in Android.mk:
LOCAL_CFLAGS += -DLOG_UEVENTS=1
which enables other logging and sets the default log level to INFO,
or otherwise changing the klog level in the ueventd code (is not
settable by init.rc loglevel).

Change-Id: I00e6f9d6271f2a21d9078c96368816d74d6d2850
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
/system/core/init/init.c
e4b7b294f37d9b64d6b7c1931e2c9bfb1a500d68 17-Jun-2014 Riley Andrews <riandrews@google.com> Add ability to boot from charger mode.

Add the ability to boot up directly from charger mode, instead of forcing
charger mode to initiate a full restart to launch 'full' android. This
should shave a few seconds off of boot time on supported devices (just
manta for now).

Change-Id: Ieec4494d929e92806e039f834d78b9002afd15c4
/system/core/init/init.c
f3c85b2488529404a170a28f9bc72538b1ace97d 03-Jun-2014 Nick Kralevich <nnk@google.com> Only allow disabling SELinux on userdebug / eng builds

Only parse and honor the kernel command line on userdebug
or eng builds. On user builds, assume that selinux is always enabled
and enforcing.

Change-Id: I71c66e4365bdf2f226800634126a38b716d96599
/system/core/init/init.c
252b0e2b46e3d5e71a8b5c55928dc9ca62811f0a 31-May-2014 Nick Kralevich <nnk@google.com> Merge "SELinux changes to check policy versions during a reload."
f94853f294059efc49ee5a057833cf8bc2b6c5df 15-May-2014 Elliott Hughes <enh@google.com> Clean up some unnecessary system_properties cruft.

Bug: 14970171
Change-Id: I6f54c35e265b849be914120f795c9f8e0cec34bb
/system/core/init/init.c
3beec7e55f1b5a840fc8fe0868b84d2238779af6 03-May-2014 JP Abgrall <jpa@google.com> init: add 'enable <service>' to negate "service <service>... disabled"

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>
/system/core/init/init.c
03daf05dcfbdbf4ed6175afb2f4676e59dd74aa3 18-Mar-2014 Robert Craig <rpcraig@tycho.ncsc.mil> SELinux changes to check policy versions during a reload.

When deciding on which property_contexts policy to load
during a reload, an initial call is made to libselinux to
grab the correct policy index. This policy index represents
whether the /data/security or the rootfs version will
be used.

Change-Id: I4716039bb0f5ba1e961977a18350347a67969dca
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
/system/core/init/init.c
de151571a4512491bc11f94e60c60c8fa84893f3 19-Jan-2014 Nick Kralevich <nnk@google.com> don't load property_contexts from /data

Bug: 12613118
Change-Id: I5a84b13d2151075d5136e3682431fbcc9307df13
(cherry picked from commit dc3a42bb11dc2aefee37f799b5a1cce87cf35aaf)
/system/core/init/init.c
eb3f421e028608e37e4eb814351f03b99ae55900 12-Feb-2014 Stephen Smalley <sds@tycho.nsa.gov> Enable building init with -Wall -Werror.

Eliminates various warnings from SELinux-related code.

Bug: 12587913
Change-Id: I28921f0ebd934324436609540d95ccef58552b64
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
/system/core/init/init.c
dbd37f2e1da5b27ef1ad6d0cc9580e6893560f5f 28-Jan-2014 Stephen Smalley <sds@tycho.nsa.gov> Move restorecon and restorecon_recursive code to libselinux.

This requires telling libselinux to use the sehandle already
obtained by init rather than re-acquiring it internally. init
retains ownership of the sehandle because it performs the
initial load, uses the sehandle for other purposes (e.g. labeling
of directories created via mkdir and labeling of socket files),
and handles the policy reload property trigger.

Change-Id: I4a380caab7f8481c33eb64fcdb16b6cabe918ebd
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
/system/core/init/init.c
ccecf1425412beb2bc3bb38d470293fdc244d6f1 16-Jan-2014 Elliott Hughes <enh@google.com> system/core 64-bit cleanup.

This cleans up most of the size-related problems in system/core.
There are still a few changes needed for a clean 64-bit build,
but they look like they might require changes to things like the
fastboot protocol.

Change-Id: I1560425a289fa158e13e2e3173cc3e71976f92c0
/system/core/init/init.c
268cc54089cbdeb0c2ea955448bb16a0858c4538 28-Dec-2013 Colin Cross <ccross@android.com> Merge "ueventd: fix a busy loop while reading uevents"
af06c6745bdf391c57ef29de4e6133f05c3b6187 09-Dec-2013 Stephen Smalley <sds@tycho.nsa.gov> Log a warning on services that lack SELinux domains.

Sample output on flo:
<3>[ 7.270568] init: Warning! Service irsc_util needs a SELinux domain defined; please fix!
<3>[ 8.290832] init: Warning! Service bootanim needs a SELinux domain defined; please fix!

Change-Id: If5514b188517917d58ee81c446af563b0443be45
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
/system/core/init/init.c
66ed50af6870210ce013a5588a688434a5d48ee9 22-Nov-2013 The Android Open Source Project <initial-contribution@android.com> Merge commit '536dea9d61a032e64bbe584a97463c6638ead009' into HEAD

Change-Id: I5c469a4b738629d99d721cad7ded02d6c35f56d5
1d4e86c44589b3a97ca0113493c2e569c3aabcc6 10-Nov-2013 Amir Goldstein <amir@cellrox.com> ueventd: fix a busy loop while reading uevents

Under certain conditions, poll() may raise the POLLERR
flag along with POLLIN, in which case the check for
(ufd.revents == POLLIN) results in an endless busy loop.

The following fix was applied to
hardware/libhardware_legacy/uevent/uevent.c
to fix a similar bug:

commit 3aabb260ceef10377c31c9e45fb239247f5cfeba
Author: Mathias Agopian <mathias@google.com>
Date: Mon Oct 1 14:53:18 2012 -0700

fix a typo in uevent_next_eventi

Bug: 7114973
Change-Id: I15a4c714b59aeb1d02db00517d70b5f0e5ab22c2

Applying the same fix for two more poll loops in init
and ueventd.

Change-Id: I50693f6d3c904992ac4b8a9a14a83c7106e6b9e0
/system/core/init/init.c
50dc936964e057ad779ce271c6d1c12e4d81f0aa 16-Oct-2013 Marcin Chojnacki <marcinch7@gmail.com> init: remove obsolete rle logo

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
/system/core/init/init.c
ae76f6dbcf3dfd6eda223911f91f4a1316433771 12-Jul-2013 Nick Kralevich <nnk@google.com> init: call restorecon on /sys

Not all files on /sys are not getting labeled properly. Fix them.

Change-Id: I9dcff76354e7f50d41f1b6e702836cfbbc149278
/system/core/init/init.c
935bd3e31574ea83db84797b0dee2a6581a19cdf 27-Jun-2013 Nick Kralevich <nnk@google.com> init: allow disabling selinux via a kernel command line

Create a new "androidboot.selinux" option, to control how userspace
handles SELinux. This kernel command line can have three options:

* disabled
* permissive
* enforcing

"disabled" completely disables userspace support for SELinux. No
policy is ever loaded, nor is the SELinux filesystem /sys/fs/selinux
ever mounted.

"permissive" loads the SELinux policy, but puts SELinux into
permissive mode. SELinux policy violations are logged, but not rejected.

"enforcing", the default, loads the SELinux policy, and places
SELinux into enforcing mode. Policy violations are rejected.

This change addresses post review comments for change
b710ed21dec88c0dde8209264df054c842561589 .

Change-Id: I912583db8e6a0e9c63380de32ad8ffc47a8a440f
/system/core/init/init.c
56fa0ac6b6e4ca790c0169c21a3106e09cab672c 25-Jun-2013 Nick Kralevich <nnk@google.com> init: move SELinux into enforcing mode.

When init starts up, immediately put SELinux into enforcing mode.

This is currently a no-op. We currently have everything in the
unconfined domain, so this should not break anything.
(if it does, I'll roll it back immediately)

If the kernel doesn't have SELinux support compiled in, then
don't try loading a policy and continue without SELinux protections.

Change-Id: Id0279cf82c545ea0f7090137b7566a5bc3ddd641
/system/core/init/init.c
b69f863455261a656da02343e8b9d55110ecd45f 24-Aug-2013 Colin Cross <ccross@android.com> am 0cbaed42: am a8ba1f2f: Merge "Add support for socket security context specification."

* commit '0cbaed4211b514dd2aaa4d28f8936ba58e83c6a5':
Add support for socket security context specification.
8348d279c7ce1a2453965ba7f05a7b818d58886c 13-May-2013 Stephen Smalley <sds@tycho.nsa.gov> Add support for socket security context specification.

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>
/system/core/init/init.c
0d872d8bb4f5371200601b7615ea48993383befb 16-Aug-2013 Alex Klyubin <klyubin@google.com> Seed Linux RNG from Hardware RNG at boot during init.

The Linux RNG may have little entropy during boot. As more and more
devices have a Hardware RNG, we mix in 512 bytes from Hardware RNG
(if present) into Linux RNG early during boot (after
wait_for_coldboot_done and before property_service_init actions in
init).

To avoid having to trust the output of Hardware RNG, we do not mix it
into the Linux RNG's primary pool or increase the Linux RNG's entropy
estimates.

Bug: 10362513
Change-Id: I80617f21710400747f5e7533e518d90ea74e2f11
/system/core/init/init.c
f29c533c49ab1c90eae612b1c454f2c6879a6658 12-Jul-2013 Nick Kralevich <nnk@google.com> init: call restorecon on /sys

Not all files on /sys are not getting labeled properly. Fix them.

Change-Id: I9dcff76354e7f50d41f1b6e702836cfbbc149278
/system/core/init/init.c
4838aa1b7b0f279ae6194ab1606922e2d1540f90 27-Jun-2013 Nick Kralevich <nnk@google.com> init: allow disabling selinux via a kernel command line

Create a new "androidboot.selinux" option, to control how userspace
handles SELinux. This kernel command line can have three options:

* disabled
* permissive
* enforcing

"disabled" completely disables userspace support for SELinux. No
policy is ever loaded, nor is the SELinux filesystem /sys/fs/selinux
ever mounted.

"permissive" loads the SELinux policy, but puts SELinux into
permissive mode. SELinux policy violations are logged, but not rejected.

"enforcing", the default, loads the SELinux policy, and places
SELinux into enforcing mode. Policy violations are rejected.

This change addresses post review comments for change
b710ed21dec88c0dde8209264df054c842561589 .

Change-Id: I912583db8e6a0e9c63380de32ad8ffc47a8a440f
/system/core/init/init.c
cbc76fcadb9b04007cc693aab39e86b33cb394aa 25-Jun-2013 Nick Kralevich <nnk@google.com> Merge "init: move SELinux into enforcing mode."
b710ed21dec88c0dde8209264df054c842561589 25-Jun-2013 Nick Kralevich <nnk@google.com> init: move SELinux into enforcing mode.

When init starts up, immediately put SELinux into enforcing mode.

This is currently a no-op. We currently have everything in the
unconfined domain, so this should not break anything.
(if it does, I'll roll it back immediately)

If the kernel doesn't have SELinux support compiled in, then
don't try loading a policy and continue without SELinux protections.

Change-Id: Id0279cf82c545ea0f7090137b7566a5bc3ddd641
/system/core/init/init.c
39021a48a0e0687c654423acd5a4c99a1d79440d 25-Jun-2013 Colin Cross <ccross@android.com> am 83ada447: Merge changes Ib54f39fd,I7e36edd8

* commit '83ada447aed69dfcd0a88e952eced8db1e4d6584':
init: Retain traditional restart behavior for critical and oneshot services.
init: Safely restart services to avoid race conditions.
83ada447aed69dfcd0a88e952eced8db1e4d6584 25-Jun-2013 Colin Cross <ccross@android.com> Merge changes Ib54f39fd,I7e36edd8

* changes:
init: Retain traditional restart behavior for critical and oneshot services.
init: Safely restart services to avoid race conditions.
99c1a4168ba792437f298d31cd4631ff01661476 18-Jun-2013 Colin Cross <ccross@android.com> resolved conflicts for merge of 95a41f6b to stage-aosp-master

Change-Id: Icfae29edf989fb43a7f0b8bda188a9807f76a3b9
5e484e9c439f8c065270209f32bdbfb731729250 18-Jun-2013 Colin Cross <ccross@android.com> init: fix copying boot properties

The previous patch "init: verify size of property buffers passed
to property_get" incorrectly modified one of the callers,
resulting in ro.serialno, ro.bootmode, ro.baseband, and
ro.bootloader always being set to their default values.

Bug: 9469860

(cherry picked from commit 67e3663fc93c65b69b5d121db05b0833b98d97f1)

Change-Id: Ia7b337e1fab6e334729f47ee1269e6c736615177
/system/core/init/init.c
1a6f4c3bf29a4d474c4582e70fb279d0d28fb7f1 29-Jan-2013 Colin Cross <ccross@android.com> init: switch property_get to use __system_property_get

(cherry picked from commit 2deedfe0b1ac86ebd62d19cf7da9e7dcb508ab09)

Change-Id: If3fba2cc1dd5c167b0924ddfe42dbe2e6387208a
/system/core/init/init.c
67e3663fc93c65b69b5d121db05b0833b98d97f1 18-Jun-2013 Colin Cross <ccross@android.com> init: fix copying boot properties

The previous patch "init: verify size of property buffers passed
to property_get" incorrectly modified one of the callers,
resulting in ro.serialno, ro.bootmode, ro.baseband, and
ro.bootloader always being set to their default values.

Bug: 9469860
Change-Id: Id45bd8dd657e8d61f4cfaf7e6b2559d2bfd05181
/system/core/init/init.c
2deedfe0b1ac86ebd62d19cf7da9e7dcb508ab09 29-Jan-2013 Colin Cross <ccross@android.com> init: switch property_get to use __system_property_get

Change-Id: I4fc0502a1a5b331087618a4d2e3d90948743d7bd
/system/core/init/init.c
8f6adcfcc55414cc07c18fe47d7c4314da148544 21-May-2013 gcondra@google.com <gcondra@google.com> am 49be2407: Revert "Add logic to fixup file contexts after a policy update."

* commit '49be240735a06f44e1d91aa51dd299779ad36d96':
Revert "Add logic to fixup file contexts after a policy update."
f5410f2bde6fd5295cad36e3ba3efba0beb92780 21-May-2013 gcondra@google.com <gcondra@google.com> am 3d32cd93: Revert "Remove /system from the dirs to relabel."

* commit '3d32cd938746215e5fa9b1a3c3b78903e043ae73':
Revert "Remove /system from the dirs to relabel."
b9866649e24d7b6eedcaf2e03ffc605a3417537d 21-May-2013 gcondra@google.com <gcondra@google.com> am 52351300: Revert "Add a version check for SELinux policy on device."

* commit '52351300d156826bf22c493828571f45a1cea16a':
Revert "Add a version check for SELinux policy on device."
49be240735a06f44e1d91aa51dd299779ad36d96 17-May-2013 repo sync <gcondra@google.com> Revert "Add logic to fixup file contexts after a policy update."

This reverts commit ebcf93e3bf92bf46c54c8e0f2ec8936bb2db6aea.
/system/core/init/init.c
3d32cd938746215e5fa9b1a3c3b78903e043ae73 17-May-2013 repo sync <gcondra@google.com> Revert "Remove /system from the dirs to relabel."

This reverts commit 3d4d07b2fa3b2447646d3c87a0b401e993ad8363.
/system/core/init/init.c
52351300d156826bf22c493828571f45a1cea16a 17-May-2013 repo sync <gcondra@google.com> Revert "Add a version check for SELinux policy on device."

This reverts commit 921be8b6568df0057c4eacbac2e1022b71e09620.
/system/core/init/init.c
5a98566d589408c78e35f4476f478a2fa1c13e78 15-May-2013 gcondra@google.com <gcondra@google.com> am 921be8b6: Add a version check for SELinux policy on device.

* commit '921be8b6568df0057c4eacbac2e1022b71e09620':
Add a version check for SELinux policy on device.
921be8b6568df0057c4eacbac2e1022b71e09620 10-May-2013 repo sync <gcondra@google.com> Add a version check for SELinux policy on device.

This helps to ensure that when a new system image is installed,
old userdata policy isn't applied over the top of it.

Bug: 8841348
Change-Id: I135af32250aa62979763e775842ce0af3c8b6f9f
/system/core/init/init.c
ac5cf925f86706d2bf89948e7cd3379376185d3b 08-May-2013 gcondra@google.com <gcondra@google.com> am 683aa89b: Merge "Remove /system from the dirs to relabel." into jb-mr2-dev

* commit '683aa89bfdf2439d1c5d9a4dc240d6a673678a98':
Remove /system from the dirs to relabel.
3d4d07b2fa3b2447646d3c87a0b401e993ad8363 08-May-2013 repo sync <gcondra@google.com> Remove /system from the dirs to relabel.

Bug: 8841348
Change-Id: Ia1545288e8a8184feffaaa6158faad62f95cbcce
/system/core/init/init.c
7e25fa1859c5bccdc6599fbbd4f6344bc5bf7998 16-Apr-2013 Geremy Condra <gcondra@google.com> am ebcf93e3: Add logic to fixup file contexts after a policy update.

* commit 'ebcf93e3bf92bf46c54c8e0f2ec8936bb2db6aea':
Add logic to fixup file contexts after a policy update.
ebcf93e3bf92bf46c54c8e0f2ec8936bb2db6aea 11-Apr-2013 Geremy Condra <gcondra@google.com> Add logic to fixup file contexts after a policy update.

Bug: 8116902

(cherry picked from commit 47677a506febfe386d186f8f854d967f165a342f)

Change-Id: I2a50f68a53aee2c94d03d3e5ced1ea36337fde33
/system/core/init/init.c
a5ca229a4571f6df42c96e760257b7ca95c7fdeb 06-Apr-2013 Colin Cross <ccross@android.com> am 1615c09a: Merge "init: Fix potential null pointer issue"

* commit '1615c09ac1065104f56ddc444f5467aff76c0daa':
init: Fix potential null pointer issue
8e15eabdc0b40e68426eaf3179dc076d20df75b6 01-Mar-2013 Geremy Condra <gcondra@google.com> Apply the correct SELinux label for the properties workspace.

Change-Id: Ibb9c8044caa9d39ee6ec9fe06d54bb9dc4b56ff3
/system/core/init/init.c
11467189bc856c087de1fcc4b7abaf97220e3ada 01-Apr-2013 Hong-Mei Li <a21834@motorola.com> init: Fix potential null pointer issue

With the old strdup() mechanism, it may return NULL if insufficient memory was
available. So we check the return value or do not use strdup to avoid null
pointer issue.

Change-Id: Id684948d6cb6c2f06327f29a2ba692f9542fce80
Signed-off-by: Hong-Mei Li <a21834@motorola.com>
/system/core/init/init.c
04561b63474e25bf6a61fbf4179717bbdd5f32a2 21-Mar-2013 William Roberts <w.roberts@sta.samsung.com> Drop /data/system as a policy file location

/data/system is no longer used as a policy
file location. Use /data/security instead.

Change-Id: Ie77be9e25c67c8a2157c7b6c468f3215a49ead52
/system/core/init/init.c
46e1bd89b457713bf91d2dc751795822cc202658 23-Jan-2013 William Roberts <w.roberts@sta.samsung.com> Create a new location for /data policy files

Adding a new location for policy files under
/data, the new location is /data/security. The
new location is used before attempting to use
any other location.
This requires a new directory to be created by
the init script and an update to the location of
the property_contexts file for property service.

Change-Id: I955a722ac3e51fa6c1b97201b8bdef3f601cf09d
/system/core/init/init.c
76ba83cce2c375c9e3edaaad52fdcb916ebdd3c1 14-Mar-2013 Nick Kralevich <nnk@google.com> Revert "init: Set ADDR_COMPAT_LAYOUT before spawning processes."

This logic has been moved to platform/frameworks/base commit
8a0a929422682ba3eb6a205dc6c0638e68b909de and is no longer needed
here.

This reverts commit 01b1dee0ab7ad649760f9d8a7cead2a3f6d9cf70.
/system/core/init/init.c
30f30330420ca4d7913a49e6fd652b4768045ecb 16-Nov-2012 Stephen Smalley <sds@tycho.nsa.gov> Label sockets consistently with the seclabel value if specified.

This is necessary to ensure that the adbd socket is created in the
adbd domain rather than the init domain.

Change-Id: Id4997d7f074aeefea62b41c87b46a6609e03f527
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
/system/core/init/init.c
2a36ae5608e9d655b2bb14ce538f6fbdb910cada 17-Oct-2012 Kenny Root <kroot@google.com> am 7b88a90d: Merge "Remove HAVE_SELINUX guards"

* commit '7b88a90da2a27e347fc16c14fa577f4ae1ef07fd':
Remove HAVE_SELINUX guards
b5982bf7c65b30be981ecfe1847437b05e32b2bb 17-Oct-2012 Kenny Root <kroot@google.com> Remove HAVE_SELINUX guards

Change-Id: I8272c573b3c5dc663203bafab68fad5e94d89364
/system/core/init/init.c
01b1dee0ab7ad649760f9d8a7cead2a3f6d9cf70 05-Oct-2012 Nick Kralevich <nnk@google.com> init: Set ADDR_COMPAT_LAYOUT before spawning processes.

Some Android programs have problems with memory which grows
from the top down. Temporarily set ADDR_COMPAT_LAYOUT to
avoid breaking those programs.

Bug: 7188322
Change-Id: I61760500e670b4563838c63b82d4a0b6e354a86e
/system/core/init/init.c
2fec4de5c704afe4dc2a1bb976699a0e363786dd 13-Aug-2012 Kenny Root <kroot@android.com> am 11c783f1: am 9494f297: Merge "Implement SELinux/MAC checks for property service."

* commit '11c783f1ead9f276e8854cb1adaebeed8517e8a1':
Implement SELinux/MAC checks for property service.
605103fb553a8b872aa8dd0aef76ae8b3bfe47fa 13-Aug-2012 Kenny Root <kroot@google.com> resolved conflicts for merge of 4dcd52ab to jb-mr1-dev

Change-Id: Ibd0c03a7883a2e31adab18543c016776b7b36866
63207cd20f2156bec937a85e789f07de0d1afa9d 09-Aug-2012 rpcraig <rpcraig@tycho.ncsc.mil> Implement SELinux/MAC checks for property service.

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>
/system/core/init/init.c
ae6f3d7c05070f7e0e56fe0056c8923c6ee2f473 01-May-2012 Stephen Smalley <sds@tycho.nsa.gov> Add support for reloading policy from /data/system.

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>
/system/core/init/init.c
ff5c802e6ce489a36ac28e3d93b7e8541b3e4d81 08-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am faad67fa: am ef3f7fa3: Merge "Set the SELinux security label on new directories."

* commit 'faad67fac68642ca039fe5c29099acebf546f5ee':
Set the SELinux security label on new directories.
ef3f7fa32b451bd6f180c4c1586a98cee41aa296 08-Aug-2012 Jean-Baptiste Queru <jbq@google.com> Merge "Set the SELinux security label on new directories."
e096e36e50b4b66638ebc4d3c09c2ee35f538dfa 11-Jun-2012 Stephen Smalley <sds@tycho.nsa.gov> Set the SELinux security label on new directories.

Automatically set the SELinux security label on directories created
by init.rc. This avoids the need to separately call restorecon on
each such directory from the init.rc file. Also restorecon /dev
and /dev/socket after initial policy load so that they are labeled
correctly before any other dev nodes or sockets are created.

Change-Id: If6af6c4887cdead949737cebdd673957e9273ead
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
/system/core/init/init.c
d97d9074ba818de5af45ce4e0f5c30053ae467d0 14-Jun-2012 Arve Hjønnevåg <arve@android.com> Add watchdogd

"/sbin/watchdogd <interval> <margin>" will open /dev/watchdog, try
to set the timeout to <interval>+<margin> then write to it every
<interval> seconds to reset the watchdog.

Change-Id: I15571980cdb868ec19f20e80bf8274b32107d36d
/system/core/init/init.c
34f6d9e910824d6af22c71e6e94a8bea5cde16c8 13-Apr-2012 Andrew Flynn <flynn@google.com> Don't set ro.carrier in init.c

It will instead be set using PRODUCT_PROPERTY_OVERRIDES
in makefiles

Change-Id: Idc8b480af4c15e15c2d97cdd82a20f259e027c52
/system/core/init/init.c
6ebf12fe1bc2de7af4522349973e8bfcc71d6126 26-Mar-2012 Nick Kralevich <nnk@google.com> init: Change umask of forked processes to 077

Modify init to set the umask to 077 when forking processes.
This helps protect against inadvertant information disclosure
in init's child processes.

ueventd: Keep umask at 000. uevent needs to be able to
create device nodes with exactly the permissions it
indicates.

Testing:
1) Do an "ls -lR /data /dev" on the device before and after
the umask change and diff the output. Verified by hand
that the permission change wouldn't cause any problems.

2) Verify that package installation works, and the permissions
are as expected, when installing a program from market and
"adb install".

Bug: 3272072
Change-Id: Ie4f7f06c0ee9da8d9b6fce25d71d8991a9bce406
/system/core/init/init.c
b54f39fdd97c50e0e8dfa439722be0786f5e6f52 26-Jan-2012 Mike Kasick <mike@kasick.org> init: Retain traditional restart behavior for critical and oneshot services.

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).
/system/core/init/init.c
7e36edd80f23a5d34ce7b5b0fbe8ecfea061a826 06-Feb-2012 Mike Kasick <mike@kasick.org> init: Safely restart services to avoid race conditions.

Previously, service restarts (either an explicit "restart", or a "stop,
start" pair) exhibited a race condition whereby the new (restarting)
service process was often spawned before the old (stopping) process had
terminated. This may have resulted in the new service process failing to
acquire a limited resource (file lock, socket bind, etc.) that the old
process had not yet released.

Now, a stopping service remains in the SVC_RUNNING state until its exiting
process has been reaped by waitpid. This prevents a "stop, start" sequence
from spawning a second service process before resources held by the first
are released. This enables safe service restarts by stopping the service,
waiting for the old service process to terminate, and (only then) starting
the new service process. In the event of "restarting" an already stopped
service, the previous behavior is maintained whereby the service is simply
started.

This scenario could be special-cased by the restart command, however, we
have observed instances where services are, unintentionally, stopped and
started "too quickly," and so simultaneous processes for the same service
should never be allowed.

Note that this commit alters the behaviors for explicit restarts of
critical and oneshot services. Previously these serivces would simply be
restarted, whereas now, an explicit restart of a critical service counts as
a crash (which may result in a recovery reboot) and oneshot services go
into the disabled state.
/system/core/init/init.c
50fb5a69333e4eb0b5fc30fdeae54bc73243061d 18-Mar-2012 Colin Cross <ccross@android.com> init: manually set controlling tty for console services

Normally, calling open on a tty will set that tty as the process
group controlling tty if none already exists. However, if the tty
is /dev/console, the kernel will never automatically set it as the
controlling tty. Call the TIOCSCTTY manually on the fd, which will
always attempt to set it as the controlling tty.

Fixes ctrl-c on the console shell when androidboot.console is not
passed on the kernel command line and the default /dev/console is
used.

Change-Id: I449cc41b47e93ac38ad6987413bb54131e1ec0cd
/system/core/init/init.c
469b7b2da84a62652342fd2f6006ca452cb1447d 02-Mar-2012 Chris Dearman <chris@mips.com> Fix typo in queue_property_triggers ident

Signed-off-by: Chris Dearman <chris@mips.com>
Change-Id: I5f18ccb0912b9bb89c9f5104f9505c610c109af8
/system/core/init/init.c
e46f9d510db9351682cf17c49115110870147335 13-Jan-2012 Stephen Smalley <sds@tycho.nsa.gov> Extend init and ueventd for SE Android.

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
/system/core/init/init.c
5511c84a50617d1b3c280beb49de38ed1aae21c6 19-Dec-2011 Dima Zavin <dima@android.com> init: export all androidboot cmd line values as ro.boot.xx props

Also, clean up how we initialize the ro.xx properties and process
the kernel command line.

Change-Id: Iedda6c90e31340a189171a44b2767480403354f7
Signed-off-by: Dima Zavin <dima@android.com>
/system/core/init/init.c
3e7b7739e3d4d7aaaa363645501036dafcc30ed3 16-Dec-2011 Dima Zavin <dima@android.com> init: import the hardware specific init file in init.rc

This removes the hardcoding of the file import in init and instead
allows the init.rc file to fully control what is loaded.

Change-Id: I933e5bbab57f1e8705a370d660f92c6508da94d2
Signed-off-by: Dima Zavin <dima@android.com>
/system/core/init/init.c
d7634c9cdad7bec39294a993b0bc898eaf709829 16-Dec-2011 Dima Zavin <dima@android.com> init: initialize property area early at boot

The property service is still started later, but the property area
and the initial boot properties are initialized before the init.rc
file is processed. This allows init.rc files to have access to boot
properties during parsing.

Change-Id: Iae9ed1093c821831a864b39ae6bc697e62b94757
Signed-off-by: Dima Zavin <dima@android.com>
/system/core/init/init.c
a286480f56012abdb4ef4ddab1c19a5c2316b7b8 27-Oct-2011 Ken Sumrall <ksumrall@android.com> Fix the class_reset command

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
/system/core/init/init.c
2b99543cef1b8b0aa8cca39544939910035117b0 28-Sep-2011 Vladimir Chtchetkine <vchtchetkine@google.com> Pick up on androidboot.hardware kernel cmd option

x86 emulator passes hardware name through the androidboot.hardware kernel cmd option, and
ueventd must pick up on it to locate proper ueventd.rc file for that hardware.

Change-Id: Id61c5b67fe6275a15c7aa62556e0b89eda7968f8
/system/core/init/init.c
ebf46586f57e580d0195a06c32103ea393314f01 06-Sep-2011 Dima Zavin <dima@android.com> init: do not load default.prop from ramdisk in charger mode

Change-Id: Ic471b891829d7f857674b925c9948954972d9ecb
Signed-off-by: Dima Zavin <dima@android.com>
/system/core/init/init.c
ca47cef7491caf6072984d9d64c768717baad09a 25-Aug-2011 Dima Zavin <dima@android.com> init: add charge mode handling

Introduces a 'charger' section that is processed when androidboot.mode
supplied on the kernel commandline is "charger".

In this mode, sections such as fs, post-fs, etc are skipped. Only the
'early-init' and 'init' sections of the init rc files are processed before
processing the 'charger' section.

Change-Id: If9eb6334de18f04cbcf2aab784578e2993615242
Signed-off-by: Dima Zavin <dima@android.com>
/system/core/init/init.c
da04c52ab1036048520fca265cf02b61dca789e0 02-Sep-2011 Dima Zavin <dima@android.com> init/cutils: move list utility code to cutils from init

Change-Id: I357ceee813700297d8343159f22a07659e768d41
Signed-off-by: Dima Zavin <dima@android.com>
/system/core/init/init.c
8f91282ebe1963b9d27f8779ad1342302b293bd2 01-Sep-2011 Dima Zavin <dima@android.com> init/cutils: move kernel logging interface to libcutils from init

Change-Id: Ia0f91b1fcd6cae69d76bf3dd841340958db938a8
Signed-off-by: Dima Zavin <dima@android.com>
/system/core/init/init.c
3bea0790e23811d9139f5b39e9b126445fee061c 26-Aug-2011 Dima Zavin <dima@android.com> init: check for list empty when getting commands for action

Change-Id: Id42d6a6b6297919b2e6520e074e31b5e01ae17bc
Signed-off-by: Dima Zavin <dima@android.com>
/system/core/init/init.c
c21dcef9fecaa224f153af0c5643fca4933bbc7f 26-Jul-2011 Conley Owens <cco3@android.com> am 45e8fc6b: am 8621b5ea: am 212282c3: am 80dbd2a7: Merge "Fix build error in init when building with bootchart"

* commit '45e8fc6bfd9221274f48861287ff7af06ee7a199':
Fix build error in init when building with bootchart
45e8fc6bfd9221274f48861287ff7af06ee7a199 25-Jul-2011 Conley Owens <cco3@android.com> am 8621b5ea: am 212282c3: am 80dbd2a7: Merge "Fix build error in init when building with bootchart"

* commit '8621b5ea475822499128e6f138a9dfc224bbb569':
Fix build error in init when building with bootchart
9ab8190e418c9985ae1b92ad8fa2d20b2ed216e9 14-Jan-2011 Carl-Emil Lagerstedt <carl-emil.lagerstedt@sonyericsson.com> Fix build error in init when building with bootchart

There was a build error in init.c if you enabled bootchart, this
should probably be shipped upstream if not fixed already.

Change-Id: Iea3451c3e15d5cac00c5420d99bfce9a950aaaac
/system/core/init/init.c
8d48c8e45724c7103f0ace7885d339e49399908b 24-Mar-2011 Brian Swetland <swetland@google.com> defer firmware load until after filesystems are mounted

In some situations a driver could try to request firmware before
/system is mounted. Previously we'd fail the request. Now we
will retry the read-from-filesystem every 100ms until we find the
firmware or we've finished the "fs" and "post-fs" stages of init.

Change-Id: Ie32402f7d41c818bf20f3297286ed5f99705b72c
/system/core/init/init.c
752923c168009d03e9e00e590155fbd0a2880ccb 04-Dec-2010 Ken Sumrall <ksumrall@android.com> Changes to init to support encrypted filesystems.

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
/system/core/init/init.c
d5c8ddfdf3f275226c02dc00ccbe63229acf6786 08-Dec-2010 Iliyan Malchev <malchev@google.com> Revert "Add "slow_start" keyword to init"

This reverts commit 50b3afd9f39619f69dc6f4efc29be88933eb3614.
/system/core/init/init.c
50b3afd9f39619f69dc6f4efc29be88933eb3614 05-Dec-2010 Paul Eastham <eastham@google.com> Add "slow_start" keyword to init

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
/system/core/init/init.c
2268718ee2b23936f6db88eff7af03762713c169 18-Nov-2010 Nick Kralevich <nnk@google.com> check the return value of setuid and friends

Under some circumstances, setuid() and family can fail,
returning a non-zero value. (see "man setuid" for details).
If this happens, we want to ensure that init doesn't spawn a
process which has root privileges when it's not suppose to.

Change-Id: Idd03f2c8f82a7eaf6e696b5bcfe308e51ea58b52
/system/core/init/init.c
cfa0d8439384a1aaa53d31fb720c234cabf796ee 03-Oct-2010 Wink Saville <wink@google.com> Allow AID_RADIO to restart the ril-daemon.

This enhances robustness by allowing the Telephony Framework to restart
ril-daemon if it notices some catastrophic failure.

Added setprop ctl.restart.
Added ril-daemon to setprop control_perms and allow users/groups
with the AID_RADIO ID to control it.

Change-Id: I195abdd754a731ce0b77e8f71ab47fde8c3e7977
/system/core/init/init.c
64092e852d0879d07ded15c429473c45da389454 01-Oct-2010 Mike Lockwood <lockwood@android.com> am 78ea2374: am 912ff85b: init: Add support for SOCK_SEQPACKET socket type

Merge commit '78ea2374c5c87d7bb58747b1a6173c598f386600'

* commit '78ea2374c5c87d7bb58747b1a6173c598f386600':
init: Add support for SOCK_SEQPACKET socket type
912ff85b035e0e6bc109812c1ea5661ea4df5967 01-Oct-2010 Mike Lockwood <lockwood@android.com> init: Add support for SOCK_SEQPACKET socket type

Change-Id: Ib264ecf9beb2685b070436d2bdec9655c7a31b47
Signed-off-by: Mike Lockwood <lockwood@android.com>
/system/core/init/init.c
150f19e373f57c245609c2252be257b8a9ab15fd 23-Jun-2010 Nick Kralevich <nnk@google.com> Mount /dev with nosuid

Change-Id: I66c7fcf9b65405dfc12d344ef3ed225d0ad2db84
/system/core/init/init.c
4ea085064236fc23ff7f8398345b0fa45646ade7 16-Jun-2010 Nick Kralevich <nnk@google.com> Revert "Mount /dev with noexec and nosuid"

This reverts commit 4ec97f2b257f5c9ed7cf6f0245212f4e3eb60c1b.
/system/core/init/init.c
4ec97f2b257f5c9ed7cf6f0245212f4e3eb60c1b 08-Jun-2010 Nick Kralevich <nnk@google.com> Mount /dev with noexec and nosuid

Change-Id: Iea182c1e6a72c281abd17bf83ff765bb9cb59270
/system/core/init/init.c
ebd4613bfc8d926503f7de38240529ce0b1997ee 22-Apr-2010 Colin Cross <ccross@android.com> init: Fix init spinning once init.rc is complete

When the init process ran out of actions to execute, cur_action was
NULL and action_queue_empty() was true, but cur_command was still
set. This patch clears cur_command when a new action is retreived,
and only depends on cur_action and action_queue_empty() to determine
the poll timeout.

Change-Id: Iaa95063c8c267a5b1ada9f20363b99c433e61ac4
/system/core/init/init.c
f83d0b9af5cbe4440cc41ceaa8a7806a13c86282 21-Apr-2010 Colin Cross <ccross@android.com> init: Move uevent handling to an external ueventd process

Change-Id: Iea6c56013062ade633a1754f7bcf8cf09b3dedc1
/system/core/init/init.c
6310a8261c922533a692fb3e74ece2da98d4bafa 20-Apr-2010 Colin Cross <ccross@android.com> init: Split parser into generic parser and init parser

Change-Id: I451ebc4ff12f2ac660eb533fa10ad561fa25c9dd
/system/core/init/init.c
3294bbbad9494eb4ca534624b96e39f8ed15aaf2 20-Apr-2010 Colin Cross <ccross@android.com> init: Allow services to start before property triggers are up

Change-Id: I4f87657123bea88b7b5c537781868908d8d66b01
/system/core/init/init.c
ed8a7d84428ec945c48b6b53dc5a3a18fabaf683 20-Apr-2010 Colin Cross <ccross@android.com> init: Move list and log handling to list.h and log.h

Change-Id: I298f575c590d0f28b7ad78747f3ebdbba56b7a27
/system/core/init/init.c
ebc6ff105a114ff5b5465e64fa0f3889730da19d 14-Apr-2010 Colin Cross <ccross@android.com> init: Handle commands in event queue loop

Change-Id: I679059dae43143f3c8f16b68de5694539b699e50
/system/core/init/init.c
3899e9fc01cf608f19f716749c54cc5c4d17e766 14-Apr-2010 Colin Cross <ccross@android.com> init: Move prototypes for util.c into util.h

Change-Id: I46a91849ce5297eb2597dd6134412f817564ec24
/system/core/init/init.c
9c5366ba55b1553b2d66f48e3d14fbd274a2944d 14-Apr-2010 Colin Cross <ccross@android.com> init: Move signal handling to signal_handler.c

Change-Id: I3a24afa28a1cd279c749d6f384f687b8de56067e
/system/core/init/init.c
504bc5175a8fe5a2f2552903afee761a86283cf4 14-Apr-2010 Colin Cross <ccross@android.com> init: Move gettime() to util.c

Change-Id: I1df96964763f8baedbc1cea6875d3dfc5e48c065
/system/core/init/init.c
d11beb2b1516144327c3f730f75e6b4bc65f1374 14-Apr-2010 Colin Cross <ccross@android.com> init: Move property_set_fd to property_service.c

Change-Id: Ic7a19073eae8f353d48cabee80fa9722b35a82b5
/system/core/init/init.c
ca7648ddfb46347c60014a849b0150a74df4e1d2 14-Apr-2010 Colin Cross <ccross@android.com> init: Move parser prototypes to parser.h

Change-Id: I31db51eb8e8a33a0bd06b41206bc9f9147d16d41
/system/core/init/init.c
0dd7ca6e87abb689700c5e3a816a949b03b1154b 14-Apr-2010 Colin Cross <ccross@android.com> init: Move device_fd to devices.c

Change-Id: I11ed0f3e1b95d2cff4fdbd80b915c01572f76b0e
/system/core/init/init.c
a866695ebe3a396a0ec411c0f99e0921c74c0fd2 14-Apr-2010 Colin Cross <ccross@android.com> init: Move keychords to keychords.c

Change-Id: I8fba9f5f73439a451fc961f8111612dff4fb5dfd
/system/core/init/init.c
f24ed8ca0a13f1b97bd55d10f75a289bf9ccd98d 13-Apr-2010 Colin Cross <ccross@android.com> init: Move mtd functions from init.c to util.c

Change-Id: I04e8f0ae6cc88af974372872e5617d16e0b1a2c8
/system/core/init/init.c
31712beaf7de127a1249b909cdefffbc25fff076 09-Apr-2010 Colin Cross <ccross@android.com> Move filesystem mounting into a new "fs" init level

Devices with non-MTD storage need to override the filesystem mounting
commands in init.rc. Moving them to a new "fs" init level allows a
custom init.<device>.rc to handle the mounting.

Change-Id: If0e655139b9734650fb798b6eb0a90e2241fc29b
/system/core/init/init.c
4e221f0077373b37ca70e862eface2987557295b 25-Feb-2010 San Mehat <san@google.com> init: Add support for specifying a services i/o priority

Signed-off-by: San Mehat <san@google.com>
/system/core/init/init.c
7a36210cdb39bde3a7d73095d5891678685e431f 19-Jan-2010 Mike Lockwood <lockwood@android.com> init: Support bugreports to SD card in user builds if adb is enabled.

The rationale being that we do not want this enabled by default, but
tying it to adb being enabled allows convenient bugreport collection
for savvy users and developers using production devices.

Change-Id: I71535b33f0774faf1975c98d106080f2ff12e349
Signed-off-by: Mike Lockwood <lockwood@android.com>
/system/core/init/init.c
8c92ba1921fc8dc3fc7cc39ef854e9ee70fafc67 01-Sep-2009 Jean-Baptiste Queru <jbq@google.com> merge from open-source master
dc816d5dcd87a3578e47eade55db80b99b802c62 14-Jan-2009 Ben Gruver <JesusFreke@JesusFreke.com> Allow an onrestart command to stop the current service

For example,

service recovery /sbin/recovery
onrestart start loadkeys
onrestart class_start con
onrestart stop recovery

Previously, if you had a service like the above, the "onrestart stop
recovery" clause would not have any effect, because the restart flag
would be re-set after the stop command had executed.

This is similar to a service with the "oneshot" keyword, with the critical
difference being that it executes the other onrestart commands when the
service dies.
/system/core/init/init.c
11e1c42df69b15c938aa1b7570e4370e6ab15a86 17-Nov-2008 Jay Freeman (saurik) <saurik@saurik.com> completed implementation of "trigger" for init
/system/core/init/init.c
96d58f4f521ee4c1fef58efe5c009f1ea523d67c 26-Jul-2009 Jean-Baptiste Queru <jbq@google.com> Merge korg/donut into korg/master
0b5cb96fa46a892fb3662ddf341fdc095dabcd82 20-May-2009 San Mehat <san@google.com> am d4cdd13f: init: Clean up dynamic argument handling for services

Merge commit 'd4cdd13f6f56f3fe8d8511b609e823925fdd83f9'

* commit 'd4cdd13f6f56f3fe8d8511b609e823925fdd83f9':
init: Clean up dynamic argument handling for services
d4cdd13f6f56f3fe8d8511b609e823925fdd83f9 20-May-2009 San Mehat <san@google.com> init: Clean up dynamic argument handling for services

Signed-off-by: San Mehat <san@google.com>
/system/core/init/init.c
8ad15685e6d3d2251ceac4ac7135397cf6140e1a 20-May-2009 San Mehat <san@google.com> resolved conflicts w/ f24e252903ca0f71c7fbfb135cf17e83e0c2ea90 merge...
f24e252903ca0f71c7fbfb135cf17e83e0c2ea90 19-May-2009 San Mehat <san@google.com> init: Add the ability to start services with dynamic arguments.

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>
/system/core/init/init.c
06c6589b1078a73ce25680f951356b1075418441 06-May-2009 Dima Zavin <dima@android.com> am 770354d: init: Fix segfault when log_write() was missing an arg to fo

Merge commit '770354d7e6cd471daed426fcf04bf7246e7cb18b'

* commit '770354d7e6cd471daed426fcf04bf7246e7cb18b':
init: Fix segfault when log_write() was missing an arg to format.
770354d7e6cd471daed426fcf04bf7246e7cb18b 06-May-2009 Dima Zavin <dima@android.com> init: Fix segfault when log_write() was missing an arg to format.

Also, flag log_write() as a printf-like beast to gcc.

Signed-off-by: Dima Zavin <dima@android.com>
/system/core/init/init.c
dd7bc3319deb2b77c5d07a51b7d6cd7e11b5beb0 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/system/core/init/init.c
e54eebbf1a908d65ee8cf80bab62821c05666d70 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/system/core/init/init.c
038862e152b98d0c0f355c6802beaa1ed59cefbe 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> Merge branch 'cupcake'
5ae090ed949cea9d1e7ab1552b455a229f8f9757 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
/system/core/init/init.c
77d0c65b950570edd5241a8f2ebecfc3acbc5135 19-Dec-2008 Jean-Baptiste Queru <jbq@google.com> Merge commit 'remotes/korg/cupcake'

Conflicts:
init/devices.c
logwrapper/logwrapper.c
mountd/AutoMount.c
35237d135807af84bf9b0e5b8d7f8633e58db6f5 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/system/core/init/init.c
165de92bf1bca1648b4df3047a8f274e0aff4ca9 23-Nov-2008 Ivan Djelic <ivan.djelic@parrot.com> show error message when exec fails during service startup
/system/core/init/init.c
4f6e8d7a00cbeda1e70cc15be9c4af1018bdad53 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/system/core/init/init.c