sulogin: fix getpasswd()

Fixes: https://github.com/karelzak/util-linux/issues/1400
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2021-07-29 21:28:00 +02:00
parent 54cb0dd60c
commit 3c466f7c35
1 changed files with 1 additions and 0 deletions

View File

@ -621,6 +621,7 @@ static char *getpasswd(struct console *con)
cp = &con->cp;
tty = con->tio;
ret = pass;
tty.c_iflag &= ~(IUCLC|IXON|IXOFF|IXANY);
tty.c_lflag &= ~(ECHO|ECHOE|ECHOK|ECHONL|TOSTOP|ISIG);
tc = (tcsetattr(fd, TCSAFLUSH, &tty) == 0);