Chris PeBenito 17de1b
## <summary>Trivial file transfer protocol daemon</summary>
Chris PeBenito 7a5e2d
Chris PeBenito 7a5e2d
########################################
Chris PeBenito 7a5e2d
## <summary>
Chris PeBenito 455155
##	Read tftp content
Chris PeBenito 455155
## </summary>
Chris PeBenito 455155
## <param name="domain">
Chris PeBenito 455155
##	<summary>
Chris PeBenito 455155
##	Domain allowed access.
Chris PeBenito 455155
##	</summary>
Chris PeBenito 455155
## </param>
Chris PeBenito 455155
#
Chris PeBenito 455155
interface(`tftp_read_content',`
Chris PeBenito 455155
	gen_require(`
Chris PeBenito 455155
		type tftpdir_t;
Chris PeBenito 455155
	')
Chris PeBenito 455155
Chris PeBenito 455155
	read_files_pattern($1, tftpdir_t, tftpdir_t)
Chris PeBenito 455155
')
Chris PeBenito 455155
Chris PeBenito 455155
########################################
Chris PeBenito 455155
## <summary>
Chris PeBenito 7a5e2d
##	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
')