aboutsummaryrefslogtreecommitdiff
path: root/tar.c
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-06-20 20:47:31 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-06-20 20:47:31 +0000
commit58b48c1204cb794429ac35e36436ee09ea341a02 (patch)
tree0037911818b382882261c44a8de57c08d1cfb17b /tar.c
parentef81d84c026b0255071ef347fa2676267b029dee (diff)
downloadbusybox-w32-58b48c1204cb794429ac35e36436ee09ea341a02.tar.gz
busybox-w32-58b48c1204cb794429ac35e36436ee09ea341a02.tar.bz2
busybox-w32-58b48c1204cb794429ac35e36436ee09ea341a02.zip
it turs out, there was a nasty tar bug where bb tar would create leading dirs
with mode 0777 in all cases due to usask issues. Thanks to Matt Kraai for noticing and spotting the culprit. This makes bb tar behave just like GNU tar once again. -Erik git-svn-id: svn://busybox.net/trunk/busybox@2866 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'tar.c')
-rw-r--r--tar.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/tar.c b/tar.c
index 0cb638a7f..bca5a0906 100644
--- a/tar.c
+++ b/tar.c
@@ -576,10 +576,6 @@ static int readTarFile(int tarFd, int extractFlag, int listFlag,
576 TarHeader rawHeader; 576 TarHeader rawHeader;
577 TarInfo header; 577 TarInfo header;
578 578
579 /* Set the umask for this process so it doesn't
580 * screw up permission setting for us later. */
581 umask(0);
582
583 /* Read the tar file, and iterate over it one file at a time */ 579 /* Read the tar file, and iterate over it one file at a time */
584 while ( (status = full_read(tarFd, (char*)&rawHeader, TAR_BLOCK_SIZE)) == TAR_BLOCK_SIZE ) { 580 while ( (status = full_read(tarFd, (char*)&rawHeader, TAR_BLOCK_SIZE)) == TAR_BLOCK_SIZE ) {
585 581
@@ -1109,10 +1105,6 @@ static int writeTarFile(const char* tarName, int verboseFlag, char **argv,
1109 if (fstat(tbInfo.tarFd, &tbInfo.statBuf) < 0) 1105 if (fstat(tbInfo.tarFd, &tbInfo.statBuf) < 0)
1110 error_msg_and_die(io_error, tarName, strerror(errno)); 1106 error_msg_and_die(io_error, tarName, strerror(errno));
1111 1107
1112 /* Set the umask for this process so it doesn't
1113 * screw up permission setting for us later. */
1114 umask(0);
1115
1116 /* Read the directory/files and iterate over them one at a time */ 1108 /* Read the directory/files and iterate over them one at a time */
1117 while (*argv != NULL) { 1109 while (*argv != NULL) {
1118 if (recursive_action(*argv++, TRUE, FALSE, FALSE, 1110 if (recursive_action(*argv++, TRUE, FALSE, FALSE,