forked from 28e21e3 @ https://bitbucket.org/psagers/mockldap