Commit graph

764 commits

Author SHA1 Message Date
Mark Salyzyn
325aa70591 libcutils: fs_config.c beautification
surfaceflinger has an odd indent and wrap.

SideEffects: None
Test: compile
Change-Id: I5183ab200dbcd13efb0727cb91db5b12018ae804
2016-11-04 14:12:31 -07:00
Mark Salyzyn
d32e7f4703 Merge "libcutils: sockets_test breaks MAC build"
am: 8d339e940f

Change-Id: I4dbc000a63c45f82a32012629eec855c60c17b5a
2016-11-04 19:51:07 +00:00
Mark Salyzyn
44ba139bba libcutils: sockets_test breaks MAC build
- Neuter SOCK_NONBLOCK and SOCK_CLOEXEC if they are not defined.
- F_SETFL O_NONBLOCK after socket() call.
- Correct environment reference (we recently changed handler to
  replace non-ascii and non-numericals with '_' for env tag).

Test: libcutils_test32 --gtest_filter=SocketsTest.android_get_control_socket
Bug: 32450474
Change-Id: I409a8c2c78e5f057af5fd6251cbd8657018be22b
2016-11-04 12:27:43 -07:00
Mark Salyzyn
db9ad76576 libcutils: klog inherit android_get_control_file("/dev/kmsg")
am: c377843258

Change-Id: Ic520e605639c879b7bf9f5e5bab8e526c69df395
2016-11-04 14:43:42 +00:00
Mark Salyzyn
4109c433f1 logd: set executable's capabilities in file system
am: 0d2a1dcb49

Change-Id: Icb3fb18ee96be0ae250be153a1600eb4e8cd8408
2016-11-04 14:43:12 +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
c377843258 libcutils: klog inherit android_get_control_file("/dev/kmsg")
If the file descriptor is in the environment, use it.

Test: compile
Bug: 32450474
Change-Id: Id208b11b727a44dc861a141130a644d7d8009c5f
2016-11-03 13:34:27 -07:00
Mark Salyzyn
0d2a1dcb49 logd: set executable's capabilities in file system
Add CAP_SYSLOG, CAP_AUDIT_CONTROL and CAP_SETGID, set
uid and gid to AID_LOGD, and permissions user and group
read and execute only.

Fix up indents for in table for clarity.

Test: gTest logd-unit-tests, liblog-unit-tests and logcat-unit-tests
      Manually inspect owner and group for /system/bin/logd
Bug: 32450474
Change-Id: I5183ab200dbcd13efb0727cb91db5b12018ae804
2016-11-03 13:34:27 -07: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
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
Robert Sesek
a2ceaf6b8b Add fs_config entries for the webview_zygote.
The webview_zygote is a non-root zygote process that creates isolated_app
children for rendering web content. It needs:
- CAP_SETUID and CAP_SETGID to change the UID of the new child process.
- CAP_SETPCAP to clear the capability bounding set after forking.

Test: m
Test: angler boots

Bug: 21643067
Change-Id: I986fa04be54e812f5dd2afa14e5d2d3e474e2b10
2016-10-31 10:33:36 -04:00
Roshan Pius
c8356e5ca7 Merge "Rename 'wifi_legacy_hal' to 'android.hardware.wifi@1.0-service'"
am: 4376d21e7f

Change-Id: I2e187e4374fba232f0641c2fb447a281e507e216
2016-10-25 23:30:07 +00:00
Roshan Pius
f6ac81ea4d Rename 'wifi_legacy_hal' to 'android.hardware.wifi@1.0-service'
Add netlink permissions for the new wifi HAL daemon name.

Bug: 31821133
Test: Compiled and ensured that the permission denials are no longer
present in logs.

Change-Id: If939df4760d9f7e85f0f134617d3a79030e09347
2016-10-24 09:30:10 -07:00
Mark Salyzyn
8a7297a09f Merge "system/core: preparation to pull back interfaces from android/log.h"
am: 27d2d49f48

Change-Id: I604bb1d4cf62636663fa92e3d14a55887dbcae23
2016-10-20 18:03:57 +00:00
Mark Salyzyn
cfd5b080af system/core: preparation to pull back interfaces from android/log.h
Point to log/log.h where necessary, define LOG_TAG where necessary.
Accept that private/android_logger.h is suitable replacement for
log/logger.h and android/log.h.

Correct liblog/README

