2005-08-11 14:49:58 +00:00
|
|
|
|
2006-12-12 21:22:47 +00:00
|
|
|
policy_module(quota,1.1.0)
|
2005-08-11 14:49:58 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type quota_t;
|
|
|
|
type quota_exec_t;
|
|
|
|
init_system_domain(quota_t,quota_exec_t)
|
|
|
|
|
|
|
|
type quota_db_t;
|
|
|
|
files_type(quota_db_t)
|
|
|
|
|
|
|
|
type quota_flag_t;
|
|
|
|
files_type(quota_flag_t)
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
2005-08-11 14:49:58 +00:00
|
|
|
allow quota_t self:capability { sys_admin dac_override };
|
|
|
|
dontaudit quota_t self:capability sys_tty_config;
|
|
|
|
allow quota_t self:process signal_perms;
|
|
|
|
|
|
|
|
# for /quota.*
|
|
|
|
allow quota_t quota_db_t:file { read write quotaon };
|
|
|
|
|
|
|
|
kernel_list_proc(quota_t)
|
|
|
|
kernel_read_proc_symlinks(quota_t)
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(quota_t)
|
2005-08-11 14:49:58 +00:00
|
|
|
|
|
|
|
dev_read_sysfs(quota_t)
|
|
|
|
dev_getattr_all_blk_files(quota_t)
|
|
|
|
dev_getattr_all_chr_files(quota_t)
|
|
|
|
|
2006-01-31 20:29:27 +00:00
|
|
|
fs_get_xattr_fs_quotas(quota_t)
|
|
|
|
fs_set_xattr_fs_quotas(quota_t)
|
2005-08-11 14:49:58 +00:00
|
|
|
fs_getattr_xattr_fs(quota_t)
|
|
|
|
fs_remount_xattr_fs(quota_t)
|
|
|
|
fs_search_auto_mountpoints(quota_t)
|
2006-12-04 20:10:56 +00:00
|
|
|
|
|
|
|
mls_file_read_up(quota_t)
|
2005-08-11 14:49:58 +00:00
|
|
|
|
|
|
|
storage_raw_read_fixed_disk(quota_t)
|
|
|
|
|
|
|
|
term_dontaudit_use_console(quota_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_use_interactive_fds(quota_t)
|
2005-08-11 14:49:58 +00:00
|
|
|
|
2006-01-31 19:21:01 +00:00
|
|
|
files_list_all(quota_t)
|
2005-08-11 14:49:58 +00:00
|
|
|
files_read_all_files(quota_t)
|
|
|
|
files_read_all_symlinks(quota_t)
|
|
|
|
files_getattr_all_pipes(quota_t)
|
|
|
|
files_getattr_all_sockets(quota_t)
|
|
|
|
# Read /etc/mtab.
|
|
|
|
files_read_etc_runtime_files(quota_t)
|
|
|
|
|
2006-03-02 23:41:11 +00:00
|
|
|
init_use_fds(quota_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
init_use_script_ptys(quota_t)
|
2005-08-11 14:49:58 +00:00
|
|
|
|
|
|
|
libs_use_ld_so(quota_t)
|
|
|
|
libs_use_shared_libs(quota_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(quota_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_dontaudit_use_unpriv_user_fds(quota_t)
|
2005-08-11 14:49:58 +00:00
|
|
|
|
|
|
|
ifdef(`targeted_policy',`
|
2006-02-02 21:08:12 +00:00
|
|
|
term_dontaudit_use_unallocated_ttys(quota_t)
|
|
|
|
term_dontaudit_use_generic_ptys(quota_t)
|
2006-01-31 19:21:01 +00:00
|
|
|
files_dontaudit_read_root_files(quota_t)
|
2005-08-11 14:49:58 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-08-11 14:49:58 +00:00
|
|
|
seutil_sigchld_newrole(quota_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-08-11 14:49:58 +00:00
|
|
|
udev_read_db(quota_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
ifdef(`TODO',`
|
|
|
|
# quotacheck creates new quota_db_t files
|
|
|
|
file_type_auto_trans(quota_t, { root_t home_root_t var_t usr_t src_t var_spool_t }, quota_db_t, file)
|
|
|
|
|
|
|
|
allow quota_t file_t:file quotaon;
|
|
|
|
|
|
|
|
allow quota_t proc_t:file getattr;
|
|
|
|
') dnl end TODO
|