## The SMS Server Tools are made to send and receive short messages through GSM modems. It supports easy file interfaces and it can run external programs for automatic actions. ######################################## ## ## Execute smsd in the smsd domin. ## ## ## ## Domain allowed to transition. ## ## # interface(`smsd_domtrans',` gen_require(` type smsd_t, smsd_exec_t; ') corecmd_search_bin($1) domtrans_pattern($1, smsd_exec_t, smsd_t) ') ######################################## ## ## Execute smsd server in the smsd domain. ## ## ## ## Domain allowed access. ## ## # interface(`smsd_initrc_domtrans',` gen_require(` type smsd_initrc_exec_t; ') init_labeled_script_domtrans($1, smsd_initrc_exec_t) ') ######################################## ## ## Read smsd's log files. ## ## ## ## Domain allowed access. ## ## # interface(`smsd_read_log',` gen_require(` type smsd_log_t; ') logging_search_logs($1) read_files_pattern($1, smsd_log_t, smsd_log_t) ') ######################################## ## ## Append to smsd log files. ## ## ## ## Domain allowed access. ## ## # interface(`smsd_append_log',` gen_require(` type smsd_log_t; ') logging_search_logs($1) append_files_pattern($1, smsd_log_t, smsd_log_t) ') ######################################## ## ## Manage smsd log files ## ## ## ## Domain allowed access. ## ## # interface(`smsd_manage_log',` gen_require(` type smsd_log_t; ') logging_search_logs($1) manage_dirs_pattern($1, smsd_log_t, smsd_log_t) manage_files_pattern($1, smsd_log_t, smsd_log_t) manage_lnk_files_pattern($1, smsd_log_t, smsd_log_t) ') ######################################## ## ## Read smsd PID files. ## ## ## ## Domain allowed access. ## ## # interface(`smsd_read_pid_files',` gen_require(` type smsd_var_run_t; ') files_search_pids($1) read_files_pattern($1, smsd_var_run_t, smsd_var_run_t) ') ######################################## ## ## Search smsd spool directories. ## ## ## ## Domain allowed access. ## ## # interface(`smsd_search_spool',` gen_require(` type smsd_spool_t; ') allow $1 smsd_spool_t:dir search_dir_perms; files_search_spool($1) ') ######################################## ## ## Read smsd spool files. ## ## ## ## Domain allowed access. ## ## # interface(`smsd_read_spool_files',` gen_require(` type smsd_spool_t; ') files_search_spool($1) read_files_pattern($1, smsd_spool_t, smsd_spool_t) ') ######################################## ## ## Manage smsd spool files. ## ## ## ## Domain allowed access. ## ## # interface(`smsd_manage_spool_files',` gen_require(` type smsd_spool_t; ') files_search_spool($1) manage_files_pattern($1, smsd_spool_t, smsd_spool_t) ') ######################################## ## ## Manage smsd spool dirs. ## ## ## ## Domain allowed access. ## ## # interface(`smsd_manage_spool_dirs',` gen_require(` type smsd_spool_t; ') files_search_spool($1) manage_dirs_pattern($1, smsd_spool_t, smsd_spool_t) ') ######################################## ## ## All of the rules required to administrate ## an smsd environment ## ## ## ## Domain allowed access. ## ## ## ## ## Role allowed access. ## ## ## # interface(`smsd_admin',` gen_require(` type smsd_t; type smsd_initrc_exec_t; type smsd_log_t; type smsd_var_run_t; type smsd_spool_t; ') allow $1 smsd_t:process { ptrace signal_perms }; ps_process_pattern($1, smsd_t) smsd_initrc_domtrans($1) domain_system_change_exemption($1) role_transition $2 smsd_initrc_exec_t system_r; allow $2 system_r; logging_search_logs($1) admin_pattern($1, smsd_log_t) files_search_pids($1) admin_pattern($1, smsd_var_run_t) files_search_spool($1) admin_pattern($1, smsd_spool_t) optional_policy(` systemd_passwd_agent_exec($1) systemd_read_fifo_file_passwd_run($1) ') ')