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. This affects most of the semanage_*_iterate and semanage_*_local functions. 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