aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-12-04 14:19:21 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-12-04 14:19:21 +0000
commit9c6d12993f336662c0afcdce4a06f5669c0b8501 (patch)
treeb2f3bf687695028d64f679fbf051fa745aee8ee0
parent3f70b87c59d2ac801d11d7abd0ef6469d0e49f8a (diff)
downloadbusybox-w32-9c6d12993f336662c0afcdce4a06f5669c0b8501.tar.gz
busybox-w32-9c6d12993f336662c0afcdce4a06f5669c0b8501.tar.bz2
busybox-w32-9c6d12993f336662c0afcdce4a06f5669c0b8501.zip
- -4b and use proper define; add license note
-rw-r--r--loginutils/cryptpw.c8
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));