|
Chris PeBenito |
17de1b |
## <summary>Trivial file transfer protocol daemon</summary>
|
|
Chris PeBenito |
7a5e2d |
|
|
Chris PeBenito |
7a5e2d |
########################################
|
|
Chris PeBenito |
7a5e2d |
## <summary>
|
|
Chris PeBenito |
27eab8 |
## Read tftp content
|
|
Dominick Grift |
1031ee |
## </summary>
|
|
Dominick Grift |
1031ee |
## <param name="domain">
|
|
Dominick Grift |
1031ee |
## <summary>
|
|
Dominick Grift |
1031ee |
## Domain allowed access.
|
|
Dominick Grift |
1031ee |
## </summary>
|
|
Dominick Grift |
1031ee |
## </param>
|
|
Dominick Grift |
1031ee |
#
|
|
Chris PeBenito |
27eab8 |
interface(`tftp_read_content',`
|
|
Dominick Grift |
1031ee |
gen_require(`
|
|
Chris PeBenito |
27eab8 |
type tftpdir_t;
|
|
Dominick Grift |
1031ee |
')
|
|
Dominick Grift |
1031ee |
|
|
Chris PeBenito |
27eab8 |
read_files_pattern($1, tftpdir_t, tftpdir_t)
|
|
Dan Walsh |
3eaa99 |
read_lnk_files_pattern($1, tftpdir_t, tftpdir_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Search tftp /var/lib directories.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`tftp_search_rw_content',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
type tftpdir_rw_t;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
search_dirs_pattern($1, tftpdir_rw_t, tftpdir_rw_t)
|
|
Dan Walsh |
3eaa99 |
files_search_var_lib($1)
|
|
Dominick Grift |
1031ee |
')
|
|
Dominick Grift |
1031ee |
|
|
Dominick Grift |
1031ee |
########################################
|
|
Dominick Grift |
1031ee |
## <summary>
|
|
Dominick Grift |
1031ee |
## Manage tftp /var/lib files.
|
|
Dominick Grift |
1031ee |
## </summary>
|
|
Dominick Grift |
1031ee |
## <param name="domain">
|
|
Dominick Grift |
1031ee |
## <summary>
|
|
Dominick Grift |
1031ee |
## Domain allowed access.
|
|
Dominick Grift |
1031ee |
## </summary>
|
|
Dominick Grift |
1031ee |
## </param>
|
|
Dominick Grift |
1031ee |
#
|
|
Chris PeBenito |
27eab8 |
interface(`tftp_manage_rw_content',`
|
|
Dominick Grift |
1031ee |
gen_require(`
|
|
Dominick Grift |
1031ee |
type tftpdir_rw_t;
|
|
Dominick Grift |
1031ee |
')
|
|
Dominick Grift |
1031ee |
|
|
Dominick Grift |
1031ee |
files_search_var_lib($1)
|
|
Chris PeBenito |
27eab8 |
manage_dirs_pattern($1, tftpdir_rw_t, tftpdir_rw_t)
|
|
Dominick Grift |
1031ee |
manage_files_pattern($1, tftpdir_rw_t, tftpdir_rw_t)
|
|
Dominick Grift |
1031ee |
')
|
|
Dominick Grift |
1031ee |
|
|
Dominick Grift |
1031ee |
########################################
|
|
Dominick Grift |
1031ee |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Create objects in tftpdir directories
|
|
Dan Walsh |
3eaa99 |
## with specified types.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
## <param name="file_type">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Private file type.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
## <param name="object_class">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Class of the object being created.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`tftp_filetrans_tftpdir',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
type tftpdir_rw_t;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
filetrans_pattern($1, tftpdir_rw_t, $2, $3)
|
|
Dan Walsh |
3eaa99 |
files_search_var_lib($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Chris PeBenito |
2650ca |
## All of the rules required to administrate
|
|
Chris PeBenito |
7a5e2d |
## an tftp environment
|
|
Chris PeBenito |
7a5e2d |
## </summary>
|
|
Chris PeBenito |
7a5e2d |
## <param name="domain">
|
|
Chris PeBenito |
7a5e2d |
## <summary>
|
|
Chris PeBenito |
7a5e2d |
## Domain allowed access.
|
|
Chris PeBenito |
7a5e2d |
## </summary>
|
|
Chris PeBenito |
7a5e2d |
## </param>
|
|
Chris PeBenito |
7a5e2d |
## <rolecap/>
|
|
Chris PeBenito |
7a5e2d |
#
|
|
Chris PeBenito |
7a5e2d |
interface(`tftp_admin',`
|
|
Chris PeBenito |
7a5e2d |
gen_require(`
|
|
Chris PeBenito |
0bfccd |
type tftpd_t, tftpdir_t, tftpdir_rw_t, tftpd_var_run_t;
|
|
Chris PeBenito |
7a5e2d |
')
|
|
Chris PeBenito |
7a5e2d |
|
|
Chris PeBenito |
8f3a0a |
allow $1 tftpd_t:process { ptrace signal_perms getattr };
|
|
Chris PeBenito |
8f3a0a |
ps_process_pattern($1, tftpd_t)
|
|
Chris PeBenito |
2a9837 |
|
|
Chris PeBenito |
e87221 |
admin_pattern($1, tftpdir_rw_t)
|
|
Chris PeBenito |
7a5e2d |
|
|
Chris PeBenito |
e87221 |
admin_pattern($1, tftpdir_t)
|
|
Chris PeBenito |
7a5e2d |
|
|
Chris PeBenito |
7a5e2d |
files_list_pids($1)
|
|
Chris PeBenito |
e87221 |
admin_pattern($1, tftpd_var_run_t)
|
|
Chris PeBenito |
7a5e2d |
')
|