selinux-policy/policy/modules/services/networkmanager.if

194 lines
3.9 KiB
Plaintext
Raw Normal View History

2005-10-22 17:44:04 +00:00
## <summary>Manager for dynamically switching between networks.</summary>
2005-11-25 16:43:03 +00:00
2005-12-02 22:06:05 +00:00
########################################
## <summary>
## Read and write NetworkManager UDP sockets.
## </summary>
## <param name="domain">
## <summary>
2005-12-02 22:06:05 +00:00
## Domain allowed access.
## </summary>
2005-12-02 22:06:05 +00:00
## </param>
#
# cjp: added for named.
2006-02-02 21:08:12 +00:00
interface(`networkmanager_rw_udp_sockets',`
2005-12-02 22:06:05 +00:00
gen_require(`
type NetworkManager_t;
')
allow $1 NetworkManager_t:udp_socket { read write };
')
########################################
## <summary>
## Read and write NetworkManager packet sockets.
## </summary>
## <param name="domain">
## <summary>
2005-12-02 22:06:05 +00:00
## Domain allowed access.
## </summary>
2005-12-02 22:06:05 +00:00
## </param>
#
# cjp: added for named.
2006-02-02 21:08:12 +00:00
interface(`networkmanager_rw_packet_sockets',`
2005-12-02 22:06:05 +00:00
gen_require(`
type NetworkManager_t;
')
allow $1 NetworkManager_t:packet_socket { read write };
')
2010-05-03 18:01:26 +00:00
#######################################
## <summary>
## Allow caller to relabel tun_socket
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`networkmanager_attach_tun_iface',`
gen_require(`
type NetworkManager_t;
')
allow $1 NetworkManager_t:tun_socket relabelfrom;
allow $1 self:tun_socket relabelto;
')
2005-12-02 22:06:05 +00:00
########################################
## <summary>
## Read and write NetworkManager netlink
## routing sockets.
## </summary>
## <param name="domain">
## <summary>
2005-12-02 22:06:05 +00:00
## Domain allowed access.
## </summary>
2005-12-02 22:06:05 +00:00
## </param>
#
# cjp: added for named.
2006-02-02 21:08:12 +00:00
interface(`networkmanager_rw_routing_sockets',`
2005-12-02 22:06:05 +00:00
gen_require(`
type NetworkManager_t;
')
allow $1 NetworkManager_t:netlink_route_socket { read write };
')
2007-06-12 13:06:13 +00:00
########################################
## <summary>
2010-05-03 18:01:26 +00:00
## Execute NetworkManager with a domain transition.
2007-06-12 13:06:13 +00:00
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`networkmanager_domtrans',`
gen_require(`
type NetworkManager_t, NetworkManager_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, NetworkManager_exec_t, NetworkManager_t)
2007-06-12 13:06:13 +00:00
')
2010-05-03 18:01:26 +00:00
########################################
## <summary>
## Execute NetworkManager scripts with an automatic domain transition to initrc.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`networkmanager_initrc_domtrans',`
gen_require(`
type NetworkManager_initrc_exec_t;
')
init_labeled_script_domtrans($1, NetworkManager_initrc_exec_t)
')
2005-11-25 16:43:03 +00:00
########################################
## <summary>
## Send and receive messages from
## NetworkManager over dbus.
## </summary>
## <param name="domain">
## <summary>
2005-11-25 16:43:03 +00:00
## Domain allowed access.
## </summary>
2005-11-25 16:43:03 +00:00
## </param>
#
interface(`networkmanager_dbus_chat',`
gen_require(`
type NetworkManager_t;
class dbus send_msg;
')
allow $1 NetworkManager_t:dbus send_msg;
allow NetworkManager_t $1:dbus send_msg;
')
########################################
## <summary>
## Send a generic signal to NetworkManager
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`networkmanager_signal',`
gen_require(`
type NetworkManager_t;
')
allow $1 NetworkManager_t:process signal;
')
2010-05-03 18:01:26 +00:00
########################################
## <summary>
## Read NetworkManager lib files.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`networkmanager_read_lib_files',`
gen_require(`
type NetworkManager_var_lib_t;
')
files_search_var_lib($1)
list_dirs_pattern($1, NetworkManager_var_lib_t, NetworkManager_var_lib_t)
read_files_pattern($1, NetworkManager_var_lib_t, NetworkManager_var_lib_t)
')
########################################
## <summary>
## Read NetworkManager PID files.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`networkmanager_read_pid_files',`
gen_require(`
type NetworkManager_var_run_t;
')
files_search_pids($1)
allow $1 NetworkManager_var_run_t:file read_file_perms;
')