Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Change == to = (bashism) No need to test for empty security_status_pkgaudit_jails_ignore
Dan Langille committed 4 years ago
commit dac1725049f3616cf031f46735a6f69c43e175f3
parent 23a8d1c
1 file changed +11 -13
modified scripts/periodic/410.pkg-audit.in
@@ -42,7 +42,7 @@ fi
: ${security_status_pkgaudit_quiet:=YES}
: ${security_status_pkgaudit_chroots=$pkg_chroots}
: ${security_status_pkgaudit_jails=$pkg_jails}
-
: ${security_status_pkgaudit_jails_ignore=""}
+
: ${security_status_pkgaudit_jails_ignore+=""}
: ${security_status_pkgaudit_expiry:=2}

security_daily_compat_var security_status_pkgaudit_enable
@@ -158,18 +158,16 @@ audit_pkgs_all() {

	for j in $jails ; do
		# ignore some jails
-
		if [ -n "$security_status_pkgaudit_jails_ignore" ]; then
-
			# we iterate to get exact matches because we want substring matches
-
			# foo should not match foo.bar
-
			for ignore in $security_status_pkgaudit_jails_ignore ; do
-
				if [ "${j%|*}" == "$ignore" ]; then
-
					echo
-
					echo "ignoring jail: ${j%|*}"
-
					# continue with the main loop
-
					continue 2
-
				fi
-
			done
-
		fi
+
		# we iterate to get exact matches because we want substring matches
+
		# foo should not match foo.bar
+
		for ignore in $security_status_pkgaudit_jails_ignore ; do
+
			if [ "${j%|*}" = "$ignore" ]; then
+
				echo
+
				echo "ignoring jail: ${j%|*}"
+
				# continue with the main loop
+
				continue 2
+
			fi
+
		done
		echo
		echo "jail: ${j%|*}"
		for t in audit expiration deprecation; do