Commit graph

12380 commits

Author SHA1 Message Date
Elliott Hughes
d4e71f154e am 5b253e55: am ef89e8d1: Merge "Revert "Remove netcfg\'s unused options.""
* commit '5b253e55e0ac4d6b935036c1e8aa5151caf09ccc':
  Revert "Remove netcfg's unused options."
2015-02-03 19:18:42 +00:00
Elliott Hughes
85ed30d881 am 1ddbd76b: am 67900498: Merge "Remove netcfg\'s unused options."
* commit '1ddbd76bd8eededb5d854dc588d3cef68cdc0c69':
  Remove netcfg's unused options.
2015-02-03 19:18:41 +00:00
Elliott Hughes
5b253e55e0 am ef89e8d1: Merge "Revert "Remove netcfg\'s unused options.""
* commit 'ef89e8d14619c68015103fd51ff75f82eeef8d61':
  Revert "Remove netcfg's unused options."
2015-02-03 19:16:42 +00:00
Elliott Hughes
1ddbd76bd8 am 67900498: Merge "Remove netcfg\'s unused options."
* commit '67900498cff54c8116b3f7afc84e046d98bb17e4':
  Remove netcfg's unused options.
2015-02-03 19:12:53 +00:00
Elliott Hughes
ef89e8d146 Merge "Revert "Remove netcfg's unused options."" 2015-02-03 19:08:01 +00:00
Elliott Hughes
ca77255c26 Revert "Remove netcfg's unused options."
This reverts commit 24c1885bc1.

Change-Id: Iaae6502e2db90d67b4275faa104cfc6a0abc65c6
2015-02-03 19:07:43 +00:00
Elliott Hughes
67900498cf Merge "Remove netcfg's unused options." 2015-02-03 19:01:21 +00:00
Greg Hartman
465f75f602 Put in line breaks when logging to klog
Change-Id: I0fd4d0a03d8c69e1ef2d8192f59893f4bda61691
2015-02-03 17:06:33 +00:00
Elliott Hughes
1fa9971ec3 am 2063f8e1: am c7a6e489: Merge "Trivial cleanup of recent changes."
* commit '2063f8e1014d63c83145b70f0cf6fb5d74787ac6':
  Trivial cleanup of recent changes.
2015-02-03 16:20:10 +00:00
Elliott Hughes
2063f8e101 am c7a6e489: Merge "Trivial cleanup of recent changes."
* commit 'c7a6e489f4b8c59a61784d8a982f04a1f3bd49da':
  Trivial cleanup of recent changes.
2015-02-03 16:16:48 +00:00
Elliott Hughes
c7a6e489f4 Merge "Trivial cleanup of recent changes." 2015-02-03 16:07:42 +00:00
Elliott Hughes
543bf4b624 am cf5ddf59: am b101f879: Merge "init: Implement \'exec\' command."
* commit 'cf5ddf5938ef9ec1ef71832a990e76d6d5441e54':
  init: Implement 'exec' command.
2015-02-03 00:51:38 +00:00
Elliott Hughes
61db8ca809 am 0feae044: am 46adfa69: Merge "init: Add support "&&" operator in property triggers"
* commit '0feae044f077bd32ba49ef074eacac7d1e704b8f':
  init: Add support "&&" operator in property triggers
2015-02-03 00:51:36 +00:00
Elliott Hughes
d3e37d14e7 Trivial cleanup of recent changes.
A typo in the documentation for one, and a couple of signed/unsigned warnings
in the implementation of the other.

Change-Id: I8fb4b7448ac901c543dea7420aabcedf13ec1bd8
2015-02-02 16:43:32 -08:00
Elliott Hughes
cf5ddf5938 am b101f879: Merge "init: Implement \'exec\' command."
* commit 'b101f8795a3d3d1c1f5c403bafec93f3d90d0360':
  init: Implement 'exec' command.
2015-02-03 00:36:43 +00:00
Elliott Hughes
0feae044f0 am 46adfa69: Merge "init: Add support "&&" operator in property triggers"
* commit '46adfa69b689bc9f9e15c87275839f233a404582':
  init: Add support "&&" operator in property triggers
2015-02-03 00:36:42 +00:00
Elliott Hughes
b101f8795a Merge "init: Implement 'exec' command." 2015-02-03 00:26:04 +00:00
San Mehat
429721c5c4 init: Implement 'exec' command.
(cherry-pick of d05ab3952ec0e38f33a0e80ce6b9eb45b0064ba4.)

Change-Id: Id6d9bb32e51a0ad090ed8240cc505dc45b57b35d
2015-02-02 16:22:56 -08:00
Elliott Hughes
46adfa69b6 Merge "init: Add support "&&" operator in property triggers" 2015-02-03 00:22:26 +00:00
Badhri Jagan Sridharan
0b41512a2e init: Add support "&&" operator in property triggers
"&&" 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

