core: Unset DYLD_LIBRARY_PATH if setuid/setgid [GH-2243]

This commit is contained in:
Mitchell Hashimoto 2013-09-20 17:43:11 -07:00
parent 47120a86a2
commit 138024d74c
2 changed files with 7 additions and 0 deletions

View File

@ -10,6 +10,8 @@ BUG FIXES:
- core: Don't output `\e[0K` anymore on Windows. [GH-2246]
- core: Only modify `DYLD_LIBRARY_PATH` on Mac when executing commands
in the installer context. [GH-2231]
- core: Clear `DYLD_LIBRARY_PATH` on Mac if the subprocess is executing
a setuid or setgid script. [GH-2243]
- hosts/arch: Vagrant won't crash on Arch anymore. [GH-2233]
## 1.3.3 (September 18, 2013)

View File

@ -85,6 +85,11 @@ module Vagrant
else
@logger.debug("Command not in installer, not touching env vars.")
end
if File.setuid?(@command[0]) || File.setgid?(@command[0])
@logger.info("Command is setuid/setgid, clearing DYLD_LIBRARY_PATH")
process.environment["DYLD_LIBRARY_PATH"] = ""
end
end
# Set the environment on the process if we must