Commit graph

13287 commits

Author SHA1 Message Date
Howard Ro
d496ea7a61 Revert "Setting up SELinux policy for statsd and stats service"
This reverts commit 5744cbdf8d.

Reason for revert: aosp_dragon-userdebug build broken

Change-Id: I5f8180273c32119ae9839f31610bbca37cd05c65
2017-12-16 02:22:23 +00:00
yro
da67945df9 Setting up SELinux policy for statsd and stats service
am: 5744cbdf8d

Change-Id: I43913ca176e7a9ca049da643a95daff26f1ce916
2017-12-16 01:46:59 +00:00
yro
5744cbdf8d Setting up SELinux policy for statsd and stats service
Test: manual testing conducted see if it interfere's with AOSP

Change-Id: If47a663557b2ebf825fc082edb838ae085ec66b3
2017-12-16 01:40:45 +00:00
Jiyong Park
acc882167b Merge "/odm is another vendor partition that can be customied by ODMs"
am: 5872e84f82

Change-Id: Ice57a32ba00d99b74ed260706eee7dadae56e91a
2017-12-16 00:38:11 +00:00
Treehugger Robot
5872e84f82 Merge "/odm is another vendor partition that can be customied by ODMs" 2017-12-16 00:27:08 +00:00
Jiyong Park
4c3ab18f49 /odm is another vendor partition that can be customied by ODMs
Since /odm is an extension of /vendor, libs in /odm should be treated
just like the ones in /vendor.

Bug: 67890517
Test: none as we don't yet have /odm partition.
Change-Id: I5232baef769c7fa8c7641b462cfa1d7537d3cfdf
2017-12-15 19:07:58 +09:00
Tri Vo
ae20791517 perfprofd: allow traversing sysfs directories.
Bug: 70275668
Test: walleye builds, boots.
This change only expands the existing permissions, so shouldn't regress
runtime behavior.
Change-Id: I36e63f11d78998a88e3f8d1e6913e20762a359af
2017-12-14 00:00:17 +00:00
Marissa Wall
5b17322a87 Merge "Restrict access to uid_concurrent_*_time"
am: 40ed4283e4

Change-Id: I21488f5a1d0ef9035a3ae165ca790ad18d1b354f
2017-12-13 20:01:05 +00:00
Treehugger Robot
40ed4283e4 Merge "Restrict access to uid_concurrent_*_time" 2017-12-13 19:48:47 +00:00
Tom Cherry
c878b4c56a Add /dev/__properties__/property_info
am: 8b5433a9cc

Change-Id: I7cf94fdd9aa130b1a97f56d4a97852eae79fa8c7
2017-12-13 01:37:51 +00:00
Tom Cherry
8b5433a9cc Add /dev/__properties__/property_info
Allow init to create a serialized property_info file and allow all
processes to read it.

Bug: 36001741
Test: boot bullhead, walleye using property_info

Change-Id: Ie51d4c0f0221b128dd087029c811fda15b4d7093
2017-12-13 01:28:15 +00:00
Tri Vo
b10d2964b3 Merge "Remove access to 'sysfs' files from healtd and charger."
am: 1fc08a299c

Change-Id: If06792db331fecabaaa3de4b77c680c8bc8b7833
2017-12-12 23:41:16 +00:00
Tri Vo
cd06968498 Merge "shell: directory access to sysfs_net"
am: 5b8d279fcd

Change-Id: Id86a7031965cc900a3ca72ff503544d02f07120e
2017-12-12 23:40:36 +00:00
Treehugger Robot
1fc08a299c Merge "Remove access to 'sysfs' files from healtd and charger." 2017-12-12 23:18:08 +00:00
Treehugger Robot
5b8d279fcd Merge "shell: directory access to sysfs_net" 2017-12-12 23:11:36 +00:00
Marissa Wall
80ee23f74a Restrict access to uid_concurrent_*_time
Do not let apps read uid_concurrent_active_time and
uid_concurrent_policy_time.

