]>
git.ipfire.org Git - pakfire.git/blob - tools/quality-agent.d/002-bad-symlinks
3 . $
(dirname ${0})/qa-include
5 # Check for absolute symlinks.
6 # We do not allow them because they may point to any bad location.
8 log_debug
"Search for absolute symlinks"
14 for link
in $
(find ${BUILDROOT} -type l
); do
15 if fgrep
-q "/lib/udev/devices" <<<${link}; then
19 if listmatch
"${link:${#BUILDROOT}}" ${QUALITY_AGENT_WHITELIST_SYMLINK}; then
20 log INFO "Symlink
${link} is on the whitelist.
"
24 destination=$(readlink ${link})
25 if [ "${destination:0:1}" = "/" ]; then
26 log ERROR " Absolute symlink
: ${link}"
29 if [ ! -e "${link%/*}/${destination}" ]; then
30 log ERROR " Not existant destination
: ${link} -> ${destination}"