blob: 2e61e8852ece2af9b648c3c2cf4bb654e67a0d63 [file] [log] [blame]
Stephen Smalley2dd4e512012-01-04 12:33:27 -05001# ueventd seclabel is specified in init.rc since
2# it lives in the rootfs and has no unique file type.
3type ueventd, domain;
4tmpfs_domain(ueventd)
William Roberts85c5fc22013-10-06 15:36:11 -04005write_klog(ueventd)
6security_access_policy(ueventd)
William Roberts85c5fc22013-10-06 15:36:11 -04007allow ueventd init:process sigchld;
8allow ueventd self:capability { chown mknod net_admin setgid fsetid sys_rawio dac_override fowner };
9allow ueventd device:file create_file_perms;
10allow ueventd device:chr_file rw_file_perms;
11allow ueventd sysfs:file rw_file_perms;
Nick Kralevich1d2ff862014-07-09 23:07:10 -070012allow ueventd sysfs_type:{ file lnk_file } { relabelfrom relabelto setattr getattr };
Nick Kralevichb8bdfde2014-07-03 16:10:01 -070013allow ueventd sysfs_type:dir { relabelfrom relabelto setattr r_dir_perms };
Stephen Smalley9add1f02014-05-08 13:18:52 -040014allow ueventd sysfs_devices_system_cpu:file rw_file_perms;
William Roberts85c5fc22013-10-06 15:36:11 -040015allow ueventd tmpfs:chr_file rw_file_perms;
16allow ueventd dev_type:dir create_dir_perms;
17allow ueventd dev_type:lnk_file { create unlink };
18allow ueventd dev_type:chr_file { create setattr unlink };
19allow ueventd dev_type:blk_file { create setattr unlink };
Stephen Smalley16011322014-02-24 15:06:11 -050020allow ueventd self:netlink_kobject_uevent_socket create_socket_perms;
William Roberts85c5fc22013-10-06 15:36:11 -040021allow ueventd efs_file:dir search;
22allow ueventd efs_file:file r_file_perms;
Stephen Smalley356f4be2014-05-23 11:26:19 -040023
24# Use setfscreatecon() to label /dev directories and files.
25allow ueventd self:process setfscreate;