b/68399339

Test: Check that they can't be read from the shell
    without root permissions and system_server was able
    to read them

Change-Id: I6f09ef608607cb9f4084ba403a1e7254b8c49a06
2017-12-12 19:19:04 +00:00
Tri Vo
f34e592984 shell: directory access to sysfs_net
This will allow bionic cts test to list network interfaces in
/sys/class/net.

Bug: 70537905
Test: adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests
--gtest_filter=ifaddrs.getifaddrs_interfaces
Change-Id: Ie07425fc54f9101e911962142824697e64d2bc45
2017-12-12 09:41:13 -08:00
Bowgo Tsai
aed99921e3 Switch file context of odm(/.*) to vendor_file
am: e9ae77355e

Change-Id: If44d773ce2ac76861fdb07975c7dfa0d46929a3e
2017-12-12 04:47:05 +00:00
Bowgo Tsai
e9ae77355e Switch file context of odm(/.*) to vendor_file
/odm partition is the extension of /vendor partition, so we should not
use system_file for it. Currently there is no ABI between vendor and
odm. We can use 'odm_file' when needed in the future.

Bug: 64240127
Test: boot a device
Change-Id: I4e8300d597aeeba60a255c8d114a54b24bc39470
2017-12-12 10:32:17 +08:00
Jeff Vander Stoep
f8fe149f47 Restore recovery's ability to format cache and preserve logs
am: 87dd195b78

Change-Id: Id3fde8b3c5901986a25d0e5daba4e34e8e471c93
2017-12-11 20:38:35 +00:00
Jeff Vander Stoep
87dd195b78 Restore recovery's ability to format cache and preserve logs
Commit b8b4f5d6 'Clean up old file-based OTA SELinux rules' removed
many permissions from recovery, a few of which are still required.
Restore these.

[ 2918.409108] type=1400 audit(2327427.540:159): avc:  denied
{ search } for  pid=339 comm="recovery" name="/" dev="mmcblk0p38"
ino=2 scontext=u:r:recovery:s0 tcontext=u:object_r:unlabeled:s0
tclass=dir permissive=0
[ 2586.563071] E:Failed to mount / create /cache/recovery: Permission
denied
[ 2586.780320] E:Can't open /cache/recovery/log: Permission denied
[ 2586.850399] E:Can't open /cache/recovery/last_log: Permission
denied
[ 2586.918979] E:Can't open /cache/recovery/last_install: Permission
denied

[   54.035867] type=1400 audit(59206654.526:12): avc:  denied  { chown }
for  pid=330 comm="recovery" capability=0  scontext=u:r:recovery:s0
tcontext=u:r:recovery:s0 tclass=capability permissive=0a

Bug: 70350029
Test: xunchang to test
Change-Id: I46ab049b8eb600b44c84a61777fade150cadd197
2017-12-11 09:38:14 -08:00
Tri Vo
d276b4349d Remove access to 'sysfs' files from healtd and charger.
We rely on vendors to label all dependencies of healthd/charger under
/sys/class/power_supply with sysfs_batteryinfo type.

Bug: 65643247
Bug: 32659667
Test: boots without denials from healthd, to sysfs_batteryinfo or to
sysfs_msm_subsys.
Test: charging with device turned off works without /sys denials.

Change-Id: I893f309ecad8a0caf7d0b81f5f945725907255c2
2017-12-11 16:31:24 +00:00
Tri Vo
91bdd48d59 Merge "Label /sys/class/net as sysfs_net."
am: 3dbe6f25d1

Change-Id: I0bb09b038e50d4264f4a534727f683937920db7d
2017-12-09 21:44:20 +00:00
Tri Vo
3dbe6f25d1 Merge "Label /sys/class/net as sysfs_net." 2017-12-09 21:40:37 +00:00
Andreas Gampe
d9ecc4cac3 Merge "Sepolicy: Update rules for perfprofd"
am: 7e1d3882bc

