Commit graph

26212 commits

Author SHA1 Message Date
Mark Salyzyn
67c52fa22e libcutils: add android_get_control_file() am: 0b034d9d7b am: c020d3fa6e
am: 13b832c9bf

Change-Id: If5dd2ecc231b45f0759dc471a6cb2b16b817f3b0
2016-11-04 14:56:27 +00:00
Mark Salyzyn
794fe7da48 libcutils: add android_get_control_socket() test am: 547e0dc45a am: 4ffdd5d805
am: c5e0f78e2a

Change-Id: Ia07b7b9305c6e05d0c4b1375a042190592034caf
2016-11-04 14:56:20 +00:00
Mark Salyzyn
13b832c9bf libcutils: add android_get_control_file() am: 0b034d9d7b
am: c020d3fa6e

Change-Id: I2ff8c32d00d2b19db2031c81e84c2c012b222685
2016-11-04 14:49:29 +00:00
Mark Salyzyn
c5e0f78e2a libcutils: add android_get_control_socket() test am: 547e0dc45a
am: 4ffdd5d805

Change-Id: Ia81161b3ffa791a0bcb5b38c30e205907e6cdd6e
2016-11-04 14:49:20 +00:00
Mark Salyzyn
c020d3fa6e libcutils: add android_get_control_file()
am: 0b034d9d7b

Change-Id: I7d0a58c12839dba59aa43b96e5a920d3c415efcf
2016-11-04 14:42:57 +00:00
Mark Salyzyn
4ffdd5d805 libcutils: add android_get_control_socket() test
am: 547e0dc45a

Change-Id: I34b70a4e1eba070ad58068a851047fe41680a973
2016-11-04 14:42:50 +00:00
Mark Salyzyn
884d3c8903 Merge "logd: switch to using arraysize() from libbase macros" am: fc08963f85 am: cb2314e5bd
am: 76cd9044eb

Change-Id: I9e7127b5afbffcbb98caa59c01fef50dd5af8006
2016-11-03 22:21:06 +00:00
Mark Salyzyn
76cd9044eb Merge "logd: switch to using arraysize() from libbase macros" am: fc08963f85
am: cb2314e5bd

Change-Id: I53e38186288dfe9f5ed12be997be99ab192c3a93
2016-11-03 22:17:32 +00:00
Mark Salyzyn
cb2314e5bd Merge "logd: switch to using arraysize() from libbase macros"
am: fc08963f85

Change-Id: If17fd9389ec65f379fa42096e835be2ed667f703
2016-11-03 22:14:34 +00:00
Treehugger Robot
fc08963f85 Merge "logd: switch to using arraysize() from libbase macros" 2016-11-03 22:07:42 +00:00
Mark Salyzyn
361464101b Merge changes Ifb1b550c,Ic7377efc am: 11f8b20068 am: 360cd76695
am: c6b19d743d

Change-Id: I52369d76de42ff930f22dbcfcb54994024436a06
2016-11-03 21:07:58 +00:00
Mark Salyzyn
a17e562108 liblog: test report pmsg not configured if ENOMEM return am: 5febc51318 am: cfd44772d7
am: f3f501dbfe

Change-Id: Ia43d868268929d026f6ead761d27a6c2869ef885
2016-11-03 21:07:51 +00:00
Mark Salyzyn
d09a812a5b logd: clear DUMPABLE am: 6a70ded7bf am: d1687af980
am: bf7818defc

Change-Id: I1a8645c0a04bea9cef40b8f704cd71bc7db43c1d
2016-11-03 21:07:45 +00:00
Mark Salyzyn
c6b19d743d Merge changes Ifb1b550c,Ic7377efc am: 11f8b20068
am: 360cd76695

Change-Id: I9c5f5a97718e43546c206c4a90e28adb1569602f
2016-11-03 21:04:55 +00:00
Mark Salyzyn
f3f501dbfe liblog: test report pmsg not configured if ENOMEM return am: 5febc51318
am: cfd44772d7

Change-Id: I3bb3684390b90c030f72a50ce9546b9a433d087b
2016-11-03 21:04:49 +00:00
Mark Salyzyn
bf7818defc logd: clear DUMPABLE am: 6a70ded7bf
am: d1687af980

Change-Id: Ibae1ae2b8251ae5ee65f32ad5859273ec29ec708
2016-11-03 21:04:44 +00:00
Mark Salyzyn
360cd76695 Merge changes Ifb1b550c,Ic7377efc
am: 11f8b20068

Change-Id: Ibd116625a10578c33c655eaae594610ce949fd23
2016-11-03 21:01:50 +00:00
Mark Salyzyn
cfd44772d7 liblog: test report pmsg not configured if ENOMEM return
am: 5febc51318

Change-Id: Ia7ff221bdcbf76b19e971ffde23706ad4a8840a8
2016-11-03 21:01:49 +00:00
Mark Salyzyn
d1687af980 logd: clear DUMPABLE
am: 6a70ded7bf

