--- ebuild.sh 2006-03-04 23:23:45.000000000 -0500 +++ ebuild.sh 2006-03-04 23:38:46.000000000 -0500 @@ -1054,7 +1054,31 @@ echo " http://bugs.gentoo.org/81745" echo "${f}" echo -ne '\a\n' - die "Insecure binaries detected" + if hasq fixrpaths ${FEATURES} && type -p chrpath > /dev/null; then + # Try to intelegently fix these files. + # Unfortunately, scanelf is no use, and chrpath is the + # better tool for the job. + xrpath=''; + for x in ${f}; do + if [ -f "${x}" ]; then + # Assume xrpath is assigned and done. + echo chrpath -r "${xrpath}" "${x}" + else + # Fix xrpath + xrpath='' + for y in ${x//:/ } ; do + if [ -n "${y}" -a "${y}" != "${BUILDDIR}" ] ; then + xrpath="${xrpath}:${y}" + fi + done + + # Remove front colon + xrpath=${xrpath/#:/} + fi + done + else + die "Insecure binaries detected" + fi fi # Check for setid binaries but are not built with BIND_NOW