diff mbox

[OpenWrt-Devel,procd,v2,13/17] ujail: remove some debug/dev hack

Message ID 1448474090-30280-14-git-send-email-champetier.etienne@gmail.com
State Superseded
Headers show

Commit Message

Etienne Champetier Nov. 25, 2015, 5:54 p.m. UTC
this code is present since first ujail commit (dfcfcca7)

Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
---
 jail/elf.c  | 7 +------
 jail/jail.c | 8 ++------
 2 files changed, 3 insertions(+), 12 deletions(-)
diff mbox

Patch

diff --git a/jail/elf.c b/jail/elf.c
index c3a392c..7c52880 100644
--- a/jail/elf.c
+++ b/jail/elf.c
@@ -100,17 +100,12 @@  const char* find_lib(const char *file)
 {
 	struct library *l;
 	static char path[PATH_MAX];
-	const char *p;
 
 	l = avl_find_element(&libraries, file, l, avl);
 	if (!l)
 		return NULL;
 
-	p = l->path;
-	if (strstr(p, "local"))
-		p = "/lib";
-
-	snprintf(path, sizeof(path), "%s/%s", p, file);
+	snprintf(path, sizeof(path), "%s/%s", l->path, file);
 
 	return path;
 }
diff --git a/jail/jail.c b/jail/jail.c
index b7e6946..f62d121 100644
--- a/jail/jail.c
+++ b/jail/jail.c
@@ -92,21 +92,17 @@  static int mkdir_p(char *dir, mode_t mask)
 
 static int mount_bind(const char *root, const char *path, const char *name, int readonly, int error)
 {
-	const char *p = path;
 	struct stat s;
 	char old[PATH_MAX];
 	char new[PATH_MAX];
 	int fd;
 
-	if (strstr(p, "local"))
-		p = "/lib";
-
 	snprintf(old, sizeof(old), "%s/%s", path, name);
-	snprintf(new, sizeof(new), "%s%s", root, p);
+	snprintf(new, sizeof(new), "%s%s", root, path);
 
 	mkdir_p(new, 0755);
 
-	snprintf(new, sizeof(new), "%s%s/%s", root, p, name);
+	snprintf(new, sizeof(new), "%s%s/%s", root, path, name);
 
 	if (stat(old, &s)) {
 		ERROR("%s does not exist\n", old);