selinux-policy/refpolicy/policy/modules/system/miscfiles.if

154 lines
3.8 KiB
Plaintext
Raw Normal View History

2005-06-07 22:36:07 +00:00
## <module name="miscfiles" layer="system">
## <summary>Miscelaneous files.</summary>
2005-04-20 19:07:16 +00:00
2005-05-11 19:05:15 +00:00
########################################
2005-06-07 22:36:07 +00:00
## <interface name="miscfiles_manage_man_page_cache">
## <description>
## Allow process to create files and dirs in /var/cache/man
## and /var/catman/
## </description>
## <securitydesc>
## ...
## </securitydesc>
## <parameter name="domain">
## Type type of the process performing this action.
## </parameter>
## </interface>
2005-05-11 19:05:15 +00:00
#
define(`miscfiles_manage_man_page_cache',`
requires_block_template(`$0'_depend)
# FIXME: search var_t dir
allow $1 catman_t:dir create_dir_perms;
allow $1 catman_t:file create_file_perms;
2005-05-11 19:05:15 +00:00
')
define(`miscfiles_manage_man_page_cache_depend',`
type catman_t;
class dir create_dir_perms;
class file create_file_perms;
2005-05-11 19:05:15 +00:00
')
2005-05-05 21:36:53 +00:00
########################################
2005-06-07 22:36:07 +00:00
## <interface name="miscfiles_read_fonts">
## <description>
## Allow process to read fonts files
## </description>
## <securitydesc>
## ...
## </securitydesc>
## <parameter name="domain">
## Type type of the process performing this action.
## </parameter>
## </interface>
2005-05-05 21:36:53 +00:00
#
define(`miscfiles_read_fonts',`
requires_block_template(`$0'_depend)
# FIXME: search usr_t dir
# FIXME: search lib_t dir
# cjp: fonts can be in either of the above dirs
2005-06-09 14:26:05 +00:00
allow $1 fonts_t:dir r_dir_perms;
allow $1 fonts_t:file r_file_perms;
2005-05-05 21:36:53 +00:00
')
define(`miscfiles_read_fonts_depend',`
type fonts_t;
2005-06-09 14:26:05 +00:00
class dir r_dir_perms;
class file r_file_perms;
2005-05-05 21:36:53 +00:00
')
2005-04-14 20:18:17 +00:00
########################################
2005-06-07 22:36:07 +00:00
## <interface name="miscfiles_read_localization">
## <description>
## Allow process to read localization info
## </description>
## <securitydesc>
## ...
## </securitydesc>
## <parameter name="domain">
## Type type of the process performing this action.
## </parameter>
## </interface>
2005-04-14 20:18:17 +00:00
#
define(`miscfiles_read_localization',`
requires_block_template(`$0'_depend)
2005-05-11 15:46:51 +00:00
# FIXME: $1 read etc_t:lnk_file here
# FIXME: $1 search usr_t:dir here
2005-06-09 14:26:05 +00:00
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;
2005-05-11 15:46:51 +00:00
# why?
libraries_read_library_resources($1)
2005-04-14 20:18:17 +00:00
')
define(`miscfiles_read_localization_depend',`
type locale_t;
2005-06-09 14:26:05 +00:00
class dir r_dir_perms;
class lnk_file r_file_perms;
class file r_file_perms;
2005-04-14 20:18:17 +00:00
')
2005-05-05 20:33:35 +00:00
########################################
2005-06-07 22:36:07 +00:00
## <interface name="miscfiles_legacy_read_localization">
## <description>
## Allow process to read legacy time localization info
## </description>
## <securitydesc>
## ...
## </securitydesc>
## <parameter name="domain">
## Type type of the process performing this action.
## </parameter>
## </interface>
2005-05-05 20:33:35 +00:00
#
define(`miscfiles_legacy_read_localization',`
requires_block_template(`$0'_depend)
miscfiles_read_localization($1)
allow $1 locale_t:file execute;
2005-05-05 20:33:35 +00:00
')
define(`miscfiles_read_localization_depend',`
type locale_t;
class file execute;
2005-05-05 20:33:35 +00:00
')
2005-05-11 19:05:15 +00:00
########################################
2005-06-07 22:36:07 +00:00
## <interface name="miscfiles_read_man_pages">
## <description>
## Allow process to read manpages
## </description>
## <securitydesc>
## ...
## </securitydesc>
## <parameter name="domain">
## Type type of the process performing this action.
## </parameter>
## </interface>
2005-05-11 19:05:15 +00:00
#
define(`miscfiles_read_man_pages',`
requires_block_template(`$0'_depend)
# FIXME: search usr_t dir
2005-06-09 14:26:05 +00:00
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;
2005-05-11 19:05:15 +00:00
')
define(`miscfiles_read_man_pages_depend',`
type man_t;
2005-06-09 14:26:05 +00:00
class dir r_dir_perms;
class file r_file_perms;
class lnk_file r_file_perms;
2005-05-11 19:05:15 +00:00
')
2005-06-07 22:36:07 +00:00
## </module>