|
|
1ec3d1a |
## <summary>Trivial file transfer protocol daemon</summary>
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Read tftp content
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## <param name="domain">
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Domain allowed access.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## </param>
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
interface(`tftp_read_content',`
|
|
|
1ec3d1a |
gen_require(`
|
|
|
1ec3d1a |
type tftpdir_t;
|
|
|
1ec3d1a |
type tftpdir_rw_t;
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
992645a |
list_dirs_pattern($1, tftpdir_t, tftpdir_t)
|
|
|
1ec3d1a |
read_files_pattern($1, tftpdir_t, tftpdir_t)
|
|
|
1ec3d1a |
read_lnk_files_pattern($1, tftpdir_t, tftpdir_t)
|
|
|
1ec3d1a |
|
|
|
00269b8 |
list_dirs_pattern($1, tftpdir_rw_t, tftpdir_rw_t)
|
|
|
1ec3d1a |
read_files_pattern($1, tftpdir_rw_t, tftpdir_rw_t)
|
|
|
1ec3d1a |
read_lnk_files_pattern($1, tftpdir_rw_t, tftpdir_rw_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Search tftp /var/lib directories.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## <param name="domain">
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Domain allowed access.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## </param>
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
interface(`tftp_search_rw_content',`
|
|
|
1ec3d1a |
gen_require(`
|
|
|
1ec3d1a |
type tftpdir_rw_t;
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
search_dirs_pattern($1, tftpdir_rw_t, tftpdir_rw_t)
|
|
|
1ec3d1a |
files_search_var_lib($1)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Manage tftp /var/lib files.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## <param name="domain">
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Domain allowed access.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## </param>
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
interface(`tftp_manage_rw_content',`
|
|
|
1ec3d1a |
gen_require(`
|
|
|
1ec3d1a |
type tftpdir_rw_t;
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
files_search_var_lib($1)
|
|
|
1ec3d1a |
manage_dirs_pattern($1, tftpdir_rw_t, tftpdir_rw_t)
|
|
|
1ec3d1a |
manage_files_pattern($1, tftpdir_rw_t, tftpdir_rw_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Read tftp config files.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## <param name="domain">
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Domain allowed access.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## </param>
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
interface(`tftp_read_config',`
|
|
|
1ec3d1a |
gen_require(`
|
|
|
1ec3d1a |
type tftpd_etc_t;
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
read_files_pattern($1, tftpd_etc_t, tftpd_etc_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Manage tftp config files.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## <param name="domain">
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Domain allowed access.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## </param>
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
interface(`tftp_manage_config',`
|
|
|
1ec3d1a |
gen_require(`
|
|
|
1ec3d1a |
type tftpd_etc_t;
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
manage_files_pattern($1, tftpd_etc_t, tftpd_etc_t)
|
|
|
1ec3d1a |
files_etc_filetrans($1, tftpd_etc_t, file, "tftp")
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Create objects in tftpdir directories
|
|
|
1ec3d1a |
## with specified types.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## <param name="domain">
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Domain allowed access.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## </param>
|
|
|
1ec3d1a |
## <param name="file_type">
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Private file type.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## </param>
|
|
|
1ec3d1a |
## <param name="object_class">
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Class of the object being created.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## </param>
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
interface(`tftp_filetrans_tftpdir',`
|
|
|
1ec3d1a |
gen_require(`
|
|
|
1ec3d1a |
type tftpdir_rw_t;
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
filetrans_pattern($1, tftpdir_rw_t, $2, $3)
|
|
|
1ec3d1a |
files_search_var_lib($1)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Transition to tftp named content
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## <param name="domain">
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Domain allowed access.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## </param>
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
interface(`tftp_filetrans_named_content',`
|
|
|
1ec3d1a |
gen_require(`
|
|
|
1ec3d1a |
type tftpd_etc_t;
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
files_etc_filetrans($1, tftpd_etc_t, file, "tftp")
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## All of the rules required to administrate
|
|
|
1ec3d1a |
## an tftp environment
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## <param name="domain">
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Domain allowed access.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## </param>
|
|
|
1ec3d1a |
## <rolecap/>
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
interface(`tftp_admin',`
|
|
|
1ec3d1a |
gen_require(`
|
|
|
1ec3d1a |
type tftpd_t, tftpdir_t, tftpdir_rw_t, tftpd_var_run_t;
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
allow $1 tftpd_t:process signal_perms;
|
|
|
1ec3d1a |
ps_process_pattern($1, tftpd_t)
|
|
|
1ec3d1a |
tunable_policy(`deny_ptrace',`',`
|
|
|
f27b8d8 |
allow $1 tftpd_t:process ptrace;
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
files_list_var_lib($1)
|
|
Chris PeBenito |
9401ae1 |
|
|
|
1ec3d1a |
admin_pattern($1, tftpdir_rw_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
admin_pattern($1, tftpdir_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
files_list_pids($1)
|
|
|
1ec3d1a |
admin_pattern($1, tftpd_var_run_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
tftp_manage_config($1)
|
|
|
1ec3d1a |
')
|