Commit graph

52 commits

Author SHA1 Message Date
Josh Gao
36397cb168 Give crash_dump CAP_SYS_PTRACE.
CAP_SYS_PTRACE is needed to ptrace processes that have capabilities
greater than their bounding set. Eventually, this will still be an
improvement, because we can ptrace attach, and then turn on a seccomp
filter that blocks further attaches.

Bug: http://b/34694637
Test: debuggerd `pidof system_server`
Change-Id: I4b9da164ec1fbb5060fdba590e886ac24b6a0785
2017-01-25 11:48:23 -08:00
Treehugger Robot
8dbab358f0 Merge "Load default/build props from each partition" 2017-01-20 03:58:52 +00:00
Jaekyun Seok
de21de7a42 Load default/build props from each partition
The following files will be loaded additionally.
- /odm/default.prop and /vendor/default.prop for default props.
- /odm/build.prop for build props.

The props files must follow the following priority order.
- /default.prop > /odm/default.prop > /vendor/default.prop
- /system/build.prop > /odm/build.prop > /vendor/buid.prop

Test: tested default/build prop files with enabling early mount, but
didn't test files of odm partition because odm partition doesn't
exist now.
Bug: 34116668
Change-Id: I946d076dae38f2288865dd986fb16d801d4abcc0
2017-01-19 08:45:40 +09:00
Josh Gao
cbe70cb0a8 debuggerd: advance our amazing bet.
Remove debuggerd in favor of a helper process that gets execed by
crashing processes.

Bug: http://b/30705528
Test: debuggerd_test
Change-Id: I9906c69473989cbf7fe5ea6cccf9a9c563d75906
2017-01-17 13:57:57 -08:00
Mark Salyzyn
01e12b4ee7 Merge "liblog: use log/log.h when utilizing ALOG macros" 2017-01-11 19:07:17 +00:00
Mark Salyzyn
30f991f251 liblog: use log/log.h when utilizing ALOG macros
Test: compile
Bug: 30465923
Change-Id: Id6d76510819ebd88c3f5003d00d73a0dbe85e943
2017-01-11 09:31:15 -08:00
Andre Eisenbach
8097210093 Allow Bluetooth HAL to access /sys/class/rfkill
Test: compiles; HAL can write rfkill state
Change-Id: I5815a1f50ef8d09bf83541a6d2389b61bd007306
2017-01-10 23:40:20 +00:00
Nick Kralevich
5f9fa90425 fs_config.c: make *.prop files 0600
Enforce that the only API for reading properties is through the property
server, not by reading the (system|vendor|rootfs) *.prop files.

Test: Device boots and no property errors.
Change-Id: Ibb6ed4e74a80cac00010c707d7574f8e92fc6448
2016-12-16 14:54:02 -08: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
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
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
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
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
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
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
Mitchell Wills
e551125cfa Merge commit '5a33ad4d5210346a4a4c11af7ffbc82e0cffa53c' into manual_merge_5a33ad4
Change-Id: I873555a7284323e6ca839cf4982f9d07f49a5f4e
2016-08-29 18:13:09 -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
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
Tim Murray
3a29e344b0 Update FIFO settings for new uses of FIFO.
Adjust FIFO timings as well as allow SurfaceFlinger to use FIFO.

bug 24503801

Change-Id: I2c21d4c1788777c2d0d77227bb872701b35c4ff6
2016-07-07 11:35:41 -07:00
Erik Kline
a5a9c74f20 Add /vendor/xbin to the list of directories of executables
Bug: 28850734
Change-Id: Iaa14a463294d1f8a9c69328a273ce7f12a558bab
2016-05-27 17:37:53 +09:00
Lorenzo Colitti
9c07eb9dd8 Delete dhcpcd code in system/core, since dhcpcd is no more.
Bug: 27192644
Change-Id: I44c2ded2da69395f12a8850b2677322b11c2cb91
2016-02-25 16:04:43 +09:00
Todd Kennedy
088113f419 Merge "Create new ephemeral app directory" 2015-12-07 15:33:06 +00:00
Nick Kralevich
cbbc66174c fs_config.c: Remove obsolete reference to /system/bin/pppd-ril
Codesearch finds no reference to this in the Android tree. It was
added in 2010 in commit bbf1c64527.

