Commit Graph

23444 Commits

Author SHA1 Message Date
Martijn Coenen
127f5e863c Allow vold FS_IOC_{GET|SET}FLAGS ioctl.
To enable quota project ID inheritance.

Bug: 146419093
Test: no denials
Change-Id: If9c616acc5010d513d1e7ccda0915cdb26272b8c
2020-02-06 18:08:36 +00:00
Inseob Kim
33994bba81 Add macros for vendor_init writeonce properties
There are a lot of properties which is meant to be set once by
vendor_init. Most of them are configuration properties from vendor. This
introduces a macro to define such properties, which can help readability
and better security than using plain system_public_prop.

Bug: 148125056
Test: manual
Change-Id: I8b68e635d42119bafd1d22cba7957f583822ac7b
2020-02-07 03:03:43 +09:00
Ashwini Oruganti
9301818539 Add TEST_MAPPING for pre-submit tests
Run SELinuxHostTest whenever a change is made.

Filtering the tests to the ones that check that priv-apps are running in
their own domains.

Bug: 143172058
Test: Running "atest" in system/sepolicy runs SELinuxHostTest
Change-Id: If17642400129e97eb3bf2f631e784f92826adb9a
2020-02-06 09:57:03 -08:00
Automerger Merge Worker
20d98449ac Merge "Make platform_compat discoverable everywhere" am: c79be18ddd
Change-Id: Idfa1540dd171d6ada539f06cc50bb1f11b1fc82a
2020-02-06 13:51:30 +00:00
Andrei-Valentin Onea
c79be18ddd Merge "Make platform_compat discoverable everywhere" 2020-02-06 13:40:34 +00:00
Automerger Merge Worker
c22738a787 Merge "Don't audit dumpstate reading /mnt/user, /mnt/installer." am: 55b7ccd989
Change-Id: Ie00ede70277839dfaeb291ee21825fab99bfc134
2020-02-06 12:42:27 +00:00
Martijn Coenen
55b7ccd989 Merge "Don't audit dumpstate reading /mnt/user, /mnt/installer." 2020-02-06 12:37:24 +00:00
Automerger Merge Worker
0bbe440a69 Merge "net_dns_prop: neverallow most access" am: 9788ca1738
Change-Id: If7272632fd3e7162b37ac1530ec49fd49f028b0c
2020-02-06 12:34:42 +00:00
Dianne Hackborn
c2f74ac6ae Reland: Rework platform version to hide codenames.
The public platform version no longer can be a codename, it is
always the most recently released platform.  A new build property
and API provides either the offical version or the current codename
as appropriate.  This will avoid breaking apps that look at the
platform version while development is under a codename.

Bug:  143175463
Test: manual

(cherry picked from commit afa84c96ac)

Merged-In: I257ca42672e4712841c90b0608202c846bda628c
Change-Id: If8c91986afe682902787145dae4c0a3b9a2aa8d1
2020-02-06 12:31:25 +00:00
Jeffrey Vander Stoep
9788ca1738 Merge "net_dns_prop: neverallow most access" 2020-02-06 12:16:22 +00:00
Andrei Onea
25b39acefe Make platform_compat discoverable everywhere
The binder's methods are protected by signature
permissions (LOG_COMPAT_CHANGE, READ_COMPAT_CHANGE_CONFIG and
OVERRIDE_COMPAT_CHANGE_CONFIG).

This is a re-landing of https://r.android.com/1210143, which was
reverted due to http://b/142942524. The actual fix was done in
http://ag/10234812.

Bug: 142650523
Test: atest PlatformCompatGatingTest
Change-Id: Ibddac8933ea58d44457a5d80b540347e796ebe71
2020-02-06 12:11:37 +00:00
Oli Lan
23396a46a7 Add new apexd.status value of "activated".
As of aosp/1224611, there is a new step in the preparation of APEXes
where init calls back into apexd after DE user data is unencrypted to
allow DE apex data to be snapshotted or restored.

This adds a new enum value for the apexd.status property to allow
this status to be described.

Bug: 148672144
Test: build & flash, check boot completes and check in logs that the
correct status values are set.

Change-Id: I7effcf16280eabcd5b9a0d70d33bd34d79121312
2020-02-06 11:57:08 +00:00
Martijn Coenen
722026676b Don't audit dumpstate reading /mnt/user, /mnt/installer.
Dumpstate runs 'df', which in turn tries to get attributes on all
mounted filesystems. We don't care much for stats on /mnt/user, since
it's simply a mapping of /data. /mnt/installer is simply a bind mount of
/mnt/user, and we don't need to show that in df either.

