|
Chris PeBenito |
4ec694 |
|
|
Chris PeBenito |
63f0a7 |
policy_module(cdrecord, 2.0.1)
|
|
Chris PeBenito |
4ec694 |
|
|
Chris PeBenito |
4ec694 |
########################################
|
|
Chris PeBenito |
4ec694 |
#
|
|
Chris PeBenito |
4ec694 |
# Declarations
|
|
Chris PeBenito |
4ec694 |
#
|
|
Chris PeBenito |
4ec694 |
|
|
Chris PeBenito |
56e1b3 |
## <desc>
|
|
Chris PeBenito |
56e1b3 |
##
|
|
Chris PeBenito |
56e1b3 |
## Allow cdrecord to read various content.
|
|
Chris PeBenito |
56e1b3 |
## nfs, samba, removable devices, user temp
|
|
Chris PeBenito |
56e1b3 |
## and untrusted content files
|
|
Chris PeBenito |
56e1b3 |
##
|
|
Chris PeBenito |
56e1b3 |
## </desc>
|
|
Chris PeBenito |
0bfccd |
gen_tunable(cdrecord_read_content, false)
|
|
Chris PeBenito |
56e1b3 |
|
|
Chris PeBenito |
296273 |
type cdrecord_t;
|
|
Chris PeBenito |
4ec694 |
type cdrecord_exec_t;
|
|
Chris PeBenito |
296273 |
typealias cdrecord_t alias { user_cdrecord_t staff_cdrecord_t sysadm_cdrecord_t };
|
|
Chris PeBenito |
296273 |
typealias cdrecord_t alias { auditadm_cdrecord_t secadm_cdrecord_t };
|
|
Chris PeBenito |
296273 |
application_domain(cdrecord_t, cdrecord_exec_t)
|
|
Chris PeBenito |
296273 |
ubac_constrained(cdrecord_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
########################################
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
# Local policy
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow cdrecord_t self:capability { ipc_lock sys_nice setuid dac_override sys_rawio };
|
|
Chris PeBenito |
296273 |
allow cdrecord_t self:process { getsched setsched sigkill };
|
|
Chris PeBenito |
296273 |
allow cdrecord_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
296273 |
allow cdrecord_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# allow searching for cdrom-drive
|
|
Chris PeBenito |
296273 |
dev_list_all_dev_nodes(cdrecord_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
domain_interactive_fd(cdrecord_t)
|
|
Chris PeBenito |
296273 |
domain_use_interactive_fds(cdrecord_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
files_read_etc_files(cdrecord_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
term_use_controlling_term(cdrecord_t)
|
|
Chris PeBenito |
296273 |
term_list_ptys(cdrecord_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# allow cdrecord to write the CD
|
|
Chris PeBenito |
296273 |
storage_raw_write_removable_device(cdrecord_t)
|
|
Chris PeBenito |
296273 |
storage_write_scsi_generic(cdrecord_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
logging_send_syslog_msg(cdrecord_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
miscfiles_read_localization(cdrecord_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# write to the user domain tty.
|
|
Chris PeBenito |
296273 |
userdom_use_user_terminals(cdrecord_t)
|
|
Chris PeBenito |
296273 |
userdom_read_user_home_content_files(cdrecord_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# Handle nfs home dirs
|
|
Chris PeBenito |
296273 |
tunable_policy(`cdrecord_read_content && use_nfs_home_dirs',`
|
|
Chris PeBenito |
296273 |
fs_list_auto_mountpoints(cdrecord_t)
|
|
Chris PeBenito |
296273 |
files_list_home(cdrecord_t)
|
|
Chris PeBenito |
296273 |
fs_read_nfs_files(cdrecord_t)
|
|
Chris PeBenito |
296273 |
fs_read_nfs_symlinks(cdrecord_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
',`
|
|
Chris PeBenito |
296273 |
files_dontaudit_list_home(cdrecord_t)
|
|
Chris PeBenito |
296273 |
fs_dontaudit_list_auto_mountpoints(cdrecord_t)
|
|
Chris PeBenito |
296273 |
fs_dontaudit_read_nfs_files(cdrecord_t)
|
|
Chris PeBenito |
296273 |
fs_dontaudit_list_nfs(cdrecord_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
# Handle samba home dirs
|
|
Chris PeBenito |
296273 |
tunable_policy(`cdrecord_read_content && use_samba_home_dirs',`
|
|
Chris PeBenito |
296273 |
fs_list_auto_mountpoints(cdrecord_t)
|
|
Chris PeBenito |
296273 |
files_list_home(cdrecord_t)
|
|
Chris PeBenito |
296273 |
fs_read_cifs_files(cdrecord_t)
|
|
Chris PeBenito |
296273 |
fs_read_cifs_symlinks(cdrecord_t)
|
|
Chris PeBenito |
296273 |
',`
|
|
Chris PeBenito |
296273 |
files_dontaudit_list_home(cdrecord_t)
|
|
Chris PeBenito |
296273 |
fs_dontaudit_list_auto_mountpoints(cdrecord_t)
|
|
Chris PeBenito |
296273 |
fs_dontaudit_read_cifs_files(cdrecord_t)
|
|
Chris PeBenito |
296273 |
fs_dontaudit_list_cifs(cdrecord_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# Handle removable media, /tmp, and /home
|
|
Chris PeBenito |
296273 |
tunable_policy(`cdrecord_read_content',`
|
|
Chris PeBenito |
296273 |
userdom_list_user_tmp(cdrecord_t)
|
|
Chris PeBenito |
296273 |
userdom_read_user_tmp_files(cdrecord_t)
|
|
Chris PeBenito |
296273 |
userdom_read_user_tmp_symlinks(cdrecord_t)
|
|
Chris PeBenito |
296273 |
userdom_read_user_home_content_files(cdrecord_t)
|
|
Chris PeBenito |
296273 |
userdom_read_user_home_content_symlinks(cdrecord_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
ifndef(`enable_mls',`
|
|
Chris PeBenito |
296273 |
fs_search_removable(cdrecord_t)
|
|
Chris PeBenito |
296273 |
fs_read_removable_files(cdrecord_t)
|
|
Chris PeBenito |
296273 |
fs_read_removable_symlinks(cdrecord_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
',`
|
|
Chris PeBenito |
296273 |
files_dontaudit_list_tmp(cdrecord_t)
|
|
Chris PeBenito |
296273 |
files_dontaudit_list_home(cdrecord_t)
|
|
Chris PeBenito |
296273 |
fs_dontaudit_list_removable(cdrecord_t)
|
|
Chris PeBenito |
296273 |
fs_dontaudit_read_removable_files(cdrecord_t)
|
|
Chris PeBenito |
296273 |
userdom_dontaudit_list_user_tmp(cdrecord_t)
|
|
Chris PeBenito |
296273 |
userdom_dontaudit_read_user_tmp_files(cdrecord_t)
|
|
Chris PeBenito |
296273 |
userdom_dontaudit_list_user_home_dirs(cdrecord_t)
|
|
Chris PeBenito |
296273 |
userdom_dontaudit_read_user_home_content_files(cdrecord_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# Handle default_t content
|
|
Chris PeBenito |
296273 |
tunable_policy(`cdrecord_read_content && read_default_t',`
|
|
Chris PeBenito |
296273 |
files_list_default(cdrecord_t)
|
|
Chris PeBenito |
296273 |
files_read_default_files(cdrecord_t)
|
|
Chris PeBenito |
296273 |
files_read_default_symlinks(cdrecord_t)
|
|
Chris PeBenito |
296273 |
',`
|
|
Chris PeBenito |
296273 |
files_dontaudit_read_default_files(cdrecord_t)
|
|
Chris PeBenito |
296273 |
files_dontaudit_list_default(cdrecord_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
296273 |
files_search_mnt(cdrecord_t)
|
|
Chris PeBenito |
296273 |
fs_read_nfs_files(cdrecord_t)
|
|
Chris PeBenito |
296273 |
fs_read_nfs_symlinks(cdrecord_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
resmgr_stream_connect(cdrecord_t)
|
|
Chris PeBenito |
296273 |
')
|