Bug 578534

Summary: passwd exit status 1
Product: Red Hat Enterprise Linux 5 Reporter: Simon <simon>
Component: passwdAssignee: Tomas Mraz <tmraz>
Status: CLOSED ERRATA QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.6CC: fnadge, ksrot, ofourdan, sgrubb, tao
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: passwd-0.73-2 Doc Type: Bug Fix
Doc Text:
Previously, passwd -S was not able to display the correct password types for the new password hashes. It also returned nonzero exit values even when the password status was displayed successfully. With this update, the correct password type is shown in the output.
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-11 09:14:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Proposed patch none

Description Simon 2010-03-31 14:57:58 UTC
Description of problem:
passwd exits with status 1 when argument -S is passed.

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

How reproducible:
allways

Steps to Reproduce:
1. passwd -S user
2. echo $?

  
Actual results:
1

Expected results:
0

Comment 1 Tomas Mraz 2010-03-31 15:22:15 UTC
Please report the problem through the regular support channels so the fix can be properly prioritized for inclusion in future Red Hat Enterprise Linux update releases.

Please refer to this bug number in the report.

Thank you.

Comment 3 Olivier Fourdan 2010-05-04 09:16:16 UTC
Created attachment 411227 [details]
Proposed patch

Comment 6 Tomas Mraz 2010-08-03 09:52:51 UTC
I'll also display correct hash type for SHA-256 and SHA-512 password hash types in the passwd -S output.

Comment 7 Tomas Mraz 2010-08-03 10:22:58 UTC
The exit value is now correct and for SHA-256 (beginning with $5$) and SHA-512 ($6$) password hashes in /etc/shadow it will display correct password hash type in the status output.

Comment 9 Florian Nadge 2010-08-04 13:00:43 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:
passwd -S was not able to display the correct password types for the new password hashes. It also returned nonzero exit values even when the password status was displayed successfully. With this update, the correct password type is shown in the output.

Comment 10 Florian Nadge 2010-08-04 13:01:05 UTC
Technical note updated. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.

Diffed Contents:
@@ -1 +1 @@
-passwd -S was not able to display the correct password types for the new password hashes. It also returned nonzero exit values even when the password status was displayed successfully. With this update, the correct password type is shown in the output.+Previously, passwd -S was not able to display the correct password types for the new password hashes. It also returned nonzero exit values even when the password status was displayed successfully. With this update, the correct password type is shown in the output.

Comment 13 errata-xmlrpc 2010-08-11 09:14:02 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-2010-0620.html