* fix(native): programs started through the rootfs loader show their own command line
Without proot every dynamic guest program runs as "ld.so --preload <hook>
--library-path <dirs> --argv0 <name> <program> <args>", and the kernel's
/proc/<pid>/cmdline kept all of it. Launchers and the session match programs
by their command line, and Wine only moves its Windows command line over its
loader's name when its arguments follow each other, so the Battle.net launcher
never saw Battle.net.exe, gave up after five minutes and ended the session
with the game still running.
The hook now moves the program's own arguments to the front of that area at
start, as an exec of the program would have laid them out.
* fix(native): programs the app starts natively keep their path for /proc/<pid>/exe
* fix(native): the rewritten command line keeps AT_EXECFN naming the program
---------
Co-authored-by: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>
* Native hook: start a program again through /proc/self/exe as itself
A program that execs /proc/self/exe (Chromium's network and utility
services, Electron apps) reached the kernel link, which names ld.so, so
the child was started without ld.so and saw libddexec as its own
program. Chromium then looked for its ICU data beside libddexec and the
network service crashed in a loop.
The exec path now resolves /proc/self/exe to the program the hook knows
it runs, so it is routed like any other guest program, and readlink of
the exe link names a program from a bind by its guest path.
* fix(hook): keep the host path of a running program a nested bind shadows
* fix(desktop): keep the bundled PipeWire paths out of Plasma so the desktop draws
* fix(desktop): let the screencast portal use KWin so Sunshine can capture the desktop
* fix(proot): /proc/<pid>/root reads as the guest root so portals accept callers
* fix(nativeguest): /proc/<pid>/exe of another guest program names that program, not the loader
* fix(nativeguest): trust another process's program only when it is mapped there, and read all of its environment
* fix(nativeguest): accept versioned glibc loaders, and wait for the test program to run