aboutsummaryrefslogtreecommitdiff
path: root/loginutils
diff options
context:
space:
mode:
Diffstat (limited to 'loginutils')
-rw-r--r--loginutils/Config.in68
-rw-r--r--loginutils/Kbuild17
-rw-r--r--loginutils/Makefile23
-rw-r--r--loginutils/Makefile.in52
4 files changed, 51 insertions, 109 deletions
diff --git a/loginutils/Config.in b/loginutils/Config.in
index 6e45b706a..f434585ef 100644
--- a/loginutils/Config.in
+++ b/loginutils/Config.in
@@ -5,7 +5,7 @@
5 5
6menu "Login/Password Management Utilities" 6menu "Login/Password Management Utilities"
7 7
8config CONFIG_FEATURE_SHADOWPASSWDS 8config FEATURE_SHADOWPASSWDS
9 bool "Support for shadow passwords" 9 bool "Support for shadow passwords"
10 default n 10 default n
11 help 11 help
@@ -13,10 +13,10 @@ config CONFIG_FEATURE_SHADOWPASSWDS
13 readable by root and thus the encrypted passwords are no longer 13 readable by root and thus the encrypted passwords are no longer
14 publicly readable. 14 publicly readable.
15 15
16config CONFIG_USE_BB_SHADOW 16config USE_BB_SHADOW
17 bool " Use busybox shadow password functions" 17 bool " Use busybox shadow password functions"
18 default y 18 default y
19 depends on CONFIG_USE_BB_PWD_GRP && CONFIG_FEATURE_SHADOWPASSWDS 19 depends on USE_BB_PWD_GRP && FEATURE_SHADOWPASSWDS
20 help 20 help
21 If you leave this disabled, busybox will use the system's shadow 21 If you leave this disabled, busybox will use the system's shadow
22 password handling functions. And if you are using the GNU C library 22 password handling functions. And if you are using the GNU C library
@@ -32,7 +32,7 @@ config CONFIG_USE_BB_SHADOW
32 able to use PAM to access shadow passwords from remote LDAP 32 able to use PAM to access shadow passwords from remote LDAP
33 password servers and whatnot. 33 password servers and whatnot.
34 34
35config CONFIG_USE_BB_PWD_GRP 35config USE_BB_PWD_GRP
36 bool "Use internal password and group functions rather than system functions" 36 bool "Use internal password and group functions rather than system functions"
37 default n 37 default n
38 help 38 help
@@ -53,86 +53,86 @@ config CONFIG_USE_BB_PWD_GRP
53 53
54 If you enable this option, it will add about 1.5k to busybox. 54 If you enable this option, it will add about 1.5k to busybox.
55 55
56config CONFIG_ADDGROUP 56config ADDGROUP
57 bool "addgroup" 57 bool "addgroup"
58 default n 58 default n
59 help 59 help
60 Utility for creating a new group account. 60 Utility for creating a new group account.
61 61
62config CONFIG_DELGROUP 62config DELGROUP
63 bool "delgroup" 63 bool "delgroup"
64 default n 64 default n
65 help 65 help
66 Utility for deleting a group account. 66 Utility for deleting a group account.
67 67
68config CONFIG_ADDUSER 68config ADDUSER
69 bool "adduser" 69 bool "adduser"
70 default n 70 default n
71 help 71 help
72 Utility for creating a new user account. 72 Utility for creating a new user account.
73 73
74config CONFIG_DELUSER 74config DELUSER
75 bool "deluser" 75 bool "deluser"
76 default n 76 default n
77 help 77 help
78 Utility for deleting a user account. 78 Utility for deleting a user account.
79 79
80config CONFIG_GETTY 80config GETTY
81 bool "getty" 81 bool "getty"
82 default n 82 default n
83 select CONFIG_FEATURE_SYSLOG 83 select FEATURE_SYSLOG
84 help 84 help
85 getty lets you log in on a tty, it is normally invoked by init. 85 getty lets you log in on a tty, it is normally invoked by init.
86 86
87config CONFIG_FEATURE_UTMP 87config FEATURE_UTMP
88 bool "Support utmp file" 88 bool "Support utmp file"
89 depends on CONFIG_GETTY || CONFIG_LOGIN || CONFIG_SU || CONFIG_WHO 89 depends on GETTY || LOGIN || SU || WHO
90 default n 90 default n
91 help 91 help
92 The file /var/run/utmp is used to track who is currently logged in. 92 The file /var/run/utmp is used to track who is currently logged in.
93 93
94config CONFIG_FEATURE_WTMP 94config FEATURE_WTMP
95 bool "Support wtmp file" 95 bool "Support wtmp file"
96 depends on CONFIG_GETTY || CONFIG_LOGIN || CONFIG_SU || CONFIG_LAST 96 depends on GETTY || LOGIN || SU || LAST
97 default n 97 default n
98 select CONFIG_FEATURE_UTMP 98 select FEATURE_UTMP
99 help 99 help
100 The file /var/run/wtmp is used to track when user's have logged into 100 The file /var/run/wtmp is used to track when user's have logged into
101 and logged out of the system. 101 and logged out of the system.
102 102
103config CONFIG_LOGIN 103config LOGIN
104 bool "login" 104 bool "login"
105 default n 105 default n
106 select CONFIG_FEATURE_SUID 106 select FEATURE_SUID
107 select CONFIG_FEATURE_SYSLOG 107 select FEATURE_SYSLOG
108 help 108 help
109 login is used when signing onto a system. 109 login is used when signing onto a system.
110 110
111 Note that Busybox binary must be setuid root for this applet to 111 Note that Busybox binary must be setuid root for this applet to
112 work properly. 112 work properly.
113 113
114config CONFIG_LOGIN_SCRIPTS 114config LOGIN_SCRIPTS
115 bool "Support for login scripts" 115 bool "Support for login scripts"
116 depends on CONFIG_LOGIN 116 depends on LOGIN
117 default n 117 default n
118 help 118 help
119 Enable this if you want login to execute $LOGIN_PRE_SUID_SCRIPT 119 Enable this if you want login to execute $LOGIN_PRE_SUID_SCRIPT
120 just prior to swithching from root to logged-in user. 120 just prior to swithching from root to logged-in user.
121 121
122config CONFIG_FEATURE_SECURETTY 122config FEATURE_SECURETTY
123 bool "Support for /etc/securetty" 123 bool "Support for /etc/securetty"
124 default y 124 default y
125 depends on CONFIG_LOGIN 125 depends on LOGIN
126 help 126 help
127 The file /etc/securetty is used by (some versions of) login(1). 127 The file /etc/securetty is used by (some versions of) login(1).
128 The file contains the device names of tty lines (one per line, 128 The file contains the device names of tty lines (one per line,
129 without leading /dev/) on which root is allowed to login. 129 without leading /dev/) on which root is allowed to login.
130 130
131config CONFIG_PASSWD 131config PASSWD
132 bool "passwd" 132 bool "passwd"
133 default n 133 default n
134 select CONFIG_FEATURE_SUID 134 select FEATURE_SUID
135 select CONFIG_FEATURE_SYSLOG 135 select FEATURE_SYSLOG
136 help 136 help
137 passwd changes passwords for user and group accounts. A normal user 137 passwd changes passwords for user and group accounts. A normal user
138 may only change the password for his/her own account, the super user 138 may only change the password for his/her own account, the super user
@@ -142,11 +142,11 @@ config CONFIG_PASSWD
142 Note that Busybox binary must be setuid root for this applet to 142 Note that Busybox binary must be setuid root for this applet to
143 work properly. 143 work properly.
144 144
145config CONFIG_SU 145config SU
146 bool "su" 146 bool "su"
147 default n 147 default n
148 select CONFIG_FEATURE_SUID 148 select FEATURE_SUID
149 select CONFIG_FEATURE_SYSLOG 149 select FEATURE_SYSLOG
150 help 150 help
151 su is used to become another user during a login session. 151 su is used to become another user during a login session.
152 Invoked without a username, su defaults to becoming the super user. 152 Invoked without a username, su defaults to becoming the super user.
@@ -154,25 +154,25 @@ config CONFIG_SU
154 Note that Busybox binary must be setuid root for this applet to 154 Note that Busybox binary must be setuid root for this applet to
155 work properly. 155 work properly.
156 156
157config CONFIG_SU_SYSLOG 157config SU_SYSLOG
158 bool "Support for syslog in su" 158 bool "Support for syslog in su"
159 default y 159 default y
160 depends on CONFIG_SU 160 depends on SU
161 help 161 help
162 Enables support for syslog in su. 162 Enables support for syslog in su.
163 163
164config CONFIG_SULOGIN 164config SULOGIN
165 bool "sulogin" 165 bool "sulogin"
166 default n 166 default n
167 select CONFIG_FEATURE_SYSLOG 167 select FEATURE_SYSLOG
168 help 168 help
169 sulogin is invoked when the system goes into single user 169 sulogin is invoked when the system goes into single user
170 mode (this is done through an entry in inittab). 170 mode (this is done through an entry in inittab).
171 171
172config CONFIG_VLOCK 172config VLOCK
173 bool "vlock" 173 bool "vlock"
174 default n 174 default n
175 select CONFIG_FEATURE_SUID 175 select FEATURE_SUID
176 help 176 help
177 Build the "vlock" applet which allows you to lock (virtual) terminals. 177 Build the "vlock" applet which allows you to lock (virtual) terminals.
178 178
diff --git a/loginutils/Kbuild b/loginutils/Kbuild
new file mode 100644
index 000000000..6c9d193e1
--- /dev/null
+++ b/loginutils/Kbuild
@@ -0,0 +1,17 @@
1# Makefile for busybox
2#
3# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
4#
5# Licensed under the GPL v2, see the file LICENSE in this tarball.
6
7lib-y:=
8lib-$(CONFIG_ADDGROUP) += addgroup.o
9lib-$(CONFIG_ADDUSER) += adduser.o
10lib-$(CONFIG_GETTY) += getty.o
11lib-$(CONFIG_LOGIN) += login.o
12lib-$(CONFIG_PASSWD) += passwd.o
13lib-$(CONFIG_SU) += su.o
14lib-$(CONFIG_SULOGIN) += sulogin.o
15lib-$(CONFIG_VLOCK) += vlock.o
16lib-$(CONFIG_DELUSER) += deluser.o
17lib-$(CONFIG_DELGROUP) += deluser.o
diff --git a/loginutils/Makefile b/loginutils/Makefile
deleted file mode 100644
index b81f42964..000000000
--- a/loginutils/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
1# Makefile for busybox
2#
3# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
4#
5# Licensed under the GPL v2, see the file LICENSE in this tarball.
6
7ifndef top_srcdir
8top_srcdir=..
9endif
10ifndef top_builddir
11top_builddir=..
12endif
13srcdir=$(top_srcdir)/loginutils
14LOGINUTILS_DIR:=./
15include $(top_srcdir)/Rules.mak
16include $(top_builddir)/.config
17include Makefile.in
18all: $(libraries-y)
19-include $(top_builddir)/.depend
20
21clean:
22 rm -f *.o *.a $(AR_TARGET)
23
diff --git a/loginutils/Makefile.in b/loginutils/Makefile.in
deleted file mode 100644
index 0063762ab..000000000
--- a/loginutils/Makefile.in
+++ /dev/null
@@ -1,52 +0,0 @@
1# Makefile for busybox
2#
3# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
4#
5# Licensed under the GPL v2, see the file LICENSE in this tarball.
6
7LOGINUTILS_AR:=loginutils.a
8ifndef LOGINUTILS_DIR
9LOGINUTILS_DIR:=$(top_builddir)/loginutils/
10endif
11srcdir=$(top_srcdir)/loginutils
12
13LOGINUTILS-y:=
14LOGINUTILS-$(CONFIG_ADDGROUP) += addgroup.o
15LOGINUTILS-$(CONFIG_ADDUSER) += adduser.o
16LOGINUTILS-$(CONFIG_GETTY) += getty.o
17LOGINUTILS-$(CONFIG_LOGIN) += login.o
18LOGINUTILS-$(CONFIG_PASSWD) += passwd.o
19LOGINUTILS-$(CONFIG_SU) += su.o
20LOGINUTILS-$(CONFIG_SULOGIN) += sulogin.o
21LOGINUTILS-$(CONFIG_VLOCK) += vlock.o
22LOGINUTILS-$(CONFIG_DELUSER) += deluser.o
23LOGINUTILS-$(CONFIG_DELGROUP) += deluser.o
24
25LOGINUTILS-y:=$(sort $(LOGINUTILS-y))
26
27ifneq ($(strip $(LOGINUTILS-y)),)
28libraries-y+=$(LOGINUTILS_DIR)$(LOGINUTILS_AR)
29endif
30
31LOGINUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(LOGINUTILS-y))
32LOGINUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
33APPLET_SRC-y+=$(LOGINUTILS_SRC-y)
34APPLET_SRC-a+=$(LOGINUTILS_SRC-a)
35
36needcrypt-y:=
37needcrypt-$(CONFIG_LOGIN) := y
38needcrypt-$(CONFIG_PASSWD) := y
39needcrypt-$(CONFIG_SU) := y
40needcrypt-$(CONFIG_SULOGIN) := y
41needcrypt-$(CONFIG_VLOCK) := y
42
43
44ifeq ($(needcrypt-y),y)
45 LIBRARIES := -lcrypt $(filter-out -lcrypt,$(LIBRARIES))
46endif
47
48$(LOGINUTILS_DIR)$(LOGINUTILS_AR): $(patsubst %,$(LOGINUTILS_DIR)%, $(LOGINUTILS-y))
49 $(do_ar)
50
51$(LOGINUTILS_DIR)%.o: $(srcdir)/%.c
52 $(compile.c)