Commit graph

16054 commits

Author SHA1 Message Date
Dario Freni
fc3dcaa992 Merge "Add a rule for /product-services partition."
am: 512e1c4d09

Change-Id: I452b2ac620461bc7d16dda8a0ec9855a8dbfd593
2018-06-22 02:18:05 -07:00
Dario Freni
512e1c4d09 Merge "Add a rule for /product-services partition." 2018-06-22 09:11:17 +00:00
Jeff Vander Stoep
0597ade15c Update socket ioctl restrictions
Grant access to icmp_socket to netdomain. This was previously
labeled as rawip_socket which apps are allowed to use. Neverallow
all other new socket types for apps.

Kernels versions > 4.9 redefine ICMP sockets from rawip_socket
to icmp_socket. To pass neverallow tests, we need to define
which IOCTLs are allowed (and disallowed).

Note that this does not change behavior on devices with
kernel versions <=4.9. However, it is necessary (although not
sufficient) to pass CTS on kernel version 4.14.

Bug: 110520616
Test: Grant icmp_socket in net.te and build.
Change-Id: I5c7cb6867d1a4cd1554a8da0d55daa8e06daf803
2018-06-22 05:35:07 +00:00
Neil Fuller
ee95f80d5a Merge "Remove unnecessary permission" am: 981aac14a3
am: f351f7c662

Change-Id: I0989e9a96a86f59148002755648230eae04dbdd9
2018-06-21 13:36:07 -07:00
Neil Fuller
f351f7c662 Merge "Remove unnecessary permission"
am: 981aac14a3

Change-Id: I0d15f9bb47e3c77256f8c904662bedccd55333f3
2018-06-21 13:33:04 -07:00
Treehugger Robot
981aac14a3 Merge "Remove unnecessary permission" 2018-06-21 20:26:02 +00:00
Eino-Ville Talvala
d375e733fe Make system property audio.camerasound.force a vendor-writable property,
This property is read by the audio service in system server to toggle camera shutter sound
enforcement on a device-specific basis.

Test: Camera shutter sound enforcement works when audio.camerasound.force is set
Bug: 110126976
Change-Id: I2720d3c699c4712d1a328f59dde0b16bbf1016f3
2018-06-21 13:12:48 -07:00
Dario Freni
53a0763703 Add a rule for /product-services partition.
Like /system and /product, /product-services will contain apps that
should have the same privileges as the one in other system partitions.

Bug: 80741439
Test: successfully tested e2e on two devices, one with
/product-services partition and another with /product-services
symlinking to -> /system/product-services
Change-Id: Ieee7a9a7641a178f44bb406dbdef39ed46713899
2018-06-21 17:08:10 +01:00
Inseob Kim
69eb53f567 Merge "Suppress denial for ueventd to getattr" am: 2c4896852f
am: cbc9362685

Change-Id: I1d3bc03fe196af47abae43ac242aee197d71c9bf
2018-06-20 22:19:36 -07:00
Inseob Kim
cbc9362685 Merge "Suppress denial for ueventd to getattr"
am: 2c4896852f

Change-Id: Id1617e2d98be5bc10784337e7c2758843dfeb960
2018-06-20 22:17:32 -07:00
Treehugger Robot
2c4896852f Merge "Suppress denial for ueventd to getattr" 2018-06-21 05:05:17 +00:00
Inseob Kim
d8612deee8 Suppress denial for ueventd to getattr
From now on, linker will resolve dir.${section} paths of ld.config.txt.
This is added to suppress SELinux denial during resolving /postinstall.

Bug: http://b/80422611
Test: on taimen m -j, logcat | grep denied, atest on bionic/linker/tests
Change-Id: I12c2bb76d71ae84055b5026933dcaa6ef2808590
2018-06-21 10:31:25 +09:00
Neil Fuller
ad370abaec sepolicy entries for time zone detector service am: 1662495aec
am: 52494addd2