Change-Id: I8cd1153912b78b4b23b8f5ba2577a58c5c49e316
2015-11-30 09:17:18 -08:00
Nick Kralevich
3e6356834f fs_config: remove setuid bit from librank
Anyone wanting to call /system/xbin/librank can execute "su"
beforehand. There's no need for it to be setuid root.

Bug: 25739721
Change-Id: Ie3d68701397d21e901bf1ec17b4b4a9f12128d2d
2015-11-27 18:08:22 -08:00
Todd Kennedy
0a2733582d Create new ephemeral app directory
Bug: 25119046
Change-Id: Ie005430700a73ef1ba492dae4101419a41da4071
2015-11-23 15:24:13 -08:00
Gilad Arnold
1bc7888104 Fix permissions for /data/nativetest{,64}/tests.txt.
This is not an executable so we have to specifically set its permissions
accordingly.

Bug: 25668833
Change-Id: I502f69bad75b4da4fdc29eb3ebaa42a19ae04d27
2015-11-14 18:25:31 -08:00
Gilad Arnold
47af47f4c1 Sane ownership/permissions for directories in /data/nativetest{,64}.
This makes native test directories 750 root:shell. This matches the
value for files within those directories, and results in a more usable
access paradigm when (say) unprivileged test tools need to discover
these test binaries.

