Commit graph

187 commits

Author SHA1 Message Date
Inseob Kim
162b259fed Remove exported3_default_prop
Bug: 155844385
Test: m selinux_policy
Change-Id: Ib0dc95ca2a90545286583c157d3570225ae35602
2020-07-21 04:16:04 +00:00
Inseob Kim
c97a97cd3f Move more properties out of exported3_default_prop
This is to remove exported3_default_prop. Contexts of these properties
are changed.

- ro.boot.wificountrycode
This becomes wifi_config_prop

- ro.opengles.version
This becomes graphics_config_prop. Also it's read by various domains, so
graphics_config_prop is now readable from coredomain.

- persist.config.calibration_fac
This becomes camera_calibration_prop. It's only readable by appdomain.

Bug: 155844385
Test: no denials on Pixel devices
Test: connect wifi
Change-Id: If2b6c10fa124e29d1612a8f94ae18b223849e2a9
2020-07-21 13:11:57 +09:00
Inseob Kim
c80b024241 Relabel various exported3_default_prop
This removes bad context names "exported*_prop". Property contexts of
following properties are changed. All properties are settable only by
vendor-init.

- ro.config.per_app_memcg
This becomes lmkd_config_prop.

- ro.zygote
This becomes dalvik_config_prop.

- ro.oem_unlock_supported
This becomes oem_unlock_prop. It's readable by system_app which includes
Settings apps.

- ro.storage_manager.enabled
This becomes storagemanagr_config_prop. It's readable by coredomain.
Various domains in coredomain seem to read it.

- sendbug.preferred.domain
This bcomes sendbug_config_prop. It's readable by appdomain.

There are still 3 more exported3_default_prop, which are going to be
tracked individually.

Bug: 155844385
Test: selinux denial check on Pixel devices
Change-Id: I340c903ca7bda98a92d0f157c65f6833ed00df05
2020-07-20 16:11:58 +09:00
Inseob Kim
3dbf3d8ac8 Add wifi_hal_prop and remove exported_wifi_prop
To remove bad context names "exported*_prop"

Bug: 155844385
Test: boot and see no denials
Change-Id: Icd30be64355699618735d4012461835eca8cd651
Merged-In: Icd30be64355699618735d4012461835eca8cd651
(cherry picked from commit 37c2d4d0c9)
(cherry picked from commit 3b66e9b9f8)
2020-07-17 17:38:13 +09:00
Inseob Kim
3b66e9b9f8 Add wifi_hal_prop and remove exported_wifi_prop
To remove bad context names "exported*_prop"

Bug: 155844385
Test: boot and see no denials
Change-Id: Icd30be64355699618735d4012461835eca8cd651
Merged-In: Icd30be64355699618735d4012461835eca8cd651
(cherry picked from commit 37c2d4d0c9)
2020-07-17 14:01:17 +09:00
Alexander Mishkovets
d2b485e4bc Merge "Define sepolicy for locale filter property" am: abe9923ef5 am: 64bd525035
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1358091

Change-Id: Ib9acdb32ae3f22d29eeec35c1249a9ff64329b68
2020-07-13 16:50:33 +00:00
Alexander Mishkovets
f0be89be1d Define sepolicy for locale filter property
Bug: 154133013
Test: Manual
Change-Id: I28ae279e4fd47553fcf4ab9421944f552490b49f
2020-07-09 20:32:58 +02:00
Inseob Kim
9a11060432 Merge "Add keyguard_config_prop for keyguard property" am: d702d3fae1 am: 703c99cfae
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1355669

Change-Id: I5c374c8f128e48cbdc1c9446332b901582c826d1
2020-07-08 03:47:53 +00:00
Inseob Kim
04f435ca52 Add keyguard_config_prop for keyguard property
keyguard.no_require_sim becomes keyguard_config_prop to remove
exported*_default_prop

Bug: 155844385
Test: boot and see no denials
Change-Id: Icffa88b650a1d35d8c1cd29f89daf0644a79ddd3
2020-07-07 12:46:24 +09:00
Inseob Kim
5eacf72460 Allow apps to read packagemanager_config_prop
To fix regression of CTS privappPermissionsMustBeEnforced

Bug: 159647344
Test: atest PrivappPermissionsTest#privappPermissionsMustBeEnforced
Change-Id: I88af05305f9aef6e813d0a72adad63b6b8f99487
Merged-In: I88af05305f9aef6e813d0a72adad63b6b8f99487
2020-07-01 02:29:53 +00:00
Inseob Kim
bb3703c424 Allow apps to read packagemanager_config_prop
To fix regression of CTS privappPermissionsMustBeEnforced

Bug: 159647344
Test: atest PrivappPermissionsTest#privappPermissionsMustBeEnforced
Change-Id: I88af05305f9aef6e813d0a72adad63b6b8f99487
2020-07-01 09:54:48 +09:00
Inseob Kim
6ffdf1b001 Add new context packagemanager_config_prop
To remove bad context names exported[23]_default_prop

Bug: 155844385
Test: m selinux_policy
Change-Id: Ic4bbc8e45d810368a96f6985c2234798e73be82d
Merged-In: Ic4bbc8e45d810368a96f6985c2234798e73be82d
(cherry picked from commit 072b01438e)
2020-06-19 17:47:19 +09:00
Inseob Kim
072b01438e Add new context packagemanager_config_prop
To remove bad context names exported[23]_default_prop

Bug: 155844385
Test: m selinux_policy
Change-Id: Ic4bbc8e45d810368a96f6985c2234798e73be82d
2020-06-19 12:12:35 +09:00
Midas Chien
0d0391f931 sepolicy: allow surfaceflinger to set surfaceflinger_display_prop
W//system/bin/init: type=1107 audit(0.0:51): uid=0 auid=4294967295
ses=4294967295 subj=u:r:init:s0 msg='avc: denied { set }
for property=graphics.display.kernel_idle_timer.enabled pid=643
uid=1000 gid=1003 scontext=u:r:surfaceflinger:s0
tcontext=u:object_r:surfaceflinger_display_prop:s0
tclass=property_service permissive=0

