portaudit is being stubborn

Thomas Hurst tom.hurst at clara.net
Sat May 21 12:24:06 PDT 2005


* Tony Shadwick (tshadwick at goinet.com) wrote:

> I'd like to see it done, but I know just enough sh scripting to be 
> dangerous. ;)
> 
> If it were perl I'd be all over it.   Any takers? :)

Well, the relevent bit is actually written in awk :)

The attached patch seems to do the trick.  Note portaudit_fixed is a
regular expression, so if you want to list multiple entries, seperate
them with |

-- 
Thomas 'Freaky' Hurst
    http://hur.st/
-------------- next part --------------
--- portaudit.old	Mon Sep  6 20:18:55 2004
+++ portaudit	Sat May 21 20:18:21 2005
@@ -136,8 +136,8 @@
 		BEGIN { vul=0; fixedre="'"$fixedre"'" }
 		/^(#|\$)/ { next }
 		$2 !~ /'"$opt_restrict"'/ { next }
+		{ if (fixedre && $2 ~ fixedre) next }
 		$1 ~ /^FreeBSD[<=>!]/ {
-			if (fixedre && $2 ~ fixedre) next
 			if (!system("'"$pkg_version"' -T \"FreeBSD-'"$osversion"'\" \"" $1 "\"")) {
 				print_affected("FreeBSD-'"$osversion"'", \
 					"To disable this check add the uuid to \`portaudit_fixed'"'"' in /usr/local/etc/portaudit.conf")


More information about the freebsd-questions mailing list