Commit graph

12043 commits

Author SHA1 Message Date
Dan Willemsen
a30b6a5c08 Merge "Fix libsepolwrap with SANITIZE_HOST=address" am: cdaf97bfbf
am: 4deeab5cde

Change-Id: I74319e51a152ba35fdf076a4dffdeeb0dc69763b
2017-09-01 23:51:26 +00:00
Dan Willemsen
4deeab5cde Merge "Fix libsepolwrap with SANITIZE_HOST=address"
am: cdaf97bfbf

Change-Id: Ibcb3d728c233530f7354b409bf3849a021532b5d
2017-09-01 23:38:16 +00:00
Treehugger Robot
cdaf97bfbf Merge "Fix libsepolwrap with SANITIZE_HOST=address" 2017-09-01 23:21:39 +00:00
Dan Willemsen
948354abb9 Fix libsepolwrap with SANITIZE_HOST=address
Test: SANITIZE_HOST=true m treble_sepolicy_tests
Change-Id: I9190dc06715bbbac8a267a143801f99f911decf3
2017-09-01 14:08:46 -07:00
Robert Benea
fa85fac771 Merge "Allow lmkd read memcg stats." am: b22278e4a7
am: adf685701b

Change-Id: Ida2b4c0d8f400c753566861bd48bcf5459fc40b7
2017-09-01 21:01:19 +00:00
Robert Benea
adf685701b Merge "Allow lmkd read memcg stats."
am: b22278e4a7

Change-Id: Id1c46283531412a75ffe46f1beb26d5cdc732b8f
2017-09-01 20:54:49 +00:00
Robert Benea
b22278e4a7 Merge "Allow lmkd read memcg stats." 2017-09-01 20:45:01 +00:00
Lazar Trsic
9a5d0035b2 Fix TIOCSCTTY ioctl definition for mips am: f58f1499c1
am: 1019861ba9

Change-Id: Id63c00a6cef89bd745947d9611d08b522426d8d1
2017-08-31 19:35:43 +00:00
Lazar Trsic
1019861ba9 Fix TIOCSCTTY ioctl definition for mips
am: f58f1499c1

Change-Id: Id2eecfe21cfffec6ef95a194f0119d19ef43573e
2017-08-31 19:32:44 +00:00
Lazar Trsic
f58f1499c1 Fix TIOCSCTTY ioctl definition for mips
Change-Id: I721a48a441c4a416c1119b17086462f7cb8e5097
2017-08-31 18:16:46 +02:00
Bowgo Tsai
811eed7855 Merge "Moving adbd from rootdir to system/bin" am: 851d5b64da
am: 03015901e3

Change-Id: I9d37f7b1b15b32e2f9b69bbddd30276611019924
2017-08-31 06:36:04 +00:00
Bowgo Tsai
03015901e3 Merge "Moving adbd from rootdir to system/bin"
am: 851d5b64da

Change-Id: Idc8aef8e3d250b7b7f40d0a51a528988f629298c
2017-08-31 06:30:55 +00:00
Treehugger Robot
851d5b64da Merge "Moving adbd from rootdir to system/bin" 2017-08-31 06:22:15 +00:00
Robert Benea
1a05283cd9 Allow lmkd read memcg stats.
Currently lmkd is not able to read memcg info. The mem/swap usage
info are used by lmkd to ugrade medium pressure events to critical
level.

Test: tested on gobo
Bug: 65180281
Change-Id: I19d0eb53d5e754c176ffeda1b5d07049e6af8570
2017-08-30 14:02:38 -07:00
Ed Coyne
99ee8b979a Allow sepolicies granting bootanim exec on /oem. am: 6a1e6a9c52
am: 6fea1f4fc9

Change-Id: I0de11e3aea6a0aa41305078a5f37161fc2392fa2
2017-08-29 21:38:32 +00:00
Ed Coyne
6fea1f4fc9 Allow sepolicies granting bootanim exec on /oem.
am: 6a1e6a9c52

