android_mt6572_jiabo/device/qcom/sepolicy/common/time_daemon.te
2025-09-05 16:56:03 +08:00

28 lines
921 B
Text

# Policies for time daemon
type time_daemon, domain, domain_deprecated;
type time_daemon_exec, exec_type, file_type;
type time_data_file, file_type, data_file_type;
# Make transition to its own time_daemon domain from init
init_daemon_domain(time_daemon)
allow time_daemon smem_log_device:chr_file rw_file_perms;
# Add rules for access permissions
allow time_daemon rtc_device:chr_file r_file_perms;
allow time_daemon alarm_device:chr_file rw_file_perms;
allow time_daemon time_data_file:file create_file_perms;
allow time_daemon time_data_file:dir w_dir_perms;
allow time_daemon self:socket create_socket_perms;
allow time_daemon self:capability { setuid setgid sys_time };
allow time_daemon persist_time_file:file create_file_perms;
allow time_daemon persist_time_file:dir w_dir_perms;
allow time_daemon persist_file:dir search;
r_dir_file(time_daemon, sysfs_esoc);
userdebug_or_eng(`
diag_use(time_daemon)
')