From 95dee81a465668151cff3ffd757456a9a10c1f1f Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 19 Oct 2015 01:20:36 +0200 Subject: loginutils/*: convert to new-style "one file" applets Signed-off-by: Denys Vlasenko --- loginutils/chpasswd.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'loginutils/chpasswd.c') 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 * 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" -- cgit v1.2.3