1type time_daemon, domain; 2type time_daemon_exec, exec_type, vendor_file_type, file_type; 3 4init_daemon_domain(time_daemon) 5 6allow time_daemon self:capability { setgid setuid sys_time }; 7 8allow time_daemon rtc_device:chr_file r_file_perms; 9 10r_dir_file(time_daemon, sysfs_msm_subsys) 11 12allow time_daemon sysfs_soc:dir search; 13allow time_daemon sysfs_soc:file r_file_perms; 14 15# Set sys.time.set property 16set_prop(time_daemon, sys_time_prop); 17 18allow time_daemon persist_time_file:dir w_dir_perms; 19allow time_daemon persist_time_file:file create_file_perms; 20allow time_daemon persist_time_file:dir search; 21 22allow time_daemon persist_file:dir search; 23 24allow time_daemon self:socket create_socket_perms; 25allowxperm time_daemon self:socket ioctl msm_sock_ipc_ioctls; 26 27userdebug_or_eng(` 28 allow time_daemon diag_device:chr_file rw_file_perms; 29') 30dontaudit time_daemon diag_device:chr_file rw_file_perms; 31 32# b/68864350 33dontaudit time_daemon unlabeled:dir search; 34