Commit 85fc1af7 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

disallow more root dse operations

parent 6c6b4d28
......@@ -93,6 +93,13 @@ do_compare(
goto cleanup;
}
if( ndn == '\0' ) {
Debug( LDAP_DEBUG_ANY, "do_compare: root dse!\n", 0, 0, 0 );
send_ldap_result( conn, op, rc = LDAP_UNWILLING_TO_PERFORM,
NULL, "compare upon the root DSE not supported", NULL, NULL );
goto cleanup;
}
/*
* We could be serving multiple database backends. Select the
* appropriate one, or send a referral to our "referral server"
......
......@@ -145,6 +145,13 @@ do_modify(
goto cleanup;
}
if( ndn == '\0' ) {
Debug( LDAP_DEBUG_ANY, "do_modify: root dse!\n", 0, 0, 0 );
send_ldap_result( conn, op, rc = LDAP_UNWILLING_TO_PERFORM,
NULL, "modify upon the root DSE not supported", NULL, NULL );
goto cleanup;
}
#ifdef LDAP_DEBUG
Debug( LDAP_DEBUG_ARGS, "modifications:\n", 0, 0, 0 );
for ( tmp = modlist; tmp != NULL; tmp = tmp->ml_next ) {
......
......@@ -150,6 +150,13 @@ do_modrdn(
goto cleanup;
}
if( ndn == '\0' ) {
Debug( LDAP_DEBUG_ANY, "do_modrdn: root dse!\n", 0, 0, 0 );
send_ldap_result( conn, op, rc = LDAP_UNWILLING_TO_PERFORM,
NULL, "cannot rename the root DSE", NULL, NULL );
goto cleanup;
}
Statslog( LDAP_DEBUG_STATS, "conn=%ld op=%d MODRDN dn=\"%s\"\n",
op->o_connid, op->o_opid, dn, 0, 0 );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment