Commit Graph

138 Commits

Author SHA1 Message Date
followmsi 1b1346af80 flo/deb: Build power.stats@1.0-service.mock 2021-11-30 16:33:19 +01:00
followmsi fb57f2ffa9 flo/deb: sepolicy: Actually define clearkey DRM HIDL service 2021-11-30 16:28:36 +01:00
followmsi 65642af2ce flo: Uprev clearkey DRM HIDL to 1.4 2021-11-25 13:35:03 +01:00
voron00 152e763519 flo/deb: sepolicy: label misc block device to resolve uncrypt denial
Fixes Settings->Erase options->Erase all data and LineageOS updater installation.

Change-Id: I193583783fa5d344ed44b98a00c3281742a67ee0
2021-11-24 14:37:51 +01:00
Nolen Johnson 304415d695 flo: Allow zygote to read bluetooth_prop
* It wants to read ro.boot.btmacaddr, so lets allow it to do so.

Change-Id: If0df1d84de41db537790bf0d6504aeca20e0df50
2021-01-06 13:18:32 +01:00
Kevin F. Haggerty 5ffafc00da flo: sepolicy: Really quiet zygote reading cmdline
Change-Id: I180f434225a966a25cf4f9577e81588c7b2df9d9
2021-01-06 13:18:12 +01:00
Vladimir Oltean c70aae9da9 flo: allow uevent to control sysfs_mmc_host via vold
Change-Id: Iafea09efae38fb82f4019c6d3b3b4bb756cdca0b
2021-01-06 13:14:51 +01:00
Kyle Harrison 02057d8087 flo: sepolicy: Allow access to vendor_security_patch_level_prop
Change-Id: I0d94c97866248b07a30b1ce4dd0d506939dae78c
2020-12-21 16:59:56 +01:00
Daniel Jarai 9c25436315 flo: sepolicy: fix HWC related denials
Change-Id: I55d04db97bcdbbb2f5e05377c2a7dc617d136225
Signed-off-by: Daniel Jarai <jaraidaniel@gmail.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2020-12-21 16:59:18 +01:00
surblazer 08ee8a582a flo: sepolicy: resolve denials for advanced reboot
Change-Id: I3aade1604efb2f2b2939c1831c2b448843bb66d1
2020-12-21 16:58:46 +01:00
Arne Coucheron 65bdcd8c23 flo: sepolicy: Resolve last_kmsg denials
Change-Id: Ib6a00d0c14eb03f1e16b24471736a0b84371152c
2020-12-21 16:58:26 +01:00
Francescodario Cuzzocrea d939b1911d flo: sepolicy: address servicemanager denials
Change-Id: I9014990b02998afc3ce4256c84995b8571bfde7c
2020-12-21 16:57:55 +01:00
Bruno Martins 8a4b0735be Revert "flo: sepolicy: Address hal_graphics_composer_default denials"
This reverts commit bac27239a4.

Reason for revert: 480fed5c24

Change-Id: I48ba8a6b189b00916a42a7488f0a81a1829036ff
2020-12-21 16:50:46 +01:00
Francescodario Cuzzocrea 01a2d103fc flo: sepolicy: allow vold to write read_ahead_kb
I Binder:254_3: type=1400 audit(0.0:104): avc: denied { write } for name="read_ahead_kb" dev="sysfs" ino=17470 scontext=u:r:vold:s0 tcontext=u:object_r:sysfs_mmc_host:s0 tclass=file permissive=1
W auditd  : type=1302 audit(0.0:104): item=0 name="/sys/class/bdi/0:62/read_ahead_kb" inode=17470 dev=00:0d mode=0100644 ouid=0 ogid=0 rdev=00:00 obj=u:object_r:sysfs_mmc_host:s0

Change-Id: Idfb24564df91369d74711a0672debb0adfbc7aa2
2020-12-13 16:12:56 +01:00
Kevin F. Haggerty 55f44aebfc flo: sepolicy: Allow system_app to read /proc/pagetypeinfo
avc: denied { read } for name="pagetypeinfo" dev="proc" ino=4026543033
scontext=u:r:system_app:s0 tcontext=u:object_r:proc_pagetypeinfo:s0
tclass=file permissive=0

Change-Id: I16465eb9acca9ff64a755d47f86f4ff424ebe4de
2020-12-13 16:12:18 +01:00
Kyle Harrison 01ff085307 flo: sepolicy: Fix exported_camera_prop denials
Change-Id: Ib3abf88a4c71fcd1510a9b1a3cd496b85379c8b2
2020-12-13 16:12:07 +01:00
Kyle Harrison c327cda0fd flo: sepolicy: Fix userspace_reboot prop denials
- userspace_reboot_exported_prop
- userspace_reboot_config_prop

