Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Allow init to restorecon sysfs files.
Browse files Browse the repository at this point in the history
The boot-time restorecon_recursive("/sys") occurs while still in
the kernel domain, but init.rc files may nonetheless perform
restorecon_recursive of parts of /sys created later and therefore
require this permission.   Required for:
https://android-review.googlesource.com/#/c/101800/

Change-Id: I68dc2c6019a1f9deae3eec5c2f068365ce2372e5
Signed-off-by: Stephen Smalley <[email protected]>
  • Loading branch information
stephensmalley authored and Ruchi Kandoi committed Aug 15, 2014
1 parent 4ddc6eb commit 9a725b2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions init.te
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ allow init rootfs:file relabelfrom;
# init.<board>.rc files often include device-specific types, so
# we just allow all file types except /system files here.
allow init {file_type -system_file -exec_type}:dir_file_class_set relabelto;
allow init sysfs_type:{ dir file lnk_file } relabelto;

# Unlabeled file access for upgrades from 4.2.
allow init unlabeled:dir { create_dir_perms relabelfrom };
Expand Down

0 comments on commit 9a725b2

Please sign in to comment.