Bug: 25668833
Change-Id: I9bd2081b2c211b4383b5873238aaf64597756714
2015-11-12 14:34:57 -08:00
Daniel Erat
5510c13991 libcutils: Make /data/nativetest{,64}/* executable.
Make test files under /data/nativetest{,64} 0750 root:shell
to avoid needing to manually chmod them.

Bug: 25340994
Change-Id: I174cc226195907c0effa99063a8aa0082f85722b
2015-11-02 09:45:04 -07:00
Nick Kralevich
e2b2996d96 fs_config.c: remove setuid from procrank
procrank only exists on userdebug/eng builds. For those builds,
procrank can be executed by running "su 0 procrank" instead of
relying on the binary being setuid root. This reduces the number
of setuid binaries on Android and allows for the deletion of
SELinux policy to support this.

Bug: 18342188
Change-Id: I982283f2e0f6fbe5efaffc08501c1ec175f65373
2015-10-07 16:41:47 -07:00
Jorge Lucangeli Obes
fd7a9f79f2 am 66d32c74: Merge "Use CAP_MASK_LONG for file capabilities."
* commit '66d32c7488e12545218e83195738c95c183760ef':
  Use CAP_MASK_LONG for file capabilities.
2015-09-03 15:55:32 +00:00
Jorge Lucangeli Obes
e920c46e7d Use CAP_MASK_LONG for file capabilities.
Extract the |1ULL << $CAP_NAME| construct to a macro, to avoid
repeating it.

Change-Id: I9312c27130d7e6c5b6ab3b4cc5c70a6b98378b98
2015-09-02 17:18:44 -07:00
Tao Bao
5c151c4a4b am beb13044: am 1cae8cc1: Merge "Set mode bits for /system/etc/recovery.img."
* commit 'beb1304469c916bedf625ab126d75b38a688c62f':
  Set mode bits for /system/etc/recovery.img.
2015-07-28 21:24:21 +00:00
Tao Bao
1cae8cc13a Merge "Set mode bits for /system/etc/recovery.img." 2015-07-28 20:47:00 +00:00
Tao Bao
c6e93fec84 Set mode bits for /system/etc/recovery.img.
/system/etc/recovery.img defaults to 0644. Change it to 0440.

Bug: 22641135
Change-Id: I45cdb0cc1b58f35fbcd0f16e7cc6c4eef63b0b74
(cherry picked from commit b602e6f9a3)
2015-07-27 19:17:15 -07:00
Elliott Hughes
8b262b9de4 resolved conflicts for merge of 038b76c2 to mnc-dev-plus-aosp
Change-Id: Id84946b67f207a7586cfa9c918ee6e4ae335fe86
2015-07-24 20:02:31 -07:00
Elliott Hughes
8fea1ede67 Turn on warnings for libcutils, fix a bug.
This doesn't actually spot the bug I'm about to fix, but maybe one day...

Change-Id: Ib8a2016ecd8a426f38960a05d439646255ea6cd8
2015-07-24 18:48:31 -07:00
Daniel Rosenberg
6b6687bec9 am 00392411: am e7ed68ad: Merge "libcutils: fs_config: Add folders normally created in init.rc"
* commit '0039241124ae3ef9b19c805b0341120e11f9561e':
  libcutils: fs_config: Add folders normally created in init.rc
2015-07-14 22:28:11 +00:00
Thierry Strudel
df33ffadd2 fs_config: replace getenv('OUT') by new fs_config parameter
Using a getenv('OUT') in such a deep down function is a wrong design
choice. Replacing with explicit parameter that may be NULL in case
device specific files can be accessed from /.
Since TARGET_COPY_OUT_SYSTEM may be defined to something different than
system we also ensure that we use a path relative to TARGET_OUT to
compute path to fs_config_* files.

Bug: 21989305
Bug: 22048934
Change-Id: Id91bc183b29beac7379d1117ad83bd3346e6897b
Signed-off-by: Thierry Strudel <tstrudel@google.com>
2015-07-09 21:47:07 -07:00
Daniel Rosenberg
bbe796d231 libcutils: fs_config: Add folders normally created in init.rc
When the ramdisk is built into the system image, we need to create
those folders during the build.

Change-Id: I40881940c75e379d7599dc1f743b35fbc7cc66e8
2015-07-08 16:37:13 -07:00
Mark Salyzyn
4232b378e7 libcutils: fs_config must use O_BINARY
Bug: 19908228
Change-Id: I3273cf99b320941f9530a015c9e582af72469acb
2015-04-16 08:44:33 -07:00
Mark Salyzyn
fd5b425b6e libcutils: fs_config: winsdk_tools build fix
Bug: 19908228
Change-Id: Ia725d20ca4f8a87deec63b6c661f6a09c8671231
2015-04-16 08:32:25 -07:00
Mark Salyzyn
7977cc63b1 libcutils: drop use of mmap
- Causes a build break for MAC and Windows

Bug: 19908228
Change-Id: I9d69967aa988c9ca202805593fa846cb670101cf
2015-04-15 19:28:36 -07:00
Mark Salyzyn
5d9e5efbcd libcutils: add fs_config_generate
Bug: 19908228
Change-Id: Icb0e189a86758bb779b9bdf7c0d92216d297869f
2015-04-15 16:43:07 -07:00
Mark Salyzyn
68651148dd libcutils: fs_config read from file
Intention is to read from ${OUT}/system/etc/fs_config_dirs and
${OUT}/system/etc/fs_config_files on host. And
/system/etc/fs_config_dirs and /system/etc/config_files
on target systems.

Bug: 19908228
Change-Id: Ieaedd99e88c7f7f717878d9344c387ddf335ccbb
2015-04-15 16:43:01 -07:00
Mark Salyzyn
7e82633106 Revert "libcutils: fs_config read from file"
There is no endian.h on windows

This reverts commit 4e5f71ae72.

Change-Id: I6aedf35ed319c7f8febc7ab98e104a625fb27f69
2015-04-15 22:30:30 +00:00
Mark Salyzyn
4e5f71ae72 libcutils: fs_config read from file
Intention is to read from ${OUT}/system/etc/fs_config_dirs and
${OUT}/system/etc/fs_config_files on host. And
/system/etc/fs_config_dirs and /system/etc/config_files
on target systems.

Bug: 19908228
Change-Id: I0966a94f79a3fae4f7325056c701ea355370f9df
2015-04-15 11:22:52 -07:00