summaryrefslogtreecommitdiffstats
path: root/sbin/ldconfig
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1995-01-12 19:12:29 +0000
committerjoerg <joerg@FreeBSD.org>1995-01-12 19:12:29 +0000
commit0cd8c74ee0e434aa440be03bc3adf1bc2943510f (patch)
tree78644d2a781b7616e0bddf5deaea7a146fc257b3 /sbin/ldconfig
parent64a49cb518c9c8d2515f5cb42d5361d327bfeb17 (diff)
downloadFreeBSD-src-0cd8c74ee0e434aa440be03bc3adf1bc2943510f.zip
FreeBSD-src-0cd8c74ee0e434aa440be03bc3adf1bc2943510f.tar.gz
Make ldconfig and ld.so not hashing the shared lib minor number. This
misfeature caused troubles when a program attempted to access a shlib where one with a higher minor number has been hashed. Ldconfig does only include the highest-numbered shlib anyway, so this is in no way a limitation of generality. Caution: after installing the new programs, your /var/run/ld.so.hints needs to be rebuiult; run ldconfig again as it's done from /etc/rc.
Diffstat (limited to 'sbin/ldconfig')
-rw-r--r--sbin/ldconfig/ldconfig.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c
index 74f7f15..d778355 100644
--- a/sbin/ldconfig/ldconfig.c
+++ b/sbin/ldconfig/ldconfig.c
@@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: ldconfig.c,v 1.7 1994/06/15 22:40:56 rich Exp $
+ * $Id: ldconfig.c,v 1.8 1994/12/23 22:31:24 nate Exp $
*/
#include <sys/param.h>
@@ -213,9 +213,9 @@ int dewey[], ndewey;
#endif
int
-hinthash(cp, vmajor, vminor)
+hinthash(cp, vmajor)
char *cp;
-int vmajor, vminor;
+int vmajor;
{
int k = 0;
@@ -223,7 +223,6 @@ int vmajor, vminor;
k = (((k << 1) + (k >> 14)) ^ (*cp++)) & 0x3fff;
k = (((k << 1) + (k >> 14)) ^ (vmajor*257)) & 0x3fff;
- k = (((k << 1) + (k >> 14)) ^ (vminor*167)) & 0x3fff;
return k;
}
@@ -275,7 +274,7 @@ build_hints()
struct hints_bucket *bp;
bp = blist +
- (hinthash(shp->name, shp->major, shp->minor) % hdr.hh_nbucket);
+ (hinthash(shp->name, shp->major) % hdr.hh_nbucket);
if (bp->hi_pathx) {
int i;
@@ -415,7 +414,7 @@ listhints()
i,
strtab + bp->hi_namex, bp->hi_major, bp->hi_minor,
strtab + bp->hi_pathx,
- hinthash(strtab+bp->hi_namex, bp->hi_major, bp->hi_minor)
+ hinthash(strtab+bp->hi_namex, bp->hi_major)
% hdr->hh_nbucket,
bp->hi_next);
}
OpenPOWER on IntegriCloud