Change-Id: I2584b969c384083fc3601a2213cf0037d4e88bda
2017-08-29 21:32:32 +00:00
Ed Coyne
6a1e6a9c52 Allow sepolicies granting bootanim exec on /oem.
Iot would like to allow bootanim to load libraries from /oem but in order for
device-specfic sepolicies to grant exec this global restriction needs to
be relaxed.

Bug: 37992717
Test: Tested with Iot sepolicies in effect and bootanim can exec.
Change-Id: I6462bf510562eb3fb06304e50b68fba05d37b285
2017-08-29 16:58:20 +00:00
Jeff Vander Stoep
cfb90ea790 Merge "Allow all domains to stat symlinks in sysfs" am: 94e3dfc3a5
am: 9d23d8ebc0

Change-Id: Icdf8cf91dc3dd5e8c778e50138d61aca215dd83a
2017-08-29 02:49:35 +00:00
Jeff Vander Stoep
9d23d8ebc0 Merge "Allow all domains to stat symlinks in sysfs"
am: 94e3dfc3a5

Change-Id: I63f038889fcf85c9393ec78ae0ac8a30b5806707
2017-08-29 02:46:05 +00:00
Treehugger Robot
94e3dfc3a5 Merge "Allow all domains to stat symlinks in sysfs" 2017-08-29 02:35:32 +00:00
Jeff Vander Stoep
8d021a9496 Allow all domains to stat symlinks in sysfs
This is needed to retain app's previous access to
/sys/devices/system/cpu. When these files were previously
labeled in file_contexts, symlinks were labeled as
sysfs_devices_system_cpu. When labeling was moved to genfs_contexts
symlinks all have the default sysfs label.

avc: denied { getattr } for comm="main"
path="/sys/devices/system/cpu/cpu0/cpufreq" dev="sysfs" ino=41897
scontext=u:r:untrusted_app_25:s0:c512,c768
tcontext=u:object_r:sysfs:s0 tclass=lnk_file permissive=0

Change-Id: Idaa565390bca13d3819e147fcea4214956c0f589
Bug: 64270911
Test: build aosp_marlin
2017-08-28 14:50:56 -07:00
Bowgo Tsai
5846c79e80 Moving adbd from rootdir to system/bin
Bug: 63910933
Test: boot sailfish in normal mode, checks adbd is started
Test: boot sailfish in recovery mode, checks adbd is started
Test: boot bullhead in normal mode, checks adbd is started
Test: boot bullhead in recovery mode, checks adbd is started

Change-Id: I35ed78a15a34626fbd3c21d030e2bf51033f7b79
Merged-In: I35ed78a15a34626fbd3c21d030e2bf51033f7b79
(cherry picked from commit e2423d149b)
2017-08-28 17:38:13 +08:00
Mark Salyzyn
e5f67cb590 Merge "Switch /data/misc/reboot/last_reboot_reason to persistent property" am: d27aee3322
am: e028be05dc

Change-Id: I835ca57fa962cd382646604139fc56c742b2de97
2017-08-25 14:37:49 +00:00
Mark Salyzyn
e028be05dc Merge "Switch /data/misc/reboot/last_reboot_reason to persistent property"
am: d27aee3322

Change-Id: Ia64de6f9da61ce31ae10d8258a3692ce5a0e5815
2017-08-25 14:25:50 +00:00
Mark Salyzyn
d27aee3322 Merge "Switch /data/misc/reboot/last_reboot_reason to persistent property" 2017-08-25 14:16:12 +00:00
Dan Cashman
0019463618 Add sepolicy definitions.mk and create policy.conf function. am: 36ee91d4b5
am: b1b36bf214

Change-Id: I7cf6a6cf435022cb56a1b4899158fb5f390390fe
2017-08-25 07:21:20 +00:00
Dan Cashman
b1b36bf214 Add sepolicy definitions.mk and create policy.conf function.
am: 36ee91d4b5

Change-Id: I9af35533587e962c63b6dd2543b047bf9899fb5e
2017-08-25 07:17:30 +00:00
Dan Cashman
36ee91d4b5 Add sepolicy definitions.mk and create policy.conf function.
Bug: 36899958
Test: Builds 'n' boots.
Change-Id: I5836a18f9d0a9a976dda7304045e3b9e1e84565e
Merged-In: I5836a18f9d0a9a976dda7304045e3b9e1e84565e
(cherry picked from commit c0713e8679)
2017-08-25 15:08:45 +08:00
Mark Salyzyn
006c2e9934 Switch /data/misc/reboot/last_reboot_reason to persistent property
Switch from /data/misc/reboot/last_reboot_reason to persistent
Android property persist.sys.boot.reason for indicating why the
device is rebooted or shutdown.

Introduce protection for all boot reason properties

Protect the following properties with these labels

ro.boot.bootreason      u:object_r:bootloader_boot_reason_prop:s0
sys.boot.reason         u:object_r:sys_boot_reason_prop:s0
persist.sys.boot.reason u:object_r:last_boot_reason_prop:s0

Setup the current as-need access rules for each.

ToDo: Remove u:object_r:reboot_data_file after internal fixes.

Test: system/core/bootstat/boot_reason_test.sh
Bug: 64687998
Change-Id: I3771c73933e8ae2d94aee936c7a38b6282611b80
2017-08-24 15:19:30 -07:00
Jeff Vander Stoep
b519a9ad07 Merge "move build dependencies to sepolicy" am: 99cbe530c1
am: 5d478edd41

Change-Id: If2fc3e9b14cd672d9989f4023b665d70e938b5af
2017-08-23 22:04:19 +00:00
Jeff Vander Stoep
5d478edd41 Merge "move build dependencies to sepolicy"
am: 99cbe530c1

Change-Id: I008a9509e758cee7802030e1146bbf140b31ba78
2017-08-23 21:58:36 +00:00
Treehugger Robot
99cbe530c1 Merge "move build dependencies to sepolicy" 2017-08-23 21:31:31 +00:00
Alex Light
f32e1b11f9 Grant cppreopts.sh permissions to cleanup if it fails am: 9cd2abc2a2
am: d9918e1205

Change-Id: Ifc423169476761cb9abd840b75088869c02a76bd
2017-08-23 19:49:53 +00:00
Alex Light
d9918e1205 Grant cppreopts.sh permissions to cleanup if it fails
am: 9cd2abc2a2

Change-Id: Ia6c246e2c33453ffcdee628266553a9dbde7da22
2017-08-23 19:46:58 +00:00
Alex Light
9cd2abc2a2 Grant cppreopts.sh permissions to cleanup if it fails
If cppreopts.sh failed to copy files for some reason it would leave
the temporary files sitting around in the data directory. This changes
the selinux rules so that cppreopts is able to get rid of these
temporary files.

Test: phone boots.
Bug: 63995897
Change-Id: I2a7e654c3a3cee7c9f0be8ba64e40c365eee4cfe
2017-08-23 16:00:23 +00:00
John Stultz
d15ac5ba36 sepolicy: Define and allow map permission for vendor dir am: 24537b2e96 am: e63f7f32ac
am: 01cd12a0d6

Change-Id: I4318fedbee9c45b7a3b738743dfac59a76329336
2017-08-23 15:07:56 +00:00
John Stultz
01cd12a0d6 sepolicy: Define and allow map permission for vendor dir am: 24537b2e96
am: e63f7f32ac

Change-Id: If629064af97961fdf4fe6914661f2336cf3a1795
2017-08-23 15:03:55 +00:00
John Stultz
e63f7f32ac sepolicy: Define and allow map permission for vendor dir
am: 24537b2e96

