|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
2b3c99 |
policy_module(mount,1.3.0)
|
|
Chris PeBenito |
7a2f20 |
|
|
Chris PeBenito |
7a2f20 |
########################################
|
|
Chris PeBenito |
7a2f20 |
#
|
|
Chris PeBenito |
7a2f20 |
# Declarations
|
|
Chris PeBenito |
7a2f20 |
#
|
|
Chris PeBenito |
7a2f20 |
|
|
Chris PeBenito |
f0574f |
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 |
77f6e2 |
allow mount_t self:capability { ipc_lock sys_rawio sys_admin dac_override chown sys_tty_config };
|
|
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 |
103fe2 |
files_tmp_filetrans(mount_t,mount_tmp_t,{ file dir })
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
3016a9 |
kernel_read_system_state(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 |
93727e |
dev_rw_lvm_control(mount_t)
|
|
Chris PeBenito |
b0d224 |
dev_dontaudit_getattr_memory_dev(mount_t)
|
|
Chris PeBenito |
b0d224 |
dev_getattr_sound_dev(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 |
cf6a7d |
fs_relabelfrom_all_fs(mount_t)
|
|
Chris PeBenito |
0f27d9 |
fs_list_auto_mountpoints(mount_t)
|
|
Chris PeBenito |
4d851f |
fs_rw_tmpfs_chr_files(mount_t)
|
|
Chris PeBenito |
a52492 |
fs_read_tmpfs_symlinks(mount_t)
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
93727e |
term_use_all_terms(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 |
15722e |
domain_use_interactive_fds(mount_t)
|
|
Chris PeBenito |
a2d824 |
|
|
Chris PeBenito |
9e04f5 |
files_search_all(mount_t)
|
|
Chris PeBenito |
8fd367 |
files_read_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 |
ce1b44 |
files_unmount_all_file_type_fs(mount_t)
|
|
Chris PeBenito |
ae9e27 |
# for when /etc/mtab loses its type
|
|
Chris PeBenito |
ae9e27 |
# cjp: this seems wrong, the type should probably be etc
|
|
Chris PeBenito |
9e04f5 |
files_read_isid_type_files(mount_t)
|
|
Chris PeBenito |
3016a9 |
|
|
Chris PeBenito |
1c1ac6 |
init_use_fds(mount_t)
|
|
Chris PeBenito |
1815ba |
init_use_script_ptys(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 |
f0574f |
mls_file_read_up(mount_t)
|
|
Chris PeBenito |
f0574f |
mls_file_write_down(mount_t)
|
|
Chris PeBenito |
f0574f |
|
|
Chris PeBenito |
98a8ea |
sysnet_use_portmap(mount_t)
|
|
Chris PeBenito |
98a8ea |
|
|
Chris PeBenito |
15722e |
userdom_use_all_users_fds(mount_t)
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
254bbc |
ifdef(`distro_redhat',`
|
|
Chris PeBenito |
132880 |
optional_policy(`authlogin',`
|
|
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 |
132880 |
optional_policy(`portmap',`
|
|
Chris PeBenito |
0c73cd |
# for nfs
|
|
Chris PeBenito |
bb4372 |
corenet_non_ipsec_sendrecv(mount_t)
|
|
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 |
98a8ea |
corenet_tcp_connect_all_ports(mount_t)
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
4d851f |
fs_search_rpc(mount_t)
|
|
Chris PeBenito |
bb4372 |
|
|
Chris PeBenito |
1815ba |
portmap_udp_chat(mount_t)
|
|
Chris PeBenito |
bb4372 |
|
|
Chris PeBenito |
132880 |
optional_policy(`nis',`
|
|
Chris PeBenito |
ab940a |
nis_use_ypbind(mount_t)
|
|
Chris PeBenito |
ab940a |
')
|
|
Chris PeBenito |
daa0e0 |
')
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
132880 |
optional_policy(`apm',`
|
|
Chris PeBenito |
1c1ac6 |
apm_use_fds(mount_t)
|
|
Chris PeBenito |
4483ee |
')
|
|
Chris PeBenito |
4483ee |
|
|
Chris PeBenito |
c8d5b3 |
optional_policy(`rhgb',`
|
|
Chris PeBenito |
c8d5b3 |
ifdef(`hide_broken_symptoms',`
|
|
Chris PeBenito |
c8d5b3 |
# for a bug in the X server
|
|
Chris PeBenito |
c8d5b3 |
rhgb_dontaudit_rw_stream_sockets(mount_t)
|
|
Chris PeBenito |
c8d5b3 |
term_dontaudit_use_ptmx(mount_t)
|
|
Chris PeBenito |
c8d5b3 |
')
|
|
Chris PeBenito |
c8d5b3 |
')
|
|
Chris PeBenito |
c8d5b3 |
|
|
Chris PeBenito |
b24f35 |
# for kernel package installation
|
|
Chris PeBenito |
132880 |
optional_policy(`rpm',`
|
|
Chris PeBenito |
1815ba |
rpm_rw_pipes(mount_t)
|
|
Chris PeBenito |
b24f35 |
')
|
|
Chris PeBenito |
b24f35 |
|
|
Chris PeBenito |
132880 |
optional_policy(`samba',`
|
|
Chris PeBenito |
84c922 |
samba_domtrans_smbmount(mount_t)
|
|
Chris PeBenito |
84c922 |
')
|
|
Chris PeBenito |
84c922 |
|
|
Chris PeBenito |
3016a9 |
ifdef(`TODO',`
|
|
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 |
# for when /etc/mtab loses its type
|
|
Chris PeBenito |
ae9e27 |
allow mount_t file_t:file unlink;
|
|
Chris PeBenito |
3016a9 |
') dnl endif TODO
|