From: Etienne CHAMPETIER Date: Fri, 27 Nov 2015 16:27:00 +0000 (+0000) Subject: ujail: don't add non existant library_path X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=34a53406063495710e2416da3bdc40f80a72963c;p=oweals%2Fprocd.git ujail: don't add non existant library_path Signed-off-by: Etienne CHAMPETIER --- diff --git a/jail/elf.c b/jail/elf.c index cbb3051..34a5aca 100644 --- a/jail/elf.c +++ b/jail/elf.c @@ -33,6 +33,10 @@ static LIST_HEAD(library_paths); void alloc_library_path(const char *path) { + struct stat s; + if (stat(path, &s)) + return; + struct library_path *p; char *_path; @@ -343,10 +347,6 @@ void load_ldso_conf(const char *conf) load_ldso_conf(gl.gl_pathv[i]); globfree(&gl); } else { - struct stat s; - - if (stat(line, &s)) - continue; alloc_library_path(line); } }