From 847aa150e30e6147c28ed9807fae4dc232b5a8fe Mon Sep 17 00:00:00 2001 From: Steve Lawrence Date: Mon, 6 Oct 2014 14:55:04 -0400 Subject: [PATCH] Squashed 'libsepol/cil/' changes from 73f1e3f..15b955e 15b955e Fix typos in error strings fe5a24e Disable declarations inside an optional even if in the first call pass git-subtree-dir: libsepol/cil git-subtree-split: 15b955ea49c86549661b6520a85291735ce5496c --- docs/CIL_Reference_Guide.xml | 2 +- src/cil_build_ast.c | 4 ++-- src/cil_resolve_ast.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/CIL_Reference_Guide.xml b/docs/CIL_Reference_Guide.xml index 5178dca6..e9051525 100644 --- a/docs/CIL_Reference_Guide.xml +++ b/docs/CIL_Reference_Guide.xml @@ -215,7 +215,7 @@ expr_set = (name ... | expr ...) expr = (expr_key expr_set ...) expr_key = and | or | xor | not | all | eq | neq | dom | domby | incomp | range]]> - The number of expr_set's in an expr is dependent on the statement type (there are four different classes as defined below) that also influence the valid expr_key entries (e.g. dom, domby, incomp are only allowed in constraint statments). + The number of expr_set's in an expr is dependent on the statement type (there are four different classes as defined below) that also influence the valid expr_key entries (e.g. dom, domby, incomp are only allowed in constraint statements). diff --git a/src/cil_build_ast.c b/src/cil_build_ast.c index 3a38559b..20e9d8bf 100644 --- a/src/cil_build_ast.c +++ b/src/cil_build_ast.c @@ -5511,7 +5511,7 @@ int __cil_build_ast_node_helper(struct cil_tree_node *parse_current, uint32_t *f rc = SEPOL_ERR; cil_log(CIL_ERR, "Found tunable at line %d of %s\n", parse_current->line, parse_current->path); - cil_log(CIL_ERR, "Tunables cannot be defined within macro statment\n"); + cil_log(CIL_ERR, "Tunables cannot be defined within macro statement\n"); goto exit; } @@ -5519,7 +5519,7 @@ int __cil_build_ast_node_helper(struct cil_tree_node *parse_current, uint32_t *f rc = SEPOL_ERR; cil_log(CIL_ERR, "Found in at line %d of %s\n", parse_current->line, parse_current->path); - cil_log(CIL_ERR, "in-statements cannot be defined within macro statment\n"); + cil_log(CIL_ERR, "in-statements cannot be defined within macro statement\n"); goto exit; } } diff --git a/src/cil_resolve_ast.c b/src/cil_resolve_ast.c index a36b2380..76751b8f 100644 --- a/src/cil_resolve_ast.c +++ b/src/cil_resolve_ast.c @@ -3181,7 +3181,7 @@ int __cil_resolve_ast_node_helper(struct cil_tree_node *node, __attribute__((unu if (optstack != NULL) { if (node->flavor == CIL_TUNABLE || node->flavor == CIL_MACRO) { /* tuanbles and macros are not allowed in optionals*/ - cil_log(CIL_ERR, "%s statment is not allowed in optionals (%s:%d)\n", cil_node_to_string(node), node->path, node->line); + cil_log(CIL_ERR, "%s statement is not allowed in optionals (%s:%d)\n", cil_node_to_string(node), node->path, node->line); rc = SEPOL_ERR; goto exit; } @@ -3367,7 +3367,7 @@ int __cil_resolve_ast_last_child_helper(struct cil_tree_node *current, void *ext if (((struct cil_optional *)parent->data)->datum.state == CIL_STATE_DISABLING) { /* go into the optional, removing everything that it added */ - if (args->pass > CIL_PASS_CALL1) { + if (args->pass >= CIL_PASS_CALL1) { rc = cil_tree_walk(parent, __cil_disable_children_helper, NULL, NULL, extra_args); if (rc != SEPOL_OK) { cil_log(CIL_ERR, "Failed to disable declarations in optional\n");