lib-$(CONFIG_PASSWD) += pw_encrypt.o update_passwd.o obscure.o
lib-$(CONFIG_CHPASSWD) += pw_encrypt.o update_passwd.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_SU) += pw_encrypt.o correct_password.o
lib-$(CONFIG_LOGIN) += pw_encrypt.o correct_password.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 */
- }
-}
-
/* Ask the user for a password.
* Return 1 without asking if PW has an empty password.
* Return -1 on EOF, error while reading input, or timeout.
* Utility routines.
*/
+//kbuild:lib-$(CONFIG_ARP) += in_ether.o
//kbuild:lib-$(CONFIG_IFCONFIG) += in_ether.o
//kbuild:lib-$(CONFIG_IFENSLAVE) += in_ether.o
--- /dev/null
+/* 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 */
+ }
+}
| grep -v CONFIG_BUILD_LIBBUSYBOX \
| grep -v CONFIG_PIE \
\
+ | grep -v CONFIG_FEATURE_TOUCH_NODEREF \
| grep -v CONFIG_FEATURE_2_4_MODULES \
>.config.new
mv .config.new .config
echo '# CONFIG_BUILD_LIBBUSYBOX is not set' >>.config
echo '# CONFIG_PIE is not set' >>.config
echo '# CONFIG_FEATURE_2_4_MODULES is not set' >>.config
+ echo '# CONFIG_FEATURE_TOUCH_NODEREF is not set' >>.config
fi
# If STATIC, remove some things.
"" \
"a:b c:d\ne:f g:h"
+optional FEATURE_AWK_LIBM
testing "awk large integer" \
"awk 'BEGIN{n=(2^31)-1; print n, int(n), n%1, ++n, int(n), n%1}'" \
"2147483647 2147483647 0 2147483648 2147483648 0\n" \
"" ""
+SKIP=
testing "awk length(array)" \
"awk 'BEGIN{ A[1]=2; A[\"qwe\"]=\"asd\"; print length(A)}'" \
"do re mi\n" \
'{print $2; print ARGC;}' \
+optional FEATURE_AWK_GNU_EXTENSIONS
testing "awk -e and ARGC" \
"awk -e '{print \$2; print ARGC;}' input" \
"re\n2\n" \
"do re mi\n" \
- "" \
+ ""
+SKIP=
# testing "description" "command" "result" "infile" "stdin"
SKIP=
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" '\
-tar xvzf - 2>&1; echo $?
+{ tar xvzf - 2>&1; echo $?; } | grep -Fv "invalid magic"
' "\
-tar: invalid magic
tar: short read
1
" \