Commit graph

1012 commits

Author SHA1 Message Date
Treehugger Robot
8d022b888c Merge "Use prebuilts for compat test if prebuilts exist" into main am: 6952d2f612
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2746580

Change-Id: I920639164d6e304b50046a17506be2972ee1199f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-08 05:18:40 +00:00
Inseob Kim
2aac33597d Use prebuilts for compat test if prebuilts exist
system/sepolicy should support both REL build and ToT build. That means
that system/sepolicy and prebuilts may differ. As the frozen sepolicy is
what vendor sepolicy uses, so we need to use prebuilts to run Treble
compat test.

Bug: 296875906
Test: m selinux_policy on REL
Change-Id: I4b290266ba87e3f011d640bec133fc88359ea52f
2023-09-08 10:44:49 +09:00
Treehugger Robot
31406c242e Merge changes Ia2c07331,I93f0d222 into main am: f476f5c8f1
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2742356

Change-Id: If3a6af8553b6d645653ae38e898c3770b7dab868
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-07 09:14:47 +00:00
Inseob Kim
0d49b9bc28 Use only public cil files for Treble compat test
Rationale for this change:

1) Vendors use only public files, so we should be able to use only
   public cil files for compatibility test.
2) treble_sepolicy_tests_for_release.mk is too complex, because it
   requires compiled sepolicy. Reducing the complexity will help migrate
   into REL build.
3) This fixes a tiny bug of treble_sepolicy_tests that it can't catch
   public types being moved to private types, and then removed. 29.0.cil
   and 30.0.cil change contains such missing public types.

Bug: 296875906
Test: m selinux_policy (with/without intentional breakage)
Change-Id: Ia2c0733176df898f268b5680195da25b588b09c7
2023-09-07 16:35:08 +09:00
Inseob Kim
5d7423ff3d Build prebuilt policy with Soong
... and remove redundant Makefile codes. This also updates commit hook
as we now only use Soong to build sepolicy.

Bug: 296875906
Test: m selinux_policy
Change-Id: I93f0d222a0c10e31c51c9380780a8927c47d62b1
2023-09-07 16:32:30 +09:00
Treehugger Robot
d1710c749b Merge "Relax freeze_test to check only compatibility" into main am: b316f8bf95
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2737118

Change-Id: I575c28928e4c5690fc1b87ee09938cf0ed451476
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-05 07:06:46 +00:00
Inseob Kim
36d9d39e6e Relax freeze_test to check only compatibility
For now, freeze_test compares prebuilts against sources with diff, to
ensure that sources are identical to prebuilts. However, it could be the
case that the branch should be able to build both REL and ToT. In that
case, changes to the sources are inevitable and the freeze test will
fail.

To fix the issue, freeze_test will now only check compatibility. To be
specific, it will check if any public types or attributes are removed.
Contexts files and neverallow rules are not checked, but they may be
added later. Also to support the new freeze_test

- build_files module is changed to use glob (because REL version won't
  be in compat versions list)
- plat_pub_policy modules are added under prebuilts/api (because
  freeze_test needs that)

Bug: 296875906
Test: m selinux_policy
Change-Id: I39c40992965b98664facea3b760d9d6be1f6b87e
2023-09-05 03:37:18 +00:00
Xin Li
e07dbe0a63 Merge Android U (ab/10368041)
Bug: 291102124
Merged-In: Id2cc5dbbafffb4633706e5cc728cb44abd417340
Change-Id: I77e68f17a1273958bcdc32b5a4b6a0ff3ffdfd2a
2023-08-23 17:20:59 -07:00
Alfred Piccioni
ee7e77ba63 Merge "Revert ntfs file context changes" into main 2023-08-23 12:47:58 +00:00
Alfred Piccioni
33ebe0ef1b Revert ntfs file context changes
Partial revert of:

commit 3e1dc57bf4

commit 30ae427ed0

The current file contexts could break potential implementations of NTFS
by partners in future. I am not rolling back the adjoining
fuseblkd_exec andfuseblkd_untrusted_exec code, because secure
implementations of fuseblk drivers should still endeavour to use the
more compartmentalised policies.

However, as we don't support NTFS officially, we should give
implementors the choices whether to use it or not, even if it will open
the door to potentially less secure implementations.

NTFS Context: http://b/254407246,
https://docs.google.com/document/d/1b5RjdhN2wFFqmLCK0P_chVyiEhiYqNlTn52TFBMNwxk

Bug: 294925212
Test: Builds and boot.
Change-Id: I6d3858517e797b3f7388f9d3f18dd4a11770d5bc
2023-08-23 11:42:20 +00:00
wufei3
50a326d04a Add remaining attestation properties to selinux
Add "ro.product.device_for_attestation" and
"ro.product.manufacturer_for_attestation" prop to selinux permissions.

