Commit Graph

376 Commits

Author SHA1 Message Date
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
Glenn L McGrath
24833430bc Vodz, last_patch_88 2003-06-10 17:22:49 +00:00
Eric Andersen
d130973f34 Put this back the way it was. I misunderstood what vodz was doing. 2003-05-27 20:45:59 +00:00
Eric Andersen
82ab3d7c3e Make all syscall declarations use the syscall() function 2003-05-26 18:48:56 +00:00
Eric Andersen
b0cfca7544 This was doing some silly stuff that is not necessary when using
vfork(), so I have simplified it.
2003-05-26 18:12:00 +00:00
Eric Andersen
fab3e12cec Skip printing "/proc/%d/cmdline" stuff when it is not relevant 2003-05-26 18:07:30 +00:00
Eric Andersen
64191c3896 Remove cruft 2003-05-26 18:06:20 +00:00
Glenn L McGrath
393183dccc Vodz, last_patch_86 2003-05-26 14:07:50 +00:00
Glenn L McGrath
74fcbb0f7d Fix \l so it doesnt print the character as well as the tty, from old
patch by Nick Fedchik
2003-05-13 13:28:25 +00:00
Eric Andersen
7b3edeb14d Patch from Dmitry V. Levin to fix a fd leak 2003-05-02 16:25:01 +00:00
Glenn L McGrath
923dd79af7 sync with waldi 2003-04-21 10:26:39 +00:00
Eric Andersen
4a11e0fb45 Patch from David Updegraff to use calloc so that forward pointers start out
NULL, and so it can handle format strings that have stuff _after_ the last %?
specification
2003-04-19 23:18:35 +00:00
Eric Andersen
343658582b Minor .o file naming change 2003-04-16 23:02:35 +00:00
Manuel Novoa III
ea4c43445c Restrict octal perms to <= 07777. Cosmetic error message change. 2003-03-19 18:09:03 +00:00
Manuel Novoa III
1cb1b64c35 Obligatory forgotten item. 2003-03-19 09:42:33 +00:00
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +00:00
Eric Andersen
6067c08145 With nightmares of libbb ending up with 100 .c files starting
with "bb_" it seems best to rename this now and avoid starting
an evil KDE style naming trend.
2003-03-07 17:43:32 +00:00
Eric Andersen
a9c6bc41e9 Define bb_xgetlarg as a standard interface for extracting
numbers from getopt which includes careful error checking.
 -Erik
2003-03-07 17:29:12 +00:00
Eric Andersen
a0ac4523b1 Write all the help text for the util-linux utilities. Allow
people to locate the mtab file somewhere other that /etc to
accomodate read only root filesystems.
 -Erik
2003-02-27 03:14:04 +00:00
Glenn L McGrath
883d4842d2 Fix compiler warnings, patch by Steven Scholz 2003-02-09 22:40:34 +00:00
Glenn L McGrath
6af21c2afa Login prompt function, part of waldi's telnetd from inetd patch 2003-01-21 20:59:34 +00:00
Glenn L McGrath
9e5d6c002c run telnet from inetd, present login prompt if login is configured,
patch from Bastian Blank
2003-01-21 20:55:56 +00:00
Glenn L McGrath
2e51a14d57 New test mode that allows run_parts to fail silently if the directory
is not found. Patch from Bastian Blank
2003-01-20 23:50:59 +00:00
Glenn L McGrath
aad465efb7 Make test mode output same as official version 2003-01-20 23:34:12 +00:00
Eric Andersen
ab4e19afc6 Eliminate most instances where we use linux kernel headers
-Erik
2003-01-14 08:54:08 +00:00
Glenn L McGrath
b4a1baa312 Correct some init issues, update email address, last_patch78 by Vladimir
N. Oleynik
2003-01-13 22:09:50 +00:00
Tim Riker
cf93274663 rmmod -a removed modules recursively 2002-12-14 01:58:59 +00:00
Glenn L McGrath
25fe94fd32 Merge copyfd and copy_file_chunk 2002-12-13 08:20:44 +00:00
Glenn L McGrath
66125c8065 Move add_to_list from libunarchive to libbb so it can be of more general use (eg ifupdown). Changed the name to llist_add_to as i plan on adding more llist_ functions as needed (e.g. llist_free). 2002-12-08 00:54:33 +00:00
Glenn L McGrath
346cdb1dde Re-sort filenames to alphebetical order. 2002-12-07 23:56:14 +00:00
Glenn L McGrath
4a6b4e393c Commit to reverse my previous commit, isnt cvs supposed to have some undo command ? 2002-12-07 23:30:11 +00:00
Glenn L McGrath
4e05b9b043 include "busybox" after the libc includes tofix compile errors 2002-12-07 23:14:40 +00:00
Eric Andersen
deca106b6d Kill CONFIG_FEATURE_USE_DEVPS_PATCH and the devps patch. I'm not
maintaining it anymore, and it is now terribly out of date.
 -Erik
