]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
build-essentials: Add whitelisting for symlinks.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 22 Mar 2011 13:46:21 +0000 (14:46 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 22 Mar 2011 13:46:21 +0000 (14:46 +0100)
pkgs/build-essentials/build-essentials.nm
pkgs/build-essentials/buildsystem/Constants
pkgs/build-essentials/quality-agent/quality-agent.d/002-bad-symlinks

index 6df021578188b718c05861e174f00bcfd833cba9..6509f73cb73ffaf0631f9898bf79aeda4e0642b8 100644 (file)
@@ -26,7 +26,7 @@ include $(PKGROOT)/Include
 
 PKG_NAME       = build-essentials
 PKG_VER        = $(DISTRO_VERSION)
-PKG_REL        = 12
+PKG_REL        = 13
 PKG_EPOCH      = 1
 PKG_ARCH       = noarch
 
index dda11953b9c5e2367de26899c3a851fb55c3fd2b..0bc56c112686d336e9dab0e40156e9251de0f27c 100644 (file)
@@ -157,3 +157,4 @@ export QUALITY_AGENT_WHITELIST_EXECSTACK
 export QUALITY_AGENT_WHITELIST_NX
 export QUALITY_AGENT_WHITELIST_RPATH
 export QUALITY_AGENT_WHITELIST_SONAME
+export QUALITY_AGENT_WHITELIST_SYMLINK
index 595a7c5b6b2cb790750eccb441f41ff4b355da0b..27e85583c035231ea298a91b095212aab011d865 100755 (executable)
@@ -9,12 +9,18 @@ log_debug "Search for absolute symlinks"
 
 function check() {
        local failed=0
+       local item
 
        for link in $(find ${BUILDROOT} -type l); do
                if fgrep -q "/lib/udev/devices" <<<${link}; then
                        continue
                fi
 
+               if listmatch "${link:${#BUILDROOT}}" ${QUALITY_AGENT_WHITELIST_SYMLINK}; then
+                       log INFO "Symlink ${link} is on the whitelist."
+                       continue
+               fi
+
                destination=$(readlink ${link})
                if [ "${destination:0:1}" = "/" ]; then
                        log ERROR "  Absolute symlink: ${link}"