if( e->e_ndn == NULL || *e->e_ndn == '\0' ) {
/* protocolError may be a more appropriate error */
send_ldap_result( conn, op, rc = LDAP_ALREADY_EXISTS,
- NULL, "root DSE exists", NULL, NULL );
+ NULL, "root DSE already exists",
+ NULL, NULL );
goto done;
+
+#if defined( SLAPD_SCHEMA_DN )
+ } else if ( strcasecmp( ndn, SLAPD_SCHEMA_DN ) == 0 ) {
+ /* protocolError may be a more appropriate error */
+ send_ldap_result( conn, op, rc = LDAP_ALREADY_EXISTS,
+ NULL, "subschema subentry already exists",
+ NULL, NULL );
+ goto done;
+#endif
}
- manageDSAit = get_manageDSAit( op ) &&
- is_entry_referral( e );
+ manageDSAit = get_manageDSAit( op );
/*
* We could be serving multiple database backends. Select the
#endif
{
int update = be->be_update_ndn != NULL;
+ char textbuf[SLAP_TEXT_BUFLEN];
+ size_t textlen = sizeof textbuf;
+
+ rc = slap_modlist2mods( modlist, update, &mods, &text,
+ textbuf, textlen );
- rc = slap_modlist2mods( modlist, update, &mods, &text );
if( rc != LDAP_SUCCESS ) {
send_ldap_result( conn, op, rc,
NULL, text, NULL, NULL );