selinux-policy/refpolicy/policy/modules/system/miscfiles.if
2005-09-16 21:20:37 +00:00

184 lines
3.9 KiB
Plaintext

## <summary>Miscelaneous files.</summary>
########################################
## <summary>
## Read fonts
## </summary>
## <param name="domain">
## Type type of the process performing this action.
## </param>
#
interface(`miscfiles_read_fonts',`
gen_require(`
type fonts_t;
class dir r_dir_perms;
class file r_file_perms;
')
files_search_usr($1)
libs_search_lib($1)
# cjp: fonts can be in either of the above dirs
allow $1 fonts_t:dir r_dir_perms;
allow $1 fonts_t:file r_file_perms;
')
########################################
## <summary>
## Allow process to read localization info
## </summary>
## <param name="domain">
## Type type of the process performing this action.
## </param>
#
interface(`miscfiles_read_localization',`
gen_require(`
type locale_t;
class dir r_dir_perms;
class lnk_file r_file_perms;
class file r_file_perms;
')
files_search_etc($1)
# FIXME: $1 read etc_t:lnk_file here
files_search_usr($1)
allow $1 locale_t:dir r_dir_perms;
allow $1 locale_t:lnk_file r_file_perms;
allow $1 locale_t:file r_file_perms;
# why?
libs_read_lib($1)
')
########################################
## <summary>
## Allow process to read legacy time localization info
## </summary>
## <param name="domain">
## Type type of the process performing this action.
## </param>
#
interface(`miscfiles_legacy_read_localization',`
gen_require(`
type locale_t;
class file execute;
')
miscfiles_read_localization($1)
allow $1 locale_t:file execute;
')
########################################
## <summary>
## Read man pages
## </summary>
## <param name="domain">
## Domain allowed access.
## </param>
#
interface(`miscfiles_read_man_pages',`
gen_require(`
type man_t;
class dir r_dir_perms;
class file r_file_perms;
class lnk_file r_file_perms;
')
files_search_usr($1)
allow $1 man_t:dir r_dir_perms;
allow $1 man_t:file r_file_perms;
allow $1 man_t:lnk_file r_file_perms;
')
########################################
## <summary>
## Delete man pages
## </summary>
## <param name="domain">
## Domain allowed access.
## </param>
# cjp: added for tmpreaper
#
interface(`miscfiles_delete_man_pages',`
gen_require(`
type man_t;
class dir { setattr rw_dir_perms rmdir };
class file { getattr unlink };
class lnk_file { getattr unlink };
')
files_search_usr($1)
allow $1 man_t:dir { setattr rw_dir_perms rmdir };
allow $1 man_t:file { getattr unlink };
allow $1 man_t:lnk_file { getattr unlink };
')
########################################
## <summary>
## Create, read, write, and delete man pages
## </summary>
## <param name="domain">
## Domain allowed access.
## </param>
#
interface(`miscfiles_manage_man_pages',`
gen_require(`
type man_t;
class dir create_dir_perms;
class file create_file_perms;
class lnk_file r_file_perms;
')
files_search_usr($1)
allow $1 man_t:dir create_dir_perms;
allow $1 man_t:file create_file_perms;
allow $1 man_t:lnk_file r_file_perms;
')
########################################
## <summary>
## Read TeX data
## </summary>
## <param name="domain">
## Type type of the process performing this action.
## </param>
#
interface(`miscfiles_read_tetex_data',`
gen_require(`
type tetex_data_t;
class dir r_dir_perms;
class file r_file_perms;
class lnk_file r_file_perms;
')
files_search_var($1)
files_search_var_lib($1)
# cjp: TeX data can be in either of the above dirs
allow $1 tetex_data_t:dir r_dir_perms;
allow $1 tetex_data_t:file r_file_perms;
allow $1 tetex_data_t:lnk_file r_file_perms;
')
########################################
## <summary>
## Execute TeX data programs in the caller domain.
## </summary>
## <param name="domain">
## Type type of the process performing this action.
## </param>
#
interface(`miscfiles_exec_tetex_data',`
gen_require(`
type fonts_t;
class dir r_dir_perms;
')
files_search_var($1)
files_search_var_lib($1)
# cjp: TeX data can be in either of the above dirs
allow $1 tetex_data_t:dir r_dir_perms;
can_exec($1,tetex_data_t)
')