# HG changeset patch # User Paul Fisher # Date 1445745786 14400 # Node ID 4db389f948c9f93616049b218dff4172104e5f3d # Parent 406d3cd76739f452a6a59d012067f80772190e5b Preserve the entire environment when password checking. diff -r 406d3cd76739 -r 4db389f948c9 multipass-checkpassword.go --- a/multipass-checkpassword.go Sat Oct 24 23:40:13 2015 -0400 +++ b/multipass-checkpassword.go Sun Oct 25 00:03:06 2015 -0400 @@ -40,15 +40,10 @@ if err != nil { os.Exit(Failed) } + os.Setenv("USER", user.Username) + os.Setenv("HOME", user.HomeDir) os.Setenv("userdb_uid", user.Uid) os.Setenv("userdb_gid", user.Gid) os.Setenv("EXTRA", "userdb_uid userdb_gid") - environ := []string{ - "USER=" + user.Username, - "userdb_uid=" + user.Uid, - "userdb_gid=" + user.Gid, - "HOME=" + user.HomeDir, - "EXTRA=userdb_uid userdb_gid", - } - syscall.Exec(os.Args[1], os.Args[1:], environ) + syscall.Exec(os.Args[1], os.Args[1:], os.Environ()) }