diff --git a/oslo_rootwrap/wrapper.py b/oslo_rootwrap/wrapper.py index dd223fa..8297adc 100644 --- a/oslo_rootwrap/wrapper.py +++ b/oslo_rootwrap/wrapper.py @@ -49,6 +49,8 @@ class RootwrapConfig(object): # exec_dirs if config.has_option("DEFAULT", "exec_dirs"): self.exec_dirs = config.get("DEFAULT", "exec_dirs").split(",") + # Replace PATH with exec_dirs if specified + os.putenv("PATH", ":".join(self.exec_dirs)) else: self.exec_dirs = [] # Use system PATH if exec_dirs is not specified