diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-06-13 12:27:17 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-06-13 12:27:17 +0000 |
commit | ca525b4f24a1a27ffe5dfc8d04c55227ca335ba0 (patch) | |
tree | 8ccf1f528aafeeb00368c41be74900db86d43d14 /libbb | |
parent | b51fd3525e48c79ef9e854dd357a9cdfdfeef72b (diff) | |
download | busybox-w32-ca525b4f24a1a27ffe5dfc8d04c55227ca335ba0.tar.gz busybox-w32-ca525b4f24a1a27ffe5dfc8d04c55227ca335ba0.tar.bz2 busybox-w32-ca525b4f24a1a27ffe5dfc8d04c55227ca335ba0.zip |
*: BB_BANNER -> bb_banner (it is not a const or #define)!
correct_password: explain in detail why it is ok to use bb_banner
fsck_minix: make it print bb version, not it's own (outdated/irrelevant) one
Marginal size difference:
text data bss dec hex filename
679119 2700 15632 697451 aa46b busybox_old
679091 2700 15632 697423 aa44f busybox_unstripped
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/correct_password.c | 11 | ||||
-rw-r--r-- | libbb/messages.c | 3 |
2 files changed, 9 insertions, 5 deletions
diff --git a/libbb/correct_password.c b/libbb/correct_password.c index 6255f7e65..d0f68c0cd 100644 --- a/libbb/correct_password.c +++ b/libbb/correct_password.c | |||
@@ -47,9 +47,14 @@ int correct_password(const struct passwd *pw) | |||
47 | char buffer[256]; | 47 | char buffer[256]; |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | correct = bb_msg_full_version; /* fake salt. crypt() can choke otherwise */ | 50 | /* fake salt. crypt() can choke otherwise. |
51 | if (!pw) | 51 | * (bb_banner's first two chars are letters and thus are valid salt) */ |
52 | goto fake_it; /* The content of 'correct' will never match */ | 52 | correct = bb_banner; |
53 | if (!pw) { | ||
54 | /* bb_banner will never match, it contains () which is never | ||
55 | * generated in valid encrypted passwords. */ | ||
56 | goto fake_it; | ||
57 | } | ||
53 | correct = pw->pw_passwd; | 58 | correct = pw->pw_passwd; |
54 | #if ENABLE_FEATURE_SHADOWPASSWDS | 59 | #if ENABLE_FEATURE_SHADOWPASSWDS |
55 | if (LONE_CHAR(pw->pw_passwd, 'x') || LONE_CHAR(pw->pw_passwd, '*')) { | 60 | if (LONE_CHAR(pw->pw_passwd, 'x') || LONE_CHAR(pw->pw_passwd, '*')) { |
diff --git a/libbb/messages.c b/libbb/messages.c index 56cccaf2c..8cab2dcc8 100644 --- a/libbb/messages.c +++ b/libbb/messages.c | |||
@@ -12,8 +12,7 @@ | |||
12 | #else | 12 | #else |
13 | #define BANNER "BusyBox v" BB_VER " (" BB_EXTRA_VERSION ")" | 13 | #define BANNER "BusyBox v" BB_VER " (" BB_EXTRA_VERSION ")" |
14 | #endif | 14 | #endif |
15 | const char BB_BANNER[] = BANNER; | 15 | const char bb_banner[] = BANNER; |
16 | const char bb_msg_full_version[] = BANNER " multi-call binary"; | ||
17 | 16 | ||
18 | const char bb_msg_memory_exhausted[] = "memory exhausted"; | 17 | const char bb_msg_memory_exhausted[] = "memory exhausted"; |
19 | const char bb_msg_invalid_date[] = "invalid date '%s'"; | 18 | const char bb_msg_invalid_date[] = "invalid date '%s'"; |