ctc-oss / fapolicy-analyzer

Tools to assist with the configuration and management of fapolicyd.
https://ctc-oss.github.io/fapolicy-analyzer
GNU General Public License v3.0
12 stars 5 forks source link

Distinct trust check #755

Closed jw3 closed 1 year ago

jw3 commented 1 year ago

Improve #691 by adding ability to distinguish between type of trust being checked.

Rather than add a flag to the type, or separate return batches, this adds separate entrypoints. The callback handlers will be responsible for knowing which type they are receiving.

This also changes the return value of the check_* call to represent the total number of records to be checked. The count parameter of the update callback is now the total number checked as of that callback, such that the check_* return value should equal the callback count value on the final batch.

See the updated reference impl in examples/async_trust.py

690

750

jw3 commented 1 year ago

@dorschs57 what do you think about this approach? I was thinking that you could just fire up a check on ancillary and system at the same time to feed separate progress indicators on each view.

jw3 commented 1 year ago

I like this approach. It will allow me to keep the 2 separated at the redux layer like they where in the original code. +1

OK. I need to get one more test in to make sure the gil is synchronizing the merge call. Then it will be merged.