Author: nhosoi
Update of /cvs/dirsec/mod_admserv
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18529
Modified Files:
mod_admserv.c
Log Message:
[192022] Admin Server fails to bring up Config DS
Always treat StartConfigDS specially.
Regardless of the result of opening LDAPConnection,
put StartConfigDs into the cache for bootstrap.
Index: mod_admserv.c
===================================================================
RCS file: /cvs/dirsec/mod_admserv/mod_admserv.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- mod_admserv.c 11 May 2006 23:53:52 -0000 1.23
+++ mod_admserv.c 17 May 2006 00:01:55 -0000 1.24
@@ -2248,21 +2248,21 @@
}
} while (server != NULL && ++tries < 2);
- if (error != LDAPU_SUCCESS) {
+ {
+ /* Always treat StartConfigDS specially.
+ * Regardless of the result of opening LDAPConnection,
+ * put StartConfigDs into the cache for bootstrap.
+ * This code allows the Console to launch the Config DS via Admin Server
+ * even if
+ * 1) the Config DS is not up when the Admin Server is started, or
+ * 2) the Config DS is shutdown after the Admin Server is started.
+ */
char startds[LINE_LENGTH];
char normStartds[LINE_LENGTH];
char *storage = startds;
char *uri = apr_pstrdup(module_pool, STARTDS_IDENTIFIER);
- /* Although opening LDAPConnection failed, we can initialize
- * Hosts/Addresses using the local cache.
- */
TaskCacheEntry *cache_entry;
- destroyAdmldap(info);
- closeLDAPConnection(server);
- ap_log_error(APLOG_MARK, APLOG_WARNING, 0, base_server,
- "Unable to bind as LocalAdmin to populate LocalAdmin tasks into
cache.");
- /* Config DS is not up and running
- * put startconfigds into the cache for bootstrap */
+
if (!build_full_DN(&storage, startds+LINE_LENGTH, uri,
registryServer.bindDN)) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, base_server,
@@ -2291,6 +2291,13 @@
cache_entry->execRef ? cache_entry->execRef : "",
cache_entry->execRefArgs ? cache_entry->execRefArgs :
"",
LOCAL_SUPER_NAME);
+ }
+
+ if (error != LDAPU_SUCCESS) {
+ destroyAdmldap(info);
+ closeLDAPConnection(server);
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, base_server,
+ "Unable to bind as LocalAdmin to populate LocalAdmin tasks into
cache.");
return host_ip_init(p, plog, ptemp, base_server);
}
Show replies by date