Change-Id: Ibec834df41345d1268b1eea4ae88b2fd5d37dd55
2020-12-13 16:11:55 +01:00
sb6596 4305e7daa7 flo: sepolicy: Address hal_graphics_composer_default denials
Change-Id: I97e64405726d247cb9f618484983d87532c9a5f7
2020-12-13 16:11:33 +01:00
Alessandro Astone a71fbc41db flo: sepolicy: Camera rules for new root label
Change-Id: Iae2171eaf2acb77acabba626b7bcf017725ab81a
2020-12-06 21:31:11 +01:00
Alessandro Astone 5b358f7da5 flo: sepolicy: Address health hal denials
Change-Id: Iff814fd2293787fc0ca2eb9d8f15fb5fb1bf8561
2020-12-06 21:26:49 +01:00
followmsi b940a456ff flo/deb: sepolicy: update netmgrd.te 2020-11-30 11:53:02 +01:00
followmsi 9d92737e75 flo/deb: Add gatekeeper@1.0-service.software 2020-11-26 20:53:24 +01:00
followmsi 35a1e8206f flo: Update sepolicies 2020-11-26 20:51:48 +01:00
followmsi b96f053cbe flo/deb: sepolicy: Fix build 2020-11-05 12:58:40 +01:00
followmsi 4da02e91f0 flo: Set selinux label for /firmware
Prevents this build error:
mkuserimg_mke2fs.py ERROR: Failed to run e2fsdroid_cmd: set_selinux_xattr: No such file or directory searching for label "/firmware"

Change-Id: Ia58a78edb01e21724ceedd64c2f5a0ae23018ff3
2019-09-25 19:56:03 +02:00
ripee e2fdd90cf7 flo/deb: sepolicy: rmt: remove dac_override 2019-02-17 15:11:31 +01:00
followmsi e9d3739c75 sepolicy: Pie (bring up) 2019-01-20 01:22:07 +01:00
Artem Borisov fdca3fc513 flo: sepolicy: Resolve cameraserver text relocations
Change-Id: I0366948280f701187e52ead2e0a23fd8eb53e4ac
2018-06-14 17:43:51 +03:00
Artem Borisov c4a61c6b0a flo: sepolicy: Use genfs_contexts for file labeling
Change-Id: I09b02344152cc9315f8baabe879ee16d5e15a9e8
2018-02-10 09:58:29 +00:00
Wei Wang c4376f08be flo: Accelerate boot by paralleling device enable
Some QCOM devices require sysfs to trigger boot/init which are blocking
the init process.
[    7.453205] init: Command 'write /sys/kernel/boot_adsp/boot 1' action=post-fs-data (/init.angler.rc:166) returned 0 took 271.936ms.
This CL is to put those slow to start devices in a
separate service and wait for the service to be done later on.

Bug: 32712851
Test: On device
Change-Id: Idd4e965f122cbc8421b443a41573d363112dfa50
2018-01-13 11:58:00 +00:00
Artem Borisov 3013bfabcd flo: Enable ZRAM
I have backported enough kernel stuff to align our implementation
with android-3.10.
Use ~500MB disk, 4 compression streams, lz4 compression.

Change-Id: I82ee5c43aefb732ee603bdf1ae190e5e9936e660
2018-01-02 22:22:08 +03:00
Jeff Vander Stoep 84a9fe6906 flo: sepolicy: system_server: whitelist MSM ipc router ioctls
avc: denied { ioctl } for pid=3112 path="socket:[29649]" dev="sockfs" ino=29649 ioctlcmd=c302 scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=socket
avc: denied { ioctl } for pid=3112 path="socket:[29647]" dev="sockfs" ino=29647 ioctlcmd=c304 scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=socket

Change-Id: I5018a24464b1160a496e6782284dc8a844b8a114
2017-12-31 00:21:12 +03:00
Artem Borisov 9591753a96 flo: sepolicy: allow system_server to access sensors
Change-Id: I925e12c3663a72876dee0304201b44ce705bef28
2017-12-31 00:21:12 +03:00
Artem Borisov 21daf4bb06 flo: move proprietary modules to vendor
Change-Id: Ie51036d03f391d4581e555980fed2e7afe885b41
2017-12-17 15:10:57 +03:00
Artem Borisov 708fd9a379 flo: move device-specific modules to vendor
Change-Id: I79e26fe58dd393b9da04f3c99b3eadd263c40afa
2017-12-17 15:10:57 +03:00
Emilian Peev 454b55f13f Camera: Use 'hal_client_domain' for graphics allocator
Bug: 35850071
Test: CameraDeviceTest#testCameraDeviceStillTemplate,
CameraDeviceTest#testCameraDeviceRecordingTemplate,
CameraDeviceTest#testCameraDevicePreviewTemplate
Change-Id: I2cc0526ab0d9bc7b4263fb7b34134b06ddaa2e4c
2017-11-11 23:08:53 +03:00
Alex Klyubin 7f03e75fe1 Move Camera HAL policy to hal_camera
This moves cameraserver domain policy to do with Camera HAL running
inside that domain into hal_camera. cameraserver is now associated
with hal_camera.

