libsepol: Skip aliases when creating the type_attr_map
PATCH 1/1 libsepol: Skip aliases when creating the type_attr_map
Aliases that have primary == 0 share the same value as their primary, so there is no need to process them when creating the type_attr_map.
Skip aliases with primary == 0 when creating the type_attr_map.
Signed-off-by James Carter <[email protected]>
--- libsepol/src/expand.c | 4 ++++ 1 file changed, 4 insertions(+)
libsepol/src/expand.c +4 -0
@@ -2646,6 +2646,10 @@ static int type_attr_map(hashtab_key_t key __attribute__((unused)), type = (type_datum_t *)datum; value = type->s.value; +/* Skip aliases since they have the same value as their primary */ +if (!type->primary) +return 0 ; +if (type->flavor ==TYPE_ATTRIB ) {if (!(type->flags &TYPE_FLAGS_EXPAND_ATTR_TRUE )) { if (ebitmap_cpy(&p->attr_type_map[value - 1],
Signature · 1 line
2.55.0
Quoted 8 lines · James Carter
Aliases that have primary == 0 share the same value as their primary, so there is no need to process them when creating the
type_attr_map.Skip aliases with primary == 0 when creating the
type_attr_map.Signed-off-by James Carter <[email protected]>
Acked-by Stephen Smalley <[email protected]>
Stephen Smalley
maintainerQuoted 7 lines · Stephen Smalley
Quoted 5 lines · James Carter
Aliases that have primary == 0 share the same value as their primary, so there is no need to process them when creating the
type_attr_map.
Quoted 5 lines
Quoted 3 lines
Skip aliases with primary == 0 when creating the
type_attr_map.Signed-off-by James Carter <[email protected]>Acked-by Stephen Smalley <[email protected]>
Thanks, merged.