From 8adbd615c19cfa0fd5e9b857e5ffcbfd263af82d Mon Sep 17 00:00:00 2001 From: James Carter Date: Tue, 31 Jan 2017 13:47:36 -0500 Subject: [PATCH] libsepol: Return +1 when declaration is followed by a require A check is made in symtab_insert() for the case when an identifier had already been declared and was now being required. This meant that a declaration followed by a require was treated differently from a require followed by a declaration. Remove that check and treat both cases the same (which means returning +1). Signed-off-by: James Carter --- libsepol/src/policydb.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libsepol/src/policydb.c b/libsepol/src/policydb.c index 5b9b9f02..3cff6d27 100644 --- a/libsepol/src/policydb.c +++ b/libsepol/src/policydb.c @@ -1666,9 +1666,6 @@ int symtab_insert(policydb_t * pol, uint32_t sym, } } else if (scope_datum->scope == SCOPE_REQ && scope == SCOPE_DECL) { scope_datum->scope = SCOPE_DECL; - } else if (scope_datum->scope != scope) { - /* This only happens in DECL then REQUIRE case, which is handled by caller */ - return -2; } /* search through the pre-existing list to avoid adding duplicates */