mirror of https://github.com/hak5/openwrt.git
Upgrade busybox to 1.7.2 - clean up insmod crap - add some lineno/programname fixes for awx - clean up awk getopt stuff - remove unnecessary patches
SVN-Revision: 9130lede-17.01
parent
9e8f2ca1f0
commit
fe313941ac
|
@ -9,13 +9,13 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=busybox
|
||||
PKG_VERSION:=1.4.2
|
||||
PKG_VERSION:=1.7.2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=http://www.busybox.net/downloads \
|
||||
http://distfiles.gentoo.org/distfiles/
|
||||
PKG_MD5SUM:=b4c61fb15642be9dde20e8493788c585
|
||||
PKG_MD5SUM:=c91ec9756e2000073a9dd8fa9fc3f89e
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
|
|
@ -100,8 +100,7 @@ config BUSYBOX_CONFIG_FEATURE_INSTALLER
|
|||
help
|
||||
Enable 'busybox --install [-s]' support. This will allow you to use
|
||||
busybox at runtime to create hard links or symlinks for all the
|
||||
applets that are compiled into busybox. This feature requires the
|
||||
/proc filesystem.
|
||||
applets that are compiled into busybox.
|
||||
|
||||
config BUSYBOX_CONFIG_LOCALE_SUPPORT
|
||||
bool "Enable locale support (system needs locale for this to work)"
|
||||
|
@ -140,6 +139,13 @@ config BUSYBOX_CONFIG_FEATURE_CLEAN_UP
|
|||
Don't enable this unless you have a really good reason to clean
|
||||
things up manually.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_PIDFILE
|
||||
bool "Support writing pidfiles"
|
||||
default y
|
||||
help
|
||||
This option makes some applets (e.g. crond, syslogd, inetd) write
|
||||
a pidfile in /var/run. Some applications rely on them.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SUID
|
||||
bool "Support for SUID/SGID handling"
|
||||
default y
|
||||
|
@ -155,13 +161,6 @@ config BUSYBOX_CONFIG_FEATURE_SUID
|
|||
are login, passwd, su, ping, traceroute, crontab, dnsd, ipcrm, ipcs,
|
||||
and vlock.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SYSLOG
|
||||
bool "Support for syslog"
|
||||
default y
|
||||
help
|
||||
This option is auto-selected when you select any applet which may
|
||||
send its output to syslog. You do not need to select it manually.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SUID_CONFIG
|
||||
bool "Runtime SUID/SGID configuration via /etc/busybox.conf"
|
||||
default n if BUSYBOX_CONFIG_FEATURE_SUID
|
||||
|
@ -202,14 +201,6 @@ config BUSYBOX_CONFIG_FEATURE_SUID_CONFIG_QUIET
|
|||
/etc/busybox.conf should be readable by the user needing the SUID, check
|
||||
this option to avoid users to be notified about missing permissions.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_HAVE_RPC
|
||||
bool "RPC support"
|
||||
default y
|
||||
help
|
||||
Select this if you have rpc support.
|
||||
This automatically turns off all configuration options that rely
|
||||
on RPC.
|
||||
|
||||
config BUSYBOX_CONFIG_SELINUX
|
||||
bool "Support NSA Security Enhanced Linux"
|
||||
default n
|
||||
|
@ -230,6 +221,20 @@ config BUSYBOX_CONFIG_SELINUX
|
|||
|
||||
Most people will leave this set to 'N'.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
|
||||
bool "exec prefers applets"
|
||||
default y
|
||||
help
|
||||
This is an experimental option which directs applets about to
|
||||
call 'exec' to try and find an applicable busybox applet before
|
||||
searching the PATH. This is typically done by exec'ing
|
||||
/proc/self/exe.
|
||||
This may affect shell, find -exec, xargs and similar applets.
|
||||
They will use applets even if /bin/<applet> -> busybox link
|
||||
is missing (or is not a link to busybox). However, this causes
|
||||
problems in chroot jails without mounted /proc and with ps/top
|
||||
(command name can be shown as 'exe' for applets started this way).
|
||||
|
||||
config BUSYBOX_CONFIG_BUSYBOX_EXEC_PATH
|
||||
string "Path to BusyBox executable"
|
||||
default "/proc/self/exe"
|
||||
|
@ -240,6 +245,22 @@ config BUSYBOX_CONFIG_BUSYBOX_EXEC_PATH
|
|||
executable. If you haven't got /proc, set this to wherever you
|
||||
want to run BusyBox from.
|
||||
|
||||
# These are auto-selected by other options
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SYSLOG
|
||||
bool "Support for logging to syslog"
|
||||
default y
|
||||
help
|
||||
This option is auto-selected when you select any applet which may
|
||||
send its output to syslog. You do not need to select it manually.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_HAVE_RPC
|
||||
bool "RPC support"
|
||||
default y
|
||||
help
|
||||
This is automatically selected if any of enabled applets need it.
|
||||
You do not need to select it manually.
|
||||
|
||||
endmenu
|
||||
|
||||
menu 'Build Options'
|
||||
|
@ -298,7 +319,7 @@ config BUSYBOX_CONFIG_FEATURE_SHARED_BUSYBOX
|
|||
You need to have a working dynamic linker to use this variant.
|
||||
|
||||
config BUSYBOX_CONFIG_LFS
|
||||
bool "Support large files over 2 GB"
|
||||
bool
|
||||
default y
|
||||
select BUSYBOX_CONFIG_FDISK_SUPPORT_LARGE_DISKS
|
||||
help
|
||||
|
@ -343,21 +364,29 @@ config BUSYBOX_CONFIG_DEBUG
|
|||
|
||||
Most people should answer N.
|
||||
|
||||
config BUSYBOX_CONFIG_DEBUG_PESSIMIZE
|
||||
bool "Disable compiler optimizations."
|
||||
config BUSYBOX_CONFIG_WERROR
|
||||
bool "Abort compilation on any warning"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_DEBUG
|
||||
help
|
||||
The compiler's optimization of source code can eliminate and reorder
|
||||
code, resulting in an executable that's hard to understand when
|
||||
stepping through it with a debugger. This switches it off, resulting
|
||||
in a much bigger executable that more closely matches the source
|
||||
code.
|
||||
Selecting this will add -Werror to gcc command line.
|
||||
|
||||
Most people should answer N.
|
||||
|
||||
# Seems to be unused
|
||||
#config DEBUG_PESSIMIZE
|
||||
# bool "Disable compiler optimizations."
|
||||
# default n
|
||||
# depends on DEBUG
|
||||
# help
|
||||
# The compiler's optimization of source code can eliminate and reorder
|
||||
# code, resulting in an executable that's hard to understand when
|
||||
# stepping through it with a debugger. This switches it off, resulting
|
||||
# in a much bigger executable that more closely matches the source
|
||||
# code.
|
||||
|
||||
choice
|
||||
prompt "Additional debugging library"
|
||||
default BUSYBOX_CONFIG_NO_DEBUG_LIB
|
||||
depends on BUSYBOX_CONFIG_DEBUG
|
||||
help
|
||||
Using an additional debugging library will make BusyBox become
|
||||
considerable larger and will cause it to run more slowly. You
|
||||
|
@ -417,31 +446,30 @@ config BUSYBOX_CONFIG_INSTALL_NO_USR
|
|||
that you really want this behaviour.
|
||||
|
||||
choice
|
||||
prompt "Applets links"
|
||||
default BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS
|
||||
help
|
||||
Choose how you install applets links.
|
||||
prompt "Applets links"
|
||||
default BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS
|
||||
help
|
||||
Choose how you install applets links.
|
||||
|
||||
config BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS
|
||||
bool "as soft-links"
|
||||
help
|
||||
Install applets as soft-links to the busybox binary. This needs some
|
||||
free inodes on the filesystem, but might help with filesystem
|
||||
generators that can't cope with hard-links.
|
||||
bool "as soft-links"
|
||||
help
|
||||
Install applets as soft-links to the busybox binary. This needs some
|
||||
free inodes on the filesystem, but might help with filesystem
|
||||
generators that can't cope with hard-links.
|
||||
|
||||
config BUSYBOX_CONFIG_INSTALL_APPLET_HARDLINKS
|
||||
bool "as hard-links"
|
||||
help
|
||||
Install applets as hard-links to the busybox binary. This might count
|
||||
on a filesystem with few inodes.
|
||||
bool "as hard-links"
|
||||
help
|
||||
Install applets as hard-links to the busybox binary. This might count
|
||||
on a filesystem with few inodes.
|
||||
|
||||
config BUSYBOX_CONFIG_INSTALL_APPLET_DONT
|
||||
bool
|
||||
prompt "not installed"
|
||||
depends on BUSYBOX_CONFIG_FEATURE_INSTALLER || BUSYBOX_CONFIG_FEATURE_SH_STANDALONE_SHELL
|
||||
help
|
||||
Do not install applet links. Useful when using the -install feature
|
||||
or a standalone shell for rescue pruposes.
|
||||
bool "not installed"
|
||||
depends on BUSYBOX_CONFIG_FEATURE_INSTALLER || BUSYBOX_CONFIG_FEATURE_SH_STANDALONE || BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
|
||||
help
|
||||
Do not install applet links. Useful when using the -install feature
|
||||
or a standalone shell for rescue purposes.
|
||||
|
||||
endchoice
|
||||
|
||||
|
@ -476,3 +504,5 @@ source package/busybox/config/procps/Config.in
|
|||
source package/busybox/config/shell/Config.in
|
||||
source package/busybox/config/sysklogd/Config.in
|
||||
source package/busybox/config/runit/Config.in
|
||||
source package/busybox/config/selinux/Config.in
|
||||
source package/busybox/config/ipsvd/Config.in
|
||||
|
|
|
@ -142,6 +142,13 @@ config BUSYBOX_CONFIG_RPM
|
|||
help
|
||||
Mini RPM applet - queries and extracts RPM packages.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_RPM_BZ2
|
||||
bool "Enable handling of rpms with bzip2-compressed data inside"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_RPM
|
||||
help
|
||||
Enable handling of rpms with bzip2-compressed data inside.
|
||||
|
||||
config BUSYBOX_CONFIG_TAR
|
||||
bool "tar"
|
||||
default y
|
||||
|
@ -207,6 +214,15 @@ config BUSYBOX_CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY
|
|||
the old GNU format; help to kill this old format by
|
||||
repacking your ancient archives with the new format.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY
|
||||
bool "Enable untarring of tarballs with checksums produced by buggy Sun tar"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_TAR
|
||||
help
|
||||
This option is required to unpack archives created by some old
|
||||
version of Sun's tar (it was calculating checksum using signed arithmetic).
|
||||
It is said to be fixed in newer Sun tar, but "old" tarballs still exist.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TAR_GNU_EXTENSIONS
|
||||
bool "Enable support for some GNU tar extensions"
|
||||
default y
|
||||
|
|
|
@ -85,7 +85,7 @@ config BUSYBOX_CONFIG_SETCONSOLE
|
|||
config BUSYBOX_CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_SET_CONSOLE && BUSYBOX_CONFIG_GETOPT_LONG
|
||||
depends on BUSYBOX_CONFIG_SETCONSOLE && BUSYBOX_CONFIG_GETOPT_LONG
|
||||
help
|
||||
Support long options for the setconsole applet.
|
||||
|
||||
|
|
|
@ -65,13 +65,6 @@ config BUSYBOX_CONFIG_CKSUM
|
|||
help
|
||||
cksum is used to calculate the CRC32 checksum of a file.
|
||||
|
||||
config BUSYBOX_CONFIG_CMP
|
||||
bool "cmp"
|
||||
default n
|
||||
help
|
||||
cmp is used to compare two files and returns the result
|
||||
to standard output.
|
||||
|
||||
config BUSYBOX_CONFIG_COMM
|
||||
bool "comm"
|
||||
default n
|
||||
|
@ -142,38 +135,6 @@ config BUSYBOX_CONFIG_DF
|
|||
df reports the amount of disk space used and available
|
||||
on filesystems.
|
||||
|
||||
config BUSYBOX_CONFIG_DIFF
|
||||
bool "diff"
|
||||
default n
|
||||
help
|
||||
diff compares two files or directories and outputs the
|
||||
differences between them in a form that can be given to
|
||||
the patch command.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DIFF_BINARY
|
||||
bool "Enable checks for binary files"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_DIFF
|
||||
help
|
||||
This option enables support for checking for binary files
|
||||
before a comparison is carried out.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DIFF_DIR
|
||||
bool "Enable directory support"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_DIFF
|
||||
help
|
||||
This option enables support for directory and subdirectory
|
||||
comparison.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DIFF_MINIMAL
|
||||
bool "Enable -d option to find smaller sets of changes"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_DIFF
|
||||
help
|
||||
Enabling this option allows the use of -d to make diff
|
||||
try hard to find the smallest possible set of changes.
|
||||
|
||||
config BUSYBOX_CONFIG_DIRNAME
|
||||
bool "dirname"
|
||||
default y
|
||||
|
@ -239,6 +200,19 @@ config BUSYBOX_CONFIG_FEATURE_ENV_LONG_OPTIONS
|
|||
help
|
||||
Support long options for the env applet.
|
||||
|
||||
config BUSYBOX_CONFIG_EXPAND
|
||||
bool "expand"
|
||||
default n
|
||||
help
|
||||
By default, convert all tabs to spaces.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_EXPAND_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_EXPAND && BUSYBOX_CONFIG_GETOPT_LONG
|
||||
help
|
||||
Support long options for the expand applet.
|
||||
|
||||
config BUSYBOX_CONFIG_EXPR
|
||||
bool "expr"
|
||||
default y
|
||||
|
@ -474,6 +448,20 @@ config BUSYBOX_CONFIG_PWD
|
|||
help
|
||||
pwd is used to print the current directory.
|
||||
|
||||
config BUSYBOX_CONFIG_READLINK
|
||||
bool "readlink"
|
||||
default n
|
||||
help
|
||||
This program reads a symbolic link and returns the name
|
||||
of the file it points to
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_READLINK_FOLLOW
|
||||
bool "Enable canonicalization by following all symlinks (-f)"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_READLINK
|
||||
help
|
||||
Enable the readlink option (-f).
|
||||
|
||||
config BUSYBOX_CONFIG_REALPATH
|
||||
bool "realpath"
|
||||
default n
|
||||
|
@ -536,6 +524,21 @@ config BUSYBOX_CONFIG_FEATURE_SORT_BIG
|
|||
The SuSv3 sort standard is available at:
|
||||
http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html
|
||||
|
||||
config BUSYBOX_CONFIG_SPLIT
|
||||
bool "split"
|
||||
default n
|
||||
help
|
||||
split a file into pieces.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SPLIT_FANCY
|
||||
bool "fancy extensions"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_SPLIT
|
||||
help
|
||||
Add support for features not required by SUSv3.
|
||||
Supports additional suffixes 'b' for 512 bytes,
|
||||
'g' for 1GiB for the -b option.
|
||||
|
||||
config BUSYBOX_CONFIG_STAT
|
||||
bool "stat"
|
||||
default n
|
||||
|
@ -665,6 +668,19 @@ config BUSYBOX_CONFIG_UNAME
|
|||
help
|
||||
uname is used to print system information.
|
||||
|
||||
config BUSYBOX_CONFIG_UNEXPAND
|
||||
bool "unexpand"
|
||||
default n
|
||||
help
|
||||
By default, convert only leading sequences of blanks to tabs.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_UNEXPAND && BUSYBOX_CONFIG_GETOPT_LONG
|
||||
help
|
||||
Support long options for the unexpand applet.
|
||||
|
||||
config BUSYBOX_CONFIG_UNIQ
|
||||
bool "uniq"
|
||||
default y
|
||||
|
@ -689,14 +705,6 @@ config BUSYBOX_CONFIG_UUENCODE
|
|||
help
|
||||
uuencode is used to uuencode a file.
|
||||
|
||||
config BUSYBOX_CONFIG_WATCH
|
||||
bool "watch"
|
||||
default n
|
||||
select BUSYBOX_CONFIG_DATE
|
||||
help
|
||||
watch is used to execute a program periodically, showing
|
||||
output to the screen.
|
||||
|
||||
config BUSYBOX_CONFIG_WC
|
||||
bool "wc"
|
||||
default y
|
||||
|
|
|
@ -17,20 +17,6 @@ config BUSYBOX_CONFIG_PIPE_PROGRESS
|
|||
help
|
||||
Display a dot to indicate pipe activity.
|
||||
|
||||
config BUSYBOX_CONFIG_READLINK
|
||||
bool "readlink"
|
||||
default n
|
||||
help
|
||||
This program reads a symbolic link and returns the name
|
||||
of the file it points to
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_READLINK_FOLLOW
|
||||
bool "Enable canonicalization by following all symlinks (-f)"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_READLINK
|
||||
help
|
||||
Enable the readlink option (-f).
|
||||
|
||||
config BUSYBOX_CONFIG_RUN_PARTS
|
||||
bool "run-parts"
|
||||
default n
|
||||
|
@ -53,6 +39,15 @@ config BUSYBOX_CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS
|
|||
help
|
||||
Support long options for the run-parts applet.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_RUN_PARTS_FANCY
|
||||
bool "Support additional arguments"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_RUN_PARTS
|
||||
help
|
||||
Support additional options:
|
||||
-l --list print the names of the all matching files (not
|
||||
limited to executables), but don't actually run them.
|
||||
|
||||
config BUSYBOX_CONFIG_START_STOP_DAEMON
|
||||
bool "start-stop-daemon"
|
||||
default y
|
||||
|
|
|
@ -27,6 +27,45 @@ config BUSYBOX_CONFIG_FEATURE_AWK_MATH
|
|||
Enable math functions of the Awk programming language.
|
||||
NOTE: This will require libm to be present for linking.
|
||||
|
||||
config BUSYBOX_CONFIG_CMP
|
||||
bool "cmp"
|
||||
default n
|
||||
help
|
||||
cmp is used to compare two files and returns the result
|
||||
to standard output.
|
||||
|
||||
config BUSYBOX_CONFIG_DIFF
|
||||
bool "diff"
|
||||
default y
|
||||
help
|
||||
diff compares two files or directories and outputs the
|
||||
differences between them in a form that can be given to
|
||||
the patch command.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DIFF_BINARY
|
||||
bool "Enable checks for binary files"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_DIFF
|
||||
help
|
||||
This option enables support for checking for binary files
|
||||
before a comparison is carried out.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DIFF_DIR
|
||||
bool "Enable directory support"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_DIFF
|
||||
help
|
||||
This option enables support for directory and subdirectory
|
||||
comparison.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DIFF_MINIMAL
|
||||
bool "Enable -d option to find smaller sets of changes"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_DIFF
|
||||
help
|
||||
Enabling this option allows the use of -d to make diff
|
||||
try hard to find the smallest possible set of changes.
|
||||
|
||||
config BUSYBOX_CONFIG_ED
|
||||
bool "ed"
|
||||
default n
|
||||
|
@ -57,6 +96,16 @@ config BUSYBOX_CONFIG_VI
|
|||
learning curve. If you are not already comfortable with 'vi'
|
||||
you may wish to use something else.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VI_MAX_LEN
|
||||
int "Maximum line length in vi"
|
||||
range 256 16384
|
||||
default 1024
|
||||
depends on BUSYBOX_CONFIG_VI
|
||||
help
|
||||
vi uses on-stack buffers for intermediate line buffers.
|
||||
You may want to decrease this parameter if your target machine
|
||||
benefits from smaller stack usage.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VI_COLON
|
||||
bool "Enable \":\" colon commands (no \"ex\" mode)"
|
||||
default y
|
||||
|
|
|
@ -30,7 +30,7 @@ config BUSYBOX_CONFIG_FEATURE_FIND_MTIME
|
|||
files, in days.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_MMIN
|
||||
bool "Enable modified time matching (-min) option"
|
||||
bool "Enable modified time matching (-mmin) option"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
|
@ -57,8 +57,14 @@ config BUSYBOX_CONFIG_FEATURE_FIND_XDEV
|
|||
default y
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
This option will allow find to restrict searches to a single
|
||||
filesystem.
|
||||
This option allows find to restrict searches to a single filesystem.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_MAXDEPTH
|
||||
bool "Enable -maxdepth N option"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
This option enables -maxdepth N option.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_NEWER
|
||||
bool "Enable -newer option for comparing file mtimes"
|
||||
|
@ -83,6 +89,88 @@ config BUSYBOX_CONFIG_FEATURE_FIND_EXEC
|
|||
Support the 'find -exec' option for executing commands based upon
|
||||
the files matched.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_USER
|
||||
bool "Enable username/uid matching (-user) option"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
Support the 'find -user' option for searching by username or uid.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_GROUP
|
||||
bool "Enable group/gid matching (-group) option"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
Support the 'find -group' option for searching by group name or gid.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_NOT
|
||||
bool "Enable the 'not' (!) operator"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
Support the '!' operator to invert the test results.
|
||||
If 'Enable full-blown desktop' is enabled, then will also support
|
||||
the non-POSIX notation '-not'.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_DEPTH
|
||||
bool "Enable the -depth option"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
Process each directory's contents before the directory itself.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_PAREN
|
||||
bool "Enable parens in options"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
Enable usage of parens '(' to specify logical order of arguments.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_SIZE
|
||||
bool "Enable (-size) option allowing matching for file size"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
Support the 'find -size' option for searching by file size.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_PRUNE
|
||||
bool "Enable (-prune) option allowing to exclude subdirectories"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
If the file is a directory, dont descend into it. Useful for
|
||||
exclusion .svn and CVS directories.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_DELETE
|
||||
bool "Enable -delete option allowing to delete files"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_FIND && BUSYBOX_CONFIG_FEATURE_FIND_DEPTH
|
||||
help
|
||||
Support the 'find -delete' option for deleting files and direcotries.
|
||||
WARNING: This option can do much harm if used wrong. Busybox will not
|
||||
try to protect the user from doing stupid things. Use with care.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_PATH
|
||||
bool "Enable -path option allowing to match pathname patterns"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
The -path option matches whole pathname instead of just filename.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_REGEX
|
||||
bool "Enable -regex: match pathname to regex"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
The -regex option matches whole pathname against regular expression.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_CONTEXT
|
||||
bool "Enable (-context) option for matching security context"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_FIND && BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Support the 'find -context' option for matching security context.
|
||||
|
||||
config BUSYBOX_CONFIG_GREP
|
||||
bool "grep"
|
||||
default y
|
||||
|
|
|
@ -38,6 +38,11 @@ config BUSYBOX_CONFIG_FEATURE_INIT_SCTTY
|
|||
behavour, but is often what you want in an embedded system where
|
||||
the console is only accessed during development or for maintenance.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_INIT_SYSLOG
|
||||
bool "Enable init to write to syslog"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_INIT
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_EXTRA_QUIET
|
||||
bool "Be _extra_ quiet on boot"
|
||||
default n
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see scripts/kbuild/config-language.txt.
|
||||
#
|
||||
|
||||
menu "ipsvd utilities"
|
||||
|
||||
config BUSYBOX_CONFIG_TCPSVD
|
||||
bool "tcpsvd"
|
||||
default n
|
||||
help
|
||||
tcpsvd listens on a tcp port and runs a program for each new connection
|
||||
|
||||
config BUSYBOX_CONFIG_UDPSVD
|
||||
bool "udpsvd"
|
||||
default n
|
||||
help
|
||||
udpsvd listens on a udp port and runs a program for each new connection
|
||||
|
||||
endmenu
|
|
@ -26,4 +26,105 @@ config BUSYBOX_CONFIG_MD5_SIZE_VS_SPEED
|
|||
2 3.0 5088
|
||||
3 (smallest) 5.1 4912
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FAST_TOP
|
||||
bool "Faster /proc scanning code (+100 bytes)"
|
||||
default y
|
||||
help
|
||||
This option makes top (and ps) ~20% faster (or 20% less CPU hungry),
|
||||
but code size is slightly bigger.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_ETC_NETWORKS
|
||||
bool "Support for /etc/networks"
|
||||
default n
|
||||
help
|
||||
Enable support for network names in /etc/networks. This is
|
||||
a rarely used feature which allows you to use names
|
||||
instead of IP/mask pairs in route command.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_EDITING
|
||||
bool "Command line editing"
|
||||
default y
|
||||
help
|
||||
Enable line editing (mainly for shell command line).
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_EDITING_MAX_LEN
|
||||
int "Maximum length of input"
|
||||
range 128 8192
|
||||
default 512
|
||||
depends on BUSYBOX_CONFIG_FEATURE_EDITING
|
||||
help
|
||||
Line editing code uses on-stack buffers for storage.
|
||||
You may want to decrease this parameter if your target machine
|
||||
benefits from smaller stack usage.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_EDITING_FANCY_KEYS
|
||||
bool "Additional editing keys"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_FEATURE_EDITING
|
||||
help
|
||||
Enable additonal editing keys (Ctrl-E, Ctrl-U etc).
|
||||
Arrow keys, Home/End/Delete and Ctrl-W work even without this option.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_EDITING_VI
|
||||
bool "vi-style line editing commands"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_FEATURE_EDITING
|
||||
help
|
||||
Enable vi-style line editing. In shells, this mode can be
|
||||
turned on and off with "set -o vi" and "set +o vi".
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_EDITING_HISTORY
|
||||
int "History size"
|
||||
range 0 99999
|
||||
default 256
|
||||
depends on BUSYBOX_CONFIG_FEATURE_EDITING
|
||||
help
|
||||
Specify command history size.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_EDITING_SAVEHISTORY
|
||||
bool "History saving"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_ASH && BUSYBOX_CONFIG_FEATURE_EDITING
|
||||
help
|
||||
Enable history saving in ash shell.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TAB_COMPLETION
|
||||
bool "Tab completion"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_FEATURE_EDITING
|
||||
help
|
||||
Enable tab completion.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_USERNAME_COMPLETION
|
||||
bool "Username completion"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_FEATURE_TAB_COMPLETION
|
||||
help
|
||||
Enable username completion.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_EDITING_FANCY_PROMPT
|
||||
bool "Fancy shell prompts"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_FEATURE_EDITING
|
||||
help
|
||||
Setting this option allows for prompts to use things like \w and
|
||||
\$ and escape codes.
|
||||
|
||||
config BUSYBOX_CONFIG_MONOTONIC_SYSCALL
|
||||
bool "Use clock_gettime(CLOCK_MONOTONIC) syscall"
|
||||
default n
|
||||
help
|
||||
Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring
|
||||
time intervals (time, ping, traceroute etc need this).
|
||||
Probably requires Linux 2.6+. If not selected, gettimeofday
|
||||
will be used instead (which gives wrong results if date/time
|
||||
is reset).
|
||||
|
||||
config BUSYBOX_CONFIG_IOCTL_HEX2STR_ERROR
|
||||
bool "Use ioctl names rather than hex values in error messages"
|
||||
default y
|
||||
help
|
||||
Use ioctl names rather than hex values in error messages
|
||||
(e.g. VT_DISALLOCATE rather than 0x5608). If disabled this
|
||||
saves about 1400 bytes.
|
||||
endmenu
|
||||
|
|
|
@ -59,12 +59,29 @@ config BUSYBOX_CONFIG_ADDGROUP
|
|||
help
|
||||
Utility for creating a new group account.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_ADDUSER_TO_GROUP
|
||||
bool "Support for adding users to groups"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_ADDGROUP
|
||||
help
|
||||
If called with two non-option arguments,
|
||||
addgroup will add an existing user to an
|
||||
existing group.
|
||||
|
||||
config BUSYBOX_CONFIG_DELGROUP
|
||||
bool "delgroup"
|
||||
default n
|
||||
help
|
||||
Utility for deleting a group account.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DEL_USER_FROM_GROUP
|
||||
bool "Support for removing users from groups."
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_DELGROUP
|
||||
help
|
||||
If called with two non-option arguments, deluser
|
||||
or delgroup will remove an user from a specified group.
|
||||
|
||||
config BUSYBOX_CONFIG_ADDUSER
|
||||
bool "adduser"
|
||||
default n
|
||||
|
@ -111,6 +128,13 @@ config BUSYBOX_CONFIG_LOGIN
|
|||
Note that Busybox binary must be setuid root for this applet to
|
||||
work properly.
|
||||
|
||||
config BUSYBOX_CONFIG_PAM
|
||||
bool "Support for PAM (Pluggable Authentication Modules)"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_LOGIN
|
||||
help
|
||||
Use PAM in login(1) instead of direct access to password database.
|
||||
|
||||
config BUSYBOX_CONFIG_LOGIN_SCRIPTS
|
||||
bool "Support for login scripts"
|
||||
depends on BUSYBOX_CONFIG_LOGIN
|
||||
|
@ -119,12 +143,20 @@ config BUSYBOX_CONFIG_LOGIN_SCRIPTS
|
|||
Enable this if you want login to execute $LOGIN_PRE_SUID_SCRIPT
|
||||
just prior to switching from root to logged-in user.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_NOLOGIN
|
||||
bool "Support for /etc/nologin"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_LOGIN
|
||||
help
|
||||
The file /etc/nologin is used by (some versions of) login(1).
|
||||
If it exists, non-root logins are prohibited.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SECURETTY
|
||||
bool "Support for /etc/securetty"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_LOGIN
|
||||
help
|
||||
The file /etc/securetty is used by (some versions of) login(1).
|
||||
The file /etc/securetty is used by (some versions of) login(1).
|
||||
The file contains the device names of tty lines (one per line,
|
||||
without leading /dev/) on which root is allowed to login.
|
||||
|
||||
|
@ -149,6 +181,20 @@ config BUSYBOX_CONFIG_FEATURE_PASSWD_WEAK_CHECK
|
|||
help
|
||||
With this option passwd will refuse new passwords which are "weak".
|
||||
|
||||
config BUSYBOX_CONFIG_CRYPTPW
|
||||
bool "cryptpw"
|
||||
default n
|
||||
help
|
||||
Applet for crypting a string.
|
||||
|
||||
config BUSYBOX_CONFIG_CHPASSWD
|
||||
bool "chpasswd"
|
||||
default n
|
||||
help
|
||||
chpasswd reads a file of user name and password pairs from
|
||||
standard input and uses this information to update a group of
|
||||
existing users.
|
||||
|
||||
config BUSYBOX_CONFIG_SU
|
||||
bool "su"
|
||||
default n
|
||||
|
|
|
@ -19,6 +19,13 @@ config BUSYBOX_CONFIG_BBCONFIG
|
|||
The bbconfig applet will print the config file with which
|
||||
busybox was built.
|
||||
|
||||
config BUSYBOX_CONFIG_CHRT
|
||||
bool "chrt"
|
||||
default n
|
||||
help
|
||||
manipulate real-time attributes of a process.
|
||||
This requires sched_{g,s}etparam support in your libc.
|
||||
|
||||
config BUSYBOX_CONFIG_CROND
|
||||
bool "crond"
|
||||
default y
|
||||
|
@ -256,19 +263,19 @@ config BUSYBOX_CONFIG_MAKEDEVS
|
|||
'leaf' is traditionally what busybox follows, it allows multiple
|
||||
devices of a particluar type to be created per command.
|
||||
e.g. /dev/hda[0-9]
|
||||
Device properties are passed as command line arguments.
|
||||
Device properties are passed as command line arguments.
|
||||
.
|
||||
'table' reads device properties from a file or stdin, allowing
|
||||
a batch of unrelated devices to be made with one command.
|
||||
User/group names are allowed as an alternative to uid/gid.
|
||||
User/group names are allowed as an alternative to uid/gid.
|
||||
|
||||
choice
|
||||
prompt "Choose makedevs behaviour"
|
||||
depends BUSYBOX_CONFIG_MAKEDEVS
|
||||
depends on BUSYBOX_CONFIG_MAKEDEVS
|
||||
default BUSYBOX_CONFIG_FEATURE_MAKEDEVS_TABLE
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MAKEDEVS_LEAF
|
||||
bool "leaf"
|
||||
bool "leaf"
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MAKEDEVS_TABLE
|
||||
bool "table"
|
||||
|
@ -289,12 +296,6 @@ config BUSYBOX_CONFIG_MT
|
|||
to advance or rewind a tape past a specified number of archive
|
||||
files on the tape.
|
||||
|
||||
config BUSYBOX_CONFIG_NMETER
|
||||
bool "nmeter"
|
||||
default n
|
||||
help
|
||||
nmeter prints various system parameters continuously.
|
||||
|
||||
config BUSYBOX_CONFIG_RAIDAUTORUN
|
||||
bool "raidautorun"
|
||||
default n
|
||||
|
@ -303,11 +304,11 @@ config BUSYBOX_CONFIG_RAIDAUTORUN
|
|||
search and start RAID arrays.
|
||||
|
||||
config BUSYBOX_CONFIG_READAHEAD
|
||||
bool "readahead"
|
||||
bool "readahead"
|
||||
default n
|
||||
depends on LFS
|
||||
depends on BUSYBOX_CONFIG_LFS
|
||||
help
|
||||
Preload the files listed on the command line into RAM cache so that
|
||||
Preload the files listed on the command line into RAM cache so that
|
||||
subsequent reads on these files will not block on disk I/O.
|
||||
|
||||
This applet just calls the readahead(2) system call on each file.
|
||||
|
@ -320,19 +321,19 @@ config BUSYBOX_CONFIG_READAHEAD
|
|||
run this applet as a background job.
|
||||
|
||||
config BUSYBOX_CONFIG_RUNLEVEL
|
||||
bool "runlevel"
|
||||
bool "runlevel"
|
||||
default n
|
||||
help
|
||||
find the current and previous system runlevel.
|
||||
find the current and previous system runlevel.
|
||||
|
||||
This applet uses utmp but does not rely on busybox supporing
|
||||
utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc.
|
||||
|
||||
config BUSYBOX_CONFIG_RX
|
||||
bool "rx"
|
||||
bool "rx"
|
||||
default n
|
||||
help
|
||||
Receive files using the Xmodem protocol.
|
||||
Receive files using the Xmodem protocol.
|
||||
|
||||
config BUSYBOX_CONFIG_STRINGS
|
||||
bool "strings"
|
||||
|
@ -371,6 +372,14 @@ config BUSYBOX_CONFIG_TIME
|
|||
When the command finishes, time writes a message to standard output
|
||||
giving timing statistics about this program run.
|
||||
|
||||
config BUSYBOX_CONFIG_TTYSIZE
|
||||
bool "ttysize"
|
||||
default n
|
||||
help
|
||||
A replacement for "stty size". Unlike stty, can report only width,
|
||||
only height, or both, in any order. It also does not complain on error,
|
||||
but returns default 80x24. Usage in shell scripts: width=`ttysize w`.
|
||||
|
||||
config BUSYBOX_CONFIG_WATCHDOG
|
||||
bool "watchdog"
|
||||
default y
|
||||
|
|
|
@ -134,7 +134,7 @@ config BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE
|
|||
config BUSYBOX_CONFIG_FEATURE_2_4_MODULES
|
||||
# Simulate indentation
|
||||
bool "Support version 2.2.x to 2.4.x Linux kernels"
|
||||
default y
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_RMMOD || BUSYBOX_CONFIG_MODPROBE
|
||||
help
|
||||
Support module loading for 2.2.x and 2.4.x Linux kernels.
|
||||
|
|
|
@ -12,17 +12,25 @@ config BUSYBOX_CONFIG_FEATURE_IPV6
|
|||
Enable IPv6 support in busybox.
|
||||
This adds IPv6 support in the networking applets.
|
||||
|
||||
config BUSYBOX_CONFIG_VERBOSE_RESOLUTION_ERRORS
|
||||
bool "Verbose resolution errors"
|
||||
default y
|
||||
help
|
||||
Enable if you are not satisfied with simplistic
|
||||
"can't resolve 'hostname.com'" and want to know more.
|
||||
This may increase size of your executable a bit.
|
||||
|
||||
config BUSYBOX_CONFIG_ARP
|
||||
bool "arp"
|
||||
default n
|
||||
help
|
||||
Manipulate the system ARP cache
|
||||
Manipulate the system ARP cache.
|
||||
|
||||
config BUSYBOX_CONFIG_ARPING
|
||||
bool "arping"
|
||||
default y
|
||||
help
|
||||
Ping hosts by ARP packets
|
||||
Ping hosts by ARP packets.
|
||||
|
||||
config BUSYBOX_CONFIG_DNSD
|
||||
bool "dnsd"
|
||||
|
@ -67,7 +75,7 @@ config BUSYBOX_CONFIG_HOSTNAME
|
|||
bool "hostname"
|
||||
default n
|
||||
help
|
||||
Show or set the system's host name
|
||||
Show or set the system's host name.
|
||||
|
||||
config BUSYBOX_CONFIG_HTTPD
|
||||
bool "httpd"
|
||||
|
@ -75,6 +83,14 @@ config BUSYBOX_CONFIG_HTTPD
|
|||
help
|
||||
Serve web pages via an HTTP server.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_HTTPD_USE_SENDFILE
|
||||
bool "Use sendfile system call"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_HTTPD
|
||||
help
|
||||
When enabled, httpd will use the kernel sendfile() function
|
||||
instead of read/write loop.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP
|
||||
bool "Support reloading the global config file using hup signal"
|
||||
default y
|
||||
|
@ -132,7 +148,7 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
|
|||
help
|
||||
This option enables support for running scripts through an
|
||||
interpreter. Turn this on if you want PHP scripts to work
|
||||
properly. You need to supply an addition line in your httpd
|
||||
properly. You need to supply an additional line in your httpd
|
||||
config file:
|
||||
*.php:/path/to/your/php
|
||||
|
||||
|
@ -154,6 +170,19 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_ENCODE_URL_STR
|
|||
For example, httpd -e "<Hello World>" as
|
||||
"<Hello World>".
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_HTTPD_ERROR_PAGES
|
||||
bool "Enable support for custom error pages"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_HTTPD
|
||||
help
|
||||
This option allows you to define custom error pages in
|
||||
the configuration file instead of the default HTTP status
|
||||
error pages. For instance, if you add the line:
|
||||
E404:/path/e404.html
|
||||
in the config file, the server will respond the specified
|
||||
'/path/e404.html' file instead of the terse '404 NOT FOUND'
|
||||
message.
|
||||
|
||||
config BUSYBOX_CONFIG_IFCONFIG
|
||||
bool "ifconfig"
|
||||
default y
|
||||
|
@ -204,7 +233,6 @@ config BUSYBOX_CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS
|
|||
config BUSYBOX_CONFIG_IFUPDOWN
|
||||
bool "ifupdown"
|
||||
default n
|
||||
select BUSYBOX_CONFIG_RUN_PARTS
|
||||
help
|
||||
Activate or deactivate the specified interfaces. This applet makes
|
||||
use of either "ifconfig" and "route" or the "ip" command to actually
|
||||
|
@ -215,8 +243,18 @@ config BUSYBOX_CONFIG_IFUPDOWN
|
|||
against my better judgement (since this will surely result in plenty
|
||||
of support questions on the mailing list), I do not force you to
|
||||
enable these additional options. It is up to you to supply either
|
||||
"ifconfig" and "route" or the "ip" command, either via busybox or via
|
||||
standalone utilities.
|
||||
"ifconfig", "route" and "run-parts" or the "ip" command, either
|
||||
via busybox or via standalone utilities.
|
||||
|
||||
config BUSYBOX_CONFIG_IFUPDOWN_IFSTATE_PATH
|
||||
string "Absolute path to ifstate file"
|
||||
default "/var/run/ifstate"
|
||||
help
|
||||
ifupdown keeps state information in a file called ifstate.
|
||||
Typically it is located in /var/run/ifstate, however
|
||||
some distributions tend to put it in other places
|
||||
(debian, for example, uses /etc/network/run/ifstate).
|
||||
This config option defines location of ifstate.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP
|
||||
bool "Use ip applet"
|
||||
|
@ -259,7 +297,7 @@ config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV4
|
|||
default n
|
||||
depends on BUSYBOX_CONFIG_IFUPDOWN
|
||||
help
|
||||
If you want busybox to talk IPv4, leave this on.
|
||||
If you want ifup/ifdown to talk IPv4, leave this on.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV6
|
||||
bool "Enable support for IPv6"
|
||||
|
@ -268,13 +306,14 @@ config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV6
|
|||
help
|
||||
If you need support for IPv6, turn this option on.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPX
|
||||
bool "Enable support for IPX"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_IFUPDOWN
|
||||
help
|
||||
If this option is selected you can use busybox to work with IPX
|
||||
networks.
|
||||
### UNUSED
|
||||
### config FEATURE_IFUPDOWN_IPX
|
||||
### bool "Enable support for IPX"
|
||||
### default n
|
||||
### depends on IFUPDOWN
|
||||
### help
|
||||
### If this option is selected you can use busybox to work with IPX
|
||||
### networks.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_MAPPING
|
||||
bool "Enable mapping support"
|
||||
|
@ -284,6 +323,16 @@ config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_MAPPING
|
|||
This enables support for the "mapping" stanza, unless you have
|
||||
a weird network setup you don't need it.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP
|
||||
bool "Enable support for external dhcp clients"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_IFUPDOWN
|
||||
help
|
||||
This enables support for the external dhcp clients. Clients are
|
||||
tried in the following order: dhcpcd, dhclient, pump and udhcpc.
|
||||
Otherwise, if udhcpc applet is enabled, it is used.
|
||||
Otherwise, ifup/ifdown will have no support for DHCP.
|
||||
|
||||
config BUSYBOX_CONFIG_INETD
|
||||
bool "inetd"
|
||||
default n
|
||||
|
@ -330,7 +379,7 @@ config BUSYBOX_CONFIG_FEATURE_INETD_RPC
|
|||
bool "Support RPC services"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_INETD
|
||||
depends on BUSYBOX_CONFIG_FEATURE_HAVE_RPC
|
||||
select BUSYBOX_CONFIG_FEATURE_HAVE_RPC
|
||||
help
|
||||
Support Sun-RPC based services
|
||||
|
||||
|
@ -387,6 +436,7 @@ config BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS
|
|||
ip link -> iplink
|
||||
ip route -> iproute
|
||||
ip tunnel -> iptunnel
|
||||
ip rule -> iprule
|
||||
|
||||
Say N unless you desparately need the short form of the ip
|
||||
object commands.
|
||||
|
@ -466,7 +516,7 @@ config BUSYBOX_CONFIG_NETMSG
|
|||
simple program for sending udp broadcast messages
|
||||
|
||||
config BUSYBOX_CONFIG_NC_SERVER
|
||||
bool "Netcat server options (-lp)"
|
||||
bool "Netcat server options (-l)"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_NC
|
||||
help
|
||||
|
@ -487,6 +537,14 @@ config BUSYBOX_CONFIG_NETSTAT
|
|||
help
|
||||
netstat prints information about the Linux networking subsystem.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_NETSTAT_WIDE
|
||||
bool " Enable wide netstat output"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_NETSTAT
|
||||
help
|
||||
Add support for wide columns. Useful when displaying IPv6 addresses
|
||||
(-W option).
|
||||
|
||||
config BUSYBOX_CONFIG_NSLOOKUP
|
||||
bool "nslookup"
|
||||
default y
|
||||
|
@ -500,6 +558,19 @@ config BUSYBOX_CONFIG_PING
|
|||
ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to
|
||||
elicit an ICMP ECHO_RESPONSE from a host or gateway.
|
||||
|
||||
config BUSYBOX_CONFIG_PING6
|
||||
bool "ping6"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_FEATURE_IPV6 && BUSYBOX_CONFIG_PING
|
||||
help
|
||||
This will give you a ping that can talk IPv6.
|
||||
|
||||
config BUSYBOX_CONFIG_PSCAN
|
||||
bool "pscan"
|
||||
default n
|
||||
help
|
||||
Simple network port scanner.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FANCY_PING
|
||||
bool "Enable fancy ping output"
|
||||
default y
|
||||
|
@ -508,27 +579,18 @@ config BUSYBOX_CONFIG_FEATURE_FANCY_PING
|
|||
Make the output from the ping applet include statistics, and at the
|
||||
same time provide full support for ICMP packets.
|
||||
|
||||
config BUSYBOX_CONFIG_PING6
|
||||
bool "ping6"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_FEATURE_IPV6
|
||||
help
|
||||
This will give you a ping that can talk IPv6.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FANCY_PING6
|
||||
bool "Enable fancy ping6 output"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_PING6
|
||||
help
|
||||
Make the output from the ping6 applet include statistics, and at the
|
||||
same time provide full support for ICMP packets.
|
||||
|
||||
config BUSYBOX_CONFIG_ROUTE
|
||||
bool "route"
|
||||
default y
|
||||
help
|
||||
Route displays or manipulates the kernel's IP routing tables.
|
||||
|
||||
config BUSYBOX_CONFIG_SLATTACH
|
||||
bool "slattach"
|
||||
default n
|
||||
help
|
||||
slattach is a small utility to attach network interfaces to serial lines.
|
||||
|
||||
config BUSYBOX_CONFIG_TELNET
|
||||
bool "telnet"
|
||||
default y
|
||||
|
@ -703,13 +765,6 @@ config BUSYBOX_CONFIG_FEATURE_WGET_AUTHENTICATION
|
|||
help
|
||||
Support authenticated HTTP transfers.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_WGET_IP6_LITERAL
|
||||
bool "Enable IPv6 literal addresses"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_WGET && BUSYBOX_CONFIG_FEATURE_IPV6
|
||||
help
|
||||
Support IPv6 address literal notation in URLs.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_WGET_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default y
|
||||
|
|
|
@ -32,6 +32,16 @@ config BUSYBOX_CONFIG_APP_DUMPLEASES
|
|||
|
||||
See http://udhcp.busybox.net for further details.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY
|
||||
bool "Rewrite the lease file at every new acknowledge"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_APP_UDHCPD
|
||||
help
|
||||
If selected, udhcpd will write a new file with leases every
|
||||
time a new lease has been accepted, thus eleminating the need
|
||||
to send SIGUSR1 for the initial writing, or updating. Any timed
|
||||
rewriting remains undisturbed
|
||||
|
||||
config BUSYBOX_CONFIG_APP_UDHCPC
|
||||
bool "udhcp Client (udhcpc)"
|
||||
default y
|
||||
|
@ -44,17 +54,6 @@ config BUSYBOX_CONFIG_APP_UDHCPC
|
|||
|
||||
See http://udhcp.busybox.net for further details.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UDHCP_SYSLOG
|
||||
bool "Log udhcp messages to syslog"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_APP_UDHCPD || BUSYBOX_CONFIG_APP_UDHCPC
|
||||
select BUSYBOX_CONFIG_FEATURE_SYSLOG
|
||||
help
|
||||
If not daemonized, udhcpd prints its messages to stdout/stderr.
|
||||
If this option is selected, it will also log them to syslog.
|
||||
|
||||
See http://udhcp.busybox.net for further details.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UDHCP_DEBUG
|
||||
bool "Compile udhcp with noisy debugging messages"
|
||||
default n
|
||||
|
@ -65,3 +64,11 @@ config BUSYBOX_CONFIG_FEATURE_UDHCP_DEBUG
|
|||
the background.
|
||||
|
||||
See http://udhcp.busybox.net for further details.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_RFC3397
|
||||
bool "Support for RFC3397 domain search (experimental)"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_APP_UDHCPD || BUSYBOX_CONFIG_APP_UDHCPC
|
||||
help
|
||||
If selected, both client and server will support passing of domain
|
||||
search lists via option 119, specified in RFC3397.
|
||||
|
|
|
@ -43,6 +43,12 @@ config BUSYBOX_CONFIG_KILLALL5
|
|||
default y
|
||||
depends on BUSYBOX_CONFIG_KILL
|
||||
|
||||
config BUSYBOX_CONFIG_NMETER
|
||||
bool "nmeter"
|
||||
default n
|
||||
help
|
||||
Prints selected system stats continuously, one line per update.
|
||||
|
||||
config BUSYBOX_CONFIG_PIDOF
|
||||
bool "pidof"
|
||||
default y
|
||||
|
@ -74,7 +80,7 @@ config BUSYBOX_CONFIG_PS
|
|||
|
||||
config BUSYBOX_CONFIG_FEATURE_PS_WIDE
|
||||
bool "Enable argument for wide output (-w)"
|
||||
default y
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_PS
|
||||
help
|
||||
Support argument 'w' for wide output.
|
||||
|
@ -102,11 +108,25 @@ config BUSYBOX_CONFIG_TOP
|
|||
system.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
|
||||
bool "Support showing CPU usage percentage (add 2k bytes)"
|
||||
bool "Show CPU per-process usage percentage (adds 2k bytes)"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_TOP
|
||||
help
|
||||
Make top display CPU usage.
|
||||
Make top display CPU usage for each process.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
|
||||
bool "Show CPU global usage percentage (adds 0.5k bytes)"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
|
||||
help
|
||||
Makes top display "CPU: NN% usr NN% sys..." line.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TOP_DECIMALS
|
||||
bool "Show 1/10th of a percent in CPU/mem statistics (adds 0.3k bytes)"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
|
||||
help
|
||||
Show 1/10th of a percent in CPU/mem statistics.
|
||||
|
||||
config BUSYBOX_CONFIG_UPTIME
|
||||
bool "uptime"
|
||||
|
@ -116,6 +136,14 @@ config BUSYBOX_CONFIG_UPTIME
|
|||
the system has been running, how many users are currently logged
|
||||
on, and the system load averages for the past 1, 5, and 15 minutes.
|
||||
|
||||
config BUSYBOX_CONFIG_WATCH
|
||||
bool "watch"
|
||||
default n
|
||||
#huh?? select DATE
|
||||
help
|
||||
watch is used to execute a program periodically, showing
|
||||
output to the screen.
|
||||
|
||||
|
||||
endmenu
|
||||
|
||||
|
|
|
@ -0,0 +1,108 @@
|
|||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see scripts/kbuild/config-language.txt.
|
||||
#
|
||||
|
||||
menu "Selinux Utilities"
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
|
||||
config BUSYBOX_CONFIG_CHCON
|
||||
bool "chcon"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Enable support to change the security context of file.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CHCON_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_CHCON && BUSYBOX_CONFIG_GETOPT_LONG
|
||||
help
|
||||
Support long options for the chcon applet.
|
||||
|
||||
config BUSYBOX_CONFIG_GETENFORCE
|
||||
bool "getenforce"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Enable support to get the current mode of SELinux.
|
||||
|
||||
config BUSYBOX_CONFIG_GETSEBOOL
|
||||
bool "getsebool"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Enable support to get SELinux boolean values.
|
||||
|
||||
config BUSYBOX_CONFIG_LOAD_POLICY
|
||||
bool "load_policy"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Enable support to load SELinux policy.
|
||||
|
||||
config BUSYBOX_CONFIG_MATCHPATHCON
|
||||
bool "matchpathcon"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Enable support to get default security context of the
|
||||
specified path from the file contexts configuration.
|
||||
|
||||
config BUSYBOX_CONFIG_RESTORECON
|
||||
bool "restorecon"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Enable support to relabel files. The feature is almost
|
||||
the same as setfiles, but usage is a little different.
|
||||
|
||||
config BUSYBOX_CONFIG_RUNCON
|
||||
bool "runcon"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Enable support to run command in speficied security context.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_RUNCON_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_RUNCON && BUSYBOX_CONFIG_GETOPT_LONG
|
||||
help
|
||||
Support long options for the runcon applet.
|
||||
|
||||
config BUSYBOX_CONFIG_SELINUXENABLED
|
||||
bool "selinuxenabled"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Enable support for this command to be used within shell scripts
|
||||
to determine if selinux is enabled.
|
||||
|
||||
config BUSYBOX_CONFIG_SETENFORCE
|
||||
bool "setenforce"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Enable support to modify the mode SELinux is running in.
|
||||
|
||||
config BUSYBOX_CONFIG_SETFILES
|
||||
bool "setfiles"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Enable support to modify to relabel files.
|
||||
Notice: If you built libselinux with -D_FILE_OFFSET_BITS=64,
|
||||
(It is default in libselinux's Makefile), you _must_ enable
|
||||
CONFIG_LFS.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SETFILES_CHECK_OPTION
|
||||
bool "Enable check option"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_SETFILES
|
||||
help
|
||||
Support "-c" option (check the validity of the contexts against
|
||||
the specified binary policy) for setfiles. Requires libsepol.
|
||||
|
||||
endmenu
|
||||
|
|
@ -87,7 +87,7 @@ config BUSYBOX_CONFIG_ASH_MATH_SUPPORT
|
|||
|
||||
config BUSYBOX_CONFIG_ASH_MATH_SUPPORT_64
|
||||
bool "Extend Posix math support to 64 bit"
|
||||
default n
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_ASH_MATH_SUPPORT
|
||||
help
|
||||
Enable 64-bit math support in the ash shell. This will make
|
||||
|
@ -107,7 +107,7 @@ config BUSYBOX_CONFIG_ASH_BUILTIN_ECHO
|
|||
select BUSYBOX_CONFIG_ECHO
|
||||
depends on BUSYBOX_CONFIG_ASH
|
||||
help
|
||||
Enable support for echo, built in to ash.
|
||||
Enable support for echo, builtin to ash.
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_BUILTIN_TEST
|
||||
bool "Builtin version of 'test'"
|
||||
|
@ -115,7 +115,7 @@ config BUSYBOX_CONFIG_ASH_BUILTIN_TEST
|
|||
select BUSYBOX_CONFIG_TEST
|
||||
depends on BUSYBOX_CONFIG_ASH
|
||||
help
|
||||
Enable support for test, built in to ash.
|
||||
Enable support for test, builtin to ash.
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_CMDCMD
|
||||
bool "'command' command to override shell builtins"
|
||||
|
@ -135,7 +135,7 @@ config BUSYBOX_CONFIG_ASH_MAIL
|
|||
|
||||
config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE
|
||||
bool "Optimize for size instead of speed"
|
||||
default y
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_ASH
|
||||
help
|
||||
Compile ash for reduced size at the price of speed.
|
||||
|
@ -153,7 +153,7 @@ config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT
|
|||
|
||||
config BUSYBOX_CONFIG_ASH_EXPAND_PRMT
|
||||
bool "Expand prompt string"
|
||||
default n
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_ASH
|
||||
help
|
||||
"PS#" may be contain volatile content, such as backquote commands.
|
||||
|
@ -176,6 +176,54 @@ config BUSYBOX_CONFIG_HUSH
|
|||
word ), arithmetic expansion, aliases, brace expansion, tilde
|
||||
expansion, &> and >& redirection of stdout+stderr, etc.
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_HELP
|
||||
bool "help builtin"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_HUSH
|
||||
help
|
||||
Enable help builtin in hush. Code size + ~1 kbyte.
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_INTERACTIVE
|
||||
bool "Interactive mode"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_HUSH
|
||||
help
|
||||
Enable interactive mode (prompt and command editing).
|
||||
Without this, hush simply reads and executes commands
|
||||
from stdin just like a shell script from the file.
|
||||
No prompt, no PS1/PS2 magic shell variables.
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_JOB
|
||||
bool "Job control"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_HUSH_INTERACTIVE
|
||||
help
|
||||
Enable job control: Ctrl-Z backgrounds, Ctrl-C interrupts current
|
||||
command (not entire shell), fg/bg builtins work. Without this option,
|
||||
"cmd &" still works by simply spawning a process and immediately
|
||||
prompting for next command (or executing next command in a script),
|
||||
but no separate process group is formed.
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_TICK
|
||||
bool "Process substitution"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_HUSH
|
||||
help
|
||||
Enable process substitution `command` and $(command) in hush.
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_IF
|
||||
bool "Support if/then/elif/else/fi"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_HUSH
|
||||
help
|
||||
Enable if/then/elif/else/fi in hush.
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_LOOPS
|
||||
bool "Support for, while and until loops"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_HUSH
|
||||
help
|
||||
Enable for, while and until loops in hush.
|
||||
|
||||
config BUSYBOX_CONFIG_LASH
|
||||
bool "lash"
|
||||
|
@ -216,12 +264,12 @@ config BUSYBOX_CONFIG_FEATURE_SH_EXTRA_QUIET
|
|||
help
|
||||
Remove the busybox introduction when starting a shell.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE_SHELL
|
||||
config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE
|
||||
bool "Standalone shell"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_MSH || BUSYBOX_CONFIG_LASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH
|
||||
depends on (BUSYBOX_CONFIG_MSH || BUSYBOX_CONFIG_LASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH) && BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
|
||||
help
|
||||
This option causes the selected busybox shell to use busybox applets
|
||||
This option causes busybox shells to use busybox applets
|
||||
in preference to executables in the PATH whenever possible. For
|
||||
example, entering the command 'ifconfig' into the shell would cause
|
||||
busybox to use the ifconfig busybox applet. Specifying the fully
|
||||
|
@ -230,66 +278,43 @@ config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE_SHELL
|
|||
is generally used when creating a statically linked version of busybox
|
||||
for use as a rescue shell, in the event that you screw up your system.
|
||||
|
||||
Note that this will *also* cause applets to take precedence
|
||||
over shell builtins of the same name. So turning this on will
|
||||
eliminate any performance gained by turning on the builtin "echo"
|
||||
and "test" commands in ash.
|
||||
This is implemented by re-execing /proc/self/exe (typically)
|
||||
with right parameters. Some selected applets ("NOFORK" applets)
|
||||
can even be executed without creating new process.
|
||||
Instead, busybox will call <applet>_main() internally.
|
||||
|
||||
Note that when using this option, the shell will attempt to directly
|
||||
run '/bin/busybox'. If you do not have the busybox binary sitting in
|
||||
that exact location with that exact name, this option will not work at
|
||||
all.
|
||||
However, this causes problems in chroot jails without mounted /proc
|
||||
and with ps/top (command name can be shown as 'exe' for applets
|
||||
started this way).
|
||||
# untrue?
|
||||
# Note that this will *also* cause applets to take precedence
|
||||
# over shell builtins of the same name. So turning this on will
|
||||
# eliminate any performance gained by turning on the builtin "echo"
|
||||
# and "test" commands in ash.
|
||||
# untrue?
|
||||
# Note that when using this option, the shell will attempt to directly
|
||||
# run '/bin/busybox'. If you do not have the busybox binary sitting in
|
||||
# that exact location with that exact name, this option will not work at
|
||||
# all.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING
|
||||
bool "Command line editing"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_MSH || BUSYBOX_CONFIG_LASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH
|
||||
help
|
||||
Enable command editing in shell.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING_VI
|
||||
bool "vi-style line editing commands"
|
||||
config BUSYBOX_CONFIG_CTTYHACK
|
||||
bool "cttyhack"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING
|
||||
help
|
||||
Enable vi-style line editing in the shell. This mode can be
|
||||
turned on and off with "set -o vi" and "set +o vi".
|
||||
One common problem reported on the mailing list is "can't access tty;
|
||||
job control turned off" error message which typically appears when
|
||||
one tries to use shell with stdin/stdout opened to /dev/console.
|
||||
This device is special - it cannot be a controlling tty.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_COMMAND_HISTORY
|
||||
int "History size"
|
||||
range 0 99999
|
||||
default 15
|
||||
depends on BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING
|
||||
help
|
||||
Specify command history size in shell.
|
||||
Proper solution is to use correct device instead of /dev/console.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_COMMAND_SAVEHISTORY
|
||||
bool "History saving"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_ASH && BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING
|
||||
help
|
||||
Enable history saving in ash shell.
|
||||
cttyhack provides "quick and dirty" solution to this problem.
|
||||
It analyzes stdin with various ioctls, trying to determine whether
|
||||
it is a /dev/ttyN or /dev/ttySN (virtual terminal or serial line).
|
||||
If it detects one, it closes stdin/out/err and reopens that device.
|
||||
Then it executes given program. Usage example for /etc/inittab
|
||||
(for busybox init):
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_COMMAND_TAB_COMPLETION
|
||||
bool "Tab completion"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING
|
||||
help
|
||||
Enable tab completion in shell.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION
|
||||
bool "Username completion"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_FEATURE_COMMAND_TAB_COMPLETION
|
||||
help
|
||||
Enable username completion in shell.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SH_FANCY_PROMPT
|
||||
bool "Fancy shell prompts"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING
|
||||
help
|
||||
Setting this option allows for prompts to use things like \w and
|
||||
\$ and also using escape codes.
|
||||
::respawn:/bin/cttyhack /bin/sh
|
||||
|
||||
endmenu
|
||||
|
|
|
@ -59,6 +59,7 @@ config BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG
|
|||
config BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE
|
||||
int " Circular buffer size in Kbytes (minimum 4KB)"
|
||||
default 16
|
||||
range 4 2147483647
|
||||
depends on BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG
|
||||
help
|
||||
This option sets the size of the circular buffer
|
||||
|
@ -88,8 +89,6 @@ config BUSYBOX_CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING
|
|||
config BUSYBOX_CONFIG_KLOGD
|
||||
bool "klogd"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_SYSLOGD
|
||||
select BUSYBOX_CONFIG_FEATURE_SYSLOG
|
||||
help
|
||||
klogd is a utility which intercepts and logs all
|
||||
messages from the Linux kernel and sends the messages
|
||||
|
|
|
@ -127,7 +127,7 @@ config BUSYBOX_CONFIG_FEATURE_SGI_LABEL
|
|||
config BUSYBOX_CONFIG_FEATURE_SUN_LABEL
|
||||
bool "Support SUN disklabels"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE
|
||||
depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE
|
||||
help
|
||||
Enabling this option allows you to create or change SUN disklabels.
|
||||
Most people can safely leave this option disabled.
|
||||
|
@ -181,7 +181,7 @@ config BUSYBOX_CONFIG_MKFS_MINIX
|
|||
this utility will do the job for you.
|
||||
|
||||
comment "Minix filesystem support"
|
||||
depends on BUSYBOX_CONFIG_FSCK_MINIX || BUSYBOX_CONFIG_MKFS_MINIX
|
||||
depends on BUSYBOX_CONFIG_FSCK_MINIX || BUSYBOX_CONFIG_MKFS_MINIX
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MINIX2
|
||||
bool "Support Minix fs v2 (fsck_minix/mkfs_minix)"
|
||||
|
@ -269,46 +269,41 @@ config BUSYBOX_CONFIG_MDEV
|
|||
bool "mdev"
|
||||
default n
|
||||
help
|
||||
mdev is a mini-udev implementation: call it with -s to populate
|
||||
/dev from /sys, then "echo /sbin/mdev > /proc/sys/kernel/hotplug" to
|
||||
have it handle hotplug events afterwards. Device names are taken
|
||||
from sysfs.
|
||||
mdev is a mini-udev implementation for dynamically creating device
|
||||
nodes in the /dev directory.
|
||||
|
||||
For more information, please see docs/mdev.txt
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MDEV_CONF
|
||||
bool "Support /etc/mdev.conf"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_MDEV
|
||||
help
|
||||
The mdev config file contains lines that look like:
|
||||
Add support for the mdev config file to control ownership and
|
||||
permissions of the device nodes.
|
||||
|
||||
hd[a-z][0-9]* 0:3 660
|
||||
|
||||
That's device name (with regex match), uid:gid, and permissions.
|
||||
|
||||
Config file parsing stops on the first matching line. If no config
|
||||
entry is matched, devices are created with default 0:0 660. (Make
|
||||
the last line match .* to override this.)
|
||||
For more information, please see docs/mdev.txt
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MDEV_EXEC
|
||||
bool "Support command execution at device addition/removal"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
|
||||
help
|
||||
This adds support for an optional field to /etc/mdev.conf, consisting
|
||||
of a special character and a command line to run after creating the
|
||||
corresponding device(s) and before removing, ala:
|
||||
This adds support for an optional field to /etc/mdev.conf for
|
||||
executing commands when devices are created/removed.
|
||||
|
||||
hdc root:cdrom 660 *ln -s $MDEV cdrom
|
||||
For more information, please see docs/mdev.txt
|
||||
|
||||
The $MDEV environment variable is set to the name of the device.
|
||||
config BUSYBOX_CONFIG_FEATURE_MDEV_LOAD_FIRMWARE
|
||||
bool "Support loading of firmwares"
|
||||
default n
|
||||
depends on BUSYBOX_CONFIG_MDEV
|
||||
help
|
||||
Some devices need to load firmware before they can be usable.
|
||||
|
||||
The special characters and their meanings are:
|
||||
@ Run after creating the device.
|
||||
$ Run before removing the device.
|
||||
* Run both after creating and before removing the device.
|
||||
|
||||
Commands are executed via system() so you need /bin/sh, meaning you
|
||||
probably want to select a default shell in the Shells menu.
|
||||
These devices will request userspace look up the files in
|
||||
/lib/firmware/ and if it exists, send it to the kernel for
|
||||
loading into the hardware.
|
||||
|
||||
config BUSYBOX_CONFIG_MKSWAP
|
||||
bool "mkswap"
|
||||
|
@ -369,7 +364,7 @@ config BUSYBOX_CONFIG_FEATURE_MOUNT_NFS
|
|||
bool "Support mounting NFS file systems"
|
||||
default y
|
||||
depends on BUSYBOX_CONFIG_MOUNT
|
||||
depends on BUSYBOX_CONFIG_FEATURE_HAVE_RPC
|
||||
select BUSYBOX_CONFIG_FEATURE_HAVE_RPC
|
||||
select BUSYBOX_CONFIG_FEATURE_SYSLOG
|
||||
help
|
||||
Enable mounting of NFS file systems.
|
||||
|
@ -495,7 +490,7 @@ config BUSYBOX_CONFIG_FEATURE_MOUNT_LOOP
|
|||
The umount command will also free that loopback device.
|
||||
|
||||
You can still use the 'losetup' utility (to manually associate files
|
||||
with loop devices) if you need to do something advanced, such as
|
||||
with loop devices) if you need to do something advanced, such as
|
||||
specify an offset or cryptographic options to the loopback device.
|
||||
(If you don't want umount to free the loop device, use "umount -D".)
|
||||
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
Index: busybox-1.4.2/applets/Kbuild
|
||||
Index: busybox-1.7.2/applets/Kbuild
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/applets/Kbuild 2007-06-04 13:21:32.429046704 +0200
|
||||
+++ busybox-1.4.2/applets/Kbuild 2007-06-04 13:21:32.495036672 +0200
|
||||
@@ -10,6 +10,7 @@
|
||||
--- busybox-1.7.2.orig/applets/Kbuild 2007-10-04 14:30:23.484330073 +0200
|
||||
+++ busybox-1.7.2/applets/Kbuild 2007-10-04 14:33:47.751970627 +0200
|
||||
@@ -20,6 +20,6 @@
|
||||
HOSTCFLAGS_usage.o = -I$(srctree)/include
|
||||
|
||||
# Generated file needs additional love
|
||||
|
||||
+applets/usage: include/autoconf.h
|
||||
applets/applets.o: include/usage_compressed.h
|
||||
|
||||
hostprogs-y += usage
|
||||
applets/applets.o: include/usage_compressed.h
|
||||
-applets/usage: .config $(srctree)/applets/usage_compressed
|
||||
-include/usage_compressed.h: applets/usage $(srctree)/applets/usage_compressed
|
||||
+applets/usage: .config $(srctree)/applets/usage_compressed include/autoconf.h
|
||||
+include/usage_compressed.h: applets/usage $(srctree)/applets/usage_compressed include/autoconf.h
|
||||
$(call cmd,gen_usage_compressed)
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
Index: busybox-1.4.2/networking/wget.c
|
||||
Index: busybox-1.7.2/networking/wget.c
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/networking/wget.c 2007-06-04 13:21:32.408049896 +0200
|
||||
+++ busybox-1.4.2/networking/wget.c 2007-06-04 13:21:32.681008400 +0200
|
||||
@@ -136,7 +136,7 @@
|
||||
{ "directory-prefix", required_argument, NULL, 'P' },
|
||||
{ "proxy", required_argument, NULL, 'Y' },
|
||||
{ "user-agent", required_argument, NULL, 'U' },
|
||||
- { "passive-ftp", no_argument, NULL, 0xff },
|
||||
+ { "passive-ftp", no_argument, NULL, 0xfd },
|
||||
{ "header", required_argument, NULL, 0xfe },
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
--- busybox-1.7.2.orig/networking/wget.c 2007-10-04 14:35:17.057059834 +0200
|
||||
+++ busybox-1.7.2/networking/wget.c 2007-10-04 14:35:27.013627222 +0200
|
||||
@@ -140,7 +140,7 @@
|
||||
"directory-prefix\0" Required_argument "P"
|
||||
"proxy\0" Required_argument "Y"
|
||||
"user-agent\0" Required_argument "U"
|
||||
- "passive-ftp\0" No_argument "\xff"
|
||||
+ "passive-ftp\0" No_argument "\xfd"
|
||||
"header\0" Required_argument "\xfe"
|
||||
;
|
||||
applet_long_options = wget_longopts;
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
Index: busybox-1.4.2/Makefile.flags
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/Makefile.flags 2007-06-04 13:21:32.387053088 +0200
|
||||
+++ busybox-1.4.2/Makefile.flags 2007-06-04 13:21:32.871979368 +0200
|
||||
@@ -16,7 +16,7 @@
|
||||
-D"BB_VER=KBUILD_STR($(BB_VER))" -DBB_BT=AUTOCONF_TIMESTAMP
|
||||
|
||||
CFLAGS += \
|
||||
- -Wall -Wstrict-prototypes -Wshadow -Werror -Wundef \
|
||||
+ -Wall -Wstrict-prototypes -Wshadow -Wundef \
|
||||
-funsigned-char -fno-builtin-strlen -finline-limit=0 -static-libgcc \
|
||||
-Os -falign-functions=1 -falign-jumps=1 -falign-loops=1 \
|
||||
-fomit-frame-pointer -ffunction-sections -fdata-sections
|
|
@ -1,9 +1,9 @@
|
|||
Index: busybox-1.4.2/networking/udhcp/dhcpc.c
|
||||
Index: busybox-1.7.2/networking/udhcp/dhcpc.c
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/networking/udhcp/dhcpc.c 2007-07-18 10:07:20.161035443 +0200
|
||||
+++ busybox-1.4.2/networking/udhcp/dhcpc.c 2007-07-18 10:09:15.515609124 +0200
|
||||
@@ -273,6 +273,12 @@
|
||||
tv.tv_sec = timeout - uptime();
|
||||
--- busybox-1.7.2.orig/networking/udhcp/dhcpc.c 2007-10-04 14:36:41.521873204 +0200
|
||||
+++ busybox-1.7.2/networking/udhcp/dhcpc.c 2007-10-04 14:38:28.231954268 +0200
|
||||
@@ -309,6 +309,12 @@
|
||||
jump_in:
|
||||
tv.tv_usec = 0;
|
||||
|
||||
+ /* When running on a bridge, the ifindex may have changed (e.g. if
|
||||
|
@ -12,6 +12,6 @@ Index: busybox-1.4.2/networking/udhcp/dhcpc.c
|
|||
+ * Workaround: refresh it here before processing the next packet */
|
||||
+ read_interface(client_config.interface, &client_config.ifindex, NULL, client_config.arp);
|
||||
+
|
||||
if (listen_mode != LISTEN_NONE && fd < 0) {
|
||||
if (listen_mode != LISTEN_NONE && sockfd < 0) {
|
||||
if (listen_mode == LISTEN_KERNEL)
|
||||
fd = listen_socket(INADDR_ANY, CLIENT_PORT, client_config.interface);
|
||||
sockfd = listen_socket(/*INADDR_ANY,*/ CLIENT_PORT, client_config.interface);
|
||||
|
|
|
@ -1,37 +1,37 @@
|
|||
Index: busybox-1.4.2/shell/ash.c
|
||||
Index: busybox-1.7.2/shell/ash.c
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/shell/ash.c 2007-06-04 13:21:32.248074216 +0200
|
||||
+++ busybox-1.4.2/shell/ash.c 2007-06-04 13:21:34.000807760 +0200
|
||||
@@ -12237,9 +12237,18 @@
|
||||
--- busybox-1.7.2.orig/shell/ash.c 2007-09-03 13:48:38.000000000 +0200
|
||||
+++ busybox-1.7.2/shell/ash.c 2007-10-04 14:47:41.607489342 +0200
|
||||
@@ -11310,8 +11310,18 @@
|
||||
const char *p;
|
||||
char **aptr;
|
||||
int flag = argv[0][0] == 'r'? VREADONLY : VEXPORT;
|
||||
+ int mask = ~0;
|
||||
int notp;
|
||||
+ int nopt;
|
||||
|
||||
- notp = nextopt("p") - 'p';
|
||||
+ while ((notp = nextopt("np"))) {
|
||||
+ if (notp == 'n') {
|
||||
- if (nextopt("p") != 'p') {
|
||||
+ while ((nopt = nextopt("np"))) {
|
||||
+ if (nopt == 'n') {
|
||||
+ mask = ~flag;
|
||||
+ } else { /* p */
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ notp -= 'p';
|
||||
if (notp && ((name = *(aptr = argptr)))) {
|
||||
do {
|
||||
if ((p = strchr(name, '=')) != NULL) {
|
||||
@@ -12247,10 +12256,11 @@
|
||||
} else {
|
||||
if ((vp = *findvar(hashvar(name), name))) {
|
||||
vp->flags |= flag;
|
||||
+ vp->flags &= mask;
|
||||
continue;
|
||||
+ if (nopt != 'p') {
|
||||
aptr = argptr;
|
||||
name = *aptr;
|
||||
if (name) {
|
||||
@@ -11323,10 +11333,11 @@
|
||||
vp = *findvar(hashvar(name), name);
|
||||
if (vp) {
|
||||
vp->flags |= flag;
|
||||
+ vp->flags &= mask;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
- setvar(name, p, flag);
|
||||
+ setvar(name, p, flag & mask);
|
||||
} while ((name = *++aptr) != NULL);
|
||||
} else {
|
||||
showvars(argv[0], flag, 0);
|
||||
- setvar(name, p, flag);
|
||||
+ setvar(name, p, flag & mask);
|
||||
} while ((name = *++aptr) != NULL);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
Index: busybox-1.4.2/networking/ifconfig.c
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/networking/ifconfig.c 2007-06-29 02:03:17.046772952 +0200
|
||||
+++ busybox-1.4.2/networking/ifconfig.c 2007-06-29 02:03:49.938772608 +0200
|
||||
@@ -376,18 +376,18 @@
|
||||
#endif
|
||||
sai.sin_family = AF_INET;
|
||||
sai.sin_port = 0;
|
||||
- if (!strcmp(host, bb_str_default)) {
|
||||
- /* Default is special, meaning 0.0.0.0. */
|
||||
- sai.sin_addr.s_addr = INADDR_ANY;
|
||||
- }
|
||||
#if ENABLE_FEATURE_IFCONFIG_BROADCAST_PLUS
|
||||
- else if ((host[0] == '+' && !host[1]) && (mask & A_BROADCAST)
|
||||
+ if ((host[0] == '+' && !host[1]) && (mask & A_BROADCAST)
|
||||
&& (did_flags & (A_NETMASK|A_HOSTNAME)) == (A_NETMASK|A_HOSTNAME)
|
||||
) {
|
||||
/* + is special, meaning broadcast is derived. */
|
||||
sai.sin_addr.s_addr = (~sai_netmask) | (sai_hostname & sai_netmask);
|
||||
- }
|
||||
+ } else
|
||||
#endif
|
||||
+ if (!strcmp(host, bb_str_default)) {
|
||||
+ /* Default is special, meaning 0.0.0.0. */
|
||||
+ sai.sin_addr.s_addr = INADDR_ANY;
|
||||
+ }
|
||||
#if ENABLE_FEATURE_IPV6
|
||||
else if (inet_pton(AF_INET6, host, &sai6.sin6_addr) > 0) {
|
||||
int sockfd6;
|
|
@ -1,30 +0,0 @@
|
|||
Index: busybox-1.4.2/shell/ash.c
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/shell/ash.c 2007-07-01 05:33:08.371737750 +0200
|
||||
+++ busybox-1.4.2/shell/ash.c 2007-07-01 05:33:11.703946000 +0200
|
||||
@@ -3957,12 +3957,6 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
- if (is_safe_applet(name)) {
|
||||
- entry->cmdtype = CMDNORMAL;
|
||||
- entry->u.index = -1;
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
updatetbl = (path == pathval());
|
||||
if (!updatetbl) {
|
||||
act |= DO_ALTPATH;
|
||||
@@ -4074,6 +4068,12 @@
|
||||
goto success;
|
||||
}
|
||||
|
||||
+ if (is_safe_applet(name)) {
|
||||
+ entry->cmdtype = CMDNORMAL;
|
||||
+ entry->u.index = -1;
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
/* We failed. If there was an entry for this command, delete it */
|
||||
if (cmdp && updatetbl)
|
||||
delete_cmd_entry();
|
|
@ -1,18 +0,0 @@
|
|||
Index: busybox-1.4.2/coreutils/printf.c
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/coreutils/printf.c 2007-07-09 03:00:31.808788500 +0200
|
||||
+++ busybox-1.4.2/coreutils/printf.c 2007-07-09 03:00:42.257441500 +0200
|
||||
@@ -60,11 +60,11 @@
|
||||
|
||||
static void conv_strtoul(char *arg, void *result)
|
||||
{
|
||||
- *(unsigned long*)result = bb_strtoul(arg, NULL, 10);
|
||||
+ *(unsigned long*)result = bb_strtoul(arg, NULL, 0);
|
||||
}
|
||||
static void conv_strtol(char *arg, void *result)
|
||||
{
|
||||
- *(long*)result = bb_strtol(arg, NULL, 10);
|
||||
+ *(long*)result = bb_strtol(arg, NULL, 0);
|
||||
}
|
||||
static void conv_strtod(char *arg, void *result)
|
||||
{
|
|
@ -1,19 +1,19 @@
|
|||
|
||||
Copyright (C) 2006 OpenWrt.org
|
||||
|
||||
Index: busybox-1.4.2/networking/httpd.c
|
||||
Index: busybox-1.7.2/networking/httpd.c
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/networking/httpd.c 2007-06-04 13:21:32.190083032 +0200
|
||||
+++ busybox-1.4.2/networking/httpd.c 2007-06-04 13:21:34.401746808 +0200
|
||||
@@ -1402,12 +1402,26 @@
|
||||
--- busybox-1.7.2.orig/networking/httpd.c 2007-09-30 01:54:12.000000000 +0200
|
||||
+++ busybox-1.7.2/networking/httpd.c 2007-10-04 14:59:20.287304836 +0200
|
||||
@@ -1527,12 +1527,26 @@
|
||||
if (ENABLE_FEATURE_HTTPD_AUTH_MD5) {
|
||||
char *cipher;
|
||||
char *pp;
|
||||
+ char *ppnew = NULL;
|
||||
+ struct passwd *pwd = NULL;
|
||||
|
||||
if (strncmp(p, request, u-request) != 0) {
|
||||
/* user uncompared */
|
||||
if (strncmp(p, request, u - request) != 0) {
|
||||
/* user doesn't match */
|
||||
continue;
|
||||
}
|
||||
pp = strchr(p, ':');
|
||||
|
@ -29,10 +29,10 @@ Index: busybox-1.4.2/networking/httpd.c
|
|||
+ strcpy(ppnew + 1, pwd->pw_passwd);
|
||||
+ pp = ppnew;
|
||||
+ }
|
||||
if (pp && pp[1] == '$' && pp[2] == '1' &&
|
||||
pp[3] == '$' && pp[4]) {
|
||||
pp++;
|
||||
@@ -1417,6 +1431,10 @@
|
||||
if (pp && pp[1] == '$' && pp[2] == '1'
|
||||
&& pp[3] == '$' && pp[4]
|
||||
) {
|
||||
@@ -1543,6 +1557,10 @@
|
||||
/* unauthorized */
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
Index: busybox-1.4.2/networking/httpd.c
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/networking/httpd.c 2007-06-04 13:21:34.401746808 +0200
|
||||
+++ busybox-1.4.2/networking/httpd.c 2007-06-04 13:21:34.588718384 +0200
|
||||
@@ -137,6 +137,7 @@
|
||||
const char *query;
|
||||
|
||||
USE_FEATURE_HTTPD_CGI(char *referer;)
|
||||
+ USE_FEATURE_HTTPD_CGI(char *user_agent;)
|
||||
|
||||
const char *configFile;
|
||||
|
||||
@@ -1066,6 +1067,7 @@
|
||||
if (cp) *cp = '\0'; /* delete :PORT */
|
||||
setenv1("REMOTE_ADDR", p);
|
||||
}
|
||||
+ setenv1("HTTP_USER_AGENT", config->user_agent);
|
||||
#if ENABLE_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV
|
||||
setenv_long("REMOTE_PORT", config->port);
|
||||
#endif
|
||||
@@ -1647,6 +1649,8 @@
|
||||
content_type = strdup(skip_whitespace(buf + sizeof("Content-Type:")-1));
|
||||
} else if ((STRNCASECMP(buf, "Referer:") == 0)) {
|
||||
config->referer = strdup(skip_whitespace(buf + sizeof("Referer:")-1));
|
||||
+ } else if ((STRNCASECMP(buf, "User-Agent:") == 0)) {
|
||||
+ config->user_agent = strdup(skip_whitespace(buf + sizeof("User-Agent:")-1));
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,69 +1,76 @@
|
|||
Index: busybox-1.4.2/include/usage.h
|
||||
Index: busybox-1.7.2/include/usage.h
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/include/usage.h 2007-06-04 13:21:32.103096256 +0200
|
||||
+++ busybox-1.4.2/include/usage.h 2007-06-04 13:21:35.005655000 +0200
|
||||
@@ -1257,7 +1257,8 @@
|
||||
USE_FEATURE_HTTPD_BASIC_AUTH(" [-r <realm>]") \
|
||||
--- busybox-1.7.2.orig/include/usage.h 2007-10-04 17:12:35.230910708 +0200
|
||||
+++ busybox-1.7.2/include/usage.h 2007-10-04 17:32:12.994027602 +0200
|
||||
@@ -1350,7 +1350,8 @@
|
||||
USE_FEATURE_HTTPD_BASIC_AUTH(" [-r realm]") \
|
||||
USE_FEATURE_HTTPD_AUTH_MD5(" [-m pass]") \
|
||||
" [-h home]" \
|
||||
- " [-d/-e <string>]"
|
||||
+ " [-d/-e <string>]" \
|
||||
- " [-d/-e string]"
|
||||
+ " [-d/-e string]" \
|
||||
+ " [-R <path> [-H <host>]]"
|
||||
#define httpd_full_usage \
|
||||
"Listen for incoming http server requests" \
|
||||
"\n\nOptions:\n" \
|
||||
@@ -1273,7 +1274,9 @@
|
||||
" -m PASS Crypt PASS with md5 algorithm\n") \
|
||||
" -h HOME Specifies http HOME directory (default ./)\n" \
|
||||
" -e STRING HTML encode STRING\n" \
|
||||
- " -d STRING URL decode STRING"
|
||||
+ " -d STRING URL decode STRING\n" \
|
||||
+ " -R PATH Redirect target path\n" \
|
||||
+ " -H HOST Redirect target host"
|
||||
"Listen for incoming HTTP requests" \
|
||||
"\n\nOptions:" \
|
||||
@@ -1368,6 +1369,8 @@
|
||||
"\n -h HOME Home directory (default .)" \
|
||||
"\n -e STRING HTML encode STRING" \
|
||||
"\n -d STRING URL decode STRING" \
|
||||
+ "\n -R PATH Redirect target path" \
|
||||
+ "\n -H HOST Redirect target host" \
|
||||
|
||||
#define hwclock_trivial_usage \
|
||||
"[-r|--show] [-s|--hctosys] [-w|--systohc] [-l|--localtime] [-u|--utc]"
|
||||
Index: busybox-1.4.2/networking/httpd.c
|
||||
"[-r|--show] [-s|--hctosys] [-w|--systohc]" \
|
||||
Index: busybox-1.7.2/networking/httpd.c
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/networking/httpd.c 2007-06-04 13:21:34.588718384 +0200
|
||||
+++ busybox-1.4.2/networking/httpd.c 2007-06-04 13:21:35.006654848 +0200
|
||||
@@ -140,6 +140,8 @@
|
||||
USE_FEATURE_HTTPD_CGI(char *user_agent;)
|
||||
--- busybox-1.7.2.orig/networking/httpd.c 2007-10-04 17:13:12.509035065 +0200
|
||||
+++ busybox-1.7.2/networking/httpd.c 2007-10-04 17:32:33.711208213 +0200
|
||||
@@ -230,6 +230,8 @@
|
||||
|
||||
const char *configFile;
|
||||
+ const char *redirectPath;
|
||||
+ const char *redirectHost;
|
||||
const char *found_mime_type;
|
||||
const char *found_moved_temporarily;
|
||||
+ const char *redirect_path;
|
||||
+ const char *redirect_host;
|
||||
Htaccess_IP *ip_a_d; /* config allow/deny lines */
|
||||
|
||||
unsigned int rmt_ip;
|
||||
#if ENABLE_FEATURE_HTTPD_CGI || DEBUG
|
||||
@@ -880,8 +882,11 @@
|
||||
USE_FEATURE_HTTPD_BASIC_AUTH(const char *g_realm;)
|
||||
@@ -264,6 +266,8 @@
|
||||
#define home_httpd (G.home_httpd )
|
||||
#define found_mime_type (G.found_mime_type )
|
||||
#define found_moved_temporarily (G.found_moved_temporarily)
|
||||
+#define redirect_path (G.redirect_path )
|
||||
+#define redirect_host (G.redirect_host )
|
||||
#define ContentLength (G.ContentLength )
|
||||
#define last_mod (G.last_mod )
|
||||
#define ip_a_d (G.ip_a_d )
|
||||
@@ -901,8 +905,11 @@
|
||||
}
|
||||
#endif
|
||||
if (responseNum == HTTP_MOVED_TEMPORARILY) {
|
||||
- len += sprintf(buf+len, "Location: %s/%s%s\r\n",
|
||||
+ len += sprintf(buf+len, "Location: %s%s%s%s%s%s\r\n",
|
||||
+ (config->redirectHost ? "http://" : ""),
|
||||
+ (config->redirectHost ? config->redirectHost : ""),
|
||||
config->found_moved_temporarily,
|
||||
+ (config->redirectHost ? "" : "/"),
|
||||
(config->query ? "?" : ""),
|
||||
(config->query ? config->query : ""));
|
||||
- len += sprintf(iobuf + len, "Location: %s/%s%s\r\n",
|
||||
+ len += sprintf(iobuf + len, "Location: %s%s%s%s%s%s\r\n",
|
||||
+ (redirect_host ? "http://" : ""),
|
||||
+ (redirect_host ? redirect_host : ""),
|
||||
found_moved_temporarily,
|
||||
+ (redirect_host ? "" : "/"),
|
||||
(g_query ? "?" : ""),
|
||||
(g_query ? g_query : ""));
|
||||
}
|
||||
@@ -1594,8 +1599,12 @@
|
||||
*++purl = '\0'; /* so keep last character */
|
||||
test = purl; /* end ptr */
|
||||
@@ -1730,8 +1737,12 @@
|
||||
*++urlp = '\0'; /* so keep last character */
|
||||
tptr = urlp; /* end ptr */
|
||||
|
||||
+ /* redirect active */
|
||||
+ if (config->redirectPath && (strncmp(url, config->redirectPath, strlen(config->redirectPath)) != 0))
|
||||
+ config->found_moved_temporarily = config->redirectPath;
|
||||
+ /* redirect active */
|
||||
+ if (redirect_path && (strncmp(urlcopy, redirect_path, strlen(redirect_path)) != 0))
|
||||
+ found_moved_temporarily = redirect_path;
|
||||
+
|
||||
/* If URL is directory, adding '/' */
|
||||
- if (test[-1] != '/') {
|
||||
+ if(!config->redirectPath && (test[-1] != '/')) {
|
||||
if (is_directory(url + 1, 1, &sb)) {
|
||||
config->found_moved_temporarily = url;
|
||||
}
|
||||
@@ -1897,7 +1906,9 @@
|
||||
/* If URL is a directory, add '/' */
|
||||
- if (tptr[-1] != '/') {
|
||||
+ if (!redirect_path && (tptr[-1] != '/')) {
|
||||
if (is_directory(urlcopy + 1, 1, &sb)) {
|
||||
found_moved_temporarily = urlcopy;
|
||||
}
|
||||
@@ -2004,7 +2015,9 @@
|
||||
#endif
|
||||
|
||||
enum {
|
||||
|
@ -74,20 +81,18 @@ Index: busybox-1.4.2/networking/httpd.c
|
|||
d_opt_decode_url,
|
||||
h_opt_home_httpd,
|
||||
USE_FEATURE_HTTPD_ENCODE_URL_STR(e_opt_encode_url,)
|
||||
@@ -1919,7 +1930,7 @@
|
||||
OPT_FOREGROUND = 1 << p_opt_foreground,
|
||||
};
|
||||
|
||||
-static const char httpd_opts[] = "c:d:h:"
|
||||
+static const char httpd_opts[] = "R:H:c:d:h:"
|
||||
USE_FEATURE_HTTPD_ENCODE_URL_STR("e:")
|
||||
USE_FEATURE_HTTPD_BASIC_AUTH("r:")
|
||||
USE_FEATURE_HTTPD_AUTH_MD5("m:")
|
||||
@@ -1951,6 +1962,7 @@
|
||||
config->ContentLength = -1;
|
||||
|
||||
opt = getopt32(argc, argv, httpd_opts,
|
||||
+ &(config->redirectPath), &(config->redirectHost),
|
||||
&(config->configFile), &url_for_decode, &home_httpd
|
||||
@@ -2053,12 +2066,13 @@
|
||||
/* We do not "absolutize" path given by -h (home) opt.
|
||||
* If user gives relative path in -h, $SCRIPT_FILENAME can end up
|
||||
* relative too. */
|
||||
- opt = getopt32(argv, "c:d:h:"
|
||||
+ opt = getopt32(argv, "R:H: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:ifv",
|
||||
+ &redirect_path, &redirect_host,
|
||||
&configFile, &url_for_decode, &home_httpd
|
||||
USE_FEATURE_HTTPD_ENCODE_URL_STR(, &url_for_encode)
|
||||
USE_FEATURE_HTTPD_BASIC_AUTH(, &(config->realm))
|
||||
USE_FEATURE_HTTPD_BASIC_AUTH(, &g_realm)
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
Index: busybox-1.7.2/editors/awk.c
|
||||
===================================================================
|
||||
--- busybox-1.7.2.orig/editors/awk.c 2007-10-04 19:57:46.859742242 +0200
|
||||
+++ busybox-1.7.2/editors/awk.c 2007-10-05 02:20:02.910793305 +0200
|
||||
@@ -2757,6 +2757,7 @@
|
||||
{
|
||||
unsigned opt;
|
||||
char *opt_F, *opt_W;
|
||||
+ llist_t *opt_f = NULL;
|
||||
llist_t *opt_v = NULL;
|
||||
int i, j, flen;
|
||||
var *v;
|
||||
@@ -2816,8 +2817,8 @@
|
||||
*s1 = '=';
|
||||
}
|
||||
}
|
||||
- opt_complementary = "v::";
|
||||
- opt = getopt32(argv, "F:v:f:W:", &opt_F, &opt_v, &g_progname, &opt_W);
|
||||
+ opt_complementary = "v::f::";
|
||||
+ opt = getopt32(argv, "F:v:f:W:", &opt_F, &opt_v, &opt_f, &opt_W);
|
||||
argv += optind;
|
||||
argc -= optind;
|
||||
if (opt & 0x1)
|
||||
@@ -2826,25 +2827,31 @@
|
||||
if (!is_assignment(llist_pop(&opt_v)))
|
||||
bb_show_usage();
|
||||
}
|
||||
- if (opt & 0x4) { // -f
|
||||
- char *s = s; /* die, gcc, die */
|
||||
- FILE *from_file = afopen(g_progname, "r");
|
||||
- /* one byte is reserved for some trick in next_token */
|
||||
- if (fseek(from_file, 0, SEEK_END) == 0) {
|
||||
- flen = ftell(from_file);
|
||||
- s = xmalloc(flen + 4);
|
||||
- fseek(from_file, 0, SEEK_SET);
|
||||
- i = 1 + fread(s + 1, 1, flen, from_file);
|
||||
- } else {
|
||||
- for (i = j = 1; j > 0; i += j) {
|
||||
- s = xrealloc(s, i + 4096);
|
||||
- j = fread(s + i, 1, 4094, from_file);
|
||||
+ if (opt_f != NULL) { // -f
|
||||
+ while (opt_f != NULL) {
|
||||
+ char *s = NULL;
|
||||
+ FILE *from_file;
|
||||
+
|
||||
+ g_progname = opt_f->data;
|
||||
+ from_file = afopen(g_progname, "r");
|
||||
+ /* one byte is reserved for some trick in next_token */
|
||||
+ if (fseek(from_file, 0, SEEK_END) == 0) {
|
||||
+ flen = ftell(from_file);
|
||||
+ s = xmalloc(flen + 4);
|
||||
+ fseek(from_file, 0, SEEK_SET);
|
||||
+ i = 1 + fread(s + 1, 1, flen, from_file);
|
||||
+ } else {
|
||||
+ for (i = j = 1; j > 0; i += j) {
|
||||
+ s = xrealloc(s, i + 4096);
|
||||
+ j = fread(s + i, 1, 4094, from_file);
|
||||
+ }
|
||||
}
|
||||
+ s[i] = '\0';
|
||||
+ fclose(from_file);
|
||||
+ parse_program(s + 1);
|
||||
+ free(s);
|
||||
+ opt_f = opt_f->link;
|
||||
}
|
||||
- s[i] = '\0';
|
||||
- fclose(from_file);
|
||||
- parse_program(s + 1);
|
||||
- free(s);
|
||||
} else { // no -f: take program from 1st parameter
|
||||
if (!argc)
|
||||
bb_show_usage();
|
|
@ -1,103 +0,0 @@
|
|||
Index: busybox-1.4.2/editors/awk.c
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/editors/awk.c 2007-06-15 23:43:26.460690280 +0200
|
||||
+++ busybox-1.4.2/editors/awk.c 2007-06-15 23:45:26.283474448 +0200
|
||||
@@ -2639,14 +2639,13 @@
|
||||
|
||||
int awk_main(int argc, char **argv)
|
||||
{
|
||||
- unsigned opt;
|
||||
- char *opt_F, *opt_v, *opt_W;
|
||||
int i, j, flen;
|
||||
var *v;
|
||||
var tv;
|
||||
char **envp;
|
||||
char *vnames = (char *)vNames; /* cheat */
|
||||
char *vvalues = (char *)vValues;
|
||||
+ int c;
|
||||
|
||||
/* Undo busybox.c, or else strtod may eat ','! This breaks parsing:
|
||||
* $1,$2 == '$1,' '$2', NOT '$1' ',' '$2' */
|
||||
@@ -2694,40 +2693,56 @@
|
||||
free(s);
|
||||
}
|
||||
|
||||
- opt = getopt32(argc, argv, "F:v:f:W:", &opt_F, &opt_v, &programname, &opt_W);
|
||||
- argv += optind;
|
||||
- argc -= optind;
|
||||
- if (opt & 0x1) setvar_s(V[FS], opt_F); // -F
|
||||
- if (opt & 0x2) if (!is_assignment(opt_v)) bb_show_usage(); // -v
|
||||
- if (opt & 0x4) { // -f
|
||||
- char *s = s; /* die, gcc, die */
|
||||
- FILE *from_file = afopen(programname, "r");
|
||||
- /* one byte is reserved for some trick in next_token */
|
||||
- if (fseek(from_file, 0, SEEK_END) == 0) {
|
||||
- flen = ftell(from_file);
|
||||
- s = xmalloc(flen + 4);
|
||||
- fseek(from_file, 0, SEEK_SET);
|
||||
- i = 1 + fread(s + 1, 1, flen, from_file);
|
||||
- } else {
|
||||
- for (i = j = 1; j > 0; i += j) {
|
||||
- s = xrealloc(s, i + 4096);
|
||||
- j = fread(s + i, 1, 4094, from_file);
|
||||
+ programname = NULL;
|
||||
+ while((c = getopt(argc, argv, "F:v:f:W:")) != EOF) {
|
||||
+ switch (c) {
|
||||
+ case 'F':
|
||||
+ setvar_s(V[FS], optarg);
|
||||
+ break;
|
||||
+ case 'v':
|
||||
+ if (! is_assignment(optarg))
|
||||
+ bb_show_usage();
|
||||
+ break;
|
||||
+ case 'f': {
|
||||
+ FILE *F = afopen(programname = optarg, "r");
|
||||
+ char *s = NULL;
|
||||
+ /* one byte is reserved for some trick in next_token */
|
||||
+ if (fseek(F, 0, SEEK_END) == 0) {
|
||||
+ flen = ftell(F);
|
||||
+ s = (char *)xmalloc(flen+4);
|
||||
+ fseek(F, 0, SEEK_SET);
|
||||
+ i = 1 + fread(s+1, 1, flen, F);
|
||||
+ } else {
|
||||
+ for (i=j=1; j>0; i+=j) {
|
||||
+ s = (char *)xrealloc(s, i+4096);
|
||||
+ j = fread(s+i, 1, 4094, F);
|
||||
+ }
|
||||
+ }
|
||||
+ s[i] = '\0';
|
||||
+ fclose(F);
|
||||
+ parse_program(s+1);
|
||||
+ free(s);
|
||||
+ break;
|
||||
}
|
||||
+ case 'W':
|
||||
+ bb_error_msg("Warning: unrecognized option '-W %s' ignored\n", optarg);
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ bb_show_usage();
|
||||
}
|
||||
- s[i] = '\0';
|
||||
- fclose(from_file);
|
||||
- parse_program(s + 1);
|
||||
- free(s);
|
||||
- } else { // no -f: take program from 1st parameter
|
||||
+ }
|
||||
+ argc -= optind;
|
||||
+ argv += optind;
|
||||
+
|
||||
+ if (!programname) {
|
||||
if (!argc)
|
||||
bb_show_usage();
|
||||
programname = "cmd. line";
|
||||
parse_program(*argv++);
|
||||
argc--;
|
||||
}
|
||||
- if (opt & 0x8) // -W
|
||||
- bb_error_msg("warning: unrecognized option '-W %s' ignored", opt_W);
|
||||
-
|
||||
+
|
||||
/* fill in ARGV array */
|
||||
setvar_i(V[ARGC], argc + 1);
|
||||
setari_u(V[ARGV], 0, "awk");
|
|
@ -1,8 +1,8 @@
|
|||
Index: busybox-1.4.2/include/platform.h
|
||||
Index: busybox-1.7.2/include/platform.h
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/include/platform.h 2007-06-04 13:21:32.055103552 +0200
|
||||
+++ busybox-1.4.2/include/platform.h 2007-06-04 13:21:35.387596936 +0200
|
||||
@@ -128,9 +128,11 @@
|
||||
--- busybox-1.7.2.orig/include/platform.h 2007-09-03 13:48:46.000000000 +0200
|
||||
+++ busybox-1.7.2/include/platform.h 2007-10-04 15:20:58.301274440 +0200
|
||||
@@ -137,9 +137,11 @@
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
|
@ -14,30 +14,20 @@ Index: busybox-1.4.2/include/platform.h
|
|||
|
||||
/* ---- Compiler dependent settings ------------------------- */
|
||||
#if (defined __digital__ && defined __unix__)
|
||||
@@ -161,7 +163,7 @@
|
||||
@@ -179,7 +181,7 @@
|
||||
#define HAVE_STDINT_H
|
||||
#else
|
||||
/* Largest integral types. */
|
||||
-#if __BIG_ENDIAN__
|
||||
+#if __BIG_ENDIAN__ && !__APPLE__
|
||||
typedef long int intmax_t;
|
||||
typedef unsigned long int uintmax_t;
|
||||
typedef long intmax_t;
|
||||
typedef unsigned long uintmax_t;
|
||||
#else
|
||||
Index: busybox-1.4.2/include/libbb.h
|
||||
Index: busybox-1.7.2/include/libbb.h
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/include/libbb.h 2007-06-04 13:21:32.062102488 +0200
|
||||
+++ busybox-1.4.2/include/libbb.h 2007-06-04 13:21:35.388596784 +0200
|
||||
@@ -17,7 +17,9 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
+#ifndef __APPLE__
|
||||
#include <malloc.h>
|
||||
+#endif
|
||||
#include <netdb.h>
|
||||
#include <setjmp.h>
|
||||
#include <signal.h>
|
||||
@@ -30,7 +32,9 @@
|
||||
--- busybox-1.7.2.orig/include/libbb.h 2007-09-16 20:48:10.000000000 +0200
|
||||
+++ busybox-1.7.2/include/libbb.h 2007-10-04 15:20:22.275221430 +0200
|
||||
@@ -31,7 +31,9 @@
|
||||
#include <sys/mman.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
|
|
|
@ -1,26 +1,18 @@
|
|||
Index: busybox-1.4.2/networking/httpd.c
|
||||
Index: busybox-1.7.2/networking/httpd.c
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/networking/httpd.c 2007-06-04 13:21:35.006654848 +0200
|
||||
+++ busybox-1.4.2/networking/httpd.c 2007-06-04 13:21:35.585566840 +0200
|
||||
@@ -1231,7 +1231,7 @@
|
||||
* "chopped up into small chunks" syndrome here */
|
||||
rbuf[count] = '\0';
|
||||
/* check to see if the user script added headers */
|
||||
-#define HTTP_200 "HTTP/1.0 200 OK\r\n\r\n"
|
||||
+#define HTTP_200 "HTTP/1.0 200 OK\r\n"
|
||||
if (memcmp(rbuf, HTTP_200, 4) != 0) {
|
||||
/* there is no "HTTP", do it ourself */
|
||||
full_write(s, HTTP_200, sizeof(HTTP_200)-1);
|
||||
@@ -1242,9 +1242,9 @@
|
||||
* echo -en "Location: http://www.busybox.net\r\n"
|
||||
* echo -en "\r\n"
|
||||
*/
|
||||
- //if (!strstr(rbuf, "ontent-")) {
|
||||
- // full_write(s, "Content-type: text/plain\r\n\r\n", 28);
|
||||
- //}
|
||||
+ if (!strstr(rbuf, "ontent-")) {
|
||||
+ full_write(s, "Content-type: text/plain\r\n\r\n", 28);
|
||||
+ }
|
||||
firstLine = 0;
|
||||
}
|
||||
if (full_write(s, rbuf, count) != count)
|
||||
--- busybox-1.7.2.orig/networking/httpd.c 2007-10-04 15:06:51.993046080 +0200
|
||||
+++ busybox-1.7.2/networking/httpd.c 2007-10-04 15:25:10.815664410 +0200
|
||||
@@ -1314,10 +1314,10 @@
|
||||
if (full_write(1, HTTP_200, sizeof(HTTP_200)-1) != sizeof(HTTP_200)-1)
|
||||
break;
|
||||
}
|
||||
- /* Commented out:
|
||||
- if (!strstr(rbuf, "ontent-")) {
|
||||
- full_write(s, "Content-type: text/plain\r\n\r\n", 28);
|
||||
+ if (!strstr(rbuf, "ontent-") && !strstr(rbuf, "ocation:")) {
|
||||
+ full_write(1, "Content-type: text/plain\r\n\r\n", 28);
|
||||
}
|
||||
+ /* Previously commented out:
|
||||
* Counter-example of valid CGI without Content-type:
|
||||
* echo -en "HTTP/1.0 302 Found\r\n"
|
||||
* echo -en "Location: http://www.busybox.net\r\n"
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
Index: busybox-1.4.2/networking/httpd.c
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/networking/httpd.c 2007-06-04 13:21:35.585566840 +0200
|
||||
+++ busybox-1.4.2/networking/httpd.c 2007-06-04 13:21:35.775537960 +0200
|
||||
@@ -1218,9 +1218,10 @@
|
||||
#if PIPESIZE >= MAX_MEMORY_BUFF
|
||||
# error "PIPESIZE >= MAX_MEMORY_BUFF"
|
||||
#endif
|
||||
- /* NB: was safe_read. If it *has to be* safe_read, */
|
||||
- /* please explain why in this comment... */
|
||||
- count = full_read(inFd, rbuf, PIPESIZE);
|
||||
+ /* reverted back to safe_read, otherwise httpd may block if the */
|
||||
+ /* cgi-script outputs page date before it has fully received all */
|
||||
+ /* (eg POST) data */
|
||||
+ count = safe_read(inFd, rbuf, PIPESIZE);
|
||||
if (count == 0)
|
||||
break; /* closed */
|
||||
if (count < 0)
|
|
@ -1,29 +1,12 @@
|
|||
Index: busybox-1.4.2/networking/httpd.c
|
||||
Index: busybox-1.7.2/networking/httpd.c
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/networking/httpd.c 2007-06-04 13:21:35.775537960 +0200
|
||||
+++ busybox-1.4.2/networking/httpd.c 2007-06-04 13:21:36.144481872 +0200
|
||||
@@ -102,6 +102,7 @@
|
||||
static const char default_path_httpd_conf[] = "/etc";
|
||||
static const char httpd_conf[] = "httpd.conf";
|
||||
static const char home[] = "./";
|
||||
+static const char *home_httpd = home;
|
||||
|
||||
#define TIMEOUT 60
|
||||
|
||||
@@ -1505,6 +1506,8 @@
|
||||
--- busybox-1.7.2.orig/networking/httpd.c 2007-10-04 15:25:10.815664410 +0200
|
||||
+++ busybox-1.7.2/networking/httpd.c 2007-10-04 15:31:22.936870392 +0200
|
||||
@@ -1616,6 +1616,7 @@
|
||||
#if ENABLE_FEATURE_HTTPD_BASIC_AUTH
|
||||
int credentials = -1; /* if not required this is Ok */
|
||||
#endif
|
||||
+
|
||||
+ xchdir(home_httpd);
|
||||
|
||||
sa.sa_handler = handle_sigalrm;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
@@ -1942,7 +1945,6 @@
|
||||
int httpd_main(int argc, char *argv[])
|
||||
{
|
||||
unsigned opt;
|
||||
- const char *home_httpd = home;
|
||||
char *url_for_decode;
|
||||
USE_FEATURE_HTTPD_ENCODE_URL_STR(const char *url_for_encode;)
|
||||
const char *s_port;
|
||||
/* Allocation of iobuf is postponed until now
|
||||
* (IOW, server process doesn't need to waste 8k) */
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
Index: busybox-1.4.2/applets/usage_compressed
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/applets/usage_compressed 2007-06-04 13:21:31.952119208 +0200
|
||||
+++ busybox-1.4.2/applets/usage_compressed 2007-06-04 13:21:36.331453448 +0200
|
||||
@@ -14,6 +14,6 @@
|
||||
|
||||
echo 'static const char packed_usage[] = '
|
||||
"$loc/usage" | bzip2 -1 | od -v -t x1 \
|
||||
-| $SED -e 's/^[^ ]*//' -e 's/ \(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/'
|
||||
+| $SED -e 's/^[^ ]*//' -e 's/ \([a-f0-9][a-f0-9]\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/'
|
||||
echo ';'
|
||||
echo '#define SIZEOF_usage_messages' `expr 0 + $sz`
|
|
@ -1,33 +0,0 @@
|
|||
Index: busybox-1.4.2/networking/ping.c
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/networking/ping.c 2007-06-04 13:21:31.931122400 +0200
|
||||
+++ busybox-1.4.2/networking/ping.c 2007-06-04 13:21:36.518425024 +0200
|
||||
@@ -70,7 +70,7 @@
|
||||
struct sockaddr_in pingaddr;
|
||||
struct icmp *pkt;
|
||||
int pingsock, c;
|
||||
- char packet[DEFDATALEN + MAXIPLEN + MAXICMPLEN];
|
||||
+ char packet[datalen + ICMP_MINLEN + MAXIPLEN + MAXICMPLEN];
|
||||
|
||||
pingsock = create_icmp_socket();
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
pkt->icmp_type = ICMP_ECHO;
|
||||
pkt->icmp_cksum = in_cksum((unsigned short *) pkt, sizeof(packet));
|
||||
|
||||
- c = sendto(pingsock, packet, DEFDATALEN + ICMP_MINLEN, 0,
|
||||
+ c = sendto(pingsock, packet, datalen + ICMP_MINLEN, 0,
|
||||
(struct sockaddr *) &pingaddr, sizeof(struct sockaddr_in));
|
||||
|
||||
if (c < 0) {
|
||||
@@ -274,6 +274,10 @@
|
||||
++nreceived;
|
||||
tp = (struct timeval *) icmppkt->icmp_data;
|
||||
|
||||
+ /* If packet is too short, results will be truncated */
|
||||
+ if (sz < (ICMP_MINLEN + sizeof(tv.tv_sec) + sizeof(tv.tv_usec)))
|
||||
+ return;
|
||||
+
|
||||
if ((tv.tv_usec -= tp->tv_usec) < 0) {
|
||||
--tv.tv_sec;
|
||||
tv.tv_usec += 1000000;
|
|
@ -0,0 +1,12 @@
|
|||
Index: busybox-1.7.2/applets/usage_compressed
|
||||
===================================================================
|
||||
--- busybox-1.7.2.orig/applets/usage_compressed 2007-09-03 13:48:55.000000000 +0200
|
||||
+++ busybox-1.7.2/applets/usage_compressed 2007-10-04 15:32:54.578092727 +0200
|
||||
@@ -14,6 +14,6 @@
|
||||
|
||||
echo 'static const char packed_usage[] ALIGN1 = '
|
||||
"$loc/usage" | bzip2 -1 | od -v -t x1 \
|
||||
-| $SED -e 's/^[^ ]*//' -e 's/ *\(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/'
|
||||
+| $SED -e 's/^[^ ]*//' -e 's/ *\([a-f0-9][a-f0-9]\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/'
|
||||
echo ';'
|
||||
echo '#define SIZEOF_usage_messages' `expr 0 + $sz`
|
|
@ -1,15 +0,0 @@
|
|||
Index: busybox-1.4.2/networking/httpd.c
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/networking/httpd.c 2007-06-21 18:12:06.791080496 +0200
|
||||
+++ busybox-1.4.2/networking/httpd.c 2007-06-21 18:14:48.914434000 +0200
|
||||
@@ -1715,8 +1715,8 @@
|
||||
test = url + 1; /* skip first '/' */
|
||||
|
||||
#if ENABLE_FEATURE_HTTPD_CGI
|
||||
- if (strncmp(test, "cgi-bin", 7) == 0) {
|
||||
- if (test[7] == '/' && test[8] == 0)
|
||||
+ if (strncmp(test, "cgi-bin/", 8) == 0) {
|
||||
+ if (test[8] == 0)
|
||||
goto FORBIDDEN; /* protect listing cgi-bin/ */
|
||||
sendCgi(url, prequest, length, cookie, content_type);
|
||||
break;
|
|
@ -0,0 +1,40 @@
|
|||
Index: busybox-1.7.2/networking/ping.c
|
||||
===================================================================
|
||||
--- busybox-1.7.2.orig/networking/ping.c 2007-09-03 13:48:27.000000000 +0200
|
||||
+++ busybox-1.7.2/networking/ping.c 2007-10-04 15:38:15.424376713 +0200
|
||||
@@ -91,7 +91,7 @@
|
||||
struct sockaddr_in pingaddr;
|
||||
struct icmp *pkt;
|
||||
int pingsock, c;
|
||||
- char packet[DEFDATALEN + MAXIPLEN + MAXICMPLEN];
|
||||
+ char packet[datalen + ICMP_MINLEN + MAXIPLEN + MAXICMPLEN];
|
||||
|
||||
pingsock = create_icmp_socket();
|
||||
pingaddr = lsa->sin;
|
||||
@@ -101,7 +101,7 @@
|
||||
pkt->icmp_type = ICMP_ECHO;
|
||||
pkt->icmp_cksum = in_cksum((unsigned short *) pkt, sizeof(packet));
|
||||
|
||||
- c = xsendto(pingsock, packet, DEFDATALEN + ICMP_MINLEN,
|
||||
+ c = xsendto(pingsock, packet, datalen + ICMP_MINLEN,
|
||||
(struct sockaddr *) &pingaddr, sizeof(pingaddr));
|
||||
|
||||
/* listen for replies */
|
||||
@@ -135,7 +135,7 @@
|
||||
struct icmp6_hdr *pkt;
|
||||
int pingsock, c;
|
||||
int sockopt;
|
||||
- char packet[DEFDATALEN + MAXIPLEN + MAXICMPLEN];
|
||||
+ char packet[datalen + ICMP_MINLEN + MAXIPLEN + MAXICMPLEN];
|
||||
|
||||
pingsock = create_icmp6_socket();
|
||||
pingaddr = lsa->sin6;
|
||||
@@ -147,7 +147,7 @@
|
||||
sockopt = offsetof(struct icmp6_hdr, icmp6_cksum);
|
||||
setsockopt(pingsock, SOL_RAW, IPV6_CHECKSUM, &sockopt, sizeof(sockopt));
|
||||
|
||||
- c = xsendto(pingsock, packet, DEFDATALEN + sizeof (struct icmp6_hdr),
|
||||
+ c = xsendto(pingsock, packet, datalen + sizeof (struct icmp6_hdr),
|
||||
(struct sockaddr *) &pingaddr, sizeof(pingaddr));
|
||||
|
||||
/* listen for replies */
|
|
@ -0,0 +1,488 @@
|
|||
Index: busybox-1.7.2/modutils/insmod.c
|
||||
===================================================================
|
||||
--- busybox-1.7.2.orig/modutils/insmod.c 2007-09-03 13:48:35.000000000 +0200
|
||||
+++ busybox-1.7.2/modutils/insmod.c 2007-10-05 01:43:47.686834357 +0200
|
||||
@@ -61,19 +61,107 @@
|
||||
#include "libbb.h"
|
||||
#include <libgen.h>
|
||||
#include <sys/utsname.h>
|
||||
+#if ENABLE_FEATURE_2_6_MODULES
|
||||
+#include <sys/mman.h>
|
||||
+#include <asm/unistd.h>
|
||||
+#include <sys/syscall.h>
|
||||
+#endif
|
||||
|
||||
#if !ENABLE_FEATURE_2_4_MODULES && !ENABLE_FEATURE_2_6_MODULES
|
||||
#undef ENABLE_FEATURE_2_4_MODULES
|
||||
#define ENABLE_FEATURE_2_4_MODULES 1
|
||||
#endif
|
||||
|
||||
-#if !ENABLE_FEATURE_2_4_MODULES
|
||||
-#define insmod_ng_main insmod_main
|
||||
+#if ENABLE_FEATURE_2_4_MODULES
|
||||
+int insmod_main_24(int argc, char **argv);
|
||||
#endif
|
||||
-
|
||||
#if ENABLE_FEATURE_2_6_MODULES
|
||||
-extern int insmod_ng_main( int argc, char **argv);
|
||||
+int insmod_main_26(int argc, char **argv);
|
||||
#endif
|
||||
+int insmod_main(int argc, char **argv);
|
||||
+
|
||||
+static char *g_filename = NULL;
|
||||
+#define _PATH_MODULES "/lib/modules"
|
||||
+
|
||||
+static int check_module_name_match(const char *filename, struct stat *statbuf,
|
||||
+ void *userdata, int depth)
|
||||
+{
|
||||
+ char *fullname = (char *) userdata;
|
||||
+
|
||||
+ if (fullname[0] == '\0')
|
||||
+ return FALSE;
|
||||
+ else {
|
||||
+ char *tmp, *tmp1 = xstrdup(filename);
|
||||
+ tmp = bb_get_last_path_component(tmp1);
|
||||
+ if (strcmp(tmp, fullname) == 0) {
|
||||
+ free(tmp1);
|
||||
+ /* Stop searching if we find a match */
|
||||
+ g_filename = xstrdup(filename);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ free(tmp1);
|
||||
+ }
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+static int find_module(char *filename)
|
||||
+{
|
||||
+ char *module_dir, real_module_dir[FILENAME_MAX];
|
||||
+ int len, slen, ret = ENOENT, k_version;
|
||||
+ struct utsname myuname;
|
||||
+ const char *suffix;
|
||||
+ struct stat st;
|
||||
+
|
||||
+ /* check the kernel version */
|
||||
+ if ((uname(&myuname) != 0) || (myuname.release[0] != '2'))
|
||||
+ return EINVAL;
|
||||
+
|
||||
+ k_version = myuname.release[2] - '0';
|
||||
+#if ENABLE_FEATURE_2_4_MODULES
|
||||
+ if (k_version <= 4)
|
||||
+ suffix = ".o";
|
||||
+ else
|
||||
+#endif
|
||||
+ suffix = ".ko";
|
||||
+
|
||||
+ len = strlen(filename);
|
||||
+ slen = strlen(suffix);
|
||||
+
|
||||
+ /* check for suffix and absolute path first */
|
||||
+ if ((len < slen + 2) || (strcmp(filename + len - slen, suffix) != 0)) {
|
||||
+ filename = xasprintf("%s%s", filename, suffix);
|
||||
+ } else {
|
||||
+ filename = strdup(filename);
|
||||
+ if ((stat(filename, &st) == 0) && S_ISREG(st.st_mode))
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /* next: scan /lib/modules/<release> */
|
||||
+ /* Jump through hoops in case /lib/modules/`uname -r`
|
||||
+ * is a symlink. We do not want recursive_action to
|
||||
+ * follow symlinks, but we do want to follow the
|
||||
+ * /lib/modules/`uname -r` dir, So resolve it ourselves
|
||||
+ * if it is a link... */
|
||||
+ module_dir = concat_path_file(_PATH_MODULES, myuname.release);
|
||||
+ if (realpath(module_dir, real_module_dir) != NULL) {
|
||||
+ free(module_dir);
|
||||
+ module_dir = real_module_dir;
|
||||
+ }
|
||||
+
|
||||
+ recursive_action(module_dir, ACTION_RECURSE,
|
||||
+ check_module_name_match, 0, filename, 0);
|
||||
+
|
||||
+ /* Check if we have a complete path */
|
||||
+ if (g_filename != NULL) {
|
||||
+ if ((stat(g_filename, &st) == 0) && S_ISREG(st.st_mode))
|
||||
+ ret = 0;
|
||||
+ else
|
||||
+ free(g_filename);
|
||||
+ }
|
||||
+ free(filename);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
|
||||
|
||||
#if ENABLE_FEATURE_2_4_MODULES
|
||||
@@ -677,7 +765,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
-#define _PATH_MODULES "/lib/modules"
|
||||
enum { STRVERSIONLEN = 64 };
|
||||
|
||||
/*======================================================================*/
|
||||
@@ -790,37 +877,6 @@
|
||||
static int n_ext_modules_used;
|
||||
extern int delete_module(const char *);
|
||||
|
||||
-static char *m_filename;
|
||||
-static char *m_fullName;
|
||||
-
|
||||
-
|
||||
-/*======================================================================*/
|
||||
-
|
||||
-
|
||||
-static int check_module_name_match(const char *filename, struct stat *statbuf,
|
||||
- void *userdata, int depth)
|
||||
-{
|
||||
- char *fullname = (char *) userdata;
|
||||
-
|
||||
- if (fullname[0] == '\0')
|
||||
- return FALSE;
|
||||
- else {
|
||||
- char *tmp, *tmp1 = xstrdup(filename);
|
||||
- tmp = bb_get_last_path_component(tmp1);
|
||||
- if (strcmp(tmp, fullname) == 0) {
|
||||
- free(tmp1);
|
||||
- /* Stop searching if we find a match */
|
||||
- m_filename = xstrdup(filename);
|
||||
- return FALSE;
|
||||
- }
|
||||
- free(tmp1);
|
||||
- }
|
||||
- return TRUE;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-/*======================================================================*/
|
||||
-
|
||||
static struct obj_file *arch_new_file(void)
|
||||
{
|
||||
struct arch_file *f;
|
||||
@@ -3952,33 +4008,35 @@
|
||||
void print_load_map(struct obj_file *f);
|
||||
#endif
|
||||
|
||||
-int insmod_main( int argc, char **argv);
|
||||
-int insmod_main( int argc, char **argv)
|
||||
+int insmod_main_24( int argc, char **argv)
|
||||
{
|
||||
char *opt_o, *arg1;
|
||||
int len;
|
||||
int k_crcs;
|
||||
- char *tmp, *tmp1;
|
||||
unsigned long m_size;
|
||||
ElfW(Addr) m_addr;
|
||||
struct obj_file *f;
|
||||
struct stat st;
|
||||
char *m_name = 0;
|
||||
- int exit_status = EXIT_FAILURE;
|
||||
+ int ret = EINVAL;
|
||||
int m_has_modinfo;
|
||||
#if ENABLE_FEATURE_INSMOD_VERSION_CHECKING
|
||||
struct utsname uts_info;
|
||||
char m_strversion[STRVERSIONLEN];
|
||||
int m_version, m_crcs;
|
||||
#endif
|
||||
-#if ENABLE_FEATURE_CLEAN_UP
|
||||
- FILE *fp = 0;
|
||||
-#else
|
||||
- FILE *fp;
|
||||
-#endif
|
||||
- int k_version = 0;
|
||||
+ FILE *fp = NULL;
|
||||
+ int k_version;
|
||||
struct utsname myuname;
|
||||
|
||||
+ /* check the kernel version */
|
||||
+ if ((uname(&myuname) != 0) || (myuname.release[0] != '2'))
|
||||
+ return EINVAL;
|
||||
+
|
||||
+ k_version = myuname.release[2] - '0';
|
||||
+ if (k_version > 4)
|
||||
+ return ENOTSUP;
|
||||
+
|
||||
/* Parse any options */
|
||||
getopt32(argv, OPTION_STR, &opt_o);
|
||||
arg1 = argv[optind];
|
||||
@@ -3987,110 +4045,18 @@
|
||||
m_name = xstrdup(opt_o);
|
||||
}
|
||||
|
||||
- if (arg1 == NULL) {
|
||||
+ if (arg1 == NULL)
|
||||
bb_show_usage();
|
||||
- }
|
||||
-
|
||||
- /* Grab the module name */
|
||||
- tmp1 = xstrdup(arg1);
|
||||
- tmp = basename(tmp1);
|
||||
- len = strlen(tmp);
|
||||
-
|
||||
- if (uname(&myuname) == 0) {
|
||||
- if (myuname.release[0] == '2') {
|
||||
- k_version = myuname.release[2] - '0';
|
||||
- }
|
||||
- }
|
||||
-
|
||||
-#if ENABLE_FEATURE_2_6_MODULES
|
||||
- if (k_version > 4 && len > 3 && tmp[len - 3] == '.'
|
||||
- && tmp[len - 2] == 'k' && tmp[len - 1] == 'o'
|
||||
- ) {
|
||||
- len -= 3;
|
||||
- tmp[len] = '\0';
|
||||
- } else
|
||||
-#endif
|
||||
- if (len > 2 && tmp[len - 2] == '.' && tmp[len - 1] == 'o') {
|
||||
- len -= 2;
|
||||
- tmp[len] = '\0';
|
||||
- }
|
||||
-
|
||||
-
|
||||
-#if ENABLE_FEATURE_2_6_MODULES
|
||||
- if (k_version > 4)
|
||||
- m_fullName = xasprintf("%s.ko", tmp);
|
||||
- else
|
||||
-#endif
|
||||
- m_fullName = xasprintf("%s.o", tmp);
|
||||
|
||||
- if (!m_name) {
|
||||
- m_name = tmp;
|
||||
- } else {
|
||||
- free(tmp1);
|
||||
- tmp1 = 0; /* flag for free(m_name) before exit() */
|
||||
- }
|
||||
-
|
||||
- /* Get a filedesc for the module. Check we we have a complete path */
|
||||
- if (stat(arg1, &st) < 0 || !S_ISREG(st.st_mode)
|
||||
- || (fp = fopen(arg1, "r")) == NULL
|
||||
- ) {
|
||||
- /* Hmm. Could not open it. First search under /lib/modules/`uname -r`,
|
||||
- * but do not error out yet if we fail to find it... */
|
||||
- if (k_version) { /* uname succeedd */
|
||||
- char *module_dir;
|
||||
- char *tmdn;
|
||||
- char real_module_dir[FILENAME_MAX];
|
||||
-
|
||||
- tmdn = concat_path_file(_PATH_MODULES, myuname.release);
|
||||
- /* Jump through hoops in case /lib/modules/`uname -r`
|
||||
- * is a symlink. We do not want recursive_action to
|
||||
- * follow symlinks, but we do want to follow the
|
||||
- * /lib/modules/`uname -r` dir, So resolve it ourselves
|
||||
- * if it is a link... */
|
||||
- if (realpath(tmdn, real_module_dir) == NULL)
|
||||
- module_dir = tmdn;
|
||||
- else
|
||||
- module_dir = real_module_dir;
|
||||
- recursive_action(module_dir, ACTION_RECURSE,
|
||||
- check_module_name_match, 0, m_fullName, 0);
|
||||
- free(tmdn);
|
||||
- }
|
||||
-
|
||||
- /* Check if we have found anything yet */
|
||||
- if (m_filename == 0 || ((fp = fopen(m_filename, "r")) == NULL)) {
|
||||
- char module_dir[FILENAME_MAX];
|
||||
-
|
||||
- free(m_filename);
|
||||
- m_filename = 0;
|
||||
- if (realpath (_PATH_MODULES, module_dir) == NULL)
|
||||
- strcpy(module_dir, _PATH_MODULES);
|
||||
- /* No module found under /lib/modules/`uname -r`, this
|
||||
- * time cast the net a bit wider. Search /lib/modules/ */
|
||||
- if (!recursive_action(module_dir, ACTION_RECURSE,
|
||||
- check_module_name_match, 0, m_fullName, 0)
|
||||
- ) {
|
||||
- if (m_filename == 0
|
||||
- || ((fp = fopen(m_filename, "r")) == NULL)
|
||||
- ) {
|
||||
- bb_error_msg("%s: no module by that name found", m_fullName);
|
||||
- goto out;
|
||||
- }
|
||||
- } else
|
||||
- bb_error_msg_and_die("%s: no module by that name found", m_fullName);
|
||||
- }
|
||||
- } else
|
||||
- m_filename = xstrdup(arg1);
|
||||
-
|
||||
- if (flag_verbose)
|
||||
- printf("Using %s\n", m_filename);
|
||||
+ ret = find_module(arg1);
|
||||
+ if (ret)
|
||||
+ goto out;
|
||||
|
||||
-#if ENABLE_FEATURE_2_6_MODULES
|
||||
- if (k_version > 4) {
|
||||
- argv[optind] = m_filename;
|
||||
- optind--;
|
||||
- return insmod_ng_main(argc - optind, argv + optind);
|
||||
+ fp = fopen(g_filename, "r");
|
||||
+ if (!fp) {
|
||||
+ ret = errno;
|
||||
+ goto out;
|
||||
}
|
||||
-#endif
|
||||
|
||||
f = obj_load(fp, LOADBITS);
|
||||
if (f == NULL)
|
||||
@@ -4120,7 +4086,7 @@
|
||||
"\t%s was compiled for kernel version %s\n"
|
||||
"\twhile this kernel is version %s",
|
||||
flag_force_load ? "warning: " : "",
|
||||
- m_filename, m_strversion, uts_info.release);
|
||||
+ g_filename, m_strversion, uts_info.release);
|
||||
if (!flag_force_load)
|
||||
goto out;
|
||||
}
|
||||
@@ -4173,7 +4139,7 @@
|
||||
hide_special_symbols(f);
|
||||
|
||||
#if ENABLE_FEATURE_INSMOD_KSYMOOPS_SYMBOLS
|
||||
- add_ksymoops_symbols(f, m_filename, m_name);
|
||||
+ add_ksymoops_symbols(f, g_filename, m_name);
|
||||
#endif /* FEATURE_INSMOD_KSYMOOPS_SYMBOLS */
|
||||
|
||||
new_create_module_ksymtab(f);
|
||||
@@ -4220,8 +4186,7 @@
|
||||
if (flag_print_load_map)
|
||||
print_load_map(f);
|
||||
|
||||
- exit_status = EXIT_SUCCESS;
|
||||
-
|
||||
+ ret = 0;
|
||||
out:
|
||||
#if ENABLE_FEATURE_CLEAN_UP
|
||||
if (fp)
|
||||
@@ -4229,21 +4194,13 @@
|
||||
free(tmp1);
|
||||
if (!tmp1)
|
||||
free(m_name);
|
||||
- free(m_filename);
|
||||
+ free(g_filename);
|
||||
#endif
|
||||
return exit_status;
|
||||
}
|
||||
-
|
||||
-
|
||||
#endif
|
||||
|
||||
-
|
||||
#if ENABLE_FEATURE_2_6_MODULES
|
||||
-
|
||||
-#include <sys/mman.h>
|
||||
-#include <asm/unistd.h>
|
||||
-#include <sys/syscall.h>
|
||||
-
|
||||
/* We use error numbers in a loose translation... */
|
||||
static const char *moderror(int err)
|
||||
{
|
||||
@@ -4261,19 +4218,33 @@
|
||||
}
|
||||
}
|
||||
|
||||
-int insmod_ng_main(int argc, char **argv);
|
||||
-int insmod_ng_main(int argc, char **argv)
|
||||
+int insmod_main_26(int argc, char **argv)
|
||||
{
|
||||
- long ret;
|
||||
- size_t len;
|
||||
+ char *filename, *options;
|
||||
+ struct utsname myuname;
|
||||
+ int k_version;
|
||||
int optlen;
|
||||
+ size_t len;
|
||||
void *map;
|
||||
- char *filename, *options;
|
||||
+ long ret = 0;
|
||||
+
|
||||
+ /* check the kernel version */
|
||||
+ if ((uname(&myuname) != 0) || (myuname.release[0] != '2'))
|
||||
+ return EINVAL;
|
||||
+
|
||||
+ k_version = myuname.release[2] - '0';
|
||||
+ if (k_version <= 4)
|
||||
+ return ENOTSUP;
|
||||
|
||||
filename = *++argv;
|
||||
if (!filename)
|
||||
bb_show_usage();
|
||||
|
||||
+ g_filename = filename;
|
||||
+ ret = find_module(filename);
|
||||
+ if (ret)
|
||||
+ goto done;
|
||||
+
|
||||
/* Rest is options */
|
||||
options = xzalloc(1);
|
||||
optlen = 0;
|
||||
@@ -4283,36 +4254,46 @@
|
||||
optlen += sprintf(options + optlen, (strchr(*argv,' ') ? "\"%s\" " : "%s "), *argv);
|
||||
}
|
||||
|
||||
-#if 0
|
||||
- /* Any special reason why mmap? It isn't performace critical... */
|
||||
- int fd;
|
||||
- struct stat st;
|
||||
- unsigned long len;
|
||||
- fd = xopen(filename, O_RDONLY);
|
||||
- fstat(fd, &st);
|
||||
- len = st.st_size;
|
||||
- map = mmap(NULL, len, PROT_READ, MAP_PRIVATE, fd, 0);
|
||||
- if (map == MAP_FAILED) {
|
||||
- bb_perror_msg_and_die("cannot mmap '%s'", filename);
|
||||
- }
|
||||
-
|
||||
- /* map == NULL on Blackfin, probably on other MMU-less systems too. Workaround. */
|
||||
- if (map == NULL) {
|
||||
- map = xmalloc(len);
|
||||
- xread(fd, map, len);
|
||||
- }
|
||||
-#else
|
||||
len = MAXINT(ssize_t);
|
||||
- map = xmalloc_open_read_close(filename, &len);
|
||||
-#endif
|
||||
-
|
||||
+ map = xmalloc_open_read_close(g_filename, &len);
|
||||
ret = syscall(__NR_init_module, map, len, options);
|
||||
if (ret != 0) {
|
||||
bb_perror_msg_and_die("cannot insert '%s': %s (%li)",
|
||||
- filename, moderror(errno), ret);
|
||||
+ g_filename, moderror(errno), ret);
|
||||
}
|
||||
+done:
|
||||
+ if (g_filename && (g_filename != filename))
|
||||
+ free(g_filename);
|
||||
|
||||
- return 0;
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
+
|
||||
+int insmod_main(int argc, char **argv)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+#if ENABLE_FEATURE_2_6_MODULES
|
||||
+ ret = insmod_main_26(argc, argv);
|
||||
+ if (ret != ENOTSUP)
|
||||
+ goto done;
|
||||
+#endif
|
||||
+
|
||||
+#if ENABLE_FEATURE_2_4_MODULES
|
||||
+ ret = insmod_main_24(argc, argv);
|
||||
+ if (ret != ENOTSUP)
|
||||
+ goto done;
|
||||
+#endif
|
||||
+
|
||||
+ fprintf(stderr, "Error: Kernel version not supported\n");
|
||||
+ return 1;
|
||||
+
|
||||
+done:
|
||||
+ if (ret) {
|
||||
+ errno = ret;
|
||||
+ bb_perror_msg("Loading module failed");
|
||||
+ return ret;
|
||||
+ } else
|
||||
+ return 0;
|
||||
+}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,10 +1,10 @@
|
|||
Index: busybox-1.4.2/coreutils/md5_sha1_sum.c
|
||||
Index: busybox-1.7.2/coreutils/md5_sha1_sum.c
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/coreutils/md5_sha1_sum.c 2007-06-04 13:21:31.536182440 +0200
|
||||
+++ busybox-1.4.2/coreutils/md5_sha1_sum.c 2007-06-04 13:21:37.709243992 +0200
|
||||
@@ -8,76 +8,10 @@
|
||||
--- busybox-1.7.2.orig/coreutils/md5_sha1_sum.c 2007-09-03 13:48:39.000000000 +0200
|
||||
+++ busybox-1.7.2/coreutils/md5_sha1_sum.c 2007-10-04 15:45:02.423570273 +0200
|
||||
@@ -8,75 +8,10 @@
|
||||
|
||||
#include "busybox.h"
|
||||
#include "libbb.h"
|
||||
|
||||
-typedef enum { HASH_SHA1, HASH_MD5 } hash_algo_t;
|
||||
-
|
||||
|
@ -36,9 +36,8 @@ Index: busybox-1.4.2/coreutils/md5_sha1_sum.c
|
|||
-
|
||||
- src_fd = STDIN_FILENO;
|
||||
- if (NOT_LONE_DASH(filename)) {
|
||||
- src_fd = open(filename, O_RDONLY);
|
||||
- src_fd = open_or_warn(filename, O_RDONLY);
|
||||
- if (src_fd < 0) {
|
||||
- bb_perror_msg("%s", filename);
|
||||
- return NULL;
|
||||
- }
|
||||
- }
|
||||
|
@ -76,35 +75,35 @@ Index: busybox-1.4.2/coreutils/md5_sha1_sum.c
|
|||
- return hash_value;
|
||||
-}
|
||||
-
|
||||
int md5_sha1_sum_main(int argc, char **argv);
|
||||
int md5_sha1_sum_main(int argc, char **argv)
|
||||
{
|
||||
int return_value = EXIT_SUCCESS;
|
||||
Index: busybox-1.4.2/include/libbb.h
|
||||
Index: busybox-1.7.2/include/libbb.h
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/include/libbb.h 2007-06-04 13:21:35.388596784 +0200
|
||||
+++ busybox-1.4.2/include/libbb.h 2007-06-04 13:21:37.709243992 +0200
|
||||
@@ -641,6 +641,7 @@
|
||||
--- busybox-1.7.2.orig/include/libbb.h 2007-10-04 15:20:22.275221430 +0200
|
||||
+++ busybox-1.7.2/include/libbb.h 2007-10-04 15:42:10.585777803 +0200
|
||||
@@ -947,6 +947,7 @@
|
||||
extern const char bb_uuenc_tbl_std[];
|
||||
void bb_uuencode(const unsigned char *s, char *store, const int length, const char *tbl);
|
||||
void bb_uuencode(char *store, const void *s, int length, const char *tbl);
|
||||
|
||||
+typedef enum { HASH_SHA1, HASH_MD5 } hash_algo_t;
|
||||
typedef struct sha1_ctx_t {
|
||||
uint32_t count[2];
|
||||
uint32_t hash[5];
|
||||
@@ -662,6 +663,8 @@
|
||||
@@ -968,6 +969,8 @@
|
||||
void md5_begin(md5_ctx_t *ctx);
|
||||
void md5_hash(const void *data, size_t length, md5_ctx_t *ctx);
|
||||
void *md5_end(void *resbuf, md5_ctx_t *ctx);
|
||||
+unsigned char *hash_bin_to_hex(unsigned char *hash_value, unsigned hash_length);
|
||||
+uint8_t *hash_file(const char *filename, hash_algo_t hash_algo);
|
||||
|
||||
uint32_t *crc32_filltable(int endian);
|
||||
uint32_t *crc32_filltable(uint32_t *tbl256, int endian);
|
||||
|
||||
Index: busybox-1.4.2/libbb/Kbuild
|
||||
Index: busybox-1.7.2/libbb/Kbuild
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/libbb/Kbuild 2007-06-04 13:21:31.548180616 +0200
|
||||
+++ busybox-1.4.2/libbb/Kbuild 2007-06-04 13:21:37.710243840 +0200
|
||||
@@ -37,6 +37,7 @@
|
||||
--- busybox-1.7.2.orig/libbb/Kbuild 2007-09-03 13:48:41.000000000 +0200
|
||||
+++ busybox-1.7.2/libbb/Kbuild 2007-10-04 15:42:10.613779401 +0200
|
||||
@@ -38,6 +38,7 @@
|
||||
lib-y += get_last_path_component.o
|
||||
lib-y += get_line_from_file.o
|
||||
lib-y += getopt32.o
|
||||
|
@ -112,11 +111,11 @@ Index: busybox-1.4.2/libbb/Kbuild
|
|||
lib-y += herror_msg.o
|
||||
lib-y += herror_msg_and_die.o
|
||||
lib-y += human_readable.o
|
||||
Index: busybox-1.4.2/libbb/hash.c
|
||||
Index: busybox-1.7.2/libbb/hash.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ busybox-1.4.2/libbb/hash.c 2007-06-04 13:21:37.710243840 +0200
|
||||
@@ -0,0 +1,82 @@
|
||||
+++ busybox-1.7.2/libbb/hash.c 2007-10-04 15:45:08.279904000 +0200
|
||||
@@ -0,0 +1,81 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2003 Glenn L. McGrath
|
||||
+ * Copyright (C) 2003-2004 Erik Andersen
|
||||
|
@ -158,20 +157,19 @@ Index: busybox-1.4.2/libbb/hash.c
|
|||
+
|
||||
+ src_fd = STDIN_FILENO;
|
||||
+ if (NOT_LONE_DASH(filename)) {
|
||||
+ src_fd = open(filename, O_RDONLY);
|
||||
+ src_fd = open_or_warn(filename, O_RDONLY);
|
||||
+ if (src_fd < 0) {
|
||||
+ bb_perror_msg("%s", filename);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* figure specific hash algorithims */
|
||||
+ if (hash_algo==HASH_MD5) {
|
||||
+ if (ENABLE_MD5SUM && hash_algo==HASH_MD5) {
|
||||
+ md5_begin(&context.md5);
|
||||
+ update = (void (*)(const void*, size_t, void*))md5_hash;
|
||||
+ final = (void (*)(void*, void*))md5_end;
|
||||
+ hash_len = 16;
|
||||
+ } else if (hash_algo==HASH_SHA1) {
|
||||
+ } else if (ENABLE_SHA1SUM && hash_algo==HASH_SHA1) {
|
||||
+ sha1_begin(&context.sha1);
|
||||
+ update = (void (*)(const void*, size_t, void*))sha1_hash;
|
||||
+ final = (void (*)(void*, void*))sha1_end;
|
|
@ -1,10 +1,10 @@
|
|||
Index: busybox-1.4.2/editors/awk.c
|
||||
Index: busybox-1.7.2/editors/awk.c
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/editors/awk.c 2007-06-04 13:21:35.202625056 +0200
|
||||
+++ busybox-1.4.2/editors/awk.c 2007-06-04 13:21:37.927210856 +0200
|
||||
@@ -30,6 +30,11 @@
|
||||
--- busybox-1.7.2.orig/editors/awk.c 2007-10-05 01:39:50.073293533 +0200
|
||||
+++ busybox-1.7.2/editors/awk.c 2007-10-05 02:16:42.539374788 +0200
|
||||
@@ -33,6 +33,11 @@
|
||||
/* these flags are static, don't change them when value is changed */
|
||||
#define VF_DONTTOUCH (VF_ARRAY | VF_SPECIAL | VF_WALK | VF_CHILD | VF_DIRTY)
|
||||
#define VF_DONTTOUCH (VF_ARRAY | VF_SPECIAL | VF_WALK | VF_CHILD | VF_DIRTY)
|
||||
|
||||
+#ifdef CONFIG_AWX
|
||||
+#define fputs(s, stream) fputs_hook(s, stream)
|
||||
|
@ -13,15 +13,14 @@ Index: busybox-1.4.2/editors/awk.c
|
|||
+
|
||||
/* Variable */
|
||||
typedef struct var_s {
|
||||
unsigned short type; /* flags */
|
||||
@@ -50,10 +55,15 @@
|
||||
char *programname;
|
||||
unsigned type; /* flags */
|
||||
@@ -54,9 +59,14 @@
|
||||
} chain;
|
||||
|
||||
+typedef var *(*awk_cfunc)(var *res, var *args, int nargs);
|
||||
/* Function */
|
||||
+typedef var *(*awk_cfunc)(var *res, var *args, int nargs);
|
||||
typedef struct func_s {
|
||||
unsigned short nargs;
|
||||
unsigned nargs;
|
||||
- struct chain_s body;
|
||||
+ enum { AWKFUNC, CFUNC } type;
|
||||
+ union {
|
||||
|
@ -31,17 +30,17 @@ Index: busybox-1.4.2/editors/awk.c
|
|||
} func;
|
||||
|
||||
/* I/O stream */
|
||||
@@ -1312,7 +1322,8 @@
|
||||
@@ -1400,7 +1410,8 @@
|
||||
next_token(TC_FUNCTION);
|
||||
pos++;
|
||||
f = newfunc(t.string);
|
||||
g_pos++;
|
||||
f = newfunc(t_string);
|
||||
- f->body.first = NULL;
|
||||
+ f->type = AWKFUNC;
|
||||
+ f->x.body.first = NULL;
|
||||
f->nargs = 0;
|
||||
while (next_token(TC_VARIABLE | TC_SEQTERM) & TC_VARIABLE) {
|
||||
v = findvar(ahash, t.string);
|
||||
@@ -1321,7 +1332,7 @@
|
||||
v = findvar(ahash, t_string);
|
||||
@@ -1409,7 +1420,7 @@
|
||||
if (next_token(TC_COMMA | TC_SEQTERM) & TC_SEQTERM)
|
||||
break;
|
||||
}
|
||||
|
@ -50,33 +49,34 @@ Index: busybox-1.4.2/editors/awk.c
|
|||
chain_group();
|
||||
clear_array(ahash);
|
||||
|
||||
@@ -2260,7 +2271,8 @@
|
||||
@@ -2372,7 +2383,8 @@
|
||||
break;
|
||||
|
||||
case XC( OC_FUNC ):
|
||||
- if (! op->r.f->body.first)
|
||||
- if (!op->r.f->body.first)
|
||||
+ if ((op->r.f->type == AWKFUNC) &&
|
||||
+ !op->r.f->x.body.first)
|
||||
runtime_error(EMSG_UNDEF_FUNC);
|
||||
syntax_error(EMSG_UNDEF_FUNC);
|
||||
|
||||
X.v = R.v = nvalloc(op->r.f->nargs+1);
|
||||
@@ -2277,7 +2289,11 @@
|
||||
@@ -2389,7 +2401,10 @@
|
||||
fnargs = X.v;
|
||||
|
||||
L.s = programname;
|
||||
L.s = g_progname;
|
||||
- res = evaluate(op->r.f->body.first, res);
|
||||
+ if (op->r.f->type == AWKFUNC)
|
||||
+ res = evaluate(op->r.f->x.body.first, res);
|
||||
+ else if (op->r.f->type == CFUNC)
|
||||
+ res = op->r.f->x.cfunc(res, fnargs, op->r.f->nargs);
|
||||
+
|
||||
programname = L.s;
|
||||
g_progname = L.s;
|
||||
|
||||
nvfree(fnargs);
|
||||
@@ -2637,6 +2653,11 @@
|
||||
return &rsm;
|
||||
@@ -2753,6 +2768,13 @@
|
||||
}
|
||||
|
||||
int awk_main(int argc, char **argv);
|
||||
+int awx_main(int argc, char **argv);
|
||||
+
|
||||
+#ifdef CONFIG_AWX
|
||||
+static int is_awx = 0;
|
||||
+#include "awx.c"
|
||||
|
@ -84,23 +84,24 @@ Index: busybox-1.4.2/editors/awk.c
|
|||
+
|
||||
int awk_main(int argc, char **argv)
|
||||
{
|
||||
int i, j, flen;
|
||||
@@ -2693,6 +2714,10 @@
|
||||
free(s);
|
||||
unsigned opt;
|
||||
@@ -2817,6 +2839,11 @@
|
||||
*s1 = '=';
|
||||
}
|
||||
}
|
||||
|
||||
+
|
||||
+#ifdef CONFIG_AWX
|
||||
+ do_awx(argc, argv);
|
||||
+#endif
|
||||
+
|
||||
programname = NULL;
|
||||
while((c = getopt(argc, argv, "F:v:f:W:")) != EOF) {
|
||||
switch (c) {
|
||||
Index: busybox-1.4.2/editors/awx.c
|
||||
opt_complementary = "v::f::";
|
||||
opt = getopt32(argv, "F:v:f:W:", &opt_F, &opt_v, &opt_f, &opt_W);
|
||||
argv += optind;
|
||||
Index: busybox-1.7.2/editors/awx.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ busybox-1.4.2/editors/awx.c 2007-06-04 13:21:37.928210704 +0200
|
||||
@@ -0,0 +1,633 @@
|
||||
+++ busybox-1.7.2/editors/awx.c 2007-10-05 02:10:16.393369582 +0200
|
||||
@@ -0,0 +1,636 @@
|
||||
+/*
|
||||
+ * awk web extension
|
||||
+ *
|
||||
|
@ -126,7 +127,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|||
+static int lang_inuse = 0;
|
||||
+
|
||||
+/* look up a translation symbol from the hash */
|
||||
+static inline char *translate_lookup(char *str)
|
||||
+static inline const char *translate_lookup(char *str)
|
||||
+{
|
||||
+ char *name, *def, *p;
|
||||
+ hash_item *hi;
|
||||
|
@ -151,7 +152,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|||
+/* look for translation markers in the line and return the translated string */
|
||||
+static char *translate_line(char *line)
|
||||
+{
|
||||
+ char *tok[MAX_TR * 3];
|
||||
+ const char *tok[MAX_TR * 3];
|
||||
+ char *l, *p, *p2 = NULL, *res;
|
||||
+ int len = 0, _pos = 0, i, tr_abort = 0;
|
||||
+ static char *backlog = NULL;
|
||||
|
@ -283,7 +284,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|||
+{
|
||||
+ const char *langfmt = "/usr/lib/webif/lang/%s.txt";
|
||||
+ char lbuf[LINE_BUF];
|
||||
+ char *lang;
|
||||
+ const char *lang;
|
||||
+
|
||||
+ if (!lang_inuse)
|
||||
+ init_lang(res, args, nargs);
|
||||
|
@ -299,7 +300,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|||
+}
|
||||
+
|
||||
+/* read the contents of an entire file */
|
||||
+static char *get_file(char *fname)
|
||||
+static char *get_file(const char *fname)
|
||||
+{
|
||||
+ FILE *F;
|
||||
+ char *s = NULL;
|
||||
|
@ -343,8 +344,8 @@ Index: busybox-1.4.2/editors/awx.c
|
|||
+
|
||||
+ tv = nvalloc(1);
|
||||
+ memset(&tmp, 0, sizeof(tmp));
|
||||
+ pos = p;
|
||||
+ t.lineno = 1;
|
||||
+ g_pos = p;
|
||||
+ t_lineno = 1;
|
||||
+ while ((tclass = next_token(TC_EOF | TC_OPSEQ |
|
||||
+ TC_OPTERM | TC_BEGIN | TC_FUNCDECL)) != TC_EOF) {
|
||||
+ if (tclass & TC_OPTERM)
|
||||
|
@ -357,13 +358,13 @@ Index: busybox-1.4.2/editors/awx.c
|
|||
+ chain_group();
|
||||
+ } else if (tclass & TC_FUNCDECL) {
|
||||
+ next_token(TC_FUNCTION);
|
||||
+ pos++;
|
||||
+ f = newfunc(t.string);
|
||||
+ g_pos++;
|
||||
+ f = newfunc(t_string);
|
||||
+ f->type = AWKFUNC;
|
||||
+ f->x.body.first = NULL;
|
||||
+ f->nargs = 0;
|
||||
+ while (next_token(TC_VARIABLE | TC_SEQTERM) & TC_VARIABLE) {
|
||||
+ v = findvar(ahash, t.string);
|
||||
+ v = findvar(ahash, t_string);
|
||||
+ v->x.aidx = (f->nargs)++;
|
||||
+
|
||||
+ if (next_token(TC_COMMA | TC_SEQTERM) & TC_SEQTERM)
|
||||
|
@ -382,10 +383,12 @@ Index: busybox-1.4.2/editors/awx.c
|
|||
+
|
||||
+/* include an awk file and run its BEGIN{} section */
|
||||
+static xhash *includes = NULL;
|
||||
+static void include_file(char *filename)
|
||||
+static void include_file(const char *filename)
|
||||
+{
|
||||
+ char *s;
|
||||
+ var *v;
|
||||
+ int oldlnr = g_lineno;
|
||||
+ const char *oldprg = g_progname;
|
||||
+
|
||||
+ if (!includes)
|
||||
+ includes = hash_init();
|
||||
|
@ -402,13 +405,17 @@ Index: busybox-1.4.2/editors/awx.c
|
|||
+ fprintf(stderr, "Could not open file.\n");
|
||||
+ return;
|
||||
+ }
|
||||
+ g_lineno = 1;
|
||||
+ g_progname = xstrdup(filename);
|
||||
+ parse_include(s+1);
|
||||
+ free(s);
|
||||
+ g_lineno = oldlnr;
|
||||
+ g_progname = oldprg;
|
||||
+}
|
||||
+
|
||||
+static var *include(var *res, var *args, int nargs)
|
||||
+{
|
||||
+ char *s;
|
||||
+ const char *s;
|
||||
+
|
||||
+ s = getvar_s(args);
|
||||
+ if (s && (strlen(s) > 0))
|
||||
|
@ -424,7 +431,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|||
+ node *n;
|
||||
+
|
||||
+ memset(&body, 0, sizeof(body));
|
||||
+ pos = str;
|
||||
+ g_pos = str;
|
||||
+ seq = &body;
|
||||
+
|
||||
+ /* end of expression, assume that there's going to be a free byte
|
||||
|
@ -456,7 +463,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|||
+
|
||||
+ if (!e || !e->var)
|
||||
+ return;
|
||||
+ lineno = e->line;
|
||||
+ g_lineno = e->line;
|
||||
+ switch (e->t) {
|
||||
+ case T_TEXT:
|
||||
+ s = malloc(strlen(e->var) + 2);
|
||||
|
@ -502,38 +509,36 @@ Index: busybox-1.4.2/editors/awx.c
|
|||
+}
|
||||
+
|
||||
+/* awk method render(), which opens a template file and processes all awk ssi calls */
|
||||
+static void render_file(char *filename)
|
||||
+static void render_file(const char *filename)
|
||||
+{
|
||||
+ struct template_cb tcb;
|
||||
+ struct template_element *e;
|
||||
+ FILE *f;
|
||||
+ char *oldprg;
|
||||
+ int oldlnr;
|
||||
+ const char *oldprg = g_progname;
|
||||
+ int oldlnr = g_lineno;
|
||||
+
|
||||
+ if (!filename)
|
||||
+ return;
|
||||
+
|
||||
+ oldlnr = lineno;
|
||||
+ oldprg = programname;
|
||||
+ programname = filename;
|
||||
+
|
||||
+ f = fopen(filename, "r");
|
||||
+ if (!f)
|
||||
+ return;
|
||||
+
|
||||
+ g_progname = xstrdup(filename);
|
||||
+ g_lineno = 1;
|
||||
+ memset(&tcb, 0, sizeof(tcb));
|
||||
+ tcb.handle_element = render_element;
|
||||
+ e = parse_template(&tcb, f);
|
||||
+ execute_template(&tcb, e);
|
||||
+ free_template(&tcb, e);
|
||||
+ fclose(f);
|
||||
+ programname = oldprg;
|
||||
+ lineno = oldlnr;
|
||||
+ g_progname = oldprg;
|
||||
+ g_lineno = oldlnr;
|
||||
+}
|
||||
+
|
||||
+static var *render(var *res, var *args, int nargs)
|
||||
+{
|
||||
+ char *s;
|
||||
+ const char *s;
|
||||
+
|
||||
+ s = getvar_s(args);
|
||||
+ if (!s)
|
||||
|
@ -555,7 +560,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|||
+}
|
||||
+
|
||||
+/* registers a global c function for the awk interpreter */
|
||||
+static void register_cfunc(char *name, awk_cfunc cfunc, int nargs)
|
||||
+static void register_cfunc(const char *name, awk_cfunc cfunc, int nargs)
|
||||
+{
|
||||
+ func *f;
|
||||
+
|
||||
|
@ -573,7 +578,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|||
+ setvar_u(findvar(formvar, name), value);
|
||||
+}
|
||||
+
|
||||
+static char *cgi_getvar(char *name)
|
||||
+static const char *cgi_getvar(const char *name)
|
||||
+{
|
||||
+ if (!formvar) {
|
||||
+ formvar = hash_init();
|
||||
|
@ -589,8 +594,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|||
+/* function call for accessing cgi form variables */
|
||||
+static var *getvar(var *res, var *args, int nargs)
|
||||
+{
|
||||
+ char *s;
|
||||
+ char *svar;
|
||||
+ const char *s, *svar;
|
||||
+
|
||||
+ s = getvar_s(args);
|
||||
+ if (!s)
|
||||
|
@ -608,7 +612,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|||
+/* call an awk function without arguments by string reference */
|
||||
+static var *call(var *res, var *args, int nargs)
|
||||
+{
|
||||
+ char *s = getvar_s(args);
|
||||
+ const char *s = getvar_s(args);
|
||||
+ func *f;
|
||||
+
|
||||
+ if (!s)
|
||||
|
@ -629,10 +633,10 @@ Index: busybox-1.4.2/editors/awx.c
|
|||
+ char *tmp, *s = NULL;
|
||||
+
|
||||
+ zero_out_var(&tv);
|
||||
+ programname = name;
|
||||
+ g_progname = name;
|
||||
+
|
||||
+ /* read the main controller source */
|
||||
+ s = get_file(programname);
|
||||
+ s = get_file(g_progname);
|
||||
+ if (!s) {
|
||||
+ fprintf(stderr, "Could not open file\n");
|
||||
+ return 1;
|
||||
|
@ -650,7 +654,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|||
+
|
||||
+ action = newvar("ACTION");
|
||||
+ if (!(strlen(getvar_s(action)) > 0)) {
|
||||
+ tmp = cgi_getvar("action");
|
||||
+ tmp = (char *) cgi_getvar("action");
|
||||
+ if (!tmp || (strlen(tmp) <= 0))
|
||||
+ tmp = strdup("default");
|
||||
+
|
||||
|
@ -694,21 +698,21 @@ Index: busybox-1.4.2/editors/awx.c
|
|||
+ return 0;
|
||||
+
|
||||
+ /* fill in ARGV array */
|
||||
+ setvar_i(V[ARGC], argc + 1);
|
||||
+ setari_u(V[ARGV], 0, "awx");
|
||||
+ setvar_i(intvar[ARGC], argc + 1);
|
||||
+ setari_u(intvar[ARGV], 0, "awx");
|
||||
+ i = 0;
|
||||
+ while (*args)
|
||||
+ setari_u(V[ARGV], ++i, *args++);
|
||||
+ setari_u(intvar[ARGV], ++i, *args++);
|
||||
+
|
||||
+ while((c = getopt(argc, argv, "i:f:")) != EOF) {
|
||||
+ switch(c) {
|
||||
+ case 'i':
|
||||
+ programname = optarg;
|
||||
+ g_progname = optarg;
|
||||
+ include_file(optarg);
|
||||
+ break;
|
||||
+ case 'f':
|
||||
+ ret = 0;
|
||||
+ programname = optarg;
|
||||
+ g_progname = optarg;
|
||||
+ render_file(optarg);
|
||||
+ goto done;
|
||||
+ }
|
||||
|
@ -734,10 +738,10 @@ Index: busybox-1.4.2/editors/awx.c
|
|||
+ return awk_main(argc, argv);
|
||||
+}
|
||||
+
|
||||
Index: busybox-1.4.2/editors/awx_parser.h
|
||||
Index: busybox-1.7.2/editors/awx_parser.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ busybox-1.4.2/editors/awx_parser.h 2007-06-04 13:21:37.928210704 +0200
|
||||
+++ busybox-1.7.2/editors/awx_parser.h 2007-10-05 01:43:59.487506840 +0200
|
||||
@@ -0,0 +1,38 @@
|
||||
+#ifndef __TEMPLATE_PARSER_H
|
||||
+#define __TEMPLATE_PARSER_H
|
||||
|
@ -777,10 +781,10 @@ Index: busybox-1.4.2/editors/awx_parser.h
|
|||
+void free_template(struct template_cb *cb, struct template_element *e);
|
||||
+
|
||||
+#endif
|
||||
Index: busybox-1.4.2/editors/awx_parser.l
|
||||
Index: busybox-1.7.2/editors/awx_parser.l
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ busybox-1.4.2/editors/awx_parser.l 2007-06-04 13:21:37.929210552 +0200
|
||||
+++ busybox-1.7.2/editors/awx_parser.l 2007-10-05 01:43:59.547510259 +0200
|
||||
@@ -0,0 +1,302 @@
|
||||
+%{
|
||||
+#include <stdio.h>
|
||||
|
@ -1084,10 +1088,10 @@ Index: busybox-1.4.2/editors/awx_parser.l
|
|||
+ free(e);
|
||||
+ return free_template(cb, next);
|
||||
+}
|
||||
Index: busybox-1.4.2/editors/Config.in
|
||||
Index: busybox-1.7.2/editors/Config.in
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/editors/Config.in 2007-06-04 13:21:31.486190040 +0200
|
||||
+++ busybox-1.4.2/editors/Config.in 2007-06-04 13:21:37.929210552 +0200
|
||||
--- busybox-1.7.2.orig/editors/Config.in 2007-10-05 01:39:50.097294897 +0200
|
||||
+++ busybox-1.7.2/editors/Config.in 2007-10-05 01:43:59.583512308 +0200
|
||||
@@ -12,6 +12,13 @@
|
||||
Awk is used as a pattern scanning and processing language. This is
|
||||
the BusyBox implementation of that programming language.
|
||||
|
@ -1102,11 +1106,11 @@ Index: busybox-1.4.2/editors/Config.in
|
|||
config FEATURE_AWK_MATH
|
||||
bool "Enable math functions (requires libm)"
|
||||
default y
|
||||
Index: busybox-1.4.2/editors/Kbuild
|
||||
Index: busybox-1.7.2/editors/Kbuild
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/editors/Kbuild 2007-06-04 13:21:31.492189128 +0200
|
||||
+++ busybox-1.4.2/editors/Kbuild 2007-06-04 13:21:37.929210552 +0200
|
||||
@@ -10,3 +10,12 @@
|
||||
--- busybox-1.7.2.orig/editors/Kbuild 2007-10-05 01:39:50.105295361 +0200
|
||||
+++ busybox-1.7.2/editors/Kbuild 2007-10-05 01:43:59.627514818 +0200
|
||||
@@ -12,3 +12,12 @@
|
||||
lib-$(CONFIG_PATCH) += patch.o
|
||||
lib-$(CONFIG_SED) += sed.o
|
||||
lib-$(CONFIG_VI) += vi.o
|
||||
|
@ -1119,22 +1123,22 @@ Index: busybox-1.4.2/editors/Kbuild
|
|||
+editors/awx_parser.o: editors/awx_parser.c FORCE
|
||||
+ $(call cmd,force_checksrc)
|
||||
+ $(call if_changed_rule,cc_o_c)
|
||||
Index: busybox-1.4.2/include/applets.h
|
||||
Index: busybox-1.7.2/include/applets.h
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/include/applets.h 2007-06-04 13:21:36.732392496 +0200
|
||||
+++ busybox-1.4.2/include/applets.h 2007-06-04 13:21:37.929210552 +0200
|
||||
@@ -60,6 +60,7 @@
|
||||
--- busybox-1.7.2.orig/include/applets.h 2007-10-05 01:43:59.203490652 +0200
|
||||
+++ busybox-1.7.2/include/applets.h 2007-10-05 01:43:59.647515958 +0200
|
||||
@@ -76,6 +76,7 @@
|
||||
USE_ARPING(APPLET(arping, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
|
||||
USE_ASH(APPLET_NOUSAGE(ash, ash, _BB_DIR_BIN, _BB_SUID_NEVER))
|
||||
USE_AWK(APPLET(awk, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
|
||||
USE_AWK(APPLET_NOEXEC(awk, awk, _BB_DIR_USR_BIN, _BB_SUID_NEVER, awk))
|
||||
+USE_AWX(APPLET_NOUSAGE(awx, awx, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
|
||||
USE_BASENAME(APPLET(basename, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
|
||||
USE_BASENAME(APPLET_NOFORK(basename, basename, _BB_DIR_USR_BIN, _BB_SUID_NEVER, basename))
|
||||
USE_BBCONFIG(APPLET(bbconfig, _BB_DIR_BIN, _BB_SUID_NEVER))
|
||||
//USE_BBSH(APPLET(bbsh, _BB_DIR_BIN, _BB_SUID_NEVER))
|
||||
Index: busybox-1.4.2/include/cgi.h
|
||||
Index: busybox-1.7.2/include/cgi.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ busybox-1.4.2/include/cgi.h 2007-06-04 13:21:37.929210552 +0200
|
||||
+++ busybox-1.7.2/include/cgi.h 2007-10-05 01:43:59.667517098 +0200
|
||||
@@ -0,0 +1,8 @@
|
||||
+#ifndef CGI_H
|
||||
+#define CGI_H
|
||||
|
@ -1144,10 +1148,10 @@ Index: busybox-1.4.2/include/cgi.h
|
|||
+int cgi_init(var_handler);
|
||||
+
|
||||
+#endif
|
||||
Index: busybox-1.4.2/libbb/cgi.c
|
||||
Index: busybox-1.7.2/libbb/cgi.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ busybox-1.4.2/libbb/cgi.c 2007-06-04 13:21:37.930210400 +0200
|
||||
+++ busybox-1.7.2/libbb/cgi.c 2007-10-05 01:43:59.707519378 +0200
|
||||
@@ -0,0 +1,457 @@
|
||||
+/* --------------------------------------------------------------------------
|
||||
+ * functions for processing cgi form data
|
||||
|
@ -1606,14 +1610,15 @@ Index: busybox-1.4.2/libbb/cgi.c
|
|||
+
|
||||
+ return retval;
|
||||
+}
|
||||
Index: busybox-1.4.2/libbb/Kbuild
|
||||
Index: busybox-1.7.2/libbb/Kbuild
|
||||
===================================================================
|
||||
--- busybox-1.4.2.orig/libbb/Kbuild 2007-06-04 13:21:37.710243840 +0200
|
||||
+++ busybox-1.4.2/libbb/Kbuild 2007-06-04 13:21:37.930210400 +0200
|
||||
@@ -118,3 +118,6 @@
|
||||
lib-$(CONFIG_MDEV) += xregcomp.o
|
||||
lib-$(CONFIG_LESS) += xregcomp.o
|
||||
lib-$(CONFIG_DEVFSD) += xregcomp.o
|
||||
+
|
||||
--- busybox-1.7.2.orig/libbb/Kbuild 2007-10-05 01:43:59.387501141 +0200
|
||||
+++ busybox-1.7.2/libbb/Kbuild 2007-10-05 01:43:59.751521884 +0200
|
||||
@@ -99,6 +99,7 @@
|
||||
lib-y += xreadlink.o
|
||||
|
||||
# conditionally compiled objects:
|
||||
+lib-$(CONFIG_AWX) += cgi.o
|
||||
+
|
||||
lib-$(CONFIG_FEATURE_MOUNT_LOOP) += loop.o
|
||||
lib-$(CONFIG_LOSETUP) += loop.o
|
||||
lib-$(CONFIG_FEATURE_MTAB_SUPPORT) += mtab.o
|
|
@ -1,196 +0,0 @@
|
|||
--- busybox/modutils/insmod.c 2007-05-11 12:10:43.000000000 +0200
|
||||
+++ busybox/modutils/insmod.c 2007-05-11 12:12:15.000000000 +0200
|
||||
@@ -75,6 +75,30 @@
|
||||
extern int insmod_ng_main( int argc, char **argv);
|
||||
#endif
|
||||
|
||||
+static char *m_filename;
|
||||
+static char *m_fullName;
|
||||
+#define _PATH_MODULES "/lib/modules"
|
||||
+
|
||||
+static int check_module_name_match(const char *filename, struct stat *statbuf,
|
||||
+ void *userdata, int depth)
|
||||
+{
|
||||
+ char *fullname = (char *) userdata;
|
||||
+
|
||||
+ if (fullname[0] == '\0')
|
||||
+ return FALSE;
|
||||
+ else {
|
||||
+ char *tmp, *tmp1 = xstrdup(filename);
|
||||
+ tmp = bb_get_last_path_component(tmp1);
|
||||
+ if (strcmp(tmp, fullname) == 0) {
|
||||
+ free(tmp1);
|
||||
+ /* Stop searching if we find a match */
|
||||
+ m_filename = xstrdup(filename);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ free(tmp1);
|
||||
+ }
|
||||
+ return TRUE;
|
||||
+}
|
||||
|
||||
#if ENABLE_FEATURE_2_4_MODULES
|
||||
|
||||
@@ -680,7 +704,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
-#define _PATH_MODULES "/lib/modules"
|
||||
enum { STRVERSIONLEN = 64 };
|
||||
|
||||
/*======================================================================*/
|
||||
@@ -793,37 +816,6 @@
|
||||
static int n_ext_modules_used;
|
||||
extern int delete_module(const char *);
|
||||
|
||||
-static char *m_filename;
|
||||
-static char *m_fullName;
|
||||
-
|
||||
-
|
||||
-/*======================================================================*/
|
||||
-
|
||||
-
|
||||
-static int check_module_name_match(const char *filename, struct stat *statbuf,
|
||||
- void *userdata, int depth)
|
||||
-{
|
||||
- char *fullname = (char *) userdata;
|
||||
-
|
||||
- if (fullname[0] == '\0')
|
||||
- return FALSE;
|
||||
- else {
|
||||
- char *tmp, *tmp1 = xstrdup(filename);
|
||||
- tmp = bb_get_last_path_component(tmp1);
|
||||
- if (strcmp(tmp, fullname) == 0) {
|
||||
- free(tmp1);
|
||||
- /* Stop searching if we find a match */
|
||||
- m_filename = xstrdup(filename);
|
||||
- return FALSE;
|
||||
- }
|
||||
- free(tmp1);
|
||||
- }
|
||||
- return TRUE;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-/*======================================================================*/
|
||||
-
|
||||
static struct obj_file *arch_new_file(void)
|
||||
{
|
||||
struct arch_file *f;
|
||||
@@ -4265,14 +4257,97 @@
|
||||
long ret;
|
||||
size_t len;
|
||||
void *map;
|
||||
- char *filename, *options;
|
||||
+ char *options, *tmp;
|
||||
+ struct stat st;
|
||||
+#if ENABLE_FEATURE_CLEAN_UP
|
||||
+ FILE *fp = 0;
|
||||
+#else
|
||||
+ FILE *fp;
|
||||
+#endif
|
||||
+ int k_version = 0;
|
||||
+ struct utsname myuname;
|
||||
|
||||
- filename = *++argv;
|
||||
- if (!filename)
|
||||
+ if (argc < 2)
|
||||
bb_show_usage();
|
||||
|
||||
+#if !ENABLE_FEATURE_2_4_MODULES
|
||||
+ /* Grab the module name */
|
||||
+ tmp = basename(xstrdup(argv[1]));
|
||||
+ len = strlen(tmp);
|
||||
+
|
||||
+ if (uname(&myuname) == 0) {
|
||||
+ if (myuname.release[0] == '2') {
|
||||
+ k_version = myuname.release[2] - '0';
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (len > 3 && tmp[len - 3] == '.' && tmp[len - 2] == 'k' && tmp[len - 1] == 'o') {
|
||||
+ len -= 3;
|
||||
+ tmp[len] = '\0';
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ m_fullName = xasprintf("%s.ko", tmp);
|
||||
+
|
||||
+ /* Get a filedesc for the module. Check we we have a complete path */
|
||||
+ if (stat(argv[1], &st) < 0 || !S_ISREG(st.st_mode)
|
||||
+ || (fp = fopen(argv[1], "r")) == NULL
|
||||
+ ) {
|
||||
+ /* Hmm. Could not open it. First search under /lib/modules/`uname -r`,
|
||||
+ * but do not error out yet if we fail to find it... */
|
||||
+ if (k_version) { /* uname succeedd */
|
||||
+ char *module_dir;
|
||||
+ char *tmdn;
|
||||
+ char real_module_dir[FILENAME_MAX];
|
||||
+
|
||||
+ tmdn = concat_path_file(_PATH_MODULES, myuname.release);
|
||||
+ /* Jump through hoops in case /lib/modules/`uname -r`
|
||||
+ * is a symlink. We do not want recursive_action to
|
||||
+ * follow symlinks, but we do want to follow the
|
||||
+ * /lib/modules/`uname -r` dir, So resolve it ourselves
|
||||
+ * if it is a link... */
|
||||
+ if (realpath(tmdn, real_module_dir) == NULL)
|
||||
+ module_dir = tmdn;
|
||||
+ else
|
||||
+ module_dir = real_module_dir;
|
||||
+ recursive_action(module_dir, TRUE, FALSE, FALSE,
|
||||
+ check_module_name_match, 0, m_fullName, 0);
|
||||
+ free(tmdn);
|
||||
+ }
|
||||
+
|
||||
+ /* Check if we have found anything yet */
|
||||
+ if (m_filename == 0 || ((fp = fopen(m_filename, "r")) == NULL)) {
|
||||
+ char module_dir[FILENAME_MAX];
|
||||
+
|
||||
+ free(m_filename);
|
||||
+ m_filename = 0;
|
||||
+ if (realpath (_PATH_MODULES, module_dir) == NULL)
|
||||
+ strcpy(module_dir, _PATH_MODULES);
|
||||
+ /* No module found under /lib/modules/`uname -r`, this
|
||||
+ * time cast the net a bit wider. Search /lib/modules/ */
|
||||
+ if (!recursive_action(module_dir, TRUE, FALSE, FALSE,
|
||||
+ check_module_name_match, 0, m_fullName, 0)
|
||||
+ ) {
|
||||
+ if (m_filename == 0
|
||||
+ || ((fp = fopen(m_filename, "r")) == NULL)
|
||||
+ ) {
|
||||
+ bb_error_msg("%s: no module by that name found", m_fullName);
|
||||
+#if ENABLE_FEATURE_CLEAN_UP
|
||||
+ if(fp)
|
||||
+ fclose(fp);
|
||||
+ free(m_filename);
|
||||
+#endif
|
||||
+ }
|
||||
+ } else
|
||||
+ bb_error_msg_and_die("%s: no module by that name found", m_fullName);
|
||||
+ }
|
||||
+ } else
|
||||
+ m_filename = xstrdup(argv[1]);
|
||||
+#endif
|
||||
+
|
||||
/* Rest is options */
|
||||
options = xstrdup("");
|
||||
+ argv++;
|
||||
while (*++argv) {
|
||||
int optlen = strlen(options);
|
||||
options = xrealloc(options, optlen + 2 + strlen(*argv) + 2);
|
||||
@@ -4300,13 +4375,13 @@
|
||||
}
|
||||
#else
|
||||
len = MAXINT(ssize_t);
|
||||
- map = xmalloc_open_read_close(filename, &len);
|
||||
+ map = xmalloc_open_read_close(m_filename, &len);
|
||||
#endif
|
||||
|
||||
ret = syscall(__NR_init_module, map, len, options);
|
||||
if (ret != 0) {
|
||||
bb_perror_msg_and_die("cannot insert '%s': %s (%li)",
|
||||
- filename, moderror(errno), ret);
|
||||
+ m_filename, moderror(errno), ret);
|
||||
}
|
||||
|
||||
return 0;
|
Loading…
Reference in New Issue