Commit graph

23667 commits

Author SHA1 Message Date
Treehugger Robot
ff42a49df2 Merge "Refine build.prop related properties" 2020-05-20 14:17:56 +00:00
Inseob Kim
fc688b3a7f Refine build.prop related properties
1) build_odm_prop and build_vendor_prop are added

These contexts will contain world-readable properties from
/odm/build.prop and /vendor/build.prop, respectively.

2) move more properties to build_prop

Following properties are set by /system/build.prop and now assigned as
build_prop:

- ro.adb.secure
- ro.build.type
- ro.product.cpu.abi
- ro.product.cpu.abilist
- ro.product.cpu.abilist32
- ro.product.cpu.abilist64
- ro.secure

Following properties are set by init/property_service.cpp and now
assigned as build_prop:

- ro.product.brand
- ro.product.device
- ro.product.manufacturer
- ro.product.model
- ro.product.name

Bug: 71814576
Bug: 155844385
Test: boot device and see no denials
Change-Id: Idd4f81de4d2d0fc4bdec2d7ecb08bb8e078dab58
2020-05-20 07:55:13 +00:00
Inseob Kim
15e5e0a470 Add contexts for init.svc.* props
To remove bad context names "exported*_prop". Other init.svc.*
properties explicitly become system internal prop.

Bug: 155844385
Test: boot and see no denials
Change-Id: I7a3b4103a4cea77035a6e831e3b6a49a45f15a35
2020-05-20 12:08:02 +09:00
Daniel Rosenberg
5f1fe1eaac Merge "Add sdcardfs variable to storage_config_props" 2020-05-19 09:55:01 +00:00
Daniel Rosenberg
afede84ad5 Add sdcardfs variable to storage_config_props
This property allows us to disable sdcardfs if it is present. The old
property ended up getting repurposed, so a new one was needed.
Mediaprovider will also need to access this to determine what actions it
needs to take.

Test: builds
Bug: 155222498
Change-Id: I66ac106613cbb374f54659601e4ba3f61eaecd2f
2020-05-19 00:30:52 -07:00
Treehugger Robot
b8b4a62ded Merge "Move props out of exported3_system_prop" 2020-05-19 03:32:45 +00:00
Inseob Kim
3b82aec204 Move props out of exported3_system_prop
This is to remove bad context name "exported3_system_prop".

- persist.sys.device_provisioned -> provisioned_prop
- sys.retaildemo.enabled -> retaildemo_prop

Bug: 154885206
Test: boot device and see no denials
Change-Id: Ia19a19d93d0689deb56d66fe0b039ace44e4836f
2020-05-19 10:39:20 +09:00
Treehugger Robot
0685cd4c84 Merge "Support TCP based fastbootd in recovery mode." 2020-05-18 17:05:43 +00:00
TeYuan Wang
900c723e1d Allow dumpstate to get thermal and power hal debug info
Bug: 156710131
Test: tested in userdebug with dumpstate.unroot set to true
Change-Id: Iabd636f109e719753fdd650f05e1a7af835c49d7
Signed-off-by: TeYuan Wang <kamewang@google.com>
2020-05-18 10:30:28 +08:00
Alistair Delva
19eab1a117 Merge "Allow sgdisk to use BLKPBSZGET ioctl" 2020-05-17 00:37:55 +00:00
Hongguang Chen
91a5f4e783 Support TCP based fastbootd in recovery mode.
The IPv6 link-local address is used to avoid expose device to out of
network segment.

BUG: 155198345
Test: manual test.
Change-Id: I0ce8c12de9976c01e57a6433c7fb50235e907dc5
2020-05-15 22:23:42 +00:00
Alistair Delva
feda4b1da5 Allow sgdisk to use BLKPBSZGET ioctl
The gpt_fdisk project was updated recently, but sepolicy was not updated
with it :) Now sgdisk can use BLKPBSZGET to detect the physical block
size. Seen on cuttlefish when adding external SD Card support to it.

avc: denied { ioctl } for comm="sgdisk" path="/dev/block/vold/disk:252,16"
dev="tmpfs" ino=8625 ioctlcmd=0x127b scontext=u:r:sgdisk:s0
tcontext=u:object_r:vold_device:s0 tclass=blk_file permissive=0

Bug: 156286088
Change-Id: I9f2df88ee253261b52f3022838380fbb1cab6da0
2020-05-15 10:51:40 -07:00
Inseob Kim
b0de2a8fe8 Merge "Rename system_radio_prop" 2020-05-15 10:01:36 +00:00
Inseob Kim
dc1e5019d6 Rename system_radio_prop
For whatever reason sys.usb.config* has been labeled as
system_radio_prop, which doesn't make sense. Changing context name as
usb_prop. For the same reason exported_system_radio_prop is also
renamed to usb-related names.

