Chris PeBenito 052c95
## <summary>File system quota management</summary>
Chris PeBenito 052c95
Chris PeBenito 052c95
########################################
Chris PeBenito 052c95
## <summary>
Chris PeBenito 052c95
##	Execute quota management tools in the quota domain.
Chris PeBenito 052c95
## </summary>
Chris PeBenito 052c95
## <param name="domain">
Chris PeBenito 052c95
##	The type of the process performing this action.
Chris PeBenito 052c95
## </param>
Chris PeBenito 052c95
#
Chris PeBenito 052c95
interface(`quota_domtrans',`
Chris PeBenito 052c95
	gen_require(`
Chris PeBenito 052c95
		type quota_t, quota_exec_t;
Chris PeBenito 052c95
		class process sigchld;
Chris PeBenito 052c95
		class fd use;
Chris PeBenito 052c95
		class fifo_file rw_file_perms;
Chris PeBenito 052c95
	')
Chris PeBenito 052c95
Chris PeBenito 052c95
	domain_auto_trans($1,quota_exec_t,quota_t)
Chris PeBenito 052c95
Chris PeBenito 052c95
	allow $1 quota_t:fd use;
Chris PeBenito 052c95
	allow quota_t $1:fd use;
Chris PeBenito 052c95
	allow quota_t $1:fifo_file rw_file_perms;
Chris PeBenito 052c95
	allow quota_t $1:process sigchld;
Chris PeBenito 052c95
')
Chris PeBenito 052c95
Chris PeBenito 052c95
########################################
Chris PeBenito 052c95
## <summary>
Chris PeBenito 052c95
##	Execute quota management tools in the quota domain, and
Chris PeBenito 052c95
##	allow the specified role the quota domain.
Chris PeBenito 052c95
## </summary>
Chris PeBenito 052c95
## <param name="domain">
Chris PeBenito 052c95
##	The type of the process performing this action.
Chris PeBenito 052c95
## </param>
Chris PeBenito 052c95
## <param name="role">
Chris PeBenito 052c95
##	The role to be allowed the quota domain.
Chris PeBenito 052c95
## </param>
Chris PeBenito 052c95
## <param name="terminal">
Chris PeBenito 052c95
##	The type of the terminal allow the quota domain to use.
Chris PeBenito 052c95
## </param>
Chris PeBenito 052c95
#
Chris PeBenito 052c95
interface(`quota_run',`
Chris PeBenito 052c95
	gen_require(`
Chris PeBenito 052c95
		type quota_t;
Chris PeBenito 052c95
		class chr_file rw_term_perms;
Chris PeBenito 052c95
	')
Chris PeBenito 052c95
Chris PeBenito 052c95
	quota_domtrans($1)
Chris PeBenito 052c95
	role $2 types quota_t;
Chris PeBenito 052c95
	allow quota_t $3:chr_file rw_term_perms;
Chris PeBenito 052c95
')
Chris PeBenito 052c95
Chris PeBenito 052c95
########################################
Chris PeBenito 052c95
## <summary>
Chris PeBenito 052c95
##	Do not audit attempts to get the attributes
Chris PeBenito 052c95
##	of filesystem quota data files.
Chris PeBenito 052c95
## </summary>
Chris PeBenito 052c95
## <param name="domain">
Chris PeBenito 052c95
##	Domain to not audit.
Chris PeBenito 052c95
## </param>
Chris PeBenito 052c95
#
Chris PeBenito 052c95
interface(`quota_dontaudit_getattr_db',`
Chris PeBenito 052c95
	gen_require(`
Chris PeBenito 052c95
		type quota_db_t;
Chris PeBenito 052c95
		class file getattr;
Chris PeBenito 052c95
	')
Chris PeBenito 052c95
Chris PeBenito 052c95
	dontaudit $1 quota_db_t:file getattr;
Chris PeBenito 052c95
')
Chris PeBenito 052c95
Chris PeBenito 052c95
interface(`quota_manage_flags',`
Chris PeBenito 052c95
	gen_require(`
Chris PeBenito 052c95
		type quota_flag_t;
Chris PeBenito 052c95
		class dir rw_dir_perms;
Chris PeBenito 052c95
		class file create_file_perms;
Chris PeBenito 052c95
	')
Chris PeBenito 052c95
Chris PeBenito 052c95
	files_search_var_lib($1)
Chris PeBenito 052c95
	allow $1 quota_flag_t:dir rw_dir_perms;
Chris PeBenito 052c95
	allow $1 quota_flag_t:file create_file_perms;
Chris PeBenito 052c95
')