diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-08-05 09:56:56 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-08-05 09:56:56 +0000 |
commit | 9b44613202a6f2f080ec23746d0680dcef88628d (patch) | |
tree | aaaf60ddaa287ead3b4461dabe38c4333ee924c0 | |
parent | 35d8c47987a96a53d810bae94b50442fda07b4fc (diff) | |
download | busybox-w32-9b44613202a6f2f080ec23746d0680dcef88628d.tar.gz busybox-w32-9b44613202a6f2f080ec23746d0680dcef88628d.tar.bz2 busybox-w32-9b44613202a6f2f080ec23746d0680dcef88628d.zip |
- don't free user-supplied string (via -e)
- fix helptext
function old new delta
chpasswd_main 300 319 +19
packed_usage 24352 24344 -8
.rodata 122227 122195 -32
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 19/-40) Total: -21 bytes
-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 1f9d5621d..ae6d2bcb6 100644 --- a/include/usage.h +++ b/include/usage.h | |||
@@ -2924,13 +2924,13 @@ | |||
2924 | "\n -u Unlock (re-enable) account" \ | 2924 | "\n -u Unlock (re-enable) account" \ |
2925 | 2925 | ||
2926 | #define chpasswd_trivial_usage \ | 2926 | #define chpasswd_trivial_usage \ |
2927 | USE_GETOPT_LONG("[--md5|--encrypt]") SKIP_GETOPT_LONG("[-m|-e]") | 2927 | USE_GETOPT_LONG("[--md5|--encrypted]") SKIP_GETOPT_LONG("[-m|-e]") |
2928 | #define chpasswd_full_usage "\n\n" \ | 2928 | #define chpasswd_full_usage "\n\n" \ |
2929 | "Read user:password information from stdin\n" \ | 2929 | "Read user:password information from stdin " \ |
2930 | "and update /etc/passwd accordingly.\n" \ | 2930 | "and update /etc/passwd accordingly.\n" \ |
2931 | "\nOptions:" \ | 2931 | "\nOptions:" \ |
2932 | USE_GETOPT_LONG( \ | 2932 | USE_GETOPT_LONG( \ |
2933 | "\n -e,--encrypt Supplied passwords are in encrypted form" \ | 2933 | "\n -e,--encrypted Supplied passwords are in encrypted form" \ |
2934 | "\n -m,--md5 Use MD5 encryption instead of DES" \ | 2934 | "\n -m,--md5 Use MD5 encryption instead of DES" \ |
2935 | ) \ | 2935 | ) \ |
2936 | SKIP_GETOPT_LONG( \ | 2936 | SKIP_GETOPT_LONG( \ |
diff --git a/loginutils/chpasswd.c b/loginutils/chpasswd.c index 25145fd1c..c83d1dad7 100644 --- a/loginutils/chpasswd.c +++ b/loginutils/chpasswd.c | |||
@@ -65,8 +65,8 @@ int chpasswd_main(int argc UNUSED_PARAM, 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 | } |