Bug: 148761246
Test: atest
CtsSecurityHostTestCases:android.security.cts.SELinuxHostTest#testNoBugreportDenials
Change-Id: Ie71b9cde08eb08bd3a7a3e2659ea71c61ca5ab3b
2020-02-06 09:44:24 +00:00
Automerger Merge Worker
557f360d29 Merge "sepolicy: Relabel wifi. properties as wifi_prop" am: 15d70fec33
Change-Id: I496b18dadf830a96e6e6a27e14a985b784707a5a
2020-02-06 03:06:08 +00:00
Treehugger Robot
15d70fec33 Merge "sepolicy: Relabel wifi. properties as wifi_prop" 2020-02-06 02:53:51 +00:00
Automerger Merge Worker
49f6767ac7 Merge "adbd should be able to shutdown shell:unix_stream_socket" am: ca3d3dfa70
Change-Id: I5fbc449b0d6f463aaa4e4b0e22638cc684b811b3
2020-02-06 02:30:57 +00:00
Treehugger Robot
ca3d3dfa70 Merge "adbd should be able to shutdown shell:unix_stream_socket" 2020-02-06 02:17:31 +00:00
Automerger Merge Worker
74f0d2e626 Merge "Add filegroup for extservices file context" am: f9e9eabea5
Change-Id: I7988f26f5741c78273b8dd05da8194e5ca301c35
2020-02-06 02:11:51 +00:00
Treehugger Robot
f9e9eabea5 Merge "Add filegroup for extservices file context" 2020-02-06 02:06:41 +00:00
Automerger Merge Worker
8312d3a4f3 Merge "Surfaceflinger binder call StatsManagerService" am: f8ddb83890
Change-Id: I08f1b3a9cb50e4981489274d3cd780bebdf93262
2020-02-06 02:03:09 +00:00
Howard Ro
f8ddb83890 Merge "Surfaceflinger binder call StatsManagerService" 2020-02-06 01:52:40 +00:00
Automerger Merge Worker
07fd2bc27b Allow init to set the encryption policy on unlabeled directories. am: 5e175476f2
Change-Id: Id4c9b5ac74bbfcea4de0c744052b2b81cbf48147
2020-02-06 01:44:20 +00:00
Jeffrey Huang
dd1ce53b27 Allow system server to add StatsHal
Bug: 148794952
Test: m -j
Change-Id: I14cc282bb262f1ec62ab3473d9229763c1a02e21
Merged-In: I14cc282bb262f1ec62ab3473d9229763c1a02e21
2020-02-05 17:24:48 -08:00
Josh Gao
b9c7001837 adbd should be able to shutdown shell:unix_stream_socket
adbd started calling shutdown and waiting for EOF before closing
sockets in commit 74b7ec72, because closing a TCP socket while you have
pending data to read is specified to send a TCP RST to the other end,
which can result in data that we've written into the socket to be
prematurely thrown away on the other end. Not being able to do so on a
Unix domain socket is benign, aside from the denial showing up in the
log.

Fixes the following selinux denial when installing a package:

  avc: denied { shutdown } for scontext=u:r:adbd:s0 tcontext=u:r:shell:s0 tclass=unix_stream_socket permissive=0

Test: manual
Change-Id: I266092a8323ac02bfe96738a8f4a8021f3a10387
2020-02-05 17:24:46 -08:00
Automerger Merge Worker
d8f11b4663 Merge "GpuStats: sepolicy change for using new statsd puller api" am: 231b89410f
Change-Id: Ibefa5654ab0825ab199ade05cee0afa7b0952270
2020-02-05 23:24:02 +00:00
Joel Galenson
5e175476f2 Allow init to set the encryption policy on unlabeled directories.
This fixes a bug where a directory's label was removed, causing it to
be unlabeled, and we crashed on trying to set its encryption policy.

Fixes: 148923156
Test: Successfully update from build with the deleted label.
Change-Id: I69c3707e3e66d9e44a22b0783d3016c8ddab6b8f
2020-02-05 15:03:29 -08:00
Jeffrey Huang
225850bd0c Surfaceflinger binder call StatsManagerService
This binder call is needed because we want to migrate
libstatspull to use StatsManagerService instead of Statsd

The binder call to statsd can be removed after the migration.

