1# Copyright (C) 2007-2012 Red Hat 2# see file 'COPYING' for use and warranty information 3# 4# policygentool is a tool for the initial generation of SELinux policy 5# 6# This program is free software; you can redistribute it and/or 7# modify it under the terms of the GNU General Public License as 8# published by the Free Software Foundation; either version 2 of 9# the License, or (at your option) any later version. 10# 11# This program is distributed in the hope that it will be useful, 12# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# GNU General Public License for more details. 15# 16# You should have received a copy of the GNU General Public License 17# along with this program; if not, write to the Free Software 18# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 19# 02111-1307 USA 20# 21# 22 23 24#['domain', 'role', 'role_prefix', 'object_class', 'name', 'private_type', 'prefix', 'entrypoint', 'target_domain', 'terminal', 'range', 'domains', 'entry_point', 'entry_file', 'domain_prefix', 'private type', 'user_prefix', 'user_role', 'user_domain', 'object', 'type', 'source_domain', 'file_type', 'file', 'class', 'peer_domain', 'objectclass(es)', 'exception_types', 'home_type', 'object_type', 'directory_type', 'boolean', 'pty_type', 'userdomain', 'tty_type', 'tmpfs_type', 'script_file', 'filetype', 'filename', 'init_script_file', 'source_role', 'userdomain_prefix'] 25 26dict_values={} 27dict_values['domain'] = 'sepolicy_domain_t' 28dict_values['domains'] = 'sepolicy_domain_t' 29dict_values['target_domain'] = 'sepolicy_target_t' 30dict_values['source_domain'] = 'sepolicy_source_t' 31dict_values['peer_domain'] = 'sepolicy_peer_t' 32dict_values['exception_types'] = 'sepolicy_exception_types_t' 33dict_values['user_domain'] = 'sepolicy_userdomain_t' 34dict_values['userdomain'] = 'sepolicy_userdomain_t' 35dict_values['bool_domain'] = 'sepolicy_bool_domain_t' 36 37dict_values['type'] = 'sepolicy_file_t' 38dict_values['file_type'] = 'sepolicy_file_t' 39dict_values['private type'] = 'sepolicy_private_file_t' 40dict_values['private_type'] = 'sepolicy_private_file_t' 41dict_values['pty_type'] = 'sepolicy_devpts_t' 42dict_values['tmpfs_type'] = 'sepolicy_tmpfs_t' 43dict_values['home_type'] = 'sepolicy_home_file_t' 44dict_values['tty_type'] = 'sepolicy_t' 45dict_values['directory_type'] = 'sepolicy_file_t' 46dict_values['object_type'] = 'sepolicy_object_t' 47 48dict_values['script_file'] = 'sepolicy_exec_t' 49dict_values['entry_point'] = 'sepolicy_exec_t' 50dict_values['file'] = 'sepolicy_file_t' 51dict_values['entry_file'] = 'sepolicy_exec_t' 52dict_values['init_script_file'] = 'sepolicy_exec_t' 53dict_values['entrypoint'] = 'sepolicy_exec_t' 54 55dict_values['role'] = 'sepolicy_r' 56dict_values['role_prefix'] = 'sepolicy' 57dict_values['user_role'] = 'sepolicy_r' 58dict_values['source_role'] = 'sepolicy_source_r' 59 60dict_values['prefix'] = 'sepolicy_domain' 61dict_values['domain_prefix'] = 'sepolicy_domain' 62dict_values['userdomain_prefix'] = 'sepolicy_userdomain' 63dict_values['user_prefix'] = 'sepolicy_userdomain' 64 65dict_values['object_class'] = 'file' 66dict_values['object'] = 'file' 67dict_values['class'] = 'file' 68dict_values['objectclass(es)'] = 'file' 69dict_values['object_name'] = 'sepolicy_object' 70dict_values['name'] = '"sepolicy_name"' 71 72dict_values['terminal'] = 'sepolicy_tty_t' 73dict_values['boolean'] = 'sepolicy_bool_t' 74dict_values['range'] = 's0 - mcs_systemhigh' 75 76te_test_module="""\ 77policy_module(TEMPLATETYPE, 1.0.0) 78 79type sepolicy_t; 80domain_type(sepolicy_t) 81type sepolicy_domain_t; 82domain_type(sepolicy_domain_t) 83type sepolicy_target_t; 84domain_type(sepolicy_target_t) 85type sepolicy_source_t; 86domain_type(sepolicy_source_t) 87type sepolicy_peer_t; 88domain_type(sepolicy_peer_t) 89type sepolicy_exception_types_t; 90domain_type(sepolicy_exception_types_t) 91type sepolicy_userdomain_t; 92domain_type(sepolicy_userdomain_t) 93 94type sepolicy_file_t; 95files_type(sepolicy_file_t) 96type sepolicy_private_file_t; 97files_type(sepolicy_private_file_t) 98type sepolicy_home_file_t; 99files_type(sepolicy_home_file_t) 100type sepolicy_tty_t; 101term_tty(sepolicy_tty_t) 102type sepolicy_object_t; 103type sepolicy_devpts_t; 104term_pty(sepolicy_devpts_t) 105type sepolicy_tmpfs_t; 106files_type(sepolicy_tmpfs_t) 107type sepolicy_exec_t; 108files_type(sepolicy_exec_t) 109 110role sepolicy_r; 111role sepolicy_source_r; 112role sepolicy_target_r; 113 114################################# 115# 116# Local policy 117# 118 119""" 120