[Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication repl5.h, 1.9, 1.10 windows_connection.c, 1.15, 1.16 windows_private.c, 1.14, 1.15 windows_protocol_util.c, 1.31, 1.32 windowsrepl.h, 1.11, 1.12
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9727
Modified Files:
repl5.h windows_connection.c windows_private.c
windows_protocol_util.c windowsrepl.h
Log Message:
Resolves: 243227
Summary: Handle syncing add opererations that have a ntuniqueid present.
Index: repl5.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- repl5.h 10 Nov 2006 23:45:17 -0000 1.9
+++ repl5.h 12 Sep 2007 23:05:24 -0000 1.10
@@ -63,8 +63,8 @@
#define REPLICA_TYPE_WINDOWS 1
#define REPLICA_TYPE_MULTIMASTER 0
#define REPL_DIRSYNC_CONTROL_OID "1.2.840.113556.1.4.841"
-#define CONN_SUPPORTS_DIRSYNC 12
-#define CONN_DOES_NOT_SUPPORT_DIRSYNC 13
+#define REPL_RETURN_DELETED_OBJS_CONTROL_OID "1.2.840.113556.1.4.417"
+#define REPL_WIN2K3_AD_OID "1.2.840.113556.1.4.1670"
/* DS 5.0 replication protocol OIDs */
#define REPL_START_NSDS50_REPLICATION_REQUEST_OID "2.16.840.1.113730.3.5.3"
@@ -358,7 +358,11 @@
CONN_SUPPORTS_DS71_REPL,
CONN_DOES_NOT_SUPPORT_DS71_REPL,
CONN_IS_READONLY,
- CONN_IS_NOT_READONLY
+ CONN_IS_NOT_READONLY,
+ CONN_SUPPORTS_DIRSYNC,
+ CONN_DOES_NOT_SUPPORT_DIRSYNC,
+ CONN_IS_WIN2K3,
+ CONN_NOT_WIN2K3
} ConnResult;
Repl_Connection *conn_new(Repl_Agmt *agmt);
ConnResult conn_connect(Repl_Connection *conn);
Index: windows_connection.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_connection.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- windows_connection.c 10 Nov 2006 23:45:17 -0000 1.15
+++ windows_connection.c 12 Sep 2007 23:05:24 -0000 1.16
@@ -83,6 +83,7 @@
struct timeval timeout;
int flag_agmt_changed;
char *plain;
+ int is_win2k3; /* 1 if it is win2k3 or later, 0 if not, -1 if not determined */
} repl_connection;
/* #define DEFAULT_LINGER_TIME (5 * 60) */ /* 5 minutes */
@@ -167,6 +168,7 @@
rpc->supports_ds40_repl = -1;
rpc->supports_ds50_repl = -1;
rpc->supports_dirsync = -1;
+ rpc->is_win2k3 = -1;
rpc->linger_active = PR_FALSE;
rpc->delete_after_linger = PR_FALSE;
rpc->linger_event = NULL;
@@ -291,21 +293,18 @@
static ConnResult
windows_perform_operation(Repl_Connection *conn, int optype, const char *dn,
LDAPMod **attrs, const char *newrdn, const char *newparent,
- int deleteoldrdn, LDAPControl *update_control,
+ int deleteoldrdn, LDAPControl **server_controls,
const char *extop_oid, struct berval *extop_payload, char **retoidp,
struct berval **retdatap, LDAPControl ***returned_controls)
{
int rc;
ConnResult return_value;
- LDAPControl *server_controls[1];
LDAPControl **loc_returned_controls;
const char *op_string = NULL;
const char *extra_op_string = NULL;
LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_perform_operation\n", 0, 0, 0 );
- server_controls[0] = NULL;
-
if (windows_conn_connected(conn))
{
int msgid;
@@ -588,9 +587,17 @@
return e;
}
+/* Perform a simple search against Windows with no controls */
ConnResult
windows_search_entry(Repl_Connection *conn, char* searchbase, char *filter, Slapi_Entry **entry)
{
+ return windows_search_entry_ext(conn, searchbase, filter, entry, NULL);
+}
+
+/* Perform a simple search against Windows with optional controls */
+ConnResult
+windows_search_entry_ext(Repl_Connection *conn, char* searchbase, char *filter, Slapi_Entry **entry, LDAPControl **serverctrls)
+{
ConnResult return_value = 0;
int ldap_rc = 0;
LDAPMessage *res = NULL;
@@ -607,7 +614,7 @@
{
ldap_rc = ldap_search_ext_s(conn->ld, searchbase, LDAP_SCOPE_SUBTREE,
filter, NULL, 0 /* attrsonly */,
- NULL , NULL /* client controls */,
+ serverctrls , NULL /* client controls */,
&conn->timeout, 0 /* sizelimit */, &res);
if (LDAP_SUCCESS == ldap_rc)
{
@@ -684,9 +691,7 @@
server_controls[0] = NULL; /* unsupported */
} else
{
- /* DBDB: I'm pretty sure that the control is leaked from here */
- /* Purify agrees */
- server_controls[0] = windows_private_dirsync_control(conn->agmt); /* yes, or don't know */
+ server_controls[0] = windows_private_dirsync_control(conn->agmt);
}
server_controls[1] = NULL;
@@ -746,12 +751,12 @@
*/
ConnResult
windows_conn_send_add(Repl_Connection *conn, const char *dn, LDAPMod **attrs,
- LDAPControl *update_control, LDAPControl ***returned_controls)
+ LDAPControl **server_controls, LDAPControl ***returned_controls)
{
ConnResult res = 0;
LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_send_add\n", 0, 0, 0 );
res = windows_perform_operation(conn, CONN_ADD, dn, attrs, NULL /* newrdn */,
- NULL /* newparent */, 0 /* deleteoldrdn */, update_control,
+ NULL /* newparent */, 0 /* deleteoldrdn */, server_controls,
NULL /* extop OID */, NULL /* extop payload */, NULL /* retoidp */,
NULL /* retdatap */, returned_controls);
LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_send_add\n", 0, 0, 0 );
@@ -764,13 +769,13 @@
*/
ConnResult
windows_conn_send_delete(Repl_Connection *conn, const char *dn,
- LDAPControl *update_control, LDAPControl ***returned_controls)
+ LDAPControl **server_controls, LDAPControl ***returned_controls)
{
LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_send_delete\n", 0, 0, 0 );
LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_send_delete\n", 0, 0, 0 );
return windows_perform_operation(conn, CONN_DELETE, dn, NULL /* attrs */,
NULL /* newrdn */, NULL /* newparent */, 0 /* deleteoldrdn */,
- update_control, NULL /* extop OID */, NULL /* extop payload */,
+ server_controls, NULL /* extop OID */, NULL /* extop payload */,
NULL /* retoidp */, NULL /* retdatap */, returned_controls);
}
@@ -780,12 +785,12 @@
*/
ConnResult
windows_conn_send_modify(Repl_Connection *conn, const char *dn, LDAPMod **mods,
- LDAPControl *update_control, LDAPControl ***returned_controls)
+ LDAPControl **server_controls, LDAPControl ***returned_controls)
{
LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_send_modify\n", 0, 0, 0 );
LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_send_modify\n", 0, 0, 0 );
return windows_perform_operation(conn, CONN_MODIFY, dn, mods, NULL /* newrdn */,
- NULL /* newparent */, 0 /* deleteoldrdn */, update_control,
+ NULL /* newparent */, 0 /* deleteoldrdn */, server_controls,
NULL /* extop OID */, NULL /* extop payload */, NULL /* retoidp */,
NULL /* retdatap */, returned_controls);
}
@@ -796,12 +801,12 @@
ConnResult
windows_conn_send_rename(Repl_Connection *conn, const char *dn,
const char *newrdn, const char *newparent, int deleteoldrdn,
- LDAPControl *update_control, LDAPControl ***returned_controls)
+ LDAPControl **server_controls, LDAPControl ***returned_controls)
{
LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_send_rename\n", 0, 0, 0 );
LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_send_rename\n", 0, 0, 0 );
return windows_perform_operation(conn, CONN_RENAME, dn, NULL /* attrs */,
- newrdn, newparent, deleteoldrdn, update_control,
+ newrdn, newparent, deleteoldrdn, server_controls,
NULL /* extop OID */, NULL /* extop payload */, NULL /* retoidp */,
NULL /* retdatap */, returned_controls);
}
@@ -878,13 +883,13 @@
ConnResult
windows_conn_send_extended_operation(Repl_Connection *conn, const char *extop_oid,
struct berval *payload, char **retoidp, struct berval **retdatap,
- LDAPControl *update_control, LDAPControl ***returned_controls)
+ LDAPControl **server_controls, LDAPControl ***returned_controls)
{
LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_send_extended_operation\n", 0, 0, 0 );
LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_send_extended_operation\n", 0, 0, 0 );
return windows_perform_operation(conn, CONN_EXTENDED_OPERATION, NULL /* dn */, NULL /* attrs */,
NULL /* newrdn */, NULL /* newparent */, 0 /* deleteoldrdn */,
- update_control, extop_oid, payload, retoidp, retdatap,
+ server_controls, extop_oid, payload, retoidp, retdatap,
returned_controls);
}
@@ -1264,6 +1269,16 @@
{
windows_private_set_isnt4(conn->agmt,0);
}
+
+ supports = windows_conn_replica_is_win2k3(conn);
+ if (CONN_IS_WIN2K3 == supports)
+ {
+ windows_private_set_iswin2k3(conn->agmt,1);
+ LDAPDebug( LDAP_DEBUG_REPL, "windows_conn_connect : detected Win2k3 peer\n", 0, 0, 0 );
+ } else
+ {
+ windows_private_set_iswin2k3(conn->agmt,0);
+ }
}
ber_bvfree(creds);
@@ -1472,6 +1487,71 @@
}
+/* Checks if the AD server is running win2k3 (or later) */
+ConnResult
+windows_conn_replica_is_win2k3(Repl_Connection *conn)
+{
+ ConnResult return_value;
+ int ldap_rc;
+
+ LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_replica_is_win2k3\n", 0, 0, 0 );
+
+ if (windows_conn_connected(conn))
+ {
+ if (conn->is_win2k3 == -1) {
+ LDAPMessage *res = NULL;
+ LDAPMessage *entry = NULL;
+ char *attrs[] = {"supportedCapabilities", NULL};
+
+ conn->status = STATUS_SEARCHING;
+ ldap_rc = ldap_search_ext_s(conn->ld, "", LDAP_SCOPE_BASE,
+ "(objectclass=*)", attrs, 0 /* attrsonly */,
+ NULL /* server controls */, NULL /* client controls */,
+ &conn->timeout, LDAP_NO_LIMIT, &res);
+ if (LDAP_SUCCESS == ldap_rc)
+ {
+ conn->is_win2k3 = 0;
+ entry = ldap_first_entry(conn->ld, res);
+ if (!attribute_string_value_present(conn->ld, entry, "supportedCapabilities", REPL_WIN2K3_AD_OID))
+ {
+ return_value = CONN_NOT_WIN2K3;
+ }
+ else
+ {
+
+ conn->is_win2k3 =1;
+ return_value = CONN_IS_WIN2K3;
+ }
+ }
+ else
+ {
+ if (IS_DISCONNECT_ERROR(ldap_rc))
+ {
+ conn->last_ldap_error = ldap_rc; /* specific reason */
+ windows_conn_disconnect(conn);
+ return_value = CONN_NOT_CONNECTED;
+ }
+ else
+ {
+ return_value = CONN_OPERATION_FAILED;
+ }
+ }
+ if (NULL != res)
+ ldap_msgfree(res);
+ }
+ else {
+ return_value = conn->is_win2k3 ? CONN_IS_WIN2K3 : CONN_NOT_WIN2K3;
+ }
+ }
+ else
+ {
+ /* Not connected */
+ return_value = CONN_NOT_CONNECTED;
+ }
+ LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_replica_is_win2k3\n", 0, 0, 0 );
+ return return_value;
+}
+
/*
* Return 1 if "value" is a value of attribute type "type" in entry "entry".
Index: windows_private.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_private.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- windows_private.c 10 Nov 2006 23:45:17 -0000 1.14
+++ windows_private.c 12 Sep 2007 23:05:24 -0000 1.15
@@ -65,6 +65,7 @@
PRBool create_groups_from_dirsync;
char *windows_domain;
int isnt4;
+ int iswin2k3;
};
static int
@@ -245,6 +246,38 @@
LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_private_set_isnt4\n", 0, 0, 0 );
}
+int windows_private_get_iswin2k3(const Repl_Agmt *ra)
+{
+ Dirsync_Private *dp;
+
+ LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_private_get_iswin2k3\n", 0, 0, 0 );
+
+ PR_ASSERT(ra);
+
+ dp = (Dirsync_Private *) agmt_get_priv(ra);
+ PR_ASSERT (dp);
+
+ LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_private_get_iswin2k3\n", 0, 0, 0 );
+
+ return dp->iswin2k3;
+}
+
+void windows_private_set_iswin2k3(const Repl_Agmt *ra, int isit)
+{
+ Dirsync_Private *dp;
+
+ LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_private_set_iswin2k3\n", 0, 0, 0 );
+
+ PR_ASSERT(ra);
+
+ dp = (Dirsync_Private *) agmt_get_priv(ra);
+ PR_ASSERT (dp);
+
+ dp->iswin2k3 = isit;
+
+ LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_private_set_iswin2k3\n", 0, 0, 0 );
+}
+
/* Returns a copy of the Slapi_DN pointer, no need to free it */
const Slapi_DN* windows_private_get_windows_subtree (const Repl_Agmt *ra)
Index: windows_protocol_util.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_protocol_util.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- windows_protocol_util.c 4 Sep 2007 15:45:57 -0000 1.31
+++ windows_protocol_util.c 12 Sep 2007 23:05:25 -0000 1.32
@@ -71,11 +71,16 @@
static int windows_get_local_entry_by_uniqueid(Private_Repl_Protocol *prp,const char* uniqueid,Slapi_Entry **local_entry);
static int map_entry_dn_outbound(Slapi_Entry *e, Slapi_DN **dn, Private_Repl_Protocol *prp, int *missing_entry, int want_guid);
static char* extract_ntuserdomainid_from_entry(Slapi_Entry *e);
+static char* extract_container(const Slapi_DN *entry_dn, const Slapi_DN *suffix_dn);
static int windows_get_remote_entry (Private_Repl_Protocol *prp, const Slapi_DN* remote_dn,Slapi_Entry **remote_entry);
+static int windows_get_remote_tombstone(Private_Repl_Protocol *prp, const Slapi_DN* remote_dn,Slapi_Entry **remote_entry);
+static int windows_reanimate_tombstone(Private_Repl_Protocol *prp, const Slapi_DN* tombstone_dn, const char* new_dn);
static const char* op2string (int op);
static int is_subject_of_agreemeent_remote(Slapi_Entry *e, const Repl_Agmt *ra);
static int map_entry_dn_inbound(Slapi_Entry *e, Slapi_DN **dn, const Repl_Agmt *ra);
static int windows_update_remote_entry(Private_Repl_Protocol *prp,Slapi_Entry *remote_entry,Slapi_Entry *local_entry);
+static int is_guid_dn(Slapi_DN *remote_dn);
+static int map_windows_tombstone_dn(Slapi_Entry *e, Slapi_DN **dn, Private_Repl_Protocol *prp, int *exists);
/* Controls the direction of flow for mapped attributes */
@@ -363,7 +368,7 @@
slapi_log_error(SLAPI_LOG_REPL, NULL, "Windows sync entry: %s %s\n", string, buffer);
if (buffer)
{
- slapi_ch_free((void**)&buffer);
+ slapi_ch_free_string(&buffer);
}
}
}
@@ -953,11 +958,85 @@
int rc = 0;
slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
- "%s: process_replay_add: dn=\"%s\" (%s,%s)\n",
- agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(remote_dn), missing_entry ? "not present" : "already present" , remote_add_allowed ? "add allowed" : "add not allowed");
+ "%s: process_replay_add: dn=\"%s\" (%s,%s)\n", agmt_get_long_name(prp->agmt),
+ slapi_sdn_get_dn(remote_dn), missing_entry ? "not present" : "already present",
+ remote_add_allowed ? "add allowed" : "add not allowed");
if (missing_entry)
{
+ /* If DN is a GUID, we need to attempt to reanimate the tombstone */
+ if (is_guid_dn(remote_dn)) {
+ int tstone_exists = 0;
+ int reanimate_rc = -1;
+ char *new_dn_string = NULL;
+ char *cn_string = NULL;
+ Slapi_DN *tombstone_dn = NULL;
+
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "%s: process_replay_add: dn=\"%s\" appears to have been"
+ " deleted on remote side. Searching for tombstone.\n",
+ agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(remote_dn));
+
+ /* Map local entry to tombstone DN and verify that it exists on
+ * AD side */
+ map_windows_tombstone_dn(local_entry, &tombstone_dn, prp, &tstone_exists);
+
+ /* We can't use a GUID DN, so rewrite to the new mapped DN. */
+ cn_string = slapi_entry_attr_get_charptr(local_entry,"cn");
+ if (!cn_string) {
+ cn_string = slapi_entry_attr_get_charptr(local_entry,"ntuserdomainid");
+ }
+
+ if (cn_string) {
+ char *rdnstr = NULL;
+ char *container_str = NULL;
+ const char *suffix = slapi_sdn_get_dn(windows_private_get_windows_subtree(prp->agmt));
+
+ container_str = extract_container(slapi_entry_get_sdn_const(local_entry),
+ windows_private_get_directory_subtree(prp->agmt));
+ new_dn_string = PR_smprintf("cn=%s,%s%s", cn_string, container_str, suffix);
+
+ if (new_dn_string) {
+ /* If the tombstone exists, reanimate it. If the tombstone
+ * does not exist, we'll create a new entry in AD, which
+ * will end up getting a new GUID generated by AD. */
+ if (tstone_exists) {
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "%s: process_replay_add: Reanimating tombstone (dn=\"%s\") to"
+ " normal entry (dn=\"%s\").\n", agmt_get_long_name(prp->agmt),
+ slapi_sdn_get_dn(tombstone_dn), new_dn_string);
+ reanimate_rc = windows_reanimate_tombstone(prp, tombstone_dn, (const char *)new_dn_string);
+ if (reanimate_rc != 0) {
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "%s: process_replay_add: Reanimation of tombstone"
+ " (dn=\"%s\") failed. A new entry (dn=\"%s\")"
+ " will be added instead.\n", agmt_get_long_name(prp->agmt),
+ slapi_sdn_get_dn(tombstone_dn), new_dn_string);
+ }
+ }
+
+ /* Clear out the old GUID DN and use the new one. We hand off the memory
+ * for new_dn_string into the remote_dn. */
+ slapi_sdn_done(remote_dn);
+ slapi_sdn_set_dn_passin(remote_dn, new_dn_string);
+ }
+
+ slapi_ch_free_string(&cn_string);
+ slapi_ch_free_string(&container_str);
+ }
+
+ if (tombstone_dn) {
+ slapi_sdn_free(&tombstone_dn);
+ }
+
+ if (reanimate_rc == 0) {
+ /* We reanimated a tombstone, so an add won't work. We
+ * fallback to doing a modify of the newly reanimated
+ * entry. */
+ goto modify_fallback;
+ }
+ }
+
if (remote_add_allowed) {
LDAPMod **entryattrs = NULL;
Slapi_Entry *mapped_entry = NULL;
@@ -971,17 +1050,26 @@
mapped_entry = NULL;
if (NULL == entryattrs)
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,"%s: windows_replay_update: Cannot convert entry to LDAPMods.\n",agmt_get_long_name(prp->agmt));
+ slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ "%s: windows_replay_update: Cannot convert entry to LDAPMods.\n",
+ agmt_get_long_name(prp->agmt));
return_value = CONN_LOCAL_ERROR;
}
else
{
windows_log_add_entry_remote(local_dn, remote_dn);
- return_value = windows_conn_send_add(prp->conn, slapi_sdn_get_dn(remote_dn), entryattrs, NULL, NULL);
- /* It's possible that the entry already exists in AD, in which case we fall back to modify it */
+ return_value = windows_conn_send_add(prp->conn, slapi_sdn_get_dn(remote_dn),
+ entryattrs, NULL, NULL);
+ /* It's possible that the entry already exists in AD, in which
+ * case we fall back to modify it */
+ /* NGK - This fallback doesn't seem to happen, at least not at this point
+ * in the code. The only chance to fallback to doing a modify is if
+ * missing_entry is set to 0 at the top of this function. */
if (return_value)
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,"%s: windows_replay_update: Cannot replay add operation.\n",agmt_get_long_name(prp->agmt));
+ slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ "%s: windows_replay_update: Cannot replay add operation.\n",
+ agmt_get_long_name(prp->agmt));
}
ldap_mods_free(entryattrs, 1);
entryattrs = NULL;
@@ -989,14 +1077,15 @@
} else
{
slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
- "%s: process_replay_add: failed to create mapped entry dn=\"%s\"\n",agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(remote_dn));
+ "%s: process_replay_add: failed to create mapped entry dn=\"%s\"\n",
+ agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(remote_dn));
}
}
} else
{
-
Slapi_Entry *remote_entry = NULL;
+modify_fallback:
/* Fetch the remote entry */
rc = windows_get_remote_entry(prp, remote_dn,&remote_entry);
if (0 == rc && remote_entry) {
@@ -1018,7 +1107,6 @@
windows_replay_update(Private_Repl_Protocol *prp, slapi_operation_parameters *op)
{
ConnResult return_value = 0;
- LDAPControl *update_control = NULL; /* No controls used for AD */
int rc = 0;
char *password = NULL;
int is_ours = 0;
@@ -1097,7 +1185,7 @@
slapi_mod_dump(mapped_mods[i],i);
}
}
- return_value = windows_conn_send_modify(prp->conn, slapi_sdn_get_dn(remote_dn), mapped_mods, update_control,NULL /* returned controls */);
+ return_value = windows_conn_send_modify(prp->conn, slapi_sdn_get_dn(remote_dn), mapped_mods, NULL, NULL /* returned controls */);
}
if (mapped_mods)
{
@@ -1109,7 +1197,7 @@
case SLAPI_OPERATION_DELETE:
if (delete_remote_entry_allowed(local_entry))
{
- return_value = windows_conn_send_delete(prp->conn, slapi_sdn_get_dn(remote_dn), update_control, NULL /* returned controls */);
+ return_value = windows_conn_send_delete(prp->conn, slapi_sdn_get_dn(remote_dn), NULL, NULL /* returned controls */);
slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"%s: windows_replay_update: deleted remote entry, dn=\"%s\", result=%d\n",
agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(remote_dn), return_value);
@@ -1125,7 +1213,7 @@
op->p.p_modrdn.modrdn_newrdn,
op->p.p_modrdn.modrdn_newsuperior_address.dn,
op->p.p_modrdn.modrdn_deloldrdn,
- update_control, NULL /* returned controls */);
+ NULL, NULL /* returned controls */);
break;
default:
slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name, "%s: replay_update: Unknown "
@@ -1296,7 +1384,7 @@
goto error;
}
new_entry = slapi_str2entry(entry_string, 0);
- slapi_ch_free((void**)&entry_string);
+ slapi_ch_free_string(&entry_string);
if (NULL == new_entry)
{
goto error;
@@ -1399,7 +1487,7 @@
slapi_attr_set_type(new_attr, new_type);
}
}
- slapi_ch_free((void**)&new_type);
+ slapi_ch_free_string(&new_type);
}
/* password mods are treated specially */
if (0 == slapi_attr_type_cmp(type, PSEUDO_ATTR_UNHASHEDUSERPASSWORD, SLAPI_TYPE_CMP_SUBTYPE) )
@@ -1469,7 +1557,7 @@
error:
if (username)
{
- slapi_ch_free((void**)&username);
+ slapi_ch_free_string(&username);
}
if (new_entry)
{
@@ -1633,7 +1721,7 @@
slapi_mods_add_modbvps(&mapped_smods,mod->mod_op,mapped_type,mod->mod_bvalues);
}
- slapi_ch_free((void**)&mapped_type);
+ slapi_ch_free_string(&mapped_type);
} else
{
/* password mods are treated specially */
@@ -1832,6 +1920,70 @@
return retval;
}
+/* Search for a tombstone entry in AD by DN */
+static int
+windows_get_remote_tombstone (Private_Repl_Protocol *prp, const Slapi_DN* remote_dn,Slapi_Entry **remote_entry)
+{
+ int retval = 0;
+ ConnResult cres = 0;
+ char *filter = "(objectclass=*)";
+ const char *searchbase = NULL;
+ Slapi_Entry *found_entry = NULL;
+ LDAPControl *server_controls[2];
+
+ /* We need to send the "Return Deleted Objects" control to search
+ * for tombstones. */
+ slapi_build_control(REPL_RETURN_DELETED_OBJS_CONTROL_OID, NULL, PR_TRUE,
+ &server_controls[0]);
+ server_controls[1] = NULL;
+
+ searchbase = slapi_sdn_get_dn(remote_dn);
+ cres = windows_search_entry_ext(prp->conn, (char*)searchbase, filter,
+ &found_entry, server_controls);
+ if (cres) {
+ retval = -1;
+ } else {
+ if (found_entry) {
+ *remote_entry = found_entry;
+ }
+ }
+
+ ldap_control_free(server_controls[0]);
+ return retval;
+}
+
+/* Reanimate a tombstone in AD. Returns 0 on success, otherwise you get the
+ * LDAP return code from the modify operation. */
+static int
+windows_reanimate_tombstone(Private_Repl_Protocol *prp, const Slapi_DN* tombstone_dn, const char* new_dn)
+{
+ int retval = 0;
+ LDAPControl *server_controls[2];
+ Slapi_Mods smods = {0};
+
+ /* We need to send the "Return Deleted Objects" control to modify
+ * tombstone entries. */
+ slapi_build_control(REPL_RETURN_DELETED_OBJS_CONTROL_OID, NULL, PR_TRUE,
+ &server_controls[0]);
+ server_controls[1] = NULL;
+
+ /* To reanimate a tombstone in AD, you need to send a modify
+ * operation that does two things. It must remove the isDeleted
+ * attribute from the entry and it must modify the DN. This DN
+ * does not have to be the same place in the tree that the entry
+ * previously existed. */
+ slapi_mods_init (&smods, 0);
+ slapi_mods_add_mod_values(&smods, LDAP_MOD_DELETE, "isDeleted", NULL);
+ slapi_mods_add_string(&smods, LDAP_MOD_REPLACE, "distinguishedName", new_dn);
+
+ retval = windows_conn_send_modify(prp->conn, slapi_sdn_get_dn(tombstone_dn),
+ slapi_mods_get_ldapmods_byref(&smods), server_controls, NULL );
+
+ slapi_mods_done(&smods);
+ ldap_control_free(server_controls[0]);
+ return retval;
+}
+
static int
find_entry_by_attr_value(const char *attribute, const char *value, Slapi_Entry **e, const Repl_Agmt *ra)
{
@@ -1858,7 +2010,7 @@
LDAP_SCOPE_SUBTREE, query, NULL, 0, NULL, NULL,
(void *)plugin_get_default_component_id(), 0);
slapi_search_internal_pb(pb);
- slapi_ch_free((void **)&query);
+ slapi_ch_free_string(&query);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &rval);
if (rval != LDAP_SUCCESS)
@@ -1906,9 +2058,9 @@
return find_entry_by_attr_value("ntUniqueId",guid,e,ra);
}
-/* Remove dashes from a GUID string */
+/* Remove dashes from a GUID string. */
static void
-dedash(char *str)
+dedash_guid(char *str)
{
char *p = str;
char c = '\0';
@@ -1930,10 +2082,41 @@
}
}
+/* Add dashes into a GUID string. If the guid is not formatted properly,
+ * we will free it and set the pointer to NULL. */
+static void
+dash_guid(char **str)
+{
+ if (strlen(*str) == NTUNIQUEID_LENGTH) {
+ char *p = NULL;
+ /* Add extra room for the dashes */
+ *str = slapi_ch_realloc(*str, AD_GUID_LENGTH + 1);
+
+ /* GUID needs to be in 8-4-4-4-12 format */
+ p = *str + 23;
+ memmove(p + 1, *str + 20, 12);
+ *p = '-';
+ p = *str + 18;
+ memmove(p + 1, *str + 16, 4);
+ *p = '-';
+ p = *str + 13;
+ memmove(p + 1, *str + 12, 4);
+ *p = '-';
+ p = *str + 8;
+ memmove(p + 1, *str + 8, 4);
+ *p = '-';
+ p = *str + 36;
+ *p = '\0';
+ } else {
+ /* This GUID does not appear to be valid */
+ slapi_ch_free_string(str);
+ }
+}
+
/* For reasons not clear, the GUID returned in the tombstone DN is all
* messed up, like the guy in the movie 'the fly' after he want in the tranporter device */
static void
-decrypt(char *guid)
+decrypt_guid(char *guid)
{
static int decrypt_offsets[] = {6,7,4,5,2,3,0,1,10,11,8,9,14,15,12,13,16,17,18,19,
20,21,22,23,24,25,26,27,28,29,30,31};
@@ -1948,7 +2131,7 @@
p++;
i++;
}
- slapi_ch_free((void**)&cpy);
+ slapi_ch_free_string(&cpy);
}
static char*
@@ -1971,8 +2154,8 @@
strncpy(guid,colon_offset+1,(comma_offset-colon_offset)-1);
guid[comma_offset-colon_offset-1] = '\0';
/* Finally remove the dashes since we don't store them on our side */
- dedash(guid);
- decrypt(guid);
+ dedash_guid(guid);
+ decrypt_guid(guid);
}
return guid;
}
@@ -2004,6 +2187,82 @@
return result;
}
+/* Given a local entry, map it to it's AD tombstone DN. An AD
+ * tombstone DN is formatted like:
+ *
+ * cn=<cn>\0ADEL:<guid>,cn=Deleted Objects,<suffix>
+ *
+ * This function will allocate a new Slapi_DN. It is up to the
+ * caller to free it when they are finished with it. */
+static int
+map_windows_tombstone_dn(Slapi_Entry *e, Slapi_DN **dn, Private_Repl_Protocol *prp, int *exists)
+{
+ int rc = 0;
+ char *cn = NULL;
+ char *guid = NULL;
+ const char *suffix = NULL;
+ char *tombstone_dn = NULL;
+ Slapi_Entry *tombstone = NULL;
+
+ /* Initialize the output values */
+ *dn = NULL;
+ *exists = 0;
+
+ cn = slapi_entry_attr_get_charptr(e,"cn");
+ if (!cn) {
+ cn = slapi_entry_attr_get_charptr(e,"ntuserdomainid");
+ }
+
+ guid = slapi_entry_attr_get_charptr(e,"ntUniqueId");
+ if (guid) {
+ /* the GUID is in a different form in the tombstone DN, so
+ * we need to transform it from the way we store it. */
+ decrypt_guid(guid);
+ dash_guid(&guid);
+ }
+
+ /* The tombstone suffix discards any containers, so we need
+ * to trim the DN to only dc components. */
+ if (suffix = slapi_sdn_get_dn(windows_private_get_windows_subtree(prp->agmt))) {
+ /* If this isn't found, it is treated as an error below. */
+ suffix = (const char *) strcasestr(suffix,"dc=");
+ }
+
+ if (cn && guid && suffix) {
+ tombstone_dn = PR_smprintf("cn=%s\\0ADEL:%s,cn=Deleted Objects,%s",
+ cn, guid, suffix);
+
+ /* Hand off the memory to the Slapi_DN */
+ *dn = slapi_sdn_new_dn_passin(tombstone_dn);
+
+ windows_get_remote_tombstone(prp, *dn, &tombstone);
+ if (tombstone) {
+ *exists = 1;
+ slapi_entry_free(tombstone);
+ }
+ } else {
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "%s: map_windows_tombstone_dn: Failed to map dn=\"%s\" "
+ "to windows tombstone dn.\n", agmt_get_long_name(prp->agmt),
+ slapi_entry_get_dn(e));
+ rc = 1;
+ }
+
+ slapi_ch_free_string(&cn);
+ slapi_ch_free_string(&guid);
+ return rc;
+}
+
+static int is_guid_dn(Slapi_DN *remote_dn)
+{
+ if ((remote_dn != NULL) && (strncasecmp("<GUID=",
+ slapi_sdn_get_dn(remote_dn), 6) == 0)) {
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
static char*
extract_guid_from_entry(Slapi_Entry *e, int is_nt4)
{
@@ -2151,8 +2410,54 @@
guid = slapi_entry_attr_get_charptr(e,"ntUniqueId");
if (guid && guid_form)
{
+ int rc = 0;
+ Slapi_Entry *remote_entry = NULL;
new_dn = make_dn_from_guid(guid, is_nt4, suffix);
- slapi_ch_free((void**)&guid);
+ slapi_ch_free_string(&guid);
+ /* There are certain cases where we will have a GUID, but the entry does not exist in
+ * AD. This happens when you delete an entry, then add it back elsewhere in the tree
+ * without removing the ntUniqueID attribute. We should verify that the entry really
+ * exists in AD. */
+ rc = windows_get_remote_entry(prp, new_dn, &remote_entry);
+ if (0 == rc && remote_entry) {
+ slapi_entry_free(remote_entry);
+ } else {
+ /* We need to re-write the DN to a non-GUID DN if we're syncing to a
+ * Windows 2000 Server since tombstone reanimation is not supported.
+ * If we're syncing with Windows 2003 Server, we'll just use the GUID
+ * to reanimate the tombstone when processing the add operation. */
+ *missing_entry = 1;
+ if (!windows_private_get_iswin2k3(prp->agmt)) {
+ char *new_dn_string = NULL;
+ char *cn_string = NULL;
+
+ /* We can't use a GUID DN, so rewrite to the mapped DN. */
+ cn_string = slapi_entry_attr_get_charptr(e,"cn");
+ if (!cn_string) {
+ cn_string = slapi_entry_attr_get_charptr(e,"ntuserdomainid");
+ }
+
+ if (cn_string) {
+ char *rdnstr = NULL;
+ char *container_str = NULL;
+
+ container_str = extract_container(slapi_entry_get_sdn_const(e),
+ windows_private_get_directory_subtree(prp->agmt));
+ new_dn_string = PR_smprintf("cn=%s,%s%s", cn_string, container_str, suffix);
+
+ if (new_dn_string) {
+ if (new_dn) {
+ slapi_sdn_free(&new_dn);
+ }
+ new_dn = slapi_sdn_new_dn_byval(new_dn_string);
+ PR_smprintf_free(new_dn_string);
+ }
+
+ slapi_ch_free_string(&cn_string);
+ slapi_ch_free_string(&container_str);
+ }
+ }
+ }
} else
{
/* No GUID found, try ntUserDomainId */
@@ -2204,8 +2509,8 @@
new_dn = slapi_sdn_new_dn_byval(new_dn_string);
PR_smprintf_free(new_dn_string);
}
- slapi_ch_free((void**)&cn_string);
- slapi_ch_free((void**)&container_str);
+ slapi_ch_free_string(&cn_string);
+ slapi_ch_free_string(&container_str);
}
} else
{
@@ -2217,7 +2522,7 @@
retval = -1;
}
}
- slapi_ch_free((void**)&username);
+ slapi_ch_free_string(&username);
}
if (remote_entry)
{
@@ -2280,7 +2585,7 @@
if (guid)
{
- slapi_ch_free((void**)&guid);
+ slapi_ch_free_string(&guid);
}
if (matching_entry)
{
@@ -2387,7 +2692,7 @@
}
new_dn = slapi_sdn_new_dn_byval(new_dn_string);
PR_smprintf_free(new_dn_string);
- slapi_ch_free((void**)&container_str);
+ slapi_ch_free_string(&container_str);
/* Clear any earlier error */
retval = 0;
} else
@@ -2410,7 +2715,7 @@
}
if (username)
{
- slapi_ch_free((void **) &username);
+ slapi_ch_free_string(&username);
}
return retval;
}
@@ -2542,7 +2847,7 @@
goto error;
}
local_entry = slapi_str2entry(entry_string, 0);
- slapi_ch_free((void**)&entry_string);
+ slapi_ch_free_string(&entry_string);
if (NULL == local_entry)
{
goto error;
@@ -2583,7 +2888,7 @@
{
slapi_entry_add_valueset(local_entry,new_type,vs);
}
- slapi_ch_free((void**)&new_type);
+ slapi_ch_free_string(&new_type);
}
}
if (vs)
@@ -2627,7 +2932,7 @@
}
if (username)
{
- slapi_ch_free((void**)&username);
+ slapi_ch_free_string(&username);
}
LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_create_local_entry\n", 0, 0, 0 );
return retval;
@@ -2812,7 +3117,7 @@
if (guid)
{
slapi_mods_add_string(smods,LDAP_MOD_ADD,local_type,guid);
- slapi_ch_free((void**)&guid);
+ slapi_ch_free_string(&guid);
}
} else
{
Index: windowsrepl.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windowsrepl.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- windowsrepl.h 27 Aug 2007 17:16:48 -0000 1.11
+++ windowsrepl.h 12 Sep 2007 23:05:25 -0000 1.12
@@ -51,6 +51,7 @@
LDAPControl* windows_private_dirsync_control(const Repl_Agmt *ra);
ConnResult send_dirsync_search(Repl_Connection *conn);
ConnResult windows_search_entry(Repl_Connection *conn, char* searchbase, char *filter, Slapi_Entry **entry);
+ConnResult windows_search_entry_ext(Repl_Connection *conn, char* searchbase, char *filter, Slapi_Entry **entry, LDAPControl **serverctrls);
Slapi_Entry *windows_conn_get_search_result(Repl_Connection *conn );
void windows_private_update_dirsync_control(const Repl_Agmt *ra,LDAPControl **controls );
PRBool windows_private_dirsync_has_more(const Repl_Agmt *ra);
@@ -65,6 +66,8 @@
static void windows_private_set_windows_domain(const Repl_Agmt *ra, char *domain);
int windows_private_get_isnt4(const Repl_Agmt *ra);
void windows_private_set_isnt4(const Repl_Agmt *ra, int isit);
+int windows_private_get_iswin2k3(const Repl_Agmt *ra);
+void windows_private_set_iswin2k3(const Repl_Agmt *ra, int isit);
const char* windows_private_get_purl(const Repl_Agmt *ra);
/* in windows_connection.c */
@@ -73,22 +76,23 @@
void windows_conn_delete(Repl_Connection *conn);
void windows_conn_get_error(Repl_Connection *conn, int *operation, int *error);
ConnResult windows_conn_send_add(Repl_Connection *conn, const char *dn, LDAPMod **attrs,
- LDAPControl *update_control, LDAPControl ***returned_controls);
+ LDAPControl **server_controls, LDAPControl ***returned_controls);
ConnResult windows_conn_send_delete(Repl_Connection *conn, const char *dn,
- LDAPControl *update_control, LDAPControl ***returned_controls);
+ LDAPControl **server_controls, LDAPControl ***returned_controls);
ConnResult windows_conn_send_modify(Repl_Connection *conn, const char *dn, LDAPMod **mods,
- LDAPControl *update_control, LDAPControl ***returned_controls);
+ LDAPControl **server_controls, LDAPControl ***returned_controls);
ConnResult windows_conn_send_rename(Repl_Connection *conn, const char *dn,
const char *newrdn, const char *newparent, int deleteoldrdn,
- LDAPControl *update_control, LDAPControl ***returned_controls);
+ LDAPControl **server_controls, LDAPControl ***returned_controls);
ConnResult windows_conn_send_extended_operation(Repl_Connection *conn, const char *extop_oid,
struct berval *payload, char **retoidp, struct berval **retdatap,
- LDAPControl *update_control, LDAPControl ***returned_controls);
+ LDAPControl **server_controls, LDAPControl ***returned_controls);
const char *windows_conn_get_status(Repl_Connection *conn);
void windows_conn_start_linger(Repl_Connection *conn);
void windows_conn_cancel_linger(Repl_Connection *conn);
ConnResult windows_conn_replica_supports_ds5_repl(Repl_Connection *conn);
ConnResult windows_conn_replica_supports_dirsync(Repl_Connection *conn);
+ConnResult windows_conn_replica_is_win2k3(Repl_Connection *conn);
ConnResult windows_conn_read_entry_attribute(Repl_Connection *conn, const char *dn, char *type,
struct berval ***returned_bvals);
ConnResult windows_conn_push_schema(Repl_Connection *conn, CSN **remotecsn);
@@ -102,3 +106,6 @@
/* Used to check for pre-hashed passwords when syncing */
#define PASSWD_CLEAR_PREFIX "{clear}"
#define PASSWD_CLEAR_PREFIX_LEN 7
+/* Used for GUID format conversion */
+#define NTUNIQUEID_LENGTH 32
+#define AD_GUID_LENGTH 36
16 years, 7 months
[Fedora-directory-commits] ldapserver aclocal.m4, 1.50, 1.51 configure, 1.63, 1.64 missing, 1.39, 1.40 install-sh, 1.39, 1.40 depcomp, 1.39, 1.40 compile, 1.38, 1.39 config.sub, 1.38, 1.39 config.guess, 1.38, 1.39 Makefile.in, 1.69, 1.70
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25908
Modified Files:
aclocal.m4 configure missing install-sh depcomp compile
config.sub config.guess Makefile.in
Log Message:
try to fix build breakage on RHEL5
Index: aclocal.m4
===================================================================
RCS file: /cvs/dirsec/ldapserver/aclocal.m4,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- aclocal.m4 7 Sep 2007 19:08:44 -0000 1.50
+++ aclocal.m4 12 Sep 2007 15:20:59 -0000 1.51
@@ -1578,10 +1578,27 @@
# before this can be enabled.
hardcode_into_libs=yes
+ # find out which ABI we are using
+ libsuff=
+ case "$host_cpu" in
+ x86_64*|s390x*|powerpc64*)
+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *64-bit*)
+ libsuff=64
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+ esac
+
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -4288,6 +4305,9 @@
# Is the compiler the GNU C compiler?
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
# An ERE matcher.
EGREP=$lt_EGREP
@@ -4421,11 +4441,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
+predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
+postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -4437,7 +4457,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
+compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -4517,7 +4537,7 @@
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -6353,6 +6373,7 @@
done
done
done
+IFS=$as_save_IFS
lt_ac_max=0
lt_ac_count=0
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
@@ -6385,6 +6406,7 @@
done
])
SED=$lt_cv_path_SED
+AC_SUBST([SED])
AC_MSG_RESULT([$SED])
])
Index: configure
===================================================================
RCS file: /cvs/dirsec/ldapserver/configure,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- configure 7 Sep 2007 19:08:44 -0000 1.63
+++ configure 12 Sep 2007 15:20:59 -0000 1.64
@@ -465,7 +465,7 @@
#endif"
ac_default_prefix=/opt/$PACKAGE_NAME
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CX!
XCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CP!
P CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -3836,6 +3836,7 @@
done
done
done
+IFS=$as_save_IFS
lt_ac_max=0
lt_ac_count=0
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
@@ -3870,6 +3871,7 @@
fi
SED=$lt_cv_path_SED
+
echo "$as_me:$LINENO: result: $SED" >&5
echo "${ECHO_T}$SED" >&6
@@ -4310,7 +4312,7 @@
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4313 "configure"' > conftest.$ac_ext
+ echo '#line 4315 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -5445,7 +5447,7 @@
# Provide some information about the compiler.
-echo "$as_me:5448:" \
+echo "$as_me:5450:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -6508,11 +6510,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6511: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6513: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6515: \$? = $ac_status" >&5
+ echo "$as_me:6517: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6776,11 +6778,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6779: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6781: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6783: \$? = $ac_status" >&5
+ echo "$as_me:6785: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6880,11 +6882,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6883: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6885: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:6887: \$? = $ac_status" >&5
+ echo "$as_me:6889: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8345,10 +8347,31 @@
# before this can be enabled.
hardcode_into_libs=yes
+ # find out which ABI we are using
+ libsuff=
+ case "$host_cpu" in
+ x86_64*|s390x*|powerpc64*)
+ echo '#line 8354 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *64-bit*)
+ libsuff=64
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+ esac
+
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -9225,7 +9248,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9228 "configure"
+#line 9251 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9325,7 +9348,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9328 "configure"
+#line 9351 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9656,6 +9679,9 @@
# Is the compiler the GNU C compiler?
with_gcc=$GCC
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
# An ERE matcher.
EGREP=$lt_EGREP
@@ -9789,11 +9815,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=$lt_predep_objects
+predep_objects=\`echo $lt_predep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=$lt_postdep_objects
+postdep_objects=\`echo $lt_postdep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -9805,7 +9831,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path
+compiler_lib_search_path=\`echo $lt_compiler_lib_search_path | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -9885,7 +9911,7 @@
link_all_deplibs=$link_all_deplibs
# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -11665,11 +11691,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11668: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11694: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11672: \$? = $ac_status" >&5
+ echo "$as_me:11698: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -11769,11 +11795,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11772: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11798: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11776: \$? = $ac_status" >&5
+ echo "$as_me:11802: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12301,10 +12327,31 @@
# before this can be enabled.
hardcode_into_libs=yes
+ # find out which ABI we are using
+ libsuff=
+ case "$host_cpu" in
+ x86_64*|s390x*|powerpc64*)
+ echo '#line 12334 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *64-bit*)
+ libsuff=64
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+ esac
+
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -12688,6 +12735,9 @@
# Is the compiler the GNU C compiler?
with_gcc=$GCC_CXX
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
# An ERE matcher.
EGREP=$lt_EGREP
@@ -12821,11 +12871,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=$lt_predep_objects_CXX
+predep_objects=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=$lt_postdep_objects_CXX
+postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -12837,7 +12887,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -12917,7 +12967,7 @@
link_all_deplibs=$link_all_deplibs_CXX
# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -13339,11 +13389,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13342: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13392: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13346: \$? = $ac_status" >&5
+ echo "$as_me:13396: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -13443,11 +13493,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13446: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13496: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13450: \$? = $ac_status" >&5
+ echo "$as_me:13500: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14888,10 +14938,31 @@
# before this can be enabled.
hardcode_into_libs=yes
+ # find out which ABI we are using
+ libsuff=
+ case "$host_cpu" in
+ x86_64*|s390x*|powerpc64*)
+ echo '#line 14945 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *64-bit*)
+ libsuff=64
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+ esac
+
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -15275,6 +15346,9 @@
# Is the compiler the GNU C compiler?
with_gcc=$GCC_F77
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
# An ERE matcher.
EGREP=$lt_EGREP
@@ -15408,11 +15482,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=$lt_predep_objects_F77
+predep_objects=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=$lt_postdep_objects_F77
+postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -15424,7 +15498,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_F77
+compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -15504,7 +15578,7 @@
link_all_deplibs=$link_all_deplibs_F77
# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -15646,11 +15720,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15649: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15723: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15653: \$? = $ac_status" >&5
+ echo "$as_me:15727: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -15914,11 +15988,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15917: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15991: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15921: \$? = $ac_status" >&5
+ echo "$as_me:15995: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16018,11 +16092,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16021: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16095: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16025: \$? = $ac_status" >&5
+ echo "$as_me:16099: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17483,10 +17557,31 @@
# before this can be enabled.
hardcode_into_libs=yes
+ # find out which ABI we are using
+ libsuff=
+ case "$host_cpu" in
+ x86_64*|s390x*|powerpc64*)
+ echo '#line 17564 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *64-bit*)
+ libsuff=64
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+ esac
+
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -17870,6 +17965,9 @@
# Is the compiler the GNU C compiler?
with_gcc=$GCC_GCJ
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
# An ERE matcher.
EGREP=$lt_EGREP
@@ -18003,11 +18101,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=$lt_predep_objects_GCJ
+predep_objects=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=$lt_postdep_objects_GCJ
+postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -18019,7 +18117,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
+compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -18099,7 +18197,7 @@
link_all_deplibs=$link_all_deplibs_GCJ
# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -18351,6 +18449,9 @@
# Is the compiler the GNU C compiler?
with_gcc=$GCC_RC
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
# An ERE matcher.
EGREP=$lt_EGREP
@@ -18484,11 +18585,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=$lt_predep_objects_RC
+predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=$lt_postdep_objects_RC
+postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -18500,7 +18601,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_RC
+compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -18580,7 +18681,7 @@
link_all_deplibs=$link_all_deplibs_RC
# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -25919,6 +26020,7 @@
s,@CCDEPMODE@,$CCDEPMODE,;t t
s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
+s,@SED@,$SED,;t t
s,@EGREP@,$EGREP,;t t
s,@LN_S@,$LN_S,;t t
s,@ECHO@,$ECHO,;t t
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/Makefile.in,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- Makefile.in 7 Sep 2007 19:08:44 -0000 1.69
+++ Makefile.in 12 Sep 2007 15:20:59 -0000 1.70
@@ -850,6 +850,7 @@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SOLARIS_FALSE = @SOLARIS_FALSE@
16 years, 7 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication repl5_plugins.c, 1.7, 1.8
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24462/ldapserver/ldap/servers/plugins/replication
Modified Files:
repl5_plugins.c
Log Message:
Resolves: bug 283041
Bug Description: MMR: Directory updates on same object
Reviewed by: nhosoi (Thanks!)
Fix Description: The problem does appear to be concurrency. I think the original intention of
the urp fixup code was that it should only be run inside the database lock, so
that the database could be restored to a consistent state before the next
operation was processed. However, this requires the database code to know when
the database is already locked, so that if e.g. a modrdn operation needs to
call an internal delete, the database should not be locked again. The flag
OP_FLAG_REPL_FIXUP is used to denote both that the operation is such an
internal operation, and that the database should not be locked again.
There are a couple of cases where these operations can be called from outside
of the database lock:
urp_fixup_rename_entry is called from multimaster_postop_modrdn and
multimaster_postop_delete, both of which are front end post op plugins, not
called from within the database lock. Same with urp_fixup_delete_entry and
urp_fixup_modify_entry. In other cases, such as urp_fixup_add_entry, and other
places where urp_fixup_rename_entry and urp_fixup_modify_entry are called, they
are called from a bepostop plugin function, which is called after the original
database operation has been processed, within the database lock. So the
solution appears to be to move the urp_* functions to the bepostop plugin
functions. One of these functions does an internal search -
urp_get_min_naming_conflict_entry - but it does not appear that search locks
the database, so there was nothing to be done to make it "reentrant".
Without this patch, I can crash the server in a matter of minutes (x86_64
rhel5) using the latest Fedora DS 1.1 code. With the patch, the server runs
for several hours (maybe longer, I had to stop the test).
Also, to really exercise the urp code, I added a rename operation between the
add and delete e.g.
add("ou=test");
rename("ou=test", "ou=test2");
delete("ou=test2");
The server still runs for several hours with no problems.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
Index: repl5_plugins.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_plugins.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- repl5_plugins.c 10 Nov 2006 23:45:17 -0000 1.7
+++ repl5_plugins.c 12 Sep 2007 00:59:53 -0000 1.8
@@ -789,12 +789,26 @@
int
multimaster_bepostop_modrdn (Slapi_PBlock *pb)
{
+ Slapi_Operation *op;
+
+ slapi_pblock_get(pb, SLAPI_OPERATION, &op);
+ if ( ! operation_is_flag_set (op, OP_FLAG_REPL_FIXUP) )
+ {
+ urp_post_modrdn_operation (pb);
+ }
return 0;
}
int
multimaster_bepostop_delete (Slapi_PBlock *pb)
{
+ Slapi_Operation *op;
+
+ slapi_pblock_get(pb, SLAPI_OPERATION, &op);
+ if ( ! operation_is_flag_set (op, OP_FLAG_REPL_FIXUP) )
+ {
+ urp_post_delete_operation (pb);
+ }
return 0;
}
@@ -814,16 +828,7 @@
int
multimaster_postop_delete (Slapi_PBlock *pb)
{
- int rc;
- Slapi_Operation *op;
-
- slapi_pblock_get(pb, SLAPI_OPERATION, &op);
- if ( ! operation_is_flag_set (op, OP_FLAG_REPL_FIXUP) )
- {
- urp_post_delete_operation (pb);
- }
- rc = process_postop(pb);
- return rc;
+ return process_postop(pb);
}
int
@@ -835,16 +840,7 @@
int
multimaster_postop_modrdn (Slapi_PBlock *pb)
{
- int rc;
- Slapi_Operation *op;
-
- slapi_pblock_get(pb, SLAPI_OPERATION, &op);
- if ( ! operation_is_flag_set (op, OP_FLAG_REPL_FIXUP) )
- {
- urp_post_modrdn_operation (pb);
- }
- rc = process_postop(pb);
- return rc;
+ return process_postop(pb);
}
16 years, 7 months
[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts DSMigration.pm.in, 1.10, 1.11
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26837/ldapserver/ldap/admin/src/scripts
Modified Files:
DSMigration.pm.in
Log Message:
Resolves: bug 282741
Bug Description: Show-Stopper - Migration from DS 6.21 to DS80
Reviewed by: nhosoi (Thanks!)
Fix Description: Added a new function migrateNetscapeRoot which will create a temporary LDIF file from the given NetscapeRoot.ldif file. The function will look for all \bNetscape\b occurances and convert them to @capbrand@ where that is defined as the capitalized brand name in configure. It will then import this temporary LDIF file and delete it.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
QA impact: should be covered by regular nightly and manual testing
New Tests integrated into TET: none
Index: DSMigration.pm.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSMigration.pm.in,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- DSMigration.pm.in 4 Sep 2007 17:50:49 -0000 1.10
+++ DSMigration.pm.in 8 Sep 2007 02:16:27 -0000 1.11
@@ -62,6 +62,8 @@
use Mozilla::LDAP::API qw(ldap_explode_dn);
use Mozilla::LDAP::LDIF;
+use Carp;
+
use Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(migrateDS);
@@ -253,6 +255,35 @@
return ();
}
+# older versions may use the old Netscape names e.g. Netscape Administration Server
+# we have to convert these to the new names e.g. @capbrand@ Administration Server
+sub migrateNetscapeRoot {
+ my $ldiffile = shift;
+ my ($fh, $tmpldiffile);
+ # create a temp inf file for writing for other processes
+ # never overwrite the user supplied inf file
+ ($fh, $tmpldiffile) = tempfile("nsrootXXXXXX", UNLINK => 0,
+ SUFFIX => ".ldif", OPEN => 1,
+ DIR => File::Spec->tmpdir);
+ open( MYLDIF, "$ldiffile" ) || confess "Can't open $ldiffile: $!";
+ my $in = new Mozilla::LDAP::LDIF(*MYLDIF);
+ while (my $ent = readOneEntry $in) {
+ my $dn = $ent->getDN();
+ $dn =~ s/\bNetscape\b/@capbrand@/g;
+ $ent->setDN($dn);
+ foreach my $attr (keys %{$ent}) {
+ my @vals = $ent->getValues($attr);
+ map { s/\bNetscape\b/@capbrand@/g } @vals;
+ $ent->setValues($attr, @vals);
+ }
+ Mozilla::LDAP::LDIF::put_LDIF($fh, 78, $ent);
+ }
+ close( MYLDIF );
+ close( $fh );
+
+ return $tmpldiffile;
+}
+
# migrate all of the databases in an instance
sub migrateDatabases {
my $mig = shift; # the Migration object
@@ -269,13 +300,22 @@
# database
my $foundldif;
for (glob("$mig->{oldsroot}/$inst/db/*.ldif")) {
- my $dbname = basename($_, '.ldif');
- my $cmd = "$inst_dir/ldif2db -n \"$dbname\" -i \"$_\"";
+ my $fname = $_;
+ my $dbname = basename($fname, '.ldif');
+ my $deleteflag = 0;
+ if ($fname =~ /NetscapeRoot.ldif$/) {
+ $fname = migrateNetscapeRoot($fname);
+ $deleteflag = 1;
+ }
+ my $cmd = "$inst_dir/ldif2db -n \"$dbname\" -i \"$fname\"";
debug(1, "migrateDatabases: executing command $cmd\n");
$? = 0; # clear error condition
my $output = `$cmd 2>&1`;
+ if ($deleteflag) {
+ unlink($fname);
+ }
if ($?) {
- return ('error_importing_migrated_db', $_, $?, $output);
+ return ('error_importing_migrated_db', $fname, $?, $output);
}
debug(1, $output);
$foundldif = 1;
16 years, 7 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/ldclt ldapfct.c, 1.4, 1.5
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17132/ldapserver/ldap/servers/slapd/tools/ldclt
Modified Files:
ldapfct.c
Log Message:
Resolves: bug 244475
Bug Description: crash at startup with new ldap sdk on 64-bit platform
Reviewed by: nkinder (Thanks!)
Fix Description: Use LBER_SOCKET as the socket type instead of int. There was also a place in ldclt where we were doing the same thing.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
Index: ldapfct.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/ldapfct.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ldapfct.c 5 Jul 2007 23:53:41 -0000 1.4
+++ ldapfct.c 7 Sep 2007 19:49:51 -0000 1.5
@@ -586,7 +586,7 @@
thread_context *tttctx)
{
int ret; /* Return value */
- int fd; /* LDAP cnx's fd */
+ LBER_SOCKET fd; /* LDAP cnx's fd */
int v2v3; /* LDAP version used */
/*
@@ -623,9 +623,9 @@
}
#endif
#ifdef TRACE_FD_GET_OPTION_BUG
- printf ("ldclt[%d]: T%03d: fd=%d\n", mctx.pid, tttctx->thrdNum, fd);
+ printf ("ldclt[%d]: T%03d: fd=%d\n", mctx.pid, tttctx->thrdNum, (int)fd);
#endif
- if (close (fd) < 0)
+ if (close ((int)fd) < 0)
{
perror ("ldctx");
printf ("ldclt[%d]: T%03d: cannot close(fd=%d), error=%d (%s)\n",
16 years, 7 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd conntable.c, 1.7, 1.8
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17132/ldapserver/ldap/servers/slapd
Modified Files:
conntable.c
Log Message:
Resolves: bug 244475
Bug Description: crash at startup with new ldap sdk on 64-bit platform
Reviewed by: nkinder (Thanks!)
Fix Description: Use LBER_SOCKET as the socket type instead of int. There was also a place in ldclt where we were doing the same thing.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
Index: conntable.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/conntable.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- conntable.c 10 Nov 2006 23:45:40 -0000 1.7
+++ conntable.c 7 Sep 2007 19:49:51 -0000 1.8
@@ -62,7 +62,7 @@
*/
for ( i = 0; i < table_size; i++ )
{
- int invalid_socket;
+ LBER_SOCKET invalid_socket;
ber_len_t maxbersize = config_get_maxbersize();
/* DBDB---move this out of here once everything works */
ct->c[i].c_sb = ber_sockbuf_alloc();
16 years, 7 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm dbverify.c, NONE, 1.1 dblayer.c, 1.19, 1.20 init.c, 1.8, 1.9 proto-back-ldbm.h, 1.11, 1.12
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13862/ldap/servers/slapd/back-ldbm
Modified Files:
dblayer.c init.c proto-back-ldbm.h
Added Files:
dbverify.c
Log Message:
Resolves: #236256
Summary: verify-db.pl (db_verify) does not work on a little endian machine
(comment #1-#4)
Description: 1) introducing dbverify mode to ns-slapd.
2) providing new script dbverify to call "ns-slapd dbverify"
3) fixing verify-db.pl to call dbverify instead of db_verify from BDB
--- NEW FILE dbverify.c ---
/** BEGIN COPYRIGHT BLOCK
* This Program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; version 2 of the License.
*
* This Program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
* In addition, as a special exception, Red Hat, Inc. gives You the additional
* right to link the code of this Program with code not covered under the GNU
* General Public License ("Non-GPL Code") and to distribute linked combinations
* including the two, subject to the limitations in this paragraph. Non-GPL Code
* permitted under this exception must only link to the code of this Program
* through those well defined interfaces identified in the file named EXCEPTION
* found in the source code files (the "Approved Interfaces"). The files of
* Non-GPL Code may instantiate templates or use macros or inline functions from
* the Approved Interfaces without causing the resulting work to be covered by
* the GNU General Public License. Only Red Hat, Inc. may make changes or
* additions to the list of Approved Interfaces. You must obey the GNU General
* Public License in all respects for all of the Program code and other code used
* in conjunction with the Program except the Non-GPL Code covered by this
* exception. If you modify this file, you may extend this exception to your
* version of the file, but you are not obligated to do so. If you do not wish to
* provide this exception without modification, you must delete this exception
* statement from your version and license this file solely under the GPL without
* exception.
*
* Copyright (C) 2007 Red Hat, Inc.
* All rights reserved.
* END COPYRIGHT BLOCK **/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* dbverify.c - verify database files */
#include "back-ldbm.h"
#include "dblayer.h"
static int
dbverify_ext( ldbm_instance *inst, int verbose )
{
char dbdir[MAXPATHLEN];
char *filep = NULL;
PRDir *dirhandle = NULL;
PRDirEntry *direntry = NULL;
backend *be = inst->inst_be;
DB *dbp = NULL;
int tmplen = 0;
int filelen = 0;
int rval = 1;
int rval_main = 0;
struct ldbminfo *li = inst->inst_li;
dblayer_private *priv = (dblayer_private*)li->li_dblayer_private;
struct dblayer_private_env *pEnv = priv->dblayer_env;
dbdir[sizeof(dbdir)-1] = '\0';
PR_snprintf(dbdir, sizeof(dbdir), "%s/%s", inst->inst_parent_dir_name,
inst->inst_dir_name);
if ('\0' != dbdir[sizeof(dbdir)-1]) /* overflown */
{
slapi_log_error(SLAPI_LOG_FATAL, "DB verify",
"db path too long: %s/%s\n",
inst->inst_parent_dir_name, inst->inst_dir_name, 0);
return 1;
}
tmplen = strlen(dbdir);
filep = dbdir + tmplen;
filelen = sizeof(dbdir) - tmplen;
/* run dbverify on each each db file */
dirhandle = PR_OpenDir(dbdir);
if (! dirhandle)
{
slapi_log_error(SLAPI_LOG_FATAL, "DB verify",
"PR_OpenDir (%s) failed (%d): %s\n",
dbdir, PR_GetError(),slapd_pr_strerror(PR_GetError()));
return 1;
}
while (NULL !=
(direntry = PR_ReadDir(dirhandle, PR_SKIP_DOT | PR_SKIP_DOT_DOT)))
{
/* struct attrinfo *ai = NULL; */
char *p = NULL;
dbp = NULL;
if (!direntry->name)
{
break;
}
if (!strstr(direntry->name, LDBM_FILENAME_SUFFIX)) /* non db file */
{
continue;
}
if (sizeof(direntry->name) + 2 > filelen)
{
slapi_log_error(SLAPI_LOG_FATAL, "DB verify",
"db path too long: %s/%s%s\n",
dbdir, direntry->name, 0);
continue;
}
PR_snprintf(filep, filelen, "/%s", direntry->name);
rval = db_create(&dbp, pEnv->dblayer_DB_ENV, 0);
if (0 != rval)
{
slapi_log_error(SLAPI_LOG_FATAL, "DB verify",
"Unable to create id2entry db file %d\n", rval);
return rval;
}
#define VLVPREFIX "vlv#"
if ((0 != strncmp(direntry->name, ID2ENTRY, strlen(ID2ENTRY))) &&
(0 != strncmp(direntry->name, VLVPREFIX, strlen(VLVPREFIX))))
{
rval = dbp->set_flags(dbp, DB_DUP | DB_DUPSORT);
if (0 != rval)
{
slapi_log_error(SLAPI_LOG_FATAL, "DB verify",
"Unable to set DUP flags to db %d\n", rval);
return rval;
}
rval = dbp->set_dup_compare(dbp, idl_new_compare_dups);
if (0 != rval)
{
slapi_log_error(SLAPI_LOG_FATAL, "DB verify",
"Unable to set dup_compare to db %d\n", rval);
return rval;
}
}
#undef VLVPREFIX
rval = dbp->verify(dbp, dbdir, NULL, NULL, 0);
if (0 == rval)
{
if (verbose)
{
slapi_log_error(SLAPI_LOG_FATAL, "DB verify",
"%s: ok\n", dbdir);
}
}
else
{
slapi_log_error(SLAPI_LOG_FATAL, "DB verify",
"verify failed(%d): %s\n", rval, dbdir);
}
rval_main |= rval;
*filep = '\0';
}
PR_CloseDir(dirhandle);
return rval_main;
}
int
ldbm_back_dbverify( Slapi_PBlock *pb )
{
struct ldbminfo *li = NULL;
Object *inst_obj = NULL;
ldbm_instance *inst = NULL;
int verbose = 0;
int rval = 1;
int rval_main = 0;
char **instance_names = NULL;
slapi_log_error(SLAPI_LOG_TRACE, "verify DB", "Verifying db files...\n");
slapi_pblock_get(pb, SLAPI_BACKEND_INSTANCE_NAME, &instance_names);
slapi_pblock_get(pb, SLAPI_SEQ_VAL, &verbose);
slapi_pblock_get(pb, SLAPI_PLUGIN_PRIVATE, &li);
ldbm_config_load_dse_info(li);
ldbm_config_internal_set(li, CONFIG_DB_TRANSACTION_LOGGING, "off");
/* no write needed; choose EXPORT MODE */
if (0 != dblayer_start(li, DBLAYER_EXPORT_MODE))
{
slapi_log_error(SLAPI_LOG_FATAL, "verify DB",
"dbverify: Failed to init database\n");
return rval;
}
/* server is up */
slapi_log_error(SLAPI_LOG_TRACE, "verify DB", "server is up\n");
if (instance_names) /* instance is specified */
{
char **inp = NULL;
for (inp = instance_names; inp && *inp; inp++)
{
inst = ldbm_instance_find_by_name(li, *inp);
if (inst)
{
rval_main |= dbverify_ext(inst, verbose);
}
else
{
rval_main |= 1; /* no such instance */
}
}
}
else /* all instances */
{
for (inst_obj = objset_first_obj(li->li_instance_set); inst_obj;
inst_obj = objset_next_obj(li->li_instance_set, inst_obj))
{
inst = (ldbm_instance *)object_get_data(inst_obj);
/* check if an import/restore is already ongoing... */
if (instance_set_busy(inst) != 0)
{
/* standalone, only. never happens */
slapi_log_error(SLAPI_LOG_FATAL, "upgrade DB",
"ldbm: '%s' is already in the middle of "
"another task and cannot be disturbed.\n",
inst->inst_name);
continue; /* skip this instance and go to the next*/
}
rval_main |= dbverify_ext(inst, verbose);
}
}
/* close the database down again */
rval = dblayer_post_close(li, DBLAYER_EXPORT_MODE);
if (0 != rval)
{
slapi_log_error(SLAPI_LOG_FATAL,
"verify DB", "Failed to close database\n");
}
return rval_main;
}
Index: dblayer.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dblayer.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- dblayer.c 16 Aug 2007 19:28:58 -0000 1.19
+++ dblayer.c 7 Sep 2007 19:08:45 -0000 1.20
@@ -2522,8 +2522,11 @@
}
}
#endif
- commit_good_database(priv);
-
+ if (0 == return_value
+ && !((DBLAYER_ARCHIVE_MODE|DBLAYER_EXPORT_MODE) & dbmode)
+ && !priv->dblayer_bad_stuff_happened) {
+ commit_good_database(priv);
+ }
return return_value;
}
Index: init.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/init.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- init.c 10 Nov 2006 23:45:39 -0000 1.8
+++ init.c 7 Sep 2007 19:08:45 -0000 1.9
@@ -209,6 +209,8 @@
(void *) ldbm_back_ldbm2archive );
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_DB_UPGRADEDB_FN,
(void *) ldbm_back_upgradedb );
+ rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_DB_DBVERIFY_FN,
+ (void *) ldbm_back_dbverify );
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_DB_BEGIN_FN,
(void *) dblayer_plugin_begin );
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_DB_COMMIT_FN,
Index: proto-back-ldbm.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- proto-back-ldbm.h 15 Mar 2007 21:34:32 -0000 1.11
+++ proto-back-ldbm.h 7 Sep 2007 19:08:45 -0000 1.12
@@ -448,6 +448,7 @@
int ldbm_back_archive2ldbm( Slapi_PBlock *pb );
int ldbm_back_ldbm2archive( Slapi_PBlock *pb );
int ldbm_back_upgradedb( Slapi_PBlock *pb );
+int ldbm_back_dbverify( Slapi_PBlock *pb );
int ldbm_back_next_search_entry( Slapi_PBlock *pb );
int ldbm_back_next_search_entry_ext( Slapi_PBlock *pb, int use_extension );
int ldbm_back_db_test( Slapi_PBlock *pb );
16 years, 7 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd main.c, 1.20, 1.21 pblock.c, 1.9, 1.10 slap.h, 1.25, 1.26 slapi-private.h, 1.15, 1.16 task.c, 1.11, 1.12
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13862/ldap/servers/slapd
Modified Files:
main.c pblock.c slap.h slapi-private.h task.c
Log Message:
Resolves: #236256
Summary: verify-db.pl (db_verify) does not work on a little endian machine
(comment #1-#4)
Description: 1) introducing dbverify mode to ns-slapd.
2) providing new script dbverify to call "ns-slapd dbverify"
3) fixing verify-db.pl to call dbverify instead of db_verify from BDB
Index: main.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/main.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- main.c 17 Aug 2007 02:12:37 -0000 1.20
+++ main.c 7 Sep 2007 19:08:45 -0000 1.21
@@ -112,6 +112,7 @@
static int slapd_exemode_archive2db();
static int slapd_exemode_db2archive();
static int slapd_exemode_upgradedb();
+static int slapd_exemode_dbverify();
static int slapd_exemode_dbtest();
static int slapd_exemode_suffix2instance();
static int slapd_debug_level_string2level( const char *s );
@@ -374,16 +375,16 @@
exemode = SLAPD_EXEMODE_REFERRAL;
} else if ( strcmp( s, "suffix2instance" ) == 0 ) {
exemode = SLAPD_EXEMODE_SUFFIX2INSTANCE;
- }
- else if ( strcmp( s, "upgradedb" ) == 0 )
- {
+ } else if ( strcmp( s, "upgradedb" ) == 0 ) {
exemode = SLAPD_EXEMODE_UPGRADEDB;
+ } else if ( strcmp( s, "dbverify" ) == 0 ) {
+ exemode = SLAPD_EXEMODE_DBVERIFY;
}
else if ( exit_if_unknown ) {
fprintf( stderr, "usage: %s -D configdir "
"[ldif2db | db2ldif | archive2db "
"| db2archive | db2index | refer | suffix2instance"
- " | upgradedb] "
+ " | upgradedb | dbverify] "
"[options]\n", progname );
exit( 1 );
} else {
@@ -443,6 +444,9 @@
case SLAPD_EXEMODE_UPGRADEDB:
usagestr = "usage: %s %s%s-D configdir [-d debuglevel] [-f] -a archivedir\n";
break;
+ case SLAPD_EXEMODE_DBVERIFY:
+ usagestr = "usage: %s %s%s-D configdir [-d debuglevel] [-n backend-instance-name]\n";
+ break;
default: /* SLAPD_EXEMODE_SLAPD */
usagestr = "usage: %s %s%s-D configdir [-d debuglevel] "
@@ -480,7 +484,8 @@
static int db2ldif_dump_replica = 0;
static int db2ldif_dump_uniqueid = 1;
static int ldif2db_generate_uniqueid = SLAPI_UNIQUEID_GENERATE_TIME_BASED;
-static int ldif2db_load_state= 1;
+static int ldif2db_load_state = 1;
+static int dbverify_verbose = 0;
static char *ldif2db_namespaceid = NULL;
int importexport_encrypt = 0;
static int upgradedb_force = 0;
@@ -983,6 +988,13 @@
case SLAPD_EXEMODE_UPGRADEDB:
return slapd_exemode_upgradedb();
+ case SLAPD_EXEMODE_DBVERIFY:
+ return_value = slapd_exemode_dbverify();
+ if (return_value == 0)
+ return return_value;
+ else
+ return 1;
+
case SLAPD_EXEMODE_PRINTVERSION:
slapd_print_version(1);
exit(1);
@@ -1368,6 +1380,15 @@
{"configDir",ArgRequired,'D'},
{0,0,0}};
+ char *opts_dbverify = "vVfd:n:D:";
+ struct opt_ext long_options_dbverify[] = {
+ {"version",ArgNone,'v'},
+ {"debug",ArgRequired,'d'},
+ {"backend",ArgRequired,'n'},
+ {"configDir",ArgRequired,'D'},
+ {"verbose",ArgNone,'V'},
+ {0,0,0}};
+
char *opts_referral = "vd:p:r:SD:";
struct opt_ext long_options_referral[] = {
{"version",ArgNone,'v'},
@@ -1464,6 +1485,10 @@
opts = opts_upgradedb;
long_opts = long_options_upgradedb;
break;
+ case SLAPD_EXEMODE_DBVERIFY:
+ opts = opts_dbverify;
+ long_opts = long_options_dbverify;
+ break;
default: /* SLAPD_EXEMODE_SLAPD */
opts = opts_slapd;
long_opts = long_options_slapd;
@@ -1567,7 +1592,8 @@
slapd_exemode == SLAPD_EXEMODE_ARCHIVE2DB) {
/* The -n argument will give the name of a backend instance. */
cmd_line_instance_name = optarg_ext;
- } else if (slapd_exemode == SLAPD_EXEMODE_DB2LDIF) {
+ } else if (slapd_exemode == SLAPD_EXEMODE_DB2LDIF ||
+ slapd_exemode == SLAPD_EXEMODE_DBVERIFY) {
char *s = slapi_ch_strdup(optarg_ext);
charray_add(&cmd_line_instance_names, s);
} else {
@@ -1726,7 +1752,11 @@
break;
case 'V':
- slapd_exemode = SLAPD_EXEMODE_PRINTVERSION;
+ if ( slapd_exemode == SLAPD_EXEMODE_DBVERIFY ) {
+ dbverify_verbose = 1;
+ } else {
+ slapd_exemode = SLAPD_EXEMODE_PRINTVERSION;
+ }
break;
case 'a': /* archive pathname for db */
@@ -2004,7 +2034,7 @@
exit( 1 );
}
- /* this should be the first time this are called! if the init order
+ /* this should be the first time to be called! if the init order
* is ever changed, these lines should be changed (or erased)!
*/
mapping_tree_init();
@@ -2546,7 +2576,7 @@
exit( 1 );
}
- /* this should be the first time this are called! if the init order
+ /* this should be the first time to be called! if the init order
* is ever changed, these lines should be changed (or erased)!
*/
mapping_tree_init();
@@ -2601,10 +2631,58 @@
return( return_value );
}
+/*
+ * function to perform DB verify
+ */
+static int
+slapd_exemode_dbverify()
+{
+ int return_value = 0;
+ Slapi_PBlock pb;
+ struct slapdplugin *backend_plugin;
+ slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
+
+ /* this should be the first time to be called! if the init order
+ * is ever changed, these lines should be changed (or erased)!
+ */
+ mapping_tree_init();
+ if ((backend_plugin = plugin_get_by_name("ldbm database")) == NULL) {
+ LDAPDebug(LDAP_DEBUG_ANY,
+ "ERROR: Could not find the ldbm backend plugin.\n",
+ 0, 0, 0);
+ exit(1);
+ }
+
+ /* check for slapi v2 support */
+ if (! SLAPI_PLUGIN_IS_V2(backend_plugin)) {
+ LDAPDebug(LDAP_DEBUG_ANY, "ERROR: %s is too old to do dbverify.\n",
+ backend_plugin->plg_name, 0, 0);
+ exit(1);
+ }
+
+ memset( &pb, '\0', sizeof(pb) );
+ pb.pb_backend = NULL;
+ pb.pb_seq_val = dbverify_verbose;
+ pb.pb_plugin = backend_plugin;
+ pb.pb_instance_name = (char *)cmd_line_instance_names;
+ pb.pb_task_flags = TASK_RUNNING_FROM_COMMANDLINE;
+
+ if ( backend_plugin->plg_dbverify != NULL ) {
+ return_value = (*backend_plugin->plg_dbverify)( &pb );
+ } else {
+ LDAPDebug( LDAP_DEBUG_ANY,
+ "ERROR: no db verify function defined for "
+ "%s\n", backend_plugin->plg_name, 0, 0 );
+ return_value = -1;
+ }
+
+ return( return_value );
+}
+
static int
slapd_exemode_dbtest()
-{
+{
int return_value= 0;
Slapi_PBlock pb;
struct slapdplugin *plugin;
Index: pblock.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/pblock.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- pblock.c 27 Feb 2007 02:57:30 -0000 1.9
+++ pblock.c 7 Sep 2007 19:08:45 -0000 1.10
@@ -617,6 +617,12 @@
}
(*(IFP *)value) = pblock->pb_plugin->plg_upgradedb;
break;
+ case SLAPI_PLUGIN_DB_DBVERIFY_FN:
+ if ( pblock->pb_plugin->plg_type != SLAPI_PLUGIN_DATABASE ) {
+ return( -1 );
+ }
+ (*(IFP *)value) = pblock->pb_plugin->plg_dbverify;
+ break;
case SLAPI_PLUGIN_DB_BEGIN_FN:
if ( pblock->pb_plugin->plg_type != SLAPI_PLUGIN_DATABASE ) {
return( -1 );
@@ -1886,6 +1892,12 @@
}
pblock->pb_plugin->plg_upgradedb = (IFP) value;
break;
+ case SLAPI_PLUGIN_DB_DBVERIFY_FN:
+ if ( pblock->pb_plugin->plg_type != SLAPI_PLUGIN_DATABASE ) {
+ return( -1 );
+ }
+ pblock->pb_plugin->plg_dbverify = (IFP) value;
+ break;
case SLAPI_PLUGIN_DB_BEGIN_FN:
if ( pblock->pb_plugin->plg_type != SLAPI_PLUGIN_DATABASE ) {
return( -1 );
Index: slap.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slap.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- slap.h 17 Aug 2007 02:12:37 -0000 1.25
+++ slap.h 7 Sep 2007 19:08:45 -0000 1.26
@@ -65,8 +65,9 @@
#define SLAPD_EXEMODE_DB2INDEX 7
#define SLAPD_EXEMODE_REFERRAL 8
#define SLAPD_EXEMODE_SUFFIX2INSTANCE 9
-#define SLAPD_EXEMODE_PRINTVERSION 10
+#define SLAPD_EXEMODE_PRINTVERSION 10
#define SLAPD_EXEMODE_UPGRADEDB 11
+#define SLAPD_EXEMODE_DBVERIFY 12
#ifdef _WIN32
#ifndef DONT_DECLARE_SLAPD_LDAP_DEBUG
@@ -766,14 +767,14 @@
IFP plg_un_db_flush; /* close */
IFP plg_un_db_seq; /* sequence */
IFP plg_un_db_entry; /* entry send */
- IFP plg_un_db_referral; /* referral send */
+ IFP plg_un_db_referral; /* referral send */
IFP plg_un_db_result; /* result send */
IFP plg_un_db_ldif2db; /* ldif 2 database */
IFP plg_un_db_db2ldif; /* database 2 ldif */
IFP plg_un_db_db2index; /* database 2 index */
- IFP plg_un_db_archive2db; /* ldif 2 database */
- IFP plg_un_db_db2archive; /* database 2 ldif */
- IFP plg_un_db_upgradedb; /* convert old idl to new */
+ IFP plg_un_db_archive2db; /* ldif 2 database */
+ IFP plg_un_db_db2archive; /* database 2 ldif */
+ IFP plg_un_db_upgradedb; /* convert old idl to new */
IFP plg_un_db_begin; /* dbase txn begin */
IFP plg_un_db_commit; /* dbase txn commit */
IFP plg_un_db_abort; /* dbase txn abort */
@@ -784,6 +785,7 @@
IFP plg_un_db_register_oc_callback; /* Register a function to call when a operation is applied to a given ObjectClass */
IFP plg_un_db_init_instance; /* initializes new db instance */
IFP plg_un_db_wire_import; /* fast replica update */
+ IFP plg_un_db_verify; /* verify db files */
} plg_un_db;
#define plg_bind plg_un.plg_un_db.plg_un_db_bind
#define plg_unbind plg_un.plg_un_db.plg_un_db_unbind
@@ -809,6 +811,7 @@
#define plg_archive2db plg_un.plg_un_db.plg_un_db_archive2db
#define plg_db2archive plg_un.plg_un_db.plg_un_db_db2archive
#define plg_upgradedb plg_un.plg_un_db.plg_un_db_upgradedb
+#define plg_dbverify plg_un.plg_un_db.plg_un_db_verify
#define plg_dbsize plg_un.plg_un_db.plg_un_db_dbsize
#define plg_dbtest plg_un.plg_un_db.plg_un_db_dbtest
#define plg_rmdb plg_un.plg_un_db.plg_un_db_rmdb
Index: slapi-private.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-private.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- slapi-private.h 14 Dec 2006 23:16:54 -0000 1.15
+++ slapi-private.h 7 Sep 2007 19:08:45 -0000 1.16
@@ -829,9 +829,10 @@
#define SLAPI_PLUGIN_DB_DB2INDEX_FN 228
#define SLAPI_PLUGIN_DB_NEXT_SEARCH_ENTRY_EXT_FN 229
#define SLAPI_PLUGIN_DB_ENTRY_RELEASE_FN 230
-#define SLAPI_PLUGIN_DB_INIT_INSTANCE_FN 231
-#define SLAPI_PLUGIN_DB_WIRE_IMPORT_FN 234
+#define SLAPI_PLUGIN_DB_INIT_INSTANCE_FN 231
+#define SLAPI_PLUGIN_DB_WIRE_IMPORT_FN 234
#define SLAPI_PLUGIN_DB_UPGRADEDB_FN 235
+#define SLAPI_PLUGIN_DB_DBVERIFY_FN 236
/* database plugin-specific parameters */
#define SLAPI_PLUGIN_DB_NO_ACL 250
#define SLAPI_PLUGIN_DB_RMDB_FN 280
Index: task.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/task.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- task.c 9 Apr 2007 23:02:41 -0000 1.11
+++ task.c 7 Sep 2007 19:08:45 -0000 1.12
@@ -55,13 +55,13 @@
static int shutting_down = 0;
-#define TASK_BASE_DN "cn=tasks, cn=config"
-#define TASK_IMPORT_DN "cn=import, cn=tasks, cn=config"
-#define TASK_EXPORT_DN "cn=export, cn=tasks, cn=config"
-#define TASK_BACKUP_DN "cn=backup, cn=tasks, cn=config"
-#define TASK_RESTORE_DN "cn=restore, cn=tasks, cn=config"
-#define TASK_INDEX_DN "cn=index, cn=tasks, cn=config"
-#define TASK_UPGRADEDB_DN "cn=upgradedb, cn=tasks, cn=config"
+#define TASK_BASE_DN "cn=tasks, cn=config"
+#define TASK_IMPORT_DN "cn=import, cn=tasks, cn=config"
+#define TASK_EXPORT_DN "cn=export, cn=tasks, cn=config"
+#define TASK_BACKUP_DN "cn=backup, cn=tasks, cn=config"
+#define TASK_RESTORE_DN "cn=restore, cn=tasks, cn=config"
+#define TASK_INDEX_DN "cn=index, cn=tasks, cn=config"
+#define TASK_UPGRADEDB_DN "cn=upgradedb, cn=tasks, cn=config"
#define TASK_LOG_NAME "nsTaskLog"
#define TASK_STATUS_NAME "nsTaskStatus"
@@ -1486,6 +1486,7 @@
}
out:
+ slapi_ch_free((void **)&mypb.pb_seq_val);
if (rv != 0) {
if (task)
destroy_task(1, task);
16 years, 7 months
[Fedora-directory-commits] ldapserver Makefile.am, 1.56, 1.57 Makefile.in, 1.68, 1.69 aclocal.m4, 1.49, 1.50 configure, 1.62, 1.63 ltmain.sh, 1.19, 1.20
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13862
Modified Files:
Makefile.am Makefile.in aclocal.m4 configure ltmain.sh
Log Message:
Resolves: #236256
Summary: verify-db.pl (db_verify) does not work on a little endian machine
(comment #1-#4)
Description: 1) introducing dbverify mode to ns-slapd.
2) providing new script dbverify to call "ns-slapd dbverify"
3) fixing verify-db.pl to call dbverify instead of db_verify from BDB
Index: Makefile.am
===================================================================
RCS file: /cvs/dirsec/ldapserver/Makefile.am,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- Makefile.am 20 Aug 2007 18:33:31 -0000 1.56
+++ Makefile.am 7 Sep 2007 19:08:44 -0000 1.57
@@ -236,7 +236,8 @@
ldap/admin/src/scripts/template-ns-activate.pl \
ldap/admin/src/scripts/template-ns-inactivate.pl \
ldap/admin/src/scripts/template-ns-newpwpolicy.pl \
- ldap/admin/src/scripts/template-verify-db.pl
+ ldap/admin/src/scripts/template-verify-db.pl \
+ ldap/admin/src/scripts/template-dbverify
init_SCRIPTS = wrappers/$(PACKAGE_NAME)
@@ -501,6 +502,7 @@
ldap/servers/slapd/back-ldbm/ldbm_search.c \
ldap/servers/slapd/back-ldbm/ldbm_unbind.c \
ldap/servers/slapd/back-ldbm/ldif2ldbm.c \
+ ldap/servers/slapd/back-ldbm/dbverify.c \
ldap/servers/slapd/back-ldbm/matchrule.c \
ldap/servers/slapd/back-ldbm/misc.c \
ldap/servers/slapd/back-ldbm/monitor.c \
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/Makefile.in,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- Makefile.in 20 Aug 2007 18:33:32 -0000 1.68
+++ Makefile.in 7 Sep 2007 19:08:44 -0000 1.69
@@ -170,6 +170,7 @@
ldap/servers/slapd/back-ldbm/libback_ldbm_la-ldbm_search.lo \
ldap/servers/slapd/back-ldbm/libback_ldbm_la-ldbm_unbind.lo \
ldap/servers/slapd/back-ldbm/libback_ldbm_la-ldif2ldbm.lo \
+ ldap/servers/slapd/back-ldbm/libback_ldbm_la-dbverify.lo \
ldap/servers/slapd/back-ldbm/libback_ldbm_la-matchrule.lo \
ldap/servers/slapd/back-ldbm/libback_ldbm_la-misc.lo \
ldap/servers/slapd/back-ldbm/libback_ldbm_la-monitor.lo \
@@ -849,7 +850,6 @@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
-SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SOLARIS_FALSE = @SOLARIS_FALSE@
@@ -1147,7 +1147,8 @@
ldap/admin/src/scripts/template-ns-activate.pl \
ldap/admin/src/scripts/template-ns-inactivate.pl \
ldap/admin/src/scripts/template-ns-newpwpolicy.pl \
- ldap/admin/src/scripts/template-verify-db.pl
+ ldap/admin/src/scripts/template-verify-db.pl \
+ ldap/admin/src/scripts/template-dbverify
init_SCRIPTS = wrappers/$(PACKAGE_NAME)
inf_DATA = ldap/admin/src/slapd.inf \
@@ -1402,6 +1403,7 @@
ldap/servers/slapd/back-ldbm/ldbm_search.c \
ldap/servers/slapd/back-ldbm/ldbm_unbind.c \
ldap/servers/slapd/back-ldbm/ldif2ldbm.c \
+ ldap/servers/slapd/back-ldbm/dbverify.c \
ldap/servers/slapd/back-ldbm/matchrule.c \
ldap/servers/slapd/back-ldbm/misc.c \
ldap/servers/slapd/back-ldbm/monitor.c \
@@ -2327,6 +2329,9 @@
ldap/servers/slapd/back-ldbm/libback_ldbm_la-ldif2ldbm.lo: \
ldap/servers/slapd/back-ldbm/$(am__dirstamp) \
ldap/servers/slapd/back-ldbm/$(DEPDIR)/$(am__dirstamp)
+ldap/servers/slapd/back-ldbm/libback_ldbm_la-dbverify.lo: \
+ ldap/servers/slapd/back-ldbm/$(am__dirstamp) \
+ ldap/servers/slapd/back-ldbm/$(DEPDIR)/$(am__dirstamp)
ldap/servers/slapd/back-ldbm/libback_ldbm_la-matchrule.lo: \
ldap/servers/slapd/back-ldbm/$(am__dirstamp) \
ldap/servers/slapd/back-ldbm/$(DEPDIR)/$(am__dirstamp)
@@ -4110,6 +4115,8 @@
-rm -f ldap/servers/slapd/back-ldbm/libback_ldbm_la-dbsize.lo
-rm -f ldap/servers/slapd/back-ldbm/libback_ldbm_la-dbtest.$(OBJEXT)
-rm -f ldap/servers/slapd/back-ldbm/libback_ldbm_la-dbtest.lo
+ -rm -f ldap/servers/slapd/back-ldbm/libback_ldbm_la-dbverify.$(OBJEXT)
+ -rm -f ldap/servers/slapd/back-ldbm/libback_ldbm_la-dbverify.lo
-rm -f ldap/servers/slapd/back-ldbm/libback_ldbm_la-dbversion.$(OBJEXT)
-rm -f ldap/servers/slapd/back-ldbm/libback_ldbm_la-dbversion.lo
-rm -f ldap/servers/slapd/back-ldbm/libback_ldbm_la-dn2entry.$(OBJEXT)
@@ -4859,6 +4866,7 @@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/slapd/back-ldbm/$(DEPDIR)/libback_ldbm_la-dblayer.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/slapd/back-ldbm/$(DEPDIR)/libback_ldbm_la-dbsize.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/slapd/back-ldbm/$(DEPDIR)/libback_ldbm_la-dbtest.Plo(a)am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/slapd/back-ldbm/$(DEPDIR)/libback_ldbm_la-dbverify.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/slapd/back-ldbm/$(DEPDIR)/libback_ldbm_la-dbversion.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/slapd/back-ldbm/$(DEPDIR)/libback_ldbm_la-dn2entry.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/slapd/back-ldbm/$(DEPDIR)/libback_ldbm_la-entrystore.Plo(a)am__quote@
@@ -5563,6 +5571,13 @@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libback_ldbm_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ldap/servers/slapd/back-ldbm/libback_ldbm_la-ldif2ldbm.lo `test -f 'ldap/servers/slapd/back-ldbm/ldif2ldbm.c' || echo '$(srcdir)/'`ldap/servers/slapd/back-ldbm/ldif2ldbm.c
+ldap/servers/slapd/back-ldbm/libback_ldbm_la-dbverify.lo: ldap/servers/slapd/back-ldbm/dbverify.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libback_ldbm_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ldap/servers/slapd/back-ldbm/libback_ldbm_la-dbverify.lo -MD -MP -MF "ldap/servers/slapd/back-ldbm/$(DEPDIR)/libback_ldbm_la-dbverify.Tpo" -c -o ldap/servers/slapd/back-ldbm/libback_ldbm_la-dbverify.lo `test -f 'ldap/servers/slapd/back-ldbm/dbverify.c' || echo '$(srcdir)/'`ldap/servers/slapd/back-ldbm/dbverify.c; \
+@am__fastdepCC_TRUE@ then mv -f "ldap/servers/slapd/back-ldbm/$(DEPDIR)/libback_ldbm_la-dbverify.Tpo" "ldap/servers/slapd/back-ldbm/$(DEPDIR)/libback_ldbm_la-dbverify.Plo"; else rm -f "ldap/servers/slapd/back-ldbm/$(DEPDIR)/libback_ldbm_la-dbverify.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ldap/servers/slapd/back-ldbm/dbverify.c' object='ldap/servers/slapd/back-ldbm/libback_ldbm_la-dbverify.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libback_ldbm_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ldap/servers/slapd/back-ldbm/libback_ldbm_la-dbverify.lo `test -f 'ldap/servers/slapd/back-ldbm/dbverify.c' || echo '$(srcdir)/'`ldap/servers/slapd/back-ldbm/dbverify.c
+
ldap/servers/slapd/back-ldbm/libback_ldbm_la-matchrule.lo: ldap/servers/slapd/back-ldbm/matchrule.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libback_ldbm_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ldap/servers/slapd/back-ldbm/libback_ldbm_la-matchrule.lo -MD -MP -MF "ldap/servers/slapd/back-ldbm/$(DEPDIR)/libback_ldbm_la-matchrule.Tpo" -c -o ldap/servers/slapd/back-ldbm/libback_ldbm_la-matchrule.lo `test -f 'ldap/servers/slapd/back-ldbm/matchrule.c' || echo '$(srcdir)/'`ldap/servers/slapd/back-ldbm/matchrule.c; \
@am__fastdepCC_TRUE@ then mv -f "ldap/servers/slapd/back-ldbm/$(DEPDIR)/libback_ldbm_la-matchrule.Tpo" "ldap/servers/slapd/back-ldbm/$(DEPDIR)/libback_ldbm_la-matchrule.Plo"; else rm -f "ldap/servers/slapd/back-ldbm/$(DEPDIR)/libback_ldbm_la-matchrule.Tpo"; exit 1; fi
Index: aclocal.m4
===================================================================
RCS file: /cvs/dirsec/ldapserver/aclocal.m4,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- aclocal.m4 13 Aug 2007 15:35:35 -0000 1.49
+++ aclocal.m4 7 Sep 2007 19:08:44 -0000 1.50
@@ -1578,27 +1578,10 @@
# before this can be enabled.
hardcode_into_libs=yes
- # find out which ABI we are using
- libsuff=
- case "$host_cpu" in
- x86_64*|s390x*|powerpc64*)
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *64-bit*)
- libsuff=64
- sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
- esac
-
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -4305,9 +4288,6 @@
# Is the compiler the GNU C compiler?
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
-
# An ERE matcher.
EGREP=$lt_EGREP
@@ -4441,11 +4421,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -4457,7 +4437,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -4537,7 +4517,7 @@
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
# Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -6373,7 +6353,6 @@
done
done
done
-IFS=$as_save_IFS
lt_ac_max=0
lt_ac_count=0
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
@@ -6406,7 +6385,6 @@
done
])
SED=$lt_cv_path_SED
-AC_SUBST([SED])
AC_MSG_RESULT([$SED])
])
Index: configure
===================================================================
RCS file: /cvs/dirsec/ldapserver/configure,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- configure 22 Aug 2007 05:11:34 -0000 1.62
+++ configure 7 Sep 2007 19:08:44 -0000 1.63
@@ -465,7 +465,7 @@
#endif"
ac_default_prefix=/opt/$PACKAGE_NAME
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CP!
P CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CX!
XCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -3836,7 +3836,6 @@
done
done
done
-IFS=$as_save_IFS
lt_ac_max=0
lt_ac_count=0
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
@@ -3871,7 +3870,6 @@
fi
SED=$lt_cv_path_SED
-
echo "$as_me:$LINENO: result: $SED" >&5
echo "${ECHO_T}$SED" >&6
@@ -4312,7 +4310,7 @@
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4315 "configure"' > conftest.$ac_ext
+ echo '#line 4313 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -5447,7 +5445,7 @@
# Provide some information about the compiler.
-echo "$as_me:5450:" \
+echo "$as_me:5448:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -6510,11 +6508,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6513: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6511: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6517: \$? = $ac_status" >&5
+ echo "$as_me:6515: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6778,11 +6776,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6781: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6779: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6785: \$? = $ac_status" >&5
+ echo "$as_me:6783: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6882,11 +6880,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6885: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6883: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:6889: \$? = $ac_status" >&5
+ echo "$as_me:6887: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8347,31 +8345,10 @@
# before this can be enabled.
hardcode_into_libs=yes
- # find out which ABI we are using
- libsuff=
- case "$host_cpu" in
- x86_64*|s390x*|powerpc64*)
- echo '#line 8354 "configure"' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *64-bit*)
- libsuff=64
- sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
- esac
-
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -9248,7 +9225,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9251 "configure"
+#line 9228 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9348,7 +9325,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9351 "configure"
+#line 9328 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9679,9 +9656,6 @@
# Is the compiler the GNU C compiler?
with_gcc=$GCC
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
-
# An ERE matcher.
EGREP=$lt_EGREP
@@ -9815,11 +9789,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=\`echo $lt_predep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+predep_objects=$lt_predep_objects
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=\`echo $lt_postdep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+postdep_objects=$lt_postdep_objects
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -9831,7 +9805,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=\`echo $lt_compiler_lib_search_path | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+compiler_lib_search_path=$lt_compiler_lib_search_path
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -9911,7 +9885,7 @@
link_all_deplibs=$link_all_deplibs
# Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -11691,11 +11665,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11694: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11668: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11698: \$? = $ac_status" >&5
+ echo "$as_me:11672: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -11795,11 +11769,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11798: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11772: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11802: \$? = $ac_status" >&5
+ echo "$as_me:11776: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12327,31 +12301,10 @@
# before this can be enabled.
hardcode_into_libs=yes
- # find out which ABI we are using
- libsuff=
- case "$host_cpu" in
- x86_64*|s390x*|powerpc64*)
- echo '#line 12334 "configure"' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *64-bit*)
- libsuff=64
- sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
- esac
-
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -12735,9 +12688,6 @@
# Is the compiler the GNU C compiler?
with_gcc=$GCC_CXX
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
-
# An ERE matcher.
EGREP=$lt_EGREP
@@ -12871,11 +12821,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+predep_objects=$lt_predep_objects_CXX
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+postdep_objects=$lt_postdep_objects_CXX
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -12887,7 +12837,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -12967,7 +12917,7 @@
link_all_deplibs=$link_all_deplibs_CXX
# Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -13389,11 +13339,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13392: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13342: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13396: \$? = $ac_status" >&5
+ echo "$as_me:13346: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -13493,11 +13443,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13496: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13446: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13500: \$? = $ac_status" >&5
+ echo "$as_me:13450: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14938,31 +14888,10 @@
# before this can be enabled.
hardcode_into_libs=yes
- # find out which ABI we are using
- libsuff=
- case "$host_cpu" in
- x86_64*|s390x*|powerpc64*)
- echo '#line 14945 "configure"' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *64-bit*)
- libsuff=64
- sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
- esac
-
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -15346,9 +15275,6 @@
# Is the compiler the GNU C compiler?
with_gcc=$GCC_F77
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
-
# An ERE matcher.
EGREP=$lt_EGREP
@@ -15482,11 +15408,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+predep_objects=$lt_predep_objects_F77
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+postdep_objects=$lt_postdep_objects_F77
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -15498,7 +15424,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+compiler_lib_search_path=$lt_compiler_lib_search_path_F77
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -15578,7 +15504,7 @@
link_all_deplibs=$link_all_deplibs_F77
# Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -15720,11 +15646,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15723: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15649: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15727: \$? = $ac_status" >&5
+ echo "$as_me:15653: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -15988,11 +15914,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15991: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15917: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15995: \$? = $ac_status" >&5
+ echo "$as_me:15921: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16092,11 +16018,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16095: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16021: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16099: \$? = $ac_status" >&5
+ echo "$as_me:16025: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17557,31 +17483,10 @@
# before this can be enabled.
hardcode_into_libs=yes
- # find out which ABI we are using
- libsuff=
- case "$host_cpu" in
- x86_64*|s390x*|powerpc64*)
- echo '#line 17564 "configure"' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *64-bit*)
- libsuff=64
- sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
- esac
-
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -17965,9 +17870,6 @@
# Is the compiler the GNU C compiler?
with_gcc=$GCC_GCJ
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
-
# An ERE matcher.
EGREP=$lt_EGREP
@@ -18101,11 +18003,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+predep_objects=$lt_predep_objects_GCJ
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+postdep_objects=$lt_postdep_objects_GCJ
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -18117,7 +18019,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -18197,7 +18099,7 @@
link_all_deplibs=$link_all_deplibs_GCJ
# Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -18449,9 +18351,6 @@
# Is the compiler the GNU C compiler?
with_gcc=$GCC_RC
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
-
# An ERE matcher.
EGREP=$lt_EGREP
@@ -18585,11 +18484,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+predep_objects=$lt_predep_objects_RC
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+postdep_objects=$lt_postdep_objects_RC
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -18601,7 +18500,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+compiler_lib_search_path=$lt_compiler_lib_search_path_RC
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -18681,7 +18580,7 @@
link_all_deplibs=$link_all_deplibs_RC
# Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -26020,7 +25919,6 @@
s,@CCDEPMODE@,$CCDEPMODE,;t t
s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
-s,@SED@,$SED,;t t
s,@EGREP@,$EGREP,;t t
s,@LN_S@,$LN_S,;t t
s,@ECHO@,$ECHO,;t t
Index: ltmain.sh
===================================================================
RCS file: /cvs/dirsec/ldapserver/ltmain.sh,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- ltmain.sh 20 Aug 2007 17:49:17 -0000 1.19
+++ ltmain.sh 7 Sep 2007 19:08:44 -0000 1.20
@@ -46,16 +46,10 @@
VERSION=1.5.22
TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
-# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes.
+if test -n "${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
# Check that we have a working $echo.
@@ -111,14 +105,12 @@
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
# We save the old values to restore during execute mode.
-for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-do
- eval "if test \"\${$lt_var+set}\" = set; then
- save_$lt_var=\$$lt_var
- $lt_var=C
- export $lt_var
- fi"
-done
+if test "${LC_ALL+set}" = set; then
+ save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+fi
+if test "${LANG+set}" = set; then
+ save_LANG="$LANG"; LANG=C; export LANG
+fi
# Make sure IFS has a sensible default
lt_nl='
@@ -144,8 +136,6 @@
preserve_args=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
-extracted_archives=
-extracted_serial=0
#####################################
# Shell function definitions:
@@ -337,17 +327,7 @@
*) my_xabs=`pwd`"/$my_xlib" ;;
esac
my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
- my_xlib_u=$my_xlib
- while :; do
- case " $extracted_archives " in
- *" $my_xlib_u "*)
- extracted_serial=`expr $extracted_serial + 1`
- my_xlib_u=lt$extracted_serial-$my_xlib ;;
- *) break ;;
- esac
- done
- extracted_archives="$extracted_archives $my_xlib_u"
- my_xdir="$my_gentop/$my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib"
$show "${rm}r $my_xdir"
$run ${rm}r "$my_xdir"
@@ -778,7 +758,6 @@
*.f90) xform=f90 ;;
*.for) xform=for ;;
*.java) xform=java ;;
- *.obj) xform=obj ;;
esac
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
@@ -1159,9 +1138,8 @@
for arg
do
case $arg in
- -all-static | -static | -static-libtool-libs)
- case $arg in
- -all-static)
+ -all-static | -static)
+ if test "X$arg" = "X-all-static"; then
if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
$echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
fi
@@ -1169,20 +1147,12 @@
dlopen_self=$dlopen_self_static
fi
prefer_static_libs=yes
- ;;
- -static)
+ else
if test -z "$pic_flag" && test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
prefer_static_libs=built
- ;;
- -static-libtool-libs)
- if test -z "$pic_flag" && test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- prefer_static_libs=yes
- ;;
- esac
+ fi
build_libtool_libs=no
build_old_libs=yes
break
@@ -1742,7 +1712,7 @@
continue
;;
- -static | -static-libtool-libs)
+ -static)
# The effects of -static are defined in a previous loop.
# We used to do the same as -all-static on platforms that
# didn't have a PIC flag, but the assumption that the effects
@@ -2520,9 +2490,7 @@
if test "$linkmode,$pass" = "prog,link"; then
if test -n "$library_names" &&
- { { test "$prefer_static_libs" = no ||
- test "$prefer_static_libs,$installed" = "built,yes"; } ||
- test -z "$old_library"; }; then
+ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
# We need to hardcode the library path
if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
# Make sure the rpath contains only unique directories.
@@ -3218,7 +3186,7 @@
# which has an extra 1 added just for fun
#
case $version_type in
- darwin|linux|osf|windows|none)
+ darwin|linux|osf|windows)
current=`expr $number_major + $number_minor`
age="$number_minor"
revision="$number_revision"
@@ -3442,11 +3410,11 @@
fi
# Eliminate all temporary directories.
-# for path in $notinst_path; do
-# lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
-# deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
-# dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
-# done
+ for path in $notinst_path; do
+ lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
+ deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
+ dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
+ done
if test -n "$xrpath"; then
# If the user specified any rpath flags, then add them.
@@ -3547,12 +3515,13 @@
int main() { return 0; }
EOF
$rm conftest
- if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+ $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
+ if test "$?" -eq 0 ; then
ldd_output=`ldd conftest`
for i in $deplibs; do
name=`expr $i : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
- if test "$name" != "" && test "$name" != "0"; then
+ if test "$name" != "" && test "$name" -ne "0"; then
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $i "*)
@@ -3591,7 +3560,9 @@
# If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" != "0"; then
$rm conftest
- if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+ $LTCC $LTCFLAGS -o conftest conftest.c $i
+ # Did it work?
+ if test "$?" -eq 0 ; then
ldd_output=`ldd conftest`
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
@@ -3623,7 +3594,7 @@
droppeddeps=yes
$echo
$echo "*** Warning! Library $i is needed by this library but I was not able to"
- $echo "*** make it link in! You will probably need to install it or some"
+ $echo "*** make it link in! You will probably need to install it or some"
$echo "*** library that it depends on before this library will be fully"
$echo "*** functional. Installing it before continuing would be even better."
fi
@@ -4268,14 +4239,12 @@
reload_conv_objs=
gentop=
# reload_cmds runs $LD directly, so let us get rid of
- # -Wl from whole_archive_flag_spec and hope we can get by with
- # turning comma into space..
+ # -Wl from whole_archive_flag_spec
wl=
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
- eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
- reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+ eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
else
gentop="$output_objdir/${obj}x"
generated="$generated $gentop"
@@ -4723,16 +4692,16 @@
case $host in
*cygwin* | *mingw* )
if test -f "$output_objdir/${outputname}.def" ; then
- compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
- finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
else
- compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
- finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%"`
fi
;;
* )
- compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
- finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%"`
;;
esac
;;
@@ -4747,13 +4716,13 @@
# really was required.
# Nullify the symbol file.
- compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
- finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
fi
if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
# Replace the output file specification.
- compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
+ compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
link_command="$compile_command$compile_rpath"
# We have no uninstalled library dependencies, so finalize right now.
@@ -4840,7 +4809,7 @@
if test "$fast_install" != no; then
link_command="$finalize_var$compile_command$finalize_rpath"
if test "$fast_install" = yes; then
- relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
+ relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
else
# fast_install is set to needless
relink_command=
@@ -4877,7 +4846,7 @@
fi
done
relink_command="(cd `pwd`; $relink_command)"
- relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
fi
# Quote $echo for shipping.
@@ -5284,18 +5253,6 @@
Xsed='${SED} -e 1s/^X//'
sed_quote_subst='$sed_quote_subst'
-# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
-if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '\${1+\"\$@\"}'='\"\$@\"'
- setopt NO_GLOB_SUBST
-else
- case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
-fi
-
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
@@ -5438,7 +5395,7 @@
;;
esac
$echo >> $output "\
- \$echo \"\$0: cannot exec \$program \$*\"
+ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
exit $EXIT_FAILURE
fi
else
@@ -5624,7 +5581,7 @@
done
# Quote the link command for shipping.
relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
- relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
if test "$hardcode_automatic" = yes ; then
relink_command=
fi
@@ -5969,9 +5926,9 @@
if test -n "$inst_prefix_dir"; then
# Stick the inst_prefix_dir data into the link command.
- relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
+ relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
else
- relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
+ relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
fi
$echo "$modename: warning: relinking \`$file'" 1>&2
@@ -6180,7 +6137,7 @@
file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
outputname="$tmpdir/$file"
# Replace the output file specification.
- relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
+ relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
$show "$relink_command"
if $run eval "$relink_command"; then :
@@ -6456,15 +6413,12 @@
fi
# Restore saved environment variables
- for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
- do
- eval "if test \"\${save_$lt_var+set}\" = set; then
- $lt_var=\$save_$lt_var; export $lt_var
- else
- $lt_unset $lt_var
- fi"
- done
-
+ if test "${save_LC_ALL+set}" = set; then
+ LC_ALL="$save_LC_ALL"; export LC_ALL
+ fi
+ if test "${save_LANG+set}" = set; then
+ LANG="$save_LANG"; export LANG
+ fi
# Now prepare to actually exec the command.
exec_cmd="\$cmd$args"
@@ -6821,9 +6775,9 @@
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-export-symbols SYMFILE
- try to export only the symbols listed in SYMFILE
+ try to export only the symbols listed in SYMFILE
-export-symbols-regex REGEX
- try to export only the symbols matching REGEX
+ try to export only the symbols matching REGEX
-LLIBDIR search LIBDIR for required installed libraries
-lNAME OUTPUT-FILE requires the installed library libNAME
-module build a library that can dlopened
@@ -6837,11 +6791,9 @@
-release RELEASE specify package release information
-rpath LIBDIR the created library will eventually be installed in LIBDIR
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
- -static do not do any dynamic linking of uninstalled libtool libraries
- -static-libtool-libs
- do not do any dynamic linking of libtool libraries
+ -static do not do any dynamic linking of libtool libraries
-version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]
+ specify library version info [each variable defaults to 0]
All other options (arguments beginning with \`-') are ignored.
16 years, 7 months
[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts template-dbverify.in, NONE, 1.1 template-verify-db.pl.in, 1.7, 1.8
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13862/ldap/admin/src/scripts
Modified Files:
template-verify-db.pl.in
Added Files:
template-dbverify.in
Log Message:
Resolves: #236256
Summary: verify-db.pl (db_verify) does not work on a little endian machine
(comment #1-#4)
Description: 1) introducing dbverify mode to ns-slapd.
2) providing new script dbverify to call "ns-slapd dbverify"
3) fixing verify-db.pl to call dbverify instead of db_verify from BDB
--- NEW FILE template-dbverify.in ---
#!/bin/sh
prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@
if [ -n "$prefix" ] ; then
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
fi
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
args=""
while [ "$1" != "" ]
do
if [ "$1" = "-n" ]; then
args=$args" "$1
shift
args=$args" "$1
elif [ "$1" = "-V" ]; then
args=$args" "$1
else
echo "Usage: dbverify [-n backend_instance] [-V]"
echo "Note : if \"-n backend_instance\" is not passed, verify all DBs."
echo " -V : verbose"
exit 1
fi
shift
done
cd {{SERVERBIN-DIR}}
./ns-slapd dbverify -D {{CONFIG-DIR}} $args
if [ $? -eq 0 ]; then
echo "DB verify: Passed"
exit 0
else
echo "DB verify: Failed"
exit 1
fi
Index: template-verify-db.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-verify-db.pl.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- template-verify-db.pl.in 21 Mar 2007 17:42:58 -0000 1.7
+++ template-verify-db.pl.in 7 Sep 2007 19:08:45 -0000 1.8
@@ -211,41 +211,48 @@
}
# Check db files by db_verify
-for (my $i = 0; "$$dbdirs[$i]" ne ""; $i++)
+print "Verify db files ... ";
+open(DBVERIFY, "dbverify $thisdb 2>&1 1> $NULL |");
+sleep 1;
+my $bad_index = 0;
+my $bad_id2entry = 0;
+my $isfirst = 1;
+while ($l = <DBVERIFY>)
{
- opendir(DB, $$dbdirs[$i]) or die "can't opendir $$dbdirs[$i] : $!";
- while (defined($db = readdir(DB)))
- {
- if ($db =~ /\.db/)
+ if ($isfirst)
{
- my $thisdb = $$dbdirs[$i] . "/" . $db;
- print "Verify $thisdb ... ";
- open(DBVERIFY, "db_verify $thisdb 2>&1 1> $NULL |");
- sleep 1;
- my $haserr = 0;
- while ($l = <DBVERIFY>)
- {
- if ($haserr == 0)
+ print "\n";
+ $isfirst = 0;
+ }
+ if ("$l" =~ /verify failed/)
+ {
+ if ("$l" =~ /id2entry.db/)
{
- print "\n";
+ $bad_id2entry++;
}
- if ("$l" ne "")
+ else
{
- $haserr++;
- print "DB ERROR: $l";
+ $bad_index++;
}
- }
- close(DBVERIFY);
- if ($haserr == 0 && $? == 0)
- {
- print "Good\n";
- }
- else
- {
- print "db file $db in $$dbdirs[$i] is corrupted.\n";
- print "Please restore your backup and recover the database.\n";
- }
}
- }
- closedir(DB);
+ print "$l";
+}
+close(DBVERIFY);
+
+if ($bad_id2entry > 0)
+{
+ print "\nFound the db was corrupted\n";
+ print "Please restore your backup and recover the database.\n";
+ exit(1);
+}
+elsif ($bad_index > 0)
+{
+ print "\nFound the index file(s) was corrupted\n";
+ print "Please run db2index on the corrupted index\n";
+ exit(1);
+}
+else
+{
+ print "Good\n";
+ exit(0);
}
16 years, 7 months