Commit Graph

218 Commits

Author SHA1 Message Date
Bernhard Reutner-Fischer
18260d5099 - typo: s/derefernce/dereference/g
Thanks to P.J. Day.
2006-04-18 14:17:49 +00:00
Bernhard Reutner-Fischer
d9cf7ac781 - patch from Denis Vlasenko to add and use bb_xchdir() 2006-04-12 18:39:58 +00:00
Bernhard Reutner-Fischer
a1bccc0ba8 - typos: s/compatability/compatibility/g;s/compatable/compatible/g; 2006-04-02 20:17:55 +00:00
Tim Riker
c1ef7bdd8d just whitespace 2006-01-25 00:08:53 +00:00
Rob Landley
c1d69906a0 Patch from Aurelien Jacobs to add unlzma. (A new decompression type,
see www.7-zip.org)
2006-01-20 18:28:50 +00:00
Rob Landley
e569553aa0 Bug 547: writing out the tar file header before we confirm we can actually
open and read from the file isn't something we can recover from after the
fact.  Resequence things to check first, write second.
2006-01-09 03:07:44 +00:00
Rob Landley
1a78103306 Bug 601: When we fork an archiver and feed stuff to it through a pipe, if
we don't close the pipe the child process won't exit, and we'll hang in
waitpid().
2005-12-16 21:33:10 +00:00
Bernhard Reutner-Fischer
126da9ec2d - typo: s/sucess/success/g
What's up with loginutils/su.c line 42: "SYSLOG_SUCESS" ? Please have a look..
2005-12-12 11:20:39 +00:00
"Vladimir N. Oleynik"
a62b0e7459 reduce 3 warning if compile with -W 2005-12-06 12:20:57 +00:00
Rob Landley
f3d6c94c7f Add --no-same-owner and --no-same-permissions options to tar. 2005-10-27 22:49:08 +00:00
Rob Landley
a4d45d423f The fact "tar tvjf thing.tbz" didn't work was due to the "-1" in -r11859,
which was apparently never tested.  That meant that there always had
to be at least one unparsed argument left over, which is not the case for
tar.
2005-10-16 08:42:18 +00:00
Rob Landley
60fe7bfa41 Whitespace and curly bracket cleanup (our tabstop is 4 in busybox),
and switch more stuff from CONFIG to ENABLE.
2005-10-16 03:54:49 +00:00
"Vladimir N. Oleynik"
84e7511607 llist must initialize, add loses ifdef, small indent correction 2005-10-15 06:32:38 +00:00
Rob Landley
3ee6c24ea2 Add --exclude option (to make uClibc-0.9.28 headers install using busybox tar).
I have no idea how to apply bb_getopt_complementally to a --longopt that
has no short option.  The documentation from vodz has a bad case of
babelfish poisoning, and I can't understand it.  It sort of seems to
suggest there is a way, but what it is I have no idea.  So I used \n as
the short option, which is fairly unlikely to be used for something else. :)
2005-10-15 03:06:21 +00:00
"Vladimir N. Oleynik"
f704b27b5b - new bb_opt_complementally syntax, use [-:?] only - 'free' chars
- new bb_getopt_ulflags features: check max and min args, convert first argv to options special for ar and tar applets
- use bb_default_error_retval for env applet
2005-10-14 09:56:52 +00:00
"Vladimir N. Oleynik"
f588869696 new featured bb_opt_complementally, correct argc checking 2005-10-12 08:17:29 +00:00
"Vladimir N. Oleynik"
064f04e7e2 - use complementally '!' to '?' - 'ask' is best 'free' char for this.
- more long opt compatibility, can set flag for long opt struct now
- more logic: check opt-depend requires and global requires, special for 'id' and 'start-stop-daemon' applets.
2005-10-11 14:38:01 +00:00
"Vladimir N. Oleynik"
39a841cecf change interface to bb_xasprintf() - more perfect for me.
ln.c: error_msg(str)->error_msg(%s, str) - remove standart "feature" for hackers
reduce 100 bytes don't care in sum
2005-09-29 16:18:57 +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"
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
92255d60b8 Fix for bug 383: attempting to "tar c /" would error out because stripping
trailing / turns that into an empty string.
2005-09-01 11:36:21 +00:00
Rob Landley
cc8885f6f3 Dirk Clemens pointed out how easy it is to support bzip2 compression, since we
shell out to an external program to handle gzip anyway...
2005-08-30 03:40:03 +00:00
Mike Frysinger
348e84c202 change the hardcoded error constant (0x80000000UL) to a nice flexible define (BB_GETOPT_ERROR) 2005-05-11 00:39:03 +00:00
Eric Andersen
52499cb9ae Tito writes:
Hi,
I've spent the half night staring at the devilish  my_getpwuid and my_getgrgid functions
trying to find out a way to avoid actual and future potential buffer overflow problems
without breaking existing code.
Finally I've  found a not intrusive way to do this that surely doesn't break existing code
and fixes a couple of problems too.
The attached patch:
1) changes the behaviour of my_getpwuid and my_getgrgid to avoid potetntial buffer overflows
2) fixes all occurences of this function calls in tar.c , id.c , ls.c, whoami.c, logger.c, libbb.h.
3) The behaviour of tar, ls and  logger is unchanged.
4) The behavior of ps with somewhat longer usernames messing up output is fixed.
5) The only bigger change was the increasing of size of the buffers in id.c to avoid
     false negatives (unknown user: xxxxxx) with usernames longer than 8 chars.
     The value i used ( 32 chars ) was taken from the tar header ( see gname and uname).
     Maybe this buffers can be reduced a bit  ( to 16 or whatever ), this is up to you.
