OSDN Git Service

Prefer property_contexts from /system & /vendor
authorAlex Klyubin <klyubin@google.com>
Wed, 8 Mar 2017 21:16:03 +0000 (13:16 -0800)
committerAlex Klyubin <klyubin@google.com>
Wed, 8 Mar 2017 23:28:29 +0000 (15:28 -0800)
commit176cf1f65b4431a00f9238e811f71295c36d4a27
tree803349727a128d616beac61a91784e9ec44811d9
parentf9f320ba73cbcd29c413ad52b8d681c65e2268a6
Prefer property_contexts from /system & /vendor

This changes system_properties' initialize_properties to prefer
loading property_contexts from /system/etc/selinux &
/vendor/etc/selinux, while falling back to the pre-existing behavior
of loading from /.

Test: Device with *_property_contexts in / boots up fine, no denials
      to do with properties, getprop -Z lists correct labels.
Test: Device with *_property_contexts in /system & /vendor, but not
      in /, boots up fine, no denials to do with properties,
      getprop -Z lists correct labels.
Test: Device with *_property_contexts in /system & vendor and with
      empty *_property_contexts in / boots up fine, no denials to do
      with properties, getprop -Z lists correct labels.
Bug: 36002573

Change-Id: I15174acdf89ee8f5a96acf1e38a54d4214df51ef
libc/bionic/system_properties.cpp