add label for /proc/sys/fs/verity/require_signatures

This CL add new label for files created by fsverity.

Bug: 112038861
Test: ls -Z /proc/sys/fs/verity/require_signatures.
Change-Id: I8e49ad9a43282bc608449eb0db4ea78617c4ee9a
This commit is contained in:
Xiaoyong Zhou 2019-03-08 15:47:22 -08:00
parent a907d15ba1
commit a711d375ab
4 changed files with 6 additions and 0 deletions

View file

@ -1377,6 +1377,7 @@
(typeattributeset priv_app_28_0 (priv_app))
(typeattributeset proc_28_0
( proc
proc_fs_verity
proc_keys
proc_pressure_cpu
proc_pressure_io

View file

@ -37,6 +37,7 @@ genfscon proc /sys/fs/pipe-max-size u:object_r:proc_pipe_conf:s0
genfscon proc /sys/fs/protected_hardlinks u:object_r:proc_security:s0
genfscon proc /sys/fs/protected_symlinks u:object_r:proc_security:s0
genfscon proc /sys/fs/suid_dumpable u:object_r:proc_security:s0
genfscon proc /sys/fs/verity/require_signatures u:object_r:proc_fs_verity:s0
genfscon proc /sys/kernel/core_pattern u:object_r:usermodehelper:s0
genfscon proc /sys/kernel/core_pipe_limit u:object_r:usermodehelper:s0
genfscon proc /sys/kernel/domainname u:object_r:proc_hostname:s0

View file

@ -24,6 +24,7 @@ type proc_dirty, fs_type, proc_type;
type proc_diskstats, fs_type, proc_type;
type proc_extra_free_kbytes, fs_type, proc_type;
type proc_filesystems, fs_type, proc_type;
type proc_fs_verity, fs_type, proc_type;
type proc_hostname, fs_type, proc_type;
type proc_hung_task, fs_type, proc_type;
type proc_interrupts, fs_type, proc_type;

View file

@ -538,6 +538,9 @@ allowxperm init data_file_type:dir ioctl {
# Allow init to write to /proc/sys/vm/overcommit_memory
allow init proc_overcommit_memory:file { write };
# Allow init to write to /proc/sys/fs/verity/require_signatures
allow init proc_fs_verity:file w_file_perms;
# Raw writes to misc block device
allow init misc_block_device:blk_file w_file_perms;