core: Fix regression caused by recent changes that allowed multiple private keys [GH-907]
This commit is contained in:
parent
0f4e29d869
commit
9753f988b0
|
@ -29,8 +29,10 @@ module Vagrant
|
||||||
raise Errors::SSHNotReady if info.nil?
|
raise Errors::SSHNotReady if info.nil?
|
||||||
|
|
||||||
if info[:private_key_path]
|
if info[:private_key_path]
|
||||||
# Check the SSH key permissions
|
# Check SSH key permissions
|
||||||
SSH.check_key_permissions(Pathname.new(info[:private_key_path]))
|
info[:private_key_path].each do |path|
|
||||||
|
SSH.check_key_permissions(Pathname.new(path))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Exec!
|
# Exec!
|
||||||
|
|
|
@ -9,6 +9,9 @@ module Vagrant
|
||||||
# mirror the output to the UI. The resulting exit status of the command
|
# mirror the output to the UI. The resulting exit status of the command
|
||||||
# will exist in the `:ssh_run_exit_status` key in the environment.
|
# will exist in the `:ssh_run_exit_status` key in the environment.
|
||||||
class SSHRun
|
class SSHRun
|
||||||
|
# For quick access to the `SSH` class.
|
||||||
|
include Vagrant::Util
|
||||||
|
|
||||||
def initialize(app, env)
|
def initialize(app, env)
|
||||||
@app = app
|
@app = app
|
||||||
@logger = Log4r::Logger.new("vagrant::action::builtin::ssh_run")
|
@logger = Log4r::Logger.new("vagrant::action::builtin::ssh_run")
|
||||||
|
@ -23,8 +26,10 @@ module Vagrant
|
||||||
raise Errors::SSHNotReady if info.nil?
|
raise Errors::SSHNotReady if info.nil?
|
||||||
|
|
||||||
if info[:private_key_path]
|
if info[:private_key_path]
|
||||||
# Check the SSH key permissions
|
# Check SSH key permissions
|
||||||
Util::SSH.check_key_permissions(Pathname.new(info[:private_key_path]))
|
info[:private_key_path].each do |path|
|
||||||
|
SSH.check_key_permissions(Pathname.new(path))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Execute!
|
# Execute!
|
||||||
|
|
Loading…
Reference in New Issue