Effectively a cleanup and controlled select revert of
'system/core: drop or replace log/logger.h' and
'system/core: Replace log/log.h with android/log.h'.

Test: compile
Bug: 30465923
Change-Id: Ic2ad157bad6f5efe2c6af293a73bb753300b17a2
2016-10-20 08:11:39 -07:00
Mark Salyzyn
f43c324ce1 libcutils: use __android_log_is_debuggable()
am: b5aa4e7125

Change-Id: Ifd6eafdcaf348fe64e88341cb5c511d28a390e15
2016-10-18 16:46:02 +00:00
Treehugger Robot
c1f74ca5aa Merge changes Ibf4774f7,I6568eea0,I35e83679,I9faf8826,I8ee9d999
* changes:
  fs_mgr: use __android_log_is_debuggable()
  adb: use __android_log_is_debuggable()
  debuggerd: use __android_log_is_debuggable()
  logd: use __android_log_is_debuggable()
  libcutils: use __android_log_is_debuggable()
2016-10-18 16:33:28 +00:00
Elliott Hughes
091113ec6c Merge "Remove socket_loopback_client."
am: 5171bebf41

Change-Id: I28080f043ba5a042573e81a6da3f5be83c7a4251
2016-10-14 20:37:06 +00:00
Treehugger Robot
5171bebf41 Merge "Remove socket_loopback_client." 2016-10-14 18:21:38 +00:00
Mark Salyzyn
b5aa4e7125 libcutils: use __android_log_is_debuggable()
Test: compile and boot smoke test
Bug: 27566046
Bug: 31456426
Change-Id: I8ee9d999a2e6a0336e45b6180ce6fd7975c113dc
2016-10-14 08:04:19 -07:00
Elliott Hughes
19340be9fe Merge "Rely on the platform -std default." am: 955648a915 am: 4594f50635
am: f1dffe0501

Change-Id: Ibbffb45d50ad038d55a4d435a250b59b64547227
2016-10-14 02:56:09 +00:00
Treehugger Robot
955648a915 Merge "Rely on the platform -std default." 2016-10-14 02:28:38 +00:00
Tao Wu
4b9774fe97 Merge "Fallback to IPv6 when IPv4 is not available in adb" am: c32d7fd66f am: 5b7c6772b0
am: 27c6c4cf04

Change-Id: I2ceb40b4589dfc2721197065ae5a85e9dc83b907
2016-10-14 01:51:54 +00:00
Treehugger Robot
c32d7fd66f Merge "Fallback to IPv6 when IPv4 is not available in adb" 2016-10-14 01:35:43 +00:00
Elliott Hughes
dd92a0a812 Remove socket_loopback_client.
Bug: http://b/31537253
Test: builds
Change-Id: If02c8107206fb60e4622f8937bee0d0a362e1c7d
2016-10-13 16:51:46 -07:00
Chia-I Wu
7e671b343f Merge "Add native_handle_init" am: d790aae4bc am: 28423b86fe
am: bf72cf21dc

Change-Id: I5d4cc013421350dd30fa13d168112d30ad93e7cd
2016-10-13 22:32:57 +00:00
Chia-I Wu
d790aae4bc Merge "Add native_handle_init" 2016-10-13 22:18:11 +00:00
Tao Wu
7b700763f5 Fallback to IPv6 when IPv4 is not available in adb
Test: manual - make sure it works in both IPv4/IPv6 env.
BUG: 31537253
Change-Id: Ica492bff34a8c0441516a213d0e8b78fcdfd3282
Signed-off-by: Tao Wu <lepton@google.com>
2016-10-13 08:54:43 -07:00
Elliott Hughes
fc485e4488 Merge "Start retiring socket_loopback_client." am: 58f7f61266 am: cd0e8cfd33
am: aa509a3e9d

Change-Id: Iea3a25f193b9249ba93d49514b2a409d693121e1
2016-10-13 15:00:24 +00:00
Elliott Hughes
58f7f61266 Merge "Start retiring socket_loopback_client." 2016-10-13 14:38:48 +00:00
Chia-I Wu
b843791b61 Add native_handle_init
HIDL requires file descriptors to be wrapped in native_handle_t.  We want
a low overhead way to do that when the number of file descriptors is known
at compile time.  Instead of

  // wrap an fd in native_handle_t
  native_handle_t* fd_handle = native_handle_create(1, 0);
  if (!fd_handle) {
    // clean up and return error
  }
  fd_handle->data[0] = fd;

  hidl_cb(..., fd_handle);

  native_handle_delete(fd_handle);

