selinux-policy/strict/domains/program/hostname.te

31 lines
961 B
Plaintext
Raw Normal View History

2005-04-29 17:45:15 +00:00
#DESC hostname - show or set the system host name
#
# Author: Russell Coker <russell@coker.com.au>
# X-Debian-Packages: hostname
# for setting the hostname
daemon_base_domain(hostname, , nosysadm)
role sysadm_r types hostname_t;
allow hostname_t self:capability sys_admin;
allow hostname_t etc_t:file { getattr read };
2005-09-16 13:36:26 +00:00
allow hostname_t { user_tty_type admin_tty_type }:chr_file rw_file_perms;
2005-04-29 17:45:15 +00:00
read_locale(hostname_t)
can_resolve(hostname_t)
allow hostname_t userdomain:fd use;
dontaudit hostname_t kernel_t:fd use;
allow hostname_t net_conf_t:file { getattr read };
allow hostname_t self:unix_stream_socket create_stream_socket_perms;
dontaudit hostname_t var_t:dir search;
allow hostname_t fs_t:filesystem getattr;
# for when /usr is not mounted
dontaudit hostname_t file_t:dir search;
ifdef(`distro_redhat', `
allow hostname_t tmpfs_t:chr_file rw_file_perms;
')
2005-09-16 13:36:26 +00:00
allow hostname_t initrc_devpts_t:chr_file { read write };
allow hostname_t initrc_t:fd use;