mirror of https://github.com/mirror/busybox.git
fix failures found by randomconfig builds
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>1_22_stable
parent
61be8e46a8
commit
198b02f7dd
|
@ -144,7 +144,7 @@ lib-$(CONFIG_DELUSER) += update_passwd.o
|
||||||
lib-$(CONFIG_PASSWD) += pw_encrypt.o update_passwd.o obscure.o
|
lib-$(CONFIG_PASSWD) += pw_encrypt.o update_passwd.o obscure.o
|
||||||
lib-$(CONFIG_CHPASSWD) += pw_encrypt.o update_passwd.o
|
lib-$(CONFIG_CHPASSWD) += pw_encrypt.o update_passwd.o
|
||||||
lib-$(CONFIG_CRYPTPW) += pw_encrypt.o
|
lib-$(CONFIG_CRYPTPW) += pw_encrypt.o
|
||||||
lib-$(CONFIG_SULOGIN) += pw_encrypt.o
|
lib-$(CONFIG_SULOGIN) += pw_encrypt.o correct_password.o
|
||||||
lib-$(CONFIG_VLOCK) += pw_encrypt.o correct_password.o
|
lib-$(CONFIG_VLOCK) += pw_encrypt.o correct_password.o
|
||||||
lib-$(CONFIG_SU) += pw_encrypt.o correct_password.o
|
lib-$(CONFIG_SU) += pw_encrypt.o correct_password.o
|
||||||
lib-$(CONFIG_LOGIN) += pw_encrypt.o correct_password.o
|
lib-$(CONFIG_LOGIN) += pw_encrypt.o correct_password.o
|
||||||
|
|
|
@ -30,15 +30,6 @@
|
||||||
|
|
||||||
#include "libbb.h"
|
#include "libbb.h"
|
||||||
|
|
||||||
void FAST_FUNC nuke_str(char *str)
|
|
||||||
{
|
|
||||||
if (str) {
|
|
||||||
while (*str)
|
|
||||||
*str++ = 0;
|
|
||||||
/* or: memset(str, 0, strlen(str)); - not as small as above */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Ask the user for a password.
|
/* Ask the user for a password.
|
||||||
* Return 1 without asking if PW has an empty password.
|
* Return 1 without asking if PW has an empty password.
|
||||||
* Return -1 on EOF, error while reading input, or timeout.
|
* Return -1 on EOF, error while reading input, or timeout.
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* Utility routines.
|
* Utility routines.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//kbuild:lib-$(CONFIG_ARP) += in_ether.o
|
||||||
//kbuild:lib-$(CONFIG_IFCONFIG) += in_ether.o
|
//kbuild:lib-$(CONFIG_IFCONFIG) += in_ether.o
|
||||||
//kbuild:lib-$(CONFIG_IFENSLAVE) += in_ether.o
|
//kbuild:lib-$(CONFIG_IFENSLAVE) += in_ether.o
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
/* vi: set sw=4 ts=4: */
|
||||||
|
/*
|
||||||
|
* Utility routines.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2008 Denys Vlasenko
|
||||||
|
*
|
||||||
|
* Licensed under GPLv2, see file LICENSE in this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//kbuild:lib-y += nuke_str.o
|
||||||
|
|
||||||
|
#include "libbb.h"
|
||||||
|
|
||||||
|
void FAST_FUNC nuke_str(char *str)
|
||||||
|
{
|
||||||
|
if (str) {
|
||||||
|
while (*str)
|
||||||
|
*str++ = 0;
|
||||||
|
/* or: memset(str, 0, strlen(str)); - not as small as above */
|
||||||
|
}
|
||||||
|
}
|
|
@ -65,6 +65,7 @@ if test x"$LIBC" = x"uclibc"; then
|
||||||
| grep -v CONFIG_BUILD_LIBBUSYBOX \
|
| grep -v CONFIG_BUILD_LIBBUSYBOX \
|
||||||
| grep -v CONFIG_PIE \
|
| grep -v CONFIG_PIE \
|
||||||
\
|
\
|
||||||
|
| grep -v CONFIG_FEATURE_TOUCH_NODEREF \
|
||||||
| grep -v CONFIG_FEATURE_2_4_MODULES \
|
| grep -v CONFIG_FEATURE_2_4_MODULES \
|
||||||
>.config.new
|
>.config.new
|
||||||
mv .config.new .config
|
mv .config.new .config
|
||||||
|
@ -72,6 +73,7 @@ if test x"$LIBC" = x"uclibc"; then
|
||||||
echo '# CONFIG_BUILD_LIBBUSYBOX is not set' >>.config
|
echo '# CONFIG_BUILD_LIBBUSYBOX is not set' >>.config
|
||||||
echo '# CONFIG_PIE is not set' >>.config
|
echo '# CONFIG_PIE is not set' >>.config
|
||||||
echo '# CONFIG_FEATURE_2_4_MODULES is not set' >>.config
|
echo '# CONFIG_FEATURE_2_4_MODULES is not set' >>.config
|
||||||
|
echo '# CONFIG_FEATURE_TOUCH_NODEREF is not set' >>.config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If STATIC, remove some things.
|
# If STATIC, remove some things.
|
||||||
|
|
|
@ -269,10 +269,12 @@ testing "awk FS assignment" "awk '{FS=\":\"; print \$1}'" \
|
||||||
"" \
|
"" \
|
||||||
"a:b c:d\ne:f g:h"
|
"a:b c:d\ne:f g:h"
|
||||||
|
|
||||||
|
optional FEATURE_AWK_LIBM
|
||||||
testing "awk large integer" \
|
testing "awk large integer" \
|
||||||
"awk 'BEGIN{n=(2^31)-1; print n, int(n), n%1, ++n, int(n), n%1}'" \
|
"awk 'BEGIN{n=(2^31)-1; print n, int(n), n%1, ++n, int(n), n%1}'" \
|
||||||
"2147483647 2147483647 0 2147483648 2147483648 0\n" \
|
"2147483647 2147483647 0 2147483648 2147483648 0\n" \
|
||||||
"" ""
|
"" ""
|
||||||
|
SKIP=
|
||||||
|
|
||||||
testing "awk length(array)" \
|
testing "awk length(array)" \
|
||||||
"awk 'BEGIN{ A[1]=2; A[\"qwe\"]=\"asd\"; print length(A)}'" \
|
"awk 'BEGIN{ A[1]=2; A[\"qwe\"]=\"asd\"; print length(A)}'" \
|
||||||
|
@ -285,11 +287,13 @@ testing "awk -f and ARGC" \
|
||||||
"do re mi\n" \
|
"do re mi\n" \
|
||||||
'{print $2; print ARGC;}' \
|
'{print $2; print ARGC;}' \
|
||||||
|
|
||||||
|
optional FEATURE_AWK_GNU_EXTENSIONS
|
||||||
testing "awk -e and ARGC" \
|
testing "awk -e and ARGC" \
|
||||||
"awk -e '{print \$2; print ARGC;}' input" \
|
"awk -e '{print \$2; print ARGC;}' input" \
|
||||||
"re\n2\n" \
|
"re\n2\n" \
|
||||||
"do re mi\n" \
|
"do re mi\n" \
|
||||||
"" \
|
""
|
||||||
|
SKIP=
|
||||||
|
|
||||||
# testing "description" "command" "result" "infile" "stdin"
|
# testing "description" "command" "result" "infile" "stdin"
|
||||||
|
|
||||||
|
|
|
@ -25,10 +25,12 @@ tar: short read
|
||||||
SKIP=
|
SKIP=
|
||||||
|
|
||||||
optional FEATURE_SEAMLESS_GZ
|
optional FEATURE_SEAMLESS_GZ
|
||||||
|
# In NOMMU case, "invalid magic" message comes from gunzip child process.
|
||||||
|
# Otherwise, it comes from tar.
|
||||||
|
# Need to fix output up to avoid false positive.
|
||||||
testing "Empty file is not a tarball.tar.gz" '\
|
testing "Empty file is not a tarball.tar.gz" '\
|
||||||
tar xvzf - 2>&1; echo $?
|
{ tar xvzf - 2>&1; echo $?; } | grep -Fv "invalid magic"
|
||||||
' "\
|
' "\
|
||||||
tar: invalid magic
|
|
||||||
tar: short read
|
tar: short read
|
||||||
1
|
1
|
||||||
" \
|
" \
|
||||||
|
|
Loading…
Reference in New Issue