[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#3604) different behaviour with back-bdb and back-ldbm
--Boundary-00=_7bDXE0a9EGW2PN5
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Am Mittwoch, 23. M=C3=A4rz 2005 18:38 schrieb ando@sys-net.it:
> > after playing a while with "limits" in the slapd.conf I can second the
> > above statement. I have never been able to receive more than 1000
> > entries.
> >
> > The Solaris LDAP client has AFAIK no option to configure size or page
> > sizes. I have re-read ldapclient's man page but haven't found anything
> > that points in this direction.
> > If you think the client should support something to control the size
> > when receiving PagedResults, I can ask Sun. (But my hope is limited).
>
> My comment is: OpenLDAP 2.2.23 supports pagedResults for back-bdb; if
> Sun's cclient feels like requesting the control at its first request, why
> on Earth doesn't it keep on handling the control's response? If you need
> to have tjis working, I suggest you try removing the control's OID from
> the list of supported controls in back-bdb/init.c (not 100% sure this
> suffices, but it's worth at least trying, otherwise keep posting).
> I'd consider this ITS closed, and I suggest you bring further discussion
> back to openldap-software, if required.
>
> I also suggest that you file an ITS about allowing pagedResults, and in
> general supported controls to be somehow disabled (at compile, or better
> at run-time, or even better on a per-user basis ;).
Our customer had the same problem. The attached patch solves the problem f=
or=20
us, based on OpenLDAP 2.2.23.
Regards
Stefan
=2D-=20
Stefan Gohmann <gohmann@univention.de> fon: +49 421 22 232- 0
Entwicklung Linux for Your Business
Univention GmbH http://www.univention.de/ fax: +49 421 22 232-99
--Boundary-00=_7bDXE0a9EGW2PN5
Content-Type: text/x-diff;
charset="utf-8";
name="page_result_disabled.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="page_result_disabled.patch"
diff -Nur openldap2.2-2.2.23.orig/servers/slapd/config.c openldap2.2-2.2.23/servers/slapd/config.c
--- openldap2.2-2.2.23.orig/servers/slapd/config.c 2005-01-20 18:01:06.000000000 +0100
+++ openldap2.2-2.2.23/servers/slapd/config.c 2006-04-24 14:55:04.000000000 +0200
@@ -92,6 +92,7 @@
char *strtok_quote_ptr;
int use_reverse_lookup = 0;
+int use_page_results = 1;
#ifdef LDAP_SLAPI
int slapi_plugins_used = 0;
@@ -2543,6 +2544,37 @@
#endif
#endif /* !SLAPD_RLOOKUPS */
+ } else if ( !strcasecmp( cargv[0], "page-results" ) ) {
+ if ( cargc < 2 ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: page-results: missing \"on\" or \"off\"\n",
+ fname, lineno , 0 );
+#else
+ Debug( LDAP_DEBUG_ANY,
+"%s: line %d: page-results: missing \"on\" or \"off\"\n",
+ fname, lineno, 0 );
+#endif
+ return( 1 );
+ }
+
+ if ( !strcasecmp( cargv[1], "on" ) ) {
+ use_page_results = 1;
+ } else if ( !strcasecmp( cargv[1], "off" ) ) {
+ use_page_results = 0;
+ } else {
+#ifdef NEW_LOGGING
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: page-results: "
+ "must be \"on\" (default) or \"off\"\n", fname, lineno, 0 );
+#else
+ Debug( LDAP_DEBUG_ANY,
+"%s: line %d: page-results: must be \"on\" (default) or \"off\"\n",
+ fname, lineno, 0 );
+#endif
+ return( 1 );
+ }
+
/* Netscape plugins */
} else if ( strcasecmp( cargv[0], "plugin" ) == 0 ) {
#if defined( LDAP_SLAPI )
diff -Nur openldap2.2-2.2.23.orig/servers/slapd/controls.c openldap2.2-2.2.23/servers/slapd/controls.c
--- openldap2.2-2.2.23.orig/servers/slapd/controls.c 2005-01-20 18:01:06.000000000 +0100
+++ openldap2.2-2.2.23/servers/slapd/controls.c 2006-04-24 15:00:28.000000000 +0200
@@ -158,6 +158,31 @@
return LDAP_PARAM_ERROR;
}
+ /* check if page results are enabled, needed for Solaris 9 LDAP Client */
+ if (! strcmp(controloid, LDAP_CONTROL_PAGEDRESULTS) ) {
+ if ( use_page_results == 0 ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( OPERATION, INFO,
+ "register_supported_control: disable page_results %d.\n",
+ use_page_results, 0, 0 );
+#else
+ Debug( LDAP_DEBUG_TRACE,
+ "register_supported_control: disable page_results %d.\n",
+ use_page_results, 0, 0 );
+#endif
+ return LDAP_SUCCESS;
+ }
+#ifdef NEW_LOGGING
+ LDAP_LOG( OPERATION, INFO,
+ "register_supported_control: enable page_results %d.\n",
+ use_page_results, 0, 0 );
+#else
+ Debug( LDAP_DEBUG_TRACE,
+ "register_supported_control: enable page_results %d.\n",
+ use_page_results, 0, 0 );
+#endif
+ }
+
sc = (struct slap_control *)SLAP_MALLOC( sizeof( *sc ) );
if ( sc == NULL ) {
return LDAP_NO_MEMORY;
diff -Nur openldap2.2-2.2.23.orig/servers/slapd/main.c openldap2.2-2.2.23/servers/slapd/main.c
--- openldap2.2-2.2.23.orig/servers/slapd/main.c 2006-04-24 12:42:17.000000000 +0200
+++ openldap2.2-2.2.23/servers/slapd/main.c 2006-04-24 15:18:12.000000000 +0200
@@ -500,6 +500,30 @@
goto destroy;
}
+ if ( overlay_init() ) {
+ goto destroy;
+ }
+
+ if ( read_config( configfile, 0 ) != 0 ) {
+ rc = 1;
+ SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 19 );
+
+ if ( check & CHECK_CONFIG ) {
+ fprintf( stderr, "config check failed\n" );
+ }
+
+ goto destroy;
+ }
+
+ if ( check & CHECK_CONFIG ) {
+ fprintf( stderr, "config check succeeded\n" );
+
+ check &= ~CHECK_CONFIG;
+ if ( check == CHECK_NONE ) {
+ rc = 0;
+ goto destroy;
+ }
+ }
if ( slap_controls_init( ) != 0 ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, CRIT, "main: controls initialization error\n", 0, 0, 0 );
@@ -536,30 +560,6 @@
}
#endif /* LDAP_SLAPI */
- if ( overlay_init() ) {
- goto destroy;
- }
-
- if ( read_config( configfile, 0 ) != 0 ) {
- rc = 1;
- SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 19 );
-
- if ( check & CHECK_CONFIG ) {
- fprintf( stderr, "config check failed\n" );
- }
-
- goto destroy;
- }
-
- if ( check & CHECK_CONFIG ) {
- fprintf( stderr, "config check succeeded\n" );
-
- check &= ~CHECK_CONFIG;
- if ( check == CHECK_NONE ) {
- rc = 0;
- goto destroy;
- }
- }
if ( glue_sub_init( ) != 0 ) {
#ifdef NEW_LOGGING
diff -Nur openldap2.2-2.2.23.orig/servers/slapd/proto-slap.h openldap2.2-2.2.23/servers/slapd/proto-slap.h
--- openldap2.2-2.2.23.orig/servers/slapd/proto-slap.h 2006-04-24 12:42:17.000000000 +0200
+++ openldap2.2-2.2.23/servers/slapd/proto-slap.h 2006-04-24 14:37:03.000000000 +0200
@@ -1287,6 +1287,7 @@
LDAP_SLAPD_V (ber_socket_t) dtblsize;
LDAP_SLAPD_V (int) use_reverse_lookup;
+LDAP_SLAPD_V (int) use_page_results;
LDAP_SLAPD_V (struct berval) AllUser;
LDAP_SLAPD_V (struct berval) AllOper;
--Boundary-00=_7bDXE0a9EGW2PN5--