Commit Graph

601 Commits

Author SHA1 Message Date
"Vladimir N. Oleynik"
b628409b1e more make safe the exported namespace for udhcp. Move to bb-specific file for reduce change into udhcp-CVS 2005-09-23 11:25:29 +00:00
"Vladimir N. Oleynik"
53ad366fe7 remove 1 exported 2005-09-23 10:44:02 +00:00
Paul Fox
b6f71645f4 move a couple of functions from common code (options.c) to udhcpd private
code (files.c) to make udhcpc a little smaller.
2005-09-22 19:03:24 +00:00
Paul Fox
28de951b02 add support for setting the dhcp vendor class option (option 60).
udhcpc now has a -V (--vendorclass), which will replace the default
"udhcpRELEASE" string in this option.
2005-09-22 18:59:13 +00:00
"Vladimir N. Oleynik"
2f9c30a2d5 safe exported namespace for udhcp. Not full, bore :-( 2005-09-22 15:07:33 +00:00
"Vladimir N. Oleynik"
e4baaa2d27 more remove lost exported 2005-09-22 12:59:26 +00:00
"Vladimir N. Oleynik"
007a011647 network "default" --> bb_INET_default. Reduce 2 exported from find applet 2005-09-22 11:11:11 +00:00
Bernhard Reutner-Fischer
d5bd137a24 - rename libbb's password helpers as suggested in libbb.h
my_getpwnam -> bb_xgetpwnam  /* dies on error */
  my_getgrnam -> bb_xgetgrnam  /* dies on error */
  my_getgrgid -> bb_getgrgid
  my_getpwuid -> bb_getpwuid
  my_getug    -> bb_getug
2005-09-20 21:06:17 +00:00
"Vladimir N. Oleynik"
54deebf4e4 destroy bug #421 2005-09-19 10:46:44 +00:00
Rob Landley
6a65d2f8cc Amir Shalem observed that telnetd doesn't really require login, so forcing
it is wrong.
2005-09-15 18:22:43 +00:00
Mike Frysinger
887a1ad57f BsAtHome writes in Bug 433:
Ping packets sent by busybox have wrong endian on f.x. mips32 (openwrt). Attatched is a patch that 
uses htons() and ntohs() to be platform independent.
2005-09-15 01:32:48 +00:00
Rob Landley
230b411de8 Fix the warning by rewriting the function to be smaller and simpler.
I'd appreciate somebody on a __BIG_ENDIAN platform testing this out; I haven't
got the hardware...
2005-09-08 03:22:09 +00:00
"Vladimir N. Oleynik"
45a8ed89c6 - sync traceroute with Slackware-10.1
(support -FIl -g gw -i if -z pt now).
- libbb/getopt_ulflags.c support bb_opt_complementally="x-x" as trigger now
2005-09-06 16:08:33 +00:00
"Vladimir N. Oleynik"
27421a1878 1) bb_opt_complementaly -> bb_opt_complementally
2) better support long options
3) new flag '!' for bb_opt_complementally: produce bb_show_usage() if BB_GETOPT_ERROR internally
2005-09-05 14:46:07 +00:00
Rob Landley
344ea471ef Tracking system but #4: php needs the environment variable SCRIPT_FILENAME. 2005-09-01 09:38:32 +00:00
Rob Landley
37adefc670 Off by one error in max_leases sanity check. Bug 349, apparently. 2005-09-01 02:43:39 +00:00
Rob Landley
6417564eeb Two FEATURE_CLEAN_UP patches from Shaun Jackman, closing filehandles. 2005-08-22 15:57:50 +00:00
Paul Fox
b831753676 commiting:
0000073: Add option to inetd applet to run in foreground
this option was already there for uclinux -- this just exposes
it in the normal case as well.
2005-08-01 19:39:47 +00:00
Paul Fox
a39bba33c8 allow suppression of default client-id. fixes bug 000037. allows
busybox to match kernel and u-boot behavior with respect to client-id.
2005-08-01 14:31:13 +00:00
Mike Frysinger
d84a35f649 patch by apgo in Bug 345 to not use ether_hostton() with uClibc 2005-07-31 22:49:12 +00:00
Mike Frysinger
66c37d1390 typecast to int 2005-07-31 22:22:20 +00:00
Mike Frysinger
2e3054f413 use socklen_t instead of size_t with socket related functions 2005-07-31 22:20:02 +00:00
Rob Landley
ef8f423e90 Erik pointed out that in the last try at the #ifdef cleanup
infrastructure, the compiler isn't smart enough to replace const static 
int with the constant, and allocates space for each set of them, 
bloating the executable something fierce.  Oops.

