LINK="#3366FF" VLINK="#A000A0">

"The Linux Gazette...making Linux just a little more fun!"


(?) The Answer Guy (!)


By James T. Dennis, tag@lists.linuxgazette.net
LinuxCare, http://www.linuxcare.com/


(?) Multiple Concurrently Installed Version of glibc

From Young, Geoffrey S. on Tue, 12 Oct 1999

Hello -

I am currently using RedHat 5.2, but would like to upgrade to the Perl rpm provided with RH6.0. When I test the rpm dependencies, the newer perl requires glibc 2.1. Ordinarily, I would just upgrade glibc while I'm at it, except that I am running an application that is not compatible with glibc 2.1 (it was specifically developed for RH5.2, which uses glibc 2.0.7).

Can I have both versions of glibc on the same system? If so, can I still use the rpm format?

thanks --Geoff

(!) You can have multiple version of any shared libraries under Linux. When they have different version numbers then the dynamic loader (ld.so) will find the one that a given binary is linked against. That's why there are symlinks under /lib pointing from major versions to the most recent minor versions. (Study the links under there to see what I mean).
However, as you say, there can sometimes be problems with this automatic loading mechanism. Sometimes the author of a package needs to specify a a more tight binding to some shared libraries. However, that involves recompiling it.
There is another way. You can use LD_PRELOAD_PATH and/or LD_LIBRARY_PATH environment variable to over-ride the normal library loading mechanism of normal (non-SUID) programs. (The loader over-ride is disabled when EUID doesn't match RUID, as is the case while running SUID programs. If this wasn't true it would be trivially easy to bypase system security with custom libraries and access to any dynamically linked SUID binary).
They way to use the LD_*_PATH variables is to sequester your special libraries in their own directory, and write small wrapper script to set and export the LD_*_PATH environment variable, then execute the necessary program. You do this with each program that needs the special library version.
Read the ld.so man page for more details.


(?) Geoffrey Replies...

From Young, Geoffrey S. on Tue, 12 Oct 1999

thanks for your help. I'll read the ld manpages and play with LD_*_PATH, but I think that the application in question is running SUID.
Anyway, you have given me lots to go on - thanks again
--Geoff


Copyright © 1999, James T. Dennis
Published in The Linux Gazette Issue 48 December 1999
HTML transformation by Heather Stern of Starshine Technical Services, http://www.starshine.org/


[ Answer Guy Current Index ] [ Index of Past Answers ] greetings 1 2 3 5
5 6 7 8 9
10 11 12 13 14 15 16 17 18
19 20 21 22 23 24 25 26 27
28 29 30 31 32 33 34 35 36
37 38 39 40 41 42 43 44 45
46 47 48 49 50 51 52 53 54
55 56 57


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Linux Gazette FAQ ] [ Next Section ]