Change-Id: I4bcfb53d9c4a13761c80a8f2070320c85b486b0b
2016-11-03 21:01:45 +00:00
Mark Salyzyn
11f8b20068 Merge changes Ifb1b550c,Ic7377efc
* changes:
  liblog: test report pmsg not configured if ENOMEM return
  logd: clear DUMPABLE
2016-11-03 20:53:09 +00:00
Mark Salyzyn
0b034d9d7b libcutils: add android_get_control_file()
Solve one more issue where privilege is required to open a file and
we do not want to grant such to the service. This is the client side
of the picture, init is the server. The file's descriptor was placed
into the environment as "ANDROID_FILE_<path>" where non-alpha and
non-numeric characters in the <path> are replaced with _ and this
function picks the file descriptor up.

Added definition ANDROID_FILE_ENV_PREFIX ("ANDROID_FILE_") and
android_get_control_file() prototype in a new include <cutils/files.h>

android_get_control_file() checks if the resulting file descriptor is
valid, open and matches the name reference, which on purpose will fail
if a symbolic link is in the path rather than using a fully qualified
path.  Add gTest unit test for both.

Test: gTest libcutils_test --gtest_filter=FileTest.android_get_control_file
Bug: 32450474
Change-Id: I2d0310a1727f1e393a00d9fc7e6cf5d028f27905
2016-11-03 13:34:20 -07:00
Mark Salyzyn
547e0dc45a libcutils: add android_get_control_socket() test
android_get_control_socket() checks if the resulting file descriptor
is valid, open and matches the socket bound name reference, which on
purpose will fail if a symbolic link is in the path rather than using
a fully qualified path.  If there are any non-alpha and non-numeric
characters in the name, they are replaced with _.  Add unit test.

Test: gTest libcutils_test --gtest_filter=SocketTest.android_get_control_socket
Bug: 32450474
Change-Id: I27a6419012033ef8bd6ca04f3e479d01264d8c49
2016-11-03 13:34:13 -07:00
Mark Salyzyn
c8d3194098 logd: switch to using arraysize() from libbase macros
Test: logd-unit-tests, liblog-unit-tests & logcat-unit-tests
Bug: 32450474
Change-Id: Iacdc4677f2c83898a7812c2af2c36e7ff7d92764
2016-11-03 12:27:29 -07:00
Nick Kralevich
ab1413013f Merge "give zygote AID_READPROC" am: 3a724a8f5d am: d3a2573eea
am: 1af7e94c93

Change-Id: I8cfe782263e97ea98e577cd422ddeac9b7a70b22
2016-11-03 18:21:34 +00:00
Mark Salyzyn
5febc51318 liblog: test report pmsg not configured if ENOMEM return
NB: bionic stdio is broken when providing appropriate errno value(s)
    on failure so libc.__pstore_append will not report pmsg
    misconfigured correctly on android for now.

Test: misconfigured kernel, watch for this message in liblog-unit-tests
Change-Id: Ifb1b550c7d3a3888000459c2f68c392cc23c379f
2016-11-03 11:20:59 -07:00
Mark Salyzyn
6a70ded7bf logd: clear DUMPABLE
Do not allow anyone to see logd memory.

Test: gTest logd-unit-tests, liblog-unit-tests and logcat-unit-tests
Bug: 32450474
Change-Id: Ic7377efcb7e1d3cd91b50741061037a0fb589045
2016-11-03 11:20:59 -07:00
Nick Kralevich
1af7e94c93 Merge "give zygote AID_READPROC" am: 3a724a8f5d
am: d3a2573eea

Change-Id: I903806d31750a77451724f4ac198b7396e1aae94
2016-11-03 18:18:04 +00:00
Nick Kralevich
d3a2573eea Merge "give zygote AID_READPROC"
am: 3a724a8f5d

Change-Id: Ie877330cba17a429ec3cd26eafaaeca3df66cc59
2016-11-03 18:15:04 +00:00
Treehugger Robot
3a724a8f5d Merge "give zygote AID_READPROC" 2016-11-03 18:08:55 +00:00
Jin Qian
8fd0ce9bc9 Merge "Set file capabilities after writing file data" am: dd4e5ae943 am: c6fbcd7579
am: ded50a76f6

Change-Id: I00df0fa9dd75217c57ffe791bd39f788cc3c9d38
2016-11-03 17:35:30 +00:00
Jin Qian
ded50a76f6 Merge "Set file capabilities after writing file data" am: dd4e5ae943
am: c6fbcd7579

Change-Id: Ie1256b68bbf185b640791aac7cb3e5ea63dc1857
2016-11-03 17:32:30 +00:00
Jin Qian
c6fbcd7579 Merge "Set file capabilities after writing file data"
am: dd4e5ae943

