fix ebtables-config file access permisson and fix ebt_print_error for prints null
This commit is contained in:
parent
9501959f1a
commit
f2789c2a09
60
bugfix-Fix-ebt_print_error-for-prints-null.patch
Normal file
60
bugfix-Fix-ebt_print_error-for-prints-null.patch
Normal file
@ -0,0 +1,60 @@
|
||||
From c8fdd609e905bb2c472758ef6e324cbb43958b9d Mon Sep 17 00:00:00 2001
|
||||
From: sunsuwan <sunsuwan3@huawei.com>
|
||||
Date: Tue, 14 Jun 2022 09:45:56 +0800
|
||||
Subject: [PATCH] fix ebt_print_error for prints null
|
||||
|
||||
---
|
||||
ebtablesd.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/ebtablesd.c b/ebtablesd.c
|
||||
index 02d51fa..930fc66 100644
|
||||
--- a/ebtablesd.c
|
||||
+++ b/ebtablesd.c
|
||||
@@ -194,7 +194,7 @@ continue_read:
|
||||
}
|
||||
if (!(replace[i].flags & OPT_KERNELDATA)) {
|
||||
ebt_print_error("ebtablesd: table %s has not "
|
||||
- "been opened");
|
||||
+ "been opened", argv[2]);
|
||||
goto write_msg;
|
||||
}
|
||||
ebt_cleanup_replace(&replace[i]);
|
||||
@@ -219,7 +219,7 @@ continue_read:
|
||||
if (replace[i].flags & OPT_KERNELDATA) {
|
||||
ebt_print_error("ebtablesd: table %s needs to "
|
||||
"be freed before it can be "
|
||||
- "opened");
|
||||
+ "opened", argv[2]);
|
||||
goto write_msg;
|
||||
}
|
||||
if (!ebt_get_kernel_table(&replace[i], 0)) {
|
||||
@@ -248,7 +248,7 @@ continue_read:
|
||||
if (replace[i].flags & OPT_KERNELDATA) {
|
||||
ebt_print_error("ebtablesd: table %s needs to "
|
||||
"be freed before it can be "
|
||||
- "opened");
|
||||
+ "opened", argv[2]);
|
||||
goto write_msg;
|
||||
}
|
||||
tmp.filename = (char *)malloc(strlen(argv[3]) + 1);
|
||||
@@ -296,7 +296,7 @@ continue_read:
|
||||
}
|
||||
if (!(replace[i].flags & OPT_KERNELDATA)) {
|
||||
ebt_print_error("ebtablesd: table %s has not "
|
||||
- "been opened");
|
||||
+ "been opened", argv[2]);
|
||||
goto write_msg;
|
||||
}
|
||||
/* The counters from the kernel are useless if we
|
||||
@@ -324,7 +324,7 @@ continue_read:
|
||||
}
|
||||
if (!(replace[i].flags & OPT_KERNELDATA)) {
|
||||
ebt_print_error("ebtablesd: table %s has not "
|
||||
- "been opened");
|
||||
+ "been opened", argv[2]);
|
||||
goto write_msg;
|
||||
}
|
||||
replace[i].filename = (char *)malloc(strlen(argv[3]) + 1);
|
||||
--
|
||||
2.33.0
|
||||
@ -1,7 +1,7 @@
|
||||
|
||||
Name: ebtables
|
||||
Version: 2.0.11
|
||||
Release: 4
|
||||
Release: 5
|
||||
Summary: A filtering tool for a Linux-based bridging firewall
|
||||
License: GPLv2+
|
||||
URL: http://ebtables.sourceforge.net/
|
||||
@ -11,7 +11,7 @@ Source3: ebtables.service
|
||||
Source4: ebtables-config
|
||||
|
||||
Patch0001: bugifx-Fix-string-case-option-can-not-work.patch
|
||||
|
||||
Patch0002: bugfix-Fix-ebt_print_error-for-prints-null.patch
|
||||
|
||||
BuildRequires: systemd libtool
|
||||
BuildRequires: chrpath
|
||||
@ -40,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 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/ebtables-config
|
||||
install -p -D -m 600 %{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}"
|
||||
@ -101,6 +101,13 @@ fi
|
||||
%doc %{_mandir}/man8/ebtables-legacy.8*
|
||||
|
||||
%changelog
|
||||
* Mon Jul 04 2022 gaihuiying <eaglegai@163.com> - 2.0.11-5
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:fix ebtables-config file access permisson
|
||||
fix ebt_print_error for prints null
|
||||
|
||||
* Thu Mar 24 2022 wangxiaopeng <wangxiaopeng7@huawei.com> - 2.0.11-4
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user