diff options
author | 2020-10-27 17:42:05 +0000 | |
---|---|---|
committer | 2020-10-27 17:42:05 +0000 | |
commit | 28b81e73023bd424edec6b3b0bafd0a7ecf35540 (patch) | |
tree | 0afa5a510d9c1d9c50d1f19f3fe836aebdfef92d /usr.sbin/syspatch/syspatch.sh | |
parent | Adjust manpage to uint32_t->int32_t change. (diff) | |
download | wireguard-openbsd-28b81e73023bd424edec6b3b0bafd0a7ecf35540.tar.xz wireguard-openbsd-28b81e73023bd424edec6b3b0bafd0a7ecf35540.zip |
Check that SHA256.sig has at least three lines
If there are fewer than three syspatches, this utility currently won't
see them due to a small thinko from r1.164 that checks whether SHA256
has at least three lines (two lines signature + 1 line with a syspatch)
instead of doing the same on SHA256.sig. Adjust the check so it works
as intended with no need for brilliantly ugly workarounds from robert.
found by tj
ok ajacoutot
Diffstat (limited to 'usr.sbin/syspatch/syspatch.sh')
-rw-r--r-- | usr.sbin/syspatch/syspatch.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/syspatch/syspatch.sh b/usr.sbin/syspatch/syspatch.sh index d5c7d799eb3..57247f40969 100644 --- a/usr.sbin/syspatch/syspatch.sh +++ b/usr.sbin/syspatch/syspatch.sh @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: syspatch.sh,v 1.165 2020/10/08 14:26:34 kn Exp $ +# $OpenBSD: syspatch.sh,v 1.166 2020/10/27 17:42:05 tb Exp $ # # Copyright (c) 2016, 2017 Antoine Jacoutot <ajacoutot@openbsd.org> # @@ -173,7 +173,7 @@ ls_missing() /etc/signify/openbsd-${_OSrev}-syspatch.pub >/dev/null # sig file less than 3 lines long doesn't list any patch (new release) - (($(grep -c ".*" ${_sha}) < 3)) && return + (($(grep -c ".*" ${_sha}.sig) < 3)) && return set -o pipefail grep -Eo "syspatch${_OSrev}-[[:digit:]]{3}_[[:alnum:]_-]+" ${_sha} | |