Commit Graph

2656 Commits

Author SHA1 Message Date
Eric Andersen
2276d83639 Fixup warnings and undefined operations that show up in gcc-3.1
-Erik
2002-07-11 11:11:56 +00:00
Eric Andersen
cafc103230 Brad Campbell <brad@seme.com.au> notes that
xconnect.c needs #include <netinet/in.h>
to compile if CONFIG_FEATURE_IPV6 is not defined
2002-07-11 10:40:43 +00:00
Eric Andersen
1785ddcae2 Some minor bits of scrubbing 2002-07-08 01:40:02 +00:00
Eric Andersen
8e139871fe Patch from Stewart Brodie <stewart.brodie@pace.co.uk> to fix ash:
When alias support is not configured, ash believes that command parameters
that look like dd's "if=/dev/zero" are requests to set a temporary
environment variable whilst dd is running, even though it appears after the
command name.  This is caused by the re-use of the checkalias global variable
to indicate when both alias checking and environment variable checking.  The
failure to reset this flag is due to the reset action being performed only
inside the feature check CHECK_ASH_ALIAS.  Hence ash works as expected when
aliases are configured in, and fails when not.

Example script using 'date' with different settings of TZ:

# TZ=Europe/London
# export TZ
# date
Thu May 30 17:18:49 BST 2002
# TZ=America/New_York date
Thu May 30 12:19:10 EDT 2002
# date
Thu May 30 17:19:12 BST 2002
# date TZ=America/New_York
Thu May 30 12:19:30 EDT 2002    <----- wrong, should be BST time (or error!)
# date
Thu May 30 17:19:35 BST 2002

Attached is a patch against revision 1.52 of ash.c which moves the checks so
that checkalias is updated regardless of whether CONFIG_ASH_ALIAS is set.
With this patch applied, the command shown above which should generate an
error does generate an error.

I have tested this patch with the 'dd' command too and that now works
correctly.
2002-07-04 00:19:46 +00:00
Eric Andersen
0826b6b0b3 This is last_patch48 from vodz. More cleanups, kills a bit
of dead code, fixes one blatent bug.
2002-07-03 23:50:16 +00:00
Eric Andersen
887ca79f04 Scrub pwd.h and grp.h handling so we don't have to play any
silly games.
 -Erik
2002-07-03 23:19:26 +00:00
Eric Andersen
360e254954 tito <farmatito@tiscali.it> noticed that delgroup was actually
setting CONFIG_DELUSER.  Oops.
2002-07-03 19:50:23 +00:00
Eric Andersen
0b31586c71 A patch from Bart Visscher <magick@linux-fan.com> to add an
xconnect helper routine which does:
        -address and port resolving
	-tries to connect to all resolved addresses until connected
	-uses getaddrinfo, so works for IPv6 too
This patch also ports rdate, telnet, and wget to use the new
xconnect function.  Thanks Bart!
2002-07-03 11:51:44 +00:00
Eric Andersen
51b8bd68bb This patch from Bart Visscher <magick@linux-fan.com> adds
IPV6 support to busybox.  This patch does the following:
    * Add IPv6 support to libbb
    * Enable IPv6 interface address display
    * Add IPv6 config option
    * Adds ping6, an adaptation of the ping applet for IPv6
    * Adds support routines for ping6:
	- xgethostbyname2
	- create_icmp6_socket
    * Adds ifconfig support for IPv6
    * Add support IPv6 to netstat
    * Add IPv6 support to route
Thanks Bart!
2002-07-03 11:46:38 +00:00
Eric Andersen
599e3ce163 Apply last_patch47 from vodz to fix several problems, such as the ash "job
control turned off" bug, console_setup() was called with a closed file
descriptor, setsid() inconsistancy, and silly string handling bugs.   I have
modified his patch to allow the askfirst init actions to have a controlling
terminal.
2002-07-03 11:08:10 +00:00
Eric Andersen
935daf2d0d hide shadow using stuff when CONFIG_FEATURE_SHADOWPASSWDS
is not set
 -Erik
