}
install_qa_check() {
+ local f
+
cd "${D}" || die "cd failed"
export STRIP_MASK
ecompress --dequeue
# Now we look for all world writable files.
+ local i
for i in $(find "${D}/" -type f -perm -2); do
vecho -ne '\a'
vecho "QA Security Notice:"
if type -P scanelf > /dev/null && ! hasq binchecks ${RESTRICT}; then
local qa_var insecure_rpath=0 tmp_quiet=${PORTAGE_QUIET}
- local f x
+ local x
# display warnings when using stricter because we die afterwards
if has stricter ${FEATURES} ; then
fi
# Sanity check syntax errors in init.d scripts
+ local d
for d in /etc/conf.d /etc/init.d ; do
[[ -d ${D}/${d} ]] || continue
for i in "${D}"/${d}/* ; do
# this should help to ensure that all (most?) shared libraries are executable
# and that all libtool scripts / static libraries are not executable
+ local j
for i in "${D}"opt/*/lib{,32,64} \
"${D}"lib{,32,64} \
"${D}"usr/lib{,32,64} \
# the static library, or gcc will utilize the static lib when linking :(.
# http://bugs.gentoo.org/4411
abort="no"
+ local a s
for a in "${D}"usr/lib*/*.a ; do
s=${a%.a}.so
if [[ ! -e ${s} ]] ; then
[[ -x /usr/bin/file && -x /usr/bin/find ]] && \
[[ -n ${MULTILIB_STRICT_DIRS} && -n ${MULTILIB_STRICT_DENY} ]]
then
- local abort=no firstrun=yes
+ local abort=no dir file firstrun=yes
MULTILIB_STRICT_EXEMPT=$(echo ${MULTILIB_STRICT_EXEMPT} | sed -e 's:\([(|)]\):\\\1:g')
for dir in ${MULTILIB_STRICT_DIRS} ; do
[[ -d ${D}/${dir} ]] || continue
# we don't want globbing for initial expansion, but afterwards, we do
local shopts=$-
set -o noglob
+ local no_inst
for no_inst in ${install_mask}; do
set +o noglob
quiet_mode || einfo "Removing ${no_inst}"
cd "${T}"
# remove man pages, info pages, docs if requested
+ local f
for f in man info doc; do
if hasq no${f} $FEATURES; then
INSTALL_MASK="${INSTALL_MASK} /usr/share/${f}"
fi
# total suid control.
if hasq suidctl $FEATURES; then
- local sfconf
+ local i sfconf x
sfconf=${PORTAGE_CONFIGROOT}etc/portage/suidctl.conf
# sandbox prevents us from writing directly
# to files outside of the sandbox, but this
for x in ${MISC_FUNCTIONS_ARGS}; do
${x}
done
+ unset x
fi
[ -n "${EBUILD_EXIT_STATUS_FILE}" ] && \