Bug 487607 - yppasswd doesn't support SHA-2 password hashes
Summary: yppasswd doesn't support SHA-2 password hashes
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: yp-tools
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Vitezslav Crhonek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: fedora-sha2-pkgs
TreeView+ depends on / blocked
 
Reported: 2009-02-26 22:36 UTC by Miloslav Trmač
Modified: 2009-03-04 13:03 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-03-04 13:03:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Proposed patch (should be applyed in current yp-tools devel) (4.56 KB, patch)
2009-03-04 12:28 UTC, Vitezslav Crhonek
no flags Details | Diff

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.


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