So now, we #define ENABLE_XXX to 0 or 1 for each CONFIG_XXX (which
is still there so the 1000+ #ifdef/#ifndef tests don't have to be
replaced wholesale).  Changed the test instance in networking/ifconfig.c 
to use this.
2005-07-28 19:36:33 +00:00
Rob Landley
193c8c7383 #ifdef reduction infrastructure, based on an argument between Shaun Jackman,
Rob Landley, and others.

Currently CONFIG options are defined or undefined, so we chop out code with
#ifdefs, ala:
#ifdef CONFIG_THING
  stuff();
#endif

This creates a new header file, bb_config.h, which sets the CONFIG entry to 1
or 0, and lets us do:

  if(CONFIG_THING) stuff();

And let the compiler do dead code elimination to get rid of it.  (Note: #ifdef
will still work because for the 1 case it's a static const int, not a #define.)
2005-07-27 06:55:36 +00:00
Mike Frysinger
4d00896d05 use toplevel ARFLAGS and update default ARFLAGS to be quiet 2005-07-27 01:09:24 +00:00
Mike Frysinger
03e827a422 2005-03-19 Shaun Jackman <sjackman@gmail.com>
* networking/ping.c (ping): Change the type of fromlen to socklen_t.
2005-07-26 23:00:59 +00:00
Paul Fox
7b86134032 remove duplicate check against chaddr. 2005-07-21 20:23:56 +00:00
Paul Fox
f2ddc05ee7 applying fix for:
0000026: poor man's "scriptable" telnet
2005-07-20 19:55:19 +00:00
Paul Fox
1d4c88c8a5 applying fix for:
0000271: [PATCH] tftp -g fails if a TFTP_ACK is lost
2005-07-20 19:49:15 +00:00
Paul Fox
982d35ffa2 applying fix for:
0000263: nc cannot use -e when initiating a tcp connection
    	to something else
2005-07-20 19:40:30 +00:00
Paul Fox
01f67987e0 applying fix for:
0000260: udhcpc doesn't validate client hardware address
2005-07-20 19:13:21 +00:00
Paul Fox
5dc0ceeb9e applying fix for:
0000203: 'ip route flush cache' not implemented
2005-07-20 19:01:05 +00:00
Paul Fox
77ee52333c applying fix for:
0000185: httpd infinite loop when piping to CGI script
2005-07-20 18:42:52 +00:00
Paul Fox
28069404a4 much more concise fix for bug #45. just align the packet... 2005-07-20 11:55:08 +00:00
Paul Fox
146e83a60e applying fix from:
0000108: busyboxy/networking/ftpgetput.c not conforming to
                    RFC 959.  ftpget and ftpput send <LF> as EOL.
2005-07-19 21:26:57 +00:00
Paul Fox
deac371690 applying fix from:
0000088: inetd chargen stream does not generate the
	    characters as recommended in RFC 864
	    Chragen service is generating garbage characters.
2005-07-19 21:19:20 +00:00
Paul Fox
b270315b21 applying fix for:
0000045: traceroute causes an alignment trap due to unaligned buffer on arm
2005-07-19 20:37:15 +00:00
Paul Fox
7b71d740b9 fix for "0000027: patch: nc will spin if stdin closed" 2005-07-18 22:23:16 +00:00
Ned Ludd
778ee6da60 - remove extra/unneeded function call. testing svn 2005-06-24 03:47:57 +00:00
Eric Andersen
3efa51d943 characters encoded as html should have a trailing semicolon
to be interpreted properly
2005-06-23 05:51:48 +00:00
Rob Landley
f3133c4149 Thus spake Brenda J. Butler:
We were seeing some timeouts when getting files with the busybox tftp
client.

With tcpdump, we saw that the tftp client was receiving blocks and
ack'ing them, but the server was failing to receive the occasional
ack.

When that happened, the server would send the last block over again,
but the tftp client was expecting the next block.

This patch allows the client to recover from this situation
(it sends an ack for the repeat block but does not write it
to the local file).

I hope it meets your approval, please don't hesitate to send
me comments for improvement.

The patch is against "head" in svn, I tested it on an older version
of busybox in our environment.  It applied cleanly to the older
version.

Credit for this goes to my co-worker John McCarthy for finding
it and me for fixing it (assuming it works for everyone else too).

cheerio,
bjb
2005-06-07 02:40:39 +00:00
Rob Landley
0b1ff5a606 Tobias Krawutschke found a bug where the DHCP client would accept packets
with the wrong ARP address, meaning we could easily get somebody else's IP.
That is a bad thing, and this is the minimal two-line fix.
2005-05-26 05:25:12 +00:00
Mike Frysinger
b662f0d58b import ether-wake applet by haveaniceday Bug 252 2005-05-11 03:59:53 +00:00
Rob Landley
00e76cb6b9 Patch from Jason Schoon to add IPV6 support to telnetd. Reworked by Rob
Landley to remove an #ifdef and move another one out of the flow of code.
2005-05-10 23:53:33 +00:00
Mike Frysinger
9c85ecdef4 use shared busybox error messages to save a few bytes 2005-05-07 06:45:29 +00:00
Mike Frysinger
7dc7f402a7 make the exec (-e) an optional feature of netcat 2005-05-06 05:00:34 +00:00
Mike Frysinger
60a5c38a4b In bug 247, haveaniceday writes:
The option "-w secs" adds a timeout for writing.
2005-05-06 04:45:38 +00:00
Rob Landley
918f2ab3d7 Revert the uptime() removal. Let the list sort it out... 2005-05-04 02:15:23 +00:00
Rob Landley
8b80c71d70 Patch from Shaun Jackman:
Replace uptime with time(NULL). time is more portable than uptime and
eliminates the need to define uptime, reducing code size slightly.
2005-05-04 00:38:15 +00:00
Rob Landley
0d38301d85 From: Shaun Jackman <sjackman@gmail.com>
To: busybox@mail.codepoet.org
  
Wrap sockaddr_in6 in a ifdef CONFIG_FEATURE_IPV6.
Include sys/types.h instead of asm/types.h.
Include netinet/if_ether.h instead of linux/if_ether.h
The ioctl request argument is an int, not an unsigned short.
2005-05-03 22:30:08 +00:00
Rob Landley
e3752e56a4 Revert Tito's patch to zcip. My bad, David Brownell had objected and I missed
it...
2005-05-03 03:28:55 +00:00
Rob Landley
8445a9ff99 On Tuesday 19 April 2005 21:10, Tito wrote and today added:
> Hi,
> this is a first attempt of size optimization for zcip taking into account all
> the hints given so far on the list.
> I've applied just the more obvious busyboxifications so maybe it could be
> optimized more.
BTW: I've ripped out  a lot of debug code and changed c++ // comments to /* */
as both were rather confusing for a newbie like me. ;-) 
Sorry to the author for that.
I know that this makes mantaining the code easier, but I'm simple minded....
2005-05-01 00:22:03 +00:00
Rob Landley
ad8071f582 David Brownell submitted a new applet, zcip, based on RFC 3927. This is
version 0418b.  It compiled.
2005-04-30 03:49:37 +00:00
Eric Andersen
70a5a1abde Do not attempt to free() the application's environment, which is was
not dynamically allocated.  Instead, use a private variable to store
the environment array, which is used when we exec applications.
2005-04-27 11:44:11 +00:00
Mike Frysinger
7202e00b4c remove unused variable and declare writepid inline 2005-04-23 01:42:29 +00:00
Mike Frysinger
91d8f0e892 touchups as suggested by Vladimir N. Oleynik 2005-04-18 18:52:15 +00:00
Mike Frysinger
fa69f110d9 import fakeidentd module started by Thomas Lundquist 2005-04-17 07:24:19 +00:00
Eric Andersen
14f5c8d764 Patch from Bernhard Fischer to make a bunch of symbols static
which were otherwise cluttering the global namespace.
2005-04-16 19:39:00 +00:00
Eric Andersen
63e5e7bf0e Fix broken macro 2005-04-16 08:04:31 +00:00
Eric Andersen
42e3b00ae5 Only define a local environ when not using the prototype from unistd.h 2005-04-16 08:02:15 +00:00
Mike Frysinger
4e5936ef95 In Bug 208, bernhardf writes:
On machines with only ANSI compliant compilers, not explitily delcaring
an empty parameter list 'void' causes failure.
2005-04-16 04:30:38 +00:00
Mike Frysinger
3cc01a80a3 In Bug 209, bernhardf writes:
struct named {
    named_field: init,
};
appear to be depraced by now; rather use C{99} format as in
struct named {
    .named_field = init,
};
2005-04-16 04:17:39 +00:00
Mike Frysinger
d824853de3 merge from udhcp module 2004-12-06 14:59:45 +00:00
Eric Andersen
9789bf1019 return failure when nslookup fails 2004-10-13 07:25:01 +00:00
Eric Andersen
abf58d6ba5 Wade Berrier writes:
Hello,

