//usage:#define passwd_trivial_usage
//usage: "[OPTIONS] [USER]"
//usage:#define passwd_full_usage "\n\n"
-//usage: "Change USER's password. If no USER is specified,\n"
-//usage: "changes the password for the current user.\n"
-//usage: "\nOptions:"
+//usage: "Change USER's password (default: current user)"
+//usage: "\n"
//usage: "\n -a ALG Encryption method"
-//usage: "\n -d Delete password for the account"
+//usage: "\n -d Set password to ''"
//usage: "\n -l Lock (disable) account"
-//usage: "\n -u Unlock (re-enable) account"
+//usage: "\n -u Unlock (enable) account"
#include "libbb.h"
#include <syslog.h>
-
-static void nuke_str(char *str)
-{
- if (str) memset(str, 0, strlen(str));
-}
+#include <sys/resource.h> /* setrlimit */
static char* new_password(const struct passwd *pw, uid_t myuid, const char *algo)
{
};
unsigned opt;
int rc;
- const char *opt_a = "d"; /* des */
+ const char *opt_a = CONFIG_FEATURE_DEFAULT_PASSWD_ALGO;
const char *filename;
char *myname;
char *name;