2002-07-03 09:13:21 +00:00
Eric Andersen
7f90ed4460 Patch from Martin Volf <volf@dragon.cz> to fix where I had
screwed up the usage messages
2002-07-03 05:55:14 +00:00
Eric Andersen
796446718d Fix from vodz so that complex init commands actually work 2002-07-03 05:44:18 +00:00
Eric Andersen
8c4025e708 Patch from Danny Lepage <danny.lepage@cognicase.com> to fix
dutmp for uClibc.
2002-07-03 05:32:02 +00:00
Eric Andersen
5222d31a15 Patch from till busch <buti@gmx.at> -- unblock all signals
in exec_signal() before calling exec()
2002-07-03 05:15:23 +00:00
Eric Andersen
549df2ebc3 Fix text alignment, thanks to Sander Klein <s.klein@quicknet.nl> 2002-07-03 04:54:52 +00:00
Eric Andersen
7234c3a0b6 Cleanup shadow.h stuff so it behaves as intended
-Erik
2002-07-03 04:47:43 +00:00
Eric Andersen
009ae1f17d Little fix to avoid overflow 2002-07-03 04:24:08 +00:00
Eric Andersen
abc9568690 Silly spelling fix
-Erik
2002-07-03 02:52:35 +00:00
Eric Andersen
b493dec91e David Frascone <dave@frascone.com> noticed two problems. First, modprobe was
trying to call 'insmod -q', which wasn't supported.  Secondly, when modprobe
was fed blank lines from modules.dep, we ended up calling xstrndup(ptr, -1),
which with suitably bad results.  David provided a patch to catch the blank
lines, and I have added insmod -q support.  So modprobe should work again.
 -Erik
2002-07-02 19:14:23 +00:00
Aaron Lehmann
69d4178708 Remove advertising clauses in accordance with
ftp://ftp.cs.berkeley.edu/ucb/4bsd/README.Impt.License.Change
2002-06-23 22:25:24 +00:00
Aaron Lehmann
9031481ac3 inline many functions that are only called once. saves about 300 bytes
on i386. also staticify most functions.
2002-06-23 22:13:22 +00:00
Aaron Lehmann
ed11993900 Needs shadow.h; otherwise wont compile without CONFIG_USE_BB_SHADOW 2002-06-23 22:00:41 +00:00
Aaron Lehmann
8c26fbe537 remove cleanUpAndFail, and replace it with exit(). because that's what
it does unless srcMode was set, and srcMode is never set.
2002-06-23 21:56:13 +00:00
Eric Andersen
5b0f9e417e Rework optimization code. Be more compiler aware.
-Erik
2002-06-23 04:50:49 +00:00
Eric Andersen
27f64e1f4e Port over the last of the tinylogin applets
-Erik
2002-06-23 04:24:25 +00:00
Eric Andersen
0fbff134f4 Several login cleanups from vodz 2002-06-22 17:49:29 +00:00
Eric Andersen
b0c39a8a8d Apply vodz' last_patch44 -- cleanup several chars to be const, fix
rotten error handling, kill spare \n's, etc
2002-06-22 17:32:58 +00:00
Eric Andersen
3ece93ba0f Kill dead email address
-Erik
2002-06-22 17:23:45 +00:00
Eric Andersen
8b1aa4d749 Apply last_patch46 from vodz, to fix buffer overflows noted by
Gerardo Puga, and to optimize for size a little bit.  Thanks vodz
2002-06-22 17:20:50 +00:00
Eric Andersen
61f83059c1 Apply vodz' cleanup for insmod buffer overflows, which was cleaner
than my first effort.
2002-06-22 17:15:42 +00:00
Aaron Lehmann
9f92d5f2a2 Major revamp. I've been trying to clean up the code. the bzerror stuff
still needs major attention (i.e. removal).

Removed references to uninitialized variables like progName,
smallMode, noisy, etc. Remove functions and code for handling "small"
decompression mode, since it is all unreachable. Remove
total_{in,out}* counters - they are never used. Remove panic()
function and assert_h and their uses because they are all for "should
never happen" circumstances. Replace internal malloc/free wrappers
with xmalloc and free. Remove conditional in if(foo)free(foo);
situations. Remove bogus
	if (sizeof(int) != 4) {
		return BZ_CONFIG_ERROR;
	}
