From 5f88c0edd5db0916cbbcdec9042d4986ca778ae8 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Fri, 5 Oct 2012 12:09:54 -0400 Subject: small dynamic linker module search fix libraries loaded more than once by pathname should not get shortnames that would cause them to later be used to satisfy non-pathname load requests. --- src/ldso/dynlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c index f2bcd0f3..3f9bc145 100644 --- a/src/ldso/dynlink.c +++ b/src/ldso/dynlink.c @@ -483,7 +483,8 @@ static struct dso *load_library(const char *name) /* If this library was previously loaded with a * pathname but a search found the same inode, * setup its shortname so it can be found by name. */ - if (!p->shortname) p->shortname = strrchr(p->name, '/')+1; + if (!p->shortname && pathname != name) + p->shortname = strrchr(p->name, '/')+1; close(fd); p->refcnt++; return p; -- cgit v1.2.1