blob: 11145de93a668730aed07ca3020752047de59074 [file] [log] [blame]
Stephen Smalley945fb562013-10-29 14:42:36 -04001# userspace wifi access points
Nick Kralevichdbd28d92013-06-27 15:11:02 -07002type hostapd, domain;
Nick Kralevichdbd28d92013-06-27 15:11:02 -07003type hostapd_exec, exec_type, file_type;
4
Stephen Smalley16011322014-02-24 15:06:11 -05005net_domain(hostapd)
6
Stephen Smalley945fb562013-10-29 14:42:36 -04007allow hostapd self:capability { net_admin net_raw setuid setgid };
8allow hostapd self:netlink_socket create_socket_perms;
Stephen Smalley16011322014-02-24 15:06:11 -05009allow hostapd self:packet_socket create_socket_perms;
10allow hostapd self:netlink_route_socket nlmsg_write;
Stephen Smalley945fb562013-10-29 14:42:36 -040011
12allow hostapd wifi_data_file:file rw_file_perms;
13allow hostapd wifi_data_file:dir create_dir_perms;
Stephen Smalley7ade68d2014-02-21 11:28:20 -050014type_transition hostapd wifi_data_file:dir wpa_socket "sockets";
Stephen Smalley5f8d9f82014-03-12 15:09:17 -040015type_transition hostapd wifi_data_file:dir wpa_socket "hostapd";
Stephen Smalleyf2067372014-02-11 10:44:21 -050016allow hostapd wpa_socket:dir create_dir_perms;
17allow hostapd wpa_socket:sock_file create_file_perms;
Stephen Smalley945fb562013-10-29 14:42:36 -040018allow hostapd netd:fd use;
19allow hostapd netd:udp_socket { read write };
Stephen Smalley08461cb2014-03-18 10:45:15 -040020allow hostapd netd:fifo_file { read write };
21# TODO: Investigate whether these inherited sockets should be closed on exec.
Stephen Smalley945fb562013-10-29 14:42:36 -040022allow hostapd netd:netlink_kobject_uevent_socket { read write };
23allow hostapd netd:netlink_nflog_socket { read write };
24allow hostapd netd:netlink_route_socket { read write };
25allow hostapd netd:unix_stream_socket { read write };
Stephen Smalley08461cb2014-03-18 10:45:15 -040026allow hostapd netd:unix_dgram_socket { read write };