Test: Taking photod and recording videos using Google Camera works
Bug: 34170079
Change-Id: I3031f1cdeebe0773f765adffa8c0bd617ab2cebd
2017-11-11 23:08:41 +03:00
Jeff Vander Stoep 3e14c2304b Label camera device and add permissions
(cherry picked from commit 15f5ee011a51e9e7574d1ecb1b82658281d294be)

Grant access to qualcomm camera daemon.

Bug: 28359909
Change-Id: I92520b4c9fe5d94a6c191f40963fec6b6ed1acb4
2017-11-11 23:08:36 +03:00
Artem Borisov f2aec8ace4 sepolicy: bring back hci_attach policy
Change-Id: I2072c3a88247a1f40f596d1dfae93bf23078e4e6
2017-09-20 20:56:48 +00:00
Jeff Vander Stoep 165b4ae091 Enforce ioctl command whitelisting on all sockets
Remove the ioctl permission for most socket types. For others, such as
tcp/udp/rawip/unix_dgram/unix_stream set a default unprivileged whitelist
that individual domains may extend (except where neverallowed like
untrusted_app). Enforce via a neverallowxperm rule.

Change-Id: I7573fdb24f9c53ad169bce2aeab1baac8b2a11ea
2017-09-20 20:56:43 +00:00
Jeff Vander Stoep 96b92e3361 deprecate domain_deprecated
Move device specific policy to a local device_domain_deprecated attribute
to focus effort on core policy.

Bug: 28760354
Change-Id: Id08cc74a3a2c7b8ff242b3c6f26bd514e6855a48
2017-09-20 20:56:38 +00:00
Simon Shields ab4c632c9d flo: N sepolicy bringup
Change-Id: I23c887880addf2cfc208b36f1bfc5ee6fb53921a
2016-11-12 03:44:27 -07:00
William Roberts 07c9e60de0 camera_device: remove type
camera_device didn't really offer much in terms of control considering
that most domains that need camera_device, also need video_device and
vice versa.

Thus, drop camera_device from the policy.

Change-Id: Ib7773985ba3b93537702b113a2deb5d2f6f3c7ef
2016-01-12 13:36:22 -08:00
William Roberts 59cea117cf perfprofd: update unix_socket_connect to set_prop
perfprofd was generating warnings when being built that
it was using the deprecated unix_socket_connect() macro
to access the init property subsystem.

To correct this, change this to use the newer set_prop()
macro.

Change-Id: I622c554b0238ffbc00b40a966558df684be750d4
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-01-08 09:27:10 -08:00
Jeff Vander Stoep 46ffda988c Grant all processes the domain_deprecated attribute
Bug: 25433265
Change-Id: I28965b310dd8a721662e02bd585985ab43ba57a3
2015-11-03 15:53:39 -08:00
Nick Kralevich 1cddd4cf6d mediaserver: remove text relocation support
No longer needed.

Bug: 20013628
Change-Id: I8dbd2996c56261f2c7ba9cfa347998a253710ccf
2015-10-27 16:58:02 -07:00
Nick Kralevich ef4ee0e178 am 74c97c70: Merge "Only allow toolbox exec where /system exec was already allowed."
* commit '74c97c70caa4140ce22b9b9c44e6948164bdcdc1':
  Only allow toolbox exec where /system exec was already allowed.
2015-08-25 23:39:25 +00:00
Stephen Smalley 078640e521 Only allow toolbox exec where /system exec was already allowed.
When the toolbox domain was introduced, we allowed all domains to exec it
to avoid breakage.  However, only domains that were previously allowed the
ability to exec /system files would have been able to do this prior to the
introduction of the toolbox domain.  Remove the rule from domain.te and add
rules to all domains that are already allowed execute_no_trans to system_file.
Requires coordination with device-specific policy changes with the same Change-Id.

Change-Id: Ie46209f0412f9914857dc3d7c6b0917b7031aae5
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-08-25 11:47:23 -04:00
dcashman d61cbb2053 am e4b16d70: Merge "Allow init to create /mnt/sdcard symlink." into mnc-dev
* commit 'e4b16d7055f6a971af88a0a93a4371f5fd7e00a5':
  Allow init to create /mnt/sdcard symlink.
2015-06-30 22:02:06 +00:00
dcashman 0687046f35 Allow init to create /mnt/sdcard symlink.
Addresses the following denial:
avc:  denied  { create } for  pid=1 comm="init" name="sdcard" scontext=u:r:init:s0 tcontext=u:object_r:tmpfs:s0 tclass=lnk_file permissive=0

Bug: 22084499
Change-Id: Icffef8330d07b00f36fda11374e39e0df7181ca3
2015-06-30 09:25:29 -07:00