## AccountsService and daemon for manipulating user account information via D-Bus.
########################################
##
## Execute a domain transition to
## run accountsd.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`accountsd_domtrans',`
gen_require(`
type accountsd_t, accountsd_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, accountsd_exec_t, accountsd_t)
')
########################################
##
## Do not audit attempts to read and
## write Accounts Daemon fifo files.
##
##
##
## Domain to not audit.
##
##
#
interface(`accountsd_dontaudit_rw_fifo_file',`
gen_require(`
type accountsd_t;
')
dontaudit $1 accountsd_t:fifo_file rw_fifo_file_perms;
')
########################################
##
## Send and receive messages from
## accountsd over dbus.
##
##
##
## Domain allowed access.
##
##
#
interface(`accountsd_dbus_chat',`
gen_require(`
type accountsd_t;
class dbus send_msg;
')
allow $1 accountsd_t:dbus send_msg;
allow accountsd_t $1:dbus send_msg;
')
########################################
##
## Search accountsd lib directories.
##
##
##
## Domain allowed access.
##
##
#
interface(`accountsd_search_lib',`
gen_require(`
type accountsd_var_lib_t;
')
allow $1 accountsd_var_lib_t:dir search_dir_perms;
files_search_var_lib($1)
')
########################################
##
## Watch accountsd lib directories.
##
##
##
## Domain allowed access.
##
##
#
interface(`accountsd_watch_lib',`
gen_require(`
type accountsd_var_lib_t;
')
files_search_var_lib($1)
watch_dirs_pattern($1, accountsd_var_lib_t, accountsd_var_lib_t)
')
########################################
##
## Read accountsd lib files.
##
##
##
## Domain allowed access.
##
##
#
interface(`accountsd_read_lib_files',`
gen_require(`
type accountsd_var_lib_t;
')
files_search_var_lib($1)
allow $1 accountsd_var_lib_t:dir list_dir_perms;
read_files_pattern($1, accountsd_var_lib_t, accountsd_var_lib_t)
')
########################################
##
## Create, read, write, and delete
## accountsd lib files.
##
##
##
## Domain allowed access.
##
##
#
interface(`accountsd_manage_lib_files',`
gen_require(`
type accountsd_var_lib_t;
')
files_search_var_lib($1)
manage_files_pattern($1, accountsd_var_lib_t, accountsd_var_lib_t)
')
########################################
##
## All of the rules required to
## administrate an accountsd environment.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`accountsd_systemctl',`
gen_require(`
type accountsd_t;
type accountsd_unit_file_t;
')
systemd_exec_systemctl($1)
init_reload_services($1)
allow $1 accountsd_unit_file_t:file read_file_perms;
allow $1 accountsd_unit_file_t:service manage_service_perms;
ps_process_pattern($1, accountsd_t)
')
########################################
##
## All of the rules required to administrate
## an accountsd environment
##
##
##
## Domain allowed access.
##
##
#
interface(`accountsd_admin',`
gen_require(`
type accountsd_t;
type accountsd_unit_file_t;
')
allow $1 accountsd_t:process signal_perms;
ps_process_pattern($1, accountsd_t)
tunable_policy(`deny_ptrace',`',`
allow $1 accountsd_t:process ptrace;
')
accountsd_manage_lib_files($1)
accountsd_systemctl($1)
admin_pattern($1, accountsd_unit_file_t)
allow $1 accountsd_unit_file_t:service all_service_perms;
')