Bug:294190893
Test: atest CtsKeystoreTestCases:android.keystore.cts.DeviceOwnerKeyManagementTest#testAllVariationsOfDeviceIdAttestation

Change-Id: I71ee17ab59838680199acc9a7c209deba756f603
Signed-off-by: wufei3 <wufei3@xiaomi.corp-partner.google.com>
2023-08-17 11:41:07 +00:00
Xin Li
372f5cd14e Merge "Merge Android 13 QPR3" 2023-06-26 22:29:53 +00:00
Inseob Kim
34ad1d0bc1 SEPolicy Prebuilts for 34.0
Bug: 288517951
Test: build
Change-Id: I682e553ec8090281ded447780be41a8ea222b084
Merged-In: I15bf3817a8a6867d52f7963a04a69e543a9801e9
2023-06-23 10:23:59 +00:00
Motomu Utsumi
993e3a6b1e Merge "Add sepolicy config for tethering_u_or_later_native namespace" into udc-dev am: 682b2421d1
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23214698

Change-Id: Ica65b79fe2934516eb115e6330fe65a17194ca1b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 10:40:19 +00:00
Motomu Utsumi
682b2421d1 Merge "Add sepolicy config for tethering_u_or_later_native namespace" into udc-dev 2023-06-02 10:22:00 +00:00
Treehugger Robot
8a30fb3b9b Merge "Set up sepolicy for drmserver64" into udc-dev am: a4e8a5bc6a
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23297144

Change-Id: I87c9884bf51c394e2248a7923974bd5dcc88cbc5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 00:13:44 +00:00
Treehugger Robot
a4e8a5bc6a Merge "Set up sepolicy for drmserver64" into udc-dev 2023-06-01 23:22:31 +00:00
SzuWei Lin
90e295c513 Set up sepolicy for drmserver64
Add drmserver(32|64) for supporting 64-bit only devices. The patch is
for setting up the sepolicy for drmserver(32|64).

Bug: 282603373
Test: make gsi_arm64-user; Check the sepolicy
Ignore-AOSP-First: depend on an internal project
Change-Id: If8451de8120372b085de1977ea8fd1b28e5b9ab0
2023-06-01 08:41:54 +00:00
Motomu Utsumi
2473262434 Add sepolicy config for tethering_u_or_later_native namespace
Setup tethering_u_or_later_native namespace

Test: adb shell device_config put tethering_u_or_later_native test 1
Test: Read persist.device_config.tethering_u_or_later_native.test property
Test: from system server and Tethering.apk
Ignore-AOSP-First: topic has CL that updates DeviceConfig
Bug: 281944942
Change-Id: I2862974dc1a15f6768a34763bb9e2bad93eaf4ca
2023-06-01 00:34:59 +09:00
Gavin Corkery
73a8f6d8c8 Merge "Sync API 34 prebuilts" into udc-dev-plus-aosp 2023-05-31 14:19:48 +00:00
Treehugger Robot
8e448cbbfc Merge "Allow media server configurable flags to be read from anywhere" into udc-dev am: ed183c86a9
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23382984

Change-Id: I222304b6b75c5a92e08689fc8abb319ddefea00f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-30 21:48:19 +00:00
Treehugger Robot
ed183c86a9 Merge "Allow media server configurable flags to be read from anywhere" into udc-dev 2023-05-30 21:11:18 +00:00
Brian Lindahl
3c818406c4 Allow media server configurable flags to be read from anywhere
The majority of code for media encoding and decoding occurs within the
context of client app processes via linking with libstagefright. This
code needs access to server-configurable flags to configure
codec-related features.

Bug: 234833109
Test: manual test with 'adb shell device_config' commands
Ignore-AOSP-First: cherry pick from AOSP
Change-Id: I95aa6772a40599636d109d6960c2898e44648c9b
2023-05-26 22:53:40 +00:00
Jin Jeong
ae80e8cffa Merge "Revert "Add setupwizard_esim_prop to access ro.setupwizard.esim_..."" into udc-dev am: 7b646790c5
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23201116

Change-Id: I272af89efc194c111a0cb0c3955e2e37ff82b763
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-24 01:42:43 +00:00
Jin Jeong
cec9a99b28 Merge "Revert "Fix selinux denial for setupwizard_esim_prop"" into udc-dev am: a93b7daef3
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23167567

