Chris PeBenito 31b7c0
define(`uncond_can_ypbind', `
Chris PeBenito 31b7c0
can_network($1)
Chris PeBenito 31b7c0
r_dir_file($1,var_yp_t)
Chris PeBenito 31b7c0
allow $1 { reserved_port_t port_t }:{ tcp_socket udp_socket } name_bind;
Chris PeBenito 31b7c0
allow $1 { portmap_port_t reserved_port_t port_t }:tcp_socket name_connect;
Chris PeBenito 31b7c0
dontaudit $1 self:capability net_bind_service;
Chris PeBenito 31b7c0
dontaudit $1 reserved_port_type:tcp_socket name_connect;
Chris PeBenito 31b7c0
dontaudit $1 reserved_port_type:{ tcp_socket udp_socket } name_bind;
Chris PeBenito 31b7c0
')
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
define(`can_ypbind', `
Chris PeBenito 31b7c0
ifdef(`ypbind.te', `
Chris PeBenito 31b7c0
if (allow_ypbind) {
Chris PeBenito 31b7c0
uncond_can_ypbind($1)
Chris PeBenito 31b7c0
} else {
Chris PeBenito 31b7c0
dontaudit $1 var_yp_t:dir search;
Chris PeBenito 31b7c0
}
Chris PeBenito 31b7c0
') dnl ypbind.te
Chris PeBenito 31b7c0
') dnl can_ypbind