Skip to content
Snippets Groups Projects
  • Simon McVittie's avatar
    d8cc2d35
    runtime: Really use the realpath() of the host ld.so · d8cc2d35
    Simon McVittie authored
    
    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: default avatarSimon McVittie <smcv@collabora.com>
    d8cc2d35
    History
    runtime: Really use the realpath() of the host ld.so
    Simon McVittie authored
    
    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: default avatarSimon McVittie <smcv@collabora.com>