selinux-refpolicy/strict/domains/program/unused/ddclient.te

42 lines
1.3 KiB
Plaintext

#DESC ddclient - Update dynamic IP address at DynDNS.org
#
# Author: Greg Norris <haphazard@kc.rr.com>
# X-Debian-Packages: ddclient
#
#################################
#
# Rules for the ddclient_t domain.
#
daemon_domain(ddclient);
type ddclient_etc_t, file_type, sysadmfile;
type ddclient_var_t, file_type, sysadmfile;
log_domain(ddclient)
var_lib_domain(ddclient)
base_file_read_access(ddclient_t)
can_exec(ddclient_t, { shell_exec_t bin_t })
# ddclient can be launched by pppd
ifdef(`pppd.te',`domain_auto_trans(pppd_t, ddclient_exec_t, ddclient_t)')
# misc. requirements
allow ddclient_t self:fifo_file rw_file_perms;
allow ddclient_t self:socket create_socket_perms;
allow ddclient_t etc_t:file { getattr read };
allow ddclient_t etc_runtime_t:file r_file_perms;
allow ddclient_t ifconfig_exec_t:file { rx_file_perms execute_no_trans };
allow ddclient_t urandom_device_t:chr_file { read };
general_proc_read_access(ddclient_t)
allow ddclient_t sysctl_net_t:dir { search };
# network-related goodies
can_network_client(ddclient_t)
allow ddclient_t self:unix_dgram_socket create_socket_perms;
allow ddclient_t self:unix_stream_socket create_socket_perms;
# allow access to ddclient.conf and ddclient.cache
allow ddclient_t ddclient_etc_t:file r_file_perms;
allow ddclient_t ddclient_var_t:dir rw_dir_perms;
allow ddclient_t ddclient_var_t:file create_file_perms;