Change-Id: I67f21eaf8714c5291818510e1676082410418100
2017-12-09 20:37:31 +00:00
Treehugger Robot
7e1d3882bc Merge "Sepolicy: Update rules for perfprofd" 2017-12-09 20:31:34 +00:00
Tri Vo
c135f0acd6 Label /sys/class/net as sysfs_net.
We already expect contents of /sys/class/net to be labeled as sysfs_net.
Also label the directory for consistensy since we usually label
/sys/class/foo directories as sysfs_foo.

Bug: 65643247
Test: netd_integration_test
Test: can browse internet without denials to sysfs_net
Change-Id: I9d28ab4baf71df99ae966276532f14684d1abca6
2017-12-08 16:12:52 -08:00
Tomasz Wasilczyk
8689d5b84d Merge "Add broadcast radio HAL 2.0 default implementation to the sepolicy."
am: 6413f9dadc

Change-Id: I645d7d7d941988b482fcfbf27895ddf7e3d794fe
2017-12-08 23:58:35 +00:00
Treehugger Robot
6413f9dadc Merge "Add broadcast radio HAL 2.0 default implementation to the sepolicy." 2017-12-08 23:46:45 +00:00
Andreas Gampe
e40d676058 Sepolicy: Update rules for perfprofd
Follow along with updates in the selinux policy.

Test: m
Test: manual
Change-Id: I0dfc6af8fbfc9c8b6860490ab16f02a220d41915
2017-12-08 15:21:09 -08:00
Jaegeuk Kim
b6c24a0559 add sload_f2fs permission
am: 336424b606

Change-Id: Iaa22210d87c4640d10f47307c715b16bf51ae5cc
2017-12-08 01:07:56 +00:00
Jaegeuk Kim
336424b606 add sload_f2fs permission
Change-Id: Icfcf02a21dace99ab3f466de495db24a88127ad7
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2017-12-08 00:36:31 +00:00
Elliott Hughes
14d3368efc Add a /bin symlink for convenience.
am: 2b42fe4bf6

Change-Id: I63795f9d95a7498f4db3c776ba30bf77bcd91011
2017-12-07 18:38:47 +00:00
Dan Cashman
41341f013c Merge "Commit 27.0 compat mapping file to master."
am: 0500c7e867

Change-Id: I282d89d4f6e0f429e119e59cd1af3140baddb00a
2017-12-07 18:38:20 +00:00
Tomasz Wasilczyk
4f7bb7576a Add broadcast radio HAL 2.0 default implementation to the sepolicy.
Test: VTS
Bug: 69958777
Change-Id: I6db7dd9afc9c7f254a0233ff3144b02e48727038
2017-12-07 09:48:16 -08:00
Elliott Hughes
2b42fe4bf6 Add a /bin symlink for convenience.
Bug: http://b/63142920
Test: `make dist`
Change-Id: Iae363fd5e7181941408d3d75cbf248e651bc8b49
2017-12-07 16:55:15 +00:00
Bo Hu
595c7a6998 Merge "Revert "Renames nonplat_* to vendor_*""
am: f543ddb384

Change-Id: I3fa0267c5b2e3cc9cadcbdece143901778a95002
2017-12-07 06:34:19 +00:00
Dan Cashman
792a40e0a7 Merge "Commit 27.0 sepolicy prebuilts to master."
am: bffa911d6b

Change-Id: I09d4b1d266aad1a04c22725d6515fb7eac44f6c4
2017-12-07 06:33:51 +00:00
Andreas Gampe
73fa36c3c6 Merge "Sepolicy: Give perfprofd access to kernel notes"
am: f691b12732

Change-Id: I54de88864b408476b1d553ae87cc2da82fbe863c
2017-12-07 06:33:29 +00:00
Andreas Gampe
aee0b123b7 Merge "Sepolicy: Label kernel notes"
am: 1d7fcdd59a

