+ switch( deref ) {
+ case LDAP_DEREF_NEVER:
+ case LDAP_DEREF_FINDING:
+ case LDAP_DEREF_SEARCHING:
+ case LDAP_DEREF_ALWAYS:
+ break;
+ default:
+ send_ldap_result( conn, op, LDAP_PROTOCOL_ERROR,
+ NULL, "invalid deref", NULL, NULL );
+ rc = -1;
+ goto return_results;
+ }
+
+ if( dn_normalize_case( base ) == NULL ) {
+ send_ldap_result( conn, op, LDAP_INVALID_DN_SYNTAX,
+ NULL, "invalid DN", NULL, NULL );
+ rc = -1;
+ goto return_results;
+ }