Commit graph

6429 commits

Author SHA1 Message Date
Nick Kralevich
5660da25b9 am 1998e505: am 2e940286: am 0f507339: Merge "Do not change ownership of /sys/fs/selinux/load to system UID."
* commit '1998e505a98ad445bead87c2bb047053f1aea648':
  Do not change ownership of /sys/fs/selinux/load to system UID.
2013-09-19 08:54:12 -07:00
Nick Kralevich
1998e505a9 am 2e940286: am 0f507339: Merge "Do not change ownership of /sys/fs/selinux/load to system UID."
* commit '2e9402863b40fe8bf2ddd8169c62f2419d968ff9':
  Do not change ownership of /sys/fs/selinux/load to system UID.
2013-09-19 08:51:49 -07:00
Nick Kralevich
2e9402863b am 0f507339: Merge "Do not change ownership of /sys/fs/selinux/load to system UID."
* commit '0f507339ec474a2f67227466efc9045630f1f1a4':
  Do not change ownership of /sys/fs/selinux/load to system UID.
2013-09-19 08:50:21 -07:00
Nick Kralevich
0f507339ec Merge "Do not change ownership of /sys/fs/selinux/load to system UID." 2013-09-19 15:47:53 +00:00
Stephen Smalley
cc13e8ab87 Do not change ownership of /sys/fs/selinux/load to system UID.
Policy reload is handled by setting the selinux.reload_policy property
and letting the init process perform the actual loading of policy into
the kernel.  Thus, there should be no need for the system UID to directly
write to /sys/fs/selinux/load.

Change-Id: I240c5bb2deaee757a2e1e396e14dea9e5d9286f5
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-09-19 11:26:26 -04:00
Elliott Hughes
af781c2692 am a2a93250: am c67bd8d7: am a208ea63: Merge "Fix fstab memory leak"
* commit 'a2a93250f625b776886d3c5d41599abdaddb2e50':
  Fix fstab memory leak
2013-09-18 16:42:12 -07:00
Elliott Hughes
7fdd7913bd am 9f25b565: am c4295d9b: am 810ff696: Merge "Cleanup fs_getline from fs_mgr"
* commit '9f25b565f716d865597dd24761137a93f08d4bb1':
  Cleanup fs_getline from fs_mgr
2013-09-18 16:38:52 -07:00
Elliott Hughes
a2a93250f6 am c67bd8d7: am a208ea63: Merge "Fix fstab memory leak"
* commit 'c67bd8d7cd9b43a5a5ef249ea787ac9786359d22':
  Fix fstab memory leak
2013-09-18 16:38:14 -07:00
Elliott Hughes
c67bd8d7cd am a208ea63: Merge "Fix fstab memory leak"
* commit 'a208ea6301b3a7141f800d21407b0befa8ad0a56':
  Fix fstab memory leak
2013-09-18 16:36:33 -07:00
Elliott Hughes
a208ea6301 Merge "Fix fstab memory leak" 2013-09-18 23:35:01 +00:00
Irina Tirdea
d431b8d7f1 Fix fstab memory leak
When reading the fstab config file fails, fstab memory is not freed.
When fstab structure is no longer needed, only half of it is freed.

Free fstab memory in all cases (error or when it is no longer needed).

Change-Id: Ib0758a5aaa69505285bf64143632986a2dbbdccb
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
2013-09-18 16:34:02 -07:00
Elliott Hughes
9f25b565f7 am c4295d9b: am 810ff696: Merge "Cleanup fs_getline from fs_mgr"
* commit 'c4295d9b72812afbaebd7f2512c7a5bba9e7d5fa':
  Cleanup fs_getline from fs_mgr
2013-09-18 16:33:55 -07:00
Elliott Hughes
c4295d9b72 am 810ff696: Merge "Cleanup fs_getline from fs_mgr"
* commit '810ff69609c6f6e0a562c8f05912d4d785fd8bd2':
  Cleanup fs_getline from fs_mgr
2013-09-18 16:31:12 -07:00
Elliott Hughes
810ff69609 Merge "Cleanup fs_getline from fs_mgr" 2013-09-18 23:26:50 +00:00
Colin Cross
7a060eddce am 54aad026: am 8dc82eea: am 36b39a97: Merge "init: Fix get_hardware_name() to cope with long /proc/cpuinfo output"
* commit '54aad026616148164ff6ceda7508a4e5a04ec569':
  init: Fix get_hardware_name() to cope with long /proc/cpuinfo output
2013-09-18 16:09:13 -07:00
Colin Cross
54aad02661 am 8dc82eea: am 36b39a97: Merge "init: Fix get_hardware_name() to cope with long /proc/cpuinfo output"
* commit '8dc82eea7ebda374830ee7fa1802222a94eefd88':
  init: Fix get_hardware_name() to cope with long /proc/cpuinfo output
2013-09-18 16:04:22 -07:00
Mathias Agopian
126cdc2c4b am a512c1ca: am 7b445a8e: Merge "Fix rotation in camera2 API" into klp-dev
* commit 'a512c1ca6322b54b6a74be01be53d537f5a81da4':
  Fix rotation in camera2 API
