Allow netd to create data files in /data/misc/net/.

This will be used to populate rt_tables (a mapping from routing table numbers to
table names) that's read by the iproute2 utilities.

Change-Id: I69deb1a64d5d6647470823405bf0cc55b24b22de
This commit is contained in:
Sreeram Ramachandran 2014-07-07 22:04:57 -07:00
parent e9d97b744e
commit 65edb75d53
3 changed files with 6 additions and 0 deletions

View File

@ -78,6 +78,7 @@ type camera_data_file, file_type, data_file_type;
type keystore_data_file, file_type, data_file_type;
type media_data_file, file_type, data_file_type;
type media_rw_data_file, file_type, data_file_type;
type net_data_file, file_type, data_file_type;
type nfc_data_file, file_type, data_file_type;
type radio_data_file, file_type, data_file_type;
type shared_relro_file, file_type, data_file_type;

View File

@ -202,6 +202,7 @@
/data/misc/dhcp(/.*)? u:object_r:dhcp_data_file:s0
/data/misc/keystore(/.*)? u:object_r:keystore_data_file:s0
/data/misc/media(/.*)? u:object_r:media_data_file:s0
/data/misc/net(/.*)? u:object_r:net_data_file:s0
/data/misc/shared_relro(/.*)? u:object_r:shared_relro_file:s0
/data/misc/sms(/.*)? u:object_r:radio_data_file:s0
/data/misc/systemkeys(/.*)? u:object_r:systemkeys_data_file:s0

View File

@ -46,6 +46,10 @@ allow netd self:capability { dac_override chown fowner };
allow netd wifi_data_file:file create_file_perms;
allow netd wifi_data_file:dir rw_dir_perms;
# Needed to update /data/misc/net/rt_tables
allow netd net_data_file:file create_file_perms;
allow netd net_data_file:dir rw_dir_perms;
# Allow netd to spawn hostapd in it's own domain
domain_auto_trans(netd, hostapd_exec, hostapd)
allow netd hostapd:process signal;