password utils: improve --help, make DEFAULT_PASSWD_ALGO visible if CHPASSWD
Was:
$ cryptpw --help
...
Print crypt(3) hashed PASSWORD
-P,--password-fd=N Read password from fd N
-m,--method=TYPE Encryption method
-S,--salt=SALT
User: "What methods exist? which one os default?"
Now:
Print crypt(3) hashed PASSWORD
-P,--password-fd N Read password from fd N
-m,--method TYPE des,md5,sha256/512 (default des)
-S,--salt SALT
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/include/usage.src.h b/include/usage.src.h
index 78beccf..00369df 100644
--- a/include/usage.src.h
+++ b/include/usage.src.h
@@ -14,6 +14,14 @@
#define NOUSAGE_STR "\b"
+#if !ENABLE_USE_BB_CRYPT || ENABLE_USE_BB_CRYPT_SHA
+# define CRYPT_METHODS_HELP_STR "des,md5,sha256/512" \
+ " (default "CONFIG_FEATURE_DEFAULT_PASSWD_ALGO")"
+#else
+# define CRYPT_METHODS_HELP_STR "des,md5" \
+ " (default "CONFIG_FEATURE_DEFAULT_PASSWD_ALGO")"
+#endif
+
INSERT
#define busybox_notes_usage \