]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
add rootwrap filters to wrap ip netns exec
authorMark McClain <mark.mcclain@dreamhost.com>
Tue, 4 Sep 2012 23:50:00 +0000 (19:50 -0400)
committerMark McClain <mark.mcclain@dreamhost.com>
Wed, 5 Sep 2012 02:25:34 +0000 (22:25 -0400)
commit28df8f6d8f2fddf5fb5751eb5100d40a9b4745fa
tree75c2375b23b3b8978677cf3278c30f207203c2b3
parentaaec26c7db1541764f6d7b53ed40262f124652a5
add rootwrap filters to wrap ip netns exec

fixes bug 1044083

This patch adds specific filters for the ip command. The first filter
matches ip with any subcomand except netns exec.  The second filter
matches "ip netns exec" and then relies on the caller (match_filter) to
verify the sub-command against the other filters. Matching the
subcommand separately allows for a single set of filter definitions that
work with and without namespaces.

Change-Id: Ifd0378dc3461f84867efb3cb60396d9cfa9e582d
etc/quantum/rootwrap.d/dhcp.filters
etc/quantum/rootwrap.d/l3.filters
etc/quantum/rootwrap.d/linuxbridge-plugin.filters
quantum/rootwrap/filters.py
quantum/rootwrap/wrapper.py
quantum/tests/unit/test_rootwrap.py