Bug: 71814576
Bug: 154885206
Test: m selinux_policy
Change-Id: If30bc620dbeac926a8b9bcde908357fda739a6c1
Merged-In: If30bc620dbeac926a8b9bcde908357fda739a6c1
(cherry picked from commit 44fbcdb677)
2020-05-15 15:06:10 +09:00
Inseob Kim
296d367804 Remove rcs.publish.state
It was used within external/ims to save its internal state. Removing it
from property_contexts as it's deleted now (aosp/1209267).

Bug: 152471138
Test: N/A
Change-Id: I1451390aada3dfff6c147de585cc316c5307c0b4
2020-05-14 20:38:31 +09:00
Nikita Ioffe
7b9d03c1b2 Merge "Allow priv_app to search apex_data_file and read staging_data_file" 2020-05-13 20:15:12 +00:00
Treehugger Robot
69fc359cd4 Merge "servicemanager: add dump fd permissions" 2020-05-13 19:43:34 +00:00
Treehugger Robot
c9767ea276 Merge "incident_service: only disallow untrusted access" 2020-05-13 17:40:18 +00:00
Jeff Vander Stoep
2aa8042f9d incident_service: only disallow untrusted access
Allow device-specific domains to access the incident_service.

Test: build
Bug: 156479626
Change-Id: I3b368c09087e2d3542b70be5aa22f8ef47392221
2020-05-13 15:06:17 +00:00
Inseob Kim
1337e15717 Add new context dalvik_runtime_prop
persist.sys.dalvik.vm.lib.2 is moved to a new context
dalvik_runtime_prop from bad context name.

Bug: 154885206
Test: boot device and see logcat
Change-Id: I9dea95105c266088d5f071bf2d890048f0999b0b
2020-05-13 23:33:03 +09:00
Inseob Kim
4ec6c0a48d Merge "Remove sys.vdso property" 2020-05-13 04:52:06 +00:00
Inseob Kim
6da0ab70d3 Merge "Move media.* properties to media_config_prop" 2020-05-13 03:24:35 +00:00
Inseob Kim
49e71895b3 Remove sys.vdso property
This is an experimental property on Q and doesn't need anymore.

Exempt-From-Owner-Approval: cherry-pick

Bug: 154885206
Test: N/A
Change-Id: I80415edc002345849b375e07fdf5783cf60c2446
Merged-In: I80415edc002345849b375e07fdf5783cf60c2446
(cherry picked from commit 7b59ae50e6)
2020-05-13 11:59:14 +09:00
Treehugger Robot
993baf3954 Merge "Relabel ro.build. properties" 2020-05-13 02:36:54 +00:00
Inseob Kim
bfb10a9bc0 Move media.* properties to media_config_prop
Bug: 154885206
Bug: 155844385
Test: m selinux_policy
Change-Id: Idfbafd29c51f7ce4512ea0d88fc7534e28eb1738
2020-05-13 09:38:08 +09:00
Treehugger Robot
6dc7d85b3a Merge "Add hdmi_config_prop for hdmi properties" 2020-05-13 00:29:40 +00:00
Inseob Kim
8c23925351 Relabel ro.build. properties
- exported_fingerprint_prop is deleted
- other ro.build. properties become build_prop

Bug: 155844385
Test: sepolicy_tests
Change-Id: Ic1194e8e7c23394e5a7c6176f9f9598109bb5fb7
Merged-In: Ic1194e8e7c23394e5a7c6176f9f9598109bb5fb7
(cherry picked from commit 1d63d5d075)
2020-05-13 09:01:47 +09:00
Treehugger Robot
84a78e366d Merge "Transcoding: Add file read/write permission to service." 2020-05-12 22:10:41 +00:00
hkuang
c7f42b2b80 Transcoding: Add file read/write permission to service.
This is needed for the transcoding service to read from the
source fd and write to destination fd.

Bug: 145628554
Test: atest MediaTranscodeManagerTest
Change-Id: Icffed1e402bc2fb593e925de0742c0d7552b50bc
2020-05-12 09:50:24 -07:00
Inseob Kim
df0008802e Add hdmi_config_prop for hdmi properties
To remove bad context names.

Bug: 154885206
Bug: 155844385
Test: m selinux_policy
Change-Id: I5712bf836e07b3b26a51c3433234b986843076ea
2020-05-12 23:04:51 +09:00
Treehugger Robot
dc33d3f15e Merge "Rename context names of zram properties" 2020-05-12 13:12:57 +00:00
Treehugger Robot
a00b1ea2db Merge "Move aac_drc props to aac_drc_prop" 2020-05-12 04:49:56 +00:00
Hangyu Kuang
9c3c870b3c Merge "Transcoding: Enable Transcoding service binder call to app." 2020-05-12 04:48:19 +00:00
Inseob Kim
8880f7700a Merge "Rename contexts of ffs props" 2020-05-12 03:52:18 +00:00
Inseob Kim
36aeb16b86 Rename context names of zram properties
Moving from old bad name "exported*_prop".

