xref: /aosp_15_r20/system/sepolicy/prebuilts/api/31.0/public/tzdatacheck.te (revision e4a36f4174b17bbab9dc043f4a65dc8d87377290)
1*e4a36f41SAndroid Build Coastguard Worker# The tzdatacheck command run by init.
2*e4a36f41SAndroid Build Coastguard Workertype tzdatacheck, domain;
3*e4a36f41SAndroid Build Coastguard Workertype tzdatacheck_exec, system_file_type, exec_type, file_type;
4*e4a36f41SAndroid Build Coastguard Worker
5*e4a36f41SAndroid Build Coastguard Workerallow tzdatacheck zoneinfo_data_file:dir create_dir_perms;
6*e4a36f41SAndroid Build Coastguard Workerallow tzdatacheck zoneinfo_data_file:file unlink;
7*e4a36f41SAndroid Build Coastguard Worker
8*e4a36f41SAndroid Build Coastguard Worker# Below are strong assertion that only init, system_server and tzdatacheck
9*e4a36f41SAndroid Build Coastguard Worker# can modify the /data time zone rules directories. This is to make it very
10*e4a36f41SAndroid Build Coastguard Worker# clear that only these domains should modify the actual time zone rules data.
11*e4a36f41SAndroid Build Coastguard Worker# The tzdatacheck binary itself may be executed by shell for tests but it must
12*e4a36f41SAndroid Build Coastguard Worker# not be able to modify the real rules.
13*e4a36f41SAndroid Build Coastguard Worker# If other users / binaries could modify time zone rules on device this might
14*e4a36f41SAndroid Build Coastguard Worker# have negative implications for users (who may get incorrect local times)
15*e4a36f41SAndroid Build Coastguard Worker# or break assumptions made / invalidate data held by the components actually
16*e4a36f41SAndroid Build Coastguard Worker# responsible for updating time zone rules.
17*e4a36f41SAndroid Build Coastguard Workerneverallow { domain -system_server -init -tzdatacheck } zoneinfo_data_file:file no_w_file_perms;
18*e4a36f41SAndroid Build Coastguard Workerneverallow { domain -system_server -init -tzdatacheck } zoneinfo_data_file:dir no_w_dir_perms;
19