Bug 607687 - Archive::Tar->extract_archive() does not return proper exit code
Summary: Archive::Tar->extract_archive() does not return proper exit code
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: perl
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Martin Cermak
URL: https://rt.cpan.org/Public/Bug/Displa...
Whiteboard:
Depends On: 226239
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-24 15:01 UTC by Petr Pisar
Modified: 2010-07-14 23:06 UTC (History)
12 users (show)

Fixed In Version: perl-5.10.1-114.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of: 606813
Environment:
Last Closed: 2010-07-14 23:06:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Petr Pisar 2010-06-24 15:01:03 UTC
+++ 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 15:31:17 UTC
F12, F13, F14 affected.

Comment 2 Petr Pisar 2010-07-08 12:34:50 UTC
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 11:30:23 UTC
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 11:33:13 UTC
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 07:28:06 UTC
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 07:32:54 UTC
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 17:00:51 UTC
F14 fixed by upgrading perl-Archive-Tar to 1.62-1.fc14.

Comment 9 Fedora Update System 2010-07-14 23:06:06 UTC
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.