From 6dcff18d36bded8e21a7ccc2f598c09b5db5beee Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Tue, 11 Jun 2019 13:22:03 -0700 Subject: [PATCH] prevent nil pointer dereference by defining IsUserAuthority. This occurred as a regression when we updated the crypto library in v1.4.0 --- provisioner/ansible/provisioner.go | 1 + provisioner/inspec/provisioner.go | 1 + 2 files changed, 2 insertions(+) diff --git a/provisioner/ansible/provisioner.go b/provisioner/ansible/provisioner.go index 50e0702cb..378fd7beb 100644 --- a/provisioner/ansible/provisioner.go +++ b/provisioner/ansible/provisioner.go @@ -241,6 +241,7 @@ func (p *Provisioner) Provision(ctx context.Context, ui packer.Ui, comm packer.C return nil, nil }, + IsUserAuthority: func(k ssh.PublicKey) bool { return true }, } config := &ssh.ServerConfig{ diff --git a/provisioner/inspec/provisioner.go b/provisioner/inspec/provisioner.go index 15c975c20..c90b66d49 100644 --- a/provisioner/inspec/provisioner.go +++ b/provisioner/inspec/provisioner.go @@ -234,6 +234,7 @@ func (p *Provisioner) Provision(ctx context.Context, ui packer.Ui, comm packer.C return nil, nil }, + IsUserAuthority: func(k ssh.PublicKey) bool { return true }, } config := &ssh.ServerConfig{