Chris PeBenito 052c95
Chris PeBenito 5ea24b
policy_module(quota,1.0.0)
Chris PeBenito 052c95
Chris PeBenito 052c95
########################################
Chris PeBenito 052c95
#
Chris PeBenito 052c95
# Declarations
Chris PeBenito 052c95
#
Chris PeBenito 052c95
Chris PeBenito 052c95
type quota_t;
Chris PeBenito 052c95
type quota_exec_t;
Chris PeBenito 052c95
init_system_domain(quota_t,quota_exec_t)
Chris PeBenito 052c95
Chris PeBenito 052c95
type quota_db_t;
Chris PeBenito 052c95
files_type(quota_db_t)
Chris PeBenito 052c95
Chris PeBenito 052c95
type quota_flag_t;
Chris PeBenito 052c95
files_type(quota_flag_t)
Chris PeBenito 052c95
Chris PeBenito 052c95
allow quota_t self:capability { sys_admin dac_override };
Chris PeBenito 052c95
dontaudit quota_t self:capability sys_tty_config;
Chris PeBenito 052c95
allow quota_t self:process signal_perms;
Chris PeBenito 052c95
Chris PeBenito 052c95
# for /quota.*
Chris PeBenito 052c95
allow quota_t quota_db_t:file { read write quotaon };
Chris PeBenito 052c95
Chris PeBenito 052c95
kernel_list_proc(quota_t)
Chris PeBenito 052c95
kernel_read_proc_symlinks(quota_t)
Chris PeBenito 445522
kernel_read_kernel_sysctls(quota_t)
Chris PeBenito 052c95
Chris PeBenito 052c95
dev_read_sysfs(quota_t)
Chris PeBenito 052c95
dev_getattr_all_blk_files(quota_t)
Chris PeBenito 052c95
dev_getattr_all_chr_files(quota_t)
Chris PeBenito 052c95
Chris PeBenito 4d851f
fs_get_xattr_fs_quotas(quota_t)
Chris PeBenito 4d851f
fs_set_xattr_fs_quotas(quota_t)
Chris PeBenito 052c95
fs_getattr_xattr_fs(quota_t)
Chris PeBenito 052c95
fs_remount_xattr_fs(quota_t)
Chris PeBenito 052c95
fs_search_auto_mountpoints(quota_t)
Chris PeBenito 052c95
Chris PeBenito 052c95
storage_raw_read_fixed_disk(quota_t)
Chris PeBenito 052c95
Chris PeBenito 052c95
term_dontaudit_use_console(quota_t)
Chris PeBenito 052c95
Chris PeBenito 15722e
domain_use_interactive_fds(quota_t)
Chris PeBenito 052c95
Chris PeBenito 9e04f5
files_list_all(quota_t)
Chris PeBenito 052c95
files_read_all_files(quota_t)
Chris PeBenito 052c95
files_read_all_symlinks(quota_t)
Chris PeBenito 052c95
files_getattr_all_pipes(quota_t)
Chris PeBenito 052c95
files_getattr_all_sockets(quota_t)
Chris PeBenito 052c95
# Read /etc/mtab.
Chris PeBenito 052c95
files_read_etc_runtime_files(quota_t)
Chris PeBenito 052c95
Chris PeBenito 052c95
init_use_fd(quota_t)
Chris PeBenito 1815ba
init_use_script_ptys(quota_t)
Chris PeBenito 052c95
Chris PeBenito 052c95
libs_use_ld_so(quota_t)
Chris PeBenito 052c95
libs_use_shared_libs(quota_t)
Chris PeBenito 052c95
Chris PeBenito 052c95
logging_send_syslog_msg(quota_t)
Chris PeBenito 052c95
Chris PeBenito 15722e
userdom_dontaudit_use_unpriv_user_fds(quota_t)
Chris PeBenito 052c95
Chris PeBenito 052c95
ifdef(`targeted_policy',`
Chris PeBenito 1815ba
	term_dontaudit_use_unallocated_ttys(quota_t)
Chris PeBenito 1815ba
	term_dontaudit_use_generic_ptys(quota_t)
Chris PeBenito 9e04f5
	files_dontaudit_read_root_files(quota_t)
Chris PeBenito 052c95
')
Chris PeBenito 052c95
Chris PeBenito 132880
optional_policy(`selinuxutil',`
Chris PeBenito 052c95
	seutil_sigchld_newrole(quota_t)
Chris PeBenito 052c95
')
Chris PeBenito 052c95
Chris PeBenito 132880
optional_policy(`udev',`
Chris PeBenito 052c95
	udev_read_db(quota_t)
Chris PeBenito 052c95
')
Chris PeBenito 052c95
Chris PeBenito 052c95
ifdef(`TODO',`
Chris PeBenito 052c95
# quotacheck creates new quota_db_t files
Chris PeBenito 052c95
file_type_auto_trans(quota_t, { root_t home_root_t var_t usr_t src_t var_spool_t }, quota_db_t, file)
Chris PeBenito 052c95
Chris PeBenito 052c95
allow quota_t file_t:file quotaon;
Chris PeBenito 052c95
Chris PeBenito 052c95
allow quota_t proc_t:file getattr;
Chris PeBenito 052c95
') dnl end TODO