aboutsummaryrefslogtreecommitdiff
path: root/loginutils/cryptpw.c
diff options
context:
space:
mode:
authorGravatar Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-12-04 14:19:21 +0000
committerGravatar Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-12-04 14:19:21 +0000
commit9c6d12993f336662c0afcdce4a06f5669c0b8501 (patch)
treeb2f3bf687695028d64f679fbf051fa745aee8ee0 /loginutils/cryptpw.c
parent3f70b87c59d2ac801d11d7abd0ef6469d0e49f8a (diff)
downloadbusybox-9c6d12993f336662c0afcdce4a06f5669c0b8501.tar.gz
busybox-9c6d12993f336662c0afcdce4a06f5669c0b8501.tar.bz2
- -4b and use proper define; add license note
Diffstat (limited to 'loginutils/cryptpw.c')
-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 @@
/* vi: set sw=4 ts=4: */
/*
- * cryptpw.c
+ * cryptpw.c - output a crypt(3)ed password to stdout.
+ *
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*
* Cooked from passwd.c by Thomas Lundquist <thomasez@zelow.no>
* mkpasswd compatible options added by Bernhard Reutner-Fischer
@@ -103,8 +105,8 @@ int cryptpw_main(int argc UNUSED_PARAM, char **argv)
argv[0] ? argv[0] : (
/* Only mkpasswd, and only from tty, prompts.
* Otherwise it is a plain read. */
- (isatty(0) && applet_name[0] == 'm')
- ? bb_ask(STDIN_FILENO, 0, "Password: ")
+ (isatty(STDIN_FILENO) && applet_name[0] == 'm')
+ ? bb_ask_stdin("Password: ")
: xmalloc_fgetline(stdin)
),
salt, 1));