LDAP: fix wrong return value