Chris PeBenito 76a9fe
policy_module(hostname, 1.6.1)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type hostname_t;
Chris PeBenito 17de1b
type hostname_exec_t;
Chris PeBenito 3f67f7
init_system_domain(hostname_t, hostname_exec_t)
Chris PeBenito 17de1b
role system_r types hostname_t;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# for setting the hostname
Chris PeBenito 17de1b
allow hostname_t self:process { sigchld sigkill sigstop signull signal };
Chris PeBenito 17de1b
allow hostname_t self:capability sys_admin;
Chris PeBenito 17de1b
allow hostname_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 17de1b
dontaudit hostname_t self:capability sys_tty_config;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_list_proc(hostname_t)
Chris PeBenito 17de1b
kernel_read_proc_symlinks(hostname_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_sysfs(hostname_t)
Jeremy Solt 2fc79f
# Early devtmpfs, before udev relabel
Jeremy Solt 2fc79f
dev_dontaudit_rw_generic_chr_files(hostname_t)
Chris PeBenito 17de1b
Dan Walsh 3eaa99
domain_dontaudit_leaks(hostname_t)
Chris PeBenito 14d282
domain_use_interactive_fds(hostname_t)
Chris PeBenito 14d282
Chris PeBenito 14d282
files_read_etc_files(hostname_t)
Dan Walsh 3eaa99
files_dontaudit_leaks(hostname_t)
Chris PeBenito 14d282
files_dontaudit_search_var(hostname_t)
Chris PeBenito 14d282
# for when /usr is not mounted:
Chris PeBenito 14d282
files_dontaudit_search_isid_type_dirs(hostname_t)
Chris PeBenito 14d282
Chris PeBenito 17de1b
fs_getattr_xattr_fs(hostname_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(hostname_t)
Dan Walsh 3eaa99
fs_dontaudit_leaks(hostname_t)
Chris PeBenito 17de1b
fs_dontaudit_use_tmpfs_chr_dev(hostname_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
term_dontaudit_use_console(hostname_t)
Chris PeBenito c3c753
term_use_all_ttys(hostname_t)
Chris PeBenito c3c753
term_use_all_ptys(hostname_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
init_use_fds(hostname_t)
Chris PeBenito 17de1b
init_use_script_fds(hostname_t)
Chris PeBenito 17de1b
init_use_script_ptys(hostname_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_send_syslog_msg(hostname_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(hostname_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
sysnet_read_config(hostname_t)
Chris PeBenito 17de1b
sysnet_dns_name_resolve(hostname_t)
Chris PeBenito 17de1b
Chris PeBenito a5e213
optional_policy(`
Dan Walsh 3eaa99
	nis_use_ypbind(hostname_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Chris PeBenito d6d16b
	xen_append_log(hostname_t)
Chris PeBenito a5e213
	xen_dontaudit_use_fds(hostname_t)
Chris PeBenito a5e213
')
Chris PeBenito ee6608
Chris PeBenito ee6608
optional_policy(`
Chris PeBenito ee6608
	unconfined_dontaudit_rw_pipes(hostname_t)
Chris PeBenito ee6608
')