(cherry-pick of 162f7d797c67019a7a3f08c3b0f0ffc91d548ddc.)

Change-Id: I72c19f7aa92231372a416193618ee6c7fd368141
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
2015-02-02 16:21:05 -08:00
Nick Kralevich
6efa88c0c6 am 2e748d0b: am a73774e6: Merge "Add O_CLOEXEC to lots of open() calls."
* commit '2e748d0bc320ab50b80a37de78986c2da61eb26a':
  Add O_CLOEXEC to lots of open() calls.
2015-02-02 23:03:53 +00:00
Nick Kralevich
2e748d0bc3 am a73774e6: Merge "Add O_CLOEXEC to lots of open() calls."
* commit 'a73774e62e09c8e27039d3f8a5f1f842a0df740a':
  Add O_CLOEXEC to lots of open() calls.
2015-02-02 22:57:12 +00:00
Nick Kralevich
a73774e62e Merge "Add O_CLOEXEC to lots of open() calls." 2015-02-02 22:47:21 +00:00
Elliott Hughes
24c1885bc1 Remove netcfg's unused options.
Only "netcfg" for a list of interfaces and "netcfg <interface> dhcp" still
seem to be used.

Change-Id: Ie0aecf5b18bd854cfb5878b6cfdd7160c9f42526
2015-02-02 14:39:42 -08:00
Nick Kralevich
45a884f85f Add O_CLOEXEC to lots of open() calls.
and other related fixups.

Change-Id: Ia88fb37a07ff6777d00c49800081f5a519c0c78d
2015-02-02 14:37:22 -08:00
Nick Kralevich
411722378d am cdff10e3: am 520ca3e1: Merge "builtins.c: Don\'t require file open() for chmod/chown"
* commit 'cdff10e3838625e51d73ca182811d35bfb653c3d':
  builtins.c: Don't require file open() for chmod/chown
2015-02-02 22:17:40 +00:00
Nick Kralevich
cdff10e383 am 520ca3e1: Merge "builtins.c: Don\'t require file open() for chmod/chown"
* commit '520ca3e13a134386762c3fc754a8bc2e51af3c2f':
  builtins.c: Don't require file open() for chmod/chown
2015-02-02 22:10:52 +00:00
Nick Kralevich
520ca3e13a Merge "builtins.c: Don't require file open() for chmod/chown" 2015-02-02 22:03:52 +00:00
Nick Kralevich
bc60954fae builtins.c: Don't require file open() for chmod/chown
42a9349dc4 modified init's
builtin chmod, chown, and mkdir calls to avoid following
symlinks. This addressed a number of attacks we were seeing
at the time where poorly written init scripts were following
attacker supplied symlinks resulting in rooting vulnerabilities.

To avoid race conditions, the previous implementation only ran
fchown / fchmod on file descriptors opened with open(O_NOFOLLOW).
Unfortunately, unlike the normal "chown" or "chmod" calls, this
requires read or write access to the underlying file. This
isn't ideal, as opening some files may have side effects, or
init may not have permission to open certain files (such as when
SELinux is enabled).

Instead of using open(O_NOFOLLOW) + fchown(), use lchown() instead.
As before, the target of the symlink won't be modified by chown.
This also supports setting the ownership of symlinks.

Instead of using open(O_NOFOLLOW) + fchmod(), use
fchmodat(AT_SYMLINK_NOFOLLOW) instead. As before, the target of the
symlink won't be modified by chmod.

This change will continue to ensure that chown/chmod/mkdir doesn't
follow symlinks, without requiring init to open every file in
read-only or read-write mode.

This change depends on bionic commit I1eba0cdb2c509d9193ceecf28f13118188a3cfa7

Addresses the following mako/occam SELinux denial:

  audit(1422770408.951:6): avc:  denied  { write } for  pid=1 comm="init" name="smd7" dev="tmpfs" ino=7207 scontext=u:r:init:s0 tcontext=u:object_r:radio_device:s0 tclass=chr_file

Change-Id: I14fde956784d65c44e7aa91dd7eea9a004df3081
2015-02-02 13:45:21 -08:00
Elliott Hughes
b0e3c2faa9 am 5a2c2064: am 88342c99: Merge "The bsddroid project has been dead since 2010."
* commit '5a2c2064257870d5ab365bd7e03ae26ba5fdbbfd':
  The bsddroid project has been dead since 2010.
2015-02-02 19:55:07 +00:00
Elliott Hughes
5a2c206425 am 88342c99: Merge "The bsddroid project has been dead since 2010."
* commit '88342c99a1a8aa6a104ade72938f538d4469c7e3':
  The bsddroid project has been dead since 2010.