Here's a patch for a first attempt at static leases for udhcpd.
Included in the tarball are 2 files (static_leases.c, static_leases.h)
and a patch against the latest cvs.

In the config file you can configure static leases with the following
format:

static_lease 00:60:08:11:CE:4E 192.168.0.54
static_lease 00:60:08:11:CE:3E 192.168.0.44

Comments/suggestions/improvements are welcome.


Wade
2004-10-08 08:49:26 +00:00
Eric Andersen
751750e3ee Patch from Denis Vlasenko to fix a problem where
wget http://1.2.3.4/abc/ loses last '/'
2004-10-08 08:27:40 +00:00
Eric Andersen
07f2fea62c last_patch139.gz from Vladimir N. Oleynik:
>I also don't mean to disagree about leaving 30x status codes until after
>1.0.  In fact, although redirecting http://host/dir to http://host/dir/
>with a 301 is common practice (e.g. Apache, IIS), AFAIK it isn't
>actually required (or mentioned) by the HTTP specs.

Ok.
Attached patch have 302 and 408 implemented features.


--w
vodz
2004-10-08 08:03:29 +00:00
Eric Andersen
7daa076d3e egor duda writes:
Hi!

I've created a patch to busybox' build system to allow building it in
separate tree in a manner similar to kbuild from kernel version 2.6.

