Commit graph

20530 commits

Author SHA1 Message Date
William Roberts
807fa4bd5c Merge \"ueventd: only relabel devices if there\'s a delta\"
am: 95428817d6

Change-Id: I610cc91cd0e3d9ce679b4c98e142bada0593d1a8
2016-06-09 19:12:41 +00:00
Treehugger Robot
95428817d6 Merge "ueventd: only relabel devices if there's a delta" 2016-06-09 19:07:27 +00:00
Mark Salyzyn
92b14b06f3 Merge \"Revert \"logcat: expand -n, -r and -b\"\"
am: 8c60f2dcfe

Change-Id: I585419935dd0322202bb8459b35491b437cfebd5
2016-06-08 22:58:15 +00:00
Mark Salyzyn
8c60f2dcfe Merge "Revert "logcat: expand -n, -r and -b"" 2016-06-08 22:54:28 +00:00
Tom Cherry
f6ee6e16d9 Merge \"init: expand arguments of services when they start\"
am: 86cd314af3

Change-Id: I1c6945f6bff4756a67557aecf8a1d1c7ad6f916d
2016-06-08 22:52:42 +00:00
Tom Cherry
86cd314af3 Merge "init: expand arguments of services when they start" 2016-06-08 22:42:11 +00:00
Vitalii Tomkiv
20cc2787cb Merge \"Add process priority to service definition.\"
am: 14b00baaae

Change-Id: I0b5cfdce32afdbc47c10a8df015671de1bcb6ada
2016-06-08 21:39:44 +00:00
Vitalii Tomkiv
14b00baaae Merge "Add process priority to service definition." 2016-06-08 21:33:40 +00:00
Vitalii Tomkiv
081705c258 Add process priority to service definition.
This change allows to set prioirrity of the process to be set through
*.rc file.

Bug: 28866384
Change-Id: If0108ef05c8a151749c43d2d7de1187653255ce8
2016-06-08 13:22:14 -07:00
Elliott Hughes
4e4a274e96 Merge \"Set file capabilities on adb sync/push.\"
am: a500cf9cdf

Change-Id: I07232bd6f7f01daa44a2d8d30efdadce1e6af67c
2016-06-08 17:23:53 +00:00
Treehugger Robot
a500cf9cdf Merge "Set file capabilities on adb sync/push." 2016-06-08 17:19:41 +00:00
Elliott Hughes
32c60b4ced Set file capabilities on adb sync/push.
Bug: http://b/29180022
Change-Id: Ia21ebf0972af41b0a3becc1189ed836fd74ae5c8
2016-06-08 09:16:28 -07:00
Mark Salyzyn
1325ebfab2 Revert "logcat: expand -n, -r and -b"
This reverts commit 33c262513f.

Bug: 28120456
Bug: 22654233
Change-Id: I2a13f009d9e08dc2389b9872e45e95e0563af22f
2016-06-08 08:22:19 -07:00
Elliott Hughes
b227e61c41 Merge \"Allow multiple (sequential) adb users on Linux.\"
am: 6bf8d26c82

Change-Id: I76e75478b738a2452db33faa4ab68844acb9415a
2016-06-08 14:32:52 +00:00
Elliott Hughes
6bf8d26c82 Merge "Allow multiple (sequential) adb users on Linux." 2016-06-08 14:24:59 +00:00
Elliott Hughes
d89a6c2285 Allow multiple (sequential) adb users on Linux.
Before this, adb will fail to start for the second user who tries because
/tmp/adb.log already exists and isn't writable by the second user.

Also allow $TMPDIR to override the use of /tmp.

Bug: https://code.google.com/p/android/issues/detail?id=211420
Change-Id: Ic53da981ac0fa45bfed62e7b351d75dca0540235
2016-06-07 14:53:21 -07:00
Mattias Nissler
6f29ec0197 Merge "fs_mgr: Remove incorrect free() on error paths in load_key()"
am: 35d84096e9

* commit '35d84096e9a53c2d38de92de99271a8a772c186d':
  fs_mgr: Remove incorrect free() on error paths in load_key()

Change-Id: I034339af90249da14ae0ea50f662563fa66f8221
2016-06-07 21:12:39 +00:00
Mattias Nissler
35d84096e9 Merge "fs_mgr: Remove incorrect free() on error paths in load_key()" 2016-06-07 21:00:03 +00:00
Dmitry Shmidt
776e6bb856 Merge "libnetutils: Add synchronization per socket full operation"
am: 04045fd4d1

* commit '04045fd4d144c8282c58e00571a708d39ba44081':
  libnetutils: Add synchronization per socket full operation

Change-Id: Ide321623e3135aab097a70ba95b5d6c8f1c0bb71
2016-06-07 20:42:13 +00:00
The Android Automerger
a6f1c46fa0 Manually fix automerger error on 4ab7548
* commit '4ab7548':
  init: Add support for ${x.y:-default} expansion
