injector icon indicating copy to clipboard operation
injector copied to clipboard

Added fix for sandboxed apps like Flatpaks

Open rdbo opened this issue 8 months ago • 2 comments

On Linux, there is a virtual rootfs path at /proc/<pid>/root, which represents what the process thinks is the rootfs, and also allows you to access those files. For example, on Flatpak the libc path would be: /app/libc.so. But there is no /app on my system, that directory only exists in the sandboxed rootfs. Luckily, we can still access it through /proc/<pid>/root/app/libc.so. This fix adds the prefix /proc/<pid>/root to the libc path before calling open_libc, since the root directory exists in both regular processes and sandboxed ones.

rdbo avatar Oct 21 '23 16:10 rdbo