|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
3016a9 |
type mount_t;
|
|
Chris PeBenito |
3016a9 |
type mount_exec_t;
|
|
Chris PeBenito |
c9428d |
init_system_domain(mount_t,mount_exec_t)
|
|
Chris PeBenito |
bbd6a6 |
role system_r types mount_t;
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
3016a9 |
type mount_tmp_t;
|
|
Chris PeBenito |
c9428d |
files_tmp_file(mount_tmp_t)
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
3016a9 |
########################################
|
|
Chris PeBenito |
3016a9 |
#
|
|
Chris PeBenito |
3016a9 |
# mount local policy
|
|
Chris PeBenito |
3016a9 |
#
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
3016a9 |
allow mount_t self:capability { ipc_lock sys_rawio sys_admin dac_override chown };
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
cc41a9 |
allow mount_t mount_tmp_t:file create_file_perms;
|
|
Chris PeBenito |
cc41a9 |
allow mount_t mount_tmp_t:dir create_dir_perms;
|
|
Chris PeBenito |
c9428d |
files_create_tmp_files(mount_t,mount_tmp_t,{ file dir })
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
3016a9 |
kernel_read_system_state(mount_t)
|
|
Chris PeBenito |
0fd9dc |
kernel_dontaudit_use_fd(mount_t)
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
0fd9dc |
corenet_dontaudit_tcp_bind_all_reserved_ports(mount_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_dontaudit_udp_bind_all_reserved_ports(mount_t)
|
|
Chris PeBenito |
daa0e0 |
|
|
Karl MacMillan |
f0c985 |
dev_getattr_all_blk_files(mount_t)
|
|
Karl MacMillan |
f0c985 |
dev_list_all_dev_nodes(mount_t)
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
3016a9 |
storage_raw_read_fixed_disk(mount_t)
|
|
Chris PeBenito |
3016a9 |
storage_raw_write_fixed_disk(mount_t)
|
|
Chris PeBenito |
3016a9 |
storage_raw_read_removable_device(mount_t)
|
|
Chris PeBenito |
3016a9 |
storage_raw_write_removable_device(mount_t)
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
0fd9dc |
fs_getattr_xattr_fs(mount_t)
|
|
Chris PeBenito |
763c44 |
fs_mount_all_fs(mount_t)
|
|
Chris PeBenito |
763c44 |
fs_unmount_all_fs(mount_t)
|
|
Chris PeBenito |
763c44 |
fs_remount_all_fs(mount_t)
|
|
Chris PeBenito |
0fd9dc |
fs_relabelfrom_xattr_fs(mount_t)
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
0fd9dc |
term_use_console(mount_t)
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
daa0e0 |
# required for mount.smbfs
|
|
Chris PeBenito |
c9428d |
corecmd_exec_sbin(mount_t)
|
|
Chris PeBenito |
c9428d |
corecmd_exec_bin(mount_t)
|
|
Chris PeBenito |
a2d824 |
|
|
Chris PeBenito |
c9428d |
domain_use_wide_inherit_fd(mount_t)
|
|
Chris PeBenito |
a2d824 |
|
|
Chris PeBenito |
c9428d |
files_search_all_dirs(mount_t)
|
|
Chris PeBenito |
c9428d |
files_read_generic_etc_files(mount_t)
|
|
Chris PeBenito |
c9428d |
files_manage_etc_runtime_files(mount_t)
|
|
Chris PeBenito |
c9428d |
files_mounton_all_mountpoints(mount_t)
|
|
Chris PeBenito |
c9428d |
files_unmount_rootfs(mount_t)
|
|
Chris PeBenito |
dc771f |
# These rules need to be generalized. Only admin, initrc should have it:
|
|
Chris PeBenito |
763c44 |
files_relabelto_all_file_type_fs(mount_t)
|
|
Chris PeBenito |
763c44 |
files_mount_all_file_type_fs(mount_t)
|
|
Chris PeBenito |
763c44 |
files_mount_all_file_type_fs(mount_t)
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
c9428d |
init_use_fd(mount_t)
|
|
Chris PeBenito |
c9428d |
init_use_script_pty(mount_t)
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
c9428d |
libs_use_ld_so(mount_t)
|
|
Chris PeBenito |
c9428d |
libs_use_shared_libs(mount_t)
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
c9428d |
logging_send_syslog_msg(mount_t)
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
3016a9 |
miscfiles_read_localization(mount_t)
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
c9428d |
userdom_use_all_user_fd(mount_t)
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
254bbc |
ifdef(`distro_redhat',`
|
|
Chris PeBenito |
763c44 |
fs_use_tmpfs_character_devices(mount_t)
|
|
Chris PeBenito |
0c73cd |
allow mount_t tmpfs_t:dir mounton;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
optional_policy(`authlogin.te',`
|
|
Chris PeBenito |
c9428d |
auth_read_pam_console_data(mount_t)
|
|
Chris PeBenito |
0c73cd |
# mount config by default sets fscontext=removable_t
|
|
Chris PeBenito |
763c44 |
fs_relabelfrom_dos_fs(mount_t)
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
daa0e0 |
optional_policy(`portmap.te', `
|
|
Chris PeBenito |
0c73cd |
# for nfs
|
|
Chris PeBenito |
0c73cd |
#can_ypbind(mount_t)
|
|
Chris PeBenito |
0c73cd |
#allow portmap_t mount_t:udp_socket { sendto recvfrom };
|
|
Chris PeBenito |
0c73cd |
#allow mount_t portmap_t:udp_socket { sendto recvfrom };
|
|
Chris PeBenito |
0c73cd |
#allow mount_t rpc_pipefs_t:dir search;
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_sendrecv_all_if(mount_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_raw_sendrecv_all_if(mount_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_sendrecv_all_if(mount_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_sendrecv_all_nodes(mount_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_raw_sendrecv_all_nodes(mount_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_sendrecv_all_nodes(mount_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_sendrecv_all_ports(mount_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_sendrecv_all_ports(mount_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_bind_all_nodes(mount_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_bind_all_nodes(mount_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_bind_generic_port(mount_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_bind_generic_port(mount_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_bind_reserved_port(mount_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_bind_reserved_port(mount_t)
|
|
Chris PeBenito |
daa0e0 |
')
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
3016a9 |
ifdef(`TODO',`
|
|
Chris PeBenito |
daa0e0 |
# this goes to the nfs/rpc module
|
|
Chris PeBenito |
c9428d |
files_mountpoint(var_lib_nfs_t)
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
3016a9 |
# TODO: Need to examine this further. Not sure how to handle this
|
|
Chris PeBenito |
f66a1a |
#type sysadm_mount_source_t, file_type, sysadmfile, $1_file_type;
|
|
Chris PeBenito |
f66a1a |
#allow sysadm_t sysadm_mount_source_t:file create_file_perms;
|
|
Chris PeBenito |
f66a1a |
#allow sysadm_t sysadm_mount_source_t:file { relabelto relabelfrom };
|
|
Chris PeBenito |
f66a1a |
#allow mount_t sysadm_mount_source_t:file rw_file_perms;
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
3016a9 |
# TODO: Probably need a macro for reading/unlinking files
|
|
Chris PeBenito |
3016a9 |
# for when /etc/mtab loses its type
|
|
Chris PeBenito |
cc41a9 |
allow mount_t file_t:file { r_file_perms unlink };
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
3016a9 |
ifdef(`gnome-pty-helper.te', `
|
|
Chris PeBenito |
3016a9 |
allow mount_t sysadm_gph_t:fd use;
|
|
Chris PeBenito |
3016a9 |
')
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
25baab |
optional_policy(`rhgb.te', `
|
|
Chris PeBenito |
3016a9 |
allow mount_t rhgb_t:process sigchld;
|
|
Chris PeBenito |
3016a9 |
allow mount_t rhgb_t:fd use;
|
|
Chris PeBenito |
3016a9 |
allow mount_t rhgb_t:fifo_file { read write };
|
|
Chris PeBenito |
3016a9 |
')
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
25baab |
optional_policy(`automount.te', `
|
|
Chris PeBenito |
3016a9 |
allow mount_t autofs_t:dir read;
|
|
Chris PeBenito |
3016a9 |
')
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
3016a9 |
') dnl endif TODO
|