diff options
author | Nathan Kinder <nkinder@redhat.com> | 2007-09-17 22:48:10 +0000 |
---|---|---|
committer | Nathan Kinder <nkinder@redhat.com> | 2007-09-17 22:48:10 +0000 |
commit | e02f8cc443a65c313c07ee1dc9742dcb33e1010d (patch) | |
tree | 61deeb023164b8548c8a28f239536598587b5159 /ldap/servers/slapd/configdse.c | |
parent | e1486990a0a112e43f7c17132a9dd620b4987604 (diff) | |
download | ds-e02f8cc443a65c313c07ee1dc9742dcb33e1010d.tar.gz ds-e02f8cc443a65c313c07ee1dc9742dcb33e1010d.tar.xz ds-e02f8cc443a65c313c07ee1dc9742dcb33e1010d.zip |
Resolves: 293541
Summary: Allow server to start if descriptor related attributes are set too high.
Diffstat (limited to 'ldap/servers/slapd/configdse.c')
-rw-r--r-- | ldap/servers/slapd/configdse.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/ldap/servers/slapd/configdse.c b/ldap/servers/slapd/configdse.c index f640964a..d8151a3c 100644 --- a/ldap/servers/slapd/configdse.c +++ b/ldap/servers/slapd/configdse.c @@ -294,9 +294,25 @@ load_config_dse(Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry* ignored, int *ret if (attr_name) { retval = config_set(attr_name, values, returntext, 1 /* force apply */); - if ((retval != LDAP_SUCCESS) && - slapi_attr_flag_is_set(attr, SLAPI_ATTR_FLAG_OPATTR)) - retval = LDAP_SUCCESS; /* ignore attempts to modify operational attrs */ + if ((strcasecmp(attr_name, CONFIG_MAXDESCRIPTORS_ATTRIBUTE) == 0) || + (strcasecmp(attr_name, CONFIG_RESERVEDESCRIPTORS_ATTRIBUTE) == 0) || + (strcasecmp(attr_name, CONFIG_CONNTABLESIZE_ATTRIBUTE) == 0)) { + /* We should not treat an LDAP_UNWILLING_TO_PERFORM as fatal for + * the these config attributes. This error is returned when + * the value we are trying to set is higher than the current + * process limit. The set function will auto-adjust the runtime + * value to the current process limit when this happens. We want + * to allow the server to still start in this case. */ + if (retval == LDAP_UNWILLING_TO_PERFORM) { + slapi_log_error (SLAPI_LOG_FATAL, NULL, "Config Warning: - %s\n", returntext); + retval = LDAP_SUCCESS; + } + } else { + if ((retval != LDAP_SUCCESS) && + slapi_attr_flag_is_set(attr, SLAPI_ATTR_FLAG_OPATTR)) { + retval = LDAP_SUCCESS; /* ignore attempts to modify operational attrs */ + } + } } if (values) |