In order to externally capsicumize some applications, especially desktop ones (e.g. anything GTK3 based), we need to support dlopen.
In my horrific hack that I made before discovering libpreopen, it is implemented as fdlopen, but with a manual pre-loading of ELF dependencies using the ELF parser to find them. :D And it does work, I can start GTK3 under both X and Wayland after cap_enter.
Do you have any ideas for better, cleaner, reliable dlopen support?
Turns out just wrapping dlopen and letting rtld pick up dependencies from the "static" fds (when doing the explicit rtld exec) is pretty good. Closing in favor of PR #9
In order to externally capsicumize some applications, especially desktop ones (e.g. anything GTK3 based), we need to support
dlopen
.In my horrific hack that I made before discovering
libpreopen
, it is implemented asfdlopen
, but with a manual pre-loading of ELF dependencies using the ELF parser to find them. :D And it does work, I can start GTK3 under both X and Wayland aftercap_enter
.Do you have any ideas for better, cleaner, reliable
dlopen
support?