Test: m -j
Bug: 148641240
Change-Id: If6cf7eb77aa229751c44e5291d49f05177dbb8dd
2020-02-05 14:40:40 -08:00
Treehugger Robot
231b89410f Merge "GpuStats: sepolicy change for using new statsd puller api" 2020-02-05 21:58:42 +00:00
Automerger Merge Worker
e9f40bc112 Merge "Only write snapshotctl_log when debug" am: df701f3e45
Change-Id: I8aa0da7a0ae63be6787cef145f188052da42cc77
2020-02-05 21:32:29 +00:00
Yifan Hong
df701f3e45 Merge "Only write snapshotctl_log when debug" 2020-02-05 21:23:11 +00:00
Automerger Merge Worker
deda3c9203 Merge "Allow update_engine to write snapshotctl log data" am: f58e6777b2
Change-Id: I8f67eca8af03b625b71ecee017c5e795cab08f90
2020-02-05 18:04:30 +00:00
Automerger Merge Worker
d2e13c7ffb Merge "Move virtual_ab_prop to vendor partition." am: 54411b5e3c
Change-Id: Ib2b961a021eec26e9eb3c96d1e32ad350421c76c
2020-02-05 18:04:18 +00:00
Yifan Hong
f58e6777b2 Merge "Allow update_engine to write snapshotctl log data" 2020-02-05 17:57:46 +00:00
Yifan Hong
54411b5e3c Merge "Move virtual_ab_prop to vendor partition." 2020-02-05 17:57:08 +00:00
lpeter
93de13e535 Add filegroup for extservices file context
Add a filegroup for extservices so that it can be shared between the main
extservices apex and the one used for testing.

Bug: 138589409
Test: Manually
Change-Id: I2cca8a583b2aa72c8c29a32dd839fe599300b40f
2020-02-05 18:43:13 +08:00
Stefano Galarraga
a601575307 Allow dumpstate to dump NNAPI HAL log on userbuild
This helps in the investigation of driver-related issues.

Bug: 145388549
Test: Manually, log collected on user build
Change-Id: I40631aac7878f58e399bc583898630055583fc7c
2020-02-05 09:26:23 +00:00
Jeff Vander Stoep
5afd6d788c net_dns_prop: neverallow most access
Prepare for these properties to be completely removed.

Bug: 33308258
Test: build
Change-Id: Ie22918247db1d6e85a36e0df958916b6752629d0
2020-02-05 09:55:30 +01:00
Automerger Merge Worker
c4f463d17e Merge "Create new mediaprovider_app domain." am: 164359b952
Change-Id: I55abcb58b73137ddadd6a370b2de4da1272f6a9d
2020-02-05 08:09:36 +00:00
Automerger Merge Worker
3ea40693f7 Merge "Allow dumpstate to open and read linkerconfig directory" am: 7be9b32fdb
Change-Id: I1213fa68632fbad3be7196762c3f986209bd5790
2020-02-05 08:09:24 +00:00
Martijn Coenen
164359b952 Merge "Create new mediaprovider_app domain." 2020-02-05 07:58:54 +00:00
Kiyoung Kim
7be9b32fdb Merge "Allow dumpstate to open and read linkerconfig directory" 2020-02-05 07:58:12 +00:00
Yifan Hong
b6b35b7c46 Only write snapshotctl_log when debug
Only write snapshotctl_log_data_file for userdebug_or_eng.

Test: boot, still see log
Bug: 148818798
Change-Id: I03e979efd65e3992bd8ef30e6408768a14aa1de2
2020-02-04 17:15:06 -08:00
Yifan Hong
47ee18d67a Allow update_engine to write snapshotctl log data
recovery is excluded because it is not an interesting code
path.

Test: apply OTA, cancel, delete OTA states, then apply again
      to trigger CancelUpdate() code path, see logs

Bug: 148818798
Change-Id: I3baac977af54ac0a09c9b732fd172469c9f51627
2020-02-04 16:56:59 -08:00
Yiwei Zhang
dbbe3bd7d8 GpuStats: sepolicy change for using new statsd puller api
Bug: 148421389
Test: statsd_testdrive 10054
Change-Id: Icf1a4bf809b1413c0e413290bbeadd987faff710
2020-02-04 15:55:59 -08:00
Automerger Merge Worker
57dd66eae1 Merge "Allow setattr for chattr" am: c98291c37c
Change-Id: Ib329a1c44723dcb7f34699f4829fa875cb887db5
2020-02-04 23:13:11 +00:00
Daniel Rosenberg
c98291c37c Merge "Allow setattr for chattr" 2020-02-04 23:03:38 +00:00
Automerger Merge Worker
1c26630767 Merge "snapshotctl better logging" am: 28d5e87d39
Change-Id: I4b2915f2e8768f986ac3e9db8d5487b41855e691
2020-02-04 22:29:29 +00:00
Yifan Hong
28d5e87d39 Merge "snapshotctl better logging" 2020-02-04 22:18:33 +00:00
Automerger Merge Worker
d7ffd9d1e0 Merge "Allow system_server to attach bpf programs to tracepoints" am: d90d4aa2bb
Change-Id: Ia18f4643a3f069cc69f0885c77bbb68b4a2f7ff3
2020-02-04 21:23:43 +00:00
Connor O'Brien
d90d4aa2bb Merge "Allow system_server to attach bpf programs to tracepoints" 2020-02-04 21:11:47 +00:00