Change-Id: I70a5591f78dddeb40beadcfa217f7fd3ec7cecac
2018-06-20 09:21:58 -07:00
Neil Fuller
52494addd2 sepolicy entries for time zone detector service
am: 1662495aec

Change-Id: Id2fbe9d5107acf7bb5c78b5349778bc26fdb7f50
2018-06-20 09:19:20 -07:00
Neil Fuller
1662495aec sepolicy entries for time zone detector service
Add sepolicy entries for the new time zone detector service.

The timezonedetector_service will be called from the
telephony process.

Bug: 78217059
Test: make / booted device
Change-Id: Ib719a4bb444b2af7dd71910fb0bd12992df9d88c
2018-06-19 21:13:57 +01:00
Neil Fuller
36641b8aff Merge "Allow telephony to call system service" am: b4425a2742
am: 1b9c2f9631

Change-Id: I46a8e14215122bc8c6034987d90f3934b0a40cea
2018-06-19 10:14:27 -07:00
Neil Fuller
1b9c2f9631 Merge "Allow telephony to call system service"
am: b4425a2742

Change-Id: Id0910d5deffbd05a11a3c6a5dd701bb2c7deddfb
2018-06-19 10:10:34 -07:00
Treehugger Robot
b4425a2742 Merge "Allow telephony to call system service" 2018-06-19 17:02:33 +00:00
Neil Fuller
63c904601b Remove unnecessary permission
There will likely be no need for platform apps
to call the timedetector_service; it was added
in error.

Bug: 78217059
Test: build / boot
Change-Id: Ie299c92a60f26fe6cb00562219e386a9f13e459f
2018-06-19 12:58:09 +01:00
Mark Salyzyn
e44517b03d Merge "access to /proc/slabinfo" am: e0637cfc8e
am: 8bc025a5f7

Change-Id: I5888bcea733c31b2ab76001d6e21996d25a43259
2018-06-15 08:08:43 -07:00
Mark Salyzyn
8bc025a5f7 Merge "access to /proc/slabinfo"
am: e0637cfc8e

Change-Id: Ie5f10c93d27607879db52177cd498eec0d61f782
2018-06-15 08:04:18 -07:00
Treehugger Robot
e0637cfc8e Merge "access to /proc/slabinfo" 2018-06-15 14:54:46 +00:00
John Stultz
d622a71dd3 domain.te: Add map permissions to vendor_config_files am: 3ba03d6110
am: 2795f7b976

Change-Id: Iec3e9e126620538f4d69f64ba4327a56d35267ea
2018-06-15 07:31:00 -07:00
John Stultz
2795f7b976 domain.te: Add map permissions to vendor_config_files
am: 3ba03d6110

Change-Id: I5a3fe73d15dc14570a7518c61b49ac60c14b1330
2018-06-15 07:26:57 -07:00
John Stultz
3ba03d6110 domain.te: Add map permissions to vendor_config_files
For 4.14+ kernels, we need map permissions for vendor_config_files,
for things like kernel loaded firmware blobs, etc.

Change-Id: I8144c50b0239aedf4124569003187cc50c963080
Signed-off-by: John Stultz <john.stultz@linaro.org>
2018-06-14 19:44:34 +00:00
Mark Salyzyn
d6eaed854d access to /proc/slabinfo
init, dumpstate and shell

Test: check avc for init is now gone
Bug: 7232205
Bug: 109821005
Change-Id: I299a0ba29bcc97a97047f12a5c48f6056f5e6de5
2018-06-14 10:18:45 -07:00
Andrew Hsieh
6fb56fa7ab Merge "Add ueventd to mnt_vendor_file neverallow exemption list" am: 22259d11d6
am: 6477ed40d8

Change-Id: I8bf84a2bf7452750dfaaf35abe157bba8fa00c2f
2018-06-14 08:50:04 -07:00
Andrew Hsieh
6477ed40d8 Merge "Add ueventd to mnt_vendor_file neverallow exemption list"
am: 22259d11d6

