]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sulogin: Display all kinds of errno during password input.
authorShigeki Morishima <s.morishima@fujitsu.com>
Wed, 21 Jul 2021 02:04:32 +0000 (11:04 +0900)
committerShigeki Morishima <s.morishima@fujitsu.com>
Fri, 7 Jan 2022 02:19:40 +0000 (11:19 +0900)
If some error happens during password input, all kinds of errno will be
displayed for investigation of the problem.

Signed-off-by: Shigeki Morishima <s.morishima@fujitsu.com>
login-utils/sulogin.c

index 0559eebc5f8433749d10957ed445e817fd50c7a3..227826ffcf3653a757f0ef34fedb07d6b96dabd5 100644 (file)
@@ -712,14 +712,11 @@ static char *getpasswd(struct console *con)
                        switch (errno) {
                        case EIO:
                                con->flags |= CON_EIO;
-                       case ESRCH:
-                       case EINVAL:
-                       case ENOENT:
-                       case 0:
-                               break;
                        default:
                                warn(_("cannot read %s"), con->tty);
                                break;
+                       case 0:
+                               break;
                        }
                        goto quit;
                }