runtime: Really use the realpath() of the host ld.so
flatpak_canonicalize_filename() only does a syntactic normalization,
eliminating ./ and similar constructs; it does not resolve symbolic
links. We need to use the realpath() of the 64-bit dynamic linker,
because otherwise, when we start replacing the dynamic linker in the
container with a symlink into /run/host, the host system might have
a symlink /lib64/ld-linux-x86-64.so.2 pointing outside /lib64,
for example to /lib/ld-linux-x86-64-2.30.so.
Then we'd get:
runtime's ld-linux-x86-64.so.2 ->
/run/host/lib64/ld-linux-x86-64.so.2 ->
/lib/ld-linux-x86-64-2.30.so ->
does not necessarily exist inside container
Signed-off-by:
Simon McVittie <smcv@collabora.com>
Please register or sign in to comment