Skip to content

Commit

Permalink
Addtional CommandFilters to fix rootwrap on SLES
Browse files Browse the repository at this point in the history
Fixes bug 1013147 (for SLES)

(cherry picked from commit a519752)

Change-Id: Ib362c913b809f7601a9a4faedede89b22794dfb7
  • Loading branch information
rhafer authored and openstack-gerrit committed Jul 12, 2012
1 parent 96a6781 commit cf6a85a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions Authors
Expand Up @@ -157,6 +157,7 @@ Pádraig Brady <pbrady@redhat.com>
Paul Voccio <paul@openstack.org>
Peng Yong <ppyy@pubyun.com>
Philip Knouff <philip.knouff@mailtrust.com>
Ralf Haferkamp <rhafer@suse.de>
Renuka Apte <renuka.apte@citrix.com>
Ricardo Carrillo Cruz <emaildericky@gmail.com>
Rick Clark <rick@openstack.org>
Expand Down
7 changes: 7 additions & 0 deletions nova/rootwrap/compute.py
Expand Up @@ -100,6 +100,7 @@
# nova/virt/libvirt/vif.py: 'tunctl', '-b', '-t', dev
# nova/network/linux_net.py: 'tunctl', '-b', '-t', dev
filters.CommandFilter("/usr/sbin/tunctl", "root"),
filters.CommandFilter("/bin/tunctl", "root"),

# nova/virt/libvirt/vif.py: 'ovs-vsctl', ...
# nova/virt/libvirt/vif.py: 'ovs-vsctl', 'del-port', ...
Expand All @@ -118,6 +119,7 @@
# nova/virt/xenapi/vm_utils.py: "parted", "--script", ...
# nova/virt/xenapi/vm_utils.py: 'parted', '--script', dev_path, ..*.
filters.CommandFilter("/sbin/parted", "root"),
filters.CommandFilter("/usr/sbin/parted", "root"),

# nova/virt/xenapi/vm_utils.py: fdisk %(dev_path)s
filters.CommandFilter("/sbin/fdisk", "root"),
Expand All @@ -130,15 +132,20 @@

# nova/network/linux_net.py: 'ip[6]tables-save' % (cmd,), '-t', ...
filters.CommandFilter("/sbin/iptables-save", "root"),
filters.CommandFilter("/usr/sbin/iptables-save", "root"),
filters.CommandFilter("/sbin/ip6tables-save", "root"),
filters.CommandFilter("/usr/sbin/ip6tables-save", "root"),

# nova/network/linux_net.py: 'ip[6]tables-restore' % (cmd,)
filters.CommandFilter("/sbin/iptables-restore", "root"),
filters.CommandFilter("/usr/sbin/iptables-restore", "root"),
filters.CommandFilter("/sbin/ip6tables-restore", "root"),
filters.CommandFilter("/usr/sbin/ip6tables-restore", "root"),

# nova/network/linux_net.py: 'arping', '-U', floating_ip, '-A', '-I', ...
# nova/network/linux_net.py: 'arping', '-U', network_ref['dhcp_server'],..
filters.CommandFilter("/usr/bin/arping", "root"),
filters.CommandFilter("/sbin/arping", "root"),

# nova/network/linux_net.py: 'route', '-n'
# nova/network/linux_net.py: 'route', 'del', 'default', 'gw'
Expand Down
5 changes: 5 additions & 0 deletions nova/rootwrap/network.py
Expand Up @@ -40,15 +40,20 @@

# nova/network/linux_net.py: 'ip[6]tables-save' % (cmd,), '-t', ...
filters.CommandFilter("/sbin/iptables-save", "root"),
filters.CommandFilter("/usr/sbin/iptables-save", "root"),
filters.CommandFilter("/sbin/ip6tables-save", "root"),
filters.CommandFilter("/usr/sbin/ip6tables-save", "root"),

# nova/network/linux_net.py: 'ip[6]tables-restore' % (cmd,)
filters.CommandFilter("/sbin/iptables-restore", "root"),
filters.CommandFilter("/usr/sbin/iptables-restore", "root"),
filters.CommandFilter("/sbin/ip6tables-restore", "root"),
filters.CommandFilter("/usr/sbin/ip6tables-restore", "root"),

# nova/network/linux_net.py: 'arping', '-U', floating_ip, '-A', '-I', ...
# nova/network/linux_net.py: 'arping', '-U', network_ref['dhcp_server'],..
filters.CommandFilter("/usr/bin/arping", "root"),
filters.CommandFilter("/sbin/arping", "root"),

# nova/network/linux_net.py: 'route', '-n'
# nova/network/linux_net.py: 'route', 'del', 'default', 'gw'
Expand Down

0 comments on commit cf6a85a

Please sign in to comment.