From: fuzzyray Date: Mon, 21 Jul 2008 19:00:07 +0000 (-0000) Subject: Add second permission check to setup_tmpdir function X-Git-Tag: gentoolkit-0.2.4.3~13 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=90abb3591deceb8bd789a3d6bab945ea2b3b945e;p=gentoolkit.git Add second permission check to setup_tmpdir function svn path=/; revision=500 --- diff --git a/trunk/src/revdep-rebuild/revdep-rebuild b/trunk/src/revdep-rebuild/revdep-rebuild index bae694a..097dd23 100755 --- a/trunk/src/revdep-rebuild/revdep-rebuild +++ b/trunk/src/revdep-rebuild/revdep-rebuild @@ -512,6 +512,13 @@ setup_tmpdir() { else die 1 "Unable to find or create a satisfactory location for temporary files" fi + # HACK: I hate using find this way + # Double check the permissions one last time to be paranoid + if [[ $(find "$1" -type d ! \( -user $2 -group portage -perm -0700 \) ) ]]; then + eerror "Incorrect permissions on $1" + eerror "or at least one file in $1." + die 1 "Please make sure it's not a symlink and then remove it." + fi [[ $VERBOSE ]] && einfo "Temporary cache files are located in $PWD" setup_rm }