svn commit: r211141 - head/etc/periodic/security

Gabor Kovesdan gabor at FreeBSD.org
Tue Aug 10 11:15:18 UTC 2010


Author: gabor
Date: Tue Aug 10 11:15:17 2010
New Revision: 211141
URL: http://svn.freebsd.org/changeset/base/211141

Log:
  - Fixes to the chkportsum script to handle better some special cases,
    like spaces in filename
  
  Submitted by:	Alex Kozlov <spam at rm-rf.kiev.ua>
  Approved by:	delphij (mentor)

Modified:
  head/etc/periodic/security/460.chkportsum

Modified: head/etc/periodic/security/460.chkportsum
==============================================================================
--- head/etc/periodic/security/460.chkportsum	Tue Aug 10 11:02:55 2010	(r211140)
+++ head/etc/periodic/security/460.chkportsum	Tue Aug 10 11:15:17 2010	(r211141)
@@ -42,20 +42,20 @@ echo 'Checking for ports with mismatched
 
 case "${daily_status_security_chkportsum_enable}" in
 	[Yy][Ee][Ss])
+	set -f
 	pkg_info -ga 2>/dev/null | \
-	while read one two three; do
-		case ${one} in
+	while IFS= read -r line; do
+		set -- $line
+		case $1 in
 			Information)
-			case ${two} in
-				  for) name=${three%%:} ;;
-					*) name='??' ;;
+			case $2 in
+				for) name="${3%%:}" ;;
+				*) name='??' ;;
 			esac
 			;;
 			Mismatched|'') ;;
-			*)
-			if [ -n ${name} ]; then
-				echo ${name}: ${one}
-			fi
+			*) [ -n "${name}" ] &&
+				echo "${name}: ${line%% fails the original MD5 checksum}"
 			;;
 		esac
 	done


More information about the svn-src-head mailing list