|
Chris PeBenito |
eb3cb6 |
## <summary>RPC port mapping service.</summary>
|
|
Chris PeBenito |
eb3cb6 |
|
|
Chris PeBenito |
eb3cb6 |
########################################
|
|
Chris PeBenito |
eb3cb6 |
## <summary>
|
|
Chris PeBenito |
eb3cb6 |
## Execute portmap_helper in the helper domain.
|
|
Chris PeBenito |
eb3cb6 |
## </summary>
|
|
Chris PeBenito |
eb3cb6 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
eb3cb6 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
eb3cb6 |
## </param>
|
|
Chris PeBenito |
eb3cb6 |
#
|
|
Chris PeBenito |
eb3cb6 |
interface(`portmap_domtrans_helper',`
|
|
Chris PeBenito |
eb3cb6 |
gen_require(`
|
|
Chris PeBenito |
eb3cb6 |
type portmap_helper_t, portmap_helper_exec_t;
|
|
Chris PeBenito |
eb3cb6 |
')
|
|
Chris PeBenito |
eb3cb6 |
|
|
Chris PeBenito |
eb3cb6 |
corecmd_search_bin($1)
|
|
Chris PeBenito |
eb3cb6 |
domain_auto_trans($1,portmap_helper_exec_t,portmap_helper_t)
|
|
Chris PeBenito |
eb3cb6 |
|
|
Chris PeBenito |
eb3cb6 |
allow $1 portmap_helper_t:fd use;
|
|
Chris PeBenito |
eb3cb6 |
allow portmap_helper_t $1:fd use;
|
|
Chris PeBenito |
eb3cb6 |
allow portmap_helper_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
eb3cb6 |
allow portmap_helper_t $1:process sigchld;
|
|
Chris PeBenito |
eb3cb6 |
')
|
|
Chris PeBenito |
eb3cb6 |
|
|
Chris PeBenito |
eb3cb6 |
########################################
|
|
Chris PeBenito |
eb3cb6 |
## <summary>
|
|
Chris PeBenito |
eb3cb6 |
## Execute portmap helper in the helper domain, and
|
|
Chris PeBenito |
eb3cb6 |
## allow the specified role the helper domain.
|
|
Chris PeBenito |
eb3cb6 |
## Communicate with portmap.
|
|
Chris PeBenito |
eb3cb6 |
## </summary>
|
|
Chris PeBenito |
eb3cb6 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
eb3cb6 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
eb3cb6 |
## </param>
|
|
Chris PeBenito |
eb3cb6 |
## <param name="role">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
eb3cb6 |
## The role to be allowed the portmap domain.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
eb3cb6 |
## </param>
|
|
Chris PeBenito |
eb3cb6 |
## <param name="terminal">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
eb3cb6 |
## The type of the terminal allow the portmap domain to use.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
eb3cb6 |
## </param>
|
|
Chris PeBenito |
eb3cb6 |
#
|
|
Chris PeBenito |
eb3cb6 |
interface(`portmap_run_helper',`
|
|
Chris PeBenito |
eb3cb6 |
gen_require(`
|
|
Chris PeBenito |
0efe52 |
type portmap_t, portmap_helper_t;
|
|
Chris PeBenito |
eb3cb6 |
')
|
|
Chris PeBenito |
eb3cb6 |
|
|
Chris PeBenito |
eb3cb6 |
portmap_domtrans_helper($1)
|
|
Chris PeBenito |
eb3cb6 |
role $2 types portmap_helper_t;
|
|
Chris PeBenito |
eb3cb6 |
allow portmap_helper_t $3:chr_file { getattr read write ioctl };
|
|
Chris PeBenito |
eb3cb6 |
|
|
Chris PeBenito |
eb3cb6 |
# send to portmap
|
|
Chris PeBenito |
eb3cb6 |
allow $1 portmap_t:udp_socket sendto;
|
|
Chris PeBenito |
eb3cb6 |
allow portmap_t $1:udp_socket recvfrom;
|
|
Chris PeBenito |
eb3cb6 |
|
|
Chris PeBenito |
eb3cb6 |
# receive from portmap
|
|
Chris PeBenito |
eb3cb6 |
allow portmap_t $1:udp_socket sendto;
|
|
Chris PeBenito |
eb3cb6 |
allow $1 portmap_t:udp_socket recvfrom;
|
|
Chris PeBenito |
eb3cb6 |
')
|
|
Chris PeBenito |
eb3cb6 |
|
|
Chris PeBenito |
eb3cb6 |
########################################
|
|
Chris PeBenito |
eb3cb6 |
## <summary>
|
|
Chris PeBenito |
eb3cb6 |
## Send UDP network traffic to portmap.
|
|
Chris PeBenito |
eb3cb6 |
## </summary>
|
|
Chris PeBenito |
eb3cb6 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
eb3cb6 |
## The type of the process performing this action.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
eb3cb6 |
## </param>
|
|
Chris PeBenito |
eb3cb6 |
#
|
|
Chris PeBenito |
1815ba |
interface(`portmap_udp_send',`
|
|
Chris PeBenito |
eb3cb6 |
gen_require(`
|
|
Chris PeBenito |
eb3cb6 |
type portmap_t;
|
|
Chris PeBenito |
eb3cb6 |
')
|
|
Chris PeBenito |
eb3cb6 |
|
|
Chris PeBenito |
eb3cb6 |
allow $1 portmap_t:udp_socket sendto;
|
|
Chris PeBenito |
eb3cb6 |
allow portmap_t $1:udp_socket recvfrom;
|
|
Chris PeBenito |
eb3cb6 |
')
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
########################################
|
|
Chris PeBenito |
43989f |
## <summary>
|
|
Chris PeBenito |
43989f |
## Send and receive UDP network traffic from portmap.
|
|
Chris PeBenito |
43989f |
## </summary>
|
|
Chris PeBenito |
43989f |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
43989f |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
43989f |
## </param>
|
|
Chris PeBenito |
43989f |
#
|
|
Chris PeBenito |
1815ba |
interface(`portmap_udp_chat',`
|
|
Chris PeBenito |
43989f |
gen_require(`
|
|
Chris PeBenito |
43989f |
type portmap_t;
|
|
Chris PeBenito |
43989f |
')
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
allow $1 portmap_t:udp_socket sendto;
|
|
Chris PeBenito |
43989f |
allow portmap_t $1:udp_socket recvfrom;
|
|
Chris PeBenito |
43989f |
allow portmap_t $1:udp_socket sendto;
|
|
Chris PeBenito |
43989f |
allow $1 portmap_t:udp_socket recvfrom;
|
|
Chris PeBenito |
43989f |
')
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
########################################
|
|
Chris PeBenito |
43989f |
## <summary>
|
|
Chris PeBenito |
43989f |
## Connect to portmap over a TCP socket
|
|
Chris PeBenito |
43989f |
## </summary>
|
|
Chris PeBenito |
43989f |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
43989f |
## The type of the process performing this action.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
43989f |
## </param>
|
|
Chris PeBenito |
43989f |
#
|
|
Chris PeBenito |
43989f |
interface(`portmap_tcp_connect',`
|
|
Chris PeBenito |
43989f |
gen_require(`
|
|
Chris PeBenito |
43989f |
type portmap_t;
|
|
Chris PeBenito |
43989f |
')
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
allow $1 portmap_t:tcp_socket { connectto recvfrom };
|
|
Chris PeBenito |
43989f |
allow portmap_t $1:tcp_socket { acceptfrom recvfrom };
|
|
Chris PeBenito |
43989f |
kernel_tcp_recvfrom($1)
|
|
Chris PeBenito |
43989f |
')
|