summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <ralonsoh@redhat.com>2020-02-12 18:56:13 +0000
committerRodolfo Alonso Hernandez <ralonsoh@redhat.com>2020-02-13 11:58:01 +0000
commitcc3b9df4268ac339d0b7316595a4148ba4c69836 (patch)
tree9fff7d104b5485aa063213677d2d68aec2dcbcac /etc
parent0ef4233d891f8fa42a073901051bf0310f61eebb (diff)
downloadneutron-cc3b9df4268ac339d0b7316595a4148ba4c69836.tar.gz
"ping"/"ping6" command support in rootwrap filters
To have correct support in rootwrap, "ping"/"ping6" command should have the correct filters in rootwrap. Because "ping" command is harmless, "CommandFilter" is used to allow any binary call, regardless of the parameters used and the order. Nevertheless, this patch also proposes to use "ping"/"ping6" with the same parameters and a specific order, to help in the debug process: - ping[6] -W <timeout> <address> - ping[6] -W <timeout> -c <count> <address> - ping[6] -W <timeout> -c <count> -i <interval> <address> Those commands could be called from inside a namespace. The needed filter is also added in this patch. Change-Id: Ie5cbc0dcc76672b26cd2605f08cfd17a30b4c905 Closes-Bug: #1863006
Diffstat (limited to 'etc')
-rw-r--r--etc/neutron/rootwrap.d/debug.filters8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/neutron/rootwrap.d/debug.filters b/etc/neutron/rootwrap.d/debug.filters
index 86e3041604..2fc1ae4ebd 100644
--- a/etc/neutron/rootwrap.d/debug.filters
+++ b/etc/neutron/rootwrap.d/debug.filters
@@ -12,10 +12,10 @@
# from inside a namespace which requires root
# _alt variants allow to match -c and -w in any order
# (used by NeutronDebugAgent.ping_all)
-ping: RegExpFilter, ping, root, ping, -w, \d+, -c, \d+, [0-9\.]+
-ping_alt: RegExpFilter, ping, root, ping, -c, \d+, -w, \d+, [0-9\.]+
-ping6: RegExpFilter, ping6, root, ping6, -w, \d+, -c, \d+, [0-9A-Fa-f:]+
-ping6_alt: RegExpFilter, ping6, root, ping6, -c, \d+, -w, \d+, [0-9A-Fa-f:]+
+ping: CommandFilter, ping, root
+ping6: CommandFilter, ping6, root
+ping_exec: IpNetnsExecFilter, ping, root
+ping6_exec: IpNetnsExecFilter, ping6, root
# "sleep" command, only for testing
sleep: RegExpFilter, sleep, root, sleep, \d+