File 0013-rpc-service-rules-calls-avoid-error-message.patch of Package SuSEfirewall2.6458

From 93ef042e928f0cd42acfc55b30f6547d009134a4 Mon Sep 17 00:00:00 2001
From: Matthias Gerstner <matthias.gerstner@suse.de>
Date: Tue, 28 Nov 2017 17:42:52 +0100
Subject: [PATCH] main script: rpc service rules calls: avoid error messages on
 empty $ports

On SLE-12 currently errors are output into the log when $ports is empty.
---
 SuSEfirewall2 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/SuSEfirewall2 b/SuSEfirewall2
index 4a99d93..8d76ce1 100755
--- a/SuSEfirewall2
+++ b/SuSEfirewall2
@@ -2019,6 +2019,7 @@ allow_rpc_services()
 	# explicitly add portmapper ourselves, otherwise -rpcinfo will
 	# add it each time, causing duplicate rules
 	$add_portmapper && [ ! -z "$ports" ] && ports="$ports portmapper"
+	[ -z "$ports" ] && continue
 	rpcservicerules $ports | while read ARG; do
 	    $LAC $IPTABLES -A $chain ${LOG}"-`rulelog $chain`-ACC-RPC " -m conntrack --ctstate NEW $ARG
 	    $LAA $IPTABLES -A $chain ${LOG}"-`rulelog $chain`-ACC-RPC " $ARG
-- 
2.13.6

openSUSE Build Service is sponsored by