Change-Id: I73c02c704d449b7ba3792a58785938a7c7518051
2017-12-07 06:33:06 +00:00
Xin Li
643e8de042 Merge "DO NOT MERGE: Merge Oreo MR1 into master"
am: 91690c904c  -s ours

Change-Id: I1ec3c50300e7f09e66731b4f6359589b7b806a0b
2017-12-07 06:32:01 +00:00
Treehugger Robot
0500c7e867 Merge "Commit 27.0 compat mapping file to master." 2017-12-07 06:20:35 +00:00
Xin Li
14e00bfe92 DO NOT MERGE: Merge Oreo MR1 into master
am: 4b836a8216  -s ours

Change-Id: I9af3b2e85dc0475ab3817db57f5abcda9f63fe14
2017-12-07 04:52:20 +00:00
Dan Cashman
f26e39728e Commit 27.0 compat mapping file to master.
Bug: 65551293
Bug: 69390067
Test: None. Prebuilt only change.
Change-Id: Ie793eb4a35927cb494281df59ae0a63666bb6e76
2017-12-06 20:30:26 -08:00
Treehugger Robot
f543ddb384 Merge "Revert "Renames nonplat_* to vendor_*"" 2017-12-07 04:02:29 +00:00
Treehugger Robot
bffa911d6b Merge "Commit 27.0 sepolicy prebuilts to master." 2017-12-07 01:52:56 +00:00
Bo Hu
283dd9ebb9 Revert "Renames nonplat_* to vendor_*"
This reverts commit 8b562206bf.

Reason for revert: broke mac build

b/70273082

FAILED: out/target/product/generic_x86/obj/ETC/vendor_sepolicy.cil_intermediates/vendor_sepolicy.cil
/bin/bash -c "(out/host/darwin-x86/bin/version_policy -b out/target/product/generic_x86/obj/FAKE/selinux_policy_intermediates/plat_pub_policy.cil -t out/target/product/generic_x86/obj/ETC/vendor_sepolicy.cil_intermediates/vendor_policy_raw.cil -n 10000.0 -o out/target/product/generic_x86/obj/ETC/vendor_sepolicy.cil_intermediates/vendor_sepolicy.cil.tmp ) && (grep -Fxv -f out/target/product/generic_x86/obj/ETC/plat_pub_versioned.cil_intermediates/plat_pub_versioned.cil out/target/product/generic_x86/obj/ETC/vendor_sepolicy.cil_intermediates/vendor_sepolicy.cil.tmp > out/target/product/generic_x86/obj/ETC/vendor_sepolicy.cil_intermediates/vendor_sepolicy.cil ) && (out/host/darwin-x86/bin/secilc -m -M true -G -N -c 30 		out/target/product/generic_x86/obj/ETC/plat_sepolicy.cil_intermediates/plat_sepolicy.cil out/target/product/generic_x86/obj/ETC/plat_pub_versioned.cil_intermediates/plat_pub_versioned.cil out/target/product/generic_x86/obj/ETC/10000.0.cil_intermediates/10000.0.cil out/target/product/generic_x86/obj/ETC/vendor_sepolicy.cil_intermediates/vendor_sepolicy.cil -o /dev/null -f /dev/null )"
Parsing out/target/product/generic_x86/obj/FAKE/selinux_policy_intermediates/plat_pub_policy.cil
Parsing out/target/product/generic_x86/obj/ETC/vendor_sepolicy.cil_intermediates/vendor_policy_raw.cil
grep: out of memory

Change-Id: I14f0801fdd6b9be28e53dfcc0f352b844005db59
2017-12-07 00:16:13 +00:00
Treehugger Robot
f691b12732 Merge "Sepolicy: Give perfprofd access to kernel notes" 2017-12-07 00:13:50 +00:00
Treehugger Robot
1d7fcdd59a Merge "Sepolicy: Label kernel notes" 2017-12-07 00:09:25 +00:00
Xin Li
91690c904c Merge "DO NOT MERGE: Merge Oreo MR1 into master" 2017-12-06 23:18:28 +00:00