Hi Marc,
Jake Freeland gave a talk at the last EuroBSDCon about Capsicum and how
to use it, which was based on his blog post [1].
As I see it, you have two options:
1. Use Capsicum for everything except the (write) interactions with the
SQLite database. If you cannot determine which files the SQLite library
will open, you may still be able to improve the security of other parts
of your program by sandboxing those other parts.
2. It appears possible to restrict file access to a specific directory
("sub-domains"). If you know where the WAL files are created, you might
be able to grant access only to that directory and then open or close
files within it as needed.
I haven't used Capsicum with SQLite myself, but I hope this helps.
Regards,
Souji
[1]
https://cdaemon.com/posts/capsicum
--
Souji Thenria
Website:
www.souji-thenria.net