diff options
| author | fuzzyray <fuzzyray@gentoo.org> | 2008-07-21 19:00:07 +0000 |
|---|---|---|
| committer | fuzzyray <fuzzyray@gentoo.org> | 2008-07-21 19:00:07 +0000 |
| commit | 90abb3591deceb8bd789a3d6bab945ea2b3b945e (patch) | |
| tree | 873ec68071e8bf606bf5a65172280d55e4754739 /trunk | |
| parent | 6b1d31718e4d21c8e6e5962a325102c9f589bccb (diff) | |
| download | gentoolkit-90abb3591deceb8bd789a3d6bab945ea2b3b945e.tar.gz | |
Add second permission check to setup_tmpdir function
svn path=/; revision=500
Diffstat (limited to 'trunk')
| -rwxr-xr-x | trunk/src/revdep-rebuild/revdep-rebuild | 7 |
1 files changed, 7 insertions, 0 deletions
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 } |
