|
|
a2f18f |
From e37431f50e8d4bfc7015d9a00b58a9b9e77f1c79 Mon Sep 17 00:00:00 2001
|
|
|
a2f18f |
From: Noriko Hosoi <nhosoi@redhat.com>
|
|
|
a2f18f |
Date: Thu, 2 Jul 2015 16:44:09 -0700
|
|
|
a2f18f |
Subject: [PATCH 5/7] Ticket #48214 - ldapsearch on nsslapd-maxbersize returns
|
|
|
a2f18f |
0 instead of current value
|
|
|
a2f18f |
|
|
|
a2f18f |
Description: If nsslapd-maxbersize is not explicitely set in cn=config
|
|
|
a2f18f |
or the value is 0, the default value is assigned. Internally, it was.
|
|
|
a2f18f |
But ldapsearch did not return the default value.
|
|
|
a2f18f |
|
|
|
a2f18f |
https://fedorahosted.org/389/ticket/48214
|
|
|
a2f18f |
|
|
|
a2f18f |
Reviewed by rmeggins@redhat.com (Thank you, Rich!)
|
|
|
a2f18f |
|
|
|
a2f18f |
(cherry picked from commit 7d0689aaadfa66a8f8a481b0c1bb70b2465c4986)
|
|
|
a2f18f |
(cherry picked from commit b83c2554fad0bb2a08055c5105bcfa4c9d44af8f)
|
|
|
a2f18f |
---
|
|
|
a2f18f |
ldap/servers/slapd/libglobs.c | 9 +++++++--
|
|
|
a2f18f |
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
|
a2f18f |
|
|
|
a2f18f |
diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c
|
|
|
a2f18f |
index 24de4f3..a3c4243 100644
|
|
|
a2f18f |
--- a/ldap/servers/slapd/libglobs.c
|
|
|
a2f18f |
+++ b/ldap/servers/slapd/libglobs.c
|
|
|
a2f18f |
@@ -821,7 +821,7 @@ static struct config_get_and_set {
|
|
|
a2f18f |
{CONFIG_MAXBERSIZE_ATTRIBUTE, config_set_maxbersize,
|
|
|
a2f18f |
NULL, 0,
|
|
|
a2f18f |
(void**)&global_slapdFrontendConfig.maxbersize,
|
|
|
a2f18f |
- CONFIG_INT, NULL, DEFAULT_MAX_BERSIZE},
|
|
|
a2f18f |
+ CONFIG_INT, NULL, STRINGIFYDEFINE(DEFAULT_MAXBERSIZE)},
|
|
|
a2f18f |
{CONFIG_MAXSASLIOSIZE_ATTRIBUTE, config_set_maxsasliosize,
|
|
|
a2f18f |
NULL, 0,
|
|
|
a2f18f |
(void**)&global_slapdFrontendConfig.maxsasliosize,
|
|
|
a2f18f |
@@ -1540,6 +1540,7 @@ FrontendConfig_init () {
|
|
|
a2f18f |
init_cn_uses_dn_syntax_in_dns = cfg->cn_uses_dn_syntax_in_dns = LDAP_OFF;
|
|
|
a2f18f |
init_global_backend_local = LDAP_OFF;
|
|
|
a2f18f |
cfg->maxsimplepaged_per_conn = DEFAULT_MAXSIMPLEPAGED_PER_CONN;
|
|
|
a2f18f |
+ cfg->maxbersize = DEFAULT_MAXBERSIZE;
|
|
|
a2f18f |
#ifdef ENABLE_NUNC_STANS
|
|
|
a2f18f |
init_enable_nunc_stans = cfg->enable_nunc_stans = LDAP_OFF;
|
|
|
a2f18f |
#endif
|
|
|
a2f18f |
@@ -5713,6 +5714,9 @@ config_set_maxbersize( const char *attrname, char *value, char *errorbuf, int ap
|
|
|
a2f18f |
return retVal;
|
|
|
a2f18f |
}
|
|
|
a2f18f |
|
|
|
a2f18f |
+ if (size == 0) {
|
|
|
a2f18f |
+ size = DEFAULT_MAXBERSIZE;
|
|
|
a2f18f |
+ }
|
|
|
a2f18f |
CFG_LOCK_WRITE(slapdFrontendConfig);
|
|
|
a2f18f |
|
|
|
a2f18f |
slapdFrontendConfig->maxbersize = size;
|
|
|
a2f18f |
@@ -5728,8 +5732,9 @@ config_get_maxbersize()
|
|
|
a2f18f |
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
|
|
|
a2f18f |
|
|
|
a2f18f |
maxbersize = slapdFrontendConfig->maxbersize;
|
|
|
a2f18f |
- if(maxbersize==0)
|
|
|
a2f18f |
+ if (maxbersize == 0) {
|
|
|
a2f18f |
maxbersize = DEFAULT_MAXBERSIZE;
|
|
|
a2f18f |
+ }
|
|
|
a2f18f |
|
|
|
a2f18f |
return maxbersize;
|
|
|
a2f18f |
}
|
|
|
a2f18f |
--
|
|
|
a2f18f |
1.9.3
|
|
|
a2f18f |
|