From 1af17a08ebf1882354ef1f7e64af701125d4be1e Mon Sep 17 00:00:00 2001 From: Elliott Hughes <enh@google.com> Date: Thu, 11 Aug 2016 09:16:39 -0700 Subject: [PATCH] Fix init's restorecon of /dev/kmsg. Bug: http://b/30699558 Change-Id: Id9b213967ab290f45d1b8a5ab6712845ac9a0b69 --- init.te | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/init.te b/init.te index 5f0ccc7d1..676b78410 100644 --- a/init.te +++ b/init.te @@ -11,12 +11,16 @@ allow init tmpfs:chr_file create_file_perms; # # init direct restorecon calls. # -# /dev/socket -allow init { device socket_device }:dir relabelto; +# /dev/kmsg +allow init tmpfs:chr_file relabelfrom; +allow init kmsg_device:chr_file { write relabelto }; # /dev/__properties__ allow init properties_device:dir relabelto; allow init properties_serial:file { write relabelto }; allow init property_type:file { create_file_perms relabelto }; +# /dev/socket +allow init { device socket_device }:dir relabelto; + allow init kernel:fd use; # setrlimit -- GitLab