diff --git a/parser/libapparmor_re/hfa.cc b/parser/libapparmor_re/hfa.cc index 48e2b8752..1cec5137e 100644 --- a/parser/libapparmor_re/hfa.cc +++ b/parser/libapparmor_re/hfa.cc @@ -303,12 +303,12 @@ static void split_node_types(NodeSet *nodes, NodeSet **anodes, NodeSet **nnodes State *DFA::add_new_state(NodeSet *anodes, NodeSet *nnodes, State *other) { - NodeVec *nnodev; + NodeVec *nnodev, *anodev; nnodev = nnodes_cache.insert(nnodes); - anodes = anodes_cache.insert(anodes); + anodev = anodes_cache.insert(anodes); ProtoState proto; - proto.init(nnodev, anodes); + proto.init(nnodev, anodev); State *state = new State(node_map.size(), proto, other, filedfa); pair x = node_map.insert(proto, state); if (x.second == false) { @@ -1340,7 +1340,7 @@ static inline int diff_qualifiers(uint32_t perm1, uint32_t perm2) * have any exact matches, then they override the execute and safe * execute flags. */ -int accept_perms(NodeSet *state, perms_t &perms, bool filedfa) +int accept_perms(NodeVec *state, perms_t &perms, bool filedfa) { int error = 0; uint32_t exact_match_allow = 0; @@ -1351,7 +1351,7 @@ int accept_perms(NodeSet *state, perms_t &perms, bool filedfa) if (!state) return error; - for (NodeSet::iterator i = state->begin(); i != state->end(); i++) { + for (NodeVec::iterator i = state->begin(); i != state->end(); i++) { if (!(*i)->is_type(NODE_TYPE_MATCHFLAG)) continue; diff --git a/parser/libapparmor_re/hfa.h b/parser/libapparmor_re/hfa.h index 1483c4226..3e4d4457c 100644 --- a/parser/libapparmor_re/hfa.h +++ b/parser/libapparmor_re/hfa.h @@ -133,7 +133,7 @@ public: uint32_t allow, deny, audit, quiet, exact; }; -int accept_perms(NodeSet *state, perms_t &perms, bool filedfa); +int accept_perms(NodeVec *state, perms_t &perms, bool filedfa); /* * ProtoState - NodeSet and ancillery information used to create a state @@ -141,12 +141,12 @@ int accept_perms(NodeSet *state, perms_t &perms, bool filedfa); class ProtoState { public: NodeVec *nnodes; - NodeSet *anodes; + NodeVec *anodes; /* init is used instead of a constructor because ProtoState is used * in a union */ - void init(NodeVec *n, NodeSet *a = NULL) + void init(NodeVec *n, NodeVec *a = NULL) { nnodes = n; anodes = a; @@ -312,7 +312,7 @@ class DFA { unsigned int &max); /* temporary values used during computations */ - NodeCache anodes_cache; + NodeVecCache anodes_cache; NodeVecCache nnodes_cache; NodeMap node_map; list work_queue;