sulogin: bail out from getpasswd(...) on timeout
If timeout happens while waiting in prompt, bail out instead of retrying. Reported-by: Bjørn Mork <bjorn@mork.no> Addresses: http://bugs.debian.org/846107 Signed-off-by: Andreas Henriksson <andreas@fatal.se>
This commit is contained in:
parent
60dea9d187
commit
1c4b2d4392
|
@ -645,6 +645,10 @@ static char *getpasswd(struct console *con)
|
|||
while (cp->eol == '\0') {
|
||||
if (read(fd, &c, 1) < 1) {
|
||||
if (errno == EINTR || errno == EAGAIN) {
|
||||
if (alarm_rised) {
|
||||
ret = NULL;
|
||||
goto quit;
|
||||
}
|
||||
xusleep(250000);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue