From 6624f68725d97180f89d5481f50e99727d9772bc Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 15 Apr 2004 20:27:43 +0000 Subject: [PATCH] fix braindead config option (mostly harmless) --- doc/man/man5/slapd.conf.5 | 10 +++++----- servers/slapd/limits.c | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/man/man5/slapd.conf.5 b/doc/man/man5/slapd.conf.5 index e642a476f5..380bb9999f 100644 --- a/doc/man/man5/slapd.conf.5 +++ b/doc/man/man5/slapd.conf.5 @@ -1132,19 +1132,17 @@ of entries to be returned. However, the size limit applies to the total count of entries returned within the search, and not to a single page. Additional size limits may be enforced; the syntax is -.BR size.pr={|noEstimate|disabled|none} , +.BR size.pr={|noEstimate|none} , where .B integer is the max page size if no explicit limit is set; the keyword .I noEstimate inhibits the server to return an estimate of the total number of entries that will be returned; the keyword -.I disabled -disables the control, i.e. no paged results can be returned; the keyword .I none indicates that no limit is applied to the pagedResults control page size. The syntax -.B size.prtotal={|none} +.B size.prtotal={|none|disabled} allows to set a limit on the total number of entries that a pagedResults control allows to return. By default it is set to the @@ -1158,7 +1156,9 @@ Use .B none to allow unlimited number of entries to be returned, i.e. to use pagedResults as a means to allow clients to circumvent size limitations -on regular searches. +on regular searches; the keyword +.I disabled +disables the control, i.e. no paged results can be returned. Note that the total number of entries returned when the pagedResults control is requested cannot exceed the .B hard diff --git a/servers/slapd/limits.c b/servers/slapd/limits.c index 24bbe1aaa3..854c48c920 100644 --- a/servers/slapd/limits.c +++ b/servers/slapd/limits.c @@ -809,9 +809,6 @@ limits_parse_one( } else if ( strcasecmp( arg, "none" ) == 0 ) { limit->lms_s_pr = -1; - } else if ( strcasecmp( arg, "disabled" ) == 0 ) { - limit->lms_s_pr_total = -2; - } else { char *next = NULL; int pr = strtol( arg, &next, 10 ); @@ -837,6 +834,9 @@ limits_parse_one( if ( strcasecmp( arg, "none" ) == 0 ) { limit->lms_s_pr_total = -1; + } else if ( strcasecmp( arg, "disabled" ) == 0 ) { + limit->lms_s_pr_total = -2; + } else if ( strcasecmp( arg, "hard" ) == 0 ) { limit->lms_s_pr_total = 0; -- 2.39.5