[OpenWrt-Devel] [PATCH procd v2 09/17] ujail: search libs in /lib before /lib64

Etienne CHAMPETIER champetier.etienne at gmail.com
Wed Nov 25 12:54:42 EST 2015


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 at gmail.com>
---
 jail/jail.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jail/jail.c b/jail/jail.c
index ae09623..e8c8f08 100644
--- a/jail/jail.c
+++ b/jail/jail.c
@@ -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");
 
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list