Oreon-Lime-R2/selinux-policy/selinux-policy-bc228bd/selinux-policy-bc228bd0c249a9e4aa3dcf238c2b1bb138943b07/policy/modules/contrib/tcpd.if

64 lines
1.2 KiB
Text

## <summary>TCP daemon.</summary>
########################################
## <summary>
## Execute tcpd in the tcpd domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </summary>
## </param>
#
interface(`tcpd_domtrans',`
gen_require(`
type tcpd_t, tcpd_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, tcpd_exec_t, tcpd_t)
')
########################################
## <summary>
## Create a domain for services that
## utilize tcp wrappers.
## </summary>
## <param name="domain">
## <summary>
## Type to be used as a domain.
## </summary>
## </param>
## <param name="entry_point">
## <summary>
## Type of the program to be used as an entry point to this domain.
## </summary>
## </param>
#
interface(`tcpd_wrapped_domain',`
gen_require(`
type tcpd_t;
role system_r;
')
domtrans_pattern(tcpd_t, $2, $1)
allow $1 tcpd_t:tcp_socket rw_socket_perms;
')
#######################################
## <summary>
## Read and write tcpd server TCP sockets.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`tcpd_rw_tcp_sockets',`
gen_require(`
type tcpd_t;
')
allow $1 tcpd_t:tcp_socket rw_socket_perms;
')