From: Todd C. Miller Date: Thu, 15 Oct 1998 04:10:44 +0000 (+0000) Subject: if select return < -1 still prompt for pw X-Git-Tag: SUDO_1_5_7~94 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bb8c2e2a7428d789d487576dca7b9657244a29f8;p=sudo if select return < -1 still prompt for pw --- diff --git a/tgetpass.c b/tgetpass.c index dca735828..8e9e25fd0 100644 --- a/tgetpass.c +++ b/tgetpass.c @@ -220,7 +220,7 @@ char * tgetpass(prompt, timeout, user, host) while ((n = select(fileno(input) + 1, readfds, 0, 0, &tv)) == -1 && errno == EINTR) ; - if (n > 0 && fgets(buf, sizeof(buf), input)) { + if (n != 0 && fgets(buf, sizeof(buf), input)) { n = strlen(buf); if (buf[n - 1] == '\n') buf[n - 1] = '\0';