diff options
-rw-r--r-- | loginutils/cryptpw.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/loginutils/cryptpw.c b/loginutils/cryptpw.c index c179e35cf..4eec02b78 100644 --- a/loginutils/cryptpw.c +++ b/loginutils/cryptpw.c | |||
@@ -1,6 +1,8 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* | 2 | /* |
3 | * cryptpw.c | 3 | * cryptpw.c - output a crypt(3)ed password to stdout. |
4 | * | ||
5 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | ||
4 | * | 6 | * |
5 | * Cooked from passwd.c by Thomas Lundquist <thomasez@zelow.no> | 7 | * Cooked from passwd.c by Thomas Lundquist <thomasez@zelow.no> |
6 | * mkpasswd compatible options added by Bernhard Reutner-Fischer | 8 | * mkpasswd compatible options added by Bernhard Reutner-Fischer |
@@ -103,8 +105,8 @@ int cryptpw_main(int argc UNUSED_PARAM, char **argv) | |||
103 | argv[0] ? argv[0] : ( | 105 | argv[0] ? argv[0] : ( |
104 | /* Only mkpasswd, and only from tty, prompts. | 106 | /* Only mkpasswd, and only from tty, prompts. |
105 | * Otherwise it is a plain read. */ | 107 | * Otherwise it is a plain read. */ |
106 | (isatty(0) && applet_name[0] == 'm') | 108 | (isatty(STDIN_FILENO) && applet_name[0] == 'm') |
107 | ? bb_ask(STDIN_FILENO, 0, "Password: ") | 109 | ? bb_ask_stdin("Password: ") |
108 | : xmalloc_fgetline(stdin) | 110 | : xmalloc_fgetline(stdin) |
109 | ), | 111 | ), |
110 | salt, 1)); | 112 | salt, 1)); |