Oreon-Lime-R2/selinux-policy/selinux-policy-d9f4a2b/selinux-policy-d9f4a2bbeb91fd95d0c35a90936efb9ea99d2455/policy/modules/contrib/backup.if

67 lines
1.3 KiB
Text

## <summary>System backup scripts.</summary>
########################################
## <summary>
## Execute backup in the backup domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </summary>
## </param>
#
interface(`backup_domtrans',`
gen_require(`
type backup_t, backup_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, backup_exec_t, backup_t)
')
########################################
## <summary>
## Execute backup in the backup
## domain, and allow the specified
## role the backup domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </summary>
## </param>
## <param name="role">
## <summary>
## Role allowed access.
## </summary>
## </param>
## <rolecap/>
#
interface(`backup_run',`
gen_require(`
attribute_role backup_roles;
')
backup_domtrans($1)
roleattribute $2 backup_roles;
')
########################################
## <summary>
## Create, read, and write backup
## store files.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`backup_manage_store_files',`
gen_require(`
type backup_store_t;
')
files_search_var($1)
manage_files_pattern($1, backup_store_t, backup_store_t)
')