Chris PeBenito 58c3da
Chris PeBenito 724925
policy_module(fstools,1.3.2)
Chris PeBenito 58c3da
Chris PeBenito 58c3da
########################################
Chris PeBenito 58c3da
#
Chris PeBenito 58c3da
# Declarations
Chris PeBenito 58c3da
#
Chris PeBenito fd89e1
Chris PeBenito f0574f
type fsadm_t;
Chris PeBenito 58c3da
type fsadm_exec_t;
Chris PeBenito 58c3da
init_system_domain(fsadm_t,fsadm_exec_t)
Chris PeBenito f0574f
mls_file_read_up(fsadm_t)
Chris PeBenito 58c3da
role system_r types fsadm_t;
Chris PeBenito 58c3da
Chris PeBenito 58c3da
type fsadm_tmp_t;
Chris PeBenito 58c3da
files_tmp_file(fsadm_tmp_t)
Chris PeBenito 58c3da
Chris PeBenito 46c69c
type swapfile_t; # customizable
Chris PeBenito 8fd367
files_type(swapfile_t)
Chris PeBenito 58c3da
Chris PeBenito 58c3da
########################################
Chris PeBenito fd89e1
#
Chris PeBenito fd89e1
# local policy
Chris PeBenito fd89e1
#
Chris PeBenito 58c3da
Chris PeBenito 58c3da
# ipc_lock is for losetup
Chris PeBenito a08248
allow fsadm_t self:capability { ipc_lock sys_rawio sys_admin sys_tty_config dac_override dac_read_search };
Chris PeBenito 9d3bdc
allow fsadm_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execmem execheap };
Chris PeBenito 58c3da
allow fsadm_t self:fd use;
Chris PeBenito 58c3da
allow fsadm_t self:fifo_file rw_file_perms;
Chris PeBenito 725926
allow fsadm_t self:sock_file r_file_perms;
Chris PeBenito 58c3da
allow fsadm_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 58c3da
allow fsadm_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 58c3da
allow fsadm_t self:unix_dgram_socket sendto;
Chris PeBenito 58c3da
allow fsadm_t self:unix_stream_socket connectto;
Chris PeBenito 58c3da
allow fsadm_t self:shm create_shm_perms;
Chris PeBenito 58c3da
allow fsadm_t self:sem create_sem_perms;
Chris PeBenito 58c3da
allow fsadm_t self:msgq create_msgq_perms;
Chris PeBenito 58c3da
allow fsadm_t self:msg { send receive };
Chris PeBenito 58c3da
Chris PeBenito 58c3da
can_exec(fsadm_t, fsadm_exec_t)
Chris PeBenito 58c3da
Chris PeBenito 58c3da
allow fsadm_t fsadm_tmp_t:dir create_dir_perms;
Chris PeBenito 58c3da
allow fsadm_t fsadm_tmp_t:file create_file_perms;
Chris PeBenito 103fe2
files_tmp_filetrans(fsadm_t, fsadm_tmp_t, { file dir })
Chris PeBenito 58c3da
Chris PeBenito 58c3da
# Enable swapping to files
Chris PeBenito 0f27d9
allow fsadm_t swapfile_t:file { read write getattr swapon };
Chris PeBenito 58c3da
Chris PeBenito 58c3da
kernel_read_system_state(fsadm_t)
Chris PeBenito 445522
kernel_read_kernel_sysctls(fsadm_t)
Chris PeBenito 58c3da
# Allow console log change (updfstab)
Chris PeBenito 58c3da
kernel_change_ring_buffer_level(fsadm_t)
Chris PeBenito a42ca7
# mkreiserfs needs this
Chris PeBenito a42ca7
kernel_getattr_proc(fsadm_t)
Chris PeBenito a3cf80
kernel_getattr_core_if(fsadm_t)
Chris PeBenito a42ca7
# Access to /initrd devices
Chris PeBenito 445522
kernel_rw_unlabeled_dirs(fsadm_t)
Chris PeBenito 445522
kernel_rw_unlabeled_blk_files(fsadm_t)
Chris PeBenito 58c3da
Chris PeBenito 1c1ac6
files_getattr_boot_dirs(fsadm_t)
Chris PeBenito b0d224
Chris PeBenito a1fcff
dev_getattr_all_chr_files(fsadm_t)
Chris PeBenito a3cf80
dev_dontaudit_getattr_all_blk_files(fsadm_t)
Chris PeBenito 58c3da
# mkreiserfs and other programs need this for UUID
Chris PeBenito 58c3da
dev_read_rand(fsadm_t)
Chris PeBenito 58c3da
dev_read_urand(fsadm_t)
Chris PeBenito 58c3da
# Recreate /dev/cdrom.
Chris PeBenito 58c3da
dev_manage_generic_symlinks(fsadm_t)
Chris PeBenito 724925
# fdisk needs this for early boot
Chris PeBenito 724925
dev_manage_generic_blk_files(fsadm_t)
Chris PeBenito 58c3da
# Access to /initrd devices
Chris PeBenito 58c3da
dev_search_usbfs(fsadm_t)
Chris PeBenito 783b38
# for swapon
Chris PeBenito a08248
dev_read_sysfs(fsadm_t)
Chris PeBenito a42ca7
# Access to /initrd devices
Chris PeBenito 207c47
dev_getattr_usbfs_dirs(fsadm_t)
Chris PeBenito a77e65
# Access to /dev/mapper/control
Chris PeBenito a77e65
dev_rw_lvm_control(fsadm_t)
Chris PeBenito 58c3da
Chris PeBenito 58c3da
fs_search_auto_mountpoints(fsadm_t)
Chris PeBenito 58c3da
fs_getattr_xattr_fs(fsadm_t)
Chris PeBenito 4d851f
fs_rw_ramfs_pipes(fsadm_t)
Chris PeBenito 4d851f
fs_rw_tmpfs_files(fsadm_t)
Chris PeBenito 58c3da
# remount file system to apply changes
Chris PeBenito 58c3da
fs_remount_xattr_fs(fsadm_t)
Chris PeBenito a42ca7
# for /dev/shm
Chris PeBenito a42ca7
fs_search_tmpfs(fsadm_t)
Chris PeBenito 4d851f
fs_getattr_tmpfs_dirs(fsadm_t)
Chris PeBenito a52492
fs_read_tmpfs_symlinks(fsadm_t)
Chris PeBenito 58c3da
Chris PeBenito 8967bf
mls_file_write_down(fsadm_t)
Chris PeBenito 8967bf
Chris PeBenito 58c3da
storage_raw_read_fixed_disk(fsadm_t)
Chris PeBenito 58c3da
storage_raw_write_fixed_disk(fsadm_t)
Chris PeBenito 58c3da
storage_raw_read_removable_device(fsadm_t)
Chris PeBenito 58c3da
storage_raw_write_removable_device(fsadm_t)
Chris PeBenito 58c3da
storage_read_scsi_generic(fsadm_t)
Chris PeBenito 783b38
storage_swapon_fixed_disk(fsadm_t)
Chris PeBenito 58c3da
Chris PeBenito a08248
term_use_console(fsadm_t)
Chris PeBenito a08248
Chris PeBenito ae9e27
corecmd_list_bin(fsadm_t)
Chris PeBenito ae9e27
corecmd_list_sbin(fsadm_t)
Chris PeBenito 1815ba
corecmd_read_bin_symlinks(fsadm_t)
Chris PeBenito 1815ba
corecmd_read_sbin_symlinks(fsadm_t)
Chris PeBenito ae9e27
# cjp: these are probably not needed:
Chris PeBenito 1815ba
corecmd_read_bin_files(fsadm_t)
Chris PeBenito 1815ba
corecmd_read_bin_pipes(fsadm_t)
Chris PeBenito 1815ba
corecmd_read_bin_sockets(fsadm_t)
Chris PeBenito 1815ba
corecmd_read_sbin_files(fsadm_t)
Chris PeBenito 1815ba
corecmd_read_sbin_pipes(fsadm_t)
Chris PeBenito 1815ba
corecmd_read_sbin_sockets(fsadm_t)
Chris PeBenito ae9e27
Chris PeBenito 15722e
domain_use_interactive_fds(fsadm_t)
Chris PeBenito 58c3da
Chris PeBenito 58c3da
files_list_home(fsadm_t)
Chris PeBenito 58c3da
files_read_usr_files(fsadm_t)
Chris PeBenito 8fd367
files_read_etc_files(fsadm_t)
Chris PeBenito cbca03
files_manage_lost_found(fsadm_t)
Chris PeBenito 9e04f5
files_manage_isid_type_dirs(fsadm_t)
Chris PeBenito 58c3da
# Write to /etc/mtab.
Chris PeBenito 58c3da
files_manage_etc_runtime_files(fsadm_t)
Chris PeBenito 58c3da
# Access to /initrd devices
Chris PeBenito 9e04f5
files_rw_isid_type_dirs(fsadm_t)
Chris PeBenito 9e04f5
files_rw_isid_type_blk_files(fsadm_t)
Chris PeBenito a42ca7
# Recreate /mnt/cdrom.
Chris PeBenito a42ca7
files_manage_mnt_dirs(fsadm_t)
Chris PeBenito d8636f
# for tune2fs
Chris PeBenito d8636f
files_search_all(fsadm_t)
Chris PeBenito 58c3da
Chris PeBenito 1c1ac6
init_use_fds(fsadm_t)
Chris PeBenito 1815ba
init_use_script_ptys(fsadm_t)
Chris PeBenito a3cf80
init_dontaudit_getattr_initctl(fsadm_t)
Chris PeBenito 58c3da
Chris PeBenito 58c3da
libs_use_ld_so(fsadm_t)
Chris PeBenito 58c3da
libs_use_shared_libs(fsadm_t)
Chris PeBenito 58c3da
Chris PeBenito 58c3da
logging_send_syslog_msg(fsadm_t)
Chris PeBenito 58c3da
Chris PeBenito 58c3da
miscfiles_read_localization(fsadm_t)
Chris PeBenito 58c3da
Chris PeBenito 1815ba
modutils_read_module_config(fsadm_t)
Chris PeBenito 58c3da
Chris PeBenito 58c3da
seutil_read_config(fsadm_t)
Chris PeBenito 58c3da
Chris PeBenito 103fe2
userdom_use_unpriv_users_fds(fsadm_t)
Chris PeBenito 58c3da
Chris PeBenito 725926
ifdef(`targeted_policy',`
Chris PeBenito 1815ba
	term_use_unallocated_ttys(fsadm_t)
Chris PeBenito 1815ba
	term_use_generic_ptys(fsadm_t)
Chris PeBenito 725926
')
Chris PeBenito 725926
Chris PeBenito a42ca7
tunable_policy(`read_default_t',`
Chris PeBenito a42ca7
	files_list_default(fsadm_t)
Chris PeBenito a42ca7
	files_read_default_files(fsadm_t)
Chris PeBenito a42ca7
	files_read_default_symlinks(fsadm_t)
Chris PeBenito a42ca7
	files_read_default_sockets(fsadm_t)
Chris PeBenito a42ca7
	files_read_default_pipes(fsadm_t)
Chris PeBenito a42ca7
')
Chris PeBenito a42ca7
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 46c69c
	amanda_rw_dumpdates_files(fsadm_t)
Chris PeBenito 46c69c
	amanda_append_log_files(fsadm_t)
Chris PeBenito 46c69c
')
Chris PeBenito 46c69c
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 783b38
	# for smartctl cron jobs
Chris PeBenito 783b38
	cron_system_entry(fsadm_t,fsadm_exec_t)
Chris PeBenito 783b38
')
Chris PeBenito 783b38
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 58c3da
	nis_use_ypbind(fsadm_t)
Chris PeBenito 58c3da
')
Chris PeBenito c8d5b3
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito c8d5b3
	fs_dontaudit_write_ramfs_pipes(fsadm_t)
Chris PeBenito c8d5b3
	rhgb_stub(fsadm_t)
Chris PeBenito c8d5b3
')