## System Security Services Daemon ######################################## ## ## Execute a domain transition to run sssd. ## ## ## ## Domain allowed to transition. ## ## # interface(`sssd_domtrans',` gen_require(` type sssd_t, sssd_exec_t; ') domtrans_pattern($1, sssd_exec_t, sssd_t) ') ######################################## ## ## Read sssd PID files. ## ## ## ## Domain allowed access. ## ## # interface(`sssd_read_pid_files',` gen_require(` type sssd_var_run_t; ') files_search_pids($1) allow $1 sssd_var_run_t:file read_file_perms; ') ######################################## ## ## Manage sssd var_run files. ## ## ## ## Domain allowed access. ## ## # interface(`sssd_manage_pids',` gen_require(` type sssd_var_run_t; ') manage_dirs_pattern($1, sssd_var_run_t, sssd_var_run_t) manage_files_pattern($1, sssd_var_run_t, sssd_var_run_t) ') ######################################## ## ## Search sssd lib directories. ## ## ## ## Domain allowed access. ## ## # interface(`sssd_search_lib',` gen_require(` type sssd_var_lib_t; ') allow $1 sssd_var_lib_t:dir search_dir_perms; files_search_var_lib($1) ') ######################################## ## ## Read sssd lib files. ## ## ## ## Domain allowed access. ## ## # interface(`sssd_read_lib_files',` gen_require(` type sssd_var_lib_t; ') files_search_var_lib($1) read_files_pattern($1, sssd_var_lib_t, sssd_var_lib_t) ') ######################################## ## ## Create, read, write, and delete ## sssd lib files. ## ## ## ## Domain allowed access. ## ## # interface(`sssd_manage_lib_files',` gen_require(` type sssd_var_lib_t; ') files_search_var_lib($1) manage_files_pattern($1, sssd_var_lib_t, sssd_var_lib_t) ') ######################################## ## ## Send and receive messages from ## sssd over dbus. ## ## ## ## Domain allowed access. ## ## # interface(`sssd_dbus_chat',` gen_require(` type sssd_t; class dbus send_msg; ') allow $1 sssd_t:dbus send_msg; allow sssd_t $1:dbus send_msg; ') ######################################## ## ## Connect to sssd over an unix stream socket. ## ## ## ## Domain allowed access. ## ## # interface(`sssd_stream_connect',` gen_require(` type sssd_t, sssd_var_lib_t; ') files_search_pids($1) stream_connect_pattern($1, sssd_var_lib_t, sssd_var_lib_t, sssd_t) ') ######################################## ## ## All of the rules required to administrate ## an sssd environment ## ## ## ## Domain allowed access. ## ## ## ## ## The role to be allowed to manage the sssd domain. ## ## ## ## ## The type of the user terminal. ## ## ## # interface(`sssd_admin',` gen_require(` type sssd_t; ') allow $1 sssd_t:process { ptrace signal_perms getattr }; read_files_pattern($1, sssd_t, sssd_t) gen_require(` type sssd_initrc_exec_t; ') # Allow sssd_t to restart the apache service sssd_initrc_domtrans($1) domain_system_change_exemption($1) role_transition $2 sssd_initrc_exec_t system_r; allow $2 system_r; sssd_manage_pids($1) sssd_manage_lib_files($1) ')