Bug 487607

Summary: yppasswd doesn't support SHA-2 password hashes
Product: [Fedora] Fedora Reporter: Miloslav Trmač <mitr>
Component: yp-toolsAssignee: Vitezslav Crhonek <vcrhonek>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: vcrhonek
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-03-04 13:03:05 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:
Bug Depends On:    
Bug Blocks: 485249    
Attachments:
Description Flags
Proposed patch (should be applyed in current yp-tools devel) none

Description Miloslav Trmač 2009-02-26 22:36:28 UTC
Version-Release number of selected component (if applicable):
yptools-2.9-4

Upstream yppasswd only creates DES-hashed passwords, yppasswd in Fedora creates a md5 password if the original used md5.  Please extend this to support SHA-2 passwords, per http://people.redhat.com/drepper/SHA-crypt.txt .  (The             "passwdlen = 13 + strspn(pwd->pw_passwd + 13, ...)" truncation will also have to be modified, because the salt in SHA-2 can have 16 characters, and be preceded with $5$rounds=999999999$.)

Comment 1 Vitezslav Crhonek 2009-03-04 12:28:56 UTC
Created attachment 333991 [details]
Proposed patch (should be applyed in current yp-tools devel)

Proposed patch, slightly tested and worked fine. Please let me know if you find mistake or something is not complete.

Comment 2 Miloslav Trmač 2009-03-04 12:38:06 UTC
The patch looks fine to me.