2013-09-18 15:39:19 -07:00
Mathias Agopian
a512c1ca63 am 7b445a8e: Merge "Fix rotation in camera2 API" into klp-dev
* commit '7b445a8e3a21055a5735585ca0890d14977032f0':
  Fix rotation in camera2 API
2013-09-18 15:33:40 -07:00
Mathias Agopian
7b445a8e3a Merge "Fix rotation in camera2 API" into klp-dev 2013-09-18 22:31:28 +00:00
Colin Cross
8dc82eea7e am 36b39a97: Merge "init: Fix get_hardware_name() to cope with long /proc/cpuinfo output"
* commit '36b39a97f3fc5790538e2e69429043b78ba486e4':
  init: Fix get_hardware_name() to cope with long /proc/cpuinfo output
2013-09-18 14:40:29 -07:00
Colin Cross
36b39a97f3 Merge "init: Fix get_hardware_name() to cope with long /proc/cpuinfo output" 2013-09-18 21:38:33 +00:00
Irina Tirdea
e16d747b51 Cleanup fs_getline from fs_mgr
Since getline is included in bionic, fs_mgr can use this version instead of
the one defined internally by fs_getline.

Replace fs_getline with getline.

Change-Id: I49b53d639bd995f051256fb7573ff6ab45d9c36d
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
2013-09-18 22:55:51 +03:00
Nick Kralevich
5d4be69093 am 0e7bd81c: am 4f18183b: Merge "Initialize /dev/urandom earlier in boot." into klp-dev
* commit '0e7bd81c938611cfa4ebf44870668300a5bba875':
  Initialize /dev/urandom earlier in boot.
2013-09-18 12:53:11 -07:00
Nick Kralevich
0e7bd81c93 am 4f18183b: Merge "Initialize /dev/urandom earlier in boot." into klp-dev
* commit '4f18183bd6d3d2ed5d698c176ecc239211bdb82e':
  Initialize /dev/urandom earlier in boot.
2013-09-18 12:50:32 -07:00
Nick Kralevich
4f18183bd6 Merge "Initialize /dev/urandom earlier in boot." into klp-dev 2013-09-18 19:46:54 +00:00
Jamie Gennis
02e20daebe am 3929efb9: am 9d773b97: Merge "trace: Add support for tracing 64-bit ints." into klp-dev
* commit '3929efb9d480b8893eb3e95cd282dd161ab8fb12':
  trace: Add support for tracing 64-bit ints.
2013-09-18 12:25:52 -07:00
Jamie Gennis
3929efb9d4 am 9d773b97: Merge "trace: Add support for tracing 64-bit ints." into klp-dev
* commit '9d773b978b9fc26fb08a973e0290aba5432b720a':
  trace: Add support for tracing 64-bit ints.
2013-09-18 12:21:23 -07:00
Jamie Gennis
9d773b978b Merge "trace: Add support for tracing 64-bit ints." into klp-dev 2013-09-18 19:17:58 +00:00
Jamie Gennis
f1921c7949 trace: Add support for tracing 64-bit ints.
Bug: 10624956
Change-Id: Ie1d7c8ac16b5a5ec1e63e4fb1863f5b1ab2b59e8
2013-09-18 19:03:45 +00:00
Nick Kralevich
b410eb1913 Initialize /dev/urandom earlier in boot.
It's a security best practice to carry entropy across reboots.
(see "man 4 random"). Currently, entropy saving and mixing occur
in the system_server, via the EntropyMixer code. Unfortunately, the
EntropyMixer code runs fairly late in the boot process, which means
early boot doesn't have high quality entropy. This has caused security
problems in the past.

Load entropy data as soon as we can in the early boot process, so that
we can get /dev/random / /dev/urandom into a "random" state earlier.

Bug: 9983133
Change-Id: Id4a6f39e9060f30fe7497bd8f8085a9bec851e80
2013-09-18 07:53:51 -07:00
Mathias Agopian
96675ed91f Fix rotation in camera2 API
Bug: 10804238
Change-Id: I093945789d9c6d373392fc9dfd18ec2c6058d3b9
2013-09-17 23:48:54 -07:00
Nick Kralevich
3dcfb7f107 am 18c34183: am 5535b051: write_file: introduce O_NOFOLLOW, use sane mask
* commit '18c34183d76be2efbf2f498ec0185c1ceffa49f0':
  write_file: introduce O_NOFOLLOW, use sane mask
2013-09-17 15:07:10 -07:00
Nick Kralevich
18c34183d7 am 5535b051: write_file: introduce O_NOFOLLOW, use sane mask
* commit '5535b05120fa3fd3d68a09e01284aba35cc6e058':
  write_file: introduce O_NOFOLLOW, use sane mask
2013-09-17 15:04:45 -07:00
Nick Kralevich
5535b05120 write_file: introduce O_NOFOLLOW, use sane mask
Don't follow symlinks when writing to a file.
Don't create world-writable files.

