summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2005-03-30 17:44:04 +0000
committerRich Megginson <rmeggins@redhat.com>2005-03-30 17:44:04 +0000
commitb9500d1da74bcb410ecdd17f3fd6567f1ca03928 (patch)
treedf3159f62c2be897809f6b88117957a2d8f9c403
parent0e67c5a751bc22ca8b514108c4424943498d1f3b (diff)
downloadds-b9500d1da74bcb410ecdd17f3fd6567f1ca03928.tar.gz
ds-b9500d1da74bcb410ecdd17f3fd6567f1ca03928.tar.xz
ds-b9500d1da74bcb410ecdd17f3fd6567f1ca03928.zip
Bug(s) fixed: 151721
Bug Description: The console hangs for several minutes after invoking Start Server. It eventually comes back. Reviewed by: Nathan and Noriko (Thanks!) Fix Description: The problem was in the parsing of the errorlog filename from dse.ldif. ldif_get_entry/ldif_getline only work in conjunction with ldif_parse_line. The line value returned from ldif_getline has control characters in place of the continuation line characters which are not useful until the line is parsed with ldif_parse_line. You only see this problem if the server root path is long enough to cause the line to wrap. Platforms tested: RHEL3 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none
-rw-r--r--ldap/admin/lib/dsalib_confs.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/ldap/admin/lib/dsalib_confs.c b/ldap/admin/lib/dsalib_confs.c
index 0545e2be..3d1a34b2 100644
--- a/ldap/admin/lib/dsalib_confs.c
+++ b/ldap/admin/lib/dsalib_confs.c
@@ -38,10 +38,33 @@ ds_get_conf_from_file(FILE *conf)
if (!PL_strncasecmp(entry, config_entry, cfg_ent_len)) {
char *line = entry;
while ((line = ldif_getline(&entry))) {
+ char *type, *value;
+ int vlen = 0;
+ int rc;
+ char *errmsg = NULL;
+
+ if ( *line == '\n' || *line == '\0' ) {
+ break;
+ }
+
+ /* this call modifies line */
+ rc = ldif_parse_line(line, &type, &value, &vlen, &errmsg);
+ if (rc != 0)
+ {
+ if ( errmsg != NULL ) {
+ ds_send_error(errmsg, 0);
+ PR_smprintf_free(errmsg);
+ } else {
+ ds_send_error("Unknown error processing config file", 0);
+ }
+ free(begin);
+ return NULL;
+ }
listsize++;
conf_list = (char **) realloc(conf_list,
((listsize + 1) * sizeof(char *)));
- conf_list[listsize - 1] = strdup(line);
+ /* this is the format expected by ds_get_config_value */
+ conf_list[listsize - 1] = PR_smprintf("%s:%s", type, value);
conf_list[listsize] = NULL; /* always null terminated */
}
}