Commit Graph

348 Commits

Author SHA1 Message Date
Eric Andersen
9cccc18141 don't mess up errno 2003-12-23 20:37:23 +00:00
Eric Andersen
0933a92f5a bother. It seems I can't read. 2003-12-20 10:23:28 +00:00
Eric Andersen
f295b5a408 doh! 2003-12-20 09:17:50 +00:00
Eric Andersen
a8d82fe52e Try to accomodate systems that do not define PAGE_SHIFT 2003-12-20 07:26:10 +00:00
Glenn L McGrath
f62ea20aff Use low level file descriptors to match bb_copyfd_eof 2003-12-20 04:38:01 +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
28c111e1c5 Allow escaped 8 bit characters in bb_opt_complementaly 2003-12-19 12:03:18 +00:00
Glenn L McGrath
850b05fbde Fix a bug preventing use of escaped characters that use the signed bit 2003-12-19 10:13:10 +00:00
Russ Dill
a1fece2c70 Get vfork_daemon_rexec working under uclinux 2003-12-15 21:57:44 +00:00
Glenn L McGrath
c3498f678a When a size of 0 is passed to copyfd_size, dont do anything, it was
reading untill eof which breaks tar
2003-11-24 23:50:07 +00:00
Glenn L McGrath
f0515dad66 Fix warning 2003-11-22 02:13:41 +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
Glenn L McGrath
78cd84da8a Dont over-read fd, use function pointer for hash function. 2003-11-20 21:30:58 +00:00
Glenn L McGrath
0413af0e27 Superficial changes 2003-11-20 06:27:33 +00:00
Glenn L McGrath
d2a897aab0 Merge common parts of sha1sum and md5sum, which is everything except the
algorithms.
Move algorithms to hash_fd and make them available via a common
function.
2003-11-10 04:33:55 +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
9ef6c93090 Patch from Arthur Othieno to fix a compiler warning 2003-10-22 10:26:38 +00:00
Eric Andersen
976a55e168 make this a little bit less messy 2003-10-22 10:23:04 +00:00
Glenn L McGrath
fe4704e948 Fix an ommision preventing building, patch by Tito. 2003-10-09 13:40:17 +00:00
Eric Andersen
dae099b2f9 We did not have a safe_write, which is the analog to safe_read. Convert
full_write to use safe_write internally, which is needed to guarantee proper
behavior, i.e. when writing to a pipe.
2003-10-09 08:35:42 +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
eebcc1d98a Add the "install" applet, move get_ug_id to libbb as its used by chown,
chgrp and install.
2003-09-24 03:22:57 +00:00
Glenn L McGrath
2570b43e82 Configuration option to define wether to follows GNU sed's behaviour
or the posix standard.
Put the cleanup code back the way it was.
2003-09-16 05:25:43 +00:00
Glenn L McGrath
96fd1b98f1 Compile get_terminal_width_height 2003-09-16 00:50:36 +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
99bd5adf99 more crond+crontab integrating with loginutil libbb functions and deleted
patch from Thomas Gleixner to init.
Viodz last_patch_108
2003-09-03 12:18:42 +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
005f83adf5 Fix compile error and reducing size for libbb/get_console.c to previous size.
Vodz last_patch106
2003-09-01 08:53:32 +00:00
Glenn L McGrath
502907f5b3 The default behaviour for run-parts is corrected to continue if an error
is encountered in a script.
Patch by Philip Blundell
2003-08-30 12:27:36 +00:00
Glenn L McGrath
72f5f02184 Remove some unwanted code, patch from Holger Schurig, confirmed by vodz 2003-08-29 16:19:03 +00:00
Glenn L McGrath
b54a748621 Fix for compiling with ipv6 2003-08-29 11:34:08 +00:00
Eric Andersen
97e2426582 "staywithu" writes:
In BusyBox v1.00-pre2,
 commands like ls, df with -h option report a wrong file size for files larger than 4GBtye!!

For example,
   when I execute 'ls -l', it reports
      -rw-r--r--      1 root       root    5368709120    Aug    17  2003  large_stream.tp

   when I execute 'ls -lh', I expect that
      -rw-r--r--      1 root       root                5.0G    Aug    17  2003  large_stream.tp

  but it reports
      -rw-r--r--      1 root       root                1.0G    Aug    17  2003  large_stream.tp

