summaryrefslogtreecommitdiffstats
path: root/init
Commit message (Collapse)AuthorAgeFilesLines
* am 764daa33: am 21ff8257: am bb96da43: am 268cc540: Merge "ueventd: fix a ↵Colin Cross2013-12-302-2/+2
|\ | | | | | | | | | | | | busy loop while reading uevents" * commit '764daa33c06b5fd699bf0c8162b18dd39b00795a': ueventd: fix a busy loop while reading uevents
| * Merge "ueventd: fix a busy loop while reading uevents"Colin Cross2013-12-282-2/+2
| |\
| | * ueventd: fix a busy loop while reading ueventsAmir Goldstein2013-11-172-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am b470d404: am b988e95c: am 6fec3a23: Merge "Log a warning on services that ↵Nick Kralevich2013-12-101-0/+3
|\ \ \ | |/ / | | | | | | | | | | | | | | | lack SELinux domains." * commit 'b470d404e58bbe89c5c2822120b220e45ff72b42': Log a warning on services that lack SELinux domains.
| * | Log a warning on services that lack SELinux domains.Stephen Smalley2013-12-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | am 5ebd8e43: am b2406973: Merge changes I727d9135,I3bd1b59d,I0d05aa28Greg Hackmann2013-11-275-24/+273
|\ \ \ | |/ / | | | | | | | | | | | | | | | * commit '5ebd8e43ba992d12fcdac4aedf7da51b50d6b949': rootdir: add ueventd.rc rule for adf subsystem init: add subsystem rules to ueventd.rc init: handle ueventd path truncation better
| * | init: add subsystem rules to ueventd.rcGreg Hackmann2013-11-265-33/+268
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default ueventd creates device nodes under /dev based on the ueventd DEVPATH. Several subsystems have special rules which are hardcoded in devices.c. Moving forward these special rules should go in ueventd.rc. Special rules have the syntax: subsystem <s> devname (uevent_devname|uevent_devpath) [dirname <dir>] Devices matching SUBSYSTEM=<s> will be populated under <dir>. dirname is optional and defaults to /dev. If dirname is provided, <dir> must start with "/". If devname is uevent_devname, ueventd will create the device node as <dir>/DEVNAME. DEVNAME may include intermediate subdirectories, which ueventd will automatically create. If devname is uevent_devpath, ueventd will use the legacy behavior of computing DEVPATH_BASE=basepath(DEVPATH), and creating the device node as <dir>/DEVPATH_BASE. The new parsing code is based on init_parser.c, with small tweaks to handle commands which don't fall under a section header. Change-Id: I3bd1b59d7e62dfc9d289cf6ae889e237fb5bd7c5 Signed-off-by: Greg Hackmann <ghackmann@google.com>
| * | init: handle ueventd path truncation betterGreg Hackmann2013-11-261-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | Log an error before discarding problematic events, and add a missing truncation check to the usb subsystem's unique codepath Change-Id: I0d05aa287ffc63b46d1752d2a7409d35dc8caca7 Signed-off-by: Greg Hackmann <ghackmann@google.com>
* | | am 675c9966: am 0914e01e: Merge "init: limit visibility of init_parser.c ↵Greg Hackmann2013-11-272-6/+5
|\ \ \ | |/ / | | | | | | | | | | | | | | | helpers" * commit '675c996651e0513e9c7b657d356c55f9b05c7c9f': init: limit visibility of init_parser.c helpers
| * | Merge "init: limit visibility of init_parser.c helpers"Greg Hackmann2013-11-262-6/+5
| |\ \
| | * | init: limit visibility of init_parser.c helpersGreg Hackmann2013-11-252-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To prevent clashing with forthcoming changes to uevent_parser.c Change-Id: I2ee183261c7f43e0e4104a16a280c7ee73d7df96 Signed-off-by: Greg Hackmann <ghackmann@google.com>
* | | | am 8bda6ce5: am 121400a4: Merge "Make init distinguish between orderly exit ↵Elliott Hughes2013-11-271-1/+9
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | and being killed by signals." * commit '8bda6ce55700e46760f8d59820406b72964fa171': Make init distinguish between orderly exit and being killed by signals.
| * | | Make init distinguish between orderly exit and being killed by signals.Elliott Hughes2013-11-251-1/+9
| |/ / | | | | | | | | | | | | Bug: 11826724 Change-Id: I7c11f602447dbd6862decc51cdfe883003cf7d67
| * | Merge commit '536dea9d61a032e64bbe584a97463c6638ead009' into HEADThe Android Open Source Project2013-11-226-6/+184
| |\ \ | | |/ | |/| | | | Change-Id: I5c469a4b738629d99d721cad7ded02d6c35f56d5
* | | am 308f0f9b: am 95e69261: am ac568b8f: Merge "init: remove obsolete rle logo"JP Abgrall2013-10-174-190/+21
|\ \ \ | | | | | | | | | | | | | | | | * commit '308f0f9bf2a82d9c1e02982f0e177f6b04545210': init: remove obsolete rle logo
| * \ \ am 95e69261: am ac568b8f: Merge "init: remove obsolete rle logo"JP Abgrall2013-10-174-190/+21
| |\ \ \ | | |/ / | | | / | | |/ | |/| * commit '95e69261b22cd57c795e96e5ac122f120113f819': init: remove obsolete rle logo
| | * init: remove obsolete rle logoMarcin Chojnacki2013-10-164-190/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am aa4051dc: am 2f924ebe: am a94d2b39: Merge "Add a restorecon_recursive ↵Nick Kralevich2013-10-104-3/+24
|\ \ \ | |/ / | | | | | | | | | | | | | | | built-in command to init." * commit 'aa4051dc4f90f987ba05269ce396d676571156e0': Add a restorecon_recursive built-in command to init.
| * | am 2f924ebe: am a94d2b39: Merge "Add a restorecon_recursive built-in command ↵Nick Kralevich2013-10-104-3/+24
| |\ \ | | |/ | | | | | | | | | | | | | | | to init." * commit '2f924ebe0b0891dba1996c246839427b23705018': Add a restorecon_recursive built-in command to init.
| | * Add a restorecon_recursive built-in command to init.Stephen Smalley2013-10-104-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Functionally equivalent to the restorecon -R toolbox command. A use case is given by: I48eaa2b9901ac8c978192c14493ba1058a089423 Also, fix error handling and documentation for restorecon command. Change-Id: Ia7fbcc82645baf52c6bff0490d3492f458881cbb Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* | | am 4820022b: am 0b7d588d: am f2c4c4ad: Merge "init: Fix ↵Benoit Goby2013-09-241-2/+4
|\ \ \ | |/ / | | | | | | | | | | | | | | | queue_all_property_triggers with nonexistent properties" * commit '4820022b5edb0d19e268d836c25aa628b4378aba': init: Fix queue_all_property_triggers with nonexistent properties
| * | am 0b7d588d: am f2c4c4ad: Merge "init: Fix queue_all_property_triggers with ↵Benoit Goby2013-09-241-2/+4
| |\ \ | | |/ | | | | | | | | | | | | | | | nonexistent properties" * commit '0b7d588d531691904530ba57d772b31fb24ed343': init: Fix queue_all_property_triggers with nonexistent properties
| | * init: Fix queue_all_property_triggers with nonexistent propertiesBenoit Goby2013-09-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't queue actions for "on property=*" if the property does not exist. This fixes these errors on boot: init: property 'sys.powerctl' doesn't exist while expanding '${sys.powerctl}' init: powerctl: cannot expand '${sys.powerctl} Change-Id: I3bd354d73a860f856be5df2c654f940445f9efd9
* | | am 54aad026: am 8dc82eea: am 36b39a97: Merge "init: Fix get_hardware_name() ↵Colin Cross2013-09-181-6/+30
|\ \ \ | |/ / | | | | | | | | | | | | | | | to cope with long /proc/cpuinfo output" * commit '54aad026616148164ff6ceda7508a4e5a04ec569': init: Fix get_hardware_name() to cope with long /proc/cpuinfo output
| * | am 8dc82eea: am 36b39a97: Merge "init: Fix get_hardware_name() to cope with ↵Colin Cross2013-09-181-6/+30
| |\ \ | | |/ | | | | | | | | | | | | | | | long /proc/cpuinfo output" * commit '8dc82eea7ebda374830ee7fa1802222a94eefd88': init: Fix get_hardware_name() to cope with long /proc/cpuinfo output
| | * Merge "init: Fix get_hardware_name() to cope with long /proc/cpuinfo output"Colin Cross2013-09-181-6/+30
| | |\
| | | * init: Fix get_hardware_name() to cope with long /proc/cpuinfo outputJon Medhurst2012-12-101-6/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_hardware_name() uses a fixed size buffer to slurp the contents of /proc/cpuinfo into and with newer multicore systems this is not big enough, leading to the inability to pick up the hardware name. Fix this by using a dynamically allocated, exponentially growing buffer. Change-Id: I51c6c276b6e110f462839e205a4428adc6656e75 Signed-off-by: Jon Medhurst <tixy@linaro.org>
* | | | am 18c34183: am 5535b051: write_file: introduce O_NOFOLLOW, use sane maskNick Kralevich2013-09-171-1/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit '18c34183d76be2efbf2f498ec0185c1ceffa49f0': write_file: introduce O_NOFOLLOW, use sane mask
| * | | am 5535b051: write_file: introduce O_NOFOLLOW, use sane maskNick Kralevich2013-09-171-1/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * commit '5535b05120fa3fd3d68a09e01284aba35cc6e058': write_file: introduce O_NOFOLLOW, use sane mask
| | * | | write_file: introduce O_NOFOLLOW, use sane maskNick Kralevich2013-09-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't follow symlinks when writing to a file. Don't create world-writable files. Bug: 10802869 Change-Id: Ifb55600d574307a535df878acb3347e02028cd30
* | | | | property_service: address comments from previous review.Nick Kralevich2013-09-161-4/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Address post-submit comments from 694636142113d91c2b9585ad28e143d4ff001584 Bug: 10733330 Change-Id: I7c652f7ef0379536df48b9478a2362f1bfd252fe
* | | | am 3a0d4b34: Merge "property_service: better validate property names" into ↵Nick Kralevich2013-09-161-4/+37
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | klp-dev * commit '3a0d4b34816d65e21951f44e4d98a954c5c855ae': property_service: better validate property names
| * | | property_service: better validate property namesNick Kralevich2013-09-161-4/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't allow unexpected characters in property names. Don't allow double dots in property names. Bug: 10733330 Change-Id: I8d69740d697efb791f2f201f90989576e13bac81
* | | | am 5951a369: am b4819e4a: Merge "init: support longer command lines"Dima Zavin2013-09-131-2/+2
|\ \ \ \ | | |/ / | |/| | | | | | | | | | * commit '5951a3691eb0378ec65ea2e6a2e2fe77d24c5e55': init: support longer command lines
| * | | init: support longer command linesAndrew Boie2013-09-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Linux kernel supports command lines up to 2048 bytes on x86, see COMMAND_LINE_SIZE in asm/setup.h. If any androidboot.xxxx arguments were past the 1024 byte limit here, they were lost. Change-Id: I6247c511a7de04109490fffa0125801d274a5501 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
* | | | am 9dd40e97: am d171b656: Merge "[GNSS] Add AID_GPS to property user white list"Colin Cross2013-09-031-0/+2
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit '9dd40e9756de23a25aaa9909c8d4055105621a76': [GNSS] Add AID_GPS to property user white list
| * | | Merge "[GNSS] Add AID_GPS to property user white list"Colin Cross2013-09-041-0/+2
| |\ \ \
| | * | | [GNSS] Add AID_GPS to property user white listNicolas SUET2013-08-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "gps." and "persist.gps." to property_perms white list. Change-Id: I7177170676d774c87e08d1548f5264ac27cba3ff Orig-Change-Id: I7a94caa26be4aefd2fe4f155908e2f8f09858bee Signed-off-by: Nicolas SUET <nicolas.suet@intel.com> Signed-off-by: jerome Pantaloni <jeromex.pantaloni@intel.com> Signed-off-by: Jian Luo <jian.luo@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com> Signed-off-by: Jack Ren <jack.ren@intel.com> Author-tracking-BZ: 118091
| * | | | init: call restorecon on /sysNick Kralevich2013-09-033-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not all files on /sys are not getting labeled properly. Fix them. Change-Id: I9dcff76354e7f50d41f1b6e702836cfbbc149278
| * | | | init: allow disabling selinux via a kernel command lineNick Kralevich2013-09-031-3/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | init: move SELinux into enforcing mode.Nick Kralevich2013-09-031-21/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | am 28e52c81: am b35f68a6: Merge "init: load factory properties"Dima Zavin2013-08-281-7/+14
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | * commit '28e52c816d06d78fa823be2d310d9f4c25012c8f': init: load factory properties
| * | | | Merge "init: load factory properties"Dima Zavin2013-08-281-7/+14
| |\ \ \ \ | | |/ / / | |/| | |
| | * | | init: load factory propertiesAndrew Boie2013-08-201-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These properties are typically set at device provisioning time or in the factory. They contain unit-specific data that isn't touched by software updates or factory data reset. Only read-only properties can be read by this mechanism. Change-Id: Ifff9184f039072c3c0ce99f825c3075afb524514 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
* | | | | am 0cbaed42: am a8ba1f2f: Merge "Add support for socket security context ↵Colin Cross2013-08-237-14/+24
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | specification." * commit '0cbaed4211b514dd2aaa4d28f8936ba58e83c6a5': Add support for socket security context specification.
| * | | | Merge "Add support for socket security context specification."Colin Cross2013-08-247-14/+24
| |\ \ \ \
| | * | | | Add support for socket security context specification.Stephen Smalley2013-08-237-14/+24
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | resolved conflicts for merge of a1af5cf6 to klp-dev-plus-aospColin Cross2013-08-231-0/+11
|\ \ \ \ \ | |/ / / / | | | / / | |_|/ / |/| | | Change-Id: I08e9898940f7cdd466469b76760807cc5d5c67e4
| * | | Handle policy reloads within ueventd rather than restarting it.Stephen Smalley2013-07-261-0/+11
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restarting ueventd upon policy reloads has reportedly created stability problems for some users and could cause events to be lost. Stop restarting ueventd and instead handle policy reloads within ueventd. Also stops restarting installd upon policy reloads. Change-Id: Ic7f310d69a7c420e48fbc974000cf4a5b9ab4a3b Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* | | Seed Linux RNG from Hardware RNG at boot during init.Alex Klyubin2013-08-191-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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