2005-04-26 21:12:52 +00:00
|
|
|
|
|
|
|
type mount_t;
|
|
|
|
type mount_exec_t;
|
2005-05-13 20:21:50 +00:00
|
|
|
init_make_system_domain(mount_t,mount_exec_t)
|
2005-05-05 18:30:00 +00:00
|
|
|
role system_r types mount_t;
|
2005-04-26 21:12:52 +00:00
|
|
|
|
|
|
|
type mount_tmp_t;
|
2005-05-11 19:21:40 +00:00
|
|
|
files_make_temporary_file(mount_tmp_t)
|
2005-04-26 21:12:52 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# mount local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow mount_t self:capability { ipc_lock sys_rawio sys_admin dac_override chown };
|
|
|
|
|
2005-06-09 18:08:26 +00:00
|
|
|
allow mount_t mount_tmp_t:file create_file_perms;
|
|
|
|
allow mount_t mount_tmp_t:dir create_dir_perms;
|
2005-04-26 21:12:52 +00:00
|
|
|
|
|
|
|
kernel_read_system_state(mount_t)
|
2005-04-28 21:41:09 +00:00
|
|
|
kernel_ignore_use_file_descriptors(mount_t)
|
2005-04-26 21:12:52 +00:00
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
corenetwork_ignore_bind_tcp_on_all_reserved_ports(mount_t)
|
|
|
|
corenetwork_ignore_bind_udp_on_all_reserved_ports(mount_t)
|
|
|
|
|
2005-04-26 21:12:52 +00:00
|
|
|
devices_get_all_block_device_attributes(mount_t)
|
|
|
|
devices_list_device_nodes(mount_t)
|
|
|
|
|
|
|
|
storage_raw_read_fixed_disk(mount_t)
|
|
|
|
storage_raw_write_fixed_disk(mount_t)
|
|
|
|
storage_raw_read_removable_device(mount_t)
|
|
|
|
storage_raw_write_removable_device(mount_t)
|
|
|
|
|
2005-06-08 13:12:00 +00:00
|
|
|
fs_get_persistent_fs_attributes(mount_t)
|
|
|
|
fs_mount_all_fs(mount_t)
|
|
|
|
fs_unmount_all_fs(mount_t)
|
|
|
|
fs_remount_all_fs(mount_t)
|
|
|
|
fs_relabelfrom_persistent_fs(mount_t)
|
2005-04-26 21:12:52 +00:00
|
|
|
|
|
|
|
terminal_use_console(mount_t)
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
# required for mount.smbfs
|
|
|
|
corecommands_execute_system_programs(mount_t)
|
|
|
|
corecommands_execute_general_programs(mount_t)
|
2005-04-28 21:41:09 +00:00
|
|
|
|
|
|
|
domain_use_widely_inheritable_file_descriptors(mount_t)
|
|
|
|
|
2005-04-26 21:12:52 +00:00
|
|
|
files_search_all_directories(mount_t)
|
|
|
|
files_create_private_tmp_data(mount_t,mount_tmp_t,{ file dir })
|
|
|
|
files_read_general_system_config(mount_t)
|
2005-05-26 20:38:45 +00:00
|
|
|
files_manage_runtime_system_config(mount_t)
|
2005-04-28 21:41:09 +00:00
|
|
|
files_mount_on_all_mountpoints(mount_t)
|
2005-06-08 13:12:00 +00:00
|
|
|
files_unmount_root_fs(mount_t)
|
2005-05-24 15:55:57 +00:00
|
|
|
# These rules need to be generalized. Only admin, initrc should have it:
|
2005-06-08 13:12:00 +00:00
|
|
|
files_relabelto_all_file_type_fs(mount_t)
|
|
|
|
files_mount_all_file_type_fs(mount_t)
|
|
|
|
files_mount_all_file_type_fs(mount_t)
|
2005-04-26 21:12:52 +00:00
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
init_use_file_descriptors(mount_t)
|
|
|
|
init_script_use_pseudoterminal(mount_t)
|
|
|
|
|
2005-04-26 21:12:52 +00:00
|
|
|
libraries_use_dynamic_loader(mount_t)
|
2005-05-17 15:32:52 +00:00
|
|
|
libraries_use_shared_libraries(mount_t)
|
2005-04-26 21:12:52 +00:00
|
|
|
|
|
|
|
logging_send_system_log_message(mount_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(mount_t)
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
userdomain_use_all_users_file_descriptors(mount_t)
|
|
|
|
|
2005-06-07 18:45:47 +00:00
|
|
|
ifdef(`distro_redhat',`
|
2005-06-08 13:12:00 +00:00
|
|
|
fs_use_tmpfs_character_devices(mount_t)
|
2005-06-03 12:25:14 +00:00
|
|
|
allow mount_t tmpfs_t:dir mounton;
|
|
|
|
|
|
|
|
optional_policy(`authlogin.te',`
|
|
|
|
authlogin_pam_console_read_runtime_data(mount_t)
|
|
|
|
# mount config by default sets fscontext=removable_t
|
2005-06-08 13:12:00 +00:00
|
|
|
fs_relabelfrom_dos_fs(mount_t)
|
2005-06-03 12:25:14 +00:00
|
|
|
')
|
|
|
|
')
|
2005-05-19 21:06:06 +00:00
|
|
|
|
|
|
|
optional_policy(`portmap.te', `
|
2005-06-03 12:25:14 +00:00
|
|
|
# for nfs
|
|
|
|
#can_ypbind(mount_t)
|
|
|
|
#allow portmap_t mount_t:udp_socket { sendto recvfrom };
|
|
|
|
#allow mount_t portmap_t:udp_socket { sendto recvfrom };
|
|
|
|
#allow mount_t rpc_pipefs_t:dir search;
|
|
|
|
corenetwork_sendrecv_tcp_on_all_interfaces(mount_t)
|
|
|
|
corenetwork_sendrecv_raw_on_all_interfaces(mount_t)
|
|
|
|
corenetwork_sendrecv_udp_on_all_interfaces(mount_t)
|
|
|
|
corenetwork_sendrecv_tcp_on_all_nodes(mount_t)
|
|
|
|
corenetwork_sendrecv_raw_on_all_nodes(mount_t)
|
|
|
|
corenetwork_sendrecv_udp_on_all_nodes(mount_t)
|
|
|
|
corenetwork_sendrecv_tcp_on_all_ports(mount_t)
|
|
|
|
corenetwork_sendrecv_udp_on_all_ports(mount_t)
|
|
|
|
corenetwork_bind_tcp_on_all_nodes(mount_t)
|
|
|
|
corenetwork_bind_udp_on_all_nodes(mount_t)
|
|
|
|
corenetwork_bind_tcp_on_general_port(mount_t)
|
|
|
|
corenetwork_bind_udp_on_general_port(mount_t)
|
|
|
|
corenetwork_bind_tcp_on_reserved_port(mount_t)
|
|
|
|
corenetwork_bind_udp_on_reserved_port(mount_t)
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-04-26 21:12:52 +00:00
|
|
|
ifdef(`TODO',`
|
2005-05-19 21:06:06 +00:00
|
|
|
# this goes to the nfs/rpc module
|
|
|
|
files_make_mountpoint(var_lib_nfs_t)
|
2005-04-26 21:12:52 +00:00
|
|
|
|
|
|
|
# TODO: Need to examine this further. Not sure how to handle this
|
2005-05-05 14:08:26 +00:00
|
|
|
#type sysadm_mount_source_t, file_type, sysadmfile, $1_file_type;
|
|
|
|
#allow sysadm_t sysadm_mount_source_t:file create_file_perms;
|
|
|
|
#allow sysadm_t sysadm_mount_source_t:file { relabelto relabelfrom };
|
|
|
|
#allow mount_t sysadm_mount_source_t:file rw_file_perms;
|
2005-04-26 21:12:52 +00:00
|
|
|
|
|
|
|
# TODO: Probably need a macro for reading/unlinking files
|
|
|
|
# for when /etc/mtab loses its type
|
2005-06-09 18:08:26 +00:00
|
|
|
allow mount_t file_t:file { r_file_perms unlink };
|
2005-04-26 21:12:52 +00:00
|
|
|
|
|
|
|
ifdef(`gnome-pty-helper.te', `
|
|
|
|
allow mount_t sysadm_gph_t:fd use;
|
|
|
|
')
|
|
|
|
|
2005-05-02 19:22:58 +00:00
|
|
|
optional_policy(`rhgb.te', `
|
2005-04-26 21:12:52 +00:00
|
|
|
allow mount_t rhgb_t:process sigchld;
|
|
|
|
allow mount_t rhgb_t:fd use;
|
|
|
|
allow mount_t rhgb_t:fifo_file { read write };
|
|
|
|
')
|
|
|
|
|
2005-05-02 19:22:58 +00:00
|
|
|
optional_policy(`automount.te', `
|
2005-04-26 21:12:52 +00:00
|
|
|
allow mount_t autofs_t:dir read;
|
|
|
|
')
|
|
|
|
|
|
|
|
') dnl endif TODO
|