this change adds native_handle_init to allow for

  // wrap an fd in native_handle_t
  NATIVE_HANDLE_DECLARE_STORAGE(fd_storage, 1, 0);
  native_handle_t* fd_handle = native_handle_init(fd_storage, 1, 0);
  fd_handle->data[0] = fd;

  hidl_cb(..., fd_handle);

Test: make libcutils
Bug: 32021609
Change-Id: If1fd07482243d37492fdea57c602a1b13c8953cc
2016-10-12 18:04:41 -07:00
Elliott Hughes
139b372fab Start retiring socket_loopback_client.
Bug: http://b/31537253
Test: can still talk to adb
Change-Id: Icfd7f00d35cf963befc139e81904790b4b8b67c0
2016-10-11 13:45:03 -07:00
Elliott Hughes
36e0d390a2 Rely on the platform -std default.
Bug: http://b/32019064
Test: builds
Change-Id: I18a1d816d63b64601485045070851f32d44e85eb
2016-10-10 14:31:12 -07:00
Dimitry Ivanov
8a4e8bba64 Merge "Revert "Revert "Revert "Revert "Remove liblog from libcutils as a whole static lib""""" am: afda14e61d am: a46dfe2306
am: d1f924f663

Change-Id: I1303ec146eb71fb7111f31c5d87e4268a875e77a
2016-10-08 08:05:52 +00:00
Dimitry Ivanov
afda14e61d Merge "Revert "Revert "Revert "Revert "Remove liblog from libcutils as a whole static lib""""" 2016-10-08 07:51:33 +00:00
Chia-I Wu
ebebf0198d Merge "Add native_handle_clone" am: e8f6c7398b am: 462e087e40
am: cb52dc258e

Change-Id: I011555d429120a26e61fbce5f7a125ce96fadb3f
2016-10-08 01:39:01 +00:00
Chia-I Wu
e8f6c7398b Merge "Add native_handle_clone" 2016-10-08 01:25:35 +00:00
Dimitry Ivanov
625484ddfa Revert "Revert "Revert "Revert "Remove liblog from libcutils as a whole static lib""""
This reverts commit 6a452917b3.

Bug: http://b/31289077
Bug: http://b/27171986
Change-Id: Id020fa10c50847bf16a2fcbc7d5e72cf8766b711
2016-10-07 18:43:37 +00:00
John Reck
5e106e0da8 Merge "Revert "Revert "Revert "Remove liblog from libcutils as a whole static lib"""" am: b02a355d10 am: 8e7fa9fb7e
am: 7e86b688cb

Change-Id: I90d8fc3b22fc59b04532fba6418b73ad8af998e3
2016-10-07 16:46:29 +00:00
John Reck
b02a355d10 Merge "Revert "Revert "Revert "Remove liblog from libcutils as a whole static lib"""" 2016-10-07 16:32:38 +00:00
John Reck
6a452917b3 Revert "Revert "Revert "Remove liblog from libcutils as a whole static lib"""
This reverts commit 595c1480d0.

Revert reason: broke bullhead-eng build in master

Change-Id: Ie64fc31c3c971366ab9f2543b91b8f5d2040868b
2016-10-07 16:22:38 +00:00
Dimitry Ivanov
674e2a3c00 Merge "Revert "Revert "Remove liblog from libcutils as a whole static lib""" am: 8949696d33 am: e89ec3c4e0
am: 54be582396

Change-Id: I73c8bdff9d4d804b6c259d1beab0fe9a442a741a
2016-10-06 14:26:59 +00:00
Treehugger Robot
8949696d33 Merge "Revert "Revert "Remove liblog from libcutils as a whole static lib""" 2016-10-06 14:20:41 +00:00
Dimitry Ivanov
595c1480d0 Revert "Revert "Remove liblog from libcutils as a whole static lib""
This reverts commit f93d732a45.

Bug: http://b/31289077
Bug: http://b/27171986
Change-Id: Ib6e6c0a01296f0a01d98cbf1a9d2659883280d44
2016-10-06 12:47:07 +00:00
Dimitry Ivanov
897fa44319 Merge "Revert "Remove liblog from libcutils as a whole static lib"" am: d4446ccce8 am: 3e5bb6dc6e
am: 1814d808f3

