|
Chris PeBenito |
29af4c |
policy_module(automount, 1.13.0)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Declarations
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type automount_t;
|
|
Chris PeBenito |
17de1b |
type automount_exec_t;
|
|
Chris PeBenito |
0bfccd |
init_daemon_domain(automount_t, automount_exec_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
967fd1 |
type automount_initrc_exec_t;
|
|
Chris PeBenito |
967fd1 |
init_script_file(automount_initrc_exec_t)
|
|
Chris PeBenito |
967fd1 |
|
|
Chris PeBenito |
17de1b |
type automount_var_run_t;
|
|
Chris PeBenito |
17de1b |
files_pid_file(automount_var_run_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type automount_lock_t;
|
|
Chris PeBenito |
17de1b |
files_lock_file(automount_lock_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type automount_tmp_t;
|
|
Chris PeBenito |
17de1b |
files_tmp_file(automount_tmp_t)
|
|
Chris PeBenito |
17de1b |
files_mountpoint(automount_tmp_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Local policy
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
6b19be |
allow automount_t self:capability { net_bind_service setgid setuid sys_nice sys_resource dac_override sys_admin };
|
|
Chris PeBenito |
17de1b |
dontaudit automount_t self:capability sys_tty_config;
|
|
Chris PeBenito |
17de1b |
allow automount_t self:process { signal_perms getpgid setpgid setsched setrlimit };
|
|
Chris PeBenito |
c0868a |
allow automount_t self:fifo_file rw_fifo_file_perms;
|
|
Chris PeBenito |
17de1b |
allow automount_t self:unix_stream_socket create_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow automount_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow automount_t self:tcp_socket create_stream_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow automount_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
d9845a |
allow automount_t self:rawip_socket create_socket_perms;
|
|
Chris PeBenito |
d9845a |
|
|
Chris PeBenito |
465510 |
can_exec(automount_t, automount_exec_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
allow automount_t automount_lock_t:file manage_file_perms;
|
|
Chris PeBenito |
0bfccd |
files_lock_filetrans(automount_t, automount_lock_t, file)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
0bfccd |
manage_dirs_pattern(automount_t, automount_tmp_t, automount_tmp_t)
|
|
Chris PeBenito |
0bfccd |
manage_files_pattern(automount_t, automount_tmp_t, automount_tmp_t)
|
|
Chris PeBenito |
17de1b |
files_tmp_filetrans(automount_t, automount_tmp_t, { file dir })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Allow automount to create and delete directories in / and /home
|
|
Chris PeBenito |
c0868a |
allow automount_t automount_tmp_t:dir manage_dir_perms;
|
|
Chris PeBenito |
0bfccd |
files_home_filetrans(automount_t, automount_tmp_t, dir)
|
|
Chris PeBenito |
0bfccd |
files_root_filetrans(automount_t, automount_tmp_t, dir)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
0bfccd |
manage_files_pattern(automount_t, automount_var_run_t, automount_var_run_t)
|
|
Chris PeBenito |
967fd1 |
manage_fifo_files_pattern(automount_t, automount_var_run_t, automount_var_run_t)
|
|
Chris PeBenito |
967fd1 |
files_pid_filetrans(automount_t, automount_var_run_t, { file fifo_file })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
kernel_read_kernel_sysctls(automount_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_irq_sysctls(automount_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_fs_sysctls(automount_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_proc_symlinks(automount_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_system_state(automount_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_network_state(automount_t)
|
|
Chris PeBenito |
17de1b |
kernel_list_proc(automount_t)
|
|
Chris PeBenito |
17de1b |
kernel_dontaudit_search_xen_state(automount_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_search_boot(automount_t)
|
|
Chris PeBenito |
17de1b |
# Automount is slowly adding all mount functionality internally
|
|
Chris PeBenito |
17de1b |
files_search_all(automount_t)
|
|
Chris PeBenito |
17de1b |
files_mounton_all_mountpoints(automount_t)
|
|
Chris PeBenito |
17de1b |
files_mount_all_file_type_fs(automount_t)
|
|
Chris PeBenito |
17de1b |
files_unmount_all_file_type_fs(automount_t)
|
|
Chris PeBenito |
333222 |
files_manage_non_security_dirs(automount_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
fs_mount_all_fs(automount_t)
|
|
Chris PeBenito |
17de1b |
fs_unmount_all_fs(automount_t)
|
|
Chris PeBenito |
104918 |
fs_search_all(automount_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
corecmd_exec_bin(automount_t)
|
|
Chris PeBenito |
17de1b |
corecmd_exec_shell(automount_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
190066 |
corenet_all_recvfrom_unlabeled(automount_t)
|
|
Chris PeBenito |
190066 |
corenet_all_recvfrom_netlabel(automount_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_generic_if(automount_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_generic_if(automount_t)
|
|
Chris PeBenito |
c12621 |
corenet_tcp_sendrecv_generic_node(automount_t)
|
|
Chris PeBenito |
c12621 |
corenet_udp_sendrecv_generic_node(automount_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_ports(automount_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_ports(automount_t)
|
|
Chris PeBenito |
c12621 |
corenet_tcp_bind_generic_node(automount_t)
|
|
Chris PeBenito |
c12621 |
corenet_udp_bind_generic_node(automount_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_connect_portmap_port(automount_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_connect_all_ports(automount_t)
|
|
Chris PeBenito |
17de1b |
corenet_dontaudit_tcp_connect_all_reserved_ports(automount_t)
|
|
Chris PeBenito |
17de1b |
corenet_sendrecv_all_client_packets(automount_t)
|
|
Chris PeBenito |
17de1b |
# Automount execs showmount when you browse /net. This is required until
|
|
Chris PeBenito |
17de1b |
# Someone writes a showmount policy
|
|
Chris PeBenito |
17de1b |
corenet_tcp_bind_reserved_port(automount_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_bind_all_rpc_ports(automount_t)
|
|
Chris PeBenito |
8708d9 |
corenet_udp_bind_reserved_port(automount_t)
|
|
Chris PeBenito |
8708d9 |
corenet_udp_bind_all_rpc_ports(automount_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
dev_read_sysfs(automount_t)
|
|
Chris PeBenito |
333222 |
dev_rw_autofs(automount_t)
|
|
Chris PeBenito |
17de1b |
# for SSP
|
|
Chris PeBenito |
8a9d6f |
dev_read_rand(automount_t)
|
|
Chris PeBenito |
17de1b |
dev_read_urand(automount_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
domain_use_interactive_fds(automount_t)
|
|
Chris PeBenito |
17de1b |
domain_dontaudit_read_all_domains_state(automount_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_dontaudit_write_var_dirs(automount_t)
|
|
Chris PeBenito |
17de1b |
files_getattr_all_dirs(automount_t)
|
|
Chris PeBenito |
17de1b |
files_list_mnt(automount_t)
|
|
Chris PeBenito |
17de1b |
files_getattr_home_dir(automount_t)
|
|
Chris PeBenito |
17de1b |
files_read_etc_files(automount_t)
|
|
Chris PeBenito |
17de1b |
files_read_etc_runtime_files(automount_t)
|
|
Chris PeBenito |
17de1b |
# for if the mount point is not labelled
|
|
Chris PeBenito |
17de1b |
files_getattr_isid_type_dirs(automount_t)
|
|
Chris PeBenito |
17de1b |
files_getattr_default_dirs(automount_t)
|
|
Chris PeBenito |
17de1b |
# because config files can be shell scripts
|
|
Chris PeBenito |
17de1b |
files_exec_etc_files(automount_t)
|
|
Chris PeBenito |
17de1b |
files_mounton_mnt(automount_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
fs_getattr_all_fs(automount_t)
|
|
Chris PeBenito |
17de1b |
fs_getattr_all_dirs(automount_t)
|
|
Chris PeBenito |
17de1b |
fs_search_auto_mountpoints(automount_t)
|
|
Chris PeBenito |
17de1b |
fs_manage_auto_mountpoints(automount_t)
|
|
Chris PeBenito |
17de1b |
fs_unmount_autofs(automount_t)
|
|
Chris PeBenito |
17de1b |
fs_mount_autofs(automount_t)
|
|
Chris PeBenito |
d9845a |
fs_manage_autofs_symlinks(automount_t)
|
|
Chris PeBenito |
104918 |
fs_read_nfs_files(automount_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
967fd1 |
storage_rw_fuse(automount_t)
|
|
Chris PeBenito |
967fd1 |
|
|
Chris PeBenito |
17de1b |
term_dontaudit_getattr_pty_dirs(automount_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
967fd1 |
auth_use_nsswitch(automount_t)
|
|
Chris PeBenito |
967fd1 |
|
|
Chris PeBenito |
17de1b |
logging_send_syslog_msg(automount_t)
|
|
Chris PeBenito |
17de1b |
logging_search_logs(automount_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
miscfiles_read_localization(automount_t)
|
|
Chris PeBenito |
17de1b |
miscfiles_read_certs(automount_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Run mount in the mount_t domain.
|
|
Chris PeBenito |
17de1b |
mount_domtrans(automount_t)
|
|
Dan Walsh |
3eaa99 |
mount_domtrans_showmount(automount_t)
|
|
Chris PeBenito |
333222 |
mount_signal(automount_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
userdom_dontaudit_use_unpriv_user_fds(automount_t)
|
|
Chris PeBenito |
296273 |
userdom_dontaudit_search_user_home_dirs(automount_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
bind_search_cache(automount_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
fstools_domtrans(automount_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
333222 |
kerberos_keytab_template(automount, automount_t)
|
|
Chris PeBenito |
465510 |
kerberos_read_config(automount_t)
|
|
Chris PeBenito |
465510 |
kerberos_dontaudit_write_config(automount_t)
|
|
Chris PeBenito |
465510 |
')
|
|
Chris PeBenito |
465510 |
|
|
Chris PeBenito |
465510 |
optional_policy(`
|
|
Chris PeBenito |
967fd1 |
rpc_search_nfs_state_data(automount_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
967fd1 |
samba_read_config(automount_t)
|
|
Chris PeBenito |
967fd1 |
samba_manage_var_files(automount_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
seutil_sigchld_newrole(automount_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
udev_read_db(automount_t)
|
|
Chris PeBenito |
17de1b |
')
|