Commit Graph

505 Commits

Author SHA1 Message Date
Glenn L McGrath
c6992feee3 Update my email address, document some of my tasks in the AUTHORS file 2004-04-25 05:11:19 +00:00
Eric Andersen
aff114c33d Larry Doolittle writes:
This is a bulk spelling fix patch against busybox-1.00-pre10.
If anyone gets a corrupted copy (and cares), let me know and
I will make alternate arrangements.

Erik - please apply.

Authors - please check that I didn't corrupt any meaning.

Package importers - see if any of these changes should be
passed to the upstream authors.

I glossed over lots of sloppy capitalizations, missing apostrophes,
mixed American/British spellings, and German-style compound words.

What is "pretect redefined for test" in cmdedit.c?

Good luck on the 1.00 release!

      - Larry
2004-04-14 17:51:38 +00:00
Eric Andersen
a4375047d3 slightly clean the whacked out formatting 2004-04-13 19:25:57 +00:00
Eric Andersen
238e354b58 Eric Spakman noticed that ifdown' will attempt to run 'ifconfig'
even if built with CONFIG_FEATURE_IFUPDOWN_IP when shutting down
a dhcp connection.
2004-04-12 20:57:17 +00:00
Glenn L McGrath
19efb3dc59 Fix compile error if CONFIG_FEATURE_IP_ADDR isnt enabled 2004-04-12 02:35:44 +00:00
Glenn L McGrath
36c7478992 Fix up conditional compile of files needed by ip applets 2004-04-12 02:22:39 +00:00
Glenn L McGrath
32da885a91 Fix ftp resume
Terminate returned message at <CRLF> so strtoul returns without error
2004-04-08 10:27:11 +00:00
Eric Andersen
7b5bb51f6a Fix indenting 2004-04-06 16:56:00 +00:00
Eric Andersen
c11a6a887b Patch from Thomas Winkler:
ifconfig did not look up hostnames, so
	ifconfig lo localhost
would not work, you have to do
	ifconfig lo 127.0.0.1