Change-Id: I135c6ebf4fc9b11a7ed9798be1ce0a88862386a5
2016-11-03 17:29:31 +00:00
Treehugger Robot
dd4e5ae943 Merge "Set file capabilities after writing file data" 2016-11-03 17:25:43 +00:00
Robert Sesek
7f2acb02fa Merge "Add fs_config entries for the webview_zygote." am: 2260c09983 am: 0dad6acaba
am: 4552626a4f

Change-Id: Ib964eca412ce5ddd0374695832355ef3ed900ea2
2016-11-03 15:38:23 +00:00
Robert Sesek
4552626a4f Merge "Add fs_config entries for the webview_zygote." am: 2260c09983
am: 0dad6acaba

Change-Id: I1197f428e7d3cca04c2e34cbdfcc27c562346999
2016-11-03 15:35:23 +00:00
Robert Sesek
0dad6acaba Merge "Add fs_config entries for the webview_zygote."
am: 2260c09983

Change-Id: I4c4ae12dc5a0625a4e73905ff11e2d5461aec237
2016-11-03 15:32:23 +00:00
Treehugger Robot
2260c09983 Merge "Add fs_config entries for the webview_zygote." 2016-11-03 15:26:19 +00:00
Jin Qian
d0515e7165 Set file capabilities after writing file data
File capabilities will be cleared if we set them before writing file data.

Bug: 32543395

Change-Id: I88cc0a0ec23cd6fc6dbe86c93a76914809d7e5f9
2016-11-02 16:37:11 -07:00
Steven Moreland
0c54c1e8d6 Merge "Update for hidlized hwservicemanager." am: 480af3f633 am: 82c67f5662
am: b394786624

Change-Id: I0d57a9e186fd2f67656a10628afd86b320bae506
2016-11-02 22:33:20 +00:00
Steven Moreland
b394786624 Merge "Update for hidlized hwservicemanager." am: 480af3f633
am: 82c67f5662

Change-Id: If478e3fc58a44e69f731bc82f173bf9bd10a5f91
2016-11-02 22:27:34 +00:00
Steven Moreland
82c67f5662 Merge "Update for hidlized hwservicemanager."
am: 480af3f633

Change-Id: I2c11b0249ab77e9dc22a76f6aa66026ebf3ed00d
2016-11-02 22:23:56 +00:00
Treehugger Robot
480af3f633 Merge "Update for hidlized hwservicemanager." 2016-11-02 22:17:25 +00:00
Nick Kralevich
c21169c59f give zygote AID_READPROC
In zygote wrapping mode, ZygoteConnection does a check to see if the pid
reported by the wrapped process is either child process that was
forked, or a decendent of it. This requires read access to other
processes /proc files. Grant zygote AID_READPROC to allow this access.

Bug: 32610632
Test: manual inspection of /proc files to verify group.
Test: manual inspection of zygote's children to make sure they do not
      inherit AID_READPROC

Change-Id: I3619a9ae33c8077e068e8024f7c7d44cfca6fb76
2016-11-02 13:48:32 -07:00
Steven Moreland
ba825ac33f Update for hidlized hwservicemanager.
Bug: 32313592
Test: end to end
Change-Id: I76a7ee01413b28e95e9f19fcde90f6372502ec67
2016-11-02 13:29:34 -07:00
Dimitry Ivanov
57fe52c3f5 Merge "Return nullptr from FindNamespaceByClassLoader for NB-enabled apps." am: c54c533cf6 am: b870bbd69a
am: 011074f0da

Change-Id: I1c6874a3b11edbbd38e9b79d639e0c1557311996
2016-11-02 16:12:16 +00:00
Dimitry Ivanov
011074f0da Merge "Return nullptr from FindNamespaceByClassLoader for NB-enabled apps." am: c54c533cf6
am: b870bbd69a

Change-Id: I15d9d46071941e871e332ae5ab83fc4a3b73042c
2016-11-02 16:09:47 +00:00
Dimitry Ivanov
b870bbd69a Merge "Return nullptr from FindNamespaceByClassLoader for NB-enabled apps."
am: c54c533cf6

Change-Id: If1801f74a0a55e3cb526f1f00566d119d14da92a
2016-11-02 16:06:49 +00:00
Treehugger Robot
c54c533cf6 Merge "Return nullptr from FindNamespaceByClassLoader for NB-enabled apps." 2016-11-02 16:00:45 +00:00
Jorge Lucangeli Obes
9a9af0158e Merge "init: Add support for ambient capabilities." am: 043bc971f2 am: c406474c54
am: 5794ea38f4

Change-Id: Id0f0585862d6c05e7af25185baf9d46f108ccaf5
2016-11-02 15:58:28 +00:00
Jorge Lucangeli Obes
5794ea38f4 Merge "init: Add support for ambient capabilities." am: 043bc971f2
am: c406474c54

Change-Id: Ic10ad2ddc2e416eff46b5a43f517a1409e273c34
2016-11-02 15:55:57 +00:00