I've found a possible bug in libbb/interface.c, in function
if_readlist_proc(). This function calls get_name(), and passes
as an argument 'name', a buffer of 16 bytes (IFNAMSIZ). The
function get_name(), however, may use more than 16 bytes,
when it is searching for aliases. Even if you don't have an
alias interface, you can run into trouble if the interface
has received more than 99999999 bytes, in which case the
space between the interface name and the rx stats
disappears, as in the /proc/net/dev example below:
wan0.200:264573315 462080 ...
In this case get_name() correctly identifies the interface name
as "wan0.200", but to do that it uses 18 bytes of the 'name'
buffer, which could lead to an unpredictable error.
A simple solution would be to increase the size of the buffer:
Here's a pretty crude patch to reload /etc/inittab when init receives a
SIGHUP. The mailing list archives weren't entirely clear on whether or
not it should already happen, but didn't appear to be.
The patch:
* Adds a new function, reload_signal() which just calls
parse_inittab() and run_actions(RESPAWN)
* Before entering the while (1) loop set up SIGHUP to call
reload_signal()
* Modify new_init_action to skip the action if the same command
already exists on the same terminal
This last bit means that changing already running entries is a bit
hairy as you can end up with, for example, two shells running on the
same virtual console. However, for solely adding/removing entries this patch
seems to work quite well.
Here's a bunch of fixes for the watchdog app in busybox. This does a
couple of things:
- configurable timer duration (userspace timer duration is
usually configurable within the device drivers themselves).
- run as a daemon
- shutdown the device properly on SIGINT or SIGHUP
- clear the counter immediately instead of sleeping first
as well as updating the usage information. This has also been switched
over to getopt to deal with the optional timer duration specifier.
The changes themselves are harmless and isolated, and I've veried that
this works on sh and x86 without any problems.
The current SC_x references automatically assume that everyone uses ttyS/tts
as their naming scheme for their serial ports. This isn't the case for quite
a few architectures, including sh, sh64, h8, arm, etc.
Hello all,
This patch adds more "Help" text to the config system. Almost
all applets now have a help entry. Also, I cleaned up the spacing of
the existing text so that things are consistent. This patch is against
this morning's CVS.
Thomas Cameron
CEI Systems, Inc.