Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Shutdown polkitd properly on SIGTERM
While trying to break polkit using dfuzzer I couldn't make ASan/LSan report _any_ memory leaks no matter how obvious they were. After a lot of tinkering I managed to get the reports only when calling __lsan_do_recoverable_leak_check() explicitly, which told me that the shutdown __lsan_do_leak_check() is somehow getting skipped. Turns out that polkitd does a "proper" shutdown on SIGINT (with which ASan/LSan worked as expected), but not for SIGTERM. Fixing this, by stopping the even loop even on SIGTERM, makes ASan/LSan happy (except for the couple of memory leaks that were unfortunately hidden by this behavior).
- Loading branch information