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

29 lines
904 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
2005-09-19 21:17:45 +00:00
daemon_core_rules(hostname, , nosysadm)
2005-04-29 17:45:15 +00:00
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;
')
can_access_pty(hostname_t, initrc)
2005-09-16 13:36:26 +00:00
allow hostname_t initrc_t:fd use;