2015-02-02 19:44:38 +00:00
Dmitriy Ivanov
6458c0dc0a am bbbe9885: am 7cb19579: Merge "Add close_file flag to OpenArchiveFd()"
* commit 'bbbe988539a525e56809cc542876f63aef89fbac':
  Add close_file flag to OpenArchiveFd()
2015-02-02 19:32:02 +00:00
Elliott Hughes
88342c99a1 Merge "The bsddroid project has been dead since 2010." 2015-02-02 19:29:23 +00:00
Dmitriy Ivanov
bbbe988539 am 7cb19579: Merge "Add close_file flag to OpenArchiveFd()"
* commit '7cb19579bc22bf38e15b970f801f8065d629611d':
  Add close_file flag to OpenArchiveFd()
2015-02-02 19:14:17 +00:00
Dmitriy Ivanov
7cb19579bc Merge "Add close_file flag to OpenArchiveFd()" 2015-02-02 18:48:29 +00:00
Elliott Hughes
506aea4361 The bsddroid project has been dead since 2010.
And even if it wasn't, they should probably keep this stuff in their own
repository.

Change-Id: If9fa2e47ee2700098d8a99f6986f7e89fc6dfdf3
2015-01-31 11:24:14 -08:00
Nick Kralevich
07932da911 am e1f62802: am d07555db: Merge "ensure /data/tombstones exists on all Android devices"
* commit 'e1f62802f6bec8ecc89100a1bbbdc36b7d18985b':
  ensure /data/tombstones exists on all Android devices
2015-01-31 08:34:08 +00:00
Nick Kralevich
e1f62802f6 am d07555db: Merge "ensure /data/tombstones exists on all Android devices"
* commit 'd07555dba01d64011b0d611dd6d3b197b216c163':
  ensure /data/tombstones exists on all Android devices
2015-01-31 07:49:28 +00:00
Nick Kralevich
d07555dba0 Merge "ensure /data/tombstones exists on all Android devices" 2015-01-31 02:06:46 +00:00
Dmitriy Ivanov
40b52b2c88 Add close_file flag to OpenArchiveFd()
* We should be able to keep fd alive after CloseArchive()

Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1
2015-01-30 17:57:13 -08:00
Nick Kralevich
0359d778a5 ensure /data/tombstones exists on all Android devices
/data/tombstones is referenced by core platform code, but is not
guaranteed to exist on all Android devices. Move the directory
creation out of device specific files and into the core
init.rc file.

Bug: https://code.google.com/p/android/issues/detail?id=93207
Change-Id: I94ae5199a6a32c4fe555ca994fc4a8345e0c9690
2015-01-30 17:38:06 -08:00
Elliott Hughes
75ad8ce757 am 977e2339: am 6b1d8632: Merge "Add missing includes."
* commit '977e23397a8c7bc3b14c393664fcab05cd6267f6':
  Add missing includes.
2015-01-30 21:35:31 +00:00
Elliott Hughes
977e23397a am 6b1d8632: Merge "Add missing includes."
* commit '6b1d86322eb300e65539eadc24a65f76a49997b9':
  Add missing includes.
2015-01-30 21:22:09 +00:00
Elliott Hughes
6b1d86322e Merge "Add missing includes." 2015-01-30 06:24:20 +00:00
Elliott Hughes
3d74d7a739 Add missing includes.
Change-Id: Iaa130c0a7eb2cbc0c8486546e5b622661b6d9e23
2015-01-29 21:31:23 -08:00
Elliott Hughes
e3ddef9e96 am 3a8064c5: am 0114e124: Merge "Add ps --ppid."
* commit '3a8064c5cf4187c7c808bbdd5c2eeaee905dbead':
  Add ps --ppid.
2015-01-30 04:21:28 +00:00
Elliott Hughes
3a8064c5cf am 0114e124: Merge "Add ps --ppid."
* commit '0114e1243ad25cbb43dec33a3b0b267fe624fbfe':
  Add ps --ppid.
2015-01-30 04:17:01 +00:00
Elliott Hughes
0114e1243a Merge "Add ps --ppid." 2015-01-30 04:03:40 +00:00
Elliott Hughes
b5fc3132ee Add ps --ppid.
Needed for a libcore test.

Change-Id: Ia21ecf5f7bd8be7f1882d0014d7949d40f6841a5
2015-01-29 17:20:47 -08:00
Dan Albert
1283abaf69 am 73bdc3cd: am d170bb03: Merge "Remove fastbootd."
* commit '73bdc3cd42e5681b72d26d109354a2e5e007ed72':
  Remove fastbootd.
2015-01-29 23:11:13 +00:00