Change-Id: If6507fc771cce958f0cbfe7ecc18407826494326
2016-10-03 22:33:41 +00:00
Dimitry Ivanov
d4446ccce8 Merge "Revert "Remove liblog from libcutils as a whole static lib"" 2016-10-03 22:21:19 +00:00
Dimitry Ivanov
f93d732a45 Revert "Remove liblog from libcutils as a whole static lib"
This reverts commit 6dd58c00ca.

Bug: http://b/31289077
Bug: http://b/27171986
Change-Id: I519d77de118f02346a4f89b197ca4df7e9f883ac
2016-10-03 22:18:49 +00:00
Dimitry Ivanov
17c88c7743 Merge "Remove liblog from libcutils as a whole static lib" am: dd01f980e5 am: 7e06b19328
am: e9f4c175f3

Change-Id: I3b71d2aeb0591937a3ee974fb5fdaa868c03bd29
2016-10-03 18:47:14 +00:00
Dimitry Ivanov
dd01f980e5 Merge "Remove liblog from libcutils as a whole static lib" 2016-10-03 18:26:45 +00:00
Dimitry Ivanov
6dd58c00ca Remove liblog from libcutils as a whole static lib
libcutils no longer needs to export liblog symbols.

Bug: http://b/31289077
Bug: http://b/27171986
Test: make
Change-Id: I546a5bce56c0c88ac2493c320298d4dc13954566
2016-10-03 03:07:13 -07:00
Mark Salyzyn
9f6b98dec0 system/core Replace log/log.h with android/log.h am: ff2dcd9af9 am: cac331afd9
am: 0308b0eabd

Change-Id: I4d631d53b4fc27e1a02d412bae21fffad6635258
2016-09-30 22:18:18 +00:00
Mark Salyzyn
9bb1f2f915 libcutils: Replace cutils/log.h with android/log.h am: 23ed4c242a am: f56fce0240
am: 9fd2eaf827

Change-Id: If01fd686fc15aaf74b6f06b7e661eb46e127d51b
2016-09-30 22:17:30 +00:00
Mark Salyzyn
ff2dcd9af9 system/core Replace log/log.h with android/log.h
Should use android/log.h instead of log/log.h as a good example
to all others.  Adjust header order to comply with Android Coding
standards.

Test: Compile
Bug: 26552300
Bug: 31289077
Change-Id: I33a8fb4e754d2dc4754d335660c450e0a67190fc
2016-09-30 12:47:05 -07:00
Mark Salyzyn
23ed4c242a libcutils: Replace cutils/log.h with android/log.h
Replace references to cutils/log.h and log/log.h with android/log.h.
Point cutils/log.h to android/log.h. Adjust header order to comply
with Android Coding standards.

Test: Compile
Bug: 26552300
Bug: 31289077
Change-Id: I4b00c0dff3a0a50cbb54301fdc5a6c29c21dab65
2016-09-30 12:47:05 -07:00
Connor O'Brien
6d72798094 Merge "Add basic tests for ashmem" am: a2d4a6b598 am: 46d2e20ba6
am: 90ad05af85

Change-Id: Ia297292d33b626b8e0aaf87e32e206cd77558ebe
2016-09-29 22:17:41 +00:00
Connor O'Brien
a2d4a6b598 Merge "Add basic tests for ashmem" 2016-09-29 21:32:02 +00:00
Chia-I Wu
fd3ea3d118 Add native_handle_clone
libhwbinder's Parcel::readNativeHandleNoDup returns a temporary
native_handle_t.  We want a way to save the temporary handle for later
use.

Change-Id: I16f32043aa8b7d2c0aa57d67551500259b411410
2016-09-26 21:59:04 +08:00
Colin Cross
8e3427fb04 Merge "Move android_get_control_socket out of line" am: 4b5abcdba2 am: 4873829953
am: ea2b61c7a8

Change-Id: Ib406546b998d6d525829f0023a5f693c2e1dfd6c
2016-09-23 21:00:41 +00:00
Colin Cross
e8ffa449fd Move android_get_control_socket out of line
android_get_control_socket has a warning from the implicit cast from
long to int.  The warning was being hidden because cutils/sockets.h was
included with -isystem.  Move android_get_control_socket to sockets.cpp,
since we don't want header only dependencies anyways, and fix the
warning with a range check and a static_cast.

