Fix environment passing in DnsmasqFilter

Fix environment passing in DnsmasqFilter so that dnsmasq can
be run as root through nova-rootwrap. Fixes bug 919275.

Change-Id: I2e78d92b9af4ddea9c0f1c5ddbe2d55fb672310e
This commit is contained in:
Thierry Carrez
2012-01-23 11:17:34 +01:00
parent 0b3d18a293
commit 69808a7d6d
3 changed files with 18 additions and 5 deletions

View File

@@ -65,7 +65,8 @@ if __name__ == '__main__':
obj = subprocess.Popen(filtermatch.get_command(userargs),
stdin=sys.stdin,
stdout=sys.stdout,
stderr=sys.stderr)
stderr=sys.stderr,
env=filtermatch.get_environment(userargs))
sys.exit(obj.returncode)
print "Unauthorized command: %s" % ' '.join(userargs)