I fixed this bug that...
 Line 31 in libbb/human_readable.c and line 275 include/libbb.h

     const char *make_human_readable_str(unsigned long size
      =>   const char *make_human_readable_str(unsigned long long size

It's OK!
2003-08-22 23:08:37 +00:00
Manuel Novoa III
062913f662 Fix a bug reported by junkio@cox.net involving the mode_chars index. 2003-08-14 02:28:49 +00:00
Eric Andersen
9089844382 Latest dash update from vodz 2003-08-06 11:20:52 +00:00
Eric Andersen
481772a4c2 Patch from vodz to cleanup libbb/obscure.c:password_check()
to not copy too much data.
2003-08-06 08:33:08 +00:00
Eric Andersen
5378fbcb33 Joe.C writes:
I've reported this bug in April and it still
    exists in 1.00-pre2. So I made patches for
    both 0.60.x and 1.00-pre2.  The patch is very
    simple, just use strncmp instead of strcmp.
    Please apply if it is OK.

   Here's the procedure to test this problem:
   Create a executable with very long name, say
   'test_1234567890123456' and execute it. Try
   using 'killall' or 'pidof' to find/kill this
   program.  Without this patch, you can't find
   the program.
2003-08-06 08:22:10 +00:00
Manuel Novoa III
b1d5b741ac Save 0.5K. 2003-08-02 00:04:18 +00:00
Eric Andersen
3124a9ecee Vladimir N. Oleynik writes:
This moment have algoritmicaly problem, not overflow:
    strcat(wrapped, wrapped) - may be looped.

    Hand patch:

    - else if (strstr(strcat(wrapped, wrapped), newmono))
    + else {
    +    safe_strncpy(wrapped + lenwrap, wrapped, lenwrap + 1);
    +    if (strstr(wrapped, newmono))
    +}

    --w
    vodz
2003-07-30 07:57:06 +00:00
Eric Andersen
2a186890ee Bruno Randolf writes:
this patch fixes run_parts when it's called by ifupdown. 1) argv has to be a
NULL terminated char* array, not just a string. 2) run_parts now explicitly
sets the environment. this environment is populated from the
/etc/network/interfaces config file and is needed by the scripts in
/etc/network/if-pre-up.d/. when run-parts is called from the command line the
environment is taken from the current process.


Vladimir Oleynik then wrote:

You can simplify this if use:

+       bb_xasprintf(&buf[0], "/etc/network/if-%s.d", opt);
+       buf[1] = NULL;
+
+       run_parts(&buf, 2, environ);
+       free(buf[0]);

--w
vodz
2003-07-29 07:05:40 +00:00
Eric Andersen
35e643b39f last_patch95 from vodz:
Hi.

Last patch have new libbb function
vfork_rexec() for can use daemon() to uClinux system.
This patched daemons: syslog, klogd, inetd, crond.
This not tested! I havn`t this systems.
Also. Previous patch for feature request MD5 crypt password for
httpd don`t sended to this mailist on 07/15/03
(mailist have Pytom module problem?).
The previous patch included, and have testing.


--w
vodz
2003-07-28 07:40:39 +00:00
Eric Andersen
f96675bc50 James Petterson writes:
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:
2003-07-28 06:37:04 +00:00
Eric Andersen
85e5e72bc1 Remove remaining libc5 support code 2003-07-22 08:56:55 +00:00
Eric Andersen
cb81e6484d Update a bunch of docs. Run a script to update my email addr. 2003-07-14 21:21:08 +00:00
Eric Andersen
9f894f4062 Fixup compile problem with dmalloc 2003-07-05 22:15:43 +00:00
Eric Andersen
9e48045e45 Patch from Russell Coker:
I've attached my latest SE Linux patch for busybox against the latest CVS
    version of busybox.
2003-07-03 10:07:04 +00:00
Eric Andersen
a5c488449e Using safe_read seems, well, safer... 2003-07-03 09:48:07 +00:00
Eric Andersen
a3bb3e6e0b Geir Thomassen wrote, regarding networking/httpd.c line 1358
Hello, I think the test for an unconfigured httpd is wrong in
    the CVS (busybox-unstable-20030620.tar.bz2)

    flg_deny_all is default 0

vodz then wrote:

    Oops. You are right.
    Also, this mistake haved from two place.
    Last patch rewroted to my new get_ularg() function for overcompensate size
    from this error found ;-)
2003-06-26 09:05:32 +00:00
Eric Andersen
dd92c77bb0 Don't shadow a paramater 2003-06-20 09:25:34 +00:00
Eric Andersen
8876fb2f59 last_patch89 from vodz:
Manuel,

    I rewrite bb_getopt_ulflags() function for more universal usage.
    My version support now:
    - options with arguments (optional arg as GNU extension also)
    - complementaly and/or incomplementaly and/or incongruously and/or list
    options
    - long_opt (all applets may have long option, add supporting is trivial)
    This realisation full compatibile from your version.
    Code size grow 480 bytes, but only coreutils/* over compensate this size
    after using new function. Last patch reduced over 800 bytes and not full
    applied to all. "mkdir" and "mv" applets have long_opt now for demonstrate
    trivial addition support long_opt with usage new bb_getopt_ulflags().
    Complementaly and/or incomplementaly and/or incongruously and/or list options
    logic is not trivial, but new "cut" and "grep" applets using this logic
    for examples with full demostrating. New "grep" applet reduced over 300
    bytes.

    Mark,
    Also. I removed bug from "grep" applet.
    $ echo a b | busybox grep -e a b
    a b
    a b
    But right is printing one only.

    --w
    vodz
2003-06-20 09:01:58 +00:00