aboutsummaryrefslogtreecommitdiff
path: root/archival/tar.c
AgeCommit message (Collapse)Author
2006-11-24tar: small fixes:Denis Vlasenko
* size-optimize mapping code * kill double close
2006-11-24tar: cache [ug]id->username/groupname mappings. Cuts down amountDenis Vlasenko
of open/read/close of /etc/passwd and /etc/group dramatically (we were rereading those for each untarred file!!!)
2006-11-24tar: cry murder and bail out if file shrinks under us while we tar it upDenis Vlasenko
2006-11-24header_verbose_list: stop truncating file size in listingDenis Vlasenko
2006-11-24tar:Denis Vlasenko
* unpack: handle tar header fields which are not NUL terminated * pack: handle 4+GB files correctly * pack: refuse to store 101+ softlinks (was truncating link target name) * pack: mask mode with 07777
2006-10-27recursive_action: add depth paramDenis Vlasenko
chmod: match coreutils versus following links
2006-10-20message string changes, mostly for consistency, also -32 bytes in .rodataDenis Vlasenko
2006-10-14add open_read_close() and similar stuffDenis Vlasenko
2006-10-12bb_get_[chomped]line_from_file wasn't descriptive enough.Denis Vlasenko
Renaming...
2006-10-12small style fixesDenis Vlasenko
2006-10-08correct largefile support, add comments about it.Denis Vlasenko
2006-10-08attempt to regularize atoi mess.Denis Vlasenko
2006-10-03getopt_ulflags -> getopt32.Denis Vlasenko
It is impossible to formulate sane ABI based on size of ulong because it can be 32-bit or 64-bit. Basically it means that you cannot portably use more that 32 option chars in one call anyway... Make it explicit.
2006-09-23bb_askpass: shorten static password buffer. 256 is way too large.Denis Vlasenko
simplify code a bit.
2006-09-10Cleanup headers and replace the zero padding with an even smaller version.Rob Landley
One of the pads turned out to be unnecessary: sizeof(struct TarHeader) is TAR_BLOCK_SIZE, the padding's in the struct. The others could be done inline with bb_common_bufsiz1. This is a cleanup I did to Denis' patch long ago, but got sidetracked by what turned into svn 15660.
2006-09-09tar: fix "xopen with O_CREAT" warning, improve zero padding writeDenis Vlasenko
(was doing zillions of 1-byte write syscalls)
2006-09-03tar: revert older fix (non-portable), added new one.Denis Vlasenko
testsuite tar-extracts-all-subdirs now passes.
2006-08-29Svn 16007 broke the build under gcc 4.0.3. This fixes up some of the damageRob Landley
(the e2fsprogs directory is too twisty and evil to easily fix, but I plan to rewrite it anyway so I'll just bump that up in priority a bit).
2006-08-03These should have been part of 15767 too.Rob Landley
2006-07-16Cleaup read() and write() variants, plus a couple of new functions likeRob Landley
xlseek and fdlength() for the new mkswap.
2006-06-25A few patches from Erik Hovland, turning strncpy() into safe_strncpy() andRob Landley
removing some unnecessary code.
2006-05-26Change llist_add_* to take the address of the list rather than returning the newRob Landley
head, and change all the callers.
2006-04-18- typo: s/derefernce/dereference/gBernhard Reutner-Fischer
Thanks to P.J. Day.
2006-04-12- patch from Denis Vlasenko to add and use bb_xchdir()Bernhard Reutner-Fischer
2006-04-02- typos: s/compatability/compatibility/g;s/compatable/compatible/g;Bernhard Reutner-Fischer
2006-01-25just whitespaceTim Riker
2006-01-20Patch from Aurelien Jacobs to add unlzma. (A new decompression type,Rob Landley
see www.7-zip.org)
2006-01-09Bug 547: writing out the tar file header before we confirm we can actuallyRob Landley
open and read from the file isn't something we can recover from after the fact. Resequence things to check first, write second.
2005-12-16Bug 601: When we fork an archiver and feed stuff to it through a pipe, ifRob Landley
we don't close the pipe the child process won't exit, and we'll hang in waitpid().
2005-12-12- typo: s/sucess/success/gBernhard Reutner-Fischer
What's up with loginutils/su.c line 42: "SYSLOG_SUCESS" ? Please have a look..
2005-12-06reduce 3 warning if compile with -W"Vladimir N. Oleynik"
2005-10-27Add --no-same-owner and --no-same-permissions options to tar.Rob Landley
2005-10-16The fact "tar tvjf thing.tbz" didn't work was due to the "-1" in -r11859,Rob Landley
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-16Whitespace and curly bracket cleanup (our tabstop is 4 in busybox),Rob Landley
and switch more stuff from CONFIG to ENABLE.
2005-10-15llist must initialize, add loses ifdef, small indent correction"Vladimir N. Oleynik"
2005-10-15Add --exclude option (to make uClibc-0.9.28 headers install using busybox tar).Rob Landley
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-14- new bb_opt_complementally syntax, use [-:?] only - 'free' chars"Vladimir N. Oleynik"
- 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-12new featured bb_opt_complementally, correct argc checking"Vladimir N. Oleynik"
2005-10-11- use complementally '!' to '?' - 'ask' is best 'free' char for this."Vladimir N. Oleynik"
- 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-09-29change interface to bb_xasprintf() - more perfect for me."Vladimir N. Oleynik"
ln.c: error_msg(str)->error_msg(%s, str) - remove standart "feature" for hackers reduce 100 bytes don't care in sum
2005-09-20- rename libbb's password helpers as suggested in libbb.hBernhard Reutner-Fischer
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-051) bb_opt_complementaly -> bb_opt_complementally"Vladimir N. Oleynik"
2) better support long options 3) new flag '!' for bb_opt_complementally: produce bb_show_usage() if BB_GETOPT_ERROR internally
2005-09-01Fix for bug 383: attempting to "tar c /" would error out because strippingRob Landley
trailing / turns that into an empty string.
2005-08-30Dirk Clemens pointed out how easy it is to support bzip2 compression, since weRob Landley
shell out to an external program to handle gzip anyway...
2005-05-11change the hardcoded error constant (0x80000000UL) to a nice flexible define ↵Mike Frysinger
(BB_GETOPT_ERROR)
2004-08-26Tito writes:Eric Andersen
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-07-26BusyBox has no business hard coding the number of major and minor bits for aEric Andersen
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-21Fixup -T (--files-from) option, works for non-directories nowGlenn L McGrath
2004-05-05Steve Grubb writes:Eric Andersen
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-04-25Update my email address, document some of my tasks in the AUTHORS fileGlenn L McGrath