Skip to content

tracker-miner-fs: Avoid assert if landlock fails to initialize

There seems to be a "popular" "error" caught lately at Fedora Retrace service for F40, e.g.:

https://retrace.fedoraproject.org/faf/reports/937316/

This probably indicates a few people running custom or old kernels where Landlock is not an enabled feature, or there's other means in place to have it ineffective. Currently, this will raise an assertion and cause tracker-miner-fs-3 to continuously attempt restart of the extractor process, which might contribute to inflating the importance of this "crash".

Let this people the right to shoot themselves in the foot while having it our way, and refuse to perform any metadata extraction unless all the security measures we want in place are actually in place.

To do this, convert the assert into a critical warning, plus a clean exit. The clean exit will prevent tracker-miner-fs-3 from restarting the process again, and the warnings will just be noise in the logs triggered from time to time. Users might want to act upon it by updating their kernels.

Merge request reports