Skip to content
Snippets Groups Projects
Commit df32f3e8 authored by Sandeep Patil's avatar Sandeep Patil
Browse files

init: enable init to relabel symlinks for system_block_devices


early mounted block device are created by 'init' in its first stage, so
the following restorecon() now finds device nodes and their corresponding
symlinks. The CL adds rule to make sure the block and
system_block_devices can be relabeled by init in this case.

Bug: 35792677
Bug: 27805372

Test: tested ota using 'adb sideload' on sailfish

Change-Id: I7d9d89878919c1267bf3c74f0cdbb4367b5ad458
Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
parent 8d48aa79
No related branches found
No related tags found
No related merge requests found
...@@ -32,6 +32,7 @@ allow init dm_device:{ chr_file blk_file } relabelto; ...@@ -32,6 +32,7 @@ allow init dm_device:{ chr_file blk_file } relabelto;
allow init kernel:fd use; 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;
# 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.
Finish editing this message first!
Please register or to comment