2006-04-05 18:07:51 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
policy_module(postgrey, 1.5.1)
|
2006-04-05 18:07:51 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type postgrey_t;
|
|
|
|
type postgrey_exec_t;
|
2008-07-23 21:38:39 +00:00
|
|
|
init_daemon_domain(postgrey_t, postgrey_exec_t)
|
2006-04-05 18:07:51 +00:00
|
|
|
|
|
|
|
type postgrey_etc_t;
|
|
|
|
files_config_file(postgrey_etc_t)
|
|
|
|
|
|
|
|
type postgrey_var_lib_t;
|
|
|
|
files_type(postgrey_var_lib_t)
|
|
|
|
|
|
|
|
type postgrey_var_run_t;
|
|
|
|
files_pid_file(postgrey_var_run_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow postgrey_t self:capability { chown setgid setuid };
|
|
|
|
dontaudit postgrey_t self:capability sys_tty_config;
|
|
|
|
allow postgrey_t self:process signal_perms;
|
|
|
|
allow postgrey_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow postgrey_t postgrey_etc_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern(postgrey_t, postgrey_etc_t, postgrey_etc_t)
|
|
|
|
read_lnk_files_pattern(postgrey_t, postgrey_etc_t, postgrey_etc_t)
|
2006-04-05 18:07:51 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(postgrey_t, postgrey_var_lib_t, postgrey_var_lib_t)
|
|
|
|
files_var_lib_filetrans(postgrey_t, postgrey_var_lib_t, file)
|
2006-04-05 18:07:51 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(postgrey_t, postgrey_var_run_t, postgrey_var_run_t)
|
|
|
|
manage_sock_files_pattern(postgrey_t, postgrey_var_run_t, postgrey_var_run_t)
|
|
|
|
files_pid_filetrans(postgrey_t, postgrey_var_run_t, { file sock_file })
|
2006-04-05 18:07:51 +00:00
|
|
|
|
|
|
|
kernel_read_system_state(postgrey_t)
|
|
|
|
kernel_read_kernel_sysctls(postgrey_t)
|
|
|
|
|
|
|
|
# for perl
|
|
|
|
corecmd_search_bin(postgrey_t)
|
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(postgrey_t)
|
|
|
|
corenet_all_recvfrom_netlabel(postgrey_t)
|
2006-04-05 18:07:51 +00:00
|
|
|
corenet_tcp_sendrecv_generic_if(postgrey_t)
|
|
|
|
corenet_tcp_sendrecv_all_nodes(postgrey_t)
|
|
|
|
corenet_tcp_sendrecv_all_ports(postgrey_t)
|
|
|
|
corenet_tcp_bind_all_nodes(postgrey_t)
|
|
|
|
corenet_tcp_bind_postgrey_port(postgrey_t)
|
2006-05-30 19:46:34 +00:00
|
|
|
corenet_sendrecv_postgrey_server_packets(postgrey_t)
|
2006-04-05 18:07:51 +00:00
|
|
|
|
|
|
|
dev_read_urand(postgrey_t)
|
|
|
|
dev_read_sysfs(postgrey_t)
|
|
|
|
|
|
|
|
domain_use_interactive_fds(postgrey_t)
|
|
|
|
|
|
|
|
files_read_etc_files(postgrey_t)
|
|
|
|
files_read_etc_runtime_files(postgrey_t)
|
|
|
|
files_read_usr_files(postgrey_t)
|
|
|
|
files_getattr_tmp_dirs(postgrey_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(postgrey_t)
|
|
|
|
fs_search_auto_mountpoints(postgrey_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(postgrey_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(postgrey_t)
|
|
|
|
|
|
|
|
sysnet_read_config(postgrey_t)
|
|
|
|
|
|
|
|
userdom_dontaudit_use_unpriv_user_fds(postgrey_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_dontaudit_search_user_home_dirs(postgrey_t)
|
2006-04-05 18:07:51 +00:00
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
nis_use_ypbind(postgrey_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
seutil_sigchld_newrole(postgrey_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
udev_read_db(postgrey_t)
|
|
|
|
')
|