Change-Id: Ia1cc228b66bea6510ca4b649fa9d4c1adfa0900f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-24 01:42:35 +00:00
Jin Jeong
7b646790c5 Merge "Revert "Add setupwizard_esim_prop to access ro.setupwizard.esim_..."" into udc-dev 2023-05-24 01:07:12 +00:00
Jin Jeong
a93b7daef3 Merge "Revert "Fix selinux denial for setupwizard_esim_prop"" into udc-dev 2023-05-24 01:07:12 +00:00
Anoush Khazeni
15875fa311 Merge "Adding a property entry for the assistant volume." into udc-dev am: 1e1a425a9b
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23214185

Change-Id: Ib3a830112f4b6cdd2c3e346443bbdf0fdf324699
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-22 19:00:54 +00:00
Anoush Khazeni
1e1a425a9b Merge "Adding a property entry for the assistant volume." into udc-dev 2023-05-22 18:58:43 +00:00
Gavin Corkery
97fc74e8c6 Sync API 34 prebuilts
Ignore-AOSP-First: Cherrypick
Test: Manual
Bug: 281843854
Change-Id: I73f79b6566ed3e3d8491db6bed011047d5a650ce
Merged-In: I73f79b6566ed3e3d8491db6bed011047d5a650ce
2023-05-22 12:09:36 +00:00
Suren Baghdasaryan
8a6f45d363 allow modprobe to load modules from /system/lib/modules/
This is needed to load GKI leaf modules like zram.ko.

Bug: 279227085
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I8a8205e50aa00686f478aba5336299e03490bbb5
Merged-In: I8a8205e50aa00686f478aba5336299e03490bbb5
2023-05-19 19:03:17 +00:00
Peiyong Lin
505ddee411 Merge "Revert "Add "ro.hardware.egl_legacy" for ANGLE system driver"" into udc-dev am: 8fde7b737b
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23338256

Change-Id: I55dc1f86af4d3d05a2910288a77ee08aff1dde05
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 10:37:43 +00:00
Peiyong Lin
8fde7b737b Merge "Revert "Add "ro.hardware.egl_legacy" for ANGLE system driver"" into udc-dev 2023-05-19 09:57:00 +00:00
Peiyong Lin
98ec998136 Revert "Add "ro.hardware.egl_legacy" for ANGLE system driver"
This reverts commit 92251f5d15.

Reason for revert: Remove deferred list functionality now that the shape
of ANGLE shipping form is binaries. Applications on the list are broken
with ANGLE due to the lack of YUV support, this is currently being
worked on.

Ignore-AOSP-First: Cherry-pick revert.
Bug: 280450222
Change-Id: Ied92e6f482fe77e045139b4b0531b1db1a7ffb13
Test: atest CtsAngleIntegrationHostTestCases
2023-05-19 00:41:17 +00:00
Gavin Corkery
0461233b7a Merge "Allow apps and SDK sandbox to access each others' open FDs" into udc-dev 2023-05-18 07:51:32 +00:00
Anoush Khazeni
87da0af704 Adding a property entry for the assistant volume.
Ignore-AOSP-First: confidential feature

Adding a system property to be read by AudioService
to override the minimum volume setting for the
assistant stream.

Bug: 277829235
Test: Build only
Change-Id: I08c500c0a3bb040559ca99d1817b7b848deee8c6
2023-05-17 11:44:26 -07:00
Gavin Corkery
a707712813 Allow apps and SDK sandbox to access each others' open FDs
An app may wish to pass an open FD for the SDK sandbox
to consume, and vice versa. Neither party will be
permitted to write to the other's open FD.

Ignore-AOSP-First: Cherrypick
Test: Manual
Bug: 281843854
Change-Id: I73f79b6566ed3e3d8491db6bed011047d5a650ce
Merged-In: I73f79b6566ed3e3d8491db6bed011047d5a650ce
2023-05-17 14:28:40 +00:00
Mugdha Lakhani
d44c51e017 Add canary restrictions for sdk_sandbox
Add sdk_sandbox_next and apply it if a new input selector,
isSdkSandboxNext, is applied. This is set to true by libselinux
if a flag is set in the seInfo passed to it.

This enables some testers to test out the set of restrictions
we're planning for the next SDK version.
sdk_sandbox_next is not the final set of restrictions of the next SDK
version.

Bug: b/270148964
Test: atest PackageManagerLocalTest SdkSandboxDataIsolationHostTest
SdkSandboxRestrictionsTest
Change-Id: Ie8bad9c1b8f8eb032d13e1822689c78ad3d2c68a
Merged-In: Ie8bad9c1b8f8eb032d13e1822689c78ad3d2c68a
2023-05-12 20:06:31 +00:00
Mugdha Lakhani
0dde99d720 Add canary restrictions for sdk_sandbox
Add sdk_sandbox_next and apply it if a new input selector,
isSdkSandboxNext, is applied. This is set to true by libselinux
if a flag is set in the seInfo passed to it.

