• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2011 Tresys Technology, LLC. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are met:
6  *
7  *    1. Redistributions of source code must retain the above copyright notice,
8  *       this list of conditions and the following disclaimer.
9  *
10  *    2. Redistributions in binary form must reproduce the above copyright notice,
11  *       this list of conditions and the following disclaimer in the documentation
12  *       and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY TRESYS TECHNOLOGY, LLC ``AS IS'' AND ANY EXPRESS
15  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
17  * EVENT SHALL TRESYS TECHNOLOGY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
18  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
19  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
21  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
22  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
23  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24  *
25  * The views and conclusions contained in the software and documentation are those
26  * of the authors and should not be interpreted as representing official policies,
27  * either expressed or implied, of Tresys Technology, LLC.
28  */
29 
30 #ifndef CIL_RESOLVE_AST_H_
31 #define CIL_RESOLVE_AST_H_
32 
33 #include <stdint.h>
34 
35 #include "cil_internal.h"
36 #include "cil_tree.h"
37 
38 int cil_resolve_classorder(struct cil_tree_node *current, void *extra_args);
39 int cil_resolve_classperms(struct cil_tree_node *current, struct cil_classperms *cp, void *extra_args);
40 int cil_resolve_classpermissionset(struct cil_tree_node *current, struct cil_classpermissionset *cps, void *extra_args);
41 int cil_resolve_classperms_list(struct cil_tree_node *current, struct cil_list *cp_list, void *extra_args);
42 int cil_resolve_avrule(struct cil_tree_node *current, void *extra_args);
43 int cil_resolve_type_rule(struct cil_tree_node *current, void *extra_args);
44 int cil_resolve_typeattributeset(struct cil_tree_node *current, void *extra_args);
45 int cil_resolve_typealias(struct cil_tree_node *current, void *extra_args);
46 int cil_resolve_typebounds(struct cil_tree_node *current, void *extra_args);
47 int cil_resolve_typepermissive(struct cil_tree_node *current, void *extra_args);
48 int cil_resolve_nametypetransition(struct cil_tree_node *current, void *extra_args);
49 int cil_resolve_rangetransition(struct cil_tree_node *current, void *extra_args);
50 int cil_resolve_classcommon(struct cil_tree_node *current, void *extra_args);
51 int cil_resolve_classmapping(struct cil_tree_node *current, void *extra_args);
52 int cil_resolve_userrole(struct cil_tree_node *current, void *extra_args);
53 int cil_resolve_userlevel(struct cil_tree_node *current, void *extra_args);
54 int cil_resolve_userrange(struct cil_tree_node *current, void *extra_args);
55 int cil_resolve_userbounds(struct cil_tree_node *current, void *extra_args);
56 int cil_resolve_userprefix(struct cil_tree_node *current, void *extra_args);
57 int cil_resolve_userattributeset(struct cil_tree_node *current, void *extra_args);
58 int cil_resolve_selinuxuser(struct cil_tree_node *current, void *extra_args);
59 int cil_resolve_roletype(struct cil_tree_node *current, void *extra_args);
60 int cil_resolve_roletransition(struct cil_tree_node *current, void *extra_args);
61 int cil_resolve_roleallow(struct cil_tree_node *current, void *extra_args);
62 int cil_resolve_roleattributeset(struct cil_tree_node *current, void *extra_args);
63 int cil_resolve_rolebounds(struct cil_tree_node *current, void *extra_args);
64 int cil_resolve_sensalias(struct cil_tree_node *current, void *extra_args);
65 int cil_resolve_catalias(struct cil_tree_node *current, void *extra_args);
66 int cil_resolve_catorder(struct cil_tree_node *current, void *extra_args);
67 int cil_resolve_sensitivityorder(struct cil_tree_node *current, void *extra_args);
68 int cil_resolve_cat_list(struct cil_tree_node *current, struct cil_list *cat_list, struct cil_list *res_cat_list, void *extra_args);
69 int cil_resolve_catset(struct cil_tree_node *current, struct cil_catset *catset, void *extra_args);
70 int cil_resolve_senscat(struct cil_tree_node *current, void *extra_args);
71 int cil_resolve_level(struct cil_tree_node *current, struct cil_level *level, void *extra_args);
72 int cil_resolve_levelrange(struct cil_tree_node *current, struct cil_levelrange *levelrange, void *extra_args);
73 int cil_resolve_constrain(struct cil_tree_node *current, void *extra_args);
74 int cil_resolve_validatetrans(struct cil_tree_node *current, void *extra_args);
75 int cil_resolve_context(struct cil_tree_node *current, struct cil_context *context, void *extra_args);
76 int cil_resolve_filecon(struct cil_tree_node *current, void *extra_args);
77 int cil_resolve_portcon(struct cil_tree_node *current, void *extra_args);
78 int cil_resolve_genfscon(struct cil_tree_node *current, void *extra_args);
79 int cil_resolve_nodecon(struct cil_tree_node *current, void *extra_args);
80 int cil_resolve_netifcon(struct cil_tree_node *current, void *extra_args);
81 int cil_resolve_pirqcon(struct cil_tree_node *current, void *extra_args);
82 int cil_resolve_iomemcon(struct cil_tree_node *current, void *extra_args);
83 int cil_resolve_ioportcon(struct cil_tree_node *current, void *extra_args);
84 int cil_resolve_pcidevicecon(struct cil_tree_node *current, void *extra_args);
85 int cil_resolve_fsuse(struct cil_tree_node *current, void *extra_args);
86 int cil_resolve_sidcontext(struct cil_tree_node *current, void *extra_args);
87 int cil_resolve_sidorder(struct cil_tree_node *current, void *extra_args);
88 int cil_resolve_blockinherit(struct cil_tree_node *current, void *extra_args);
89 int cil_resolve_in(struct cil_tree_node *current, void *extra_args);
90 int cil_resolve_call1(struct cil_tree_node *current, void *extra_args);
91 int cil_resolve_call2(struct cil_tree_node *, void *extra_args);
92 int cil_resolve_name_call_args(struct cil_call *call, char *name, enum cil_sym_index sym_index, struct cil_symtab_datum **datum);
93 int cil_resolve_expr(enum cil_flavor expr_type, struct cil_list *str_expr, struct cil_list **datum_expr, struct cil_tree_node *parent, void *extra_args);
94 int cil_resolve_boolif(struct cil_tree_node *current, void *extra_args);
95 int cil_evaluate_expr(struct cil_list *datum_expr, uint16_t *result);
96 int cil_resolve_tunif(struct cil_tree_node *current, void *extra_args);
97 
98 int cil_resolve_ast(struct cil_db *db, struct cil_tree_node *current);
99 int cil_resolve_name(struct cil_tree_node *ast_node, char *name, enum cil_sym_index sym_index, void *extra_args, struct cil_symtab_datum **datum);
100 
101 #endif /* CIL_RESOLVE_AST_H_ */
102