Commit graph

423 commits

Author SHA1 Message Date
JP Abgrall
8ac7c9f659 am 308f0f9b: am 95e69261: am ac568b8f: Merge "init: remove obsolete rle logo"
* commit '308f0f9bf2a82d9c1e02982f0e177f6b04545210':
  init: remove obsolete rle logo
2013-10-17 09:50:44 -07:00
JP Abgrall
308f0f9bf2 am 95e69261: am ac568b8f: Merge "init: remove obsolete rle logo"
* commit '95e69261b22cd57c795e96e5ac122f120113f819':
  init: remove obsolete rle logo
2013-10-17 09:46:10 -07:00
Marcin Chojnacki
50dc936964 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
2013-10-16 17:39:16 +02:00
Nick Kralevich
3a5a7c0e26 am aa4051dc: am 2f924ebe: am a94d2b39: Merge "Add a restorecon_recursive built-in command to init."
* commit 'aa4051dc4f90f987ba05269ce396d676571156e0':
  Add a restorecon_recursive built-in command to init.
2013-10-10 12:42:49 -07:00
Nick Kralevich
aa4051dc4f am 2f924ebe: am a94d2b39: Merge "Add a restorecon_recursive built-in command to init."
* commit '2f924ebe0b0891dba1996c246839427b23705018':
  Add a restorecon_recursive built-in command to init.
2013-10-10 12:38:44 -07:00
Stephen Smalley
726e8f7a8f Add a restorecon_recursive built-in command to init.
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>
2013-10-10 14:09:19 -04:00
Benoit Goby
adb88e20e4 am 4820022b: am 0b7d588d: am f2c4c4ad: Merge "init: Fix queue_all_property_triggers with nonexistent properties"
* commit '4820022b5edb0d19e268d836c25aa628b4378aba':
  init: Fix queue_all_property_triggers with nonexistent properties
2013-09-24 16:18:09 -07:00
Benoit Goby
4820022b5e am 0b7d588d: am f2c4c4ad: Merge "init: Fix queue_all_property_triggers with nonexistent properties"
* commit '0b7d588d531691904530ba57d772b31fb24ed343':
  init: Fix queue_all_property_triggers with nonexistent properties
2013-09-24 16:15:43 -07:00
Benoit Goby
d679e1b572 init: Fix queue_all_property_triggers with nonexistent properties
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
2013-09-24 15:20:34 -07: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
Colin Cross
36b39a97f3 Merge "init: Fix get_hardware_name() to cope with long /proc/cpuinfo output" 2013-09-18 21:38:33 +00: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
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
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
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
Dima Zavin
e4e7fef1bc am 5951a369: am b4819e4a: Merge "init: support longer command lines"
* commit '5951a3691eb0378ec65ea2e6a2e2fe77d24c5e55':
  init: support longer command lines
2013-09-13 09:42:10 -07:00
Andrew Boie
2e63e71f31 init: support longer command lines
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>
2013-09-09 13:11:34 -07:00
Colin Cross
d64df29699 am 9dd40e97: am d171b656: Merge "[GNSS] Add AID_GPS to property user white list"
* commit '9dd40e9756de23a25aaa9909c8d4055105621a76':
  [GNSS] Add AID_GPS to property user white list
2013-09-03 17:13:35 -07:00
Colin Cross
d171b65670 Merge "[GNSS] Add AID_GPS to property user white list" 2013-09-04 00:09:30 +00:00
Nick Kralevich
ae76f6dbcf init: call restorecon on /sys
Not all files on /sys are not getting labeled properly. Fix them.

Change-Id: I9dcff76354e7f50d41f1b6e702836cfbbc149278
2013-09-03 15:55:58 -07:00
Nick Kralevich
935bd3e315 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
b710ed21de .

Change-Id: I912583db8e6a0e9c63380de32ad8ffc47a8a440f
2013-09-03 15:55:00 -07:00
Nick Kralevich
56fa0ac6b6 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
2013-09-03 15:54:15 -07:00
Dima Zavin
c3c03f12ad am 28e52c81: am b35f68a6: Merge "init: load factory properties"
* commit '28e52c816d06d78fa823be2d310d9f4c25012c8f':
  init: load factory properties
2013-08-28 14:14:59 -07:00
Dima Zavin
b35f68a697 Merge "init: load factory properties" 2013-08-28 21:08:43 +00:00
Nicolas SUET
841859f79f [GNSS] Add AID_GPS to property user white list
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
2013-08-26 16:20:18 -04:00
Colin Cross
b69f863455 am 0cbaed42: am a8ba1f2f: Merge "Add support for socket security context specification."
* commit '0cbaed4211b514dd2aaa4d28f8936ba58e83c6a5':
  Add support for socket security context specification.