Bug: 10802869
Change-Id: Ifb55600d574307a535df878acb3347e02028cd30
2013-09-17 14:46:00 -07:00
Todd Poynor
59e51e792a init.rc: no longer start healthd in charger mode
Being moved to healthd/charger mode in board-specific init.rc.

Change-Id: Ie9fc2e5abc1737fbffec8fb071c73f5fd96e4d17
2013-09-17 14:41:07 -07:00
Todd Poynor
fea5b4d44b healthd: move charger executable to healthd charger mode
* Add healthd charger mode ops
* Check for executable invocation as "charger", set charger mode if so
* Incorporate charger executable as healthd charger mode

Change-Id: I4a44e7a4c3a65ae9be94491f7f498aa48d4f8a84
2013-09-17 14:41:07 -07:00
Todd Poynor
c7464c9150 healthd: move Android communication code to separate source
* add ops for different "modes" of healthd operation: android vs. recovery
* recovery mode selected by runstring options -r
* binder/Android communication moved to android mode
* recovery mode ops avoiding binder service registration
* "no service manager" flag removed; now handled by android vs. other modes

Change-Id: I3d8c89bf96a18a6a00cc85306f9a07d3f408f2a0
2013-09-17 14:41:07 -07:00
Todd Poynor
98c23d82f0 healthd: add register event interface
Facilitates registering events from external source files.

Add epoll events param to callbacks.

Change-Id: Icf8fb0c62af11453cbcc92877ff2c3bc03b9bb1b
2013-09-17 14:41:07 -07:00
jp abgrall
9256bd4670 am e6e5daac: am edeed28b: am 4a280e3d: Merge "Don\'t use control requests to read device serial numbers."
* commit 'e6e5daace55672b1ec8fb6c5c17a85ee1531f7ad':
  Don't use control requests to read device serial numbers.
2013-09-17 14:20:31 -07:00
jp abgrall
e6e5daace5 am edeed28b: am 4a280e3d: Merge "Don\'t use control requests to read device serial numbers."
* commit 'edeed28bd397f863686ba3e5bb7479f881efc657':
  Don't use control requests to read device serial numbers.
2013-09-17 14:17:44 -07:00
jp abgrall
edeed28bd3 am 4a280e3d: Merge "Don\'t use control requests to read device serial numbers."
* commit '4a280e3dbe002bb5419ec010f89cdc158244e435':
  Don't use control requests to read device serial numbers.
2013-09-17 14:16:42 -07:00
jp abgrall
4a280e3dbe Merge "Don't use control requests to read device serial numbers." 2013-09-17 21:15:12 +00:00
Todd Poynor
7b27f27d3d healthd: break link between BatteryMonitor and BatteryPropertiesRegistrar
Make it easier to later separate out binder-related code.

Add helper functions healthd_battery_update(), healthd_get_property() to
allow these operations without needing references to the BatteryMonitor
object.

Change-Id: Ie584bf53e5178ce0a098d0d940d6c311fdff62d4
2013-09-17 11:18:36 -07:00
Mark Wachsler
bd446c76f3 Don't use control requests to read device serial numbers.
Instead of sending control requests to all devices to read their serial
numbers, read the cached strings from sysfs. This fixes two problems:
1) The control requests sometimes timed out, causing devices to show up
as "????????????????", and 2) a control request could mess up devices
which were in the middle of being flashed.

Also enumerate by walking sysfs rather than devs so that we can avoid
opening host controller devices, which can be slow. On a system with 10
EHCI controllers, fastboot devices now takes 7 msec instead of 700 msec.

Change-Id: I2ad2d58b48268d7950bd279fd6a6753dc2f79514
2013-09-16 18:08:07 -04:00
Nick Kralevich
c2c5a2410a property_service: address comments from previous review.
Address post-submit comments from
6946361421

Bug: 10733330
Change-Id: I7c652f7ef0379536df48b9478a2362f1bfd252fe
2013-09-16 11:32:37 -07:00
Nick Kralevich
db3f6ef829 am b453a9aa: am 3a0d4b34: Merge "property_service: better validate property names" into klp-dev
* commit 'b453a9aa1d6f0b2ac624583938202983ad25673b':
  property_service: better validate property names
2013-09-16 10:34:21 -07:00
Nick Kralevich
b453a9aa1d am 3a0d4b34: Merge "property_service: better validate property names" into klp-dev
* commit '3a0d4b34816d65e21951f44e4d98a954c5c855ae':
  property_service: better validate property names
2013-09-16 10:31:12 -07:00
Nick Kralevich
3a0d4b3481 Merge "property_service: better validate property names" into klp-dev 2013-09-16 17:27:43 +00:00
Nick Kralevich
6946361421 property_service: better validate property names
Don't allow unexpected characters in property names.
Don't allow double dots in property names.

Bug: 10733330
Change-Id: I8d69740d697efb791f2f201f90989576e13bac81
2013-09-16 09:05:29 -07:00
Rom Lemarchand
f94c6be721 am 5c0e6410: am c0ce002a: Merge "Initial libmemtrack" into klp-dev
* commit '5c0e6410d04c60fba043a68ffc9ae58c302a32bd':
  Initial libmemtrack
2013-09-13 16:10:51 -07:00