HomePhorge

Wrap ShadowHashData setting into its own method
cb682bd27cbeUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Wrap ShadowHashData setting into its own method

Previously, the act of setting the ShadowHashData key in the
user's plist was performed in the set_salted_sha512() and
set_salted_pbkdf2() methods. This commit wraps that behavior
into its own method for uniformity.

There was also a condition where a user account that has an
old-style password hash (10.6 or earlier) could exist on a
10.7 or 10.8 machine that had been upgraded. If this user
hadn't logged-in to the machine, then their password hash
would continue to be stored on-disk (versus being stored
in the ShadowHashData key of the user's plist). Previously,
the code made the assumption that if the machine had an
operating system version of 10.7 or 10.8, then the
ShadowHashData key would exist in the user's plist. This
was a false assumption, based on the edge case I described
previously. This commit adds the check for the ShadowHashData
key in the set_shadow_hash_data method and will adapt accordingly.

Details

Provenance
Gary Larizza <gary@puppetlabs.com>Authored on
Jeff McCune <jeff@puppetlabs.com>Committed on Dec 5 2012, 12:49 AM
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUb708a415dd7c: Optimize calls for operating system version
Branches
Unknown
Tags
Unknown

Event Timeline

Jeff McCune <jeff@puppetlabs.com> committed rPUcb682bd27cbe: Wrap ShadowHashData setting into its own method (authored by Gary Larizza <gary@puppetlabs.com>).Dec 5 2012, 12:49 AM