From 8267208921a6240b438f2cf65e043c11ebce1a8b Mon Sep 17 00:00:00 2001
From: Andreas Gampe <agampe@google.com>
Date: Wed, 19 Apr 2017 17:10:02 -0700
Subject: [PATCH] Sepolicy: Give asan_extract access to powerctl

rc-style powerctl has beem removed. Accordingly, asan_extract now
needs access to sys.powerctl directly.

Bug: 36458146
Test: m && m SANITIZE_TARGET=address SANITIZE_TARGET_SYSTEM=true
Change-Id: Ic65a858962b4b3dd613fdbfa09f93d21425bf892
---
 private/property_contexts | 3 ---
 public/asan_extract.te    | 4 ++--
 public/property.te        | 1 -
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/private/property_contexts b/private/property_contexts
index 4c27b35d6..23150343f 100644
--- a/private/property_contexts
+++ b/private/property_contexts
@@ -111,6 +111,3 @@ wlan.                   u:object_r:wifi_prop:s0
 
 # hwservicemanager properties
 hwservicemanager.       u:object_r:hwservicemanager_prop:s0
-
-# ASAN install trigger
-asan.restore_reboot  u:object_r:asan_reboot_prop:s0
diff --git a/public/asan_extract.te b/public/asan_extract.te
index 6d0de6cf1..15c5a09fd 100644
--- a/public/asan_extract.te
+++ b/public/asan_extract.te
@@ -31,6 +31,6 @@ with_asan(`
   # Restorecon will actually already try to run with sanitized libraries (libpackagelistparser).
   allow asan_extract system_data_file:file execute;
 
-  # We use asan.restore_reboot to signal a reboot is required.
-  set_prop(asan_extract, asan_reboot_prop)
+  # We need to signal a reboot when done.
+  set_prop(asan_extract, powerctl_prop)
 ')
diff --git a/public/property.te b/public/property.te
index d6fa86801..daac0fb5c 100644
--- a/public/property.te
+++ b/public/property.te
@@ -1,4 +1,3 @@
-type asan_reboot_prop, property_type;
 type audio_prop, property_type, core_property_type;
 type boottime_prop, property_type;
 type bluetooth_prop, property_type;
-- 
GitLab