diff options
-rw-r--r-- | TODO_config_nommu | 696 | ||||
-rw-r--r-- | archival/libunarchive/Kbuild | 8 | ||||
-rw-r--r-- | console-tools/openvt.c | 29 | ||||
-rw-r--r-- | e2fsprogs/fsck.c | 15 | ||||
-rw-r--r-- | include/libbb.h | 25 | ||||
-rw-r--r-- | libbb/vfork_daemon_rexec.c | 10 | ||||
-rw-r--r-- | loginutils/login.c | 35 | ||||
-rw-r--r-- | miscutils/setsid.c | 15 | ||||
-rw-r--r-- | networking/httpd.c | 14 | ||||
-rw-r--r-- | runit/sv.c | 17 |
10 files changed, 769 insertions, 95 deletions
diff --git a/TODO_config_nommu b/TODO_config_nommu new file mode 100644 index 000000000..74095aa9a --- /dev/null +++ b/TODO_config_nommu @@ -0,0 +1,696 @@ +# This .config compiles for NOMMU. +# TODO: +# Pick disabled applet, enable & try to make it compile & work on NOMMU + +# +# Automatically generated make config: don't edit +# Busybox version: 1.6.0.svn +# Mon Mar 26 15:00:56 2007 +# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Busybox Settings +# + +# +# General Configuration +# +# CONFIG_NITPICK is not set +# CONFIG_DESKTOP is not set +# CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_SHOW_USAGE=y +CONFIG_FEATURE_VERBOSE_USAGE=y +# CONFIG_FEATURE_COMPRESS_USAGE is not set +CONFIG_FEATURE_INSTALLER=y +# CONFIG_LOCALE_SUPPORT is not set +CONFIG_GETOPT_LONG=y +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +CONFIG_FEATURE_SUID=y +CONFIG_FEATURE_SYSLOG=y +# CONFIG_FEATURE_SUID_CONFIG is not set +# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set +# CONFIG_FEATURE_HAVE_RPC is not set +# CONFIG_SELINUX is not set +# CONFIG_FEATURE_EXEC_PREFER_APPLETS is not set +CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_BUILD_LIBBUSYBOX is not set +# CONFIG_FEATURE_FULL_LIBBUSYBOX is not set +# CONFIG_FEATURE_SHARED_BUSYBOX is not set +CONFIG_LFS=y +# CONFIG_BUILD_AT_ONCE is not set + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +CONFIG_WERROR=y +# CONFIG_NO_DEBUG_LIB is not set +# CONFIG_DMALLOC is not set +# CONFIG_EFENCE is not set +CONFIG_INCLUDE_SUSv2=y + +# +# Installation Options +# +# CONFIG_INSTALL_NO_USR is not set +CONFIG_INSTALL_APPLET_SYMLINKS=y +# CONFIG_INSTALL_APPLET_HARDLINKS is not set +# CONFIG_INSTALL_APPLET_DONT is not set +CONFIG_PREFIX="./_install" + +# +# Busybox Library Tuning +# +CONFIG_PASSWORD_MINLEN=6 +CONFIG_MD5_SIZE_VS_SPEED=2 +CONFIG_FEATURE_EDITING=y +# CONFIG_FEATURE_EDITING_FANCY_KEYS is not set +# CONFIG_FEATURE_EDITING_VI is not set +CONFIG_FEATURE_EDITING_HISTORY=15 +# CONFIG_FEATURE_EDITING_SAVEHISTORY is not set +# CONFIG_FEATURE_TAB_COMPLETION is not set +# CONFIG_FEATURE_USERNAME_COMPLETION is not set +# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set + +# +# Applets +# + +# +# Archival Utilities +# +CONFIG_AR=y +CONFIG_FEATURE_AR_LONG_FILENAMES=y +CONFIG_BUNZIP2=y +CONFIG_CPIO=y +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set +CONFIG_GUNZIP=y +CONFIG_FEATURE_GUNZIP_UNCOMPRESS=y +CONFIG_GZIP=y +CONFIG_RPM2CPIO=y +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +# CONFIG_FEATURE_TAR_BZIP2 is not set +# CONFIG_FEATURE_TAR_LZMA is not set +CONFIG_FEATURE_TAR_FROM=y +# CONFIG_FEATURE_TAR_GZIP is not set +# CONFIG_FEATURE_TAR_COMPRESS is not set +CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +CONFIG_FEATURE_TAR_LONG_OPTIONS=y +CONFIG_UNCOMPRESS=y +CONFIG_UNLZMA=y +CONFIG_FEATURE_LZMA_FAST=y +CONFIG_UNZIP=y + +# +# Common options for cpio and tar +# +CONFIG_FEATURE_UNARCHIVE_TAPE=y +# CONFIG_FEATURE_DEB_TAR_GZ is not set +# CONFIG_FEATURE_DEB_TAR_BZ2 is not set +# CONFIG_FEATURE_DEB_TAR_LZMA is not set + +# +# Coreutils +# +CONFIG_BASENAME=y +CONFIG_CAL=y +CONFIG_CAT=y +CONFIG_CATV=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_CHROOT=y +CONFIG_CKSUM=y +CONFIG_CMP=y +CONFIG_COMM=y +CONFIG_CP=y +CONFIG_CUT=y +CONFIG_DATE=y +CONFIG_FEATURE_DATE_ISOFMT=y +CONFIG_DD=y +CONFIG_FEATURE_DD_SIGNAL_HANDLING=y +CONFIG_FEATURE_DD_IBS_OBS=y +CONFIG_DF=y +CONFIG_DIFF=y +CONFIG_FEATURE_DIFF_BINARY=y +CONFIG_FEATURE_DIFF_DIR=y +CONFIG_FEATURE_DIFF_MINIMAL=y +CONFIG_DIRNAME=y +CONFIG_DOS2UNIX=y +CONFIG_UNIX2DOS=y +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +CONFIG_FEATURE_ENV_LONG_OPTIONS=y +CONFIG_EXPR=y +CONFIG_EXPR_MATH_SUPPORT_64=y +CONFIG_FALSE=y +CONFIG_FOLD=y +CONFIG_HEAD=y +CONFIG_FEATURE_FANCY_HEAD=y +CONFIG_HOSTID=y +CONFIG_ID=y +CONFIG_INSTALL=y +CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y +CONFIG_LENGTH=y +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +CONFIG_FEATURE_MV_LONG_OPTIONS=y +CONFIG_NICE=y +CONFIG_NOHUP=y +CONFIG_OD=y +CONFIG_PRINTENV=y +CONFIG_PRINTF=y +CONFIG_PWD=y +CONFIG_REALPATH=y +CONFIG_RM=y +CONFIG_RMDIR=y +CONFIG_SEQ=y +CONFIG_SHA1SUM=y +CONFIG_SLEEP=y +CONFIG_FEATURE_FANCY_SLEEP=y +CONFIG_SORT=y +CONFIG_FEATURE_SORT_BIG=y +CONFIG_SPLIT=y +CONFIG_STAT=y +CONFIG_FEATURE_STAT_FORMAT=y +CONFIG_STTY=y +CONFIG_SUM=y +CONFIG_SYNC=y +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +CONFIG_FEATURE_TEE_USE_BLOCK_IO=y +CONFIG_TEST=y +CONFIG_FEATURE_TEST_64=y +CONFIG_TOUCH=y +CONFIG_TR=y +CONFIG_FEATURE_TR_CLASSES=y +CONFIG_FEATURE_TR_EQUIV=y +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +CONFIG_UNIQ=y +CONFIG_USLEEP=y +CONFIG_UUDECODE=y +CONFIG_UUENCODE=y +CONFIG_WATCH=y +CONFIG_WC=y +CONFIG_FEATURE_WC_LARGE=y +CONFIG_WHO=y +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options for cp and mv +# +CONFIG_FEATURE_PRESERVE_HARDLINKS=y + +# +# Common options for ls, more and telnet +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum +# +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y + +# +# Console Utilities +# +CONFIG_CHVT=y +CONFIG_CLEAR=y +CONFIG_DEALLOCVT=y +CONFIG_DUMPKMAP=y +CONFIG_LOADFONT=y +CONFIG_LOADKMAP=y +CONFIG_OPENVT=y +CONFIG_RESET=y +CONFIG_RESIZE=y +CONFIG_FEATURE_RESIZE_PRINT=y +CONFIG_SETCONSOLE=y +# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set +CONFIG_SETKEYCODES=y +CONFIG_SETLOGCONS=y + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +CONFIG_PIPE_PROGRESS=y +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_RUN_PARTS=y +CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y +# CONFIG_START_STOP_DAEMON is not set +# CONFIG_FEATURE_START_STOP_DAEMON_FANCY is not set +# CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS is not set +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_AWK=y +CONFIG_FEATURE_AWK_MATH=y +CONFIG_ED=y +CONFIG_PATCH=y +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +CONFIG_FEATURE_VI_USE_SIGNALS=y +CONFIG_FEATURE_VI_DOT_CMD=y +CONFIG_FEATURE_VI_READONLY=y +CONFIG_FEATURE_VI_SETOPTS=y +CONFIG_FEATURE_VI_SET=y +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y +CONFIG_FEATURE_ALLOW_EXEC=y + +# +# Finding Utilities +# +CONFIG_FIND=y +CONFIG_FEATURE_FIND_PRINT0=y +CONFIG_FEATURE_FIND_MTIME=y +CONFIG_FEATURE_FIND_MMIN=y +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_NEWER=y +CONFIG_FEATURE_FIND_INUM=y +CONFIG_FEATURE_FIND_EXEC=y +CONFIG_FEATURE_FIND_USER=y +CONFIG_FEATURE_FIND_NOT=y +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y +CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y +CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y + +# +# Init Utilities +# +# CONFIG_INIT is not set +# CONFIG_DEBUG_INIT is not set +# CONFIG_FEATURE_USE_INITTAB is not set +# CONFIG_FEATURE_INIT_SCTTY is not set +# CONFIG_FEATURE_INIT_SYSLOG is not set +# CONFIG_FEATURE_EXTRA_QUIET is not set +# CONFIG_FEATURE_INIT_COREDUMPS is not set +# CONFIG_FEATURE_INITRD is not set +CONFIG_HALT=y +CONFIG_MESG=y + +# +# Login/Password Management Utilities +# +CONFIG_FEATURE_SHADOWPASSWDS=y +CONFIG_USE_BB_SHADOW=y +CONFIG_USE_BB_PWD_GRP=y +CONFIG_ADDGROUP=y +CONFIG_DELGROUP=y +CONFIG_ADDUSER=y +CONFIG_DELUSER=y +CONFIG_GETTY=y +CONFIG_FEATURE_UTMP=y +CONFIG_FEATURE_WTMP=y +CONFIG_LOGIN=y +CONFIG_LOGIN_SCRIPTS=y +CONFIG_FEATURE_SECURETTY=y +CONFIG_PASSWD=y +CONFIG_FEATURE_PASSWD_WEAK_CHECK=y +CONFIG_SU=y +CONFIG_FEATURE_SU_SYSLOG=y +CONFIG_FEATURE_SU_CHECKS_SHELLS=y +CONFIG_SULOGIN=y +CONFIG_VLOCK=y + +# +# Linux Ext2 FS Progs +# +CONFIG_CHATTR=y +CONFIG_FSCK=y +CONFIG_LSATTR=y + +# +# Linux Module Utilities +# +CONFIG_INSMOD=y +CONFIG_FEATURE_INSMOD_VERSION_CHECKING=y +CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS=y +CONFIG_FEATURE_INSMOD_LOADINKMEM=y +CONFIG_FEATURE_INSMOD_LOAD_MAP=y +CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL=y +CONFIG_RMMOD=y +CONFIG_LSMOD=y +CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y +CONFIG_MODPROBE=y +CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS=y +CONFIG_FEATURE_MODPROBE_FANCY_ALIAS=y + +# +# Options common to multiple modutils +# +CONFIG_FEATURE_CHECK_TAINTED_MODULE=y +CONFIG_FEATURE_2_4_MODULES=y +CONFIG_FEATURE_2_6_MODULES=y +# CONFIG_FEATURE_QUERY_MODULE_INTERFACE is not set + +# +# Linux System Utilities +# +CONFIG_DMESG=y +CONFIG_FEATURE_DMESG_PRETTY=y +CONFIG_FBSET=y +CONFIG_FEATURE_FBSET_FANCY=y +CONFIG_FEATURE_FBSET_READMODE=y +CONFIG_FDFLUSH=y +CONFIG_FDFORMAT=y +CONFIG_FDISK=y +CONFIG_FDISK_SUPPORT_LARGE_DISKS=y +CONFIG_FEATURE_FDISK_WRITABLE=y +CONFIG_FEATURE_AIX_LABEL=y +CONFIG_FEATURE_SGI_LABEL=y +CONFIG_FEATURE_SUN_LABEL=y +CONFIG_FEATURE_OSF_LABEL=y +CONFIG_FEATURE_FDISK_ADVANCED=y +CONFIG_FREERAMDISK=y +CONFIG_FSCK_MINIX=y +CONFIG_MKFS_MINIX=y + +# +# Minix filesystem support +# +CONFIG_FEATURE_MINIX2=y +CONFIG_GETOPT=y +CONFIG_HEXDUMP=y +CONFIG_HWCLOCK=y +CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y +CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y +CONFIG_IPCRM=y +CONFIG_IPCS=y +CONFIG_LOSETUP=y +CONFIG_MDEV=y +CONFIG_FEATURE_MDEV_CONF=y +CONFIG_FEATURE_MDEV_EXEC=y +CONFIG_MKSWAP=y +CONFIG_FEATURE_MKSWAP_V0=y +CONFIG_MORE=y +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_MOUNT=y +# CONFIG_FEATURE_MOUNT_NFS is not set +CONFIG_FEATURE_MOUNT_CIFS=y +CONFIG_FEATURE_MOUNT_FLAGS=y +CONFIG_FEATURE_MOUNT_FSTAB=y +CONFIG_PIVOT_ROOT=y +CONFIG_RDATE=y +CONFIG_READPROFILE=y +CONFIG_SETARCH=y +CONFIG_SWAPONOFF=y +CONFIG_SWITCH_ROOT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_UMOUNT_ALL=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set + +# +# Miscellaneous Utilities +# +CONFIG_ADJTIMEX=y +# CONFIG_BBCONFIG is not set +CONFIG_CHRT=y +# CONFIG_CROND is not set +# CONFIG_DEBUG_CROND_OPTION is not set +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +# CONFIG_CRONTAB is not set +CONFIG_DC=y +# CONFIG_DEVFSD is not set +# CONFIG_DEVFSD_MODLOAD is not set +# CONFIG_DEVFSD_FG_NP is not set +# CONFIG_DEVFSD_VERBOSE is not set +# CONFIG_FEATURE_DEVFS is not set +CONFIG_EJECT=y +CONFIG_LAST=y +CONFIG_LESS=y +CONFIG_FEATURE_LESS_MAXLINES=9999999 +CONFIG_FEATURE_LESS_BRACKETS=y +CONFIG_FEATURE_LESS_FLAGS=y +CONFIG_FEATURE_LESS_FLAGCS=y +CONFIG_FEATURE_LESS_MARKS=y +CONFIG_FEATURE_LESS_REGEXP=y +CONFIG_HDPARM=y +CONFIG_FEATURE_HDPARM_GET_IDENTITY=y +CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF=y +CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF=y +CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET=y +CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF=y +CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA=y +CONFIG_MAKEDEVS=y +# CONFIG_FEATURE_MAKEDEVS_LEAF is not set +CONFIG_FEATURE_MAKEDEVS_TABLE=y +CONFIG_MOUNTPOINT=y +CONFIG_MT=y +CONFIG_NMETER=y +CONFIG_RAIDAUTORUN=y +CONFIG_READAHEAD=y +CONFIG_RUNLEVEL=y +CONFIG_RX=y +CONFIG_STRINGS=y +CONFIG_SETSID=y +# CONFIG_TASKSET is not set +# CONFIG_FEATURE_TASKSET_FANCY is not set +CONFIG_TIME=y +CONFIG_WATCHDOG=y + +# +# Networking Utilities +# +CONFIG_FEATURE_IPV6=y +# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set +CONFIG_ARP=y +CONFIG_ARPING=y +CONFIG_DNSD=y +CONFIG_ETHER_WAKE=y +CONFIG_FAKEIDENTD=y +CONFIG_FTPGET=y +CONFIG_FTPPUT=y +CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y +CONFIG_HOSTNAME=y +# CONFIG_HTTPD is not set +# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set +# CONFIG_FEATURE_HTTPD_SETUID is not set +# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set +# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set +# CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES is not set +# CONFIG_FEATURE_HTTPD_CGI is not set +# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set +# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set +# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +CONFIG_FEATURE_IFCONFIG_SLIP=y +CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y +CONFIG_FEATURE_IFCONFIG_HW=y +CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y +# CONFIG_IFUPDOWN is not set +# CONFIG_FEATURE_IFUPDOWN_IP is not set +# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set +# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set +# CONFIG_FEATURE_IFUPDOWN_IPV4 is not set +# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set +# CONFIG_FEATURE_IFUPDOWN_IPX is not set +# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set +# CONFIG_INETD is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set +# CONFIG_FEATURE_INETD_RPC is not set +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +CONFIG_FEATURE_IP_TUNNEL=y +CONFIG_FEATURE_IP_RULE=y +CONFIG_FEATURE_IP_SHORT_FORMS=y +CONFIG_IPADDR=y +CONFIG_IPLINK=y +CONFIG_IPROUTE=y +CONFIG_IPTUNNEL=y +CONFIG_IPRULE=y +CONFIG_IPCALC=y +CONFIG_FEATURE_IPCALC_FANCY=y +CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y +CONFIG_NAMEIF=y +CONFIG_NC=y +CONFIG_NC_SERVER=y +CONFIG_NC_EXTRA=y +CONFIG_NETSTAT=y +CONFIG_NSLOOKUP=y +CONFIG_PING=y +CONFIG_PING6=y +CONFIG_FEATURE_FANCY_PING=y +CONFIG_ROUTE=y +CONFIG_TELNET=y +CONFIG_FEATURE_TELNET_TTYPE=y +CONFIG_FEATURE_TELNET_AUTOLOGIN=y +# CONFIG_TELNETD is not set +# CONFIG_FEATURE_TELNETD_STANDALONE is not set +CONFIG_TFTP=y +CONFIG_FEATURE_TFTP_GET=y +CONFIG_FEATURE_TFTP_PUT=y +CONFIG_FEATURE_TFTP_BLOCKSIZE=y +# CONFIG_DEBUG_TFTP is not set +CONFIG_TRACEROUTE=y +# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set +# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set +# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set +CONFIG_APP_UDHCPD=y +CONFIG_APP_DHCPRELAY=y +CONFIG_APP_DUMPLEASES=y +# CONFIG_APP_UDHCPC is not set +CONFIG_FEATURE_UDHCP_SYSLOG=y +# CONFIG_FEATURE_UDHCP_DEBUG is not set +CONFIG_FEATURE_RFC3397=y +CONFIG_VCONFIG=y +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_LONG_OPTIONS=y +# CONFIG_ZCIP is not set + +# +# Process Utilities +# +CONFIG_FREE=y +CONFIG_FUSER=y +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_KILLALL5=y +CONFIG_PIDOF=y +CONFIG_FEATURE_PIDOF_SINGLE=y +CONFIG_FEATURE_PIDOF_OMIT=y +CONFIG_PS=y +CONFIG_FEATURE_PS_WIDE=y +CONFIG_RENICE=y +CONFIG_BB_SYSCTL=y +CONFIG_TOP=y +CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y +CONFIG_UPTIME=y + +# +# Shells +# +# CONFIG_FEATURE_SH_IS_ASH is not set +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_LASH is not set +# CONFIG_FEATURE_SH_IS_MSH is not set +CONFIG_FEATURE_SH_IS_NONE=y +# CONFIG_ASH is not set +# CONFIG_ASH_JOB_CONTROL is not set +# CONFIG_ASH_READ_NCHARS is not set +# CONFIG_ASH_READ_TIMEOUT is not set +# CONFIG_ASH_ALIAS is not set +# CONFIG_ASH_MATH_SUPPORT is not set +# CONFIG_ASH_MATH_SUPPORT_64 is not set +# CONFIG_ASH_GETOPTS is not set +# CONFIG_ASH_BUILTIN_ECHO is not set +# CONFIG_ASH_BUILTIN_TEST is not set +# CONFIG_ASH_CMDCMD is not set +# CONFIG_ASH_MAIL is not set +# CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set +# CONFIG_ASH_RANDOM_SUPPORT is not set +# CONFIG_ASH_EXPAND_PRMT is not set +# CONFIG_HUSH is not set +# CONFIG_LASH is not set +CONFIG_MSH=y + +# +# Bourne Shell Options +# +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE_SHELL is not set + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +CONFIG_FEATURE_ROTATE_LOGFILE=y +CONFIG_FEATURE_REMOTE_LOG=y +CONFIG_FEATURE_IPC_SYSLOG=y +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 +CONFIG_LOGREAD=y +CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y +CONFIG_KLOGD=y +CONFIG_LOGGER=y + +# +# Runit Utilities +# +# CONFIG_RUNSV is not set +# CONFIG_RUNSVDIR is not set +CONFIG_SV=y +# CONFIG_SVLOGD is not set +CONFIG_CHPST=y +CONFIG_SETUIDGID=y +CONFIG_ENVUIDGID=y +CONFIG_ENVDIR=y +CONFIG_SOFTLIMIT=y +# CONFIG_CHCON is not set +# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set +# CONFIG_GETENFORCE is not set +# CONFIG_GETSEBOOL is not set +# CONFIG_LOAD_POLICY is not set +# CONFIG_MATCHPATHCON is not set +# CONFIG_RUNCON is not set +# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set +# CONFIG_SELINUXENABLED is not set +# CONFIG_SETENFORCE is not set diff --git a/archival/libunarchive/Kbuild b/archival/libunarchive/Kbuild index 4e1454184..010043c4c 100644 --- a/archival/libunarchive/Kbuild +++ b/archival/libunarchive/Kbuild @@ -26,7 +26,6 @@ lib-y:= \ \ data_align.o \ find_list_entry.o \ - open_transformer.o \ init_handle.o GUNZIP_FILES:= check_header_gzip.o decompress_unzip.o @@ -36,6 +35,13 @@ DPKG_FILES:= \ get_header_tar.o \ filter_accept_list_reassign.o +# open_transformer uses fork. Compile it only if absolutely necessary +lib-$(CONFIG_RPM) += open_transformer.o +lib-$(CONFIG_FEATURE_TAR_BZIP2) += open_transformer.o +lib-$(CONFIG_FEATURE_TAR_LZMA) += open_transformer.o +lib-$(CONFIG_FEATURE_TAR_GZIP) += open_transformer.o +lib-$(CONFIG_FEATURE_TAR_COMPRESS) += open_transformer.o + lib-$(CONFIG_AR) += get_header_ar.o unpack_ar_archive.o lib-$(CONFIG_BUNZIP2) += decompress_bunzip2.o lib-$(CONFIG_UNLZMA) += decompress_unlzma.o diff --git a/console-tools/openvt.c b/console-tools/openvt.c index 0584584df..882563b29 100644 --- a/console-tools/openvt.c +++ b/console-tools/openvt.c @@ -15,30 +15,21 @@ int openvt_main(int argc, char **argv); int openvt_main(int argc, char **argv) { - int fd; char vtname[sizeof(VC_FORMAT) + 2]; - if (argc < 3) { + if (argc < 3) bb_show_usage(); - } + /* check for illegal vt number: < 1 or > 63 */ sprintf(vtname, VC_FORMAT, (int)xatou_range(argv[1], 1, 63)); -//FIXME NOMMU - if (fork() == 0) { - /* child */ - /* leave current vt (controlling tty) */ - setsid(); - /* and grab new one */ - fd = xopen(vtname, O_RDWR); - /* Reassign stdin, stdout and sterr */ - dup2(fd, STDIN_FILENO); - dup2(fd, STDOUT_FILENO); - dup2(fd, STDERR_FILENO); - while (fd > 2) close(fd--); + bb_daemonize_or_rexec(DAEMON_CLOSE_EXTRA_FDS, argv); + /* grab new one */ + close(0); + xopen(vtname, O_RDWR); + dup2(0, STDOUT_FILENO); + dup2(0, STDERR_FILENO); - BB_EXECVP(argv[2], &argv[2]); - _exit(1); - } - return EXIT_SUCCESS; + BB_EXECVP(argv[2], &argv[2]); + _exit(1); } diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c index c31ab3f1a..447b4d008 100644 --- a/e2fsprogs/fsck.c +++ b/e2fsprogs/fsck.c @@ -667,20 +667,9 @@ static void execute(const char *type, const char *device, const char *mntpt, /* Fork and execute the correct program. */ pid = -1; if (!noexecute) { -/* TODO: NOMMU friendly way (vfork)? */ - pid = fork(); + pid = spawn(argv); if (pid < 0) - bb_perror_msg_and_die("fork"); - if (pid == 0) { - /* Child */ - if (!interactive) { - /* NB: e2fsck will complain because of this! - * Use "fsck -s" to avoid... */ - close(0); - } - BB_EXECVP(argv[0], argv); - bb_perror_msg_and_die("%s", argv[0]); - } + bb_perror_msg("%s", argv[0]); } for (i = num_args+1; i < argc; i++) diff --git a/include/libbb.h b/include/libbb.h index ff7d3bf1a..32e099b54 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -471,7 +471,9 @@ int bb_execvp(const char *file, char *const argv[]); pid_t spawn(char **argv); pid_t xspawn(char **argv); /* Helpers for daemonization. + * * bb_daemonize(flags) = daemonize, does not compile on NOMMU + * * bb_daemonize_or_rexec(flags, argv) = daemonizes on MMU (and ignores argv), * rexec's itself on NOMMU with argv passed as command line. * Thus bb_daemonize_or_rexec may cause your <applet>_main() to be re-executed @@ -482,7 +484,12 @@ pid_t xspawn(char **argv); * Both of the above will redirect fd 0,1,2 to /dev/null and drop ctty * (will do setsid()). * + * forkexit_or_rexec(argv) = bare-bones "fork + parent exits" on MMU, + * "vfork + re-exec ourself" on NOMMU. No fd redirection, no setsid(). + * Currently used for openvt. On MMU ignores argv. + * * Helper for network daemons in foreground mode: + * * bb_sanitize_stdio() = make sure that fd 0,1,2 are opened by opening them * to /dev/null if they are not. */ @@ -493,16 +500,16 @@ enum { DAEMON_ONLY_SANITIZE = 8, /* internal use */ }; #ifndef BB_NOMMU -#define bb_daemonize_or_rexec(flags, argv) bb_daemonize_or_rexec(flags) -#define bb_daemonize(flags) bb_daemonize_or_rexec(flags, bogus) + void forkexit_or_rexec(void); +# define forkexit_or_rexec(argv) forkexit_or_rexec() +# define bb_daemonize_or_rexec(flags, argv) bb_daemonize_or_rexec(flags) +# define bb_daemonize(flags) bb_daemonize_or_rexec(flags, bogus) #else -extern smallint re_execed; -pid_t BUG_fork_is_unavailable_on_nommu(void); -pid_t BUG_daemon_is_unavailable_on_nommu(void); -pid_t BUG_bb_daemonize_is_unavailable_on_nommu(void); -#define fork() BUG_fork_is_unavailable_on_nommu() -#define daemon(a,b) BUG_daemon_is_unavailable_on_nommu() -#define bb_daemonize(a) BUG_bb_daemonize_is_unavailable_on_nommu() + void forkexit_or_rexec(char **argv); + extern smallint re_execed; +# define fork() BUG_fork_is_unavailable_on_nommu() +# define daemon(a,b) BUG_daemon_is_unavailable_on_nommu() +# define bb_daemonize(a) BUG_bb_daemonize_is_unavailable_on_nommu() #endif void bb_daemonize_or_rexec(int flags, char **argv); void bb_sanitize_stdio(void); diff --git a/libbb/vfork_daemon_rexec.c b/libbb/vfork_daemon_rexec.c index c59b0b6fd..89ae9a73c 100644 --- a/libbb/vfork_daemon_rexec.c +++ b/libbb/vfork_daemon_rexec.c @@ -115,7 +115,7 @@ void vfork_daemon_rexec(int nochdir, int noclose, char **argv) #endif /* BB_NOMMU */ #ifdef BB_NOMMU -static void daemon_or_rexec(char **argv) +void forkexit_or_rexec(char **argv) { pid_t pid; /* Maybe we are already re-execed and come here again? */ @@ -135,7 +135,9 @@ static void daemon_or_rexec(char **argv) bb_perror_msg_and_die("exec %s", CONFIG_BUSYBOX_EXEC_PATH); } #else -static void daemon_or_rexec(void) +/* Dance around (void)...*/ +#undef forkexit_or_rexec +void forkexit_or_rexec(void) { pid_t pid; pid = fork(); @@ -145,7 +147,7 @@ static void daemon_or_rexec(void) exit(0); /* child */ } -#define daemon_or_rexec(argv) daemon_or_rexec() +#define forkexit_or_rexec(argv) forkexit_or_rexec() #endif @@ -170,7 +172,7 @@ void bb_daemonize_or_rexec(int flags, char **argv) fd = dup(fd); /* have 0,1,2 open at least to /dev/null */ if (!(flags & DAEMON_ONLY_SANITIZE)) { - daemon_or_rexec(argv); + forkexit_or_rexec(argv); /* if daemonizing, make sure we detach from stdio */ setsid(); dup2(fd, 0); diff --git a/loginutils/login.c b/loginutils/login.c index 791e44d83..3d8b8e540 100644 --- a/loginutils/login.c +++ b/loginutils/login.c @@ -337,25 +337,24 @@ auth_failed: fchown(0, pw->pw_uid, pw->pw_gid); fchmod(0, 0600); -/* TODO: be nommu-friendly, use spawn? */ if (ENABLE_LOGIN_SCRIPTS) { - char *script = getenv("LOGIN_PRE_SUID_SCRIPT"); - if (script) { - char *t_argv[2] = { script, NULL }; - switch (fork()) { - case -1: break; - case 0: /* child */ - xchdir("/"); - setenv("LOGIN_TTY", full_tty, 1); - setenv("LOGIN_USER", pw->pw_name, 1); - setenv("LOGIN_UID", utoa(pw->pw_uid), 1); - setenv("LOGIN_GID", utoa(pw->pw_gid), 1); - setenv("LOGIN_SHELL", pw->pw_shell, 1); - BB_EXECVP(script, t_argv); - exit(1); - default: /* parent */ - wait(NULL); - } + char *t_argv[2]; + + t_argv[0] = getenv("LOGIN_PRE_SUID_SCRIPT"); + if (t_argv[0]) { + t_argv[1] = NULL; + setenv("LOGIN_TTY", full_tty, 1); + setenv("LOGIN_USER", pw->pw_name, 1); + setenv("LOGIN_UID", utoa(pw->pw_uid), 1); + setenv("LOGIN_GID", utoa(pw->pw_gid), 1); + setenv("LOGIN_SHELL", pw->pw_shell, 1); + xspawn(argv); /* NOMMU-friendly */ + unsetenv("LOGIN_TTY"); + unsetenv("LOGIN_USER"); + unsetenv("LOGIN_UID"); + unsetenv("LOGIN_GID"); + unsetenv("LOGIN_SHELL"); + wait(NULL); } } diff --git a/miscutils/setsid.c b/miscutils/setsid.c index 6db07be5f..c878f524b 100644 --- a/miscutils/setsid.c +++ b/miscutils/setsid.c @@ -22,21 +22,12 @@ int setsid_main(int argc, char *argv[]) if (argc < 2) bb_show_usage(); - if (getpgrp() == getpid()) { - switch (fork()) { - case -1: - bb_perror_msg_and_die("fork"); - case 0: - break; - default: /* parent */ - exit(0); - } - } - /* child */ + /* Comment why is this necessary? */ + if (getpgrp() == getpid()) + forkexit_or_rexec(argv); setsid(); /* no error possible */ BB_EXECVP(argv[1], argv + 1); - bb_perror_msg_and_die("%s", argv[1]); } diff --git a/networking/httpd.c b/networking/httpd.c index b8d9b6b6f..8ab2bc45d 100644 --- a/networking/httpd.c +++ b/networking/httpd.c @@ -1938,13 +1938,6 @@ enum { OPT_FOREGROUND = 1 << p_opt_foreground, }; -static const char httpd_opts[] = "c:d:h:" - USE_FEATURE_HTTPD_ENCODE_URL_STR("e:") - USE_FEATURE_HTTPD_BASIC_AUTH("r:") - USE_FEATURE_HTTPD_AUTH_MD5("m:") - USE_FEATURE_HTTPD_SETUID("u:") - "p:if"; - int httpd_main(int argc, char *argv[]); int httpd_main(int argc, char *argv[]) @@ -1970,7 +1963,12 @@ int httpd_main(int argc, char *argv[]) config->port = 80; config->ContentLength = -1; - opt = getopt32(argc, argv, httpd_opts, + opt = getopt32(argc, argv, "c:d:h:" + USE_FEATURE_HTTPD_ENCODE_URL_STR("e:") + USE_FEATURE_HTTPD_BASIC_AUTH("r:") + USE_FEATURE_HTTPD_AUTH_MD5("m:") + USE_FEATURE_HTTPD_SETUID("u:") + "p:if", &(config->configFile), &url_for_decode, &home_httpd USE_FEATURE_HTTPD_ENCODE_URL_STR(, &url_for_encode) USE_FEATURE_HTTPD_BASIC_AUTH(, &(config->realm)) diff --git a/runit/sv.c b/runit/sv.c index 051e64e67..d52eb6d22 100644 --- a/runit/sv.c +++ b/runit/sv.c @@ -310,21 +310,16 @@ static int checkscript(void) return 0; } /* if (!(s.st_mode & S_IXUSR)) return 1; */ - if ((pid = fork()) == -1) { - bb_perror_msg(WARN"cannot fork for %s/check", *service); + prog[0] = (char*)"./check"; + prog[1] = NULL; + pid = spawn(prog); + if (pid <= 0) { + bb_perror_msg(WARN"cannot %s child %s/check", "run", *service); return 0; } - if (!pid) { - prog[0] = (char*)"./check"; - prog[1] = NULL; - close(1); - execve("check", prog, environ); - bb_perror_msg(WARN"cannot run %s/check", *service); - _exit(0); - } while (wait_pid(&w, pid) == -1) { if (errno == EINTR) continue; - bb_perror_msg(WARN"cannot wait for child %s/check", *service); + bb_perror_msg(WARN"cannot %s child %s/check", "wait for", *service); return 0; } return !wait_exitcode(w); |