|
Chris PeBenito |
052c95 |
|
|
Chris PeBenito |
052c95 |
policy_module(quota,1.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 |
052c95 |
kernel_read_kernel_sysctl(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 |
052c95 |
fs_get_xattr_fs_quota(quota_t)
|
|
Chris PeBenito |
052c95 |
fs_set_xattr_fs_quota(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 |
052c95 |
domain_use_wide_inherit_fd(quota_t)
|
|
Chris PeBenito |
052c95 |
|
|
Chris PeBenito |
052c95 |
files_list_all_dirs(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 |
052c95 |
init_use_script_pty(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 |
052c95 |
userdom_dontaudit_use_unpriv_user_fd(quota_t)
|
|
Chris PeBenito |
052c95 |
|
|
Chris PeBenito |
052c95 |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
052c95 |
term_dontaudit_use_unallocated_tty(quota_t)
|
|
Chris PeBenito |
052c95 |
term_dontaudit_use_generic_pty(quota_t)
|
|
Chris PeBenito |
052c95 |
files_dontaudit_read_root_file(quota_t)
|
|
Chris PeBenito |
052c95 |
')
|
|
Chris PeBenito |
052c95 |
|
|
Chris PeBenito |
052c95 |
optional_policy(`rhgb.te',`
|
|
Chris PeBenito |
052c95 |
rhgb_domain(quota_t)
|
|
Chris PeBenito |
052c95 |
')
|
|
Chris PeBenito |
052c95 |
|
|
Chris PeBenito |
052c95 |
optional_policy(`selinuxutil.te',`
|
|
Chris PeBenito |
052c95 |
seutil_sigchld_newrole(quota_t)
|
|
Chris PeBenito |
052c95 |
')
|
|
Chris PeBenito |
052c95 |
|
|
Chris PeBenito |
052c95 |
optional_policy(`udev.te', `
|
|
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
|