Bug: 31492149
Test: m -j <module that uses sockets.h and -Wall>
Change-Id: I1f394ab26d4ec8a7dd0e7907c10416d7f8647624
2016-09-23 11:26:08 -07:00
Mitchell Wills
a0a91241af Merge "Give wifi_hal_legacy access to netlink" am: 6fc7eaaad0 am: c3d7cb95cc
am: 9fef925542

Change-Id: I3e4439c4a873284d7dce3cab7c564d2c8c2991df
2016-09-23 16:37:01 +00:00
Treehugger Robot
6fc7eaaad0 Merge "Give wifi_hal_legacy access to netlink" 2016-09-23 16:27:41 +00:00
Tao Wu
485153bf44 Merge "We should break from loop after getting connected." am: 53171e5f97 am: 646a70b1fb
am: 298571ec19

Change-Id: I16093f42b297abdd94e97cd26219d86d4a465f09
2016-09-22 22:53:25 +00:00
Colin Cross
7673c4dc88 Merge "Hide warning in cutils/trace.h" am: 5cf3db6d2b am: a802e570b3
am: 06ec4b1352

Change-Id: If41d5b551ffe237922f4768cf403cadf7ee15887
2016-09-22 09:15:21 +00:00
Treehugger Robot
53171e5f97 Merge "We should break from loop after getting connected." 2016-09-22 06:41:49 +00:00
Tao Wu
9b7341fe57 We should break from loop after getting connected.
Now it always connects to multiple address of same host and just
return one socket while other sockets get leaked.

Also, it cause trouble on machine with dual stack.
adb connect localhost:* just connect to IPv4 and IPv6 at same time
and finally it doesn't work since emulator can only handle one adb
connection.

To test this, start an emulator with non-standar port and killall adb
daemon on linux work station and then do following test.

Test: adb connect localhost:12345;lsof -n -p `pgrep adb`
Change-Id: I1e0f6824efc1db8e179377de068e3b5535aff3f7
2016-09-21 19:45:54 -07:00
Colin Cross
9993e799f1 Hide warning in cutils/trace.h
system/core/include is included in the global include path using
-isystem, which hides all warnings.  cutils/trace.h has an ignored
return value warning, move the implementation to trace-dev.c so it
doesn't cause warnings in every module that includes it in preparation
for moving from -isystem to -I.

Test: m -j native
Bug: 31492149
Change-Id: If8b3fe13059c9e59c2d5208294d427d84fa6e588
2016-09-21 17:45:31 -07:00
Connor O'Brien
a963ae87b9 Add basic tests for ashmem
Test: CL only adds tests. Ran them to confirm they pass.
Change-Id: Iccc3edaeeabff27f23b3786c3d40b2eb5b02dc83
Signed-off-by: Connor O'Brien <connoro@google.com>
2016-09-20 16:17:24 -07:00
Mitchell Wills
d44d3b526a Give wifi_hal_legacy access to netlink
Bug: 31352200
Change-Id: I02bbbbc2be028b482d5c3d3e903ed2c9addebd77
2016-09-13 15:46:35 -07:00
Christopher Wiley
6f8e12e6fc Tag hostapd binary with CAP_NET_ADMIN | CAP_NET_RAW
Bug: 30041118
Change-Id: I14d1fd601fc4bce12c563a2004e91bd8ba0f42c3
Test: hostapd can start as the wifi user with these capabilities.
(cherry picked from commit 2502490178)
(cherry picked from commit a76088362e)
2016-09-07 13:30:23 -07:00
Josh Gao
ccccbeca43 Merge "libcutils: try all addresses in socket_network_client_timeout." am: f3d43032d2 am: b7011e0410
am: 03da262702

Change-Id: I59153454f926ce0bcb68b2c5774f275cbc7db3bd
2016-09-02 00:59:06 +00:00
Josh Gao
b7011e0410 Merge "libcutils: try all addresses in socket_network_client_timeout."
am: f3d43032d2

Change-Id: I373ce6f43a7164754930c62c7fe249ed6530cfd0
2016-09-02 00:52:38 +00:00
Josh Gao
78cc20f007 libcutils: try all addresses in socket_network_client_timeout.
If a connection fails to an address that resolves to multiple
sockaddrs, attempt connecting to subsequent addresses if the initial
connection fails to a reason other than timeout. This is primarily
useful for localhost, which can resolve to both an IPv4 and and IPv6
address.

