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
This commit is contained in:
Eric Andersen 2001-06-20 20:47:31 +00:00
parent 06a71cced2
commit aff5e2eaef
2 changed files with 0 additions and 16 deletions

View File

@ -576,10 +576,6 @@ static int readTarFile(int tarFd, int extractFlag, int listFlag,
TarHeader rawHeader; TarHeader rawHeader;
TarInfo header; TarInfo header;
/* Set the umask for this process so it doesn't
* screw up permission setting for us later. */
umask(0);
/* Read the tar file, and iterate over it one file at a time */ /* Read the tar file, and iterate over it one file at a time */
while ( (status = full_read(tarFd, (char*)&rawHeader, TAR_BLOCK_SIZE)) == TAR_BLOCK_SIZE ) { while ( (status = full_read(tarFd, (char*)&rawHeader, TAR_BLOCK_SIZE)) == TAR_BLOCK_SIZE ) {
@ -1109,10 +1105,6 @@ static int writeTarFile(const char* tarName, int verboseFlag, char **argv,
if (fstat(tbInfo.tarFd, &tbInfo.statBuf) < 0) if (fstat(tbInfo.tarFd, &tbInfo.statBuf) < 0)
error_msg_and_die(io_error, tarName, strerror(errno)); error_msg_and_die(io_error, tarName, strerror(errno));
/* Set the umask for this process so it doesn't
* screw up permission setting for us later. */
umask(0);
/* Read the directory/files and iterate over them one at a time */ /* Read the directory/files and iterate over them one at a time */
while (*argv != NULL) { while (*argv != NULL) {
if (recursive_action(*argv++, TRUE, FALSE, FALSE, if (recursive_action(*argv++, TRUE, FALSE, FALSE,

8
tar.c
View File

@ -576,10 +576,6 @@ static int readTarFile(int tarFd, int extractFlag, int listFlag,
TarHeader rawHeader; TarHeader rawHeader;
TarInfo header; TarInfo header;
/* Set the umask for this process so it doesn't
* screw up permission setting for us later. */
umask(0);
/* Read the tar file, and iterate over it one file at a time */ /* Read the tar file, and iterate over it one file at a time */
while ( (status = full_read(tarFd, (char*)&rawHeader, TAR_BLOCK_SIZE)) == TAR_BLOCK_SIZE ) { while ( (status = full_read(tarFd, (char*)&rawHeader, TAR_BLOCK_SIZE)) == TAR_BLOCK_SIZE ) {
@ -1109,10 +1105,6 @@ static int writeTarFile(const char* tarName, int verboseFlag, char **argv,
if (fstat(tbInfo.tarFd, &tbInfo.statBuf) < 0) if (fstat(tbInfo.tarFd, &tbInfo.statBuf) < 0)
error_msg_and_die(io_error, tarName, strerror(errno)); error_msg_and_die(io_error, tarName, strerror(errno));
/* Set the umask for this process so it doesn't
* screw up permission setting for us later. */
umask(0);
/* Read the directory/files and iterate over them one at a time */ /* Read the directory/files and iterate over them one at a time */
while (*argv != NULL) { while (*argv != NULL) {
if (recursive_action(*argv++, TRUE, FALSE, FALSE, if (recursive_action(*argv++, TRUE, FALSE, FALSE,