diff --git a/iptables-apply-Use-mktemp-instead-of-tempfile.patch b/iptables-apply-Use-mktemp-instead-of-tempfile.patch index d9b36b8f3fd329d82687f5333505b48973c8e687..d44df53d784d4ef05afc85ea705a90a5f29b3f0d 100644 --- a/iptables-apply-Use-mktemp-instead-of-tempfile.patch +++ b/iptables-apply-Use-mktemp-instead-of-tempfile.patch @@ -1,34 +1,33 @@ -0d0a2c9c269dc5ed9e7d841b8ecb9dc060af Mon Sep 17 00:00:00 2001 +From 6c3a1a5c29a7c41af9da1a3bbf137df994479518 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 12 Apr 2019 18:02:19 +0200 Subject: [PATCH] iptables-apply: Use mktemp instead of tempfile -Signed-off-by: Phil Sutter --- - iptables/iptables-apply | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + iptables-apply | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/iptables-apply b/iptables-apply +index 819ca4a..a685b6b 100755 +--- a/iptables/iptables-apply ++++ b/iptables/iptables-apply +@@ -111,7 +111,7 @@ if [[ ! -r "$FILE" ]]; then + exit 2 + fi - diff --git a/iptables/iptables-apply b/iptables/iptables-apply - index 819ca4a459c42..a685b6bbcd7dc 100755 - --- a/iptables/iptables-apply - +++ b/iptables/iptables-apply - @@ -111,7 +111,7 @@ if [[ ! -r "$FILE" ]]; then - exit 2 -fi - -COMMANDS=(tempfile "$SAVE" "$RESTORE") +COMMANDS=(mktemp "$SAVE" "$RESTORE") - + for cmd in "${COMMANDS[@]}"; do - if ! command -v $cmd >/dev/null; then + if ! command -v $cmd >/dev/null; then @@ -122,7 +122,7 @@ done - + umask 0700 - + -TMPFILE=$(tempfile -p iptap) +TMPFILE=$(mktemp) trap "rm -f $TMPFILE" EXIT HUP INT QUIT ILL TRAP ABRT BUS \ - FPE USR1 SEGV USR2 PIPE ALRM TERM - + FPE USR1 SEGV USR2 PIPE ALRM TERM + -- -2.21.0 +1.8.3.1 diff --git a/iptables.spec b/iptables.spec index b98935bb0389197f5657983a32f574b6870b4f96..f1c863e37f5a83671a7ec4e486906caa82ff4f6c 100644 --- a/iptables.spec +++ b/iptables.spec @@ -2,7 +2,7 @@ %global legacy_actions %{_libexecdir}/initscripts/legacy-actions Name: iptables Version: 1.8.1 -Release: 1 +Release: 2 Summary: IP packet filter administration utilities License: GPLv2 and Artistic Licence 2.0 and ISC URL: https://www.netfilter.org/ @@ -248,6 +248,9 @@ fi %{_mandir}/* %changelog +* Sun Jan 12 2020 openEuler Buildteam - 1.8.1-2 +- optimization the patch + * Fri Jan 10 2020 openEuler Buildteam - 1.8.1-1 - Package update