puppetlabs/puppet — pull request #308 by glarizza (2012-01-06 19:51:56+00:00)
Title: Bug/2.7.x/11293

Puppet did not have the ability to get/set passwords in OS X version
10.7. This commit implements this behavior. Users in 10.7 have a
binary plist file in /var/db/dslocal/nodes/Default/users that contains
a 'ShadowHashData' key. The value for this key is actually a binary
encrypted plist which contains a 'SALTED-SHA512' key containing
a base64 encoded string. This string is actually the salted-SHA512
password hash with a 4 byte salt prepending the hash. Puppet expects
this 4 byte salt + salted-SHA512 password hash in order to set the
user's password. Since this value is drastically different from
previous versions of OS X, Puppet will fail if you try and pass
a SHA1 password hash that was used in previous versions of OS X.

Spec tests were added to ensure that Puppet fails with an incorrect
password, and that the get/set behavior works properly with OS X
version 10.7.