mirror of
https://github.com/golang/term.git
synced 2026-02-09 12:16:05 +03:00
Revert "ssh/terminal: account for win32 api changes"
This reverts commit CL 196897 (commit cf60e62b0d)
Reason for revert: we're reverting the API change instead
in https://go-review.googlesource.com/c/sys/+/197597
Change-Id: I41741c85bb7a07b9ce13264ebb26ee3f968772fa
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/197598
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
This commit is contained in:
@@ -94,7 +94,8 @@ func ReadPassword(fd int) ([]byte, error) {
|
||||
defer windows.SetConsoleMode(windows.Handle(fd), old)
|
||||
|
||||
var h windows.Handle
|
||||
if err := windows.DuplicateHandle(windows.GetCurrentProcess(), windows.Handle(fd), windows.GetCurrentProcess(), &h, 0, false, windows.DUPLICATE_SAME_ACCESS); err != nil {
|
||||
p, _ := windows.GetCurrentProcess()
|
||||
if err := windows.DuplicateHandle(p, windows.Handle(fd), p, &h, 0, false, windows.DUPLICATE_SAME_ACCESS); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user