Bug 489842 - lsattr and chattr exit with 0 even if the file does not exist
Summary: lsattr and chattr exit with 0 even if the file does not exist
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: e2fsprogs
Version: 5.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Eric Sandeen
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-12 08:31 UTC by Milos Malik
Modified: 2011-07-21 12:35 UTC (History)
3 users (show)

Fixed In Version: e2fsprogs-1.39-27.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-21 12:35:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1080 0 normal SHIPPED_LIVE e2fsprogs bug fix and enhancement update 2011-07-21 09:04:54 UTC

Description Milos Malik 2009-03-12 08:31:03 UTC
Description of problem:
If somebody runs lsattr or chattr on non-existent file, the exit code is always zero.

Version-Release number of selected component (if applicable):
e2fsprogs-1.39-20.el5

How reproducible:
always

Steps to Reproduce:
# ls output.txt
ls: output.txt: No such file or directory
# echo $?
2
# lsattr output.txt
lsattr: No such file or directory while trying to stat output.txt
# echo $?
0
# chattr +d output.txt
chattr: No such file or directory while trying to stat output.txt
# echo $?
0

Actual results:
both utilities exit with zero code

Expected results:
both utilities exit with non-zero code

Additional info:

Comment 1 Milos Malik 2009-03-12 08:34:52 UTC
The e2fsprogs-1.35-12.17.el4 package in RHEL-4.7 is also affected.

Comment 2 Eric Sandeen 2009-03-17 20:37:15 UTC
this problem exists upstream as well.

Comment 4 Eric Sandeen 2009-06-24 20:11:14 UTC
Sorry this didn't make it for 5.4; setting 5.5 ?

the patches are all upstream now.

Thanks,
-Eric

Comment 6 RHEL Program Management 2009-11-06 19:24:24 UTC
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".

Comment 8 RHEL Program Management 2010-08-09 19:44:52 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 9 Eric Sandeen 2011-01-28 00:08:00 UTC
Built & tagged in e2fsprogs-1.39-27.el5

Comment 13 errata-xmlrpc 2011-07-21 12:35:51 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1080.html


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