mirror of https://github.com/mirror/busybox.git
- don't free user-supplied string (via -e)
- fix helptext (r23046 from trunk)1_11_stable
parent
f2b846e277
commit
a4d0cd0a31
|
@ -2916,13 +2916,13 @@
|
|||
"\n -u Unlock (re-enable) account" \
|
||||
|
||||
#define chpasswd_trivial_usage \
|
||||
USE_GETOPT_LONG("[--md5|--encrypt]") SKIP_GETOPT_LONG("[-m|-e]")
|
||||
USE_GETOPT_LONG("[--md5|--encrypted]") SKIP_GETOPT_LONG("[-m|-e]")
|
||||
#define chpasswd_full_usage "\n\n" \
|
||||
"Read user:password information from stdin\n" \
|
||||
"Read user:password information from stdin " \
|
||||
"and update /etc/passwd accordingly.\n" \
|
||||
"\nOptions:" \
|
||||
USE_GETOPT_LONG( \
|
||||
"\n -e,--encrypt Supplied passwords are in encrypted form" \
|
||||
"\n -e,--encrypted Supplied passwords are in encrypted form" \
|
||||
"\n -m,--md5 Use MD5 encryption instead of DES" \
|
||||
) \
|
||||
SKIP_GETOPT_LONG( \
|
||||
|
|
|
@ -65,8 +65,8 @@ int chpasswd_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
|||
bb_info_msg("Password for '%s' changed", name);
|
||||
logmode = LOGMODE_STDIO;
|
||||
free(name);
|
||||
free(pass);
|
||||
if (!(opt & OPT_ENC))
|
||||
free(pass);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue