From 6ba22723213fabbe51abc7ef1a2fc06b90d31e4d Mon Sep 17 00:00:00 2001
From: Kurt Zeilenga <kurt@openldap.org>
Date: Sat, 24 Jul 1999 02:12:42 +0000
Subject: [PATCH] Adhere to "servers will not return operational attributes" in
 all cases (including root dse).

---
 configure.in             | 7 ++++---
 servers/slapd/root_dse.c | 4 ++--
 servers/slapd/schema.c   | 5 +++++
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/configure.in b/configure.in
index 35edebeee5..ea1640d566 100644
--- a/configure.in
+++ b/configure.in
@@ -497,9 +497,6 @@ AC_AIX
 AC_ISC_POSIX
 AC_MINIX
 
-dnl BeOS requires -lbe -lroot -lnet
-AC_CHECK_LIB(be, be_app, [LIBS="$LIBS -lbe -lroot -lnet"], :, [-lroot -lnet])
-
 dnl Checks for system services
 AC_CYGWIN
 AC_MINGW32
@@ -508,6 +505,9 @@ AC_OBJEXT
 
 AC_DEFINE_UNQUOTED( EXEEXT, "${EXEEXT}", [defined to be the EXE extension])
 
+dnl BeOS requires -lbe -lroot -lnet
+AC_CHECK_LIB(be, be_app, [LIBS="$LIBS -lbe -lroot -lnet"], :, [-lroot -lnet])
+
 dnl OpenLDAP requires STDC features
 AM_PROG_CC_STDC
 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
@@ -523,6 +523,7 @@ if test "${ol_cv_mkdep}" = no ; then
 	AC_MSG_WARN([do not know how to generate dependencies])
 fi
 
+dnl ----------------------------------------------------------------
 dnl Checks for libraries
 
 dnl Find socket()
diff --git a/servers/slapd/root_dse.c b/servers/slapd/root_dse.c
index 700b4bd489..9da603c89c 100644
--- a/servers/slapd/root_dse.c
+++ b/servers/slapd/root_dse.c
@@ -91,7 +91,7 @@ root_dse_info( Connection *conn, Operation *op, char **attrs, int attrsonly )
 	for ( i=0; supportedSASLMechanisms[i] != NULL; i++ ) {
 		val.bv_val = supportedSASLMechanisms[i];
 		val.bv_len = strlen( val.bv_val );
-		attr_merge( e, "supportedSASLMechanism", vals );
+		attr_merge( e, "supportedSASLMechanisms", vals );
 	}
 
 	if ( default_referral != NULL ) {
@@ -99,7 +99,7 @@ root_dse_info( Connection *conn, Operation *op, char **attrs, int attrsonly )
 	}
 
 	send_search_entry( &backends[0], conn, op,
-		e, attrs, attrsonly, 1, NULL );
+		e, attrs, attrsonly, 0, NULL );
 	send_search_result( conn, op, LDAP_SUCCESS,
 		NULL, NULL, NULL, NULL, 1 );
 
diff --git a/servers/slapd/schema.c b/servers/slapd/schema.c
index ea8ce6aa17..4c6fe9307e 100644
--- a/servers/slapd/schema.c
+++ b/servers/slapd/schema.c
@@ -145,6 +145,11 @@ static char *oc_operational_attrs[] = {
 	"dITContentRules",
 	"nameForms",
 	"ldapSyntaxes",
+	"namingContexts",
+	"supportedExtension",
+	"supportedControl",
+	"supportedSASLMechanisms",
+	"supportedLDAPversion",
 	NULL
 
 };
-- 
GitLab