Update vendor before 0.16.0 (#829)
* Update vendor github.com/coreos/go-systemd/dbus@v16 * Update vendor github.com/golang/protobuf/proto@v1.0.0 * Update vendor github.com/prometheus/... * Update vendor golang.org/x/...
This commit is contained in:
parent
d7348a5c78
commit
7928dc93da
25 changed files with 731 additions and 240 deletions
10
vendor/golang.org/x/crypto/ssh/terminal/util_windows.go
generated
vendored
10
vendor/golang.org/x/crypto/ssh/terminal/util_windows.go
generated
vendored
|
|
@ -93,5 +93,13 @@ func ReadPassword(fd int) ([]byte, error) {
|
|||
windows.SetConsoleMode(windows.Handle(fd), old)
|
||||
}()
|
||||
|
||||
return readPasswordLine(os.NewFile(uintptr(fd), "stdin"))
|
||||
var h windows.Handle
|
||||
p, _ := windows.GetCurrentProcess()
|
||||
if err := windows.DuplicateHandle(p, windows.Handle(fd), p, &h, 0, false, windows.DUPLICATE_SAME_ACCESS); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
f := os.NewFile(uintptr(h), "stdin")
|
||||
defer f.Close()
|
||||
return readPasswordLine(f)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue