selinux-refpolicy/policy/modules/admin/tripwire.te

148 lines
3.9 KiB
Plaintext
Raw Normal View History

2006-04-24 18:00:32 +00:00
policy_module(tripwire, 1.2.0)
2006-04-24 18:00:32 +00:00
########################################
#
# Declarations
#
type siggen_t;
type siggen_exec_t;
application_domain(siggen_t, siggen_exec_t)
2006-04-24 18:00:32 +00:00
type tripwire_t;
type tripwire_exec_t;
application_domain(tripwire_t, tripwire_exec_t)
2006-04-24 18:00:32 +00:00
role system_r types tripwire_t;
type tripwire_etc_t;
files_config_file(tripwire_etc_t)
type tripwire_report_t;
files_type(tripwire_report_t)
type tripwire_tmp_t;
files_tmp_file(tripwire_tmp_t)
type tripwire_var_lib_t;
files_type(tripwire_var_lib_t)
type twadmin_t;
type twadmin_exec_t;
application_domain(twadmin_t, twadmin_exec_t)
2006-04-24 18:00:32 +00:00
type twprint_t;
type twprint_exec_t;
application_domain(twprint_t, twprint_exec_t)
2006-04-24 18:00:32 +00:00
########################################
#
# Tripwire local policy
#
allow tripwire_t self:capability { setgid setuid dac_override };
2006-12-12 20:08:08 +00:00
allow tripwire_t tripwire_etc_t:dir list_dir_perms;
read_files_pattern(tripwire_t, tripwire_etc_t, tripwire_etc_t)
read_lnk_files_pattern(tripwire_t, tripwire_etc_t, tripwire_etc_t)
2006-04-24 18:00:32 +00:00
files_search_etc(tripwire_t)
# Tripwire report files
manage_dirs_pattern(tripwire_t, tripwire_report_t, tripwire_report_t)
manage_files_pattern(tripwire_t, tripwire_report_t, tripwire_report_t)
manage_lnk_files_pattern(tripwire_t, tripwire_report_t, tripwire_report_t)
2006-12-12 20:08:08 +00:00
manage_dirs_pattern(tripwire_t, tripwire_tmp_t, tripwire_tmp_t)
manage_files_pattern(tripwire_t, tripwire_tmp_t, tripwire_tmp_t)
manage_lnk_files_pattern(tripwire_t, tripwire_tmp_t, tripwire_tmp_t)
manage_fifo_files_pattern(tripwire_t, tripwire_tmp_t, tripwire_tmp_t)
manage_sock_files_pattern(tripwire_t, tripwire_tmp_t, tripwire_tmp_t)
files_tmp_filetrans(tripwire_t, tripwire_tmp_t,{ dir file lnk_file sock_file fifo_file })
2006-12-12 20:08:08 +00:00
manage_files_pattern(tripwire_t, tripwire_var_lib_t, tripwire_var_lib_t)
files_var_lib_filetrans(tripwire_t, tripwire_var_lib_t, file)
2006-04-24 18:00:32 +00:00
kernel_read_system_state(tripwire_t)
kernel_read_network_state(tripwire_t)
kernel_read_software_raid_state(tripwire_t)
kernel_getattr_core_if(tripwire_t)
kernel_getattr_message_if(tripwire_t)
kernel_read_kernel_sysctls(tripwire_t)
corecmd_exec_shell(tripwire_t)
2007-03-23 23:24:59 +00:00
corecmd_exec_bin(tripwire_t)
2006-04-24 18:00:32 +00:00
domain_use_interactive_fds(tripwire_t)
files_read_all_files(tripwire_t)
files_read_all_symlinks(tripwire_t)
files_getattr_all_pipes(tripwire_t)
files_getattr_all_sockets(tripwire_t)
logging_send_syslog_msg(tripwire_t)
2008-11-05 16:10:46 +00:00
userdom_use_user_terminals(tripwire_t)
2006-04-24 18:00:32 +00:00
optional_policy(`
cron_system_entry(tripwire_t, tripwire_exec_t)
2006-04-24 18:00:32 +00:00
')
########################################
#
# Twadmin local policy
#
manage_dirs_pattern(twadmin_t, tripwire_etc_t, tripwire_etc_t)
manage_files_pattern(twadmin_t, tripwire_etc_t, tripwire_etc_t)
manage_lnk_files_pattern(twadmin_t, tripwire_etc_t, tripwire_etc_t)
2006-04-24 18:00:32 +00:00
domain_use_interactive_fds(twadmin_t)
logging_send_syslog_msg(twadmin_t)
miscfiles_read_localization(twadmin_t)
2008-11-05 16:10:46 +00:00
userdom_use_user_terminals(twadmin_t)
2006-04-24 18:00:32 +00:00
########################################
#
# Twprint local policy
#
2006-12-12 20:08:08 +00:00
allow twprint_t tripwire_etc_t:dir list_dir_perms;
read_files_pattern(twprint_t, tripwire_etc_t, tripwire_etc_t)
read_lnk_files_pattern(twprint_t, tripwire_etc_t, tripwire_etc_t)
2006-04-24 18:00:32 +00:00
2006-12-12 20:08:08 +00:00
allow twprint_t tripwire_report_t:dir list_dir_perms;
read_files_pattern(twprint_t, tripwire_report_t, tripwire_report_t)
read_lnk_files_pattern(twprint_t, tripwire_report_t, tripwire_report_t)
2006-04-24 18:00:32 +00:00
2006-12-12 20:08:08 +00:00
allow twprint_t tripwire_var_lib_t:dir list_dir_perms;
read_files_pattern(twprint_t, tripwire_var_lib_t, tripwire_var_lib_t)
read_lnk_files_pattern(twprint_t, tripwire_var_lib_t, tripwire_var_lib_t)
2006-04-24 18:00:32 +00:00
files_search_var_lib(twprint_t)
domain_use_interactive_fds(twprint_t)
logging_send_syslog_msg(twprint_t)
miscfiles_read_localization(twprint_t)
2008-11-05 16:10:46 +00:00
userdom_use_user_terminals(twprint_t)
2006-04-24 18:00:32 +00:00
########################################
#
# Siggen local policy
#
domain_use_interactive_fds(siggen_t)
# Need permission to read files
files_read_all_files(siggen_t)
logging_send_syslog_msg(siggen_t)
miscfiles_read_localization(siggen_t)
2008-11-05 16:10:46 +00:00
userdom_use_user_terminals(siggen_t)