added a workaround to the handling of unicodePwd for Win7-beta
authorAndrew Tridgell <tridge@samba.org>
Tue, 10 Feb 2009 06:31:57 +0000 (17:31 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 10 Feb 2009 06:31:57 +0000 (17:31 +1100)
commitfe5b0b595c926aea0916541ceeaf610bc018cb63
tree85d2952921fbc8852cc70da083eb649b50bde4f7
parent72c2da9d327288552084efad831ef8c3518de835
added a workaround to the handling of unicodePwd for Win7-beta

The Win7-beta domain process has changed. It no longer uses SAMR for
setting the password, and instead uses a ldap modify on a SASL
encrypted ldap connection. We didn't handle that as the unicodePwd
attribute has a dual use, holding the nt style MD4 hases for DRS
replication, but holding a UTF-16 plaintext password for a LDAP
modify.

This patch copes with the ldap unicodePwd modify by recognising the
format and creating the correct attributes on the fly. Note that this
assumes we will never get a unicodePwd attribute set in NT MD4 format
with the first 2 and last 2 bytes set to 0x22 0x00.

Andrew Bartlett is looking at a more robust solution, possibly using a
flag to say that this modify came via ldap, and not internal ldb
calls.
source4/dsdb/samdb/ldb_modules/password_hash.c