diff options
| author | Andrew Laski <andrew.laski@rackspace.com> | 2012-10-30 16:54:41 -0400 |
|---|---|---|
| committer | Andrew Laski <andrew.laski@rackspace.com> | 2012-10-30 21:30:58 -0400 |
| commit | 1d7d733d017c0a8fe2f171d9822d752ff72d9fc6 (patch) | |
| tree | 44892d6a03671cff053586e2dd2247dcc017e9a3 /nova/tests | |
| parent | 7aea941005deda6f057e1e1692018d81c4aebcdc (diff) | |
Use env to set environ when starting dnsmasq
Explictly use env to setup needed environment variables for dnsmasq when
starting to avoid problems with subprocess mis-interpreting the first
command line argument as the executable name.
Also update DnsmasqFilter to accept any command that starts with env
followed by a set of args that include an equals sign, as long as the
next arg is the dnsmasq command.
fixes bug #1073253
Change-Id: I8ac08ba2d2309934a67ed2cb28049ed5d3277d63
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/test_nova_rootwrap.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/tests/test_nova_rootwrap.py b/nova/tests/test_nova_rootwrap.py index f67f2f56c..dc615bf5d 100644 --- a/nova/tests/test_nova_rootwrap.py +++ b/nova/tests/test_nova_rootwrap.py @@ -55,7 +55,7 @@ class RootwrapTestCase(test.TestCase): self.assertTrue(filtermatch is None) def test_DnsmasqFilter(self): - usercmd = ['FLAGFILE=A', 'NETWORK_ID=foobar', 'dnsmasq', 'foo'] + usercmd = ['env', 'FLAGFILE=A', 'NETWORK_ID=foobar', 'dnsmasq', 'foo'] f = filters.DnsmasqFilter("/usr/bin/dnsmasq", "root") self.assertTrue(f.match(usercmd)) self.assertEqual(f.get_command(usercmd), ['/usr/bin/dnsmasq', 'foo']) |
