On Mon, Nov 27, 2017 at 2:01 AM, Jan Zarsky <jzarsky@xxxxxxxxxx> wrote: > Function dbase_llist_iterate() iterates over records and checks return > value of iterate function. According to a manpage semanage_iterate(3), > handler can return value 1 for early exit. dbase_llist_iterate() > currently checks for return value > 1, which does not include > expected value 1. > > Affected functions: > semanage_bool_iterate_local > semanage_fcontext_iterate > semanage_fcontext_iterate_local > semanage_ibendport_iterate_local > semanage_ibpkey_iterate_local > semanage_iface_iterate_local > semanage_node_iterate_local > semanage_port_iterate_local > semanage_seuser_iterate > semanage_seuser_iterate_local > semanage_user_iterate > semanage_user_iterate_local Not really what I had in mind. I meant what was the affect. This is simple enough to gather, so ack on v1, My understanding is that the affect is that it that it doesn't short circuit the iterate routine so lockups take longer than they need be, is that correct? > > Signed-off-by: Jan Zarsky <jzarsky@xxxxxxxxxx> > --- > libsemanage/src/database_llist.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libsemanage/src/database_llist.c b/libsemanage/src/database_llist.c > index 8ce2e2c1..c8f4ff0b 100644 > --- a/libsemanage/src/database_llist.c > +++ b/libsemanage/src/database_llist.c > @@ -263,7 +263,7 @@ int dbase_llist_iterate(semanage_handle_t * handle, > if (rc < 0) > goto err; > > - else if (rc > 1) > + else if (rc > 0) > break; > } > > -- > 2.14.3 > > -- Respectfully, William C Roberts