Can you please give us ssh -V, and describe the sandbox environment? Does it
affect which ssh version is used?
It's the system default. There's no other version of ssh that gets installed.
Our own ssh formula is homebrew/dupes/openssh and is explicitly barred from
being used as a dependency by anything else, as is anything else in homebrew/dupes.
10.12.3
robotunicorn ~ # ssh -V
OpenSSH_7.3p1, LibreSSL 2.4.1
10.11.6
iMac-TMP:~ joe$ ssh -V
OpenSSH_6.9p1, LibreSSL 2.1.8
yosemitevm ~ # ssh -V
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
Regarding the sandbox, here's where it's implemented:
https://github.com/Homebrew/brew/blob/master/Library/Homebrew/sandbox.rb
It's invoked as
/usr/bin/sandbox-exec -f /tmp/homebrew20170302-24230-1xmlw7l.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/build.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-versions/gnupg21.rb
The contents of the .sb file are as follows:
iMac-TMP:~ joe$ cat /tmp/homebrew20170302-24230-1xmlw7l.sb (version 1) (debug deny) ; log all denied operations to /var/log/system.log (allow file-write* (subpath "/private/tmp")) (allow file-write* (subpath "/private/var/tmp")) (allow file-write* (regex #"^/private/var/folders/[^/]+/[^/]+/[C,T]/")) (allow file-write* (subpath "/private/tmp")) (allow file-write* (subpath "/Users/joe/Library/Caches/Homebrew")) (allow file-write* (subpath "/Users/joe/Library/Logs/Homebrew/gnupg21")) (allow file-write* (subpath "/Users/joe/Library/Developer")) (allow file-write* (subpath "/usr/local/Cellar/gnupg21")) (allow file-write* (subpath "/usr/local/etc")) (allow file-write* (subpath "/usr/local/var")) (allow file-write* (literal "/dev/ptmx") (literal "/dev/dtracehelper") (literal "/dev/null") (literal "/dev/zero") (regex #"^/dev/fd/[0-9]+$") (regex #"^/dev/ttys?[0-9]*$") ) (deny file-write*) ; deny non-whitelist file write operations (allow process-exec (literal "/bin/ps") (with no-sandbox) ) ; allow certain processes running without sandbox (allow default) ; allow everything else
The environment variables themselves are not different between sandboxed and
non-sandboxed builds.