Merge pull request #4387 from BackSlasher/allow-sudo
Ignoring SSHKeyBadOwner if user is root (uid 0)
This commit is contained in:
commit
417c2b7c7b
|
@ -33,7 +33,7 @@ module Vagrant
|
||||||
LOGGER.debug("Checking key permissions: #{key_path}")
|
LOGGER.debug("Checking key permissions: #{key_path}")
|
||||||
stat = key_path.stat
|
stat = key_path.stat
|
||||||
|
|
||||||
if !stat.owned?
|
if !(stat.owned? || (Process.uid == 0))
|
||||||
# The SSH key must be owned by ourselves
|
# The SSH key must be owned by ourselves
|
||||||
raise Errors::SSHKeyBadOwner, key_path: key_path
|
raise Errors::SSHKeyBadOwner, key_path: key_path
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue