fix string-icase can not work

This commit is contained in:
wangxp006 2022-03-12 15:14:42 +08:00
parent b3b7b8e588
commit 8add2e8be3
2 changed files with 49 additions and 6 deletions

View File

@ -0,0 +1,25 @@
From 94f826661478949e7e4fff0726ffb99df1462eaf Mon Sep 17 00:00:00 2001
From: wangxp006 <wangxp006@163.com>
Date: Wed, 9 Mar 2022 16:00:38 +0800
Subject: [PATCH] Fix string-case option can not work
---
extensions/ebt_string.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/extensions/ebt_string.c b/extensions/ebt_string.c
index 97fbe19..74a1bfa 100644
--- a/extensions/ebt_string.c
+++ b/extensions/ebt_string.c
@@ -174,8 +174,6 @@ static int parse(int c, char **argv, int argc, const struct ebt_u_entry *entry,
break;
case STRING_ICASE:
ebt_check_option2(flags, OPT_STRING_ICASE);
- if (ebt_check_inverse2(optarg))
- ebt_print_error2("Unexpected `!' after --string-icase");
info->u.v1.flags |= XT_STRING_FLAG_IGNORECASE;
break;
case STRING:
--
2.32.0

View File

@ -1,7 +1,7 @@
Name: ebtables
Version: 2.0.11
Release: 2
Release: 3
Summary: A filtering tool for a Linux-based bridging firewall
License: GPLv2+
URL: http://ebtables.sourceforge.net/
@ -10,8 +10,11 @@ Source2: ebtables.systemd
Source3: ebtables.service
Source4: ebtables-config
Patch0001: bugifx-Fix-string-case-option-can-not-work.patch
BuildRequires: systemd libtool
BuildRequires: chrpath
Requires: systemd %{_sbindir}/update-alternatives
Conflicts: setup < 2.10.4-1
@ -26,7 +29,7 @@ Summary: help documents for ebtables
Help package contains some doc and man help files for ebtables.
%prep
%autosetup -n %{name}-%{version}
%autosetup -n %{name}-%{version} -p1
f=THANKS; iconv -f iso-8859-1 -t utf-8 $f -o $f.utf8 ; mv $f.utf8 $f
%build
@ -37,7 +40,7 @@ f=THANKS; iconv -f iso-8859-1 -t utf-8 $f -o $f.utf8 ; mv $f.utf8 $f
%install
install -d %{buildroot}{%{_initrddir},%{_unitdir},%{_libexecdir},%{_sysconfdir}/sysconfig}
install -p %{SOURCE3} %{buildroot}%{_unitdir}/
install -p -D -m 600 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/ebtables-config
install -p %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/ebtables-config
chmod -x %{buildroot}%{_unitdir}/*.service
install -m0755 %{SOURCE2} %{buildroot}%{_libexecdir}/ebtables
%make_install LIBDIR="/%{_lib}/ebtables" BINDIR="%{_sbindir}" MANDIR="%{_mandir}"
@ -46,6 +49,14 @@ touch %{buildroot}%{_sysconfdir}/sysconfig/{ebtables.nat,ebtables.filter,ebtable
mv %{buildroot}/%{_lib}/ebtables/libebtc.so %{buildroot}/%{_lib}/
# remove rpath or runpath
chrpath -d %{buildroot}%{_sbindir}/ebtablesd
chrpath -d %{buildroot}%{_sbindir}/ebtables-legacy
chrpath -d %{buildroot}%{_sbindir}/ebtables-legacy-restore
mkdir -p %{buildroot}/etc/ld.so.conf.d
echo "%{_libdir}/ebtables" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%post
%systemd_post ebtables.service
%?ldconfig
@ -82,6 +93,7 @@ fi
%exclude %{_initrddir}
%exclude %{_sysconfdir}/ethertypes
%config(noreplace) %{_sysconfdir}/sysconfig/ebtables-config
%config(noreplace) /etc/ld.so.conf.d/*
%ghost %{_sbindir}/ebtables
%ghost %{_sbindir}/ebtables-restore
%ghost %{_sbindir}/ebtables-save
@ -92,13 +104,19 @@ fi
%doc %{_mandir}/man8/ebtables-legacy.8*
%changelog
* Tue Dec 08 2020 quanhongfei <quanhongfei@huawei.com> - 2.0.11-2
* Tue Mar 09 2023 wangxiaopeng <wangxiaopeng7@huawei.com> - 2.0.11-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix ebtables-config file access permission
- DESC:fix string-icase can not work
* Tue Aug 25 2020 gaihuiying <gaihuiying1@huawei.com> - 2.0.11-1
* Tue Sep 07 2021 gaihuiying <gaihuiying1@huawei.com> - 2.0.11-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:remove runpath of ebtables
* Mon Jul 27 2020 openEuler Buildteam <buildteam@huawei.com> - 2.0.11-1
- Type:enhancement
- ID:NA
- SUG:NA