]> granicus.if.org Git - sudo/commitdiff
if select return < -1 still prompt for pw
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 15 Oct 1998 04:10:44 +0000 (04:10 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 15 Oct 1998 04:10:44 +0000 (04:10 +0000)
tgetpass.c

index dca7358281c7cb9d6674708d31ea8408624f6bdb..8e9e25fd0651524401e26ef99f0b87b39c7c8875 100644 (file)
@@ -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';