Bug: 157513573
Test: surfaceflinger can set graphics.display.kernel_idle_timer.enabled
Test: vendor_init can get graphics.display.kernel_idle_timer.enabled
Change-Id: I78023a7857c8aa81a8863010b875bcb885bae614
2020-06-19 01:45:34 +08:00
Amy Hsu
0f352fbd98 resolve merge conflicts of 98412ab604 to rvc-dev-plus-aosp
Test: I solemnly swear I tested this conflict resolution.
Bug: None
Change-Id: I831c2feb3b86bfa2008ef6e5b74e81399d8145d8
2020-06-15 17:04:12 +08:00
Peiyong Lin
37dea070ce Update sepolicy for GPU profiling properties.
A device must indicate whether GPU profiling is supported or not through
setting these two properties properly. CTS needs to read these two
properties in order to run corresponding compliance tests. Hence need to
update sepolicy for these two properties.

Bug: b/157832445
Test: Test on Pixel 4
Change-Id: I6f400ecbbd5e78b645bb620fa24747e9367c2ff3
Merged-In: I6f400ecbbd5e78b645bb620fa24747e9367c2ff3
2020-06-05 12:03:29 -07:00
Peiyong Lin
fbfa8ce0ae Update sepolicy for GPU profiling properties.
A device must indicate whether GPU profiling is supported or not through
setting these two properties properly. CTS needs to read these two
properties in order to run corresponding compliance tests. Hence need to
update sepolicy for these two properties.

Bug: b/157832445
Test: Test on Pixel 4
Change-Id: I6f400ecbbd5e78b645bb620fa24747e9367c2ff3
2020-06-04 20:27:01 -07:00
Inseob Kim
285da2f376 Relax neverallow on telephony props conditionally
vendor_init is allowed to write any properties except for system
internal and system restricted props for old devices. Relaxing telephony
props to avoid build breakage.

Bug: N/A
Test: m selinux_policy with not_compatible_property
Change-Id: I1346a87b774099c837c329b977fbd993202af65b
2020-06-04 13:14:10 +00:00
Inseob Kim
ad6317018c Add contexts for exported telephony props
To remove bad context names, two contexts are added.

- telephony_config_prop
- telephony_status_prop

exported_radio_prop, exported2_radio_prop are removed. Cleaning up
exported3_radio_prop will be a follow-up task.

Exempt-From-Owner-Approval: cherry-pick

Bug: 152471138
Bug: 155844385
Test: boot and see no denials
Test: usim works on blueline
Change-Id: Iff9a4635c709f3ebe266cd811df3a1b4d3a242c2
Merged-In: Iff9a4635c709f3ebe266cd811df3a1b4d3a242c2
(cherry picked from commit 4d36eae8af)
2020-06-04 16:10:44 +09: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
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
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
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
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
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
dc33d3f15e Merge "Rename context names of zram properties" 2020-05-12 13:12:57 +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
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
721d921aa5 Rename surfaceflinger properties' contexts
Cleaning up exported*_system_prop and moving surfaceflinger properties
to new property contexts.

Bug: 152468529
Bug: 154885206
Test: boot cf_x86 and crosshatch
Change-Id: I7f8a684e9cbabce2f55a5292d7b2283ac0716cd9
2020-04-29 10:43:06 +09:00
Inseob Kim
d8c39d9e56 Rename exported_dalvik_prop to dalvik_config_prop
This is to clean up bad name "exported_dalvik_prop"

Bug: 154465224
Test: sepolicy_tests
Test: treble_sepolicy_tests 26.0 ~ 29.0
Change-Id: Ie5e738b5985c1db1bca7a857971d8490a7980b5b
2020-04-20 19:37:34 +09:00
Inseob Kim
3f5a7d247a Rename exported and exported2 vold prop
This is a subtask to clean up bad context names "exported*_prop".

Bug: 152469526
Test: m
Change-Id: Ie2d4046732e9d6562294fa664dcd7f019aa7c229
2020-04-07 12:56:23 +09:00
Inseob Kim
fd2d6ec3bc Rename exported2_config_prop to systemsound_config_prop
Fixing bad names (exported*_prop) on property contexts.

Bug: 152468650
Test: m sepolicy_tests
Change-Id: Ie98212ee0fa89966e70faa83322b65b613f3b3f5
2020-04-01 18:23:39 +09:00
Inseob Kim
bbae4a9a1c Move some system internal props to private
This completely hides system internal properties (which are meant to be
used only in system) when compiling sepolicy of vendor, product, etc.

Bug: 150331497
Test: system/sepolicy/tools/build_policies.sh
Change-Id: I4fc060f5973b7483c7f8502c40ef0a61f75ff088
Merged-In: I4fc060f5973b7483c7f8502c40ef0a61f75ff088
(cherry picked from commit c492c06e14)
2020-03-20 13:20:19 +09:00
Inseob Kim
55e5c9b513 Move system property rules to private
public/property split is landed to selectively export public types to
vendors. So rules happening within system should be in private. This
introduces private/property.te and moves all allow and neverallow rules
from any coredomains to system defiend properties.

Bug: 150331497
Test: system/sepolicy/tools/build_policies.sh
Change-Id: I0d929024ae9f4ae3830d4bf3d59e999febb22cbe
Merged-In: I0d929024ae9f4ae3830d4bf3d59e999febb22cbe
(cherry picked from commit 42c7d8966c)
2020-03-18 16:46:04 +00:00