From ad9c63581b678eb6127113df85a5601936d242fd Mon Sep 17 00:00:00 2001 From: Josh Gao <jmgao@google.com> Date: Thu, 1 Sep 2016 14:04:37 -0700 Subject: [PATCH] Let init restorecon /dev/random and /dev/urandom. Bug: http://b/29622562 Change-Id: I21bc79f31ffd0b002b4a25d3ceefaf12f42f05c4 --- init.te | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.te b/init.te index e55bc9631..eb15d288d 100644 --- a/init.te +++ b/init.te @@ -20,6 +20,9 @@ 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; +# /dev/random, /dev/urandom +allow init random_device:chr_file relabelto; +allow init urandom_device:chr_file relabelto; # /dev/device-mapper, /dev/block(/.*)? allow init tmpfs:{ chr_file blk_file } relabelfrom; allow init tmpfs:blk_file getattr; -- GitLab