firewalld/SOURCES/0016-test-dbus-zone-introspect-signals.patch
2021-12-02 16:38:13 +00:00

370 lines
18 KiB
Diff

From c15f2c1b94faf21eb39e4d1c525d205cb1b71dbc Mon Sep 17 00:00:00 2001
From: Eric Garver <eric@garver.life>
Date: Tue, 9 Feb 2021 14:31:53 -0500
Subject: [PATCH 16/22] test(dbus): zone: introspect signals
(cherry picked from commit 04548b4c3be23288ccaeee74f7b1fda5e9d5e047)
(cherry picked from commit 2f9a05fbaf5882ca91cf4e4141aec27b6f58855c)
---
src/tests/dbus/zone_permanent_signatures.at | 15 ++
src/tests/dbus/zone_runtime_signatures.at | 152 ++++++++++++++++++++
2 files changed, 167 insertions(+)
diff --git a/src/tests/dbus/zone_permanent_signatures.at b/src/tests/dbus/zone_permanent_signatures.at
index 31b27925495a..2db55c5b3936 100644
--- a/src/tests/dbus/zone_permanent_signatures.at
+++ b/src/tests/dbus/zone_permanent_signatures.at
@@ -64,6 +64,11 @@ DBUS_INTROSPECT([config/zone/${DBUS_PUBLIC_ZONE_OBJ}], [[//interface[@name="org.
<arg direction="in" name="settings" type="(sssbsasa(ss)asba(ssss)asasasasa(ss)b)"></arg>
</method>
])
+DBUS_INTROSPECT([config/zone/${DBUS_PUBLIC_ZONE_OBJ}], [[//interface[@name="org.fedoraproject.FirewallD1.config.zone"]//signal[@name="Updated"]]], 0, [dnl
+ <signal name="Updated">
+ <arg name="name" type="s"></arg>
+ </signal>
+])
DBUS_INTROSPECT([config/zone/${DBUS_PUBLIC_ZONE_OBJ}], [[//interface[@name="org.fedoraproject.FirewallD1.config.zone"]//method[@name="loadDefaults"]]], 0, [dnl
<method name="loadDefaults">
@@ -74,12 +79,22 @@ DBUS_INTROSPECT([config/zone/${DBUS_PUBLIC_ZONE_OBJ}], [[//interface[@name="org.
<method name="remove">
</method>
])
+DBUS_INTROSPECT([config/zone/${DBUS_PUBLIC_ZONE_OBJ}], [[//interface[@name="org.fedoraproject.FirewallD1.config.zone"]//signal[@name="Removed"]]], 0, [dnl
+ <signal name="Removed">
+ <arg name="name" type="s"></arg>
+ </signal>
+])
DBUS_INTROSPECT([config/zone/${DBUS_PUBLIC_ZONE_OBJ}], [[//interface[@name="org.fedoraproject.FirewallD1.config.zone"]//method[@name="rename"]]], 0, [dnl
<method name="rename">
<arg direction="in" name="name" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([config/zone/${DBUS_PUBLIC_ZONE_OBJ}], [[//interface[@name="org.fedoraproject.FirewallD1.config.zone"]//signal[@name="Renamed"]]], 0, [dnl
+ <signal name="Renamed">
+ <arg name="name" type="s"></arg>
+ </signal>
+])
dnl Version
dnl
diff --git a/src/tests/dbus/zone_runtime_signatures.at b/src/tests/dbus/zone_runtime_signatures.at
index 29571a48ec5f..68aec78153ae 100644
--- a/src/tests/dbus/zone_runtime_signatures.at
+++ b/src/tests/dbus/zone_runtime_signatures.at
@@ -69,6 +69,12 @@ DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//me
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="InterfaceAdded"]]], 0, [dnl
+ <signal name="InterfaceAdded">
+ <arg name="zone" type="s"></arg>
+ <arg name="interface" type="s"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="changeZone"]]], 0, [dnl
<method name="changeZone">
<arg direction="in" name="zone" type="s"></arg>
@@ -76,6 +82,12 @@ DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//me
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="ZoneChanged"]]], 0, [dnl
+ <signal name="ZoneChanged">
+ <arg name="zone" type="s"></arg>
+ <arg name="interface" type="s"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="changeZoneOfInterface"]]], 0, [dnl
<method name="changeZoneOfInterface">
<arg direction="in" name="zone" type="s"></arg>
@@ -90,6 +102,12 @@ DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//me
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="InterfaceRemoved"]]], 0, [dnl
+ <signal name="InterfaceRemoved">
+ <arg name="zone" type="s"></arg>
+ <arg name="interface" type="s"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="queryInterface"]]], 0, [dnl
<method name="queryInterface">
<arg direction="in" name="zone" type="s"></arg>
@@ -112,6 +130,12 @@ DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//me
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="SourceAdded"]]], 0, [dnl
+ <signal name="SourceAdded">
+ <arg name="zone" type="s"></arg>
+ <arg name="source" type="s"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="changeZoneOfSource"]]], 0, [dnl
<method name="changeZoneOfSource">
<arg direction="in" name="zone" type="s"></arg>
@@ -126,6 +150,12 @@ DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//me
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="SourceRemoved"]]], 0, [dnl
+ <signal name="SourceRemoved">
+ <arg name="zone" type="s"></arg>
+ <arg name="source" type="s"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="querySource"]]], 0, [dnl
<method name="querySource">
<arg direction="in" name="zone" type="s"></arg>
@@ -149,6 +179,13 @@ DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//me
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="ServiceAdded"]]], 0, [dnl
+ <signal name="ServiceAdded">
+ <arg name="zone" type="s"></arg>
+ <arg name="service" type="s"></arg>
+ <arg name="timeout" type="i"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="removeService"]]], 0, [dnl
<method name="removeService">
<arg direction="in" name="zone" type="s"></arg>
@@ -156,6 +193,12 @@ DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//me
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="ServiceRemoved"]]], 0, [dnl
+ <signal name="ServiceRemoved">
+ <arg name="zone" type="s"></arg>
+ <arg name="service" type="s"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="queryService"]]], 0, [dnl
<method name="queryService">
<arg direction="in" name="zone" type="s"></arg>
@@ -179,6 +222,13 @@ DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//me
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="ProtocolAdded"]]], 0, [dnl
+ <signal name="ProtocolAdded">
+ <arg name="zone" type="s"></arg>
+ <arg name="protocol" type="s"></arg>
+ <arg name="timeout" type="i"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="removeProtocol"]]], 0, [dnl
<method name="removeProtocol">
<arg direction="in" name="zone" type="s"></arg>
@@ -186,6 +236,12 @@ DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//me
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="ProtocolRemoved"]]], 0, [dnl
+ <signal name="ProtocolRemoved">
+ <arg name="zone" type="s"></arg>
+ <arg name="protocol" type="s"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="queryProtocol"]]], 0, [dnl
<method name="queryProtocol">
<arg direction="in" name="zone" type="s"></arg>
@@ -210,6 +266,14 @@ DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//me
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="PortAdded"]]], 0, [dnl
+ <signal name="PortAdded">
+ <arg name="zone" type="s"></arg>
+ <arg name="port" type="s"></arg>
+ <arg name="protocol" type="s"></arg>
+ <arg name="timeout" type="i"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="removePort"]]], 0, [dnl
<method name="removePort">
<arg direction="in" name="zone" type="s"></arg>
@@ -218,6 +282,13 @@ DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//me
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="PortRemoved"]]], 0, [dnl
+ <signal name="PortRemoved">
+ <arg name="zone" type="s"></arg>
+ <arg name="port" type="s"></arg>
+ <arg name="protocol" type="s"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="queryPort"]]], 0, [dnl
<method name="queryPort">
<arg direction="in" name="zone" type="s"></arg>
@@ -245,6 +316,14 @@ DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//me
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="SourcePortAdded"]]], 0, [dnl
+ <signal name="SourcePortAdded">
+ <arg name="zone" type="s"></arg>
+ <arg name="port" type="s"></arg>
+ <arg name="protocol" type="s"></arg>
+ <arg name="timeout" type="i"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="removeSourcePort"]]], 0, [dnl
<method name="removeSourcePort">
<arg direction="in" name="zone" type="s"></arg>
@@ -253,6 +332,13 @@ DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//me
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="SourcePortRemoved"]]], 0, [dnl
+ <signal name="SourcePortRemoved">
+ <arg name="zone" type="s"></arg>
+ <arg name="port" type="s"></arg>
+ <arg name="protocol" type="s"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="querySourcePort"]]], 0, [dnl
<method name="querySourcePort">
<arg direction="in" name="zone" type="s"></arg>
@@ -282,6 +368,16 @@ DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//me
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="ForwardPortAdded"]]], 0, [dnl
+ <signal name="ForwardPortAdded">
+ <arg name="zone" type="s"></arg>
+ <arg name="port" type="s"></arg>
+ <arg name="protocol" type="s"></arg>
+ <arg name="toport" type="s"></arg>
+ <arg name="toaddr" type="s"></arg>
+ <arg name="timeout" type="i"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="removeForwardPort"]]], 0, [dnl
<method name="removeForwardPort">
<arg direction="in" name="zone" type="s"></arg>
@@ -292,6 +388,15 @@ DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//me
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="ForwardPortRemoved"]]], 0, [dnl
+ <signal name="ForwardPortRemoved">
+ <arg name="zone" type="s"></arg>
+ <arg name="port" type="s"></arg>
+ <arg name="protocol" type="s"></arg>
+ <arg name="toport" type="s"></arg>
+ <arg name="toaddr" type="s"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="queryForwardPort"]]], 0, [dnl
<method name="queryForwardPort">
<arg direction="in" name="zone" type="s"></arg>
@@ -319,12 +424,23 @@ DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//me
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="MasqueradeAdded"]]], 0, [dnl
+ <signal name="MasqueradeAdded">
+ <arg name="zone" type="s"></arg>
+ <arg name="timeout" type="i"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="removeMasquerade"]]], 0, [dnl
<method name="removeMasquerade">
<arg direction="in" name="zone" type="s"></arg>
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="MasqueradeRemoved"]]], 0, [dnl
+ <signal name="MasqueradeRemoved">
+ <arg name="zone" type="s"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="queryMasquerade"]]], 0, [dnl
<method name="queryMasquerade">
<arg direction="in" name="zone" type="s"></arg>
@@ -341,6 +457,13 @@ DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//me
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="IcmpBlockAdded"]]], 0, [dnl
+ <signal name="IcmpBlockAdded">
+ <arg name="zone" type="s"></arg>
+ <arg name="icmp" type="s"></arg>
+ <arg name="timeout" type="i"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="removeIcmpBlock"]]], 0, [dnl
<method name="removeIcmpBlock">
<arg direction="in" name="zone" type="s"></arg>
@@ -348,6 +471,12 @@ DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//me
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="IcmpBlockRemoved"]]], 0, [dnl
+ <signal name="IcmpBlockRemoved">
+ <arg name="zone" type="s"></arg>
+ <arg name="icmp" type="s"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="queryIcmpBlock"]]], 0, [dnl
<method name="queryIcmpBlock">
<arg direction="in" name="zone" type="s"></arg>
@@ -369,12 +498,22 @@ DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//me
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="IcmpBlockInversionAdded"]]], 0, [dnl
+ <signal name="IcmpBlockInversionAdded">
+ <arg name="zone" type="s"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="removeIcmpBlockInversion"]]], 0, [dnl
<method name="removeIcmpBlockInversion">
<arg direction="in" name="zone" type="s"></arg>
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="IcmpBlockInversionRemoved"]]], 0, [dnl
+ <signal name="IcmpBlockInversionRemoved">
+ <arg name="zone" type="s"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="queryIcmpBlockInversion"]]], 0, [dnl
<method name="queryIcmpBlockInversion">
<arg direction="in" name="zone" type="s"></arg>
@@ -391,6 +530,13 @@ DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//me
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="RichRuleAdded"]]], 0, [dnl
+ <signal name="RichRuleAdded">
+ <arg name="zone" type="s"></arg>
+ <arg name="rule" type="s"></arg>
+ <arg name="timeout" type="i"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="removeRichRule"]]], 0, [dnl
<method name="removeRichRule">
<arg direction="in" name="zone" type="s"></arg>
@@ -398,6 +544,12 @@ DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//me
<arg direction="out" type="s"></arg>
</method>
])
+DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//signal[@name="RichRuleRemoved"]]], 0, [dnl
+ <signal name="RichRuleRemoved">
+ <arg name="zone" type="s"></arg>
+ <arg name="rule" type="s"></arg>
+ </signal>
+])
DBUS_INTROSPECT([], [[//interface[@name="org.fedoraproject.FirewallD1.zone"]//method[@name="queryRichRule"]]], 0, [dnl
<method name="queryRichRule">
<arg direction="in" name="zone" type="s"></arg>
--
2.27.0