aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/Kbuild.src2
-rw-r--r--libbb/correct_password.c9
-rw-r--r--libbb/in_ether.c1
-rw-r--r--libbb/nuke_str.c21
4 files changed, 23 insertions, 10 deletions
diff --git a/libbb/Kbuild.src b/libbb/Kbuild.src
index c5d86c092..a6468f171 100644
--- a/libbb/Kbuild.src
+++ b/libbb/Kbuild.src
@@ -144,7 +144,7 @@ lib-$(CONFIG_DELUSER) += update_passwd.o
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
diff --git a/libbb/correct_password.c b/libbb/correct_password.c
index 5727c65fb..acadf3914 100644
--- a/libbb/correct_password.c
+++ b/libbb/correct_password.c
@@ -30,15 +30,6 @@
#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.
diff --git a/libbb/in_ether.c b/libbb/in_ether.c
index dadadbafe..1de383bde 100644
--- a/libbb/in_ether.c
+++ b/libbb/in_ether.c
@@ -3,6 +3,7 @@
* Utility routines.
*/
+//kbuild:lib-$(CONFIG_ARP) += in_ether.o
//kbuild:lib-$(CONFIG_IFCONFIG) += in_ether.o
//kbuild:lib-$(CONFIG_IFENSLAVE) += in_ether.o
diff --git a/libbb/nuke_str.c b/libbb/nuke_str.c
new file mode 100644
index 000000000..56b808bc7
--- /dev/null
+++ b/libbb/nuke_str.c
@@ -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 */
+ }
+}