diff options
author | 2009-10-09 06:38:40 +0000 | |
---|---|---|
committer | 2009-10-09 06:38:40 +0000 | |
commit | 46cc826a8343895050b90ae957166eeb9c85dce7 (patch) | |
tree | 4e4c9c1c3185bf7eaf898bd20e4e8860a4230c08 /modules/profile.eselect | |
parent | Update version to 1.2.4. (diff) | |
download | eselect-46cc826a8343895050b90ae957166eeb9c85dce7.tar.gz eselect-46cc826a8343895050b90ae957166eeb9c85dce7.tar.bz2 eselect-46cc826a8343895050b90ae957166eeb9c85dce7.zip |
Output a warning message if the target of the symlink is outside of EROOT.eselect-1.2.4
svn path=/trunk/; revision=689
Diffstat (limited to 'modules/profile.eselect')
-rw-r--r-- | modules/profile.eselect | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/profile.eselect b/modules/profile.eselect index cef26f3..11e90d2 100644 --- a/modules/profile.eselect +++ b/modules/profile.eselect @@ -69,6 +69,12 @@ set_symlink() { ln -s "$(relative_name \ "${ROOT}${portdir}" "${EROOT}/etc")/profiles/${target}" \ "${EROOT}/etc/make.profile" + # check if the resulting symlink is sane + if [[ $(canonicalise "${EROOT}/etc/make.profile") \ + != "$(canonicalise "${EROOT}")"/* ]]; then + write_warning_msg \ + "Strange path. Check ${EROOT}/etc/make.profile symlink" + fi else die -q "Target \"${1}\" doesn't appear to be valid!" fi |