Bug 487607 - yppasswd doesn't support SHA-2 password hashes
yppasswd doesn't support SHA-2 password hashes
Product: Fedora
Classification: Fedora
Component: yp-tools (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Vitezslav Crhonek
Fedora Extras Quality Assurance
Depends On:
Blocks: fedora-sha2-pkgs
  Show dependency treegraph
Reported: 2009-02-26 17:36 EST by Miloslav Trmač
Modified: 2009-03-04 08:03 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-03-04 08:03:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Miloslav Trmač 2009-02-26 17:36:28 EST
Version-Release number of selected component (if applicable):

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 07:28:56 EST
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 07:38:06 EST
The patch looks fine to me.

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