Also, add an adb test to verify that this behavior.

Bug: http://b/30313466
Change-Id: Ib2df706a66cf6ef8c1097fdfd7aedb69b8df2d6e
Test: python test_adb.py (+ the test fails before this patch)
2016-09-01 15:56:58 -07:00
John Reck
4409555732 Merge "Fix access check" am: 87ef739dba am: 9cbbe2d9df
am: cf2f39d7de

Change-Id: I37d1d5c616a6a68751a63e05fdf6c0199b0fd671
2016-08-30 01:31:17 +00:00
Mitchell Wills
e551125cfa Merge commit '5a33ad4d5210346a4a4c11af7ffbc82e0cffa53c' into manual_merge_5a33ad4
Change-Id: I873555a7284323e6ca839cf4982f9d07f49a5f4e
2016-08-29 18:13:09 -07:00
John Reck
9cbbe2d9df Merge "Fix access check"
am: 87ef739dba

Change-Id: Iee618c55186988f79e926a34cd7692f1d01a7f99
2016-08-29 22:28:56 +00:00
John Reck
2e336b1da1 Fix access check
Fixes a bug where USE_CPUSET used access(F_OK)
as a sign that it should try writing to the cpuset
path. It needs to instead use access(W_OK) to
ensure that it has write access as that's what
it would try to open() with.

And stop trying to repeatedly open a file that
doesn't exist.

Change-Id: Ib391ee6f08345051c48a986a732eda30143cb614
2016-08-26 14:05:03 -07:00
Christopher Wiley
a76088362e Tag hostapd binary with CAP_NET_ADMIN | CAP_NET_RAW
Bug: 30041118
Change-Id: I14d1fd601fc4bce12c563a2004e91bd8ba0f42c3
Test: hostapd can start as the wifi user with these capabilities.
(cherry picked from commit 2502490178)
2016-08-26 13:13:39 -07:00
Mark Salyzyn
8e5cb037c4 Merge "libcutils: Add ashmem_valid() function" am: d00c7470ea am: 8b1f7b595c
am: da07f7880c

Change-Id: I3a4cf9a2cd848aae04ec3e88ae1e50a51774cd5f
2016-08-24 15:54:08 +00:00
Mark Salyzyn
8b1f7b595c Merge "libcutils: Add ashmem_valid() function"
am: d00c7470ea

Change-Id: Ib09d3ee7bb131c30f59ea273f357c045394206fb
2016-08-24 15:48:55 +00:00
Mark Salyzyn
ee431112ff libcutils: Add ashmem_valid() function
Bug: 30310689
Change-Id: I14c52c5d52745a725799652b87c86281ac214899
2016-08-23 15:29:28 -07:00
Dmitriy Filchenko
ceca7afbc7 Merge "Remove process_name.c" am: e5b7ad1c39 am: 97e3cb7074
am: de9e6fb4b0

Change-Id: I402ab55567532786d61412e7c567e2da5fbc800b
2016-08-19 01:36:31 +00:00
Dmitriy Filchenko
97e3cb7074 Merge "Remove process_name.c"
am: e5b7ad1c39

Change-Id: I8f98f5fe9ff526ed8780971eddef128ed46de271
2016-08-19 01:30:34 +00:00
Dmitriy Filchenko
1bb49f483b Remove process_name.c
BUG: 29824203

Change-Id: I88d67cafb8ec0c4eea3db047bac0671de698ba02
2016-08-18 23:54:46 +00:00
Greg Hackmann
7b6aacbe4b Merge "libcutils: add sched_policy test" am: 5f851752d3 am: 9d963a2b20
am: ac8e16d6c6

Change-Id: I5f71544ae5662cbbd4fb621def74e522af6d9480
2016-08-04 16:37:05 +00:00
Greg Hackmann
9d963a2b20 Merge "libcutils: add sched_policy test"
am: 5f851752d3

Change-Id: If3f9f573303b0485582d7090afb6ecbbdca73a4f
2016-08-04 16:32:00 +00:00
Treehugger Robot
5f851752d3 Merge "libcutils: add sched_policy test" 2016-08-04 16:24:30 +00:00
Elliott Hughes
c4f153e97b Merge "Remove the prctl PR_SET_TIMERSLACK_PID call." am: b3654fa086 am: fb7e8a0088
am: a9638e7ff6

