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