diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-08-05 14:33:37 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-08-05 14:33:37 +0000 |
commit | a4d0cd0a31f06ebefea4bd73b8e5872452583b58 (patch) | |
tree | 955192c78de56180c47491d4966455fa7e7e1104 | |
parent | f2b846e27718624e697cd87e9f4025826dea9ff2 (diff) | |
download | busybox-w32-a4d0cd0a31f06ebefea4bd73b8e5872452583b58.tar.gz busybox-w32-a4d0cd0a31f06ebefea4bd73b8e5872452583b58.tar.bz2 busybox-w32-a4d0cd0a31f06ebefea4bd73b8e5872452583b58.zip |
- don't free user-supplied string (via -e)
- fix helptext
(r23046 from trunk)
-rw-r--r-- | include/usage.h | 6 | ||||
-rw-r--r-- | loginutils/chpasswd.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/include/usage.h b/include/usage.h index ceac6d0af..dcb6e344e 100644 --- a/include/usage.h +++ b/include/usage.h | |||
@@ -2916,13 +2916,13 @@ | |||
2916 | "\n -u Unlock (re-enable) account" \ | 2916 | "\n -u Unlock (re-enable) account" \ |
2917 | 2917 | ||
2918 | #define chpasswd_trivial_usage \ | 2918 | #define chpasswd_trivial_usage \ |
2919 | USE_GETOPT_LONG("[--md5|--encrypt]") SKIP_GETOPT_LONG("[-m|-e]") | 2919 | USE_GETOPT_LONG("[--md5|--encrypted]") SKIP_GETOPT_LONG("[-m|-e]") |
2920 | #define chpasswd_full_usage "\n\n" \ | 2920 | #define chpasswd_full_usage "\n\n" \ |
2921 | "Read user:password information from stdin\n" \ | 2921 | "Read user:password information from stdin " \ |
2922 | "and update /etc/passwd accordingly.\n" \ | 2922 | "and update /etc/passwd accordingly.\n" \ |
2923 | "\nOptions:" \ | 2923 | "\nOptions:" \ |
2924 | USE_GETOPT_LONG( \ | 2924 | USE_GETOPT_LONG( \ |
2925 | "\n -e,--encrypt Supplied passwords are in encrypted form" \ | 2925 | "\n -e,--encrypted Supplied passwords are in encrypted form" \ |
2926 | "\n -m,--md5 Use MD5 encryption instead of DES" \ | 2926 | "\n -m,--md5 Use MD5 encryption instead of DES" \ |
2927 | ) \ | 2927 | ) \ |
2928 | SKIP_GETOPT_LONG( \ | 2928 | SKIP_GETOPT_LONG( \ |
diff --git a/loginutils/chpasswd.c b/loginutils/chpasswd.c index 7308596ad..7908ef1a8 100644 --- a/loginutils/chpasswd.c +++ b/loginutils/chpasswd.c | |||
@@ -65,8 +65,8 @@ int chpasswd_main(int argc ATTRIBUTE_UNUSED, char **argv) | |||
65 | bb_info_msg("Password for '%s' changed", name); | 65 | bb_info_msg("Password for '%s' changed", name); |
66 | logmode = LOGMODE_STDIO; | 66 | logmode = LOGMODE_STDIO; |
67 | free(name); | 67 | free(name); |
68 | free(pass); | 68 | if (!(opt & OPT_ENC)) |
69 | free(pass); | ||
69 | } | 70 | } |
70 | 71 | return EXIT_SUCCESS; | |
71 | return 0; | ||
72 | } | 72 | } |