Merged in mavricknz/ldap