ujail: search libs in /lib before /lib64
authorEtienne CHAMPETIER <champetier.etienne@gmail.com>
Fri, 27 Nov 2015 16:27:08 +0000 (16:27 +0000)
committerJohn Crispin <blogic@openwrt.org>
Fri, 27 Nov 2015 16:48:49 +0000 (17:48 +0100)
musl (openwrt DD r47603 x86-64) looks for lib only in /lib,
not in /lib64, and /lib64 is a symlink to /lib, so ujail find
all the libs in /lib64, add them in the jail (only under /lib64)
and then musl fails to find the libs.

uClibc (openwrt CC r47608 x86-64) looks for lib in /lib and
/usr/lib, not in /lib64 (/lib64 is also a symlink to /lib)

/lib64 is before /lib since the first commit, i don't know
if it was on purpose

this partly fixes
https://dev.openwrt.org/ticket/20785

Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
jail/jail.c

index ae09623..e8c8f08 100644 (file)
@@ -154,8 +154,8 @@ static int build_jail_fs()
        }
 
        avl_init(&libraries, avl_strcmp, false, NULL);
-       alloc_library_path("/lib64");
        alloc_library_path("/lib");
+       alloc_library_path("/lib64");
        alloc_library_path("/usr/lib");
        load_ldso_conf("/etc/ld.so.conf");