Finish back port of new ldap features