29 lines
904 B
Plaintext
29 lines
904 B
Plaintext
#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_core_rules(hostname, , nosysadm)
|
|
allow hostname_t self:capability sys_admin;
|
|
allow hostname_t etc_t:file { getattr read };
|
|
|
|
allow hostname_t { user_tty_type admin_tty_type }:chr_file rw_file_perms;
|
|
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)
|
|
allow hostname_t initrc_t:fd use;
|