That is, one runs command like
'make O=/build/some/where/for/specific/target/and/options'
and everything is built in this exact directory, provided that it exists.

I understand that applyingc such invasive changes during 'release
candidates' stage of development is at best unwise. So, i'm currently
asking for comments about this patch, starting from whether such thing
is needed at all to whether it coded properly.

'make check' should work now, and one make creates Makefile in build
directory, so one can run 'make' in build directory after that.

One possible caveat is that if we build in some directory other than
source one, the source directory should be 'distclean'ed first.

egor
2004-10-08 07:46:08 +00:00
Eric Andersen
31ec93e580 Add some notes on how to make telnetd actually work 2004-09-23 20:08:46 +00:00
Glenn L McGrath
d4004ee6a9 Patch from Felipe Kellermann, remove some unnecessary dups, i declared a few extra const's also. 2004-09-14 17:24:59 +00:00
Eric Andersen
b225e2a76b Fixup some warnings 2004-08-28 00:43:07 +00:00
Eric Andersen
97a1de10e9 Vladimir N. Oleynik writes:
Ming-Ching,

>>No. Here there are no mistakes.
>>You using POST metod.
>>For get data you should read from stdin CONTENT_LENGTH bytes.

>Hower as I posted a little while ago, there is indeed a bug
>in POST method if the CONTENT_LENGTH is bigger
>than sizeof(wbuf[128]). So if your CGI script is expecting to
>read the full CONTENT_LENGTH, it might block forever,
>because it will only transfer sizeof(wbuf) to the CGI.

Ok, Ok. I should find time to understand with a problem.
Try attached patch.


--w
vodz
2004-08-26 22:22:50 +00:00
Glenn L McGrath
4014ab1c60 Set default command to list rather than get, its default behaviour now
coincides with upstream. Patch from debian diff.
2004-08-11 08:10:58 +00:00
Eric Andersen
15b588559b use SIGTERM to kill off udhcpd, not SIGKILL 2004-07-30 14:45:08 +00:00
Eric Andersen
373bc1eaee As noted by Eric Spakman, calling static_down() and then calling
bootp_down() seems redundant, esp since bootp_down was a subset
of static_down, so just use that...
2004-07-30 14:31:01 +00:00
Eric Andersen
7f8bcbefc7 add missing ; 2004-07-26 12:22:33 +00:00
Eric Andersen
b2a300590d bother. unrevert my fix. 2004-07-26 12:11:32 +00:00
Eric Andersen
ac594257c3 Make certain that udhcp shuts down the interface 2004-07-26 12:05:44 +00:00
Eric Andersen
29128cd412 oops 2004-07-26 11:46:50 +00:00
Eric Andersen
06e62fd5f0 Make certain that udhcp shuts down the interface 2004-07-26 11:45:25 +00:00
Glenn L McGrath
4d405bbc05 Patch from Manousaridis Angelos to bring dhclient down more elegently 2004-07-23 01:10:22 +00:00
Glenn L McGrath
0177ce1256 Patch from Mike Snitzer to fix return codes.
"I have a need to _really_ know if the interface was properly configured
via ifup so I made busybox's ifupdown pass the return codes through rather
than dropping them on the floor."

