Bug 607687 - Archive::Tar->extract_archive() does not return proper exit code
Archive::Tar->extract_archive() does not return proper exit code
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: perl (Show other bugs)
12
All Linux
low Severity medium
: ---
: ---
Assigned To: Petr Pisar
Martin Cermak
https://rt.cpan.org/Public/Bug/Displa...
:
Depends On: 226239
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-24 11:01 EDT by Petr Pisar
Modified: 2010-07-14 19:06 EDT (History)
12 users (show)

See Also:
Fixed In Version: perl-5.10.1-114.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 606813
Environment:
Last Closed: 2010-07-14 19:06:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Pisar 2010-06-24 11:01:03 EDT
+++ This bug was initially created as a clone of Bug #606813 +++

Description of problem:

   The perl-Archive-Tar's Archive::Tar->extract_archive() returns true 
   even if its operation fails: If I do something like this:

#!/usr/bin/perl
use Archive::Tar;
local $Archive::Tar::DEBUG = 0;
local $Archive::Tar::INSECURE_EXTRACT_MODE  =  0;
exit 1 if (!Archive::Tar->extract_archive('some-unexisting-file.tar', 0)); 

   then the script exits with status 1, which is right, because 
   some-unexisting-file.tar does not exist. But when I do something like 

#!/usr/bin/perl
use Archive::Tar;
local $Archive::Tar::DEBUG = 0;
local $Archive::Tar::INSECURE_EXTRACT_MODE  =  0;
exit 1 if (!Archive::Tar->extract_archive('rep-sym-abspath.tar', 0));

   where 

$ tar tvf rep-sym-abspath.tar
lrwxrwxrwx 0/0		     0 2007-09-12 10:59 dir -> /tmp
-rw------- 0/0		     4 2007-09-12 10:59 dir/bar

   then I got error message "...not allowed under SECURE EXTRACT MODE..."
   which is right (see [1] for more info) but the script ends up with 
   zero exit code. Which is IMHO bad. 

--------

Proposed solution: https://bugzilla.redhat.com/attachment.cgi?id=426194
Upstream report: https://rt.cpan.org/Public/Bug/Display.html?id=58636
Comment 1 Petr Pisar 2010-06-24 11:31:17 EDT
F12, F13, F14 affected.
Comment 2 Petr Pisar 2010-07-08 08:34:50 EDT
F12 and F13 will get new perl packge revision with bundled Archive-Tar-1.62, F14 will be covered by separate perl-Archive-Tar-1.62 package (devel branch CVS request in bug #226239).
Comment 3 Fedora Update System 2010-07-09 07:30:23 EDT
perl-5.10.0-90.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/perl-5.10.0-90.fc12
Comment 4 Fedora Update System 2010-07-09 07:33:13 EDT
perl-5.10.1-114.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/perl-5.10.1-114.fc13
Comment 5 Fedora Update System 2010-07-13 03:28:06 EDT
perl-5.10.0-90.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update perl'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/perl-5.10.0-90.fc12
Comment 6 Fedora Update System 2010-07-13 03:32:54 EDT
perl-5.10.1-114.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update perl'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/perl-5.10.1-114.fc13
Comment 8 Petr Pisar 2010-07-13 13:00:51 EDT
F14 fixed by upgrading perl-Archive-Tar to 1.62-1.fc14.
Comment 9 Fedora Update System 2010-07-14 19:06:06 EDT
perl-5.10.1-114.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.