2004-03-31 11:30:08 +00:00
Eric Andersen
70060d25d2 s/fileno\(stdin\)/STDIN_FILENO/g
s/fileno\(stdout\)/STDOUT_FILENO/g
2004-03-27 10:02:48 +00:00
Manuel Novoa III
539fa95e0d Oops.. got a bit to aggressive with size optimization and global replace. :-( 2004-03-19 23:27:08 +00:00
Eric Andersen
ca65ca7d45 Oops. Using the wrong variable was a rather stupid
thing for me to do.
2004-03-15 08:46:37 +00:00
Eric Andersen
c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Manuel Novoa III
7d0c51919c In spite of the feature freeze, check in a complete rework of route which
fixes some bugs, adds some error checking, and removes _lots_ of bloat.
Text size on i386...
              old     new
   ipv6      5425    3523
   no ipv6   3143    2193
2004-03-10 07:42:38 +00:00
Eric Andersen
2479445562 Fix/eliminate use of atol 2004-03-06 22:11:45 +00:00
Glenn L McGrath
3f79300e37 Patch by Andrew Victor,
In arpping.h, fix structure alignment of "struct arpMsg".
GCC can insert padding in the structure which causes udhcpd to send an
invalid ARP packet on the network.  It will then not receive a valid
reply, which can cause it to assign an IP address that's already in use
on the network.
(With kernels before 2.4.20, the "struct ethhdr" in linux/if_ether.h
wasn't marked as packed.  This is also an issue if your toolchain was
built with a pre-2.4.20 kernel).
2004-03-05 14:25:49 +00:00
Glenn L McGrath
0226596dcb Fix a typo, patch by Andrew Victor 2004-03-05 14:23:16 +00:00
Glenn L McGrath
fbe984e1c9 Fix debugging output, patch by Hideki IWAMOTO 2004-03-05 13:04:39 +00:00
Glenn L McGrath
3d752f7ab2 Patch from Steven Scholz to fix compiler warnings 2004-03-05 09:38:16 +00:00
Glenn L McGrath
d5d5e54290 Quick fix for tftp truncation bug 2004-02-26 07:47:20 +00:00
Eric Andersen
d8746cdc40 Joe.C, joe at numa dot com dot tw writes:
Hi,

When downloading files over slow network (e.g. wireless/
internet) using IE, sometimes it will stop downloading and
show error message 'connection closed' when the download
is almost complete. This is because IE can't handle server
close connection properly.

Apache http_main.c fix this problem by close the connection
after client close the connection. This patch do exactly the
same thing. Please consider include this patch.

Joe.C
2004-02-24 07:28:38 +00:00
Eric Andersen
539ffc9129 Fernando Silveira writes:
Hi,

  Well, I made this patch a long time ago (08/2002) because it was a
  need of a project, but had no time to send it to you. It adds support
  to `autologin' option of the telnet protocol. It has been used since
  made with busybox 0.60.3 at production and I had no problems with it.
  I have ported it to the HEAD revision of the CVS server (20040211) and
  I hope you enjoy and apply it to the official sources. :)

Thanks a lot!
2004-02-22 12:25:47 +00:00
Glenn L McGrath
df7d84cf25 Patch from Vodz, cleanup memory usage, send strdup error messages to
syslog.
2004-02-22 11:25:13 +00:00
Glenn L McGrath
90ed9a0eb6 Patch from James Zhu, telnetd window resizing support. 2004-02-22 09:45:57 +00:00
Glenn L McGrath
d33278dea5 Patch from Hideki IWAMOTO, output debugging messages to stderr 2004-02-22 07:20:25 +00:00
Glenn L McGrath
34e1469f24 remove duplicate header declarations 2004-02-22 04:58:36 +00:00
Glenn L McGrath
c699778fbb Ptch by Hideki IWAMOTO, fix a bug preventing tftp from getting or
putting more than 0xffff blocks.
2004-02-22 03:33:53 +00:00
Glenn L McGrath
f1c4b11b24 No need to check proxy env variable twice, ignore proxy env variable if
its set to 0
2004-02-22 00:27:34 +00:00
Glenn L McGrath
03a0643fbc Dont use same variable and struct name 2004-02-18 13:19:58 +00:00
Glenn L McGrath
82d42dbb57 Formatting 2004-02-18 13:12:53 +00:00
Glenn L McGrath
aac2a19e50 remove debugging 2004-02-18 12:58:00 +00:00
Eric Andersen
37aac6489e Remove the unused CONFIG_FEATURE_HTTPD_SET_CGI_VARS_TO_ENV option. 2004-02-17 20:08:11 +00:00
Eric Andersen
60bb3f31af Mark Lord writes:
The config file processing for inetd in busybox-1.00-pre7 and newer
is broken -- the saved command argv[] values overwrite each other.

Patch to fix it is attached.

Cheers
--
Mark Lord
Real-Time Remedies Inc.
2004-02-17 20:04:34 +00:00
Eric Andersen
ef43749e83 Joe.C writes:
Hi,

   When httpd connection is closed, bosybox httpd will
not stop reading from CGI program. This patch fix this
problem. It check the return value of bb_full_write and
stop reading from CGI if the connection is closed.
Please apply this patch.

Joe.C
2004-02-04 11:10:28 +00:00
Glenn L McGrath
24cb17f9be Fix http proxy use, bytes were swapped 2004-01-31 08:08:57 +00:00
Eric Andersen
ad95373efc Use standard C99 types 2004-01-30 23:45:53 +00:00
Eric Andersen
1a834be1ce Use proper C99 types 2004-01-30 22:59:50 +00:00
Eric Andersen
39cdf4e2ab Use proper C99 types 2004-01-30 22:40:05 +00:00
Eric Andersen
f2ec37902a Pascal Brisset writes:
uuencode fails to encode binary data because it right-shifts
bytes as signed chars and keeps the duplicated sign bits.

The original base64_encode() from wget/http.c is broken as well,
but it is only used to encode ascii data.

-- Pascal
2004-01-26 07:17:30 +00:00
Glenn L McGrath
eaf5bc0038 Redo getconfigent, save 150 bytes, still small memory leak when
parsing invalid entries.
2004-01-20 15:32:39 +00:00
Glenn L McGrath
53766c4063 Fix up a couple of bugs i introduced in yesterdays cleanup. 2004-01-18 08:58:06 +00:00
Glenn L McGrath
58a2e0e262 Patch from Leif Lindholm (slightly modified by me), to fix http
redirection.
Example of incorrect behaviour was the following url, busybox wget didnt
get redirected to the busybox url as it should.
http://freshmeat.net/redir/busybox/953/url_homepage/www.busybox.net
2004-01-17 23:07:14 +00:00
Glenn L McGrath
036dbaa082 Modify bb_lookup_port to allow the protocol to be specified, allowing
/etc/services support for inetd, netcat and tftp.
2004-01-17 05:03:31 +00:00
Glenn L McGrath
a277e02663 The functions setconfig, enter and bump_nofile were only called once, marge them into the calling
function.
2004-01-17 03:20:46 +00:00
Glenn L McGrath
ff6ec8a2ae Use 1 line for function name and return value,
remove dofork define/variable,
dont check pid value is < or > than 0 if we know it is 0.
2004-01-17 02:47:45 +00:00
Glenn L McGrath
3e77b4e954 Remove some defined statements 2004-01-17 01:44:32 +00:00
Glenn L McGrath
c3b134f3b7 Changed #define names for common features (superficial) 2004-01-17 01:26:53 +00:00
Glenn L McGrath
2faf306c73 Use bb_get_chomped_line_from_file 2004-01-17 00:34:31 +00:00
Glenn L McGrath
f980bd5848 Fix a bug of mine, identified by Stephane Billiart 2003-12-27 00:21:47 +00:00
Russ Dill
6caa073760 it should work even if you don't assign a pidfile 2003-12-26 23:41:28 +00:00
Russ Dill
d242e49c89 fix a long standing underallocation bug 2003-12-24 19:57:13 +00:00
Russ Dill
a8992635b1 move debugging to safe place (before vfork) 2003-12-24 19:31:08 +00:00
Glenn L McGrath
236e93d133 Allow recieving file to stdout, sending files from stdin, use the '-'
filename. Save a variable.
2003-12-20 05:43:34 +00:00
Glenn L McGrath
266c1f5eff display the port number number correctly, other minor optimisations 2003-12-20 03:19:27 +00:00
Glenn L McGrath
ffccf6eb5d Change interface to bb_lookup_host, dont try and set port inside this
function as there is no gracefull way of handling failures.
Rename bb_getport to bb_lookup_port, allow a default port to be
specified so it always returns a correct value.
Modify ftpgetput/rdate/wget to use the new interface.
wget/rdate now use etc/services with a falback default value.
2003-12-20 01:47:18 +00:00
Glenn L McGrath
514aeabc36 Use getopt_ulflags 2003-12-19 12:08:56 +00:00
Eric Andersen
3752d337b3 Patch from Fillod Stephane:
* While I'm at it, there's also a "telnetd.patch" which maps CRLF to CR,
  like netkit-telnet does, required by the loosy Windows telnet clients.
2003-12-19 11:30:13 +00:00
Eric Andersen
769a3ef08d Patch from Stephane Billiart:
This removes references to config->remoteuser when
CONFIG_FEATURE_HTTPD_CGI=y but CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set
2003-12-19 11:23:47 +00:00
Eric Andersen
1a773a656e Manousaridis Angelos writes:
Another issue I found was with the iproute utility. While using another
program I found that it failed because the "ip route del" command was
not found. I looked at the full iproute implementation and this command
exists. The busybox version has the "ip route delete" command. I have
created a patch which makes the "ip route del" command an alias to the
"ip route delete" command.
2003-12-19 10:47:40 +00:00
Eric Andersen
658f8b1d1a Manousaridis Angelos writes:
Hello,

I have been using busybox for some time now, for an ARM based platform.
I was very pleased when I tried the 1.00preX series, with all the new
utilities and daemons.

I found out that the ifupdown in busybox does not behave exaclty like
the debian version. Then the pre-up script fails, the interface is
getting up. Also when the post-up script fails the return value is
ignored. Actually everything is always run and the return value is
always true. I looked at the original implementation from debian and
fixed the busybox version to do the same. A patch is attached if anyone
is interested.
2003-12-19 10:46:00 +00:00
Eric Andersen
b8d2cd44a6 don't use kernel headers 2003-12-19 10:40:56 +00:00
Glenn L McGrath
b51eb26568 Use getopt_ulflags 2003-12-19 10:37:52 +00:00
Russ Dill
4e864a36b6 Finish remerging busybox udhcp and udhcp. Some cleanups as well. 2003-12-18 22:25:38 +00:00
Russ Dill
e30495654d clean up some bad, bad formatting 2003-12-16 22:46:33 +00:00
Russ Dill
76729b8c69 include headers with prototypes to make sure prototypes match 2003-12-16 20:44:15 +00:00
Eric Andersen
5f46f1c241 remove reference to missing header file which is breaking the build 2003-12-16 12:04:01 +00:00
Russ Dill
6b3f757053 revert removal of define 2003-12-16 02:38:09 +00:00
Russ Dill
4040d3d712 forgotten include 2003-12-16 02:34:28 +00:00
Russ Dill
8b3845106a why the complication of a static string rather than a define? gcc isn't dumb 2003-12-16 02:30:53 +00:00
Russ Dill
4b77acafa6 start attempting to bring udhcp in busybox back to the state where it is (ideally) an exact copy of udhcp outside of busybox so that its easy to merge back and forth 2003-12-16 02:28:20 +00:00
Russ Dill
7becf5987a when compiled standalone, udhcp needs these headers 2003-12-16 01:42:18 +00:00
Russ Dill
a3170d5aab whoops 2003-12-16 01:33:38 +00:00
Russ Dill
8f43126934 not sure who made this change, but it certainly mucks things up (note 'fwrite(leases, ...'), adds a bit more code, and some stack overhead. Anywho, this fixes it, and retains the spirit of what the submitter of this change was attempting to acheive (the entire lease is written at once in a struct) 2003-12-16 01:29:40 +00:00
Russ Dill
62419df95c make udhcp work under uclinux, to an extent 2003-12-15 22:11:26 +00:00
Russ Dill
4a9e34c148 options is a pretty common symbol, bad idea to use as a global in udhcp when compiling into busybox 2003-12-15 22:09:36 +00:00
Glenn L McGrath
9adcf73152 Stop sending data to the client after the first failure.
Patch by Joe.C
2003-12-08 20:21:53 +00:00
Glenn L McGrath
7ffe133864 As we no longer use function pointers for read in common archiving code
archive_xread can be replaced with bb_full_read, and archive_copy_file
with bb_copyfd*
bb_copyfd is split into two functions bb_copyfd_size and bb_copyfd_eof,
they share a common backend.
2003-11-21 22:24:57 +00:00
Eric Andersen
b6e58d2b9a Michael Smith writes:
I noticed a problem with ifconfig in busybox 0.60.5. The matching code
seems to exist in busybox CVS as well, so I'll paste in the patch that
fixed it.

I was running:
 # ifconfig wan0 1.2.3.4 pointopoint 1.2.3.5 netmask 255.255.255.255

I was seeing the inet addr and P-t-P addr both being set to 1.2.3.5
(the pointopoint address).

wan0      Link encap:Point-Point Protocol
          inet addr:1.2.3.5  P-t-P:1.2.3.5  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          ...

The patch below seems to fix it.
2003-11-14 03:04:08 +00:00
Eric Andersen
c16686c1e2 Ulrich Marx writes:
hello

i had some trouble with the filedescriptor in udhcp.
Two things happened on my device:
1.) broken or not connected cable (no dhcp-server)
2.) daemonizing (starting with option -b)

i got a filedescriptor fd=0 from function raw_socket,
after daemonizing (daemon call) the fd is closed.
Client can't recieve data's anymore.

i fixed this problem (like pidfile handling):
2003-11-14 03:00:04 +00:00
Eric Andersen
04d055f4e1 Fix rdate and ftpget/ftpput so they compile with the new xconnect.
I have checked rdate.  Someone should also check ftpget/ftpput to
be sure they still work.
2003-11-03 21:20:18 +00:00
Eric Andersen
e6dc439b3a Rework wget, the xconnect interface, and its various clients
in order to fix the problems with round robin DNS reported
by Andrew Flegg:
    http://busybox.net/lists/busybox/2003-October/009579.html

This removes the ipv6 specific xconnect dns lookups.  I do
not see why that would need to be special cased for ipv6 as
was done, but that will just have to be tested.

So IPV6 people -- please test this change!

 -Erik
2003-10-31 09:31:46 +00:00
Eric Andersen
88c916bdec Andreas Mohr writes:
the busybox menuconfig triggered my "inacceptable number of spelling mistakes"
upper level, so I decided to make a patch ;-)

I also improved some wording to describe some things in a better way.

Many thanks for an incredible piece of software!

Andreas Mohr, random OSS developer
2003-10-22 09:58:56 +00:00
Glenn L McGrath
9d1a33c690 Vodz last_patch_105 without his xargs patch which doenst apply cleanly 2003-10-06 13:23:06 +00:00
Glenn L McGrath
1dc0ccafdd Vodz, last_patch_114
- env vars CONTENT_TYPE, CONTENT_LENGTH, HTTPD_REFERER, REMOTE_USER and
AUTH_TYPE(Basic always).
- POST data pipied now (previous version have loading into memory may be
big size data and reducing with hardcoded limit)
- removed $CGI_foo environment variables, else my have rubbish
enviroment if POST data have big binary file
2003-10-03 10:50:56 +00:00
Glenn L McGrath
6b0658f5c0 Patch by Fillod Stephane, declare variables as static to not clobber
busybox namespace
2003-09-26 00:33:18 +00:00
Glenn L McGrath
baaa6e9e7d Patch from Stephane Billiart to fix an unused variable warning. 2003-09-15 15:00:43 +00:00
Eric Andersen
8efe967018 Be entirely consistant when using ioctl(0, TIOCGWINSZ, &winsize)
to ensure proper fallback behavior on, i.e. serial consoles.
 -Erik
2003-09-15 08:33:45 +00:00
Glenn L McGrath
c2b9186be1 Fix compile error, Vodz, last_path_113 2003-09-12 11:27:15 +00:00
Eric Andersen
eb213bd2a2 As vodz just pointed out, I screwup up the call to bb_xasprintf! 2003-09-12 08:39:05 +00:00
Eric Andersen
51ed242ad6 Invoke run-parts on /etc/network/if-*.d per the behavior of
the upstream ifupdown code...
2003-09-12 05:59:53 +00:00
Glenn L McGrath
14092a1ed2 Busybox CVS version ipcalc have problems:
- Can`t use 255.255.255.255 address
- typo: double check for valid ip address and uncheck for valid mask

httpd unseted SERVER_PORT (my bug from last_patch111).

last_patch_112 from Vladimir N. Oleynik
2003-09-12 00:44:50 +00:00
Eric Andersen
6231f092bd Patch from Philip Blundell:
On Thu, 2003-09-11 at 01:09, Glenn McGrath wrote:
> Applied

Thanks.  Unfortunately there was one small bug in that last patch.
Could you apply this one as well?

p.
2003-09-11 08:25:11 +00:00
Glenn L McGrath
cc20ebc11e add ipv6 literal support to wget 2003-09-10 23:52:15 +00:00
Glenn L McGrath
fe538ba5d6 Vodz, last_patch_104 2003-09-10 23:35:45 +00:00
Glenn L McGrath
5875be406e Vodz, last_patch_110
no limit, no memory usage for env buffer, always call putenv().
remove small error for previous last_patch109.
2003-09-08 15:39:09 +00:00
Glenn L McGrath
b65422cf65 last_patch_109 from Vladimir N. Oleynik
Busybox`s httpd have the defect (from born):
ip 1.2.3.1 have true comparing also with
1.2.3.10-1.2.3.19 and 1.2.3.100-1.2.3.199.
Last patch removed this bug and added feature:
allow/deny rule can support network/netmask
example: 1.2.3.0/255.255.255.128
  or
network/mask_bits
example: 1.2.3.0/25
now; old format
1
1.2
1.2.3
1.2.3.4
too support and converted to
1/8 1.2/16 1.2.3/24 1.2.3.4/32
automaticaly.

Also, current CVS have small problem: ignores
A:IP, (loses 'A', 'a' only work). Corrected.
2003-09-08 10:59:27 +00:00
Glenn L McGrath
d6bdd5dc08 Small bug in silent option 2003-09-05 02:37:15 +00:00
Glenn L McGrath
530ea42abc adds the ability to use and calculate network prefix specifications instead
of netmasks. It also fixes the parameters for network and netmask to match
that of the official Red Hat version (-n for network and -m for netmask).
Patch by Joshua Jackson
2003-09-02 06:59:57 +00:00
Glenn L McGrath
dc4e75ef7c move all "-/bin/sh" "/bin/sh" and "sh" to libbb/messages.c file as one
constant.
Vodz last_patch_107
2003-09-02 02:36:18 +00:00
Glenn L McGrath
d9461f887e Allow one to detect and handle the case where no lease could be obtained
via DHCP. (Just add a section "failed" to your script.)
Patch by Steven Scholz
2003-09-01 04:08:36 +00:00