1# 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)
5write_klog(ueventd)
6security_access_policy(ueventd)
7allow 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;
12allow ueventd sysfs_type:{ file lnk_file } { relabelfrom relabelto setattr getattr };
13allow ueventd sysfs_type:dir { relabelfrom relabelto setattr r_dir_perms };
14allow ueventd sysfs_devices_system_cpu:file rw_file_perms;
15allow 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 };
20allow ueventd self:netlink_kobject_uevent_socket create_socket_perms;
21allow ueventd efs_file:dir search;
22allow ueventd efs_file:file r_file_perms;
23
24# Use setfscreatecon() to label /dev directories and files.
25allow ueventd self:process setfscreate;
26