aboutsummaryrefslogtreecommitdiff
path: root/archival/tar.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* change the hardcoded error constant (0x80000000UL) to a nice flexible define ↵Mike Frysinger2005-05-111-1/+1
| | | | (BB_GETOPT_ERROR)
* Tito writes:Eric Andersen2004-08-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* BusyBox has no business hard coding the number of major and minor bits for aEric Andersen2004-07-261-9/+5
| | | | | | | | | 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
* Fixup -T (--files-from) option, works for non-directories nowGlenn L McGrath2004-07-211-3/+6
|
* Steve Grubb writes:Eric Andersen2004-05-051-2/+2
| | | | | | | | | | | 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
* Update my email address, document some of my tasks in the AUTHORS fileGlenn L McGrath2004-04-251-1/+1
|
* Larry Doolittle writes:Eric Andersen2004-04-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | 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
* s/fileno\(stdin\)/STDIN_FILENO/gEric Andersen2004-03-271-2/+2
| | | | s/fileno\(stdout\)/STDOUT_FILENO/g
* Remove trailing whitespace. Update copyright to include 2004.Eric Andersen2004-03-151-11/+11
|
* Add the -h, --dereference option for archive creation.Glenn L McGrath2004-01-251-5/+8
|
* Isolate code better for unused options, config option to enable longGlenn L McGrath2003-12-261-54/+128
| | | | options, add some conditions to the tar tests in testsuite.
* As we no longer use function pointers for read in common archiving codeGlenn L McGrath2003-11-211-14/+3
| | | | | | | 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.
* Fix tar-handles-nested-exclude testcaseGlenn L McGrath2003-11-201-0/+5
|
* Check at least one context is specifiedGlenn L McGrath2003-11-201-0/+3
|
* Check there are files to add the archive before removing a specifiedGlenn L McGrath2003-11-201-5/+4
| | | | tar file.
* tar -Z, uncompress supportGlenn L McGrath2003-11-181-1/+28
|
* Make unlink old files default behaviour and add a new option -k toGlenn L McGrath2003-11-181-19/+23
| | | | prevent overwritting existing files
* Catch unsupported featuresGlenn L McGrath2003-11-141-7/+15
|
* Fix -C option when creating tar files.Glenn L McGrath2003-10-021-30/+37
| | | | | | | | 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.
* Update a bunch of docs. Run a script to update my email addr.Eric Andersen2003-07-141-2/+1
|
* Be certain to not abort prematurely when reading stuff from pipes.Eric Andersen2003-07-051-1/+1
|
* As noted by Thomas Eckert:Eric Andersen2003-07-051-2/+9
| | | | | | | | | | | | | | | | 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
* Glenn McGrath (bug1) isaway from my email till the 17th, but caught me on IRC.Eric Andersen2003-07-051-1/+1
| | | | | 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.
* last_patch91 from vodz to convert tar to use bb_getopt_ulflagsEric Andersen2003-06-261-60/+56
|
* Handle -O preceding -x.Matt Kraai2003-05-181-1/+3
|
* Always preserve dateGlenn L McGrath2003-04-261-2/+1
|
* unlink() an existing file, before opening it, simply truncating canGlenn L McGrath2003-04-211-1/+2
| | | | cause nasty problems if overwriting glibc, spotted by waldi.
* Major coreutils update.Manuel Novoa III2003-03-191-28/+27
|
* Move add_to_list from libunarchive to libbb so it can be of more general use ↵Glenn L McGrath2002-12-081-3/+3
| | | | (eg ifupdown). Changed the name to llist_add_to as i plan on adding more llist_ functions as needed (e.g. llist_free).
* Check that one and only one of the [cxt] options is givenGlenn L McGrath2002-11-271-6/+14
|
* Use vfork instead of fork, some more cleanup from Vladimir N. OleynikGlenn L McGrath2002-11-251-31/+31
|
* Remove #defines around get_header_ptr, we allways need it.Glenn L McGrath2002-11-161-2/+0
|
* Dont chdir untill after we open the archiveGlenn L McGrath2002-11-151-4/+5
|
* Minor cleanupsGlenn L McGrath2002-11-131-14/+2
|
* Fix reading from stdin (me), Fix tar segfault when no arguments specified ↵Glenn L McGrath2002-11-081-5/+5
| | | | (Geoffrey Lee)
* Fail silently if a partial tar header is read as tar.bz2 is leaving trailing ↵Glenn L McGrath2002-11-051-2/+1
| | | | junk (not sure why), add some missing files
* Abstract read and seek in unarchiving code, convert bunzip to file ↵Glenn L McGrath2002-11-031-10/+11
| | | | descriptors, support tar -j
* A bugfix from Danny Lepage:Eric Andersen2002-10-261-1/+1
| | | | | | | It seems that under busybox unstable, "tar -c -f - blabla" create a tar file named "-" instead of writing to stdout. The included patch should fix this.
* Fix exclude/include problemGlenn L McGrath2002-10-191-18/+15
|
* Remove entries from the accept list as they are matched so we can determine ↵Glenn L McGrath2002-10-191-0/+6
| | | | if any files that were specified in the list wernt found.
* Dont use absolute pathname (dunno why i did that), fix tar filename/stdin ↵Glenn L McGrath2002-10-191-16/+25
| | | | problems
* Put bac kthe code that handles cases where a '-' wasnt specified prior to ↵Glenn L McGrath2002-10-181-0/+8
| | | | the options.
* last_patch61 from vodz:Eric Andersen2002-10-101-6/+6
| | | | | | | | | 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.
* Fix segfault when testing if reaidng from stdin "-"Glenn L McGrath2002-10-061-1/+3
|
* Vodz' last_patch57:Eric Andersen2002-09-301-5/+3
| | | | | | | | | | | | | | | 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
* Fix for using '-' as the filename when reading from stdinGlenn L McGrath2002-09-281-9/+7
|
* New common unarchive code.Glenn L McGrath2002-09-251-136/+107
|
* Run through indent, use /* */ style comments, change extern to staticGlenn L McGrath2002-08-221-286/+260
|
* Tar inlining, #if 0 out unused functionAaron Lehmann2002-08-211-5/+7
|
* Added tar -cz support (creating gzipped tar files without a gzip pipe)Robert Griebl2002-07-231-25/+94
|