diff --git a/fix-shift-count-out-of-range.patch b/fix-shift-count-out-of-range.patch new file mode 100644 index 0000000000000000000000000000000000000000..8364711784f868333f72791de0362b024bcec4e2 --- /dev/null +++ b/fix-shift-count-out-of-range.patch @@ -0,0 +1,27 @@ +From b6e379ceb25e0b0eb852960a2fe9dcb95f85cff9 Mon Sep 17 00:00:00 2001 +From: caodongxia <315816521@qq.com> +Date: Tue, 17 Aug 2021 09:34:25 +0800 +Subject: [PATCH] fix shift count out of range + +--- + programs/auto/auto.in | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/programs/auto/auto.in b/programs/auto/auto.in +index e69bf19..4111b53 100755 +--- a/programs/auto/auto.in ++++ b/programs/auto/auto.in +@@ -113,7 +113,9 @@ do + break + ;; + esac +- shift ++ if [ $# -gt 0 ]; then ++ shift ++ fi + done + + names= +-- +2.27.0 + diff --git a/libreswan.spec b/libreswan.spec index e8ff7fae39647c3a57519537f1f38b3609666a7c..a982c3cbd124c87950d361ee055eaae6108491ff 100644 --- a/libreswan.spec +++ b/libreswan.spec @@ -26,7 +26,7 @@ Name: libreswan Summary: IKE implementation for IPsec with IKEv1 and IKEv2 support Version: 4.1 -Release: 2 +Release: 3 License: GPLv2 Url: https://libreswan.org/ Source0: https://download.libreswan.org/%{name}-%{version}.tar.gz @@ -36,6 +36,7 @@ Source3: https://download.libreswan.org/cavs/ikev2.fax.bz2 Source4: openeuler-libreswan-sysctl.conf Patch0: fix-algparse-unknown-option-d.patch +Patch1: fix-shift-count-out-of-range.patch BuildRequires: audit-libs-devel BuildRequires: bison @@ -95,6 +96,7 @@ Man pages and other related help documents for libreswan. %prep %setup -q -n libreswan-%{version}%{?prever} %patch0 -p1 +%patch1 -p1 sed -i "s/-lfreebl //" mk/config.mk @@ -189,6 +191,9 @@ certutil -N -d sql:$tmpdir --empty-password %attr(0644,root,root) %doc %{_mandir}/*/* %changelog +* Tue Aug 17 2021 caodongxia - 4.1-3 +- Fix shift count out of range + * Wed Aug 11 2021 caodongxia - 4.1-2 - Fix algparse unknown option -d