From 18d7f8c1b85a1a7fb20cc97e780c350b54bda308 Mon Sep 17 00:00:00 2001
From: Steven Moreland <smoreland@google.com>
Date: Tue, 24 Jan 2017 14:55:34 -0800
Subject: [PATCH] haldomain: search for passthrough hals

Bug: 34366227
Test: passthrough services successfully found
Change-Id: If2cad09edc42f01cc5a444229758ecdfe2017cf2
---
 private/haldomain.te      | 3 +++
 public/hal_camera.te      | 2 --
 public/hal_fingerprint.te | 3 ---
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/private/haldomain.te b/private/haldomain.te
index a8fa1a216..2700940ec 100644
--- a/private/haldomain.te
+++ b/private/haldomain.te
@@ -3,3 +3,6 @@
 ###
 
 hwbinder_use(haldomain)
+
+# find passthrough hals
+allow haldomain system_file:dir r_dir_perms;
diff --git a/public/hal_camera.te b/public/hal_camera.te
index e412a4d8b..b879c9808 100644
--- a/public/hal_camera.te
+++ b/public/hal_camera.te
@@ -1,8 +1,6 @@
 hwbinder_use(hal_camera)
 binder_call(hal_camera, cameraserver)
 
-allow hal_camera system_file:dir { open read };
-
 # access /data/misc/camera
 allow hal_camera camera_data_file:dir create_dir_perms;
 allow hal_camera camera_data_file:file create_file_perms;
diff --git a/public/hal_fingerprint.te b/public/hal_fingerprint.te
index db0fc6d77..aa5bf2bef 100644
--- a/public/hal_fingerprint.te
+++ b/public/hal_fingerprint.te
@@ -1,6 +1,3 @@
-# Scan through /system/lib64/hw looking for installed HALs
-allow hal_fingerprint system_file:dir r_dir_perms;
-
 # allow HAL module to read dir contents
 allow hal_fingerprint fingerprintd_data_file:file create_file_perms;
 
-- 
GitLab