Security - linker env variables

jb jb.1234abcd at gmail.com
Sun Jul 22 07:27:39 UTC 2012


jb <jb.1234abcd <at> gmail.com> writes:

> ... 
> Search results (do it yourself):
> $ grep -r LD_RUN_PATH /usr/ports/

This is an output of search done on a fresh copy of /usr/ports/ :

/usr/ports/devel/kdevelop/files/patch-appwizard-libtool: 	runpath_var=LD_RUN_PATH
...
/usr/ports/games/xflame/files/patch-aa:! LD_RUN_PATH +=
/usr/ports/games/xflame/files/patch-aa:! 	export LD_RUN_PATH
/usr/ports/games/xflame/files/patch-aa:! #LD_RUN_PATH +=
/usr/ports/games/xflame/files/patch-aa:! #	export LD_RUN_PATH
/usr/ports/japanese/FreeWnn-lib/files/patch-aclocal.m4:
runpath_var=LD_RUN_PATH
...
/usr/ports/japanese/FreeWnn-lib/files/patch-configure:+    
runpath_var=LD_RUN_PATH
...
/usr/ports/japanese/FreeWnn-server/files/patch-aclocal.m4:      
runpath_var=LD_RUN_PATH
...
/usr/ports/japanese/FreeWnn-server/files/patch-configure:      
runpath_var=LD_RUN_PATH
...
/usr/ports/japanese/xjtext/files/patch-aa:+	LD_RUN_PATH=${LOCALBASE}/lib/ 
${CC} ${OBJS} ${LIBDIRS} ${LIBS} ${IMLIBS}\
...
/usr/ports/lang/moscow_ml/Makefile:		LD_RUN_PATH="${PREFIX}/lib
/mosml"
/usr/ports/lang/moscow_ml/files/pkg-message.in:Note that this port is build
with LD_RUN_PATH=%%PREFIX%%/lib/mosml,
...
/usr/ports/math/wingz3/files/Wingz3:# and the ${WINGZ3}/bin/wzenv (yes, it
does set the LD_RUN_PATH,
/usr/ports/math/wingz3/files/Wingz3:LD_RUN_PATH=$WINGZ3
/lib/$WZPLATFORM:$LD_RUN_PATH
...
/usr/ports/print/ghostscript7/files/patch-src:unix-gcc.mak: # XLIBDIRS is for
ld and should include -L; XLIBDIR is for LD_RUN_PATH
/usr/ports/print/ghostscript8/files/patch-base-unix-gcc.mak: # XLIBDIRS is for
ld and should include -L; XLIBDIR is for LD_RUN_PATH
/usr/ports/print/ghostscript9/files/patch-base-unix-gcc.mak: # XLIBDIRS is for
ld and should include -L; XLIBDIR is for LD_RUN_PATH
...
/usr/ports/x11-toolkits/blt/files/patch-src-shared-Makefile.in:+SHLIB_LD_FLAGS
= @SHLIB_LD_FLAGS@ @LD_RUN_PATH@ @LIB_SPECS@
$

NOTE that individual port sources (downloaded distfiles) will include
LD_RUN_PATH as well, for example:

# grep -r LD_RUN_PATH /usr/ports/irc/xchat/work/xchat-2.8.8/
/usr/ports/irc/xchat/work/xchat-2.8.8/configure:    runpath_var=LD_RUN_PATH
...
/usr/ports/irc/xchat/work/xchat-2.8.8/aclocal.m4:                      dnl We
cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
/usr/ports/irc/xchat/work/xchat-2.8.8/aclocal.m4:      runpath_var=LD_RUN_PATH
...
/usr/ports/irc/xchat/work/xchat-2.8.8/configure.orig:    runpath_var=
LD_RUN_PATH
...
/usr/ports/irc/xchat/work/xchat-2.8.8/configure.bak:    runpath_var=LD_RUN_PATH
...
/usr/ports/irc/xchat/work/xchat-
2.8.8/config.status:variables_saved_for_relink='PATH
LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH'
/usr/ports/irc/xchat/work/xchat-2.8.8/config.status:runpath_var='LD_RUN_PATH'
/usr/ports/irc/xchat/work/xchat-2.8.8/libtool:variables_saved_for_relink="PATH
LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
/usr/ports/irc/xchat/work/xchat-2.8.8/libtool:runpath_var=LD_RUN_PATH
# 

jb




More information about the freebsd-questions mailing list