2005-09-16 15:18:09 +00:00
|
|
|
## <summary>Trivial file transfer protocol daemon</summary>
|
2008-02-07 16:37:47 +00:00
|
|
|
|
2010-01-05 15:26:14 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-02-08 18:38:48 +00:00
|
|
|
## Read tftp content
|
2010-01-05 15:26:14 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2010-02-08 18:38:48 +00:00
|
|
|
interface(`tftp_read_content',`
|
2010-01-05 15:26:14 +00:00
|
|
|
gen_require(`
|
2010-02-08 18:38:48 +00:00
|
|
|
type tftpdir_t;
|
2010-01-05 15:26:14 +00:00
|
|
|
')
|
|
|
|
|
2010-02-08 18:38:48 +00:00
|
|
|
read_files_pattern($1, tftpdir_t, tftpdir_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
read_lnk_files_pattern($1, tftpdir_t, tftpdir_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Search tftp /var/lib directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`tftp_search_rw_content',`
|
|
|
|
gen_require(`
|
|
|
|
type tftpdir_rw_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
search_dirs_pattern($1, tftpdir_rw_t, tftpdir_rw_t)
|
|
|
|
files_search_var_lib($1)
|
2010-01-05 15:26:14 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Manage tftp /var/lib files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2010-02-08 18:38:48 +00:00
|
|
|
interface(`tftp_manage_rw_content',`
|
2010-01-05 15:26:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type tftpdir_rw_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_var_lib($1)
|
2010-02-08 18:38:48 +00:00
|
|
|
manage_dirs_pattern($1, tftpdir_rw_t, tftpdir_rw_t)
|
2010-01-05 15:26:14 +00:00
|
|
|
manage_files_pattern($1, tftpdir_rw_t, tftpdir_rw_t)
|
|
|
|
')
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create objects in tftpdir directories
|
|
|
|
## with specified types.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Signed-off-by: Dominick Grift <domg472@gmail.com>
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
2010-09-16 06:24:26 +00:00
|
|
|
## <summary>
|
2010-08-26 13:41:21 +00:00
|
|
|
## Domain allowed access.
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Signed-off-by: Dominick Grift <domg472@gmail.com>
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
2010-09-16 06:24:26 +00:00
|
|
|
## </summary>
|
2010-08-26 13:41:21 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="file_type">
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Signed-off-by: Dominick Grift <domg472@gmail.com>
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
2010-09-16 06:24:26 +00:00
|
|
|
## <summary>
|
2010-08-26 13:41:21 +00:00
|
|
|
## Private file type.
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Signed-off-by: Dominick Grift <domg472@gmail.com>
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
2010-09-16 06:24:26 +00:00
|
|
|
## </summary>
|
2010-08-26 13:41:21 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="object_class">
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Signed-off-by: Dominick Grift <domg472@gmail.com>
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
2010-09-16 06:24:26 +00:00
|
|
|
## <summary>
|
2010-08-26 13:41:21 +00:00
|
|
|
## Class of the object being created.
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Signed-off-by: Dominick Grift <domg472@gmail.com>
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
2010-09-16 06:24:26 +00:00
|
|
|
## </summary>
|
2010-08-26 13:41:21 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`tftp_filetrans_tftpdir',`
|
|
|
|
gen_require(`
|
|
|
|
type tftpdir_rw_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
filetrans_pattern($1, tftpdir_rw_t, $2, $3)
|
|
|
|
files_search_var_lib($1)
|
|
|
|
')
|
|
|
|
|
2008-02-07 16:37:47 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-01-07 14:01:10 +00:00
|
|
|
## All of the rules required to administrate
|
2008-02-07 16:37:47 +00:00
|
|
|
## an tftp environment
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`tftp_admin',`
|
|
|
|
gen_require(`
|
2008-07-23 21:38:39 +00:00
|
|
|
type tftpd_t, tftpdir_t, tftpdir_rw_t, tftpd_var_run_t;
|
2008-02-07 16:37:47 +00:00
|
|
|
')
|
|
|
|
|
2008-05-15 13:10:34 +00:00
|
|
|
allow $1 tftpd_t:process { ptrace signal_perms getattr };
|
|
|
|
ps_process_pattern($1, tftpd_t)
|
2008-10-17 15:52:39 +00:00
|
|
|
|
2010-09-15 19:37:38 +00:00
|
|
|
files_list_var_lib($1)
|
2008-10-08 15:50:03 +00:00
|
|
|
admin_pattern($1, tftpdir_rw_t)
|
2008-02-07 16:37:47 +00:00
|
|
|
|
2008-10-08 15:50:03 +00:00
|
|
|
admin_pattern($1, tftpdir_t)
|
2008-02-07 16:37:47 +00:00
|
|
|
|
|
|
|
files_list_pids($1)
|
2008-10-08 15:50:03 +00:00
|
|
|
admin_pattern($1, tftpd_var_run_t)
|
2008-02-07 16:37:47 +00:00
|
|
|
')
|