summaryrefslogtreecommitdiffstats
path: root/init
Commit message (Collapse)AuthorAgeFilesLines
* am 45f2b924: am 705accc2: Merge "Init: Remove unused variables"Andreas Gampe2014-11-256-30/+9
|\ | | | | | | | | * commit '45f2b924b653c485b18204ae84747000c02ddcf6': Init: Remove unused variables
| * Init: Remove unused variablesAndreas Gampe2014-11-246-30/+9
| | | | | | | | | | | | | | | | For build-system CFLAGS clean-up, fix unused variables. Use a #define instead of static variable in a header file. Change-Id: Id47bf38e51644b61a9f3ac1893a16553695f1aac
* | am 406f00a8: am 8d698179: Merge "Use LOCAL_POST_INSTALL_CMD to simplify ↵Ying Wang2014-11-251-20/+4
|\ \ | |/ | | | | | | | | | | symlink creation." * commit '406f00a87f2337585f59029c05692a9a0e44c698': Use LOCAL_POST_INSTALL_CMD to simplify symlink creation.
| * Use LOCAL_POST_INSTALL_CMD to simplify symlink creation.Ying Wang2014-11-241-20/+4
| | | | | | | | Change-Id: I67ad7248c26561d394e66901e90ef5814ec69fb3
* | am d707b7f9: am b0a10b53: Merge "Fix segfault in ↵JP Abgrall2014-11-141-1/+1
|\ \ | |/ | | | | | | | | | | get_character_device_symlinks()" * commit 'd707b7f99357b521e01c0b11489a3b17b04a2a2d': Fix segfault in get_character_device_symlinks()
| * Fix segfault in get_character_device_symlinks()Tomasz Kondel2014-11-131-1/+1
| | | | | | | | | | | | A segmentation fault will occur when strchr function returns NULL. Change-Id: I76076acfff16056179bf24dff5df9f81d9a45125
* | am 755b9099: am c325535d: Merge "Close fd on error path in do_mount()"JP Abgrall2014-11-141-0/+1
|\ \ | |/ | | | | | | * commit '755b9099203fd1b491bf82dc8dad5bafba4f6bcd': Close fd on error path in do_mount()
| * Close fd on error path in do_mount()Tomasz Kondel2014-11-131-0/+1
| | | | | | | | | | | | | | This fix closes a file descriptor before returning error from do_mount() Change-Id: Ib370229f16bf9ac385162d6b163cc5b079a1e73e
* | am 82831c3d: am 4b862563: Merge "property_service: Added vendor build ↵Daniel Rosenberg2014-11-111-0/+1
|\ \ | |/ | | | | | | | | | | properties to load_all_props" * commit '82831c3d26e5b38bd24bbd241dac40e09fd9ba4b': property_service: Added vendor build properties to load_all_props
| * property_service: Added vendor build properties to load_all_propsDaniel Rosenberg2014-11-111-0/+1
| | | | | | | | | | Change-Id: I267bd848e1f6e2978024c07e603b25f1f41f5fbf Signed-off-by: Daniel Rosenberg <drosen@google.com>
* | am 25fb460a: am ae52248f: Merge "init isn\'t built for platforms without ↵Elliott Hughes2014-11-101-2/+0
|\ \ | |/ | | | | | | | | | | dirent::d_type." * commit '25fb460a03f25e3a68d4ecb5e3a35d366f772f62': init isn't built for platforms without dirent::d_type.
| * init isn't built for platforms without dirent::d_type.Elliott Hughes2014-11-101-2/+0
| | | | | | | | Change-Id: Icd4b431576f2ba619ff4ae6fb871bb0210d3b2f2
| * am 2d241ec8: am 3a387176: Merge "Don\'t build init with clang for now"Chih-hung Hsieh2014-10-161-0/+4
| |\ | | | | | | | | | | | | * commit '2d241ec8a86c56bbf8522eb007674d7b4e3d164d': Don't build init with clang for now
| * \ am 2b16bf88: Merge "Include reason when wiping data." into lmp-devJeff Sharkey2014-09-241-1/+2
| |\ \ | | | | | | | | | | | | | | | | * commit '2b16bf88c768003291f027fdfac94d84abe9dbe6': Include reason when wiping data.
| * \ \ am ae3a8961: am fed0f06b: Merge "init: Fix memory corruption when sanitizing ↵Elliott Hughes2014-09-231-2/+2
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | platform paths" * commit 'ae3a8961f01e436a70cab569483b8ebcc1f56c0c': init: Fix memory corruption when sanitizing platform paths
| * \ \ \ am 40af0929: Fix charger mode on first boot of force encrypt devicesPaul Lawrence2014-09-161-1/+6
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * commit '40af09297f9d60a3cfd4a186ff294cef6255a9df': Fix charger mode on first boot of force encrypt devices
* | | | | | init: Add support "&&" operator in property triggersBadhri Jagan Sridharan2014-10-205-56/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "&&" 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 Change-Id: I72c19f7aa92231372a416193618ee6c7fd368141 Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
* | | | | | am 2d241ec8: am 3a387176: Merge "Don\'t build init with clang for now"Chih-hung Hsieh2014-10-161-0/+4
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | | | | | | | | | | | | | | * commit '2d241ec8a86c56bbf8522eb007674d7b4e3d164d': Don't build init with clang for now
| * | | | | Don't build init with clang for nowBernhard Rosenkraenzer2014-10-041-0/+4
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | init doesn't start when built with clang. Set LOCAL_CLANG:=false until this is analyzed and fixed. Change-Id: I5a7944aef676ce88defe5c0449e712d9812fb5f3 Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
* | | | | am 9b789d7a: am 2b16bf88: Merge "Include reason when wiping data." into lmp-devJeff Sharkey2014-09-261-1/+2
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | * commit '9b789d7a30ba3c7f4fd41e3e99c827feb80b0fb3': Include reason when wiping data.
| * | | | Include reason when wiping data.Jeff Sharkey2014-09-241-1/+2
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | This will help us track down who requested a data wipe. Bug: 17412160 Change-Id: I40f73d2d0f08123d2afc044a3dde485151b400d9
* | | | am ae3a8961: am fed0f06b: Merge "init: Fix memory corruption when sanitizing ↵Elliott Hughes2014-09-231-2/+2
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | platform paths" * commit 'ae3a8961f01e436a70cab569483b8ebcc1f56c0c': init: Fix memory corruption when sanitizing platform paths
| * | | init: Fix memory corruption when sanitizing platform pathsChristopher R. Palmer2014-09-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes code that incorrectly increments s when it hits the terminator character of the string being sanitized. This means it will randomly start trashing memory beyond the end of the string being sanitized until it happens to hit two NULs (\0\0) which will break it out of the loop. Change-Id: I76553d7f183236a78a0bc7b408e92559b98f732f
* | | | am 40af0929: Fix charger mode on first boot of force encrypt devicesPaul Lawrence2014-09-171-1/+6
|\ \ \ \ | | |/ / | |/| / | |_|/ |/| | * commit '40af09297f9d60a3cfd4a186ff294cef6255a9df': Fix charger mode on first boot of force encrypt devices
| * | Fix charger mode on first boot of force encrypt devicesPaul Lawrence2014-09-161-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | waitpid breaks whenever child status signals. Need to loop, continuing on errno EINTR Bug: 17515976 Change-Id: Ibb29056a38b3c90dc7904de8c6aedb5a362e511d
* | | am 465fc3b9: am 1cbf4329: Merge "Remove obsolete warning from ↵Nick Kralevich2014-09-021-2/+0
|\ \ \ | | |/ | |/| | | | | | | | | | | | | restorecon_recursive documentation." * commit '465fc3b974384feea3ea991a5e2f801ce1253e2f': Remove obsolete warning from restorecon_recursive documentation.
| * | Remove obsolete warning from restorecon_recursive documentation.Stephen Smalley2014-09-021-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We originally included a warning to not invoke restorecon_recursive with a path leading to a shell-writable or app-writable directory due to concerns about the potential for mischief with symlinks during the restorecon_recursive. However, this warning was never necessary for calling restorecon_recursive during system initialization before an adb shell or app can run, and we have further prohibited init from reading/following symlinks that can be created by shell or apps in policy, so this warning is superfluous. It also contradicts current usage of restorecon_recursive in rootdir/init.rc, since it is called there on /data. Change-Id: I28a635e0b5991ced8adcef93e7a04f9d9e5634fd Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* | | am bf921c51: am 7a1973ec: Merge "remove examples of unimplemented triggers ( ↵Elliott Hughes2014-08-291-6/+0
|\ \ \ | |/ / | | | | | | | | | | | | | | | device-added device-removed ) from init/readme.txt" * commit 'bf921c5112043b5e39b76e76f38f2818bc904b05': remove examples of unimplemented triggers ( device-added device-removed ) from init/readme.txt
| * | remove examples of unimplemented triggers ( device-added device-removed )Trevor Drake2014-08-291-6/+0
| | | | | | | | | | | | | | | | | | from init/readme.txt Change-Id: I16e226d8f563a223ae20044fff30498883bc4ae2
* | | am 8e207634: am d5f230af: Merge "Remove descriptions of unimplemented triggers."Elliott Hughes2014-08-281-9/+0
|\ \ \ | |/ / | | | | | | | | | * commit '8e207634c89e18a319c6514c39acd5aaff6d8f83': Remove descriptions of unimplemented triggers.
| * | Remove descriptions of unimplemented triggers.Trevor Drake2014-08-281-9/+0
| | | | | | | | | | | | | | | | | | | | | device-added, device-removed and service-exited were described but never implemented. Change-Id: I6fbd05a85576d18d6741fc6dd549acc9132b0531
* | | am a005e779: Merge "Enable not rebooting during default encryption" into lmp-devPaul Lawrence2014-08-261-1/+0
|\ \ \ | | |/ | |/| | | | | | | * commit 'a005e7795e3dfb7cc0bd2bc65208d2490bfc89d8': Enable not rebooting during default encryption
| * | Enable not rebooting during default encryptionPaul Lawrence2014-08-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Need to not set this property) during mount, since it can't be changed later (ro property) Also no reason to start class main on encryption cycle - we'll show surfaceflinger, which is enough UI for this short cycle. Bug: 17041092 Change-Id: Ica5339c54e45716d0fe20e23c0ab857f388d23ed
| * | Clarify init's write command.Elliott Hughes2014-07-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Bug: https://code.google.com/p/android/issues/detail?id=73996 (cherry picked from commit afc08ce39235d0e3f1e63f30ee587f2a5952be44) Change-Id: Id2fb11d5259957ef23cc839fba14af8452fc69e4
| * | Move unlink("/dev/.booting") until after filesystems are mounted.Riley Andrews2014-07-141-15/+8
| | | | | | | | | | | | | | | | | | | | | 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
* | | am cf2b944d: am 5a1d5a8c: Merge "ueventd: call _exit for safety"Kenny Root2014-08-251-1/+3
|\ \ \ | | |/ | |/| | | | | | | * commit 'cf2b944df6d744d279a434ec280f9bd8cef03a5b': ueventd: call _exit for safety
| * | ueventd: call _exit for safetyKenny Root2014-08-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure to call _exit instead of exit to avoid triggering exit handlers that may have existed in the parent process. Print out a log message when forking to process firmware events fails. Change-Id: I2436bdf85d9a8ea26b718e62023f1dac89864667
* | | am 5d228392: am d24240fb: Merge "Fixed the pacing logic in bootchart data ↵Elliott Hughes2014-08-063-20/+47
|\ \ \ | |/ / | | | | | | | | | | | | | | | collection." * commit '5d2283927a9527130cad15d33c1e2b360f4bd46f': Fixed the pacing logic in bootchart data collection.
| * | Merge "Fixed the pacing logic in bootchart data collection."Elliott Hughes2014-08-063-20/+47
| |\ \
| | * | Fixed the pacing logic in bootchart data collection.Bo (Andover) Zhang2014-07-293-20/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ideally bootchart collects system data every BOOTCHART_POLLING_MS ms. However, the current bootchart pacing logic would collect data every time the main loop in init.c is executed. This results in: 1. Multiple data samples being taken consecutively or prematurely. In many cases, these data samples have the same timestamp (in jiffies). The off-line data processing tool would complain about dividing by zero "interval" and bail out. 2. Because of the ineffective pacing, bootchart data collection would terminate prematurely. The total duration of data collection is usually much shorter than what the user specifies. The fix is to check whether BOOTCHART_POLLING_MS ms has elapsed before taking a new data sample. For this purpose, /proc/uptime is used to get the time values, consistent with the precision of bootchart timestamps. Change-Id: I106bf91dbda01059b719df6c73b8bd1cd54a64f0 Signed-off-by: Bo (Andover) Zhang <zhang@broadcom.com>
* | | | am 95ec9ae2: am bce3c0c7: Merge "Clarify init\'s write command."Elliott Hughes2014-07-251-3/+3
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit '95ec9ae2c6bad929853c8e0574a354f2eda9604b': Clarify init's write command.
| * | | Clarify init's write command.Elliott Hughes2014-07-251-3/+3
| |/ / | | | | | | | | | | | | Bug: https://code.google.com/p/android/issues/detail?id=73996 Change-Id: I4f8d3927d17a4021a2436c2859aa732479c5a118
* | | am c6ac2793: am ebf9f8f1: Merge "Move unlink("/dev/.booting") until after ↵Riley Andrews2014-07-141-15/+8
|\ \ \ | |/ / | | / | |/ |/| | | | | filesystems are mounted." * commit 'c6ac27937c632b00836ad72c83c9e7a640030aff': Move unlink("/dev/.booting") until after filesystems are mounted.
| * Move unlink("/dev/.booting") until after filesystems are mounted.Riley Andrews2014-07-111-15/+8
| | | | | | | | | | | | | | 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: I7442df2042cc2788d0301f00e3c2fba7d6e0e1c7
* | am 85dfe988: am 796fccb8: Merge "Fix environment variable assignment in init"Elliott Hughes2014-07-122-8/+22
|\ \ | |/ | | | | | | * commit '85dfe98830c78f1c3d400ca7be4ac594bfcdd275': Fix environment variable assignment in init
| * Fix environment variable assignment in initJames Morrissey2014-07-102-8/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | am 7367ecbc: am 06023134: am 8022ce1e: Merge "ueventd fixup_sys_perms: fixup ↵Nick Kralevich2014-07-071-13/+15
|\ \ | |/ | | | | | | | | | | SELinux labels unconditionally" * commit '7367ecbc4839e3a608ab9b7742c659b58065209f': ueventd fixup_sys_perms: fixup SELinux labels unconditionally
| * ueventd fixup_sys_perms: fixup SELinux labels unconditionallyNick Kralevich2014-07-071-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the fixup code in fixup_sys_perms() scans through all entries in uevent*.rc. If it finds a match, then it performs a fixup. If there's no match in that file, no fixup is performed. SELinux file labels are independently stored in /file_contexts, with no relationship to the files in /ueventd.rc. Even when no entries exist in ueventd.rc, we still want to fixup the SELinux file label in /sys when a uevent message occurs. Change-Id: I0ccb5395ec0be9282095b844a5022e8c0d8903ac
* | am b18d44e4: am ab7e5752: am 09117c70: Merge "ueventd: allow matching ↵Colin Cross2014-07-021-13/+38
|\ \ | |/ | | | | | | | | | | symlink names when setting permissions" * commit 'b18d44e458501f6b5b99349acc68d3d4e90e9d62': ueventd: allow matching symlink names when setting permissions
| * Merge "ueventd: allow matching symlink names when setting permissions"Colin Cross2014-07-021-13/+38
| |\