(...etc...) code and code for handling BZ_CONFIG_ERROR. Someone should
go through and change the applet to use well-defined types when
appropriate - it expects sizeof(short)==2 && sizeof(int)==4. Until
this commit these were explicitly checked for, and the applet would
exit if these types were not the right size. (I think this is wrong
even as an interim solution.)

With gcc 3.1 reduces size of binary on i386-linux by about 700 bytes.

Lightly tested.
2002-06-22 06:35:29 +00:00
Eric Andersen
2d34215456 As noted by Yves Lavoie ing. <yves.lavoie.ing@sympatico.ca>, don't
lose the last letter of the module name.
2002-06-18 05:16:25 +00:00
Eric Andersen
b0fd2b06a3 Fix a potential macro expansion problem... isspace can be
a macro causing a double decrement...
2002-06-15 14:37:46 +00:00
Eric Andersen
a7d0b41c08 Don't use pointless GNU-isms 2002-06-15 14:33:06 +00:00
Robert Griebl
47abc49c4a Patch from Simon Krahnke:
I wrote a patch for busybox for our company's (www.lisa.de)
private use. [...] To sed it adds the '!'-inversion of addresses.
2002-06-11 23:43:27 +00:00
Matt Kraai
3ad88ccf2d * testsuite/sed/sed-recurses-properly: Mark XFAIL. 2002-06-11 13:29:08 +00:00
Matt Kraai
9ef2ea27d4 * libbb/copy_file.c (copy_file): Check st_dev instead of st_rdev. 2002-06-11 13:25:26 +00:00
Eric Andersen
360060252a vodz' last_patch42_2, which is an updated fix for buffer overflows
noted by Gerardo Puga
2002-06-08 12:44:17 +00:00
Robert Griebl
0c789a4255 If config file can not be parsed, use compiled in BB_SUID_... values as a
fallback method
2002-06-06 17:30:16 +00:00
Eric Andersen
fe1ef2bc62 Fix buffer overflows noted by Gerardo Puga
-Erik
2002-06-06 14:36:07 +00:00
Eric Andersen
6fb4e4877a Fix buffer overflows noted by Gerardo Puga
-Erik
2002-06-06 14:24:57 +00:00
Eric Andersen
0d2d1eb599 Fix a buffer overflow found by Gerardo Puga <gpuga@gioia.ing.unlp.edu.ar>
-Erik
2002-06-06 13:33:01 +00:00
Eric Andersen
8610f91ebf Lets give this a try... 2002-06-06 13:00:47 +00:00
Eric Andersen
27d3766e0d Email addr fix 2002-06-06 12:59:13 +00:00
Eric Andersen
ad79c0b629 Patch from Gyepi SAM <gyepi@praxis-sw.com>:
Fixed up domain removal for local domains. GNU traceroute does not do this. I
don't know why we do.  Fixed incorrect argument for reverse resolution.  Clean
up cruft that appears when CONFIG_FEATURE_TRACEROUTE_VERBOSE is defined
2002-06-06 12:24:51 +00:00
Eric Andersen
77d22c4abd Patch from Gyepi SAM <gyepi@praxis-sw.com>:
When DEBUG is defined
    1. need to include resolv.h (for _resinit())
    2. remove _() call around string. It appears to be a remnant of i18n or some such notion
2002-06-06 12:11:55 +00:00
Eric Andersen
1a92376f00 Patch from vodz to only setenv PATH when PATH changes, which is much
smarter than my quick fix.
2002-06-06 12:07:28 +00:00
Eric Andersen
e90e741b1e Per discussion with vodz, Tim's changes do not seem to make sense.
Revert them.
 -Erik
2002-06-06 11:47:00 +00:00
Eric Andersen
fc059090b6 last_patch41 from vodz to fix stty -F and similar 2002-06-06 11:35:29 +00:00