RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 665050 - getfattr does not return failure when designated attribute does not exist
Summary: getfattr does not return failure when designated attribute does not exist
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: attr
Version: 6.0
Hardware: Unspecified
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Kamil Dudka
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On: 660619
Blocks: 759077
TreeView+ depends on / blocked
 
Reported: 2010-12-22 14:54 UTC by Kamil Dudka
Modified: 2011-12-01 11:34 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Prior to this update, the getfattr utility did not return a non-zero exit code if an attribute specified in the "getfattr" command did not exist. This unintended behavior has been fixed in this update so that getfattr now returns a non-zero exit code.
Clone Of: 660619
: 759077 (view as bug list)
Environment:
Last Closed: 2011-09-07 13:07:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1272 0 normal SHIPPED_LIVE attr bug fix update 2011-09-07 13:07:08 UTC

Description Kamil Dudka 2010-12-22 14:54:30 UTC
+++ This bug was initially created as a clone of Bug #660619 +++

Description of problem:

When using getfattr in a shell script, a failure is expected when the designated attribute was not set.

Version-Release number of selected component (if applicable):

Fedora 14, attr-2.4.44-5, libattr-2.4.44-5

How reproducible:

Always

Steps to Reproduce:
1. Assume file has no user extended attribute set
2. type "if getfattr -h -e hex -n user.color file; then echo success; else echo failure; fi"
3. 
  
Actual results:

We get :
file: user.color: No such attribute
success

Expected results:

We should get :
file: user.color: No such attribute
failure

Additional info:

The manual is silent about the return codes

--- Additional comment from kdudka on 2010-12-07 18:39:58 CET ---

Created attachment 465275 [details]
proposed fix

--- Additional comment from jean-pierre.andre on 2010-12-07 21:42:45 CET ---

Behaves as expected with fix applied. Thanks.

--- Additional comment from kdudka on 2010-12-22 15:49:03 CET ---

fixed in attr-2.4.44-6.fc15

Comment 1 Kamil Dudka 2010-12-22 16:51:19 UTC
proposed upstream:

http://lists.gnu.org/archive/html/acl-devel/2010-12/msg00004.html

Comment 2 RHEL Program Management 2011-01-07 15:32:34 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. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 5 Kamil Dudka 2011-06-27 14:12:55 UTC
upstream commit:

http://git.savannah.gnu.org/cgit/attr.git/commit/?id=93c92ed

Comment 7 Petr Kovar 2011-06-29 11:12:47 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Prior to this update, the getfattr utility did not return a non-zero exit code if an attribute specified in the "getfattr" command did not exist. This unintended behavior has been fixed in this update so that getfattr now returns a non-zero exit code.

Comment 14 errata-xmlrpc 2011-09-07 13:07:33 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-1272.html


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