summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Hector Chavez2018-06-08 17:00:40 -0500
committerLuis Hector Chavez2018-06-11 12:04:11 -0500
commitd32c36c961da82fa0b0e70a80d9a6e62a0551d2a (patch)
treefaf001db69be602989469edb915180b228c7a11e /libcutils
parent59112043262a03877234b2ffc75fee273e39d9bd (diff)
downloadplatform-system-core-d32c36c961da82fa0b0e70a80d9a6e62a0551d2a.tar.gz
platform-system-core-d32c36c961da82fa0b0e70a80d9a6e62a0551d2a.tar.xz
platform-system-core-d32c36c961da82fa0b0e70a80d9a6e62a0551d2a.zip
logd: Move the capabilities from file based to ambient
This change moves logd's capabilities from being file based to being set by init through ambient capabilities. Bug: 62845925 Test: sailfish:/ # grep Cap /proc/`pidof logd`/status CapInh: 0000000000000000 CapPrm: 0000000440000000 CapEff: 0000000440000000 CapBnd: 0000000440000040 CapAmb: 0000000000000000 $ capsh --decode=0x440000040 0x440000040=cap_setgid,cap_audit_control,cap_syslog Test: liblog-unit-tests, logd-unit-tests, logcat-unit-tests Change-Id: I28c7c4ad37ad5eafd399aef78c303ce31298a9ef
Diffstat (limited to 'libcutils')
-rw-r--r--libcutils/fs_config.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/libcutils/fs_config.cpp b/libcutils/fs_config.cpp
index 6169324cb..341dfe314 100644
--- a/libcutils/fs_config.cpp
+++ b/libcutils/fs_config.cpp
@@ -154,6 +154,7 @@ static const struct fs_path_config android_files[] = {
154 { 00755, AID_ROOT, AID_SHELL, 0, "system/bin/crash_dump64" }, 154 { 00755, AID_ROOT, AID_SHELL, 0, "system/bin/crash_dump64" },
155 { 00755, AID_ROOT, AID_SHELL, 0, "system/bin/debuggerd" }, 155 { 00755, AID_ROOT, AID_SHELL, 0, "system/bin/debuggerd" },
156 { 00750, AID_ROOT, AID_ROOT, 0, "system/bin/install-recovery.sh" }, 156 { 00750, AID_ROOT, AID_ROOT, 0, "system/bin/install-recovery.sh" },
157 { 00550, AID_LOGD, AID_LOGD, 0, "system/bin/logd" },
157 { 00700, AID_ROOT, AID_ROOT, 0, "system/bin/secilc" }, 158 { 00700, AID_ROOT, AID_ROOT, 0, "system/bin/secilc" },
158 { 00750, AID_ROOT, AID_ROOT, 0, "system/bin/uncrypt" }, 159 { 00750, AID_ROOT, AID_ROOT, 0, "system/bin/uncrypt" },
159 { 00600, AID_ROOT, AID_ROOT, 0, "system/build.prop" }, 160 { 00600, AID_ROOT, AID_ROOT, 0, "system/build.prop" },
@@ -179,10 +180,6 @@ static const struct fs_path_config android_files[] = {
179 // in user builds. 180 // in user builds.
180 { 00700, AID_SYSTEM, AID_SHELL, CAP_MASK_LONG(CAP_BLOCK_SUSPEND), 181 { 00700, AID_SYSTEM, AID_SHELL, CAP_MASK_LONG(CAP_BLOCK_SUSPEND),
181 "system/bin/inputflinger" }, 182 "system/bin/inputflinger" },
182 { 00550, AID_LOGD, AID_LOGD, CAP_MASK_LONG(CAP_SYSLOG) |
183 CAP_MASK_LONG(CAP_AUDIT_CONTROL) |
184 CAP_MASK_LONG(CAP_SETGID),
185 "system/bin/logd" },
186 { 00550, AID_SYSTEM, AID_LOG, CAP_MASK_LONG(CAP_SYSLOG), 183 { 00550, AID_SYSTEM, AID_LOG, CAP_MASK_LONG(CAP_SYSLOG),
187 "system/bin/bootstat" }, 184 "system/bin/bootstat" },
188 { 00750, AID_ROOT, AID_SHELL, CAP_MASK_LONG(CAP_SETUID) | 185 { 00750, AID_ROOT, AID_SHELL, CAP_MASK_LONG(CAP_SETUID) |