From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079058315888.tru64-unix-managers.marc@archive.invalid> From: "Eiler, James A." Date: Thu, 15 Jul 1999 22:34:23 +0000 To: tru64-unix-managers Subject: SUMMARY: Saving the Environment (variables) X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079058315888 ORIGINAL MESSAGE: I'm using the environment variable LD_LIBRARY_PATH to specify where some of my shared object modules reside (.so) for my C and FORTRAN processes. Everything works fine until I "su" to root. Although I've done an export on LD_LIBRARY_PATH, it (and several other environment variables) don't make it when I become root. I believe this "feature" has something to do with security, or is some mechanism to keep me from blowing off my foot. But, I really need LD_LIBRARY_PATH to be set properly. Any ideas? ANSWER(S): I used the following suggestion from Frank Wortner:: You could try rebuilding your C and FORTRAN shared objects (".so") files and specifying the "-soname" option. When you link your executable, the full pathname for the ".so" file will be recorded in the executable, and you won't need to set LD_LIBRARY_PATH at all. ld -shared -soname /some/path/name.so obj.o -o name.so BTW, you're right: ignoring and/or not propagating LD_LIBRARY_PATH through su is a security feature. Thanks also to: Dale Inman Piotr Bienias Alethia Dunn