2005-12-09 20:08:10 +00:00
|
|
|
|
2006-12-12 21:22:47 +00:00
|
|
|
policy_module(automount,1.4.0)
|
2005-12-09 20:08:10 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type automount_t;
|
|
|
|
type automount_exec_t;
|
|
|
|
init_daemon_domain(automount_t,automount_exec_t)
|
|
|
|
|
|
|
|
type automount_var_run_t;
|
|
|
|
files_pid_file(automount_var_run_t)
|
|
|
|
|
|
|
|
type automount_etc_t;
|
|
|
|
files_config_file(automount_etc_t)
|
|
|
|
|
|
|
|
type automount_lock_t;
|
|
|
|
files_lock_file(automount_lock_t)
|
|
|
|
|
|
|
|
type automount_tmp_t;
|
|
|
|
files_tmp_file(automount_tmp_t)
|
|
|
|
files_mountpoint(automount_tmp_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
2006-06-21 18:25:06 +00:00
|
|
|
allow automount_t self:capability { net_bind_service sys_nice sys_resource dac_override sys_admin };
|
2005-12-09 20:08:10 +00:00
|
|
|
dontaudit automount_t self:capability sys_tty_config;
|
2006-06-12 21:36:38 +00:00
|
|
|
allow automount_t self:process { signal_perms getpgid setpgid setsched setrlimit };
|
2006-12-12 20:08:08 +00:00
|
|
|
allow automount_t self:fifo_file rw_fifo_file_perms;
|
2005-12-09 20:08:10 +00:00
|
|
|
allow automount_t self:unix_stream_socket create_socket_perms;
|
|
|
|
allow automount_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow automount_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
allow automount_t self:udp_socket create_socket_perms;
|
2006-10-31 21:01:48 +00:00
|
|
|
allow automount_t self:rawip_socket create_socket_perms;
|
|
|
|
|
2006-07-28 15:13:58 +00:00
|
|
|
allow automount_t self:netlink_route_socket r_netlink_socket_perms;
|
2005-12-09 20:08:10 +00:00
|
|
|
|
|
|
|
allow automount_t automount_etc_t:file { getattr read };
|
|
|
|
# because config files can be shell scripts
|
|
|
|
can_exec(automount_t, automount_etc_t)
|
2006-07-28 15:13:58 +00:00
|
|
|
can_exec(automount_t, automount_exec_t)
|
2005-12-09 20:08:10 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow automount_t automount_lock_t:file manage_file_perms;
|
2006-03-02 23:41:11 +00:00
|
|
|
files_lock_filetrans(automount_t,automount_lock_t,file)
|
2005-12-09 20:08:10 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
manage_dirs_pattern(automount_t,automount_tmp_t,automount_tmp_t)
|
|
|
|
manage_files_pattern(automount_t,automount_tmp_t,automount_tmp_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
files_tmp_filetrans(automount_t, automount_tmp_t, { file dir })
|
2005-12-09 20:08:10 +00:00
|
|
|
|
|
|
|
# Allow automount to create and delete directories in / and /home
|
2006-12-12 20:08:08 +00:00
|
|
|
allow automount_t automount_tmp_t:dir manage_dir_perms;
|
2006-03-02 23:41:11 +00:00
|
|
|
files_home_filetrans(automount_t,automount_tmp_t,dir)
|
2006-02-21 18:40:44 +00:00
|
|
|
files_root_filetrans(automount_t,automount_tmp_t,dir)
|
2005-12-09 20:08:10 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
manage_files_pattern(automount_t,automount_var_run_t,automount_var_run_t)
|
2006-03-02 23:41:11 +00:00
|
|
|
files_pid_filetrans(automount_t,automount_var_run_t,file)
|
2005-12-09 20:08:10 +00:00
|
|
|
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(automount_t)
|
2006-06-12 21:36:38 +00:00
|
|
|
kernel_read_irq_sysctls(automount_t)
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_fs_sysctls(automount_t)
|
2005-12-09 20:08:10 +00:00
|
|
|
kernel_read_proc_symlinks(automount_t)
|
|
|
|
kernel_read_system_state(automount_t)
|
2006-06-12 21:36:38 +00:00
|
|
|
kernel_read_network_state(automount_t)
|
2005-12-09 20:08:10 +00:00
|
|
|
kernel_list_proc(automount_t)
|
2006-06-21 18:25:06 +00:00
|
|
|
kernel_dontaudit_search_xen_state(automount_t)
|
2005-12-09 20:08:10 +00:00
|
|
|
|
2006-03-02 23:41:11 +00:00
|
|
|
files_search_boot(automount_t)
|
2006-06-21 18:25:06 +00:00
|
|
|
# Automount is slowly adding all mount functionality internally
|
|
|
|
files_search_all(automount_t)
|
|
|
|
files_mounton_all_mountpoints(automount_t)
|
|
|
|
files_mount_all_file_type_fs(automount_t)
|
|
|
|
files_unmount_all_file_type_fs(automount_t)
|
|
|
|
|
|
|
|
fs_mount_all_fs(automount_t)
|
|
|
|
fs_unmount_all_fs(automount_t)
|
2005-12-09 20:08:10 +00:00
|
|
|
|
2006-01-06 22:51:40 +00:00
|
|
|
corecmd_exec_sbin(automount_t)
|
2005-12-09 20:08:10 +00:00
|
|
|
corecmd_exec_bin(automount_t)
|
|
|
|
corecmd_exec_shell(automount_t)
|
|
|
|
|
|
|
|
corenet_non_ipsec_sendrecv(automount_t)
|
|
|
|
corenet_tcp_sendrecv_generic_if(automount_t)
|
|
|
|
corenet_udp_sendrecv_generic_if(automount_t)
|
|
|
|
corenet_tcp_sendrecv_all_nodes(automount_t)
|
|
|
|
corenet_udp_sendrecv_all_nodes(automount_t)
|
|
|
|
corenet_tcp_sendrecv_all_ports(automount_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(automount_t)
|
|
|
|
corenet_tcp_bind_all_nodes(automount_t)
|
|
|
|
corenet_udp_bind_all_nodes(automount_t)
|
2006-01-06 22:51:40 +00:00
|
|
|
corenet_tcp_connect_portmap_port(automount_t)
|
2006-01-11 15:28:14 +00:00
|
|
|
corenet_tcp_connect_all_ports(automount_t)
|
2006-01-06 22:51:40 +00:00
|
|
|
corenet_dontaudit_tcp_connect_all_reserved_ports(automount_t)
|
2006-06-02 15:06:45 +00:00
|
|
|
corenet_sendrecv_all_client_packets(automount_t)
|
2006-02-27 16:23:39 +00:00
|
|
|
# Automount execs showmount when you browse /net. This is required until
|
|
|
|
# Someone writes a showmount policy
|
|
|
|
corenet_tcp_bind_reserved_port(automount_t)
|
2006-05-03 19:58:01 +00:00
|
|
|
corenet_tcp_bind_all_rpc_ports(automount_t)
|
2006-09-22 17:14:35 +00:00
|
|
|
corenet_udp_bind_reserved_port(automount_t)
|
|
|
|
corenet_udp_bind_all_rpc_ports(automount_t)
|
2005-12-09 20:08:10 +00:00
|
|
|
|
|
|
|
dev_read_sysfs(automount_t)
|
|
|
|
# for SSP
|
|
|
|
dev_read_urand(automount_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_use_interactive_fds(automount_t)
|
2006-06-12 21:36:38 +00:00
|
|
|
domain_dontaudit_read_all_domains_state(automount_t)
|
2005-12-09 20:08:10 +00:00
|
|
|
|
2006-01-31 19:21:01 +00:00
|
|
|
files_dontaudit_write_var_dirs(automount_t)
|
2006-02-27 16:23:39 +00:00
|
|
|
files_getattr_all_dirs(automount_t)
|
2006-02-20 16:31:54 +00:00
|
|
|
files_list_mnt(automount_t)
|
2005-12-09 20:08:10 +00:00
|
|
|
files_getattr_home_dir(automount_t)
|
|
|
|
files_read_etc_files(automount_t)
|
|
|
|
files_read_etc_runtime_files(automount_t)
|
|
|
|
# for if the mount point is not labelled
|
2006-01-31 19:21:01 +00:00
|
|
|
files_getattr_isid_type_dirs(automount_t)
|
|
|
|
files_getattr_default_dirs(automount_t)
|
2005-12-09 20:08:10 +00:00
|
|
|
# because config files can be shell scripts
|
|
|
|
files_exec_etc_files(automount_t)
|
2006-06-12 21:36:38 +00:00
|
|
|
files_mounton_mnt(automount_t)
|
2005-12-09 20:08:10 +00:00
|
|
|
|
|
|
|
fs_getattr_all_fs(automount_t)
|
2005-12-09 21:07:30 +00:00
|
|
|
fs_getattr_all_dirs(automount_t)
|
2005-12-09 20:08:10 +00:00
|
|
|
fs_search_auto_mountpoints(automount_t)
|
|
|
|
fs_manage_auto_mountpoints(automount_t)
|
2006-06-12 21:36:38 +00:00
|
|
|
fs_unmount_autofs(automount_t)
|
|
|
|
fs_mount_autofs(automount_t)
|
2006-10-31 21:01:48 +00:00
|
|
|
fs_manage_autofs_symlinks(automount_t)
|
2005-12-09 20:08:10 +00:00
|
|
|
|
|
|
|
term_dontaudit_use_console(automount_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
term_dontaudit_getattr_pty_dirs(automount_t)
|
2005-12-09 20:08:10 +00:00
|
|
|
|
2006-03-02 23:41:11 +00:00
|
|
|
init_use_fds(automount_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
init_use_script_ptys(automount_t)
|
2005-12-09 20:08:10 +00:00
|
|
|
|
|
|
|
libs_use_ld_so(automount_t)
|
|
|
|
libs_use_shared_libs(automount_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(automount_t)
|
2006-01-06 22:51:40 +00:00
|
|
|
logging_search_logs(automount_t)
|
2005-12-09 20:08:10 +00:00
|
|
|
|
|
|
|
miscfiles_read_localization(automount_t)
|
2006-04-12 15:04:28 +00:00
|
|
|
miscfiles_read_certs(automount_t)
|
2005-12-09 20:08:10 +00:00
|
|
|
|
|
|
|
# Run mount in the mount_t domain.
|
|
|
|
mount_domtrans(automount_t)
|
|
|
|
|
|
|
|
sysnet_dns_name_resolve(automount_t)
|
|
|
|
sysnet_use_ldap(automount_t)
|
|
|
|
sysnet_read_config(automount_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_dontaudit_use_unpriv_user_fds(automount_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
userdom_dontaudit_search_sysadm_home_dirs(automount_t)
|
2005-12-09 20:08:10 +00:00
|
|
|
|
|
|
|
ifdef(`targeted_policy', `
|
2006-01-31 19:21:01 +00:00
|
|
|
files_dontaudit_read_root_files(automount_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
term_dontaudit_use_unallocated_ttys(automount_t)
|
|
|
|
term_dontaudit_use_generic_ptys(automount_t)
|
2005-12-09 20:08:10 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-12-09 20:08:10 +00:00
|
|
|
corecmd_exec_bin(automount_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-11 15:28:14 +00:00
|
|
|
bind_search_cache(automount_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-12-09 20:08:10 +00:00
|
|
|
fstools_domtrans(automount_t)
|
|
|
|
')
|
|
|
|
|
2006-07-28 15:13:58 +00:00
|
|
|
optional_policy(`
|
|
|
|
kerberos_read_keytab(automount_t)
|
|
|
|
kerberos_read_config(automount_t)
|
|
|
|
kerberos_dontaudit_write_config(automount_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-12-09 20:08:10 +00:00
|
|
|
nis_use_ypbind(automount_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-12-09 20:08:10 +00:00
|
|
|
rpc_search_nfs_state_data(automount_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-12-09 20:08:10 +00:00
|
|
|
seutil_sigchld_newrole(automount_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-12-09 20:08:10 +00:00
|
|
|
udev_read_db(automount_t)
|
|
|
|
')
|