Skip to content
Snippets Groups Projects
Commit 28fde232 authored by Tao Bao's avatar Tao Bao
Browse files

Allow init to relabelto to misc_block_device.

avc:  denied  { relabelto } for  pid=1 comm="init" name="misc" dev="tmpfs" ino=3855 scontext=u:r:init:s0 tcontext=u:object_r:misc_block_device:s0 tclass=lnk_file

If misc partition is used during early mount, it will carry a label of
tmpfs (instead of block_device), which will fail restorecon with the
above denial.

Bug: 65378733
Test: Build and flash a target that uses misc in early mount. No longer
      observe the above denial.
Change-Id: I44cd43dbd2a8a4f9f423ebc8ac0dd046b167ef72
parent f58f1499
Branches
Tags
No related merge requests found
...@@ -37,6 +37,7 @@ allow init kernel:fd use; ...@@ -37,6 +37,7 @@ allow init kernel:fd use;
# restorecon for early mount device symlinks # restorecon for early mount device symlinks
allow init tmpfs:lnk_file { getattr read relabelfrom }; allow init tmpfs:lnk_file { getattr read relabelfrom };
allow init system_block_device:{ blk_file lnk_file } relabelto; allow init system_block_device:{ blk_file lnk_file } relabelto;
allow init misc_block_device:{ blk_file lnk_file } relabelto;
# setrlimit # setrlimit
allow init self:capability sys_resource; allow init self:capability sys_resource;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment