Skip to content

Commit

Permalink
Merge pull request #420 from evanlinjin/fix/hv-dmsgpty-#418
Browse files Browse the repository at this point in the history
Ensure hypervisor PKs are added to dmsgpty whitelist on initi.
  • Loading branch information
jdknives authored Jun 30, 2020
2 parents a15a789 + 47db0e0 commit ec6fe6c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/visor/init_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ func initDmsgpty(v *Visor) bool {
}
}

// Ensure hypervisors are added to the whitelist.
if err := wl.Add(v.conf.Hypervisors...); err != nil {
return report(err)
}

dmsgC := v.net.Dmsg()
if dmsgC == nil {
return report(errors.New("cannot create dmsgpty with nil dmsg client"))
Expand All @@ -48,7 +53,6 @@ func initDmsgpty(v *Visor) bool {
pty := dmsgpty.NewHost(dmsgC, wl)

if ptyPort := conf.Port; ptyPort != 0 {

ctx, cancel := context.WithCancel(context.Background())
wg := new(sync.WaitGroup)
wg.Add(1)
Expand Down

0 comments on commit ec6fe6c

Please sign in to comment.