libarchive: open_zipped() does not need to check extensions for e.g. gzip
[oweals/busybox.git] / loginutils / passwd.c
index 8c47e65ff7f8723f5137c539efb82c15f7772529..1509089328df8476a7adbf5d4c5847defc2b17ac 100644 (file)
@@ -6,21 +6,16 @@
 //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)
 {
@@ -95,7 +90,7 @@ int passwd_main(int argc UNUSED_PARAM, char **argv)
        };
        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;