svn commit: trunk/busybox: include loginutils
aldot at busybox.net
aldot at busybox.net
Tue Aug 5 09:56:56 UTC 2008
Author: aldot
Date: 2008-08-05 02:56:56 -0700 (Tue, 05 Aug 2008)
New Revision: 23046
Log:
- 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
Modified:
trunk/busybox/include/usage.h
trunk/busybox/loginutils/chpasswd.c
Changeset:
Modified: trunk/busybox/include/usage.h
===================================================================
--- trunk/busybox/include/usage.h 2008-08-05 07:59:25 UTC (rev 23045)
+++ trunk/busybox/include/usage.h 2008-08-05 09:56:56 UTC (rev 23046)
@@ -2924,13 +2924,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( \
Modified: trunk/busybox/loginutils/chpasswd.c
===================================================================
--- trunk/busybox/loginutils/chpasswd.c 2008-08-05 07:59:25 UTC (rev 23045)
+++ trunk/busybox/loginutils/chpasswd.c 2008-08-05 09:56:56 UTC (rev 23046)
@@ -65,8 +65,8 @@
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;
}
More information about the busybox-cvs
mailing list