aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-10-12 04:18:05 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-10-12 04:18:05 +0200
commitd4d289acf5eb59ebae414f9aae8a74de30dce36a (patch)
tree7a7c261ce263eeb15d152a904936d55c41858b5e
parentb1993380ba4a89062a08b2b6c579158aa667759e (diff)
downloadbusybox-w32-d4d289acf5eb59ebae414f9aae8a74de30dce36a.tar.gz
busybox-w32-d4d289acf5eb59ebae414f9aae8a74de30dce36a.tar.bz2
busybox-w32-d4d289acf5eb59ebae414f9aae8a74de30dce36a.zip
tweaks to build system, mainly making menuconfig text and order clearer
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--Config.in61
-rw-r--r--include/applets.src.h5
-rw-r--r--include/busybox.h7
-rw-r--r--libbb/appletlib.c8
-rw-r--r--miscutils/Config.src1
-rw-r--r--networking/Config.src2
6 files changed, 46 insertions, 38 deletions
diff --git a/Config.in b/Config.in
index 828b30471..d9c823199 100644
--- a/Config.in
+++ b/Config.in
@@ -123,6 +123,14 @@ config FEATURE_INSTALLER
123 busybox at runtime to create hard links or symlinks for all the 123 busybox at runtime to create hard links or symlinks for all the
124 applets that are compiled into busybox. 124 applets that are compiled into busybox.
125 125
126config INSTALL_NO_USR
127 bool "Don't use /usr"
128 default n
129 depends on FEATURE_INSTALLER
130 help
131 Disable use of /usr. busybox --install will install applets
132 only to /bin and /sbin, never to /usr/bin or /usr/sbin.
133
126config LOCALE_SUPPORT 134config LOCALE_SUPPORT
127 bool "Enable locale support (system needs locale for this to work)" 135 bool "Enable locale support (system needs locale for this to work)"
128 default n 136 default n
@@ -275,15 +283,6 @@ config FEATURE_CLEAN_UP
275 Don't enable this unless you have a really good reason to clean 283 Don't enable this unless you have a really good reason to clean
276 things up manually. 284 things up manually.
277 285
278config FEATURE_UTMP
279 bool "Support utmp file"
280 default y
281 help
282 The file /var/run/utmp is used to track who is currently logged in.
283 With this option on, certain applets (getty, login, telnetd etc)
284 will create and delete entries there.
285 "who" applet requires this option.
286
287config FEATURE_WTMP 286config FEATURE_WTMP
288 bool "Support wtmp file" 287 bool "Support wtmp file"
289 default y 288 default y
@@ -295,6 +294,15 @@ config FEATURE_WTMP
295 will append new entries there. 294 will append new entries there.
296 "last" applet requires this option. 295 "last" applet requires this option.
297 296
297config FEATURE_UTMP
298 bool "Support utmp file"
299 default y
300 help
301 The file /var/run/utmp is used to track who is currently logged in.
302 With this option on, certain applets (getty, login, telnetd etc)
303 will create and delete entries there.
304 "who" applet requires this option.
305
298config FEATURE_PIDFILE 306config FEATURE_PIDFILE
299 bool "Support writing pidfiles" 307 bool "Support writing pidfiles"
300 default y 308 default y
@@ -307,14 +315,19 @@ config FEATURE_SUID
307 default y 315 default y
308 help 316 help
309 With this option you can install the busybox binary belonging 317 With this option you can install the busybox binary belonging
310 to root with the suid bit set, and it will automatically drop 318 to root with the suid bit set, enabling some applets to perform
311 priviledges for applets that don't need root access. 319 root-level operations even when run by ordinary users
320 (for example, mounting of user mounts in fstab needs this).
321
322 Busybox will automatically drop priviledges for applets
323 that don't need root access.
312 324
313 If you are really paranoid and don't want to do this, build two 325 If you are really paranoid and don't want to do this, build two
314 busybox binaries with different applets in them (and the appropriate 326 busybox binaries with different applets in them (and the appropriate
315 symlinks pointing to each binary), and only set the suid bit on the 327 symlinks pointing to each binary), and only set the suid bit on the
316 one that needs it. The applets currently marked to need the suid bit 328 one that needs it.
317 are: 329
330 The applets currently marked to need the suid bit are:
318 331
319 crontab, dnsd, findfs, ipcrm, ipcs, login, passwd, ping, su, 332 crontab, dnsd, findfs, ipcrm, ipcs, login, passwd, ping, su,
320 traceroute, vlock. 333 traceroute, vlock.
@@ -651,20 +664,13 @@ endchoice
651 664
652endmenu 665endmenu
653 666
654menu 'Installation Options' 667menu 'Installation Options ("make install" behavior)'
655
656config INSTALL_NO_USR
657 bool "Don't use /usr"
658 default n
659 help
660 Disable use of /usr. Don't activate this option if you don't know
661 that you really want this behaviour.
662 668
663choice 669choice
664 prompt "Applets links" 670 prompt "What kind of applet links to install"
665 default INSTALL_APPLET_SYMLINKS 671 default INSTALL_APPLET_SYMLINKS
666 help 672 help
667 Choose how you install applets links. 673 Choose what kind of links to applets are created by "make install".
668 674
669config INSTALL_APPLET_SYMLINKS 675config INSTALL_APPLET_SYMLINKS
670 bool "as soft-links" 676 bool "as soft-links"
@@ -688,8 +694,9 @@ config INSTALL_APPLET_DONT
688 bool "not installed" 694 bool "not installed"
689 depends on FEATURE_INSTALLER || FEATURE_SH_STANDALONE || FEATURE_PREFER_APPLETS 695 depends on FEATURE_INSTALLER || FEATURE_SH_STANDALONE || FEATURE_PREFER_APPLETS
690 help 696 help
691 Do not install applet links. Useful when using the -install feature 697 Do not install applet links. Useful when you plan to use
692 or a standalone shell for rescue purposes. 698 busybox --install for installing links, or plan to use
699 a standalone shell and thus don't need applet links.
693 700
694endchoice 701endchoice
695 702
@@ -713,8 +720,8 @@ config INSTALL_SH_APPLET_HARDLINK
713config INSTALL_SH_APPLET_SCRIPT_WRAPPER 720config INSTALL_SH_APPLET_SCRIPT_WRAPPER
714 bool "as script wrapper" 721 bool "as script wrapper"
715 help 722 help
716 Install /bin/sh applet as script wrapper that call the busybox 723 Install /bin/sh applet as script wrapper that calls
717 binary. 724 the busybox binary.
718 725
719endchoice 726endchoice
720 727
diff --git a/include/applets.src.h b/include/applets.src.h
index d2b1d198f..6a14a6588 100644
--- a/include/applets.src.h
+++ b/include/applets.src.h
@@ -56,11 +56,6 @@ s - suid type:
56# define APPLET_NOFORK(name,main,l,s,name2) { #name, #main, l, s, 1, 1 }, 56# define APPLET_NOFORK(name,main,l,s,name2) { #name, #main, l, s, 1, 1 },
57#endif 57#endif
58 58
59#if ENABLE_INSTALL_NO_USR
60# define _BB_DIR_USR_BIN _BB_DIR_BIN
61# define _BB_DIR_USR_SBIN _BB_DIR_SBIN
62#endif
63
64 59
65INSERT 60INSERT
66IF_TEST(APPLET_NOFORK([, test, _BB_DIR_USR_BIN, _BB_SUID_DROP, test)) 61IF_TEST(APPLET_NOFORK([, test, _BB_DIR_USR_BIN, _BB_SUID_DROP, test))
diff --git a/include/busybox.h b/include/busybox.h
index 76415dd72..757317fc7 100644
--- a/include/busybox.h
+++ b/include/busybox.h
@@ -16,8 +16,13 @@ typedef enum bb_install_loc_t {
16 _BB_DIR_ROOT = 0, 16 _BB_DIR_ROOT = 0,
17 _BB_DIR_BIN, 17 _BB_DIR_BIN,
18 _BB_DIR_SBIN, 18 _BB_DIR_SBIN,
19#if ENABLE_INSTALL_NO_USR
20 _BB_DIR_USR_BIN = _BB_DIR_BIN,
21 _BB_DIR_USR_SBIN = _BB_DIR_SBIN,
22#else
19 _BB_DIR_USR_BIN, 23 _BB_DIR_USR_BIN,
20 _BB_DIR_USR_SBIN 24 _BB_DIR_USR_SBIN,
25#endif
21} bb_install_loc_t; 26} bb_install_loc_t;
22 27
23typedef enum bb_suid_t { 28typedef enum bb_suid_t {
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 7326f4fa5..b32ff8808 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -592,9 +592,11 @@ static const char usr_sbin[] ALIGN1 = "/usr/sbin/";
592static const char *const install_dir[] = { 592static const char *const install_dir[] = {
593 &usr_bin [8], /* "/" */ 593 &usr_bin [8], /* "/" */
594 &usr_bin [4], /* "/bin/" */ 594 &usr_bin [4], /* "/bin/" */
595 &usr_sbin[4], /* "/sbin/" */ 595 &usr_sbin[4] /* "/sbin/" */
596 usr_bin, 596# if !ENABLE_INSTALL_NO_USR
597 usr_sbin 597 ,usr_bin
598 ,usr_sbin
599# endif
598}; 600};
599 601
600 602
diff --git a/miscutils/Config.src b/miscutils/Config.src
index 151f61bcc..4912daf88 100644
--- a/miscutils/Config.src
+++ b/miscutils/Config.src
@@ -136,7 +136,6 @@ config CHRT
136config CROND 136config CROND
137 bool "crond" 137 bool "crond"
138 default y 138 default y
139 select FEATURE_SUID
140 select FEATURE_SYSLOG 139 select FEATURE_SYSLOG
141 help 140 help
142 Crond is a background daemon that parses individual crontab 141 Crond is a background daemon that parses individual crontab
diff --git a/networking/Config.src b/networking/Config.src
index 9fc122bf3..6dd7df754 100644
--- a/networking/Config.src
+++ b/networking/Config.src
@@ -804,7 +804,7 @@ config TELNETD
804 804
805 mount -t devpts devpts /dev/pts 805 mount -t devpts devpts /dev/pts
806 806
807 You need to be sure that Busybox has LOGIN and 807 You need to be sure that busybox has LOGIN and
808 FEATURE_SUID enabled. And finally, you should make 808 FEATURE_SUID enabled. And finally, you should make
809 certain that Busybox has been installed setuid root: 809 certain that Busybox has been installed setuid root:
810 810