## Trivial file transfer protocol daemon ######################################## ## ## Read tftp content ## ## ## ## Domain allowed access. ## ## # interface(`tftp_read_content',` gen_require(` type tftpdir_t; ') read_files_pattern($1, tftpdir_t, tftpdir_t) ') ######################################## ## ## Manage tftp /var/lib files. ## ## ## ## Domain allowed access. ## ## # interface(`tftp_manage_rw_content',` gen_require(` type tftpdir_rw_t; ') files_search_var_lib($1) manage_dirs_pattern($1, tftpdir_rw_t, tftpdir_rw_t) manage_files_pattern($1, tftpdir_rw_t, tftpdir_rw_t) ') ######################################## ## ## Manage tftp config files. ## ## ## ## Domain allowed access. ## ## # interface(`tftp_manage_config_files',` gen_require(` type tftpd_etc_t; ') files_search_etc($1) manage_files_pattern($1, tftpd_etc_t, tftpd_etc_t) ') ######################################## ## ## Create objects in etc directories ## with tftp etc type. ## ## ## ## Domain allowed to transition. ## ## ## ## ## Class of the object being created. ## ## ## ## ## The name of the object being created. ## ## # interface(`tftp_etc_filetrans_config',` gen_require(` type tftp_etc_t; ') files_etc_filetrans($1, tftp_etc_t, $2, $3) ') ######################################## ## ## Create objects in tftpdir directories ## with a private type. ## ## ## ## Domain allowed access. ## ## ## ## ## Private file type. ## ## ## ## ## Class of the object being created. ## ## ## ## ## The name of the object being created. ## ## # interface(`tftp_filetrans_tftpdir',` gen_require(` type tftpdir_rw_t; ') files_search_var_lib($1) filetrans_pattern($1, tftpdir_rw_t, $2, $3, $4) ') ######################################## ## ## All of the rules required to administrate ## an tftp environment ## ## ## ## Domain allowed access. ## ## ## # interface(`tftp_admin',` gen_require(` type tftpd_t, tftpdir_t, tftpdir_rw_t, tftpd_var_run_t; ') allow $1 tftpd_t:process { ptrace signal_perms getattr }; ps_process_pattern($1, tftpd_t) admin_pattern($1, tftpdir_rw_t) admin_pattern($1, tftpdir_t) files_list_pids($1) admin_pattern($1, tftpd_var_run_t) ')