## Policy for RootlessKit
########################################
##
## Execute rootlesskit in the caller domain.
##
##
##
## Domain allowed access.
##
##
#
interface(`rootlesskit_exec',`
gen_require(`
type rootlesskit_exec_t;
')
can_exec($1, rootlesskit_exec_t)
')
########################################
##
## Execute rootlesskit in the rootlesskit domain.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`rootlesskit_domtrans',`
gen_require(`
type rootlesskit_t, rootlesskit_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, rootlesskit_exec_t, rootlesskit_t)
')
########################################
##
## Execute rootlesskit in the rootlesskit
## domain, and allow the specified role
## the rootlesskit domain.
##
##
##
## Domain allowed to transition.
##
##
##
##
## The role to be allowed the rootlesskit domain.
##
##
#
interface(`rootlesskit_run',`
gen_require(`
type rootlesskit_t;
')
role $2 types rootlesskit_t;
rootlesskit_domtrans($1)
')
########################################
##
## Role access for rootlesskit.
##
##
##
## The prefix of the user role (e.g., user
## is the prefix for user_r).
##
##
##
##
## User domain for the role.
##
##
##
##
## User exec domain for execute and transition access.
##
##
##
##
## Role allowed access.
##
##
##
#
template(`rootlesskit_role',`
gen_require(`
type rootlesskit_t;
type rootlesskit_exec_t;
')
rootlesskit_run($3, $4)
optional_policy(`
systemd_user_daemon_domain($1, rootlesskit_exec_t, rootlesskit_t)
')
')