2016-06-07 20:39:36 +00:00
Treehugger Robot
04045fd4d1 Merge "libnetutils: Add synchronization per socket full operation" 2016-06-07 19:13:48 +00:00
Treehugger Robot
4ab7548406 Merge "init: Add support for ${x.y:-default} expansion" 2016-06-07 19:03:41 +00:00
Tom Cherry
bac3536cc9 init: expand arguments of services when they start
Arguments of commands are expanded based on properties if they contain
${property.name}, however this is not currently done for arguments of
services.

This patch makes it that arguments of services are expanded each time
that the service starts at the point immediately before execve().

Change-Id: Iba581a8377e25a6478d4d2ec2e8b29e181d8640c
2016-06-07 11:22:00 -07:00
Mark Salyzyn
4b56162a33 init: Add support for ${x.y:-default} expansion
commit 00ede7d262 (init: do
expand_props before calling the builtins) broke logpersist

Bug: 28120456
Bug: 22654233
Change-Id: Ib4d8231665b26ac083b02243177493fab41c8978
2016-06-07 18:09:17 +00:00
Dmitry Shmidt
4f831e2cfb libnetutils: Add synchronization per socket full operation
Take and release mutex between ifc_init() and ifc_close()
calls to prevent global ifc_ctl_sock override.

Bug: 22307208

(cherry-pick of cebcd450c6ca3de5106ef3d817d5b760f5d57fbe.)

Change-Id: Iacffd329ce2a51defa550c7e33277332045a7b9b
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2016-06-07 10:11:59 -07:00
Chuanxiao Dong
7f06a23414 Merge "fs_mgr: fix encryptable=footer support"
am: b67fed557f

* commit 'b67fed557f68714ba602ecbf3b4fa8bd06faf831':
  fs_mgr: fix encryptable=footer support

Change-Id: I4112bdfff301ffbcf172031a312cab9278b6ace4
2016-06-07 16:54:42 +00:00
Treehugger Robot
b67fed557f Merge "fs_mgr: fix encryptable=footer support" 2016-06-07 16:49:39 +00:00
Elliott Hughes
689b998ab2 Merge "Use alignas for alignment."
am: bb1e7977fb

* commit 'bb1e7977fbd4b0f156d40f78695e2ff53db200a1':
  Use alignas for alignment.

Change-Id: I49592b6c75825b9e094fa6755bb0ce281a30135c
2016-06-07 15:47:02 +00:00
Elliott Hughes
bb1e7977fb Merge "Use alignas for alignment." 2016-06-07 15:41:28 +00:00
Mattias Nissler
31404e58e9 fs_mgr: Remove incorrect free() on error paths in load_key()
This fixes a bug introduced by
https://android-review.googlesource.com/#/c/212781/ which would make
fs_mgr crash when hitting one of the error paths.

Bug: 28585197
Change-Id: I40e6612e2eb3e6f584e70c608afc6d4378d73c4f
2016-06-07 16:37:48 +02:00
Collin Mulliner
cea1d0465b Merge "use process groups for processes started by init"
am: ebe636e5ce

* commit 'ebe636e5ce57df4fd8a93304453a3de30b758104':
  use process groups for processes started by init

Change-Id: Id0368160918e80ce02c152ee96d71b2e77c542e7
2016-06-07 03:06:52 +00:00
Elliott Hughes
ebe636e5ce Merge "use process groups for processes started by init" 2016-06-07 03:03:07 +00:00
Elliott Hughes
5f4a946c09 Use alignas for alignment.
Change-Id: I427c407a188682a360c74b2bd5a44dd62551ea66
2016-06-06 19:59:45 -07:00
Collin Mulliner
f7e79b99c1 use process groups for processes started by init
Put every service into a process group, kill the process group
and all child processes created within the group when killing the
service. Removed libutil dependency in libprocessgroup.

Bug: 25355957
Change-Id: Ieed60ec41579f638ab9b1e66a7e6330ed578ab05
Signed-off-by: Collin Mulliner <collinrm@squareup.com>
2016-06-06 16:31:01 -07:00
David Pursell
5701c58296 Merge "adbd: properly close subprocess pipes on Ctrl+C."
am: 605628d325

* commit '605628d325b003251155b5c5b425028106bf8f29':
  adbd: properly close subprocess pipes on Ctrl+C.

Change-Id: I6eb8faa339a0a6506e21d5c74e5e9b8582e04735
2016-06-06 21:17:16 +00:00
David Pursell
605628d325 Merge "adbd: properly close subprocess pipes on Ctrl+C." 2016-06-06 21:06:11 +00:00
David Pursell
f2aa186c7b adbd: properly close subprocess pipes on Ctrl+C.
When non-interactive sessions exit via Ctrl+C, adbd sends SIGHUP
to the child process to let it know to exit. However, adbd was not
closing the pipes to the child process, so if the subprocess ignored
SIGHUP and continued writing it could fill up the pipe and block
forever while adbd waits for it to exit.

