From e6293b1c0ba4bf99b4a8f7ade477cf5ba8157a75 Mon Sep 17 00:00:00 2001
From: Mikhail Naganov <mnaganov@google.com>
Date: Thu, 22 Mar 2018 12:21:40 -0700
Subject: [PATCH] Allow system_server to update timerslack_ns for
 hal_audio_default

Based on the following audit message:

type=1400 audit(1521738979.005:385): avc: denied { write } for pid=1269
comm="Binder:1269_B" name="timerslack_ns" dev="proc" ino=254190
scontext=u:r:system_server:s0 tcontext=u:r:hal_audio_default:s0
tclass=file permissive=1

Bug: 74110604
Test: adb shell dmesg | grep hal_audio_default
Change-Id: I4c2e787588eb9d223d5e50e1bc8f67876de97c2e
---
 private/system_server.te | 1 +
 1 file changed, 1 insertion(+)

diff --git a/private/system_server.te b/private/system_server.te
index c126ca44c..af58086ba 100644
--- a/private/system_server.te
+++ b/private/system_server.te
@@ -114,6 +114,7 @@ allow system_server bootanim:process { getsched setsched };
 allow system_server appdomain:file w_file_perms;
 allow system_server audioserver:file w_file_perms;
 allow system_server cameraserver:file w_file_perms;
+allow system_server hal_audio_server:file w_file_perms;
 
 # Read /proc/pid data for all domains. This is used by ProcessCpuTracker
 # within system_server to keep track of memory and CPU usage for
-- 
GitLab