From 22438a481c8dd2f5cc498952b04d60f88ac59eac Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 29 Aug 2014 09:49:38 -0700 Subject: [PATCH] Update CHANGELOG --- CHANGELOG.md | 2 ++ lib/vagrant/util/ssh.rb | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b2b6475c..4a33b9ef0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,8 @@ BUG FIXES: - core: VM names may no longer contain brackets, since they cause issues with some providers. [GH-4319] - core: Use "-f" to `rm` files in case pty is true. [GH-4410] + - core: SSH key doesn't have to be owned by our user if we're running + as root. [GH-4387] - commands/package: base package won't crash with exception [GH-4017] - commands/rsync-auto: Destroyed machines won't raise exceptions. [GH-4031] - communicators/ssh: Nicer error if remote unexpectedly disconects. [GH-4038] diff --git a/lib/vagrant/util/ssh.rb b/lib/vagrant/util/ssh.rb index c3da32c52..44e0403aa 100644 --- a/lib/vagrant/util/ssh.rb +++ b/lib/vagrant/util/ssh.rb @@ -33,8 +33,8 @@ module Vagrant LOGGER.debug("Checking key permissions: #{key_path}") stat = key_path.stat - if !(stat.owned? || (Process.uid == 0)) - # The SSH key must be owned by ourselves + if !stat.owned? && Process.uid != 0 + # The SSH key must be owned by ourselves, unless we're root raise Errors::SSHKeyBadOwner, key_path: key_path end