#include <ac/string.h>
#include <ac/time.h>
+#include "ldap_pvt.h"
#include "slap.h"
static void modlist_free(LDAPModList *ml);
ndn = ch_strdup( dn );
- if( dn_normalize_case( ndn ) == NULL ) {
+ if( dn_normalize( ndn ) == NULL ) {
Debug( LDAP_DEBUG_ANY, "do_modify: invalid dn (%s)\n", dn, 0, 0 );
send_ldap_result( conn, op, rc = LDAP_INVALID_DN_SYNTAX, NULL,
"invalid DN", NULL, NULL );
goto cleanup;
}
+ /* make sure this backend recongizes critical controls */
+ rc = backend_check_controls( be, conn, op ) ;
+
+ if( rc != LDAP_SUCCESS ) {
+ send_ldap_result( conn, op, rc,
+ NULL, NULL, NULL, NULL );
+ }
+
if ( global_readonly || be->be_readonly ) {
Debug( LDAP_DEBUG_ANY, "do_modify: database is read-only\n",
0, 0, 0 );
cleanup:
free( dn );
free( ndn );
- if ( modtail != NULL && *modtail != NULL )
- free( *modtail );
if ( modlist != NULL )
modlist_free( modlist );
return rc;
currenttime = slap_get_time();
ldap_pvt_thread_mutex_lock( &gmtime_mutex );
-#ifndef LDAP_LOCALTIME
ltm = gmtime( ¤ttime );
strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm );
-#else
- ltm = localtime( ¤ttime );
- strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
-#endif
ldap_pvt_thread_mutex_unlock( &gmtime_mutex );
bv.bv_val = buf;
for ( ; ml != NULL; ml = next ) {
next = ml->ml_next;
- free( ml->ml_type );
+ if (ml->ml_type)
+ free( ml->ml_type );
+
if ( ml->ml_bvalues != NULL )
ber_bvecfree( ml->ml_bvalues );