6) The increase of size of the binary is not so dramatic:
     size busybox
       text    data     bss     dec     hex filename
     239568    2300   36816  278684   4409c busybox
    size busybox_fixed
       text    data     bss     dec     hex filename
     239616    2300   36816  278732   440cc busybox
7) The behaviour of whoami changed:
    actually it  prints out an username cut down to the size of the buffer.
    This could be fixed by increasing the size of the buffer as in id.c or
    avoid the use of my_getpwuid and use getpwuid directly instead.
    Maybe this colud be also remain unchanged......

Please apply if you think it is ok to do so.
The diff applies on today's cvs tarball (2004-08-25).
Thanks in advance,
Ciao,
Tito
2004-08-26 22:18:59 +00:00
Eric Andersen
4f807a84c5 BusyBox has no business hard coding the number of major and minor bits for a
dev_t.  This is especially important now that the user space concept of a dev_t
and the kernel concept of a dev_t are divergant.  The only bit of user space
allowed to know the number of major and minor bits is include/sys/sysmacros.h
(i.e. part of libc).  When used with a current C library and a 2.6.x kernel,
this fix should allow BusyBox to support wide device major/minor numbers.
 -Erik
2004-07-26 09:11:12 +00:00
Glenn L McGrath
a88ae491e3 Fixup -T (--files-from) option, works for non-directories now 2004-07-21 09:00:39 +00:00
Eric Andersen
aaff79a8dd Steve Grubb writes:
Hello,

I found and patched 2 more bugs. The first is a misplaced semi-colon. The second
one is a buffer overflow. I doubt the buffer overflow is triggered in real life.
But you never know what those wily hackers are up to.

Thanks,
Steve Grubb
2004-05-05 10:37: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
70060d25d2 s/fileno\(stdin\)/STDIN_FILENO/g
s/fileno\(stdout\)/STDOUT_FILENO/g
2004-03-27 10:02:48 +00:00
Eric Andersen
c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Glenn L McGrath
303e989a11 Add the -h, --dereference option for archive creation. 2004-01-25 05:48:28 +00:00
Glenn L McGrath
ce91c8ac2b Isolate code better for unused options, config option to enable long
options, add some conditions to the tar tests in testsuite.
2003-12-26 14:01:37 +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
e857122c97 Fix tar-handles-nested-exclude testcase 2003-11-20 10:47:06 +00:00
Glenn L McGrath
bebc40b406 Check at least one context is specified 2003-11-20 09:53:31 +00:00
Glenn L McGrath
ba49651de9 Check there are files to add the archive before removing a specified
tar file.
2003-11-20 09:06:10 +00:00
Glenn L McGrath
56f16b42c9 tar -Z, uncompress support 2003-11-18 21:37:52 +00:00
Glenn L McGrath
3b9fc8fe2a Make unlink old files default behaviour and add a new option -k to
prevent overwritting existing files
2003-11-18 20:23:04 +00:00
Glenn L McGrath
eba86e2adb Catch unsupported features 2003-11-14 12:53:42 +00:00
Glenn L McGrath
91b3d460c7 Fix -C option when creating tar files.
Need to chdir after the tar file is opened, so make common tar filename
parsing and send the file descriptor rather than filename to
writeTarFile.
Modify the verboseFlag operation to determine wether to display on
stderr or stdout at display time, simpler than doing it in tar_main.
2003-10-02 14:33:23 +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
e3393513c5 Be certain to not abort prematurely when reading stuff from pipes. 2003-07-05 23:10:27 +00:00
Eric Andersen
3c5a83c567 As noted by Thomas Eckert:
bb-tar "cjf" does not create a valid tbz2-archive -- if fact the result is a
    plain tar-file (no compression) -- but does not warn about the unrecognized
    parameter combination "cj" (bb does not have bzip2-compression yet, right?).

to fix this I have added an error message stating this does not work.

He also reported

    cosmetic: versose "-v" does not show any output when used with "create"

which I have now fixed as well.

 -Erik
2003-07-05 21:56:55 +00:00
Eric Andersen
a21f4e018a Glenn McGrath (bug1) isaway from my email till the 17th, but caught me on IRC.
He took a look into the recent reports of tar problems, and found an obvious
typo in last_patch91 from vodz which converted tar to use bb_getopt_ulflags.
2003-07-05 06:38:41 +00:00
Eric Andersen
27cb6846d7 last_patch91 from vodz to convert tar to use bb_getopt_ulflags 2003-06-26 09:07:59 +00:00
Matt Kraai
0861e828d0 Handle -O preceding -x. 2003-05-18 21:12:36 +00:00
Glenn L McGrath
e2aed7ffd7 Always preserve date 2003-04-26 13:16:44 +00:00
Glenn L McGrath
35a5b08eee unlink() an existing file, before opening it, simply truncating can
cause nasty problems if overwriting glibc, spotted by waldi.
2003-04-21 10:07:48 +00:00
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +00:00