From 2c0c73a081c3f2cd25414a68ac42a59ed3cb7ffb Mon Sep 17 00:00:00 2001 From: yangfl Date: Mon, 7 Aug 2023 05:28:37 +0800 Subject: [PATCH] Quote paths in nft scripts to prevent word splitting. --- miniupnpd/netfilter_nft/scripts/nft_delete_chain.sh | 2 +- miniupnpd/netfilter_nft/scripts/nft_display.sh | 2 +- miniupnpd/netfilter_nft/scripts/nft_flush.sh | 2 +- miniupnpd/netfilter_nft/scripts/nft_init.sh | 2 +- miniupnpd/netfilter_nft/scripts/nft_removeall.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/miniupnpd/netfilter_nft/scripts/nft_delete_chain.sh b/miniupnpd/netfilter_nft/scripts/nft_delete_chain.sh index b2e3a2b..aaf3e5d 100755 --- a/miniupnpd/netfilter_nft/scripts/nft_delete_chain.sh +++ b/miniupnpd/netfilter_nft/scripts/nft_delete_chain.sh @@ -1,6 +1,6 @@ #!/bin/sh -. $(dirname "$0")/miniupnpd_functions.sh +. "$(dirname "$0")/miniupnpd_functions.sh" # Prerouting $NFT delete chain inet $NAT_TABLE $PREROUTING_CHAIN diff --git a/miniupnpd/netfilter_nft/scripts/nft_display.sh b/miniupnpd/netfilter_nft/scripts/nft_display.sh index b51218e..a74a8d1 100755 --- a/miniupnpd/netfilter_nft/scripts/nft_display.sh +++ b/miniupnpd/netfilter_nft/scripts/nft_display.sh @@ -1,6 +1,6 @@ #!/bin/sh -. $(dirname "$0")/miniupnpd_functions.sh +. "$(dirname "$0")/miniupnpd_functions.sh" # Prerouting $NFT list chain inet $NAT_TABLE $PREROUTING_CHAIN diff --git a/miniupnpd/netfilter_nft/scripts/nft_flush.sh b/miniupnpd/netfilter_nft/scripts/nft_flush.sh index f2fbcff..a5d3361 100755 --- a/miniupnpd/netfilter_nft/scripts/nft_flush.sh +++ b/miniupnpd/netfilter_nft/scripts/nft_flush.sh @@ -1,6 +1,6 @@ #!/bin/sh -. $(dirname "$0")/miniupnpd_functions.sh +. "$(dirname "$0")/miniupnpd_functions.sh" $NFT flush chain inet $TABLE $CHAIN $NFT flush chain inet $NAT_TABLE $PREROUTING_CHAIN diff --git a/miniupnpd/netfilter_nft/scripts/nft_init.sh b/miniupnpd/netfilter_nft/scripts/nft_init.sh index 839fbe9..4899e7f 100755 --- a/miniupnpd/netfilter_nft/scripts/nft_init.sh +++ b/miniupnpd/netfilter_nft/scripts/nft_init.sh @@ -5,7 +5,7 @@ # 'add' doesn't raise an error if the object already exists. 'create' does. # -. $(dirname "$0")/miniupnpd_functions.sh +. "$(dirname "$0")/miniupnpd_functions.sh" $NFT --check list table inet $TABLE > /dev/null 2>&1 if [ $? -eq "0" ] diff --git a/miniupnpd/netfilter_nft/scripts/nft_removeall.sh b/miniupnpd/netfilter_nft/scripts/nft_removeall.sh index 8a6beff..61e88d0 100755 --- a/miniupnpd/netfilter_nft/scripts/nft_removeall.sh +++ b/miniupnpd/netfilter_nft/scripts/nft_removeall.sh @@ -5,7 +5,7 @@ # Do not disturb other existing structures in nftables, e.g. those created by firewalld # -. $(dirname "$0")/miniupnpd_functions.sh +. "$(dirname "$0")/miniupnpd_functions.sh" $NFT --check list table inet $TABLE > /dev/null 2>&1 if [ $? -eq "0" ]