From: Kurt Zeilenga Date: Fri, 8 Sep 2000 16:59:15 +0000 (+0000) Subject: disallow more root dse operations X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2067 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=85fc1af7553ffbebe70b01fb391e630d6a647c58;p=openldap disallow more root dse operations --- diff --git a/servers/slapd/compare.c b/servers/slapd/compare.c index 4caa3be6c1..cb291b073d 100644 --- a/servers/slapd/compare.c +++ b/servers/slapd/compare.c @@ -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" diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index a21ad0b2a6..faa0973246 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -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 ) { diff --git a/servers/slapd/modrdn.c b/servers/slapd/modrdn.c index e5acfd1f83..84808e97d9 100644 --- a/servers/slapd/modrdn.c +++ b/servers/slapd/modrdn.c @@ -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 );