Red Hat Bugzilla – Full Text Bug Listing
|Summary:||getfattr does not return failure when designated attribute does not exist|
|Product:||Red Hat Enterprise Linux 6||Reporter:||Kamil Dudka <kdudka>|
|Component:||attr||Assignee:||Kamil Dudka <kdudka>|
|Status:||CLOSED ERRATA||QA Contact:||qe-baseos-daemons|
|Version:||6.0||CC:||azelinka, jean-pierre.andre, jscotka, kdudka, ovasik, pkovar|
|Fixed In Version:||Doc Type:||Bug Fix|
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.
|:||759077 (view as bug list)||Environment:|
|Last Closed:||2011-09-07 09:07:33 EDT||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:||660619|
Description Kamil Dudka 2010-12-22 09:54:30 EST
+++ 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 11:51:19 EST
proposed upstream: http://lists.gnu.org/archive/html/acl-devel/2010-12/msg00004.html
Comment 2 RHEL Product and Program Management 2011-01-07 10:32:34 EST
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 10:12:55 EDT
upstream commit: http://git.savannah.gnu.org/cgit/attr.git/commit/?id=93c92ed
Comment 7 Petr Kovar 2011-06-29 07:12:47 EDT
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 09:07:33 EDT
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