summaryrefslogtreecommitdiffstats
path: root/init/property_service.c
Commit message (Collapse)AuthorAgeFilesLines
* Init: Remove unused variablesAndreas Gampe2014-11-241-5/+0
| | | | | | | | For build-system CFLAGS clean-up, fix unused variables. Use a #define instead of static variable in a header file. Change-Id: Id47bf38e51644b61a9f3ac1893a16553695f1aac
* 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>
* init isn't built for platforms without dirent::d_type.Elliott Hughes2014-11-101-2/+0
| | | | Change-Id: Icd4b431576f2ba619ff4ae6fb871bb0210d3b2f2
* resolved conflicts for merge of dd8e63a4 to masterNick Kralevich2014-06-261-108/+4
|\ | | | | | | Change-Id: I5ee88d4a3846cb617ec115cb55c8192c8ecf2f4f
| * Merge "property_service: get rid of hard coded property / control list"Nick Kralevich2014-06-251-105/+4
| |\
| | * property_service: get rid of hard coded property / control listNick Kralevich2014-06-171-105/+4
| | | | | | | | | | | | | | | | | | | | | | | | Don't force people to make modifications to property_service.c when handling properties. Exclusively use the SELinux rules, which are more flexible and easily adjusted. Change-Id: Ic0bbd01b5df2eef0040286ac59c0a01e9bd14315
* | | resolved conflicts for merge of 079c637f to masterRiley Andrews2014-06-231-3/+6
|\ \ \ | |/ / | | | | | | Change-Id: Iab9a857026de954d7497d6b0eaf3751d2d3904c7
| * | Add ability to boot from charger mode.Riley Andrews2014-06-201-3/+6
| |/ | | | | | | | | | | | | | | | | 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
* | am 7bbfb8cb: am 337f94f1: am e9a6d0a0: Merge "Remove unnecessary #includes ↵Elliott Hughes2014-05-221-1/+0
|\ \ | |/ | | | | | | | | | | of <sys/atomics.h>." * commit '7bbfb8cbaf52975a2d0ef9d448d8ea0fc74a590b': Remove unnecessary #includes of <sys/atomics.h>.
| * Remove unnecessary #includes of <sys/atomics.h>.Elliott Hughes2014-05-221-1/+0
| | | | | | | | | | Bug: 14903517 Change-Id: I5b0a418dd982f1a2fd90609b12bd8364f7f34996
* | am 88a98149: am 13ee94c5: am 8b2d46a5: Merge "init: logd: Allow Developer ↵Mark Salyzyn2014-05-161-0/+1
|\ \ | |/ | | | | | | | | | | settings to adjust logd size" * commit '88a981497ac06046d6da8a99ba17136aa8361b34': init: logd: Allow Developer settings to adjust logd size
| * init: logd: Allow Developer settings to adjust logd sizeMark Salyzyn2014-05-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | - AID_SYSTEM can set persist.logd.size - AID_SYSTEM can issue command to /dev/socket/logd to change the runtime global log sizes. - Add support for ro.logd.size.* as populated by BoardConfig.mk - Limit size to maximum ~3% of physical memory. Bug: 14563261 Bug: 14627052 Change-Id: I606420db2e9d9d032296e71149e4a5b20cbd1137
| * init: 64-bit build issueMark Salyzyn2014-05-011-1/+2
| | | | | | | | | | | | (cherry pick from Icc5344abc184adf4247175d85b2da08af4636e49) Change-Id: I88b0c9b20720ac62ebae8359ded4ab77b4ebcdde
* | Let system UID define build fingerprint.Jeff Sharkey2014-04-281-0/+1
| | | | | | | | | | | | | | | | Some devices leave "ro.build.fingerprint" undefined at build time, since they need to build it from the components at runtime. Bug: 13340779 Change-Id: I033ff7600e68edffdea101fec30246135646b4b2
* | am 4726ba24: am 40d49a02: am e99e5474: Merge "Sync persist property ↵Colin Cross2014-04-181-0/+1
|\ \ | |/ | | | | | | | | | | immediately,in case of suddenly remove the battery." * commit '4726ba24087e83c841e0d0058df61dc908f01978': Sync persist property immediately,in case of suddenly remove the battery.
| * Sync persist property immediately,in case of suddenly remove the battery.OPPO2014-03-311-0/+1
| | | | | | Change-Id: I83c5812c69db532f4675f5dbfa508e55999c8dfe
| * Add "import" support to system property files.Jeff Sharkey2014-03-191-22/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | During boot, allow a property file to import properties from another file. Supports importing the entire file, a specific key, or any keys matching a specific prefix. Here's some example syntax: import /oem/oem.prop import /oem/oem.prop foo.* import /oem/oem.prop foo.bar Bug: 13340779 Change-Id: I867f9a10ca09684326675d9f051f5cf2ae171617
* | Merge "Add "import" support to system property files."Jeff Sharkey2014-03-191-22/+57
|\ \
| * | Add "import" support to system property files.Jeff Sharkey2014-03-191-22/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During boot, allow a property file to import properties from another file. Supports importing the entire file, a specific key, or any keys matching a specific prefix. Here's some example syntax: import /oem/oem.prop import /oem/oem.prop foo.* import /oem/oem.prop foo.bar Bug: 13340779 Change-Id: I867f9a10ca09684326675d9f051f5cf2ae171617
* | | Merge changes Ibea4c13a,I27215a3dGeremy Condra2014-03-191-0/+1
|\ \ \ | |/ / |/| | | | | | | | | | | * changes: init: Add "partition.*.verified" properties to the property service. fs_mgr: Set the 'partition.*.verified' property for verified partitions.
| * | init: Add "partition.*.verified" properties to the property service.Geremy Condra2014-03-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are intended to be used by the rest of the system as weak indicators that the corresponding partition is verified. For instance, if the "partition.system.verified" property is set then using `adb remount` would be unwise. These should not be used as the basis for security decisions. Change-Id: Ibea4c13abd54f46537e2a406774412c25918b24d
* | | am 8299ff70: Merge "init: 64-bit build issue" into klp-volantis-devMark Salyzyn2014-03-171-2/+3
|\ \ \ | |/ / |/| | | | | | | | * commit '8299ff701b66caf513e6cc8807b413bf44b8c2f6': init: 64-bit build issue
| * | init: 64-bit build issueMark Salyzyn2014-03-171-2/+3
| | | | | | | | | | | | Change-Id: Icc5344abc184adf4247175d85b2da08af4636e49
* | | am cdecfcbb: Merge "init: prevent waiting forever when a setprop is ↵JP Abgrall2014-01-311-2/+20
|\ \ \ | |/ / | | | | | | | | | | | | | | | incomplete." into klp-volantis-dev * commit 'cdecfcbb33fc3cc85ac7210ec53f6f1f90a6ffee': init: prevent waiting forever when a setprop is incomplete.
| * | init: prevent waiting forever when a setprop is incomplete.JP Abgrall2014-01-311-2/+20
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Any app can socket_local_client_connect(s, "property_service", ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM) and just keep it open without sending anything. From then on, the property_service.c::handle_property_set_fd() will just recv() forever. This prevents any other properties (i.e. property_set("sys.powerctl", "reboot")) from being processed. Now, we just poll() for 2 sec before recv(...,MSG_DONTWAIT). Bug: 12061560 Change-Id: Iffea4ebb444c7100b59c43ed87aecc5c99f9d3e8
* | Merge "resolved conflicts for merge of ec9e5891 to master"Elliott Hughes2014-01-161-3/+3
|\ \
| * \ resolved conflicts for merge of ec9e5891 to masterElliott Hughes2014-01-161-3/+3
| |\ \ | | |/ | | | | | | Change-Id: I704e3159d529e436e060cb66c1739ef8e7b612d4
| | * system/core 64-bit cleanup.Elliott Hughes2014-01-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | add the pre-recovery serviceDoug Zongker2014-01-161-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | Add a service called "pre-recovery" which is normally stopped but can be started by the system server when we want to go into recovery. It will do any preparation needed (currently needed to handle update packages that reside on an encrypted /data partition) and then set sys.powerctl when it's ready to actually reboot. Bug: 12188746 Change-Id: I894a4cb200395a0f6d7fe643ed4c2ac0a45d2052
* | 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 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
* | | | 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-231-1/+1
|\ \ \ \ | |/ / / | | | / | |_|/ |/| | | | | | | | specification." * commit '0cbaed4211b514dd2aaa4d28f8936ba58e83c6a5': Add support for socket security context specification.
| * | Add support for socket security context specification.Stephen Smalley2013-08-231-1/+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>
| * resolved conflicts for merge of b6c60285 to stage-aosp-masterColin Cross2013-06-241-28/+5
| |\ | | | | | | | | | Change-Id: I5afba55b668065499fa28369cf217d4f5eafab4a
| | * init: move initial property area allocation into bionicGreg Hackmann2013-06-191-28/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bionic's __system_property_add() now expands the property area as needed by mapping in more pages. Rather than duplicate the mapping code, move it inside bionic and have bionic's __system_property_area_init() set up the first page. Signed-off-by: Greg Hackmann <ghackmann@google.com> (cherry picked from commit f14eef0c3c456bfe39f7e9d57c8f7ae4ec775972) Change-Id: Ieb94caab1527c71f2155efe3795490b0ea215a29
| | * property_service: make /dev/__properties__ readableNick Kralevich2013-06-191-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, system properties are passed via the environment variable ANDROID_PROPERTY_WORKSPACE and a file descriptor passed from parent to child. This is insecure for setuid executables, as the environment variable can be changed by the caller. Make the /dev/__properties__ file accessible, so an app can get properties directly from the file, rather than relying on environment variables. Preserve the environment variable for compatibility with pre-existing apps. Bug: 8045561 (cherry picked from commit 7ece0a862cf97e85bbe69458a32a2bd165456874) Change-Id: I762da21ef4075f288745efed0ec7d16c2b71303c
| * | resolved conflicts for merge of 95a41f6b to stage-aosp-masterColin Cross2013-06-171-65/+15
| |\ \ | | |/ | | | | | | Change-Id: Icfae29edf989fb43a7f0b8bda188a9807f76a3b9
| | * init: verify size of property buffers passed to property_getColin Cross2013-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Verify that the buffer passed as the value parameter to property_get is always big enough. (cherry picked from commit 88ac54a4e8d2a63e4fd9c465e115795ace316776) Change-Id: Iacc2b42bfe4069e0bfcbb1c48474f30126a93139
| | * init: move the system property writer implementationColin Cross2013-06-171-51/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move the system property writer implementation into bionic to keep it next to the reader implementation and allow for better testing. (cherry picked from commit 9f5af635010a7ba92edf1fca543f7271cc9d75c8) Change-Id: Idf6100d1d0170751acd5163a22597912bff480f0
| | * init: switch property_get to use __system_property_getColin Cross2013-06-171-14/+7
| | | | | | | | | | | | | | | | | | (cherry picked from commit 2deedfe0b1ac86ebd62d19cf7da9e7dcb508ab09) Change-Id: If3fba2cc1dd5c167b0924ddfe42dbe2e6387208a
* | | init: move initial property area allocation into bionicGreg Hackmann2013-06-181-28/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bionic's __system_property_add() now expands the property area as needed by mapping in more pages. Rather than duplicate the mapping code, move it inside bionic and have bionic's __system_property_area_init() set up the first page. Change-Id: If9917d5f775c1a82eb89be55b84635395145ca49 Signed-off-by: Greg Hackmann <ghackmann@google.com>
* | | init: verify size of property buffers passed to property_getColin Cross2013-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | Verify that the buffer passed as the value parameter to property_get is always big enough. Change-Id: Ie5b6fcd94bb908215cfd55d0c9b07f717ddb70b1
* | | init: move the system property writer implementationColin Cross2013-06-171-51/+8
| | | | | | | | | | | | | | | | | | | | | Move the system property writer implementation into bionic to keep it next to the reader implementation and allow for better testing. Change-Id: I9026e604109e30546b2849b60cab2e7e5ff00ba5