Lines Matching full:flavor
58 int cil_fill_list(struct cil_tree_node *current, enum cil_flavor flavor, struct cil_list **list)
73 cil_list_init(list, flavor);
101 ast_node->flavor = nflavor;
119 if (ast_node->flavor >= CIL_MIN_DECLARATIVE && ast_node->parent->flavor == CIL_MACRO) {
125 if (param->flavor == ast_node->flavor) {
150 ast_node->flavor = CIL_NONE;
234 ast_node->flavor = CIL_BLOCKINHERIT;
279 ast_node->flavor = CIL_BLOCKABSTRACT;
325 ast_node->flavor = CIL_IN;
454 ast_node->flavor = CIL_CLASSORDER;
478 int cil_gen_perm(__attribute__((unused)) struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, enum cil_flavor flavor, unsigned int *num_perms)
488 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)perm, (hashtab_key_t)key, CIL_SYM_PERMS, flavor);
516 int cil_gen_perm_nodes(__attribute__((unused)) struct cil_db *db, struct cil_tree_node *current_perm, struct cil_tree_node *ast_node, enum cil_flavor flavor, unsigned int *num_perms)
532 rc = cil_gen_perm(db, current_perm, new_ast, flavor, num_perms);
698 if (curr->flavor == CIL_CLASSPERMS) {
798 ast_node->flavor = CIL_CLASSPERMISSIONSET;
895 ast_node->flavor = CIL_CLASSMAPPING;
992 ast_node->flavor = CIL_CLASSCOMMON;
1100 ast_node->flavor = CIL_SIDCONTEXT;
1161 ast_node->flavor = CIL_SIDORDER;
1334 ast_node->flavor = CIL_USERATTRIBUTESET;
1395 ast_node->flavor = CIL_USERLEVEL;
1456 ast_node->flavor = CIL_USERRANGE;
1507 ast_node->flavor = CIL_USERPREFIX;
1565 ast_node->flavor = CIL_SELINUXUSER;
1613 ast_node->flavor = CIL_SELINUXUSERDEFAULT;
1715 ast_node->flavor = CIL_ROLETYPE;
1762 ast_node->flavor = CIL_USERROLE;
1813 ast_node->flavor = CIL_ROLETRANSITION;
1860 ast_node->flavor = CIL_ROLEALLOW;
1980 ast_node->flavor = CIL_ROLEATTRIBUTESET;
2040 ast_node->flavor = CIL_AVRULE;
2208 ast_node->flavor = CIL_AVRULEX;
2251 ast_node->flavor = CIL_TYPE_RULE;
2538 static int __cil_fill_expr(struct cil_tree_node *current, enum cil_flavor flavor, struct cil_list *expr, int *depth);
2540 static int __cil_fill_expr_helper(struct cil_tree_node *current, enum cil_flavor flavor, struct cil_list *expr, int *depth)
2545 if (flavor == CIL_BOOL && *depth > COND_EXPR_MAXDEPTH) {
2552 rc = cil_verify_expr_syntax(current, op, flavor);
2567 rc = __cil_fill_expr(current, flavor, expr, depth);
2581 static int __cil_fill_expr(struct cil_tree_node *current, enum cil_flavor flavor, struct cil_list *expr, int *depth)
2594 cil_list_init(&sub_expr, flavor);
2595 rc = __cil_fill_expr_helper(current->cl_head, flavor, sub_expr, depth);
2609 int cil_gen_expr(struct cil_tree_node *current, enum cil_flavor flavor, struct cil_list **expr)
2614 cil_list_init(expr, flavor);
2617 rc = __cil_fill_expr(current, flavor, *expr, &depth);
2619 rc = __cil_fill_expr_helper(current->cl_head, flavor, *expr, &depth);
2727 static int __cil_fill_constraint_expr(struct cil_tree_node *current, enum cil_flavor flavor, struct cil_list **expr, int *depth)
2759 rc = __cil_fill_constraint_leaf_expr(current, flavor, op, expr);
2765 rc = __cil_fill_constraint_expr(current->next->cl_head, flavor, &lexpr, depth);
2769 cil_list_init(expr, flavor);
2774 rc = __cil_fill_constraint_expr(current->next->cl_head, flavor, &lexpr, depth);
2778 rc = __cil_fill_constraint_expr(current->next->next->cl_head, flavor, &rexpr, depth);
2782 cil_list_init(expr, flavor);
2797 int cil_gen_constraint_expr(struct cil_tree_node *current, enum cil_flavor flavor, struct cil_list **expr)
2806 rc = __cil_fill_constraint_expr(current->cl_head, flavor, expr, &depth);
2876 ast_node->flavor = CIL_BOOLEANIF;
2961 ast_node->flavor = CIL_TUNABLEIF;
2985 int cil_gen_condblock(__attribute__((unused)) struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, enum cil_flavor flavor)
3005 if (ast_node->parent->flavor != CIL_BOOLEANIF && ast_node->parent->flavor != CIL_TUNABLEIF) {
3011 ast_node->flavor = CIL_CONDBLOCK;
3014 cb->flavor = flavor;
3037 int cil_gen_alias(__attribute__((unused)) struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, enum cil_flavor flavor)
3059 if (flavor == CIL_TYPEALIAS && parse_current->next->data == CIL_KEY_SELF) {
3069 rc = cil_flavor_to_symtab_index(flavor, &sym_index);
3074 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)alias, (hashtab_key_t)key, sym_index, flavor);
3101 int cil_gen_aliasactual(__attribute__((unused)) struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, enum cil_flavor flavor)
3122 if ((flavor == CIL_TYPEALIAS && parse_current->next->data == CIL_KEY_SELF) || parse_current->next->next->data == CIL_KEY_SELF) {
3135 ast_node->flavor = flavor;
3185 ast_node->flavor = CIL_TYPEATTRIBUTESET;
3233 ast_node->flavor = CIL_TYPEPERMISSIVE;
3303 ast_node->flavor = CIL_NAMETYPETRANSITION;
3316 ast_node->flavor = CIL_TYPE_RULE;
3389 ast_node->flavor = CIL_RANGETRANSITION;
3612 ast_node->flavor = CIL_CATORDER;
3673 ast_node->flavor = CIL_SENSITIVITYORDER;
3728 ast_node->flavor = CIL_SENSCAT;
3922 int cil_gen_constrain(__attribute__((unused)) struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, enum cil_flavor flavor)
3950 rc = cil_gen_constraint_expr(parse_current->next->next, flavor, &cons->str_expr);
3956 ast_node->flavor = flavor;
3980 int cil_gen_validatetrans(__attribute__((unused)) struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, enum cil_flavor flavor)
4005 rc = cil_gen_constraint_expr(parse_current->next->next, flavor, &validtrans->str_expr);
4011 ast_node->flavor = flavor;
4209 ast_node->flavor = CIL_FILECON;
4309 ast_node->flavor = CIL_PORTCON;
4391 ast_node->flavor = CIL_NODECON;
4462 ast_node->flavor = CIL_GENFSCON;
4536 ast_node->flavor = CIL_NETIFCON;
4604 ast_node->flavor = CIL_PIRQCON;
4690 ast_node->flavor = CIL_IOMEMCON;
4776 ast_node->flavor = CIL_IOPORTCON;
4840 ast_node->flavor = CIL_PCIDEVICECON;
4901 ast_node->flavor = CIL_DEVICETREECON;
4977 ast_node->flavor = CIL_FSUSE;
5062 param->flavor = CIL_TYPE;
5064 param->flavor = CIL_ROLE;
5066 param->flavor = CIL_USER;
5068 param->flavor = CIL_SENS;
5070 param->flavor = CIL_CAT;
5072 param->flavor = CIL_CATSET;
5074 param->flavor = CIL_LEVEL;
5076 param->flavor = CIL_LEVELRANGE;
5078 param->flavor = CIL_CLASS;
5080 param->flavor = CIL_IPADDR;
5082 param->flavor = CIL_MAP_CLASS;
5084 param->flavor = CIL_CLASSPERMISSION;
5086 param->flavor = CIL_BOOL;
5088 param->flavor = CIL_NAME;
5090 param->flavor = CIL_NAME;
5109 if (param->flavor == ((struct cil_param*)curr_param->data)->flavor) {
5194 ast_node->flavor = CIL_CALL;
5234 switch (args->flavor) {
5258 cil_log(CIL_ERR, "Destroying arg with the unexpected flavor=%d\n",args->flavor);
5567 int cil_gen_bounds(__attribute__((unused)) struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, enum cil_flavor flavor)
5595 switch (flavor) {
5597 ast_node->flavor = CIL_USERBOUNDS;
5600 ast_node->flavor = CIL_ROLEBOUNDS;
5603 ast_node->flavor = CIL_TYPEBOUNDS;
5627 int cil_gen_default(struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, enum cil_flavor flavor)
5647 def->flavor = flavor;
5669 ast_node->flavor = flavor;
5756 ast_node->flavor = CIL_DEFAULTRANGE;
5817 ast_node->flavor = CIL_HANDLEUNKNOWN;
5866 ast_node->flavor = CIL_MLS;
6252 if (ast_current->flavor == CIL_MACRO) {
6256 if (ast_current->flavor == CIL_BOOLEANIF) {
6260 if (ast_current->flavor == CIL_TUNABLEIF) {
6264 if (ast_current->flavor == CIL_IN) {
6296 if (ast->flavor == CIL_ROOT) {
6303 if (ast->flavor == CIL_MACRO) {
6307 if (ast->flavor == CIL_BOOLEANIF) {
6311 if (ast->flavor == CIL_TUNABLEIF) {
6315 if (ast->flavor == CIL_IN) {