Change-Id: I5033a96073010904191b0761112adce076c1d001
2017-08-23 14:59:55 +00:00
John Stultz
24537b2e96 sepolicy: Define and allow map permission for vendor dir
This patch tries to provide similar functionality as the previous
change made here:
https://android-review.googlesource.com/#/c/platform/system/sepolicy/+/432339/

Only, making sure we add the same map permissions for the vendor
directory.

Change-Id: Ia965df2881cdee8bb5d81278a1eb740def582871
Signed-off-by: John Stultz <john.stultz@linaro.org>
2017-08-23 05:41:36 +00:00
Jeff Vander Stoep
13fb5ed305 move build dependencies to sepolicy
Some selinux build packages are defined in embedded.mk,
others are defined in system/sepolicy/Android.mk. Move all
to sepolicy as a dependency of the phony package selinux_policy
which is defined in embedded.mk.

Test: build Marlin (Treble) and Angler (non-Treble)
Merged-In: Ib0443ad3da600447fbb51f2e9f91de04dcf5f9f6
Change-Id: Ib0443ad3da600447fbb51f2e9f91de04dcf5f9f6
2017-08-23 05:27:03 +00:00
Tianjie Xu
9d974c1fae Merge "Allow update_verifier to write to kmsg" am: d90d976e45 am: ced80e801b
am: 9be883b8fd

Change-Id: I05c352e6e24ff63ba820d54e8e9f4718c9065d4a
2017-08-17 19:26:51 +00:00
Tianjie Xu
9be883b8fd Merge "Allow update_verifier to write to kmsg" am: d90d976e45
am: ced80e801b

Change-Id: Ie797f9e4abe40d03848449619368e2a0fd23b84c
2017-08-17 19:23:05 +00:00
Tianjie Xu
ced80e801b Merge "Allow update_verifier to write to kmsg"
am: d90d976e45

Change-Id: Id7dc23f6b1c401f350736585222a9e29bf5e3876
2017-08-17 19:19:40 +00:00
Tianjie Xu
d90d976e45 Merge "Allow update_verifier to write to kmsg" 2017-08-17 19:16:11 +00:00
Martijn Coenen
891f78e0aa Merge "Remove display.qservice from service_contexts." am: 109ee5f99c am: 333808edf5
am: f564672689

Change-Id: I140a9478fa1e95951a784a499dcae89f7bbbcd73
2017-08-17 07:51:13 +00:00
Martijn Coenen
f564672689 Merge "Remove display.qservice from service_contexts." am: 109ee5f99c
am: 333808edf5

Change-Id: I085967e51ebc74a51a024eed33d4df13e7d65a09
2017-08-17 07:48:43 +00:00
Martijn Coenen
333808edf5 Merge "Remove display.qservice from service_contexts."
am: 109ee5f99c

Change-Id: I47562c12713809970d8531b453f08de74c53466f
2017-08-17 07:46:07 +00:00
Martijn Coenen
109ee5f99c Merge "Remove display.qservice from service_contexts." 2017-08-17 07:39:29 +00:00
Tianjie Xu
d499e9145a Allow update_verifier to write to kmsg
Denial message:
avc: denied { write } for pid=640 comm="update_verifier" name="kmsg"
dev="tmpfs" ino=13951 scontext=u:r:update_verifier:s0
tcontext=u:object_r:kmsg_device:s0 tclass=chr_file permissive=0

Bug: 64713327
Test: update_verifier logs successfully during boot time.
Change-Id: I421b1e6660239e5ffc624e504f5945d400510407
2017-08-16 13:09:56 -07:00
Martijn Coenen
e18873591d Remove display.qservice from service_contexts.
This is a Qualcomm proprietary service,
and does not belong here.

Test: boot Marlin
Bug: 63391760
Merged-In: If7469051f6cef3e2440f7021ae26c9815ff54820
Change-Id: If7469051f6cef3e2440f7021ae26c9815ff54820
2017-08-16 10:11:53 +02:00