This enables some testers to test out the set of restrictions
we're planning for the next SDK version.
sdk_sandbox_next is not the final set of restrictions of the next SDK
version.

Bug: b/270148964
Test: atest PackageManagerLocalTest SdkSandboxDataIsolationHostTest
SdkSandboxRestrictionsTest
Change-Id: Ie8bad9c1b8f8eb032d13e1822689c78ad3d2c68a
Merged-In: Ie8bad9c1b8f8eb032d13e1822689c78ad3d2c68a
2023-05-12 19:05:34 +00:00
Treehugger Robot
4069aa56ef Merge "Grant system_server the permission to create its own profile." into udc-dev am: 62037d3f93
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23201106

Change-Id: Ib54115b1e04cc4342d5c57886c7e220404f9d85b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 11:57:21 +00:00
Treehugger Robot
62037d3f93 Merge "Grant system_server the permission to create its own profile." into udc-dev 2023-05-12 11:11:03 +00:00
Martin Stjernholm
5557ec5583 Merge "Allow the ART boot oneshot service to configure ART config properties." into udc-dev am: 4f2b8ce361
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23131204

Change-Id: Idb0edb8c39f038d7d21e8c1c41c486d0b34a5e99
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 10:54:04 +00:00
Martin Stjernholm
4f2b8ce361 Merge "Allow the ART boot oneshot service to configure ART config properties." into udc-dev 2023-05-12 10:28:21 +00:00
Jiakai Zhang
bdfc175e1e Grant system_server the permission to create its own profile.
When ART Service is enabled, the runtime uses a different strategy to
write profiles: it first creates a temp profile file, and then moves it
to the final location, instead of mutating the file in place. This new
strategy requires the permission to create files. While apps have this
permission, unfortunately, system_server didn't. This CL fixes this
problem.

Bug: 282019264
Test: -
  1. Enable boot image profiling
     (https://source.android.com/docs/core/runtime/boot-image-profiles#configuring-devices)
  2. Snapshot the boot image profile
     (adb shell pm snapshot-profile android)
  3. Dump the boot image profile
     (adb shell profman --dump-only --profile-file=/data/misc/profman/android.prof)
  4. See profile data for services.jar
Ignore-AOSP-First: This change requires updating the 34.0 prebuilt,
  which doesn't exist on AOSP. Will cherry-pick to AOSP later.
Change-Id: Ie24a51f2d40d752164ce14725f122c73432d50c9
2023-05-12 10:51:38 +01:00
Jin Jeong
9627dc5c78 Revert "Fix selinux denial for setupwizard_esim_prop"
Revert submission 22955599-euicc_selinux_fix2

Reason for revert: b/279988311 we rename the vendor.modem property so we don't need to add the new rules

Reverted changes: /q/submissionid:22955599-euicc_selinux_fix2

Change-Id: I00cac36ac2f2a23d02c99b9ad9df57061d1ae61c
2023-05-12 04:18:33 +00:00
Jin Jeong
ec4fe33a6a Revert "Add setupwizard_esim_prop to access ro.setupwizard.esim_..."
Revert submission 22899490-euicc_selinux_fix

Reason for revert: b/279988311 we rename the vendor.modem property so we don't need to add the new rules

Reverted changes: /q/submissionid:22899490-euicc_selinux_fix

Change-Id: I0c2bfe55987949ad52f62e468c84df954f39a4ad
2023-05-12 04:17:35 +00:00
Treehugger Robot
5b5bd68861 Merge "Allow camera service to access "ro.camera.disableJpegR" property" into udc-dev am: 1d32d9af19
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23148868

Change-Id: Ic37531e3493098a6d935eb27aef6a4d50591177b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-11 18:44:07 +00:00
Treehugger Robot
1d32d9af19 Merge "Allow camera service to access "ro.camera.disableJpegR" property" into udc-dev 2023-05-11 18:12:35 +00:00
Martin Stjernholm
3d7093fd7b Allow the ART boot oneshot service to configure ART config properties.
Test: See commit 2691baf9d4f8086902d46b2e340a6e5464857b90 in art/
      (ag/23125728)
Bug: 281850017
Ignore-AOSP-First: Will cherry-pick to AOSP later
Change-Id: I14baf55d07ad559294bd3b7d9562230e78201d25
2023-05-11 13:38:57 +01:00
Emilian Peev
9e505e2ee7 Allow camera service to access "ro.camera.disableJpegR" property
Additionally enable access to 'ro.camera.enableCompositeAPI0JpegR'

Ignore-AOSP-First: Cherrypick
Bug: 262265296
Test: Manual using adb shell dumpsys media.camera with
property enabled and disabled

Change-Id: I8ae75d06eb7f2a5fff03fb9f8ffda94079f287e7
2023-05-10 16:44:19 -07:00