36 lines
938 B
Diff
36 lines
938 B
Diff
|
From 1dba0d0a2c9c269dc5ed9e7d841b8ecb9dc060af Mon Sep 17 00:00:00 2001
|
||
|
From: Phil Sutter <psutter@redhat.com>
|
||
|
Date: Fri, 12 Apr 2019 18:02:19 +0200
|
||
|
Subject: [PATCH] iptables-apply: Use mktemp instead of tempfile
|
||
|
|
||
|
Signed-off-by: Phil Sutter <psutter@redhat.com>
|
||
|
---
|
||
|
iptables/iptables-apply | 4 ++--
|
||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
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
|
||
|
@@ -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
|
||
|
|
||
|
--
|
||
|
2.21.0
|
||
|
|