Change-Id: I42738b80ca0268c8f98a746ef5a4e43db2b207d4
2018-06-14 08:45:33 -07:00
Andrew Hsieh
22259d11d6 Merge "Add ueventd to mnt_vendor_file neverallow exemption list" 2018-06-14 15:37:36 +00:00
Jiyong Park
1e104945d0 Merge changes from topic "sharedlib_in_recovery" am: b6639b0f52
am: b585f6c028

Change-Id: Iee1ad427a6f38b5957292bd9443b5a3842a5dcfc
2018-06-13 17:08:19 -07:00
Jiyong Park
0685c28aa4 adbd is allowed to execute shell in recovery mode am: bacf36480d
am: d147fd8170

Change-Id: Ic9e2f8fbd38b4d246c034c42194583b4d32ab13f
2018-06-13 17:08:05 -07:00
Jiyong Park
b585f6c028 Merge changes from topic "sharedlib_in_recovery"
am: b6639b0f52

Change-Id: Ib8f626662a1e6e9de105bbbf973215e997079aea
2018-06-13 16:44:51 -07:00
Jiyong Park
d147fd8170 adbd is allowed to execute shell in recovery mode
am: bacf36480d

Change-Id: If48e1b57f1ee20f10c5aac5af5ce52b6433a227a
2018-06-13 16:44:28 -07:00
Treehugger Robot
b6639b0f52 Merge changes from topic "sharedlib_in_recovery"
* changes:
  init is a dynamic executable
  adbd is allowed to execute shell in recovery mode
2018-06-13 23:14:29 +00:00
Jiyong Park
90b21ee4b4 init is a dynamic executable
init is now a dynamic executable. So it has to be able to execute the
dynamic linker (/system/bin/linker) and shared libraries (e.g.,
/system/lib/libc.so). Furthermore, when in recovery mode, the files are
all labeled as rootfs - because the recovery ramdisk does not support
xattr, so files of type rootfs is allowed to be executed.

Do the same for kernel and ueventd because they are executing the init
executable.

Bug: 63673171
Test: `adb reboot recovery; adb devices` shows the device ID
Change-Id: Ic6225bb8e129a00771e1455e259ff28241b70396
2018-06-14 01:56:36 +09:00
padarshr
44ae7c2ccb Add ueventd to mnt_vendor_file neverallow exemption list
Legacy hardware and code still depends on the ueventd helpers to
locate the firmware supported files which are on new mount path
labeled with mnt_vendot_file. For ueventd helper to work we need dir search
and read permission on this new label so moving ueventd to exempted list.

Already ueventd has the vendor_file_type read access.

Bug:110083808

Change-Id: Ia15cc39ecef9e29b4f1f684efdddbeb78b427988
2018-06-13 17:20:34 +05:30
Mark Salyzyn
f9f3a1af38 Merge "persist.sys.boot.reason is cleared once read by bootstat" am: 752bde548f
am: 6b2715cc0d

Change-Id: Ia4fa71160e6d24c9473cb8a717feca9c63067f10
2018-06-12 15:13:32 -07:00
Mark Salyzyn
6b2715cc0d Merge "persist.sys.boot.reason is cleared once read by bootstat"
am: 752bde548f

Change-Id: Ifbd311d8425fcd9caffe61c41400fbbfedb356c7
2018-06-12 14:10:01 -07:00
Treehugger Robot
752bde548f Merge "persist.sys.boot.reason is cleared once read by bootstat" 2018-06-12 19:19:57 +00:00
Steven Moreland
9cff0f723a Make hal_allocator use hal_attribute_hwservice. am: 9099638815
am: c31109b8bd

Change-Id: I65660e9e939180b61cabe79c59a5092017a2ad59
2018-06-11 21:32:40 -07:00
Steven Moreland
c31109b8bd Make hal_allocator use hal_attribute_hwservice.
am: 9099638815