"All the functions in ifupdown.c return 1 on success and 0 on failure
(which happens to the opposite of standard practices but whatever).
So it is important for all these functions to not blindly return 1."

"The problem with blindly returning ret, even if it is != 1, is the
callers expect a 0 or 1 and accumulate the return codes.  So a function that
makes 3 calls to execute will have a value of 3 accumulated.  That value
of 1 (success) was almost always returned even if 1 of the commands in the
command sequence failed.  The attached patch fixes the lack of checking
to verify thar result == expected_reult."
2004-07-21 23:56:31 +00:00
Glenn L McGrath
469a1ead53 Patch from Mike Snitzer, bring down dhclient using its correct pid, fix
a grammatical error.
2004-07-21 12:21:39 +00:00
Eric Andersen
5e136f269b Prevent "bootp_down' was declared implicitly extern' and later `static'" warning 2004-07-20 06:35:54 +00:00
Eric Andersen
fe9b9cdfa5 Paul Fox writes:
hi --

working with ifupdown, i've found a couple of buglets --
the wrong string is passed to an error message.

paul
2004-06-29 00:48:30 +00:00
Eric Andersen
4872ed9737 Robin Farine writes:
Hi,

Package: BusyBox
Version: 1.0.0-pre10

When an incomplete read or write from/to a local file occurs (i.e.
not an EOF condition), the tftp client prematurely exits. This
problem can be reproduced by slowly piping data to the tftp client
like this:

  (for v in 1 2 3; do echo $v; sleep 1; done) | \
  tftp -p -l - -r output.txt <host>

The output file on the TFTP server will contain "1".

The attached patch provides a possible solution to this problem.

I can reproduce this on ARM sa1110 and ARM xscale boards, both
running Linux-2.6.4 & glibc-2.3.2. Thanks for the wonderful
program!

Robin
2004-06-22 10:18:30 +00:00
Eric Andersen
36adca81f5 Patch from Bastian Blank:
On Sat, Jun 19, 2004 at 10:57:37PM +0200, Bastian Blank wrote:
> The following patch changes klogd to use openlog/syslog themself
> instead of calling syslog_msg which always calls the triple
> openlog/syslog/closelog.

Updated patch: get rid of syslog_msg entirely. Request from Erik Andersen.

Bastian
2004-06-22 10:07:17 +00:00
Eric Andersen
78a5ddeff0 Robin Farine writes:
Package: BusyBox
Version: 1.0.0-pre10

Passing the -q <integer> option to inetd causes it to dereference an
invalid pointer (optarg). The attached patch provides a fix to this
problem.

Robin
2004-06-22 08:40:54 +00:00
Russ Dill
5c9323f4e6 use busybox sysinfo struct 2004-05-19 09:18:04 +00:00
Eric Andersen
28885c3f20 Fix a compile problem 2004-05-19 08:54:28 +00:00
Russ Dill
309c7b71e6 fix timewarp in client (server fix later) 2004-05-19 08:29:05 +00:00
Russ Dill
91e006c1ad remove uneccessary check (already done in pidfile.c) 2004-05-19 07:46:23 +00:00
Russ Dill
57f49d3185 fix memory leak caused by switch to vfork 2004-05-19 07:45:47 +00:00
Eric Andersen
6c8161d69f Steve Grubb writes:
Hello,

Last November a bug was found in iproute. CAN-2003-0856 has more information.
Basically, netlink packets can come from any user. If a program performs action
based on netlink packets, they must be examined to make sure they came from the
place they are expected (the kernel).

Attached is a patch against pre8. Please apply this before releasing 1.00 final.
All users of busy box may be vulnerable to local attacks without it.

Best Regards,
Steve Grubb
2004-05-05 07:05:32 +00:00
Glenn L McGrath
5ec58285c3 Fix size command, safe_strtoul gives and error if the \r is left in, the
RFC spec says the \r should be there.
This fix is the same as a recent wget fix
2004-05-04 10:43:34 +00:00
Eric Andersen
f71ad6c9e4 Thomas Koeller writes:
Hi,

    the following output is from BusyBox 1.0.0-pre10:

    ~ # ip link help
    ip: Command "help" is unknown, try "ip link help".

    tk

This patch fixes it by removing the advertisements for
the "ip blah help" stuff that is not implemented.
2004-04-26 19:32:49 +00:00
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