2002-12-05 07:24:08 +00:00
Glenn L McGrath
bf91f2eb1b Save 10 bytes or so, last_patch_70 from Vladimir N. Oleynik 2002-12-03 20:34:36 +00:00
Glenn L McGrath
09adaca37d last_patch_69, 8 bit clean and other fixes from Vladimir N. Oleynik 2002-12-02 21:18:10 +00:00
Glenn L McGrath
b963875a3e Move compare_string_array to libbb 2002-12-02 00:01:36 +00:00
Glenn L McGrath
68d949956a Use error_msg instead of fprintf(stderr 2002-11-28 10:35:40 +00:00
Glenn L McGrath
b2e28a0e35 Use error_msg instead of fprintf(stderr 2002-11-28 10:27:50 +00:00
Glenn L McGrath
b122217d90 Use error_msg( instead of fprintf(stderr 2002-11-28 10:25:19 +00:00
Glenn L McGrath
642f28903a Use error_msg instead of fprintf(stderr, other minor cleanups 2002-11-28 10:20:45 +00:00
Glenn L McGrath
30db423e11 Style, minor cleanups 2002-11-28 09:52:23 +00:00
Glenn L McGrath
8ae4cab4a8 use #ifdef CONFIG_* instead of #if CONFIG_* 2002-11-26 09:02:06 +00:00
Glenn L McGrath
d7fb1b372c Use #ifdef instead of #if 2002-11-26 02:40:56 +00:00
Glenn L McGrath
393ad1a834 Handle name entries that have a \0 in them, last_patch_65 from Vladimir N. Oleynik 2002-11-25 22:31:37 +00:00
Glenn L McGrath
5b110874df Dont need a seperate function 2002-11-24 23:22:29 +00:00
Glenn L McGrath
822e7fd587 When making parent directories set permissions based on the base parent tree rather than the new directory to be created. 2002-11-24 22:48:20 +00:00
Glenn L McGrath
7b1eca265a include libbb after stdlib.h as it breaks dmalloc 2002-11-24 01:32:56 +00:00
Glenn L McGrath
157fea5960 Fix a vfork bug, by Nick Fedchik and Vladimir N. Oleynik 2002-11-21 22:17:11 +00:00
Glenn L McGrath
39289b54a7 Use vfork, by vodz 2002-11-15 22:18:01 +00:00
Glenn L McGrath
545106f8db Move awk from textutils to editors. Cleanup run-parts, saves 200 bytes, moves the guts of run_parts to libbb to be used by ifupdown. 2002-11-11 06:21:00 +00:00
Glenn L McGrath
237ae42fc9 Abstract read and seek in unarchiving code, convert bunzip to file descriptors, support tar -j 2002-11-03 14:05:15 +00:00
Eric Andersen
44608e9693 Patch last_pach62 from vodz. This patch moves all the /proc parsing
code into libbb so it can be shared by ps, top, etc, saving over 1.5k.
2002-10-22 12:21:15 +00:00
Glenn L McGrath
9ffd5776eb Move unzip.c uncompress.c from libbb to archiveal/libunarchive 2002-10-22 01:07:32 +00:00
Glenn L McGrath
0d53ebdc52 gz_open is used anymore, use inflate directly, see how its done in get_header_tar_gz 2002-10-21 06:29:55 +00:00
Glenn L McGrath
4298e87fa5 Dont try and make the "/" directory 2002-10-19 23:56:41 +00:00
Eric Andersen
71ae64bdc6 last_patch61 from vodz:
New complex patch for decrease size devel version. Requires previous patch.
    Also removed small problems from dutmp and tar applets.
Also includes vodz' last_patch61_2:
    Last patch correcting comment for #endif and more integrated
    with libbb (very reduce size if used "cat" applet also).
    Requires last_patch61 for modutils/config.in.
2002-10-10 04:20:21 +00:00
Eric Andersen
02e6ba91e8 Vodz' last_patch57:
Hi, Erik.

    my_getpw(uid/gid) and applets used it have problem:
    if username for uid not found, applets can`t detect it
    (but code pessent). Also "%8ld " format is bad:
    spaces not required (applets have self format
    or spec format (tar applet) and overflow for "id" applet...)
    This problem also pressent in stable version.
    Patch for unstable in attach.

    --w
    vodz
2002-09-30 20:39:56 +00:00
Glenn L McGrath
891ee641cb Fail straight away rather than recursively printing error messages :) 2002-09-28 08:30:47 +00:00
Glenn L McGrath
2e41d0cb77 Fix compress support and prevent a segfault 2002-09-27 06:46:02 +00:00
Glenn L McGrath
7ca04f328e New common unarchive code. 2002-09-25 02:47:48 +00:00
Glenn L McGrath
b3f7261ffe Fix error messages conditions, and make them the same as GNU mkdir. 2002-09-22 02:12:30 +00:00
Eric Andersen
a9a220b92a last_patch56 from vodz to simplify copy_file logic 2002-09-17 08:42:21 +00:00
Eric Andersen
7365c58783 Use "MiB" not "Mb"
-Erik
2002-09-17 06:36:56 +00:00
Eric Andersen
02b8dfc524 Let people force overwrite links
-Erik
2002-09-16 10:23:38 +00:00
Eric Andersen
403a73a351 Properly honor FILEUTILS_INTERACTIVE and FILEUTILS_FORCE for
file all file types (not just regular files and dirs).  Unlink
destination files when needed.
 -Erik
2002-09-16 09:23:22 +00:00
Eric Andersen
8fede28c74 Patch from Matthias Lang <matthias@corelatus.se> to fix gunzip
error handling and prevent gunzip from hanging.
2002-09-16 07:25:41 +00:00
Eric Andersen
c38678d14b Apply vodz' last_patch52 2002-09-16 06:22:25 +00:00
Manuel Novoa III
4d0884a1ea Apply vodz's last_patch53.gz (bb_asprintf.c) and last_patch54.gz
(arith.c).
2002-09-12 14:52:26 +00:00
Glenn L McGrath
193697db4e Dont return an error if the directory already existed 2002-08-24 20:11:38 +00:00
Glenn L McGrath
210aa14916 Fix warning 2002-08-24 20:00:52 +00:00
Glenn L McGrath
fbef225c4b Rewrite, its smaller 2002-08-23 17:19:26 +00:00
Glenn L McGrath
de9e803149 Apply vodz last_patch51_2 and run through indent 2002-08-23 12:04:23 +00:00
Glenn L McGrath
1ed9dd9d06 Remove duplicate definitions, run through indent 2002-08-22 19:35:36 +00:00