Change-Id: I8a7bc7088823a3fe0f5f2f9768d95510cab45293
2018-06-11 20:50:26 -07:00
Steven Moreland
9099638815 Make hal_allocator use hal_attribute_hwservice.
If you can get or serve the hal allocator interface,
you should be a hal_allocator_client or
hal_allocator_server.

Bug: 80319537
Test: boot aosp_walleye and (sanity) take photos
Change-Id: Iea14c67c4aa56df7a74ebdb17e99b78b1d3aa105
2018-06-11 14:44:12 -07:00
Neil Fuller
60d79e487b Allow telephony to call system service
The timedetector_service will be called from the
telephony process

Bug: 78217059
Test: build / local testing with a client
Change-Id: I25dfa4daabaa80e6b5e697ad1b1e2f7f72377702
2018-06-11 21:27:17 +01:00
Mark Salyzyn
a1bce77973 persist.sys.boot.reason is cleared once read by bootstat
To ensure a surprise reboot does not take the last boot reason on
face value especially if coming from more than one boot sessions ago.
We shift and clear the value from persist.sys.boot.reason to
sys.boot.reason.last and establish a correct last reboot reason in
the canonical sys.boot.reason property.  As a result, the power
manager should read the canonical sys.boot.reason for a definitive
result rather than relying on the possibly incorrect values in the
persistent storage.  sys.boot.reason should be a core property as
it represents the canonical boot reason API.

Test: compile
Bug: 86671991
Bug: 63736262
Change-Id: If3742c487d6c0ab69c464f056bf48c786b66a945
2018-06-11 09:30:25 -07:00
Xin Li
8ba8171605 Merge pi-dev-plus-aosp-without-vendor into stage-aosp-master
am: 9e1bcf3107

Change-Id: If76a872c01f8c831ca10c1ad99065ab747edf033
2018-06-09 04:08:45 -07:00
Xin Li
9e1bcf3107 Merge pi-dev-plus-aosp-without-vendor into stage-aosp-master
Bug: 79597307
Change-Id: Id75dd160e87f283c9d3efc8878c2c464397edc39
2018-06-08 11:09:27 -07:00
Jiyong Park
bacf36480d adbd is allowed to execute shell in recovery mode
The shell is now available directly in the recovery ramdisk. We no
longer need to mount system.img to /system as the recovery ramdisk is
self-contained. However, there is a problem that every file in the
ramdisk is labeled as rootfs because the ramdisk does not support xattr.

This CL adds several recovery-only rules that are required to make the
recovery ramdisk self-contained. Most importantly, adbd is allowed to
domain_trans to shell. Also shell is allowe to execute files of type
rootfs. Finally, the recovery is allowed to mount on tmpfs since it now
mounts system.img to /mnt/system.

Bug: 63673171
Test: `adb reboot recovery; adb devices` shows the device ID
Test: `adb root && adb shell` and then
$ lsof -p `pidof adbd` shows that libm.so, libc.so, etc. are loaded from
the /lib directory.

Change-Id: If21b069aee63541344a5ca8939fb9a46ffef4d3e
2018-06-09 02:23:10 +09:00
Neil Fuller
4a77ea5eb3 Merge "Remove references to common_time / commontime" am: 44b86a3e5e
am: 304857d8be

Change-Id: I9d93260c280e8981a051bc4651a4a4942288acfe
2018-06-07 13:18:23 -07:00
Neil Fuller
304857d8be Merge "Remove references to common_time / commontime"
am: 44b86a3e5e

Change-Id: I37d4b227e898d5989e7c2eab7ef06d0b629066ca
2018-06-07 09:53:01 -07:00
Neil Fuller
44b86a3e5e Merge "Remove references to common_time / commontime" 2018-06-07 15:50:06 +00:00