Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ebpf: allow to load modules from more directories
Up until now we loaded the eBPF modules from /etc/opensnitchd. However there has been some problems upgrading the modules to newer versions with the deb packages, because every file under /etc/ is treated as a conffile, and whenever a conffile changes it prompt you to update it or not. Some users decided to no upgrade it, ending up with eBPF modules incompatible with the new daemon. https://www.debian.org/doc/manuals/maint-guide/dother.en.html#conffiles On the other hand, the FHS dictates that /etc/ is for configuration files, and /usr/lib for object files: "/usr/lib includes object files and libraries. [21] On some systems, it may also include internal binaries that are not intended to be executed directly by users or shell scripts." https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s06.html So now, we look for the eBPF modules under /usr/local/lib/opensnitchd/ebpf/ or /usr/lib/opensnitchd/ebpf/, and as a last resort under /etc/opensnitchd/
- Loading branch information