Bug: 154885206
Bug: 155844385
Test: m selinux_policy
Change-Id: I21af42980e5e6e2c3cabea6c36825fa2836a55bc
2020-05-12 10:02:31 +09:00
Treehugger Robot
98316f23ab Merge "Move camera config props to camera_config_prop" 2020-05-12 00:16:48 +00:00
Inseob Kim
bdcbcf0742 Move aac_drc props to aac_drc_prop
Bug: 155844385
Test: sepolicy_tests
Change-Id: I1755672b5cef876955f93020c519aaaabf814bbf
2020-05-12 08:21:42 +09:00
Treehugger Robot
339df6263d Merge "Move libc.debug. props to libc_debug_prop" 2020-05-11 22:40:47 +00:00
hkuang
4e622b28ed Transcoding: Enable Transcoding service binder call to app.
This is needed for the transcoding service to callback to the
client through ITranscodingClientCallback interface.

Bug: 145628554
Test: atest MediaTranscodeManagerTest
Change-Id: I239259ed702fa01c235f57e0a96e887472365834
2020-05-11 13:50:41 -07:00
Evan Severson
cfbc6114f9 Merge "Allow permission controller to use radio service" 2020-05-11 16:10:24 +00:00
Inseob Kim
a28428e7bf Move camera config props to camera_config_prop
Bug: 155844385
Test: sepolicy_tests
Change-Id: Iebe81d9af48e68e6499272bd5815e959f5945567
2020-05-11 21:55:26 +09:00
Inseob Kim
9add20f31e Move libc.debug. props to libc_debug_prop
Bug: 155844385
Test: sepolicy_tests
Change-Id: I15421ada0c58c3c8d07d824e83cf44f6c4590ca8
2020-05-11 21:29:26 +09:00
Inseob Kim
bfb3708234 Rename contexts of ffs props
Bug: 71814576
Bug: 154885206
Test: m sepolicy_test
Change-Id: Idacc3635851b14b833bccca177d784f4bb92c763
2020-05-11 21:23:37 +09:00
Inseob Kim
ace36abec5 Add 30.0 mapping files
Steps taken to produce the mapping files:

1. Add prebuilts/api/30.0/plat_pub_versioned.cil from the
/vendor/etc/selinux/plat_pub_versioned.cil file built on rvc-dev with
lunch target aosp_arm64-eng. Add prebuilts/api/30.0/vendor_sepolicy.cil
as an empty file.

2. Add new file private/compat/30.0/30.0.cil by doing the following:
- copy /system/etc/selinux/mapping/30.0.cil from rvc-dev aosp_arm64-eng
device to private/compat/30.0/30.0.cil
- remove all attribute declaration statement (typeattribute ...) and
sort lines alphabetically
- some selinux types were added/renamed/deleted w.r.t 30 sepolicy.
Find all such types using treble_sepolicy_tests_30.0 test.
- for all these types figure out where to map them by looking at
29.0.[ignore.]cil files and add approprite entries to 30.0.[ignore.]cil.

This change also enables treble_sepolicy_tests_30.0 and installs
30.0.cil mapping file onto the device.

Bug: 153661471
Test: m treble_sepolicy_tests_30.0
Test: m 30.0_compat_test
Test: m selinux_policy
Change-Id: I6dfae41fbd5f245119ede540d2c321688d6e7929
2020-05-11 04:32:00 +00:00
Inseob Kim
5131ff6544 DO NOT MERGE Add fake 30.0 prebuilts
This prebuilt is based on the AOSP policy, but slightly manipulated so
that the set of types and attributes are identical with R policy.

Following types are removed.

boot_status_prop
dalvik_config_prop
gnss_device
surfaceflinger_color_prop
surfaceflinger_prop
systemsound_config_prop
vold_config_prop
vold_status_prop

Following type is renamed.

wificond_service -> wifinl80211_service

Bug: 153661471
Test: N/A
Change-Id: I018d5e43f53c2bf721db1d13f5f4be42b9782b29
2020-05-11 13:18:52 +09:00
Inseob Kim
520176a884 Merge "Move audio config props to audio_config_prop" 2020-05-11 02:42:16 +00:00
Evan Severson
1d69ca740e Allow permission controller to use radio service
Test: Observe denial go away
Bug: 153997991
Change-Id: I9a11e226867a5d68f2490f5143963cc66bd09538
2020-05-08 23:49:06 +00:00
Steven Moreland
b0fb5b44f8 servicemanager: add dump fd permissions
Getting hit when bugreport tries to dump this.

Bug: 155835324
Test: adb bugreport, check denials
Change-Id: I189aeba2d3a5dfafccb8f8a4db224db71820faca
2020-05-08 16:05:10 -07:00
Inseob Kim
c4b731d712 Merge "Move ro.lmk. properties to lmkd_config_prop" 2020-05-08 10:44:18 +00:00
Inseob Kim
cc4d888f52 Move ro.lmk. properties to lmkd_config_prop
Bug: 155844385
Test: sepolicy_tests
Change-Id: I6a4412b3e7d3c46eae699bd8e7d2941f56b31773
2020-05-08 12:19:54 +09:00