2013-08-23 18:40:12 -07:00
Colin Cross
a8ba1f2f0b Merge "Add support for socket security context specification." 2013-08-24 00:12:03 +00:00
Colin Cross
30caffc025 resolved conflicts for merge of a1af5cf6 to klp-dev-plus-aosp
Change-Id: I08e9898940f7cdd466469b76760807cc5d5c67e4
2013-08-23 14:39:39 -07:00
Stephen Smalley
8348d279c7 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>
2013-08-23 08:35:43 -04:00
Andrew Boie
3899f522f1 init: load factory properties
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>
2013-08-20 11:47:55 -07:00
Alex Klyubin
0d872d8bb4 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
2013-08-19 16:58:28 -07:00
Geremy Condra
d893e39d4f Merge "Add basic verity support to fs_mgr." 2013-08-07 18:20:33 +00:00
Geremy Condra
3ad3d1c4b5 Add basic verity support to fs_mgr.
This change adds a "verify" fs_mgr flag specifying that
the device in question should be verified.

Devices marked with this flag are expected to have a
footer immediately after their data containing all
the information needed to set up a verity instance.

Change-Id: I10101f2c3240228ee0932e3767fe35e673d2e720
2013-08-06 22:15:58 -07:00
Stephen Smalley
e2eb69db6d Handle policy reloads within ueventd rather than restarting it.
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>
2013-07-26 15:39:41 -04:00
Colin Cross
776751ad79 am 8c4b1539: am f9873987: am 5954ecb8: Merge "Allow more characters in partition name links"
* commit '8c4b153911e399f00fdf0ed4e39782d0d49396d6':
  Allow more characters in partition name links
2013-07-22 15:45:42 -07:00
Colin Cross
f987398723 am 5954ecb8: Merge "Allow more characters in partition name links"
* commit '5954ecb87b8c77425d8cc766c0cc798957a07a7d':
  Allow more characters in partition name links
2013-07-22 15:40:55 -07:00
Johan Redestig
93ca79b445 Allow more characters in partition name links
We have several partitions with underscores in their names
which would not be properly linked in:
/dev/block/platform/msm_sdcc.1/by-name/

With this change more characters (_-.) are allowed in
partition name links. Also, any other character is
replaced with '_' so the resulting link names have the
same length as the partition name.

Change-Id: I746566c03db98b10326c755692362d2c10e528ae
2013-07-18 10:06:01 +02:00
Nick Kralevich
f29c533c49 init: call restorecon on /sys
Not all files on /sys are not getting labeled properly. Fix them.

Change-Id: I9dcff76354e7f50d41f1b6e702836cfbbc149278
2013-07-15 13:10:02 -07:00
Ken Sumrall
a76baaabe5 Add swapon_all to init's builtin commands
For enabling swap devices found in the fstab file

Change-Id: Iec4fd4d208df3d7a161a90d95f8606e8b516334a
2013-07-09 18:42:09 -07:00
Nick Kralevich
4838aa1b7b 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
b710ed21de .

Change-Id: I912583db8e6a0e9c63380de32ad8ffc47a8a440f
2013-06-28 12:05:07 -07:00
Nick Kralevich
cbc76fcadb Merge "init: move SELinux into enforcing mode." 2013-06-25 21:08:56 +00:00
Nick Kralevich
b710ed21de 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
2013-06-25 11:23:29 -07:00
Colin Cross
25383a5da2 am 372d668a: am 39021a48: am 83ada447: Merge changes Ib54f39fd,I7e36edd8
* commit '372d668a279934ff3b2ec2f07a76fe2f351789d5':
  init: Retain traditional restart behavior for critical and oneshot services.
  init: Safely restart services to avoid race conditions.
2013-06-25 05:59:40 -07:00
Colin Cross
b1e3bb2798 am b1a9f8cf: resolved conflicts for merge of b6c60285 to stage-aosp-master
* commit 'b1a9f8cf4b15a861ab998a4c5f0c69068f22c62a':
  init: move initial property area allocation into bionic
  property_service: make /dev/__properties__ readable
2013-06-24 17:22:56 -07:00
Colin Cross
b1a9f8cf4b resolved conflicts for merge of b6c60285 to stage-aosp-master
Change-Id: I5afba55b668065499fa28369cf217d4f5eafab4a
2013-06-24 17:19:43 -07:00
Colin Cross
b6c6028594 Merge changes Ieb94caab,I762da21e
* changes:
  init: move initial property area allocation into bionic
  property_service: make /dev/__properties__ readable
2013-06-25 00:07:54 +00:00
Colin Cross
372d668a27 am 39021a48: am 83ada447: Merge changes Ib54f39fd,I7e36edd8
* commit '39021a48a0e0687c654423acd5a4c99a1d79440d':
  init: Retain traditional restart behavior for critical and oneshot services.
  init: Safely restart services to avoid race conditions.
2013-06-24 15:27:43 -07:00