aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-10-20 19:19:28 -0700
committerZac Medico <zmedico@gentoo.org>2011-10-20 19:19:28 -0700
commit44a03c9f2218ae7cfdc03aae495d255e0ca2e5b1 (patch)
tree784a6373f829bbfe36acf1fe25bf55c507c574d0
parentUpdateChangeLog: handle edge cases (diff)
downloadportage-44a03c9f2218ae7cfdc03aae495d255e0ca2e5b1.tar.gz
portage-44a03c9f2218ae7cfdc03aae495d255e0ca2e5b1.tar.bz2
portage-44a03c9f2218ae7cfdc03aae495d255e0ca2e5b1.zip
misc-functions.sh: condense world-writable output
-rwxr-xr-xbin/misc-functions.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 0d2d20689..55d966344 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -144,7 +144,7 @@ prepcompress() {
}
install_qa_check() {
- local f x
+ local f i x
cd "${D}" || die "cd failed"
@@ -166,14 +166,14 @@ install_qa_check() {
fi
# Now we look for all world writable files.
- local i=
- for i in $(find "${D}/" -type f -perm -2); do
- vecho "QA Security Notice:"
- vecho "- ${i:${#D}:${#i}} will be a world writable file."
+ local unsafe_files=$(find "${D}" -type f -perm -2 | sed -e "s:^${D}:- :")
+ if [[ -n ${unsafe_files} ]] ; then
+ vecho "QA Security Notice: world writable file(s):"
+ vecho "${unsafe_files}"
vecho "- This may or may not be a security problem, most of the time it is one."
vecho "- Please double check that $PF really needs a world writeable bit and file bugs accordingly."
- done
- [[ -n ${i} ]] && sleep 1
+ sleep 1
+ fi
if type -P scanelf > /dev/null && ! has binchecks ${RESTRICT}; then
local qa_var insecure_rpath=0 tmp_quiet=${PORTAGE_QUIET}