nova-rootwrap should support path search
Bug #1079723 reported by
Thierry Carrez
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Wishlist
|
Thierry Carrez |
Bug Description
From original bug 1013147:
nova-rootwrap hardcodes paths instead of using /sbin:/
It should support path search instead of forcing us to specify multiple filters to cover the distro differences.
Changed in nova: | |
assignee: | Davanum Srinivas (dims-v) → nobody |
Changed in nova: | |
assignee: | nobody → Thierry Carrez (ttx) |
Changed in nova: | |
milestone: | none → grizzly-2 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | grizzly-2 → 2013.1 |
To post a comment you must log in.
Is this an option? Allow folks to enter one or more paths and get_command would return the right one for the OS?
def test_DnsmasqFil ter(self) : ID=foobar' , 'dnsmasq', 'foo'] DnsmasqFilter( "/sbin/ dnsmasq: /usr/sbin/ dnsmasq: /usr/bin/ dnsmasq: /bin/dnsmasq" , "root")
self.assertTru e(f.match( usercmd) )
self.assertEqu al(f.get_ command( usercmd) , ['/usr/ bin/dnsmasq' , 'foo']) nt(usercmd)
self.assertEqu al(env. get('FLAGFILE' ), 'A')
self.assertEqu al(env. get('NETWORK_ ID'), 'foobar')
usercmd = ['env', 'FLAGFILE=A', 'NETWORK_
f = filters.
env = f.get_environme
Is "/sbin/ dnsmasq: /usr/sbin/ dnsmasq: /usr/bin/ dnsmasq: /bin/dnsmasq" syntax ok for listing all the alternative locations where the executable may exist?
Or is the request more of, don't make me specify the executable, just look in all those hard coded paths and pick the first one?
thanks,
dims