aboutsummaryrefslogtreecommitdiff
path: root/loginutils/chpasswd.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2015-10-19 01:20:36 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2015-10-19 01:20:36 +0200
commit95dee81a465668151cff3ffd757456a9a10c1f1f (patch)
treea9f128900d1fc484f26cd521525907fa1af262c0 /loginutils/chpasswd.c
parent28826ac8c02793431203edb4adb961d5521d643d (diff)
downloadbusybox-95dee81a465668151cff3ffd757456a9a10c1f1f.tar.gz
loginutils/*: convert to new-style "one file" applets
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'loginutils/chpasswd.c')
-rw-r--r--loginutils/chpasswd.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/loginutils/chpasswd.c b/loginutils/chpasswd.c
index 54ed73795..6c41d17be 100644
--- a/loginutils/chpasswd.c
+++ b/loginutils/chpasswd.c
@@ -5,7 +5,23 @@
* Written for SLIND (from passwd.c) by Alexander Shishkin <virtuoso@slind.org>
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
-#include "libbb.h"
+//config:config CHPASSWD
+//config: bool "chpasswd"
+//config: default y
+//config: help
+//config: Reads a file of user name and password pairs from standard input
+//config: and uses this information to update a group of existing users.
+//config:
+//config:config FEATURE_DEFAULT_PASSWD_ALGO
+//config: string "Default password encryption method (passwd -a, cryptpw -m parameter)"
+//config: default "des"
+//config: depends on PASSWD || CRYPTPW
+//config: help
+//config: Possible choices are "d[es]", "m[d5]", "s[ha256]" or "sha512".
+
+//applet:IF_CHPASSWD(APPLET(chpasswd, BB_DIR_USR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_CHPASSWD) += chpasswd.o
//usage:#define chpasswd_trivial_usage
//usage: IF_LONG_OPTS("[--md5|--encrypted]") IF_NOT_LONG_OPTS("[-m|-e]")
@@ -22,6 +38,8 @@
//TODO: implement -c ALGO
+#include "libbb.h"
+
#if ENABLE_LONG_OPTS
static const char chpasswd_longopts[] ALIGN1 =
"encrypted\0" No_argument "e"