This CL adds the necessary calls to close the subprocess pipe after
sending SIGHUP.

Bug: 28981563
Change-Id: I318e322e563241052648361172f4859c297837fb
2016-06-06 09:59:34 -07:00
Elliott Hughes
ee915afa21 Merge "Remove toolbox ioctl."
am: 0fdd663262

* commit '0fdd663262ccaff2f6ac6459a5bd9abf76c2cb5f':
  Remove toolbox ioctl.

Change-Id: I0ed7e7383828619f3804263c18e657efdabf1cb2
2016-06-04 16:25:04 +00:00
Treehugger Robot
0fdd663262 Merge "Remove toolbox ioctl." 2016-06-04 16:14:39 +00:00
Elliott Hughes
1f406e270f Remove toolbox ioctl.
Let's remove this convenient tool for attacking buggy kernels and see if
anyone with a legitimate use notices. I suspect most potential legitimate
users write a short C program instead anyway.

Bug: http://b/29128170
Change-Id: I14e8b8594902951fe0b94c9ce13baa2c4d7b9e6e
2016-06-04 08:12:34 -07:00
Mark Salyzyn
b749a0c02f Merge "logpersist: switch to pgrep from ps"
am: 68285c0033

* commit '68285c00334af57d9077648fb408a34643514df5':
  logpersist: switch to pgrep from ps

Change-Id: I5a4142c91f152740003c733a1baca8f3318de259
2016-06-03 21:41:03 +00:00
Treehugger Robot
68285c0033 Merge "logpersist: switch to pgrep from ps" 2016-06-03 21:34:01 +00:00
Josh Gao
2a1f209245 Merge "cutils: don\'t fortify property_get on clang."
am: 310da0b990

* commit '310da0b9904d33d58315a974351375bbc663bf89':
  cutils: don't fortify property_get on clang.

Change-Id: I04a0ea55a5c5b04d3c2180915bd52a7d3b5a95f3
2016-06-03 19:38:27 +00:00
Treehugger Robot
310da0b990 Merge "cutils: don't fortify property_get on clang." 2016-06-03 19:29:12 +00:00
William Roberts
397de1494f ueventd: only relabel devices if there's a delta
Since commit: 24a3cbfa73
ueventd is attempting to relabel devices on calls to
make_device() when the device already exists. However, it
should only be called if the contexts for relabelfrom and
relabelto are different.

When this condition occurs, one will see denials like this:

[   14.409448] type=1400 audit(978307239.225:26): avc: denied { relabelfrom } for pid=1572 comm="ueventd" name="ttyS0" dev="tmpfs" ino=9613 scontext=u:r:ueventd:s0 tcontext=u:object_r:hci_attach_dev:s0 tclass=chr_file permissive=1
[   14.428107] type=1400 audit(978307239.225:27): avc: denied { relabelto } for pid=1572 comm="ueventd" name="ttyS0" dev="tmpfs" ino=9613 scontext=u:r:ueventd:s0 tcontext=u:object_r:hci_attach_dev:s0 tclass=chr_file permissive=1

Bug: 29106809

Change-Id: I2105b169206f0b26420f3c4b0ba5c49aeb98da92
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-06-03 17:40:18 +00:00
Josh Gao
74ebdf3c8e cutils: don't fortify property_get on clang.
clang doesn't do the frontend inlining/dead code elimination needed for
the fortified implementation to work. Therefore, turn it off.

Bug: http://b/28381737
Change-Id: Ie8dd970e3908b1daaa587ad2bd041e8f6e2089db
2016-06-02 15:29:11 -07:00
Mark Salyzyn
1d945119c0 logpersist: switch to pgrep from ps
Changes expected output from a line cut from the less than portable
ps output to reporting the pid of logcatd (uid=logd comm=logcat).
Preserve reporting an error code if logcatd did not start.

Bug: 29075536
Change-Id: I61aa0a4787d4594c415d2c7db5bbb0e512676bf8
2016-06-02 09:51:13 -07:00
Colin Cross
5806404e4d Merge "Remove deprecated Android.mk files"
am: ce5b4fee23

* commit 'ce5b4fee23924262c8b3763c71ac5d73625cded2':
  Remove deprecated Android.mk files

Change-Id: Ibf28ba59c997334cb7a0043b370873e3b3817377
2016-06-02 16:38:58 +00:00
Colin Cross
ce5b4fee23 Merge "Remove deprecated Android.mk files" 2016-06-02 16:31:42 +00:00
Dan Willemsen
6b5255722e Merge "Fix liblog logtags"
am: 59e6afc617

* commit '59e6afc617bf5ce341de4f3d0428c2b1a79879ee':
  Fix liblog logtags

Change-Id: I081aed7de6c8d4f038941d5baa8a5305207fddb0
2016-06-01 23:39:37 +00:00