diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-07-25 13:47:58 +0530 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-11-12 02:10:04 -0500 |
commit | 02ab226f7ff6bcc4a5943c1c7e5aef3ccebc33e3 (patch) | |
tree | eca35ff68b706bcf4d833131ee0e3a634d862e03 /paxldso.c | |
parent | split out ld.so.cache & ld.so.conf parsing logic (diff) | |
download | pax-utils-02ab226f7ff6bcc4a5943c1c7e5aef3ccebc33e3.tar.gz pax-utils-02ab226f7ff6bcc4a5943c1c7e5aef3ccebc33e3.tar.bz2 pax-utils-02ab226f7ff6bcc4a5943c1c7e5aef3ccebc33e3.zip |
paxldso: delete netbsd cache logic
This doesn't actually parse the cache file, it walks the registered
ld.so.conf paths. Since common code takes care of that via with the
--use-ldpaths option, delete the duplicate ldpath logic.
Diffstat (limited to 'paxldso.c')
-rw-r--r-- | paxldso.c | 28 |
1 files changed, 0 insertions, 28 deletions
@@ -119,34 +119,6 @@ char *ldso_cache_lookup_lib(elfobj *elf, const char *fname) return buf; } -#elif defined(__NetBSD__) - -char *ldso_cache_lookup_lib(elfobj *elf, const char *fname) -{ - static char buf[__PAX_UTILS_PATH_MAX] = ""; - static struct stat st; - size_t n; - char *ldpath; - - array_for_each(ldpath, n, ldpath) { - if ((unsigned) snprintf(buf, sizeof(buf), "%s/%s", ldpath, fname) >= sizeof(buf)) - continue; /* if the pathname is too long, or something went wrong, ignore */ - - if (stat(buf, &st) != 0) - continue; /* if the lib doesn't exist in *ldpath, look further */ - - /* NetBSD doesn't actually do sanity checks, it just loads the file - * and if that doesn't work, continues looking in other directories. - * This cannot easily be safely emulated, unfortunately. For now, - * just assume that if it exists, it's a valid library. */ - - return buf; - } - - /* not found in any path */ - return NULL; -} - #endif static void ldso_cache_cleanup(void) |