Change-Id: I170c97da6dd147d37bb8750bc4c750bf676d611d
2016-08-04 02:36:15 +00:00
Elliott Hughes
fb7e8a0088 Merge "Remove the prctl PR_SET_TIMERSLACK_PID call."
am: b3654fa086

Change-Id: I5f833a1497fcbb8b7c3f1efcd707b6186a6409e6
2016-08-04 02:31:12 +00:00
Greg Hackmann
ed0614c80b libcutils: add sched_policy test
Bug: 30597190

Change-Id: I51950e82235fa19bc92b3f7e8d190766d71af7df
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-08-03 23:31:50 +00:00
Elliott Hughes
d7967c1347 Remove the prctl PR_SET_TIMERSLACK_PID call.
This is broken on all devices other than N9, and has no real path to fixing
it because there are so many different values already in use (41, 43, 47,
127), with no way to tell which you should use on any given device.

Bug: http://b/30597190
Change-Id: I07eeaaf6f5dc03c5532ffbfbb85ef2ad750206a0
2016-08-03 15:11:01 -07:00
John Stultz
5758078f5e Merge \\\"sched_policy: Add support for /proc/<tid>/timerslack_ns over PR_SET_TIMERSLACK_PID\\\" am: 817d53493a am: acf5e849b4
am: 304c1264d4

Change-Id: I6055ee00f85e84d1748745415170acfdd0d690ec
2016-07-30 05:29:06 +00:00
John Stultz
acf5e849b4 Merge \"sched_policy: Add support for /proc/<tid>/timerslack_ns over PR_SET_TIMERSLACK_PID\"
am: 817d53493a

Change-Id: Iea895b632b3bfa7daae0be34c2cc69563a18a6d5
2016-07-30 05:20:34 +00:00
John Stultz
2f13f0a48a sched_policy: Add support for /proc/<tid>/timerslack_ns over PR_SET_TIMERSLACK_PID
The PR_SET_TIMERSLACK_PID number has collided with upstream
changes a number of times, and thus the number is not consistent
between AOSP common kernel versions.

In 4.6+, the upstream kernel added equivalent functionaity via
the /proc/<tid>/timerslack_ns entry.

This patch changes the sched_policy logic to support
/proc/<tid>/timerslack_ns if its available, falling back to the
older PR_SET_TIMERSLACK_PID method if not.

NOTE: Eventually PR_SET_TIMERSLACK_PID usage will need to be
removed as it is likely to conflict with valid future upstream
PR_* entries.

Also add missing O_CLOEXEC to other open calls in this file.

Change-Id: Iec0b8a62de0dc8bdd57b60df82bd4d31c5d64709
Signed-off-by: John Stultz <john.stultz@linaro.org>
2016-07-29 14:30:20 -07:00
Elliott Hughes
a9f814239b Merge \\\"Fix early init logging.\\\" am: 6d232ab4de am: 1cbd1f5016
am: 7e336c8fe5

Change-Id: Id22974510c241cc8b62c3737de36c1e5941420e3
2016-07-27 15:36:13 +00:00
Elliott Hughes
1cbd1f5016 Merge \"Fix early init logging.\"
am: 6d232ab4de

Change-Id: I437dd3b5243ca7854439c438093e94733579279e
2016-07-27 15:30:45 +00:00
Elliott Hughes
35f5d04620 Fix early init logging.
Remove the /dev/__kmsg__ workarounds (which can then be removed
from sepolicy), and fix confusion in the translation between
android-base logging and kernel logging priorities (in particular,
where 'notice' comes in the hierarchy).

Bug: http://b/30317429
Change-Id: I6eaf9919904b6b55bc402c20bf1a4ae269014bc7
Test: adb shell dmesg | grep init
2016-07-26 09:32:33 -07:00
Fyodor Kupolov
896595280d Fix permissions for /data/preloads
am: 13639b46d0

Change-Id: I48bca73b704ccee49f31a805f8c5e974b18810e5
2016-07-22 04:10:03 +00:00
Fyodor Kupolov
13639b46d0 Fix permissions for /data/preloads
Default permission bits are 771. It causes permission denied errors when
MediaProvider tries to scan /data/preloads. We have to allow read for others.

Bug: 29940807
Change-Id: I45645cf1154501ccb64bef08b9ad7bf7709dfd8e
2016-07-20 17:25:12 -07:00