ldap/include/ldaplog.h | 24
ldap/servers/plugins/acct_usability/acct_usability.c | 32
ldap/servers/plugins/acctpolicy/acct_config.c | 8
ldap/servers/plugins/acctpolicy/acct_init.c | 20
ldap/servers/plugins/acctpolicy/acct_plugin.c | 52 -
ldap/servers/plugins/acctpolicy/acct_util.c | 8
ldap/servers/plugins/acl/acl.c | 128 +-
ldap/servers/plugins/acl/acl_ext.c | 72 -
ldap/servers/plugins/acl/aclanom.c | 24
ldap/servers/plugins/acl/acleffectiverights.c | 40
ldap/servers/plugins/acl/aclgroup.c | 12
ldap/servers/plugins/acl/aclinit.c | 52 -
ldap/servers/plugins/acl/acllas.c | 244 ++---
ldap/servers/plugins/acl/acllist.c | 42
ldap/servers/plugins/acl/aclparse.c | 38
ldap/servers/plugins/acl/aclplugin.c | 14
ldap/servers/plugins/acl/aclutil.c | 38
ldap/servers/plugins/automember/automember.c | 208 ++--
ldap/servers/plugins/bitwise/bitwise.c | 8
ldap/servers/plugins/chainingdb/cb_add.c | 12
ldap/servers/plugins/chainingdb/cb_bind.c | 4
ldap/servers/plugins/chainingdb/cb_close.c | 4
ldap/servers/plugins/chainingdb/cb_compare.c | 4
ldap/servers/plugins/chainingdb/cb_config.c | 16
ldap/servers/plugins/chainingdb/cb_conn_stateless.c | 64 -
ldap/servers/plugins/chainingdb/cb_controls.c | 8
ldap/servers/plugins/chainingdb/cb_delete.c | 10
ldap/servers/plugins/chainingdb/cb_init.c | 2
ldap/servers/plugins/chainingdb/cb_instance.c | 20
ldap/servers/plugins/chainingdb/cb_modify.c | 12
ldap/servers/plugins/chainingdb/cb_modrdn.c | 10
ldap/servers/plugins/chainingdb/cb_monitor.c | 2
ldap/servers/plugins/chainingdb/cb_schema.c | 2
ldap/servers/plugins/chainingdb/cb_search.c | 26
ldap/servers/plugins/chainingdb/cb_utils.c | 14
ldap/servers/plugins/collation/collate.c | 18
ldap/servers/plugins/collation/config.c | 10
ldap/servers/plugins/collation/orfilter.c | 34
ldap/servers/plugins/cos/cos.c | 28
ldap/servers/plugins/cos/cos_cache.c | 246 ++---
ldap/servers/plugins/deref/deref.c | 44
ldap/servers/plugins/dna/dna.c | 312 +++---
ldap/servers/plugins/http/http_client.c | 48 -
ldap/servers/plugins/http/http_impl.c | 114 +-
ldap/servers/plugins/linkedattrs/fixup_task.c | 28
ldap/servers/plugins/linkedattrs/linked_attrs.c | 168 +--
ldap/servers/plugins/memberof/memberof.c | 123 +-
ldap/servers/plugins/memberof/memberof.h | 2
ldap/servers/plugins/memberof/memberof_config.c | 12
ldap/servers/plugins/mep/mep.c | 224 ++--
ldap/servers/plugins/pam_passthru/pam_ptconfig.c | 36
ldap/servers/plugins/pam_passthru/pam_ptimpl.c | 18
ldap/servers/plugins/pam_passthru/pam_ptpreop.c | 66 -
ldap/servers/plugins/passthru/ptbind.c | 2
ldap/servers/plugins/passthru/ptconfig.c | 22
ldap/servers/plugins/passthru/ptconn.c | 26
ldap/servers/plugins/passthru/ptpreop.c | 28
ldap/servers/plugins/posix-winsync/posix-group-func.c | 122 +-
ldap/servers/plugins/posix-winsync/posix-group-task.c | 58 -
ldap/servers/plugins/posix-winsync/posix-winsync-config.c | 30
ldap/servers/plugins/posix-winsync/posix-winsync.c | 300 +++---
ldap/servers/plugins/presence/presence.c | 128 +-
ldap/servers/plugins/pwdstorage/md5_pwd.c | 8
ldap/servers/plugins/pwdstorage/pwd_init.c | 52 -
ldap/servers/plugins/pwdstorage/sha_pwd.c | 6
ldap/servers/plugins/pwdstorage/smd5_pwd.c | 8
ldap/servers/plugins/referint/referint.c | 98 +-
ldap/servers/plugins/replication/cl4_api.c | 58 -
ldap/servers/plugins/replication/cl4_init.c | 22
ldap/servers/plugins/replication/cl5_api.c | 507 +++++-----
ldap/servers/plugins/replication/cl5_clcache.c | 52 -
ldap/servers/plugins/replication/cl5_config.c | 48 -
ldap/servers/plugins/replication/cl5_init.c | 6
ldap/servers/plugins/replication/cl5_test.c | 88 -
ldap/servers/plugins/replication/cl_crypt.c | 12
ldap/servers/plugins/replication/csnpl.c | 20
ldap/servers/plugins/replication/legacy_consumer.c | 20
ldap/servers/plugins/replication/llist.c | 8
ldap/servers/plugins/replication/repl5_agmt.c | 70 -
ldap/servers/plugins/replication/repl5_agmtlist.c | 66 -
ldap/servers/plugins/replication/repl5_connection.c | 92 -
ldap/servers/plugins/replication/repl5_inc_protocol.c | 159 +--
ldap/servers/plugins/replication/repl5_init.c | 40
ldap/servers/plugins/replication/repl5_mtnode_ext.c | 8
ldap/servers/plugins/replication/repl5_plugins.c | 48 -
ldap/servers/plugins/replication/repl5_protocol.c | 18
ldap/servers/plugins/replication/repl5_protocol_util.c | 46
ldap/servers/plugins/replication/repl5_replica.c | 228 ++--
ldap/servers/plugins/replication/repl5_replica_config.c | 104 +-
ldap/servers/plugins/replication/repl5_replica_dnhash.c | 26
ldap/servers/plugins/replication/repl5_replica_hash.c | 22
ldap/servers/plugins/replication/repl5_ruv.c | 91 -
ldap/servers/plugins/replication/repl5_schedule.c | 4
ldap/servers/plugins/replication/repl5_tot_protocol.c | 40
ldap/servers/plugins/replication/repl5_total.c | 24
ldap/servers/plugins/replication/repl5_updatedn_list.c | 8
ldap/servers/plugins/replication/repl_bind.c | 2
ldap/servers/plugins/replication/repl_connext.c | 26
ldap/servers/plugins/replication/repl_extop.c | 69 -
ldap/servers/plugins/replication/repl_init.c | 12
ldap/servers/plugins/replication/repl_opext.c | 4
ldap/servers/plugins/replication/repl_ops.c | 6
ldap/servers/plugins/replication/repl_session_plugin.c | 14
ldap/servers/plugins/replication/replutil.c | 58 -
ldap/servers/plugins/replication/test_repl_session_plugin.c | 40
ldap/servers/plugins/replication/urp.c | 64 -
ldap/servers/plugins/replication/urp_glue.c | 15
ldap/servers/plugins/replication/urp_tombstone.c | 8
ldap/servers/plugins/replication/windows_connection.c | 220 ++--
ldap/servers/plugins/replication/windows_inc_protocol.c | 192 ++--
ldap/servers/plugins/replication/windows_private.c | 382 ++++----
ldap/servers/plugins/replication/windows_protocol_util.c | 336 +++----
ldap/servers/plugins/replication/windows_tot_protocol.c | 48 -
ldap/servers/plugins/retrocl/retrocl.c | 36
ldap/servers/plugins/retrocl/retrocl_cn.c | 4
ldap/servers/plugins/retrocl/retrocl_create.c | 26
ldap/servers/plugins/retrocl/retrocl_po.c | 32
ldap/servers/plugins/retrocl/retrocl_trim.c | 34
ldap/servers/plugins/rever/rever.c | 8
ldap/servers/plugins/roles/roles_cache.c | 176 +--
ldap/servers/plugins/roles/roles_plugin.c | 22
ldap/servers/plugins/rootdn_access/rootdn_access.c | 70 -
ldap/servers/plugins/schema_reload/schema_reload.c | 22
ldap/servers/plugins/statechange/statechange.c | 26
ldap/servers/plugins/sync/sync_init.c | 12
ldap/servers/plugins/sync/sync_persist.c | 24
ldap/servers/plugins/sync/sync_refresh.c | 6
ldap/servers/plugins/sync/sync_util.c | 4
ldap/servers/plugins/syntaxes/bin.c | 16
ldap/servers/plugins/syntaxes/bitstring.c | 4
ldap/servers/plugins/syntaxes/ces.c | 8
ldap/servers/plugins/syntaxes/cis.c | 28
ldap/servers/plugins/syntaxes/deliverymethod.c | 4
ldap/servers/plugins/syntaxes/dn.c | 4
ldap/servers/plugins/syntaxes/facsimile.c | 4
ldap/servers/plugins/syntaxes/guide.c | 8
ldap/servers/plugins/syntaxes/int.c | 4
ldap/servers/plugins/syntaxes/nameoptuid.c | 4
ldap/servers/plugins/syntaxes/numericstring.c | 4
ldap/servers/plugins/syntaxes/sicis.c | 4
ldap/servers/plugins/syntaxes/string.c | 18
ldap/servers/plugins/syntaxes/syntax_common.c | 4
ldap/servers/plugins/syntaxes/tel.c | 4
ldap/servers/plugins/syntaxes/teletex.c | 4
ldap/servers/plugins/syntaxes/telex.c | 4
ldap/servers/plugins/syntaxes/validate_task.c | 12
ldap/servers/plugins/syntaxes/value.c | 2
ldap/servers/plugins/uiduniq/7bit.c | 44
ldap/servers/plugins/uiduniq/uid.c | 65 -
ldap/servers/plugins/uiduniq/utils.c | 2
ldap/servers/plugins/usn/usn.c | 72 -
ldap/servers/plugins/usn/usn_cleanup.c | 42
ldap/servers/plugins/vattrsp_template/vattrsp.c | 28
ldap/servers/plugins/views/views.c | 50 -
ldap/servers/plugins/whoami/whoami.c | 10
ldap/servers/slapd/abandon.c | 12
ldap/servers/slapd/add.c | 28
ldap/servers/slapd/attr.c | 14
ldap/servers/slapd/attrlist.c | 4
ldap/servers/slapd/attrsyntax.c | 30
ldap/servers/slapd/auditlog.c | 2
ldap/servers/slapd/auth.c | 22
ldap/servers/slapd/ava.c | 2
ldap/servers/slapd/back-ldbm/ancestorid.c | 30
ldap/servers/slapd/back-ldbm/archive.c | 58 -
ldap/servers/slapd/back-ldbm/cache.c | 50 -
ldap/servers/slapd/back-ldbm/cleanup.c | 6
ldap/servers/slapd/back-ldbm/close.c | 10
ldap/servers/slapd/back-ldbm/dbhelp.c | 72 -
ldap/servers/slapd/back-ldbm/dblayer.c | 572 ++++++------
ldap/servers/slapd/back-ldbm/dbverify.c | 30
ldap/servers/slapd/back-ldbm/dbversion.c | 6
ldap/servers/slapd/back-ldbm/dn2entry.c | 14
ldap/servers/slapd/back-ldbm/filterindex.c | 90 -
ldap/servers/slapd/back-ldbm/findentry.c | 28
ldap/servers/slapd/back-ldbm/id2entry.c | 52 -
ldap/servers/slapd/back-ldbm/idl.c | 99 +-
ldap/servers/slapd/back-ldbm/idl_new.c | 62 -
ldap/servers/slapd/back-ldbm/import-threads.c | 148 +--
ldap/servers/slapd/back-ldbm/import.c | 26
ldap/servers/slapd/back-ldbm/index.c | 104 +-
ldap/servers/slapd/back-ldbm/init.c | 20
ldap/servers/slapd/back-ldbm/instance.c | 20
ldap/servers/slapd/back-ldbm/ldbm_add.c | 106 +-
ldap/servers/slapd/back-ldbm/ldbm_attr.c | 18
ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c | 232 ++--
ldap/servers/slapd/back-ldbm/ldbm_attrcrypt_config.c | 8
ldap/servers/slapd/back-ldbm/ldbm_bind.c | 2
ldap/servers/slapd/back-ldbm/ldbm_compare.c | 2
ldap/servers/slapd/back-ldbm/ldbm_config.c | 88 -
ldap/servers/slapd/back-ldbm/ldbm_delete.c | 136 +-
ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c | 417 ++++----
ldap/servers/slapd/back-ldbm/ldbm_index_config.c | 28
ldap/servers/slapd/back-ldbm/ldbm_instance_config.c | 60 -
ldap/servers/slapd/back-ldbm/ldbm_modify.c | 36
ldap/servers/slapd/back-ldbm/ldbm_modrdn.c | 120 +-
ldap/servers/slapd/back-ldbm/ldbm_search.c | 38
ldap/servers/slapd/back-ldbm/ldbm_usn.c | 10
ldap/servers/slapd/back-ldbm/ldif2ldbm.c | 334 +++----
ldap/servers/slapd/back-ldbm/misc.c | 24
ldap/servers/slapd/back-ldbm/nextid.c | 10
ldap/servers/slapd/back-ldbm/parents.c | 2
ldap/servers/slapd/back-ldbm/rmdb.c | 4
ldap/servers/slapd/back-ldbm/seq.c | 10
ldap/servers/slapd/back-ldbm/sort.c | 10
ldap/servers/slapd/back-ldbm/start.c | 58 -
ldap/servers/slapd/back-ldbm/uniqueid2entry.c | 4
ldap/servers/slapd/back-ldbm/upgrade.c | 18
ldap/servers/slapd/back-ldbm/vlv.c | 110 +-
ldap/servers/slapd/back-ldbm/vlv_srch.c | 2
ldap/servers/slapd/back-ldif/add.c | 14
ldap/servers/slapd/back-ldif/bind.c | 4
ldap/servers/slapd/back-ldif/close.c | 8
ldap/servers/slapd/back-ldif/compare.c | 4
ldap/servers/slapd/back-ldif/config.c | 18
ldap/servers/slapd/back-ldif/delete.c | 10
ldap/servers/slapd/back-ldif/init.c | 10
ldap/servers/slapd/back-ldif/modify.c | 18
ldap/servers/slapd/back-ldif/modrdn.c | 14
ldap/servers/slapd/back-ldif/search.c | 4
ldap/servers/slapd/backend.c | 10
ldap/servers/slapd/backend_manager.c | 6
ldap/servers/slapd/bind.c | 20
ldap/servers/slapd/bulk_import.c | 14
ldap/servers/slapd/ch_malloc.c | 12
ldap/servers/slapd/charray.c | 2
ldap/servers/slapd/compare.c | 6
ldap/servers/slapd/config.c | 64 -
ldap/servers/slapd/configdse.c | 10
ldap/servers/slapd/connection.c | 96 +-
ldap/servers/slapd/conntable.c | 20
ldap/servers/slapd/control.c | 30
ldap/servers/slapd/counters.c | 4
ldap/servers/slapd/csn.c | 2
ldap/servers/slapd/csngen.c | 62 -
ldap/servers/slapd/daemon.c | 222 ++--
ldap/servers/slapd/defbackend.c | 14
ldap/servers/slapd/delete.c | 8
ldap/servers/slapd/detach.c | 42
ldap/servers/slapd/dn.c | 30
ldap/servers/slapd/dse.c | 64 -
ldap/servers/slapd/dynalib.c | 6
ldap/servers/slapd/entry.c | 146 +--
ldap/servers/slapd/entrywsi.c | 24
ldap/servers/slapd/errormap.c | 4
ldap/servers/slapd/eventq.c | 24
ldap/servers/slapd/extendop.c | 50 -
ldap/servers/slapd/factory.c | 16
ldap/servers/slapd/features.c | 2
ldap/servers/slapd/fedse.c | 6
ldap/servers/slapd/filter.c | 74 -
ldap/servers/slapd/filtercmp.c | 10
ldap/servers/slapd/filterentry.c | 80 -
ldap/servers/slapd/house.c | 6
ldap/servers/slapd/index_subsystem.c | 4
ldap/servers/slapd/init.c | 4
ldap/servers/slapd/ldaputil.c | 166 +--
ldap/servers/slapd/libglobs.c | 30
ldap/servers/slapd/localhost.c | 22
ldap/servers/slapd/lock.c | 4
ldap/servers/slapd/log.c | 182 ++-
ldap/servers/slapd/main.c | 166 +--
ldap/servers/slapd/mapping_tree.c | 108 +-
ldap/servers/slapd/mempool.c | 18
ldap/servers/slapd/modify.c | 16
ldap/servers/slapd/modrdn.c | 30
ldap/servers/slapd/modutil.c | 14
ldap/servers/slapd/operation.c | 12
ldap/servers/slapd/opshared.c | 8
ldap/servers/slapd/pagedresults.c | 144 +--
ldap/servers/slapd/passwd_extop.c | 56 -
ldap/servers/slapd/pblock.c | 40
ldap/servers/slapd/plugin.c | 117 +-
ldap/servers/slapd/plugin_acl.c | 4
ldap/servers/slapd/plugin_internal_op.c | 12
ldap/servers/slapd/plugin_mr.c | 34
ldap/servers/slapd/plugin_syntax.c | 64 -
ldap/servers/slapd/poll_using_select.c | 12
ldap/servers/slapd/protect_db.c | 30
ldap/servers/slapd/proto-slap.h | 2
ldap/servers/slapd/psearch.c | 26
ldap/servers/slapd/pw.c | 70 -
ldap/servers/slapd/pw_retry.c | 6
ldap/servers/slapd/referral.c | 6
ldap/servers/slapd/resourcelimit.c | 42
ldap/servers/slapd/result.c | 72 -
ldap/servers/slapd/sasl_io.c | 94 -
ldap/servers/slapd/sasl_map.c | 52 -
ldap/servers/slapd/saslbind.c | 84 -
ldap/servers/slapd/schema.c | 178 +--
ldap/servers/slapd/schemaparse.c | 6
ldap/servers/slapd/search.c | 6
ldap/servers/slapd/slapi-plugin.h | 5
ldap/servers/slapd/snmp_collator.c | 10
ldap/servers/slapd/ssl.c | 113 +-
ldap/servers/slapd/start_tls_extop.c | 50 -
ldap/servers/slapd/str2filter.c | 18
ldap/servers/slapd/stubs.c | 2
ldap/servers/slapd/task.c | 168 +--
ldap/servers/slapd/test-plugins/sampletask.c | 8
ldap/servers/slapd/test-plugins/testbind.c | 32
ldap/servers/slapd/test-plugins/testdatainterop.c | 30
ldap/servers/slapd/test-plugins/testdbinterop.c | 16
ldap/servers/slapd/test-plugins/testentry.c | 6
ldap/servers/slapd/test-plugins/testextendedop.c | 20
ldap/servers/slapd/test-plugins/testgetip.c | 14
ldap/servers/slapd/test-plugins/testpostop.c | 24
ldap/servers/slapd/test-plugins/testpreop.c | 18
ldap/servers/slapd/test-plugins/testsaslbind.c | 12
ldap/servers/slapd/time.c | 4
ldap/servers/slapd/tools/mmldif.c | 52 -
ldap/servers/slapd/unbind.c | 2
ldap/servers/slapd/uniqueid.c | 12
ldap/servers/slapd/uniqueidgen.c | 10
ldap/servers/slapd/util.c | 60 -
ldap/servers/slapd/uuid.c | 44
ldap/servers/slapd/value.c | 2
ldap/servers/slapd/valueset.c | 4
ldap/servers/slapd/vattr.c | 22
lib/base/ereport.cpp | 6
320 files changed, 7817 insertions(+), 7755 deletions(-)
New commits:
commit 125486d16b0d8d1a2bef6e98b9f81cd427a839ef
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Wed Sep 7 16:48:03 2016 -0400
Ticket 47978 - Refactor slapi_log_error
Description: Refactored slapi_log_error(), and the LDAPDebug#Args
functions. Fixed afix isusesfrom the first patch
Valgrind: passed
https://fedorahosted.org/389/ticket/48978
Reviewed by: nhosoi(Thanks!)
diff --git a/ldap/servers/plugins/acct_usability/acct_usability.c
b/ldap/servers/plugins/acct_usability/acct_usability.c
index 09c2ee4..d1d58c7 100644
--- a/ldap/servers/plugins/acct_usability/acct_usability.c
+++ b/ldap/servers/plugins/acct_usability/acct_usability.c
@@ -79,7 +79,7 @@ auc_init(Slapi_PBlock *pb)
int status = 0;
char *plugin_identity = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUC_PLUGIN_SUBSYSTEM,
"--> auc_init\n");
/* Store the plugin identity for later use.
@@ -102,7 +102,7 @@ auc_init(Slapi_PBlock *pb)
slapi_pblock_set(pb, SLAPI_PLUGIN_PRE_ENTRY_FN,
(void *) auc_pre_entry) != 0
) {
- slapi_log_error(SLAPI_LOG_FATAL, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUC_PLUGIN_SUBSYSTEM,
"auc_init: failed to register plugin\n");
status = -1;
}
@@ -111,7 +111,7 @@ auc_init(Slapi_PBlock *pb)
slapi_register_supported_control(AUC_OID, SLAPI_OPERATION_SEARCH);
}
- slapi_log_error(SLAPI_LOG_TRACE, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUC_PLUGIN_SUBSYSTEM,
"<-- auc_init\n");
return status;
}
@@ -123,13 +123,13 @@ auc_init(Slapi_PBlock *pb)
static int
auc_start(Slapi_PBlock * pb)
{
- slapi_log_error(SLAPI_LOG_TRACE, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUC_PLUGIN_SUBSYSTEM,
"--> auc_start\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUC_PLUGIN_SUBSYSTEM,
"account usability control plug-in: ready for service\n");
- slapi_log_error(SLAPI_LOG_TRACE, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUC_PLUGIN_SUBSYSTEM,
"<-- auc_start\n");
return 0;
@@ -141,10 +141,10 @@ auc_start(Slapi_PBlock * pb)
static int
auc_close(Slapi_PBlock * pb)
{
- slapi_log_error(SLAPI_LOG_TRACE, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUC_PLUGIN_SUBSYSTEM,
"--> auc_close\n");
- slapi_log_error(SLAPI_LOG_TRACE, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUC_PLUGIN_SUBSYSTEM,
"<-- auc_close\n");
return 0;
@@ -200,7 +200,7 @@ static LDAPControl *auc_create_response_ctrl(Slapi_Entry *e)
time_t now = slapi_current_time();
if (!e) {
- slapi_log_error(SLAPI_LOG_PLUGIN, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUC_PLUGIN_SUBSYSTEM,
"auc_create_response_ctrl: NULL entry specified.\n");
goto bail;
}
@@ -281,7 +281,7 @@ auc_pre_search(Slapi_PBlock *pb)
int isroot = 0;
int ii;
- slapi_log_error(SLAPI_LOG_TRACE, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUC_PLUGIN_SUBSYSTEM,
"--> auc_pre_search\n");
/* See if the requestor is the root DN. */
@@ -294,14 +294,14 @@ auc_pre_search(Slapi_PBlock *pb)
const LDAPControl *ctrl = reqctrls[ii];
if (!strcmp(ctrl->ldctl_oid, AUC_OID)) {
if (aucctrl) { /* already specified */
- slapi_log_error(SLAPI_LOG_FATAL, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUC_PLUGIN_SUBSYSTEM,
"The account usability control was specified more
than "
"once - it must be specified only once in the search
request\n");
ldapcode = LDAP_PROTOCOL_ERROR;
ldaperrtext = "The account usability control cannot be specified
more than once";
aucctrl = NULL;
} else if (ctrl->ldctl_value.bv_len > 0) {
- slapi_log_error(SLAPI_LOG_FATAL, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUC_PLUGIN_SUBSYSTEM,
"Non-null control value specified for account
usability control\n");
ldapcode = LDAP_PROTOCOL_ERROR;
ldaperrtext = "The account usability control must not have a
value";
@@ -314,7 +314,7 @@ auc_pre_search(Slapi_PBlock *pb)
}
if (aucctrl && incompatible) {
- slapi_log_error(SLAPI_LOG_FATAL, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUC_PLUGIN_SUBSYSTEM,
"Cannot use the account usability control and control [%s]
for the same search operation\n",
incompatible);
/* not sure if this is a hard failure - the current spec says:
@@ -362,7 +362,7 @@ auc_pre_search(Slapi_PBlock *pb)
slapi_send_ldap_result(pb, ldapcode, NULL, (char *)ldaperrtext, 0, NULL);
}
- slapi_log_error(SLAPI_LOG_TRACE, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUC_PLUGIN_SUBSYSTEM,
"<-- auc_pre_op\n");
return ldapcode;
@@ -394,7 +394,7 @@ auc_pre_entry(Slapi_PBlock *pb)
/* grab the entry to be returned */
slapi_pblock_get(pb, SLAPI_SEARCH_ENTRY_ORIG, &e);
if (!e) {
- slapi_log_error(SLAPI_LOG_FATAL, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUC_PLUGIN_SUBSYSTEM,
"auc_pre_entry: Unable to fetch entry.\n");
goto bail;
}
@@ -402,7 +402,7 @@ auc_pre_entry(Slapi_PBlock *pb)
/* create the respose control */
ctrl = auc_create_response_ctrl(e);
if (!ctrl) {
- slapi_log_error(SLAPI_LOG_FATAL, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUC_PLUGIN_SUBSYSTEM,
"auc_pre_entry: Error creating response control for entry
\"%s\".\n",
slapi_entry_get_ndn(e) ? slapi_entry_get_ndn(e) : "null");
goto bail;
diff --git a/ldap/servers/plugins/acctpolicy/acct_config.c
b/ldap/servers/plugins/acctpolicy/acct_config.c
index d1acf1a..a139507 100644
--- a/ldap/servers/plugins/acctpolicy/acct_config.c
+++ b/ldap/servers/plugins/acctpolicy/acct_config.c
@@ -48,7 +48,7 @@ acct_policy_load_config_startup( Slapi_PBlock* pb, void* plugin_id ) {
slapi_sdn_free( &config_sdn );
if( rc != LDAP_SUCCESS || config_entry == NULL ) {
- slapi_log_error( SLAPI_LOG_FATAL, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PLUGIN_NAME,
"Failed to retrieve configuration entry %s: %d\n",
PLUGIN_CONFIG_DN, rc );
return( -1 );
@@ -74,7 +74,7 @@ acct_policy_entry2config( Slapi_Entry *e, acctPluginCfg *newcfg ) {
int rc = 0;
if( newcfg == NULL ) {
- slapi_log_error( SLAPI_LOG_FATAL, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PLUGIN_NAME,
"Failed to allocate configuration structure\n" );
return( -1 );
}
@@ -86,7 +86,7 @@ acct_policy_entry2config( Slapi_Entry *e, acctPluginCfg *newcfg ) {
newcfg->state_attr_name = slapi_ch_strdup( DEFAULT_LASTLOGIN_STATE_ATTR );
} else if (!update_is_allowed_attr(newcfg->state_attr_name)) {
/* log a warning that this attribute cannot be updated */
- slapi_log_error( SLAPI_LOG_FATAL, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PLUGIN_NAME,
"The configured state attribute [%s] cannot be updated, accounts will always
become inactive.\n",
newcfg->state_attr_name );
}
@@ -139,7 +139,7 @@ acct_policy_entry2config( Slapi_Entry *e, acctPluginCfg *newcfg ) {
char *endptr = NULL;
newcfg->inactivitylimit = strtoul(config_val, &endptr, 10);
if (endptr && (*endptr != '\0')) {
- slapi_log_error( SLAPI_LOG_FATAL, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PLUGIN_NAME,
"Failed to parse [%s] from the config entry: [%s] is not a valid unsigned
long value\n",
newcfg->limit_attr_name, config_val );
diff --git a/ldap/servers/plugins/acctpolicy/acct_init.c
b/ldap/servers/plugins/acctpolicy/acct_init.c
index 4584765..1ae2ce6 100644
--- a/ldap/servers/plugins/acctpolicy/acct_init.c
+++ b/ldap/servers/plugins/acctpolicy/acct_init.c
@@ -129,13 +129,13 @@ acct_policy_init( Slapi_PBlock *pb )
(void *)&acct_policy_close ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_START_FN,
(void *)acct_policy_start ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PLUGIN_NAME,
"acct_policy_init registration failed\n" );
return( CALLBACK_ERR );
}
if( slapi_pblock_get( pb, SLAPI_PLUGIN_IDENTITY, &plugin_id ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PLUGIN_NAME,
"acct_policy_init failed to get plugin identity\n" );
return( CALLBACK_ERR );
}
@@ -147,7 +147,7 @@ acct_policy_init( Slapi_PBlock *pb )
acct_preop_init, PRE_PLUGIN_DESC, NULL, plugin_id) != 0 ||
slapi_register_plugin("postoperation", 1, "acct_postop_init",
acct_postop_init, POST_PLUGIN_DESC, NULL, plugin_id) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PLUGIN_NAME,
"acct_policy_init failed to register callbacks\n" );
return( CALLBACK_ERR );
}
@@ -189,14 +189,14 @@ acct_policy_start( Slapi_PBlock *pb )
/* Load plugin configuration */
if( acct_policy_load_config_startup( pb, plugin_id ) ) {
- slapi_log_error( SLAPI_LOG_FATAL, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PLUGIN_NAME,
"acct_policy_start failed to load configuration\n" );
return( CALLBACK_ERR );
}
/* Show the configuration */
cfg = get_config();
- slapi_log_error( SLAPI_LOG_PLUGIN, PLUGIN_NAME, "acct_policy_start config: "
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PLUGIN_NAME, "acct_policy_start
config: "
"stateAttrName=%s altStateAttrName=%s specAttrName=%s limitAttrName=%s "
"alwaysRecordLogin=%d\n",
cfg->state_attr_name,
cfg->alt_state_attr_name?cfg->alt_state_attr_name:"not configured",
cfg->spec_attr_name,
@@ -226,7 +226,7 @@ acct_preop_init( Slapi_PBlock *pb ) {
SLAPI_PLUGIN_VERSION_01 ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION,
(void *)&pre_plugin_desc ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, PRE_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PRE_PLUGIN_NAME,
"Failed to set plugin version or description\n" );
return( CALLBACK_ERR );
}
@@ -236,7 +236,7 @@ acct_preop_init( Slapi_PBlock *pb ) {
slapi_pblock_set(pb, SLAPI_PLUGIN_PRE_MODIFY_FN, (void *) acct_mod_pre_op) != 0 ||
slapi_pblock_set(pb, SLAPI_PLUGIN_PRE_DELETE_FN, (void *) acct_del_pre_op) != 0)
{
- slapi_log_error( SLAPI_LOG_FATAL, PRE_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PRE_PLUGIN_NAME,
"Failed to set plugin callback function\n" );
return( CALLBACK_ERR );
}
@@ -253,7 +253,7 @@ acct_postop_init( Slapi_PBlock *pb )
SLAPI_PLUGIN_VERSION_01 ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION,
(void *)&post_plugin_desc ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, POST_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, POST_PLUGIN_NAME,
"Failed to set plugin version or name\n" );
return( CALLBACK_ERR );
}
@@ -263,13 +263,13 @@ acct_postop_init( Slapi_PBlock *pb )
slapi_pblock_set(pb, SLAPI_PLUGIN_POST_ADD_FN, (void *) acct_post_op) != 0 ||
slapi_pblock_set(pb, SLAPI_PLUGIN_POST_MODIFY_FN, (void *) acct_post_op) != 0)
{
- slapi_log_error( SLAPI_LOG_FATAL, POST_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, POST_PLUGIN_NAME,
"Failed to set plugin callback function\n" );
return( CALLBACK_ERR );
}
if( slapi_pblock_get( pb, SLAPI_PLUGIN_IDENTITY, &plugin_id ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, POST_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, POST_PLUGIN_NAME,
"Failed to get plugin identity\n" );
return( CALLBACK_ERR );
}
diff --git a/ldap/servers/plugins/acctpolicy/acct_plugin.c
b/ldap/servers/plugins/acctpolicy/acct_plugin.c
index a61a50c..0cc7ce3 100644
--- a/ldap/servers/plugins/acctpolicy/acct_plugin.c
+++ b/ldap/servers/plugins/acctpolicy/acct_plugin.c
@@ -37,7 +37,7 @@ acct_policy_dn_is_config(Slapi_DN *sdn)
{
int ret = 0;
- slapi_log_error(SLAPI_LOG_TRACE, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PLUGIN_NAME,
"--> automember_dn_is_config\n");
if (sdn == NULL) {
@@ -61,7 +61,7 @@ acct_policy_dn_is_config(Slapi_DN *sdn)
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PLUGIN_NAME,
"<-- automember_dn_is_config\n");
return ret;
@@ -83,17 +83,17 @@ acct_inact_limit( Slapi_PBlock *pb, const char *dn, Slapi_Entry
*target_entry, a
cfg = get_config();
if( ( lasttimestr = get_attr_string_val( target_entry,
cfg->state_attr_name ) ) != NULL ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, PRE_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PRE_PLUGIN_NAME,
"\"%s\" login timestamp is %s\n", dn, lasttimestr );
} else if( cfg->alt_state_attr_name && (( lasttimestr = get_attr_string_val(
target_entry,
cfg->alt_state_attr_name ) ) != NULL) ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, PRE_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PRE_PLUGIN_NAME,
"\"%s\" alternate timestamp is %s\n", dn, lasttimestr );
} else {
/* the primary or alternate attribute might not yet exist eg.
* if only lastlogintime is specified and it id the first login
*/
- slapi_log_error( SLAPI_LOG_PLUGIN, PRE_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PRE_PLUGIN_NAME,
"\"%s\" has no value for stateattr or altstateattr \n", dn );
goto done;
}
@@ -104,13 +104,13 @@ acct_inact_limit( Slapi_PBlock *pb, const char *dn, Slapi_Entry
*target_entry, a
/* Finally do the time comparison */
if( cur_t > last_t + lim_t ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, PRE_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PRE_PLUGIN_NAME,
"\"%s\" has exceeded inactivity limit (%ld > (%ld + %ld))\n",
dn, cur_t, last_t, lim_t );
rc = 1;
goto done;
} else {
- slapi_log_error( SLAPI_LOG_PLUGIN, PRE_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PRE_PLUGIN_NAME,
"\"%s\" is within inactivity limit (%ld < (%ld + %ld))\n",
dn, cur_t, last_t, lim_t );
}
@@ -184,13 +184,13 @@ acct_record_login( const char *dn )
slapi_pblock_get( modpb, SLAPI_PLUGIN_INTOP_RESULT, &ldrc );
if (ldrc != LDAP_SUCCESS) {
- slapi_log_error( SLAPI_LOG_FATAL, POST_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, POST_PLUGIN_NAME,
"Recording %s=%s failed on \"%s\" err=%d\n",
cfg->always_record_login_attr,
timestr, dn, ldrc );
rc = -1;
goto done;
} else {
- slapi_log_error( SLAPI_LOG_PLUGIN, POST_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POST_PLUGIN_NAME,
"Recorded %s=%s on \"%s\"\n", cfg->always_record_login_attr,
timestr, dn );
}
@@ -216,14 +216,14 @@ acct_bind_preop( Slapi_PBlock *pb )
acctPolicy *policy = NULL;
void *plugin_id;
- slapi_log_error( SLAPI_LOG_PLUGIN, PRE_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PRE_PLUGIN_NAME,
"=> acct_bind_preop\n" );
plugin_id = get_identity();
/* This does not give a copy, so don't free it */
if( slapi_pblock_get( pb, SLAPI_BIND_TARGET_SDN, &sdn ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, PRE_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PRE_PLUGIN_NAME,
"Error retrieving target DN\n" );
rc = -1;
goto done;
@@ -242,7 +242,7 @@ acct_bind_preop( Slapi_PBlock *pb )
if( ldrc != LDAP_SUCCESS ) {
if( ldrc != LDAP_NO_SUCH_OBJECT ) {
/* The problem is not a bad bind or virtual entry; halt bind */
- slapi_log_error( SLAPI_LOG_FATAL, PRE_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PRE_PLUGIN_NAME,
"Failed to retrieve entry \"%s\": %d\n", dn, ldrc );
rc = -1;
}
@@ -250,7 +250,7 @@ acct_bind_preop( Slapi_PBlock *pb )
}
if( get_acctpolicy( pb, target_entry, plugin_id, &policy ) ) {
- slapi_log_error( SLAPI_LOG_FATAL, PRE_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PRE_PLUGIN_NAME,
"Account Policy object for \"%s\" is missing\n", dn );
rc = -1;
goto done;
@@ -258,7 +258,7 @@ acct_bind_preop( Slapi_PBlock *pb )
/* Null policy means target isnt's under the influence of a policy */
if( policy == NULL ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, PRE_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PRE_PLUGIN_NAME,
"\"%s\" is not governed by an account policy\n", dn);
goto done;
}
@@ -278,7 +278,7 @@ done:
free_acctpolicy( &policy );
- slapi_log_error( SLAPI_LOG_PLUGIN, PRE_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PRE_PLUGIN_NAME,
"<= acct_bind_preop\n" );
return( rc == 0 ? CALLBACK_OK : CALLBACK_ERR );
@@ -300,14 +300,14 @@ acct_bind_postop( Slapi_PBlock *pb )
acctPluginCfg *cfg;
void *plugin_id;
- slapi_log_error( SLAPI_LOG_PLUGIN, POST_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POST_PLUGIN_NAME,
"=> acct_bind_postop\n" );
plugin_id = get_identity();
/* Retrieving SLAPI_CONN_DN from the pb gives a copy */
if( slapi_pblock_get( pb, SLAPI_CONN_DN, &dn ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, POST_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, POST_PLUGIN_NAME,
"Error retrieving bind DN\n" );
rc = -1;
goto done;
@@ -330,7 +330,7 @@ acct_bind_postop( Slapi_PBlock *pb )
plugin_id );
if( ldrc != LDAP_SUCCESS ) {
- slapi_log_error( SLAPI_LOG_FATAL, POST_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, POST_PLUGIN_NAME,
"Failed to retrieve entry \"%s\": %d\n", dn, ldrc );
rc = -1;
goto done;
@@ -360,7 +360,7 @@ done:
slapi_ch_free_string( &dn );
- slapi_log_error( SLAPI_LOG_PLUGIN, POST_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POST_PLUGIN_NAME,
"<= acct_bind_postop\n" );
return( rc == 0 ? CALLBACK_OK : CALLBACK_ERR );
@@ -376,7 +376,7 @@ static int acct_pre_op( Slapi_PBlock *pb, int modop )
char *errstr = NULL;
int ret = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, PRE_PLUGIN_NAME, "--> acct_pre_op\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PRE_PLUGIN_NAME, "-->
acct_pre_op\n");
slapi_pblock_get(pb, SLAPI_TARGET_SDN, &sdn);
@@ -421,7 +421,7 @@ static int acct_pre_op( Slapi_PBlock *pb, int modop )
}
} else if (modop == LDAP_CHANGETYPE_DELETE){
ret = LDAP_UNWILLING_TO_PERFORM;
- slapi_log_error(SLAPI_LOG_FATAL, PRE_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PRE_PLUGIN_NAME,
"acct_pre_op: can not delete plugin config entry [%d]\n", ret);
} else {
errstr = slapi_ch_smprintf("acct_pre_op: invalid op type %d", modop);
@@ -441,7 +441,7 @@ static int acct_pre_op( Slapi_PBlock *pb, int modop )
slapi_entry_free(e);
if (ret) {
- slapi_log_error(SLAPI_LOG_PLUGIN, PRE_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PRE_PLUGIN_NAME,
"acct_pre_op: operation failure [%d]\n", ret);
slapi_send_ldap_result(pb, ret, NULL, errstr, 0, NULL);
slapi_ch_free((void **)&errstr);
@@ -449,7 +449,7 @@ static int acct_pre_op( Slapi_PBlock *pb, int modop )
ret = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, PRE_PLUGIN_NAME, "<-- acct_pre_op\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PRE_PLUGIN_NAME, "<--
acct_pre_op\n");
return ret;
}
@@ -477,19 +477,19 @@ acct_post_op(Slapi_PBlock *pb)
{
Slapi_DN *sdn = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, POST_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, POST_PLUGIN_NAME,
"--> acct_policy_post_op\n");
slapi_pblock_get(pb, SLAPI_TARGET_SDN, &sdn);
if (acct_policy_dn_is_config(sdn)){
if( acct_policy_load_config_startup( pb, get_identity() ) ) {
- slapi_log_error( SLAPI_LOG_FATAL, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PLUGIN_NAME,
"acct_policy_start failed to load configuration\n" );
return( CALLBACK_ERR );
}
}
- slapi_log_error(SLAPI_LOG_TRACE, POST_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, POST_PLUGIN_NAME,
"<-- acct_policy_mod_post_op\n");
return SLAPI_PLUGIN_SUCCESS;
diff --git a/ldap/servers/plugins/acctpolicy/acct_util.c
b/ldap/servers/plugins/acctpolicy/acct_util.c
index 319e61c..99119fb 100644
--- a/ldap/servers/plugins/acctpolicy/acct_util.c
+++ b/ldap/servers/plugins/acctpolicy/acct_util.c
@@ -106,13 +106,13 @@ get_acctpolicy( Slapi_PBlock *pb, Slapi_Entry *target_entry, void
*plugin_id,
/* Return success and NULL policy */
policy_dn = get_attr_string_val( target_entry, cfg->spec_attr_name );
if( policy_dn == NULL ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PLUGIN_NAME,
"\"%s\" is not governed by an account inactivity "
"policy subentry\n", slapi_entry_get_ndn( target_entry ) );
if (cfg->inactivitylimit != ULONG_MAX) {
goto dopolicy;
}
- slapi_log_error( SLAPI_LOG_PLUGIN, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PLUGIN_NAME,
"\"%s\" is not governed by an account inactivity "
"global policy\n", slapi_entry_get_ndn( target_entry ) );
config_unlock();
@@ -127,10 +127,10 @@ get_acctpolicy( Slapi_PBlock *pb, Slapi_Entry *target_entry, void
*plugin_id,
/* There should be a policy but it can't be retrieved; fatal error */
if( policy_entry == NULL ) {
if( ldrc != LDAP_NO_SUCH_OBJECT ) {
- slapi_log_error( SLAPI_LOG_FATAL, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PLUGIN_NAME,
"Error retrieving policy entry \"%s\": %d\n", policy_dn, ldrc );
} else {
- slapi_log_error( SLAPI_LOG_PLUGIN, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PLUGIN_NAME,
"Policy entry \"%s\" is missing: %d\n", policy_dn, ldrc );
}
rc = -1;
diff --git a/ldap/servers/plugins/acl/acl.c b/ldap/servers/plugins/acl/acl.c
index 9ddf96e..729d8b5 100644
--- a/ldap/servers/plugins/acl/acl.c
+++ b/ldap/servers/plugins/acl/acl.c
@@ -102,7 +102,7 @@ acl_access_allowed_modrdn(
SLAPI_ACL_WRITE);
if ( retCode != LDAP_SUCCESS ) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"modrdn:write permission to entry not allowed\n");
return(retCode);
}
@@ -117,7 +117,7 @@ acl_access_allowed_modrdn(
retCode = check_rdn_access( pb, e, ci_newrdn, ACLPB_SLAPI_ACL_WRITE_ADD) ;
slapi_ch_free_string(&ci_newrdn);
if ( retCode != LDAP_SUCCESS ) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"modrdn:write permission to add new naming attribute not allowed\n");
return(retCode);
}
@@ -128,7 +128,7 @@ acl_access_allowed_modrdn(
oldrdn = slapi_sdn_get_ndn(target_sdn);
retCode = check_rdn_access( pb, e, oldrdn, ACLPB_SLAPI_ACL_WRITE_DEL) ;
if ( retCode != LDAP_SUCCESS ) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"modrdn:write permission to delete old naming attribute not allowed\n");
return(retCode);
}
@@ -158,7 +158,7 @@ check_rdn_access( Slapi_PBlock *pb, Slapi_Entry *e, const char *dn,
int access)
struct berval bv;
if ( slapi_rdn2typeval( rdns[i], &type, &bv ) != 0 ) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"modrdn: rdn2typeval (%s) failed\n", rdns[i]);
retCode = LDAP_INSUFFICIENT_ACCESS;
break;
@@ -275,7 +275,7 @@ acl_access_allowed(
privateBackend = slapi_be_private ( be );
if ( !privateBackend && (be_readonly || slapi_config_get_readonly () )){
- slapi_log_error (loglevel, plugin_name,
+ slapi_log_error (loglevel, LOG_DEBUG, plugin_name,
"conn=%" NSPRIu64 " op=%d (main): Deny %s on entry(%s)"
": readonly backend\n",
o_connid, o_opid,
@@ -288,7 +288,7 @@ acl_access_allowed(
/* Check for things we need to skip */
TNF_PROBE_0_DEBUG(acl_skipaccess_start,"ACL","");
if ( acl_skip_access_check ( pb, e, access )) {
- slapi_log_error (loglevel, plugin_name,
+ slapi_log_error (loglevel, LOG_DEBUG, plugin_name,
"conn=%" NSPRIu64 " op=%d (main): Allow %s on entry(%s)"
": root user\n",
o_connid, o_opid,
@@ -312,20 +312,20 @@ acl_access_allowed(
aclpb = acl_get_aclpb ( pb, ACLPB_BINDDN_PBLOCK );
if ( !aclpb ) {
- slapi_log_error ( SLAPI_LOG_FATAL, plugin_name, "Missing aclpb 1 \n" );
+ slapi_log_error ( SLAPI_LOG_FATAL, LOG_DEBUG, plugin_name, "Missing aclpb 1
\n" );
ret_val = LDAP_OPERATIONS_ERROR;
goto cleanup_and_ret;
}
if (pb != aclpb->aclpb_pblock) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"acl_access_allowed: Resetting aclpb_pblock %p to pblock addr
%p\n",
aclpb->aclpb_pblock, pb);
aclpb->aclpb_pblock = pb;
}
if ( !aclpb->aclpb_curr_entry_sdn ) {
- slapi_log_error ( SLAPI_LOG_FATAL, plugin_name, "NULL aclpb_curr_entry_sdn
\n" );
+ slapi_log_error ( SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "NULL
aclpb_curr_entry_sdn \n" );
ret_val = LDAP_OPERATIONS_ERROR;
goto cleanup_and_ret;
}
@@ -381,7 +381,7 @@ acl_access_allowed(
/* Convert access to string of rights eg SLAPI_ACL_ADD->"add". */
if ((right= acl_access2str(access)) == NULL) {
/* ERROR: unknown rights */
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"acl_access_allowed unknown rights:%d\n", access);
ret_val = LDAP_OPERATIONS_ERROR;
@@ -447,7 +447,7 @@ acl_access_allowed(
(aclpb->aclpb_curr_entry != e) /* cannot trust the cached entry */ ) {
TNF_PROBE_0_DEBUG(acl_entry_first_touch_start,"ACL","");
- slapi_log_error(loglevel, plugin_name,
+ slapi_log_error(loglevel, LOG_DEBUG, plugin_name,
"#### conn=%" NSPRIu64 " op=%d binddn=\"%s\"\n",
o_connid, o_opid, clientDn);
aclpb->aclpb_stat_total_entries++;
@@ -513,7 +513,7 @@ acl_access_allowed(
DS_ATTR_ENTRY, e, 0);
if (rv < 0) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Unable to set the Slapi_Entry in the Plist\n");
ret_val = LDAP_OPERATIONS_ERROR;
goto cleanup_and_ret;
@@ -577,7 +577,7 @@ acl_access_allowed(
goto cleanup_and_ret;
}
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Processed attr:%s for entry:%s\n", attr ? attr : "NULL",
n_edn);
@@ -704,7 +704,7 @@ print_access_control_summary( char *source, int ret_val, char
*clientDn,
}
if ( !aclpb ) {
- slapi_log_error ( SLAPI_LOG_FATAL, plugin_name, "Missing aclpb \n" );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "Missing aclpb \n"
);
return;
}
@@ -775,7 +775,7 @@ print_access_control_summary( char *source, int ret_val, char
*clientDn,
slapi_sdn_get_ndn(aclpb->aclpb_authorization_sdn):
null_user);
if (strcasecmp(right, access_str_moddn) == 0) {
- slapi_log_error(loglevel, plugin_name,
+ slapi_log_error(loglevel, LOG_DEBUG, plugin_name,
"conn=%" NSPRIu64 " op=%d (%s): %s
%s on entry(%s).attr(%s) [from %s] to proxy (%s)"
": %s\n",
o_connid, o_opid,
@@ -789,7 +789,7 @@ print_access_control_summary( char *source, int ret_val, char
*clientDn,
acl_info[0] ? acl_info : access_reason);
} else {
- slapi_log_error(loglevel, plugin_name,
+ slapi_log_error(loglevel, LOG_DEBUG, plugin_name,
"conn=%" NSPRIu64 " op=%d (%s): %s
%s on entry(%s).attr(%s) to proxy (%s)"
": %s\n",
o_connid, o_opid,
@@ -804,7 +804,7 @@ print_access_control_summary( char *source, int ret_val, char
*clientDn,
} else {
proxy_user = null_user;
if (strcasecmp(right, access_str_moddn) == 0) {
- slapi_log_error(loglevel, plugin_name,
+ slapi_log_error(loglevel, LOG_DEBUG, plugin_name,
"conn=%" NSPRIu64 " op=%d (%s): %s
%s on entry(%s).attr(%s) [from %s] to proxy (%s)"
": %s\n",
o_connid, o_opid,
@@ -818,7 +818,7 @@ print_access_control_summary( char *source, int ret_val, char
*clientDn,
acl_info[0] ? acl_info : access_reason);
} else {
- slapi_log_error(loglevel, plugin_name,
+ slapi_log_error(loglevel, LOG_DEBUG, plugin_name,
"conn=%" NSPRIu64 " op=%d (%s): %s
%s on entry(%s).attr(%s) to proxy (%s)"
": %s\n",
o_connid, o_opid,
@@ -833,7 +833,7 @@ print_access_control_summary( char *source, int ret_val, char
*clientDn,
}
} else {
if (strcasecmp(right, access_str_moddn) == 0) {
- slapi_log_error(loglevel, plugin_name,
+ slapi_log_error(loglevel, LOG_DEBUG, plugin_name,
"conn=%" NSPRIu64 " op=%d (%s): %s %s on
entry(%s).attr(%s) [from %s] to %s"
": %s\n",
o_connid, o_opid,
@@ -847,7 +847,7 @@ print_access_control_summary( char *source, int ret_val, char
*clientDn,
acl_info[0] ? acl_info : access_reason);
} else {
- slapi_log_error(loglevel, plugin_name,
+ slapi_log_error(loglevel, LOG_DEBUG, plugin_name,
"conn=%" NSPRIu64 " op=%d (%s): %s %s on
entry(%s).attr(%s) to %s"
": %s\n",
o_connid, o_opid,
@@ -923,7 +923,7 @@ acl_read_access_allowed_on_entry (
*/
if ( acl_skip_access_check ( pb, e, access ) ) {
char *n_edn = slapi_entry_get_ndn ( e );
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Root access (%s) allowed on entry(%s)\n",
acl_access2str(access),
n_edn);
@@ -934,14 +934,14 @@ acl_read_access_allowed_on_entry (
aclpb = acl_get_aclpb ( pb, ACLPB_BINDDN_PBLOCK );
if ( !aclpb ) {
- slapi_log_error ( SLAPI_LOG_FATAL, plugin_name, "Missing aclpb 2 \n" );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "Missing aclpb 2 \n"
);
TNF_PROBE_1_DEBUG(acl_read_access_allowed_on_entry_end ,"ACL","",
tnf_string,end,"aclpb error");
return LDAP_OPERATIONS_ERROR;
}
if (pb != aclpb->aclpb_pblock) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"acl_read_access_allowed_on_entry: Resetting aclpb_pblock %p to
pblock addr %p\n",
aclpb->aclpb_pblock, pb);
aclpb->aclpb_pblock = pb;
@@ -1228,7 +1228,7 @@ acl_read_access_allowed_on_attr (
/* If it's the root or acl is off or rootdse, he has all the priv */
if ( acl_skip_access_check ( pb, e, access ) ) {
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Root access (%s) allowed on entry(%s)\n",
acl_access2str(access),
n_edn);
@@ -1240,7 +1240,7 @@ acl_read_access_allowed_on_attr (
aclpb = acl_get_aclpb ( pb, ACLPB_BINDDN_PBLOCK );
if ( !aclpb ) {
- slapi_log_error ( SLAPI_LOG_FATAL, plugin_name, "Missing aclpb 3 \n" );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "Missing aclpb 3 \n"
);
TNF_PROBE_1_DEBUG(acl_read_access_allowed_on_attr_end ,"ACL","",
tnf_string,aclpb_error,"");
@@ -1268,7 +1268,7 @@ acl_read_access_allowed_on_attr (
ret_val = acl__attr_cached_result (aclpb, attr, SLAPI_ACL_READ);
if (ret_val != -1) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"MATCHED HANDLE:dn:%s attr: %s val:%d\n",
n_edn, attr, ret_val );
if (ret_val == LDAP_SUCCESS) {
@@ -1295,7 +1295,7 @@ acl_read_access_allowed_on_attr (
** rest of the attributes.
*/
if (aclpb->aclpb_state & ACLPB_ATTR_STAR_MATCHED) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"STAR Access allowed on attr:%s; entry:%s \n",
attr, n_edn);
decision_reason.reason = ACL_REASON_EVALCONTEXT_CACHED_ATTR_STAR_ALLOW;
@@ -1664,7 +1664,7 @@ acl_modified (Slapi_PBlock *pb, int optype, Slapi_DN *e_sdn, void
*change)
** use this group. for now just do the whole thing.
*/
if ( group_change ) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Group Change: Invalidating entire UserGroup Cache %s\n",
n_dn);
aclg_regen_group_signature();
@@ -1700,7 +1700,7 @@ acl_modified (Slapi_PBlock *pb, int optype, Slapi_DN *e_sdn, void
*change)
* Mark this for deletion next time round--try to impact
* this mainline code as little as possible.
*/
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Marking entry %s for removal from ACL user Group Cache\n",
n_dn);
aclg_markUgroupForRemoval (ugroup);
@@ -1852,7 +1852,7 @@ acl_modified (Slapi_PBlock *pb, int optype, Slapi_DN *e_sdn, void
*change)
}
if (NULL == parent_DN) {
if (NULL == new_RDN) {
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"acl_modified (MODRDN %s => \"no change\"\n",
n_dn);
break;
@@ -1870,7 +1870,7 @@ acl_modified (Slapi_PBlock *pb, int optype, Slapi_DN *e_sdn, void
*change)
new_DN = slapi_create_dn_string("%s,%s", new_RDN, parent_DN);
}
}
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"acl_modified (MODRDN %s => \"%s\"\n", n_dn,
new_RDN);
/* Change the acls */
@@ -1932,7 +1932,7 @@ acl__scan_for_acis(Acl_PBlock *aclpb, int *err)
aclpb->aclpb_handles_index[0] != -1 ) {
int kk = 0;
while ( kk < aclpb_max_selected_acls && aclpb->aclpb_handles_index[kk]
!= -1 ) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name, "Using ACL Container:%d for
evaluation\n", kk);
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "Using ACL Container:%d
for evaluation\n", kk);
kk++;
}
}
@@ -1946,7 +1946,7 @@ acl__scan_for_acis(Acl_PBlock *aclpb, int *err)
/* Check the signature. If it has changed, start fresh */
if ( aclpb->aclpb_signature != acl_signature ) {
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Restart the scan -- due to acl changes\n");
acllist_init_scan ( aclpb->aclpb_pblock, LDAP_SCOPE_BASE, NULL );
}
@@ -2027,7 +2027,7 @@ acl__scan_for_acis(Acl_PBlock *aclpb, int *err)
aclpb->aclpb_num_deny_handles = deny_handle;
aclpb->aclpb_num_allow_handles = allow_handle;
- slapi_log_error(SLAPI_LOG_ACL, plugin_name, "Num of ALLOW Handles:%d, DENY
handles:%d\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "Num of ALLOW Handles:%d,
DENY handles:%d\n",
aclpb->aclpb_num_allow_handles, aclpb->aclpb_num_deny_handles);
TNF_PROBE_0_DEBUG(acl__scan_for_acis_end,"ACL","");
@@ -2179,12 +2179,12 @@ acl__resource_match_aci( Acl_PBlock *aclpb, aci_t *aci, int
skip_attrEval, int *
/* This is a filter with substring
* e.g. ldap:///uid=*,cn=accounts,dc=example,dc=com
*/
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "moddn
target_to substring: %s\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"moddn target_to substring: %s\n",
slapi_filter_to_string(f, logbuf,
sizeof(logbuf)));
if ((rv = acl_match_substring(f, (char *) res_ndn, 0 /*
match suffix */)) != ACL_TRUE) {
dn_matched = ACL_FALSE;
if (rv == ACL_ERR) {
- slapi_log_error(SLAPI_LOG_ACL,
plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG,
plugin_name,
"acl__resource_match_aci:pattern err\n");
matches = ACL_FALSE;
goto acl__resource_match_aci_EXIT;
@@ -2194,7 +2194,7 @@ acl__resource_match_aci( Acl_PBlock *aclpb, aci_t *aci, int
skip_attrEval, int *
/* This is a filter without substring
* e.g. ldap:///cn=accounts,dc=example,dc=com
*/
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "moddn
target_to: %s\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"moddn target_to: %s\n",
slapi_filter_to_string(f, logbuf,
sizeof(logbuf)));
slapi_filter_get_ava(f, &avaType, &avaValue);
@@ -2220,12 +2220,12 @@ acl__resource_match_aci( Acl_PBlock *aclpb, aci_t *aci, int
skip_attrEval, int *
/* This is a filter with substring
* e.g. ldap:///uid=*,cn=accounts,dc=example,dc=com
*/
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "moddn
target_from substring: %s\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"moddn target_from substring: %s\n",
slapi_filter_to_string(f, logbuf,
sizeof(logbuf)));
if ((rv = acl_match_substring(f, (char *)
slapi_sdn_get_dn(aclpb->aclpb_moddn_source_sdn), 0 /* match suffix */)) != ACL_TRUE) {
dn_matched = ACL_FALSE;
if (rv == ACL_ERR) {
- slapi_log_error(SLAPI_LOG_ACL,
plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG,
plugin_name,
"acl__resource_match_aci:pattern err\n");
matches = ACL_FALSE;
goto acl__resource_match_aci_EXIT;
@@ -2236,7 +2236,7 @@ acl__resource_match_aci( Acl_PBlock *aclpb, aci_t *aci, int
skip_attrEval, int *
/* This is a filter without substring
* e.g. ldap:///cn=accounts,dc=example,dc=com
*/
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "moddn
target_from: %s\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"moddn target_from: %s\n",
slapi_filter_to_string(f, logbuf,
sizeof(logbuf)));
if
(!slapi_dn_issuffix(slapi_sdn_get_dn(aclpb->aclpb_moddn_source_sdn),
avaValue->bv_val)) {
dn_matched = ACL_FALSE;
@@ -2265,7 +2265,7 @@ acl__resource_match_aci( Acl_PBlock *aclpb, aci_t *aci, int
skip_attrEval, int *
if ((rv = acl_match_substring(f, (char *)res_ndn, 0 /* match suffux */)) != ACL_TRUE)
{
dn_matched = ACL_FALSE;
if(rv == ACL_ERR) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"acl__resource_match_aci:pattern err\n");
matches = ACL_FALSE;
goto acl__resource_match_aci_EXIT;
@@ -2312,7 +2312,7 @@ acl__resource_match_aci( Acl_PBlock *aclpb, aci_t *aci, int
skip_attrEval, int *
if ( matched_val == NULL &&
(aclpb->aclpb_res_type & (ACLPB_NEW_ENTRY | ACLPB_EFFECTIVE_RIGHTS))) {
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Evaluating macro aci(%d)%s for resource %s\n",
aci->aci_index, aci->aclName,
aclutil__access_str(res_right, res_right_str));
@@ -2350,14 +2350,14 @@ acl__resource_match_aci( Acl_PBlock *aclpb, aci_t *aci, int
skip_attrEval, int *
acl_ht_add_and_freeOld(aclpb->aclpb_macro_ht,
(PLHashNumber)aci->aci_index,
matched_val);
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"-- Added aci(%d) and matched value (%s) to macro ht\n",
aci->aci_index, matched_val);
acl_ht_display_ht(aclpb->aclpb_macro_ht);
} else {
slapi_ch_free((void **)&matched_val);
if (matches == ACL_FALSE) {
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Evaluated ACL_FALSE\n");
}
}
@@ -2427,7 +2427,7 @@ acl__resource_match_aci( Acl_PBlock *aclpb, aci_t *aci, int
skip_attrEval, int *
}
} else {
matches = ACL_FALSE;
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Returning UNDEFINED for targetfilter evaluation.\n");
}
@@ -2957,7 +2957,7 @@ acl__TestRights(Acl_PBlock *aclpb,int access, const char **right,
const char **
}
k++;
index = aci->aci_index;
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Evaluating DENY aci(%d) \"%s\"\n", index, aci->aclName);
if (access & ( SLAPI_ACL_SEARCH | SLAPI_ACL_READ)) {
@@ -2989,7 +2989,7 @@ acl__TestRights(Acl_PBlock *aclpb,int access, const char **right,
const char **
*/
if (access & SLAPI_ACL_SEARCH) {
if ( result & ACLPB_CACHE_SEARCH_RES_DENY){
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"DENY:Found SEARCH DENY in cache\n");
__acl_set_aclIndex_inResult ( aclpb, access, index );
result_reason->deciding_aci = aci;
@@ -2999,7 +2999,7 @@ acl__TestRights(Acl_PBlock *aclpb,int access, const char **right,
const char **
return ACL_RES_DENY;
} else if ((result & ACLPB_CACHE_SEARCH_RES_SKIP) ||
(result & ACLPB_CACHE_SEARCH_RES_ALLOW)) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"DENY:Found SEARCH SKIP in cache\n");
skip_eval = 1;
break;
@@ -3008,7 +3008,7 @@ acl__TestRights(Acl_PBlock *aclpb,int access, const char **right,
const char **
}
} else { /* must be READ */
if (result & ACLPB_CACHE_READ_RES_DENY) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"DENY:Found READ DENY in cache\n");
__acl_set_aclIndex_inResult ( aclpb, access, index );
result_reason->deciding_aci = aci;
@@ -3017,7 +3017,7 @@ acl__TestRights(Acl_PBlock *aclpb,int access, const char **right,
const char **
tnf_string,cached_deny,"");
return ACL_RES_DENY;
} else if ( result & ACLPB_CACHE_READ_RES_SKIP) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"DENY:Found READ SKIP in cache\n");
skip_eval = 1;
break;
@@ -3035,7 +3035,7 @@ acl__TestRights(Acl_PBlock *aclpb,int access, const char **right,
const char **
rv = ACL_EvalSetACL(NULL, acleval, aci->aci_handle);
if ( rv < 0) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"acl__TestRights:Unable to set the DENY acllist\n");
continue;
}
@@ -3050,7 +3050,7 @@ acl__TestRights(Acl_PBlock *aclpb,int access, const char **right,
const char **
&deny_generic,
&acl_tag, &expr_num);
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "Processed:%d DENY handles
Result:%d\n",index, rights_rv);
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "Processed:%d DENY handles
Result:%d\n",index, rights_rv);
if (rights_rv == ACL_RES_FAIL) {
result_reason->deciding_aci = aci;
@@ -3085,7 +3085,7 @@ acl__TestRights(Acl_PBlock *aclpb,int access, const char **right,
const char **
} else { /* cache overflow */
if (!(aclpb->aclpb_cache_result[j].result &
ACLPB_CACHE_ERROR_REPORTED)) {
- slapi_log_error (SLAPI_LOG_FATAL, "acl__TestRights",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "acl__TestRights",
"Your ACL cache of %d slots has overflowed. "
"This can happen when you have many ACIs. "
"This ACI evaluation requires %d slots to cache. "
@@ -3185,7 +3185,7 @@ acl__TestRights(Acl_PBlock *aclpb,int access, const char **right,
const char **
}
k++;
index = aci->aci_index;
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"%d. Evaluating ALLOW aci(%d) \"%s\"\n", k, index,
aci->aclName);
if (access & ( SLAPI_ACL_SEARCH | SLAPI_ACL_READ)) {
@@ -3218,7 +3218,7 @@ acl__TestRights(Acl_PBlock *aclpb,int access, const char **right,
const char **
*/
if (access & SLAPI_ACL_SEARCH) {
if (result & ACLPB_CACHE_SEARCH_RES_ALLOW) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Found SEARCH ALLOW in cache\n");
__acl_set_aclIndex_inResult ( aclpb, access, index );
result_reason->deciding_aci = aci;
@@ -3227,7 +3227,7 @@ acl__TestRights(Acl_PBlock *aclpb,int access, const char **right,
const char **
tnf_string,cached_allow,"");
return ACL_RES_ALLOW;
} else if ( result & ACLPB_CACHE_SEARCH_RES_SKIP) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Found SEARCH SKIP in cache\n");
skip_eval = 1;
break;
@@ -3237,7 +3237,7 @@ acl__TestRights(Acl_PBlock *aclpb,int access, const char **right,
const char **
}
} else {
if ( result & ACLPB_CACHE_READ_RES_ALLOW) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Found READ ALLOW in cache\n");
__acl_set_aclIndex_inResult ( aclpb, access, index );
result_reason->deciding_aci = aci;
@@ -3246,7 +3246,7 @@ acl__TestRights(Acl_PBlock *aclpb,int access, const char **right,
const char **
tnf_string,cached_allow,"");
return ACL_RES_ALLOW;
} else if ( result & ACLPB_CACHE_READ_RES_SKIP) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Found READ SKIP in cache\n");
skip_eval = 1;
break;
@@ -3265,7 +3265,7 @@ acl__TestRights(Acl_PBlock *aclpb,int access, const char **right,
const char **
TNF_PROBE_0_DEBUG(acl__libaccess_start,"ACL","");
rv = ACL_EvalSetACL(NULL, acleval, aci->aci_handle);
if ( rv < 0) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"acl__TestRights:Unable to set the acllist\n");
continue;
}
@@ -3307,7 +3307,7 @@ acl__TestRights(Acl_PBlock *aclpb,int access, const char **right,
const char **
} else { /* cache overflow */
if (!(aclpb->aclpb_cache_result[j].result &
ACLPB_CACHE_ERROR_REPORTED)) {
- slapi_log_error (SLAPI_LOG_FATAL, "acl__TestRights",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "acl__TestRights",
"Your ACL cache of %d slots has overflowed. "
"This can happen when you have many ACIs. "
"This ACI evaluation requires %d slots to cache. "
@@ -3550,11 +3550,11 @@ acl__attr_cached_result (struct acl_pblock *aclpb, char *attr, int
access )
if (aclpb->aclpb_state & ACLPB_HAS_ACLCB_EVALCONTEXT ) {
c_evalContext = &aclpb->aclpb_prev_opEval_context;
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"acl__attr_cached_result:Using Context: ACLPB_ACLCB\n" );
} else {
c_evalContext = &aclpb->aclpb_prev_entryEval_context;
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"acl__attr_cached_result:Using Context: ACLPB_PREV\n" );
}
@@ -3739,7 +3739,7 @@ acl__scan_match_handles ( Acl_PBlock *aclpb, int type)
** to nullify the cached result
*/
if ( aci->aci_ruleType & ACI_ATTR_RULES ) {
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Found an attr Rule [Name:%s Index:%d\n", aci->aclName,
aci->aci_index );
for ( jj =0; jj < c_evalContext->acle_numof_attrs; jj++ ) {
@@ -4174,7 +4174,7 @@ acl__recompute_acl ( Acl_PBlock *aclpb,
goto set_result_status;
}
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Recomputing the ACL Index:%d for entry:%s\n",
aciIndex, slapi_entry_get_ndn ( aclpb->aclpb_curr_entry) );
diff --git a/ldap/servers/plugins/acl/acl_ext.c b/ldap/servers/plugins/acl/acl_ext.c
index 5ef20f8..9e500aa 100644
--- a/ldap/servers/plugins/acl/acl_ext.c
+++ b/ldap/servers/plugins/acl/acl_ext.c
@@ -98,7 +98,7 @@ acl_get_ext (ext_type type, void *object)
void *data;
if ( type >= ACL_EXT_ALL ) {
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Invalid extension type:%d\n", type );
return NULL;
}
@@ -147,7 +147,7 @@ aclext_alloc_lockarray ( )
for ( i = 0; i < ACLEXT_MAX_LOCKS; i++) {
if (NULL == (lock = PR_NewLock()) ) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to allocate locks used for private extension\n");
return 1;
}
@@ -196,7 +196,7 @@ acl_conn_ext_constructor ( void *object, void *parent )
struct acl_cblock *ext = NULL;
ext = (struct acl_cblock * ) slapi_ch_calloc (1, sizeof (struct acl_cblock ) );
if (( ext->aclcb_lock = aclext_get_lock () ) == NULL ) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to get Read/Write lock for CONNECTION extension\n");
slapi_ch_free ( (void **) &ext );
return NULL;
@@ -252,7 +252,7 @@ acl_operation_ext_constructor ( void *object, void *parent )
aclpb = acl__get_aclpb_from_pool();
if ( NULL == aclpb ) {
- slapi_log_error ( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Operation extension allocation Failed\n");
}
@@ -286,7 +286,7 @@ acl_operation_ext_destructor ( void *ext, void *object, void *parent
)
goto clean_aclpb;
if ( NULL == aclpb->aclpb_authorization_sdn ) {
- slapi_log_error (SLAPI_LOG_FATAL, plugin_name, "NULL
aclcb_autorization_sdn\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "NULL
aclcb_autorization_sdn\n");
goto clean_aclpb;
}
@@ -311,7 +311,7 @@ acl_operation_ext_destructor ( void *ext, void *object, void *parent
)
goto clean_aclpb;
}
if ( !aclcb->aclcb_lock ) {
- slapi_log_error (SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"aclcb lock released! aclcb cache can't be refreshed\n");
PR_Unlock ( shared_lock );
goto clean_aclpb;
@@ -395,7 +395,7 @@ acl_get_aclpb ( Slapi_PBlock *pb, int type )
else if ( type == ACLPB_PROXYDN_PBLOCK )
return aclpb->aclpb_proxy;
else
- slapi_log_error ( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"acl_get_aclpb: Invalid aclpb type %d\n", type );
return NULL;
}
@@ -565,7 +565,7 @@ acl__get_aclpb_from_pool(void)
aclQueue->aclq_nfree--;
} else {
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Unable to find a free aclpb\n");
aclpb = acl__malloc_aclpb ();
}
@@ -635,38 +635,38 @@ acl__malloc_aclpb(void)
/* Now set the propert we need for ACL evaluations */
if ((aclpb->aclpb_proplist = PListNew(NULL)) == NULL) {
- slapi_log_error (SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to allocate the aclprop PList\n");
goto error;
}
if (PListInitProp(aclpb->aclpb_proplist, 0, DS_PROP_ACLPB, aclpb, 0) < 0) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to set the ACL PBLOCK in the Plist\n");
goto error;
}
if (PListInitProp(aclpb->aclpb_proplist, 0, DS_ATTR_USERDN, aclpb, 0) < 0) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to set the USER DN in the Plist\n");
goto error;
}
if (PListInitProp(aclpb->aclpb_proplist, 0, DS_ATTR_AUTHTYPE, aclpb, 0) < 0) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to set the AUTH TYPE in the Plist\n");
goto error;
}
if (PListInitProp(aclpb->aclpb_proplist, 0, DS_ATTR_LDAPI, aclpb, 0) < 0) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to set the AUTH TYPE in the Plist\n");
goto error;
}
if (PListInitProp(aclpb->aclpb_proplist, 0, DS_ATTR_ENTRY, aclpb, 0) < 0) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to set the ENTRY TYPE in the Plist\n");
goto error;
}
if (PListInitProp(aclpb->aclpb_proplist, 0, DS_ATTR_SSF, aclpb, 0) < 0) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to set the SSF in the Plist\n");
goto error;
}
@@ -681,7 +681,7 @@ acl__malloc_aclpb(void)
/* allocate the acleval struct */
aclpb->aclpb_acleval = (ACLEvalHandle_t *) ACL_EvalNew(NULL, NULL);
if (aclpb->aclpb_acleval == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to allocate the acleval block\n");
goto error;
}
@@ -807,7 +807,7 @@ acl_init_aclpb ( Slapi_PBlock *pb, Acl_PBlock *aclpb, const char *ndn,
int copy_
if ( NULL == aclpb ) {
- slapi_log_error ( SLAPI_LOG_FATAL, plugin_name, "acl_init_aclpb:No
ACLPB\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "acl_init_aclpb:No
ACLPB\n");
return;
}
@@ -834,26 +834,26 @@ acl_init_aclpb ( Slapi_PBlock *pb, Acl_PBlock *aclpb, const char
*ndn, int copy_
if (PListAssignValue(aclpb->aclpb_proplist, DS_ATTR_USERDN,
slapi_sdn_get_ndn(aclpb->aclpb_authorization_sdn), 0) < 0) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to set the USER DN in the Plist\n");
return;
}
slapi_pblock_get ( pb, SLAPI_OPERATION_AUTHTYPE, &authType );
if (PListAssignValue(aclpb->aclpb_proplist, DS_ATTR_AUTHTYPE, authType, 0) < 0) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to set the AUTH TYPE in the Plist\n");
return;
}
if(slapi_is_ldapi_conn(pb)){
if(PListAssignValue(aclpb->aclpb_proplist, DS_ATTR_LDAPI, "yes", 0) <
0){
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to set the AUTH TYPE in the Plist\n");
return;
}
}
slapi_pblock_get ( pb, SLAPI_OPERATION_SSF, &ssf);
if (PListAssignValue(aclpb->aclpb_proplist, DS_ATTR_SSF, (const void *)ssf, 0) <
0) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to set the SSF in the Plist\n");
return;
}
@@ -890,7 +890,7 @@ acl_init_aclpb ( Slapi_PBlock *pb, Acl_PBlock *aclpb, const char *ndn,
int copy_
/* This could happen if the client is dead and we are in
** process of abondoning this operation
*/
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"No CONNECTION extension\n");
} else if ( aclcb->aclcb_state == -1 ) {
@@ -959,7 +959,7 @@ acl__done_aclpb ( struct acl_pblock *aclpb )
/* Check the state */
if (aclpb->aclpb_state & ~ACLPB_STATE_ALL) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"The aclpb.state value (%d) is incorrect. Exceeded the limit (%d)\n",
aclpb->aclpb_state, ACLPB_STATE_ALL);
dump_aclpb_info = 1;
@@ -974,7 +974,7 @@ acl__done_aclpb ( struct acl_pblock *aclpb )
aclg_reset_userGroup ( aclpb );
if ( aclpb->aclpb_res_type & ~ACLPB_RESTYPE_ALL ) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"The aclpb res_type value (%d) has exceeded. Limit is (%d)\n",
aclpb->aclpb_res_type, ACLPB_RESTYPE_ALL );
dump_aclpb_info = 1;
@@ -982,16 +982,16 @@ acl__done_aclpb ( struct acl_pblock *aclpb )
if ( dump_aclpb_info ) {
const char *ndn;
- slapi_log_error ( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"ACLPB value is:%p\n", aclpb );
ndn = slapi_sdn_get_ndn ( aclpb->aclpb_curr_entry_sdn );
- slapi_log_error ( SLAPI_LOG_FATAL, plugin_name, "curr_entry:%p num_entries:%d
curr_dn:%p\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "curr_entry:%p
num_entries:%d curr_dn:%p\n",
aclpb->aclpb_curr_entry ? (char *) aclpb->aclpb_curr_entry : "NULL",
aclpb->aclpb_num_entries,
ndn ? ndn : "NULL");
- slapi_log_error ( SLAPI_LOG_FATAL, plugin_name, "Last attr:%p, Plist:%p acleval:
%p\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "Last attr:%p, Plist:%p
acleval: %p\n",
aclpb->aclpb_Evalattr ? aclpb->aclpb_Evalattr : "NULL",
aclpb->aclpb_proplist ? (char *) aclpb->aclpb_proplist : "NULL",
aclpb->aclpb_acleval ? (char *) aclpb->aclpb_acleval : "NULL" );
@@ -1162,24 +1162,24 @@ acl__dump_stats ( struct acl_pblock *aclpb , const char
*block_type)
}
/* DUMP STAT INFO */
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"**** ACL OPERATION STAT BEGIN ( aclpb:%p Block type: %s): Conn:%" PRIu64
" Operation:%d *******\n",
aclpb, block_type, connid, opid );
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "\tNumber of entries scanned:
%d\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "\tNumber of entries
scanned: %d\n",
aclpb->aclpb_stat_total_entries);
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "\tNumber of times ACL List scanned:
%d\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "\tNumber of times ACL List
scanned: %d\n",
aclpb->aclpb_stat_acllist_scanned);
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "\tNumber of ACLs with target
matched:%d\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "\tNumber of ACLs with
target matched:%d\n",
aclpb->aclpb_stat_num_tmatched_acls);
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "\tNumber of times acl resource
matched:%d\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "\tNumber of times acl
resource matched:%d\n",
aclpb->aclpb_stat_aclres_matched);
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "\tNumber of times ANOM list
scanned:%d\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "\tNumber of times ANOM list
scanned:%d\n",
aclpb->aclpb_stat_anom_list_scanned);
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "\tNumber of times Context was
copied:%d\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "\tNumber of times Context
was copied:%d\n",
aclpb->aclpb_stat_num_copycontext);
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "\tNumber of times Attrs was
copied:%d\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "\tNumber of times Attrs was
copied:%d\n",
aclpb->aclpb_stat_num_copy_attrs);
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, " **** ACL OPERATION STAT END
*******\n");
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, " **** ACL OPERATION STAT
END *******\n");
}
#endif
/****************************************************************************/
diff --git a/ldap/servers/plugins/acl/aclanom.c b/ldap/servers/plugins/acl/aclanom.c
index 9493153..c381110 100644
--- a/ldap/servers/plugins/acl/aclanom.c
+++ b/ldap/servers/plugins/acl/aclanom.c
@@ -61,7 +61,7 @@ aclanom_init ()
slapi_ch_calloc (1, sizeof ( struct anom_profile ) );
if (( anom_rwlock = slapi_new_rwlock()) == NULL ) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Failed in getting the ANOM rwlock\n" );
return 1;
}
@@ -115,7 +115,7 @@ aclanom_gen_anomProfile (acl_lock_flag_t lock_flag)
/* We have a new signature now */
a_profile->anom_signature = acl_get_aclsignature();
- slapi_log_error(SLAPI_LOG_ACL, plugin_name, "GENERATING ANOM USER
PROFILE\n");
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "GENERATING ANOM USER
PROFILE\n");
/*
** Go thru the ACL list and find all the ACLs which apply to the
** anonymous user i.e anyone. we can generate a profile for that.
@@ -140,7 +140,7 @@ aclanom_gen_anomProfile (acl_lock_flag_t lock_flag)
( (aci->aci_type & ACI_CONTAIN_NOT_USERDN ) ||
(aci->aci_type & ACI_CONTAIN_NOT_GROUPDN) ||
(aci->aci_type & ACI_CONTAIN_NOT_ROLEDN)) ){
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"CANCELLING ANOM USER PROFILE BECAUSE OF DENY RULE\n");
goto cleanup;
}
@@ -158,7 +158,7 @@ aclanom_gen_anomProfile (acl_lock_flag_t lock_flag)
** let's not consider complex rules - let's make this lean.
*/
if ( aci->aci_ruleType & ~ACI_USERDN_RULE ){
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"CANCELLING ANOM USER PROFILE BECAUSE OF COMPLEX RULE\n");
goto cleanup;
}
@@ -179,7 +179,7 @@ aclanom_gen_anomProfile (acl_lock_flag_t lock_flag)
continue;
} else {
/* clean up before leaving */
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"CANCELLING ANOM USER PROFILE 1\n");
goto cleanup;
}
@@ -190,7 +190,7 @@ aclanom_gen_anomProfile (acl_lock_flag_t lock_flag)
a_numacl = a_profile->anom_numacls++;
if ( a_profile->anom_numacls == ACL_ANOM_MAX_ACL ) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name, "CANCELLING ANOM USER PROFILE
2\n");
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "CANCELLING ANOM USER
PROFILE 2\n");
goto cleanup;
}
@@ -211,7 +211,7 @@ aclanom_gen_anomProfile (acl_lock_flag_t lock_flag)
a_profile->anom_targetinfo[a_numacl].anom_filter = slapi_str2filter (
aci->targetFilterStr );
if (NULL == a_profile->anom_targetinfo[a_numacl].anom_filter) {
const char *dn = slapi_sdn_get_dn ( aci->aci_sdn );
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Error: invalid filter [%s] in anonymous aci in entry [%s]\n",
aci->targetFilterStr, dn);
goto cleanup;
@@ -237,7 +237,7 @@ aclanom_gen_anomProfile (acl_lock_flag_t lock_flag)
destattrArray[i] = NULL;
/* clean up before leaving */
aclanom__del_profile (0);
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"CANCELLING ANOM USER PROFILE 3\n");
goto cleanup;
}
@@ -522,7 +522,7 @@ aclanom_match_profile (Slapi_PBlock *pb, struct acl_pblock *aclpb,
Slapi_Entry *
const char *aci_ndn;
aci_ndn = slapi_sdn_get_ndn (acl_anom_profile->anom_targetinfo[i].anom_target);
if (access & SLAPI_ACL_MODDN) {
- slapi_log_error(loglevel, plugin_name,
+ slapi_log_error(loglevel, LOG_DEBUG, plugin_name,
"conn=%" NSPRIu64 " op=%d: Allow access on entry(%s).attr(%s) (from
%s) to anonymous: acidn=\"%s\"\n",
o_connid, o_opid,
ndn,
@@ -531,7 +531,7 @@ aclanom_match_profile (Slapi_PBlock *pb, struct acl_pblock *aclpb,
Slapi_Entry *
aci_ndn);
} else {
- slapi_log_error(loglevel, plugin_name,
+ slapi_log_error(loglevel, LOG_DEBUG, plugin_name,
"conn=%" NSPRIu64 " op=%d: Allow access on entry(%s).attr(%s) to
anonymous: acidn=\"%s\"\n",
o_connid, o_opid,
ndn,
@@ -540,13 +540,13 @@ aclanom_match_profile (Slapi_PBlock *pb, struct acl_pblock *aclpb,
Slapi_Entry *
}
} else {
if (access & SLAPI_ACL_MODDN) {
- slapi_log_error(loglevel, plugin_name,
+ slapi_log_error(loglevel, LOG_DEBUG, plugin_name,
"conn=%" NSPRIu64 " op=%d: Deny access on entry(%s).attr(%s) (from
%s) to anonymous\n",
o_connid, o_opid,
ndn, attr ? attr:"NULL" ,
aclpb->aclpb_moddn_source_sdn ?
slapi_sdn_get_dn(aclpb->aclpb_moddn_source_sdn) : "NULL");
} else {
- slapi_log_error(loglevel, plugin_name,
+ slapi_log_error(loglevel, LOG_DEBUG, plugin_name,
"conn=%" NSPRIu64 " op=%d: Deny access on entry(%s).attr(%s) to
anonymous\n",
o_connid, o_opid,
ndn, attr ? attr:"NULL" );
diff --git a/ldap/servers/plugins/acl/acleffectiverights.c
b/ldap/servers/plugins/acl/acleffectiverights.c
index f3e00f0..47cbd87 100644
--- a/ldap/servers/plugins/acl/acleffectiverights.c
+++ b/ldap/servers/plugins/acl/acleffectiverights.c
@@ -108,7 +108,7 @@ _ger_g_permission_granted (
}
if ( slapi_sdn_get_dn (requestor_sdn) == NULL )
{
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"_ger_g_permission_granted: anonymous has no g permission\n" );
rc = LDAP_INSUFFICIENT_ACCESS;
goto bailout;
@@ -144,7 +144,7 @@ _ger_g_permission_granted (
}
aclutil_str_append ( errbuf, "get-effective-rights: requestor has no g permission
on the entry" );
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"_ger_g_permission_granted: %s\n", *errbuf);
rc = LDAP_INSUFFICIENT_ACCESS;
@@ -191,7 +191,7 @@ _ger_parse_control (
subjectber->bv_len == 0 )
{
aclutil_str_append ( errbuf, "get-effective-rights: missing subject" );
- slapi_log_error (SLAPI_LOG_FATAL, plugin_name, "%s\n", *errbuf );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "%s\n", *errbuf );
if (iscritical)
return LDAP_UNAVAILABLE_CRITICAL_EXTENSION; /* RFC 4511 4.1.11 */
else
@@ -215,7 +215,7 @@ _ger_parse_control (
if ( ber == NULL )
{
aclutil_str_append ( errbuf, "get-effective-rights: ber_init failed for the
subject" );
- slapi_log_error (SLAPI_LOG_FATAL, plugin_name, "%s\n", *errbuf );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "%s\n", *errbuf );
if (iscritical)
return LDAP_UNAVAILABLE_CRITICAL_EXTENSION; /* RFC 4511
4.1.11 */
else
@@ -225,7 +225,7 @@ _ger_parse_control (
if ( ber_scanf (ber, "a", &orig) == LBER_ERROR )
{
aclutil_str_append ( errbuf, "get-effective-rights: invalid ber tag in the
subject" );
- slapi_log_error (SLAPI_LOG_FATAL, plugin_name, "%s\n", *errbuf );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "%s\n", *errbuf );
ber_free ( ber, 1 );
if (iscritical)
return LDAP_UNAVAILABLE_CRITICAL_EXTENSION; /* RFC 4511
4.1.11 */
@@ -244,7 +244,7 @@ _ger_parse_control (
if ( NULL == orig || subjectndnlen < 3 || strncasecmp ( "dn:", orig, 3 ) !=
0 )
{
aclutil_str_append ( errbuf, "get-effective-rights: subject is not dnAuthzId"
);
- slapi_log_error (SLAPI_LOG_FATAL, plugin_name, "%s\n", *errbuf );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "%s\n", *errbuf );
slapi_ch_free_string(&orig);
if (iscritical)
return LDAP_UNAVAILABLE_CRITICAL_EXTENSION; /* RFC 4511 4.1.11 */
@@ -257,7 +257,7 @@ _ger_parse_control (
if (NULL == normed) {
aclutil_str_append (errbuf, "get-effective-rights: failed to normalize dn:
");
aclutil_str_append (errbuf, orig);
- slapi_log_error (SLAPI_LOG_FATAL, plugin_name, "%s\n", *errbuf);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "%s\n", *errbuf);
slapi_ch_free_string(&orig);
if (iscritical)
return LDAP_UNAVAILABLE_CRITICAL_EXTENSION; /* RFC 4511 4.1.11 */
@@ -403,7 +403,7 @@ _ger_get_entry_rights (
_append_gerstr(gerstr, gerstrsize, gerstrcap, "entryLevelRights: ", NULL);
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"_ger_get_entry_rights: SLAPI_ACL_READ\n" );
if (acl_access_allowed(gerpb, e, "*", NULL, SLAPI_ACL_READ) == LDAP_SUCCESS)
{
@@ -411,7 +411,7 @@ _ger_get_entry_rights (
entryrights |= SLAPI_ACL_READ;
_append_gerstr(gerstr, gerstrsize, gerstrcap, "v", NULL);
}
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"_ger_get_entry_rights: SLAPI_ACL_ADD\n" );
if (acl_access_allowed(gerpb, e, NULL, NULL, SLAPI_ACL_ADD) == LDAP_SUCCESS)
{
@@ -419,7 +419,7 @@ _ger_get_entry_rights (
entryrights |= SLAPI_ACL_ADD;
_append_gerstr(gerstr, gerstrsize, gerstrcap, "a", NULL);
}
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"_ger_get_entry_rights: SLAPI_ACL_DELETE\n" );
if (acl_access_allowed(gerpb, e, NULL, NULL, SLAPI_ACL_DELETE) == LDAP_SUCCESS)
{
@@ -435,7 +435,7 @@ _ger_get_entry_rights (
* WRITE was granted on rdn attrbibute
*/
if (acl_access_allowed(gerpb, e, NULL, NULL, SLAPI_ACL_MODDN) == LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"_ger_get_entry_rights: SLAPI_ACL_MODDN %s\n",
slapi_entry_get_ndn(e));
/* n - rename e */
entryrights |= SLAPI_ACL_MODDN;
@@ -453,7 +453,7 @@ _ger_get_entry_rights (
rdn = slapi_rdn_new_dn(slapi_entry_get_ndn(e));
slapi_rdn_get_first(rdn, &rdntype, &rdnvalue);
if (NULL != rdntype) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"_ger_get_entry_rights: SLAPI_ACL_WRITE_DEL & _ADD
%s\n", rdntype);
if (acl_access_allowed(gerpb, e, rdntype, NULL,
ACLPB_SLAPI_ACL_WRITE_DEL) == LDAP_SUCCESS &&
@@ -501,7 +501,7 @@ _ger_get_attr_rights (
}
_append_gerstr(gerstr, gerstrsize, gerstrcap, type, ":");
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"_ger_get_attr_rights: SLAPI_ACL_READ %s\n", type );
if (acl_access_allowed(gerpb, e, type, NULL, SLAPI_ACL_READ) == LDAP_SUCCESS)
{
@@ -509,7 +509,7 @@ _ger_get_attr_rights (
attrrights |= SLAPI_ACL_READ;
_append_gerstr(gerstr, gerstrsize, gerstrcap, "r", NULL);
}
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"_ger_get_attr_rights: SLAPI_ACL_SEARCH %s\n", type );
if (acl_access_allowed(gerpb, e, type, NULL, SLAPI_ACL_SEARCH) == LDAP_SUCCESS)
{
@@ -517,7 +517,7 @@ _ger_get_attr_rights (
attrrights |= SLAPI_ACL_SEARCH;
_append_gerstr(gerstr, gerstrsize, gerstrcap, "s", NULL);
}
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"_ger_get_attr_rights: SLAPI_ACL_COMPARE %s\n", type );
if (acl_access_allowed(gerpb, e, type, NULL, SLAPI_ACL_COMPARE) == LDAP_SUCCESS)
{
@@ -525,7 +525,7 @@ _ger_get_attr_rights (
attrrights |= SLAPI_ACL_COMPARE;
_append_gerstr(gerstr, gerstrsize, gerstrcap, "c", NULL);
}
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"_ger_get_attr_rights: SLAPI_ACL_WRITE_ADD %s\n", type );
if (acl_access_allowed(gerpb, e, type, NULL, ACLPB_SLAPI_ACL_WRITE_ADD) ==
LDAP_SUCCESS)
{
@@ -533,7 +533,7 @@ _ger_get_attr_rights (
attrrights |= ACLPB_SLAPI_ACL_WRITE_ADD;
_append_gerstr(gerstr, gerstrsize, gerstrcap, "w", NULL);
}
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"_ger_get_attr_rights: SLAPI_ACL_WRITE_DEL %s\n", type );
if (acl_access_allowed(gerpb, e, type, NULL, ACLPB_SLAPI_ACL_WRITE_DEL) ==
LDAP_SUCCESS)
{
@@ -856,7 +856,7 @@ _ger_generate_template_entry (
slapi_pblock_get( pb, SLAPI_SEARCH_GERATTRS, &gerattrs );
if (NULL == gerattrs)
{
- slapi_log_error (SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Objectclass info is expected "
"in the attr list, e.g., \"*@person\"\n");
rc = LDAP_SUCCESS;
@@ -1089,10 +1089,10 @@ bailout:
gerstr = slapi_ch_smprintf("entryLevelRights: %d\nattributeLevelRights:
*:%d", rc, rc );
}
- slapi_log_error (SLAPI_LOG_ACLSUMMARY, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACLSUMMARY, LOG_DEBUG, plugin_name,
"###### Effective Rights on Entry (%s) for Subject (%s) ######\n",
e?slapi_entry_get_ndn(e):"null", subjectndn?subjectndn:"null");
- slapi_log_error (SLAPI_LOG_ACLSUMMARY, plugin_name, "%s\n", gerstr);
+ slapi_log_error(SLAPI_LOG_ACLSUMMARY, LOG_DEBUG, plugin_name, "%s\n",
gerstr);
/* Restore pb */
_ger_release_gerpb ( &gerpb, &aclcb, pb );
diff --git a/ldap/servers/plugins/acl/aclgroup.c b/ldap/servers/plugins/acl/aclgroup.c
index 7cd6a53..811a9ef 100644
--- a/ldap/servers/plugins/acl/aclgroup.c
+++ b/ldap/servers/plugins/acl/aclgroup.c
@@ -41,7 +41,7 @@ aclgroup_init ()
aclUserGroups = ( aclGroupCache * ) slapi_ch_calloc (1, sizeof ( aclGroupCache ) );
if ( NULL == (aclUserGroups->aclg_rwlock = slapi_new_rwlock())) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name, "Unable to allocate RWLOCK for group
cache\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "Unable to allocate RWLOCK
for group cache\n");
return 1;
}
return 0;
@@ -101,7 +101,7 @@ aclg_init_userGroup ( struct acl_pblock *aclpb, const char *n_dn , int
got_lock
*/
if ( !u_group->aclug_refcnt ) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"In traversal group deallocation\n" );
__aclg__delete_userGroup (u_group);
}
@@ -142,7 +142,7 @@ aclg_init_userGroup ( struct acl_pblock *aclpb, const char *n_dn , int
got_lock
if ( u_group == aclUserGroups->aclg_last )
aclUserGroups->aclg_last = p_group;
}
- slapi_log_error(SLAPI_LOG_ACL, plugin_name, "acl_init_userGroup: found in cache
for dn:%s\n", n_dn);
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "acl_init_userGroup: found
in cache for dn:%s\n", n_dn);
}
if (!got_lock ) ACLG_ULOCK_GROUPCACHE_WRITE ();
}
@@ -252,7 +252,7 @@ aclg_get_usersGroup ( struct acl_pblock *aclpb , char *n_dn)
aclUserGroup *u_group, *f_group;
if ( !aclpb ) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "NULL acl pblock\n" );
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "NULL acl pblock\n"
);
return NULL;
}
@@ -274,7 +274,7 @@ aclg_get_usersGroup ( struct acl_pblock *aclpb , char *n_dn)
* That's fine as the invalid one will be deallocated when done.
*/
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "ALLOCATING GROUP FOR:%s\n", n_dn
);
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "ALLOCATING GROUP
FOR:%s\n", n_dn );
u_group = ( aclUserGroup * ) slapi_ch_calloc ( 1, sizeof ( aclUserGroup ) );
u_group->aclug_refcnt = 1;
@@ -368,7 +368,7 @@ __aclg__delete_userGroup ( aclUserGroup *u_group )
* be in a condemned state and later deleted.
*/
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "DEALLOCATING GROUP FOR:%s\n",
u_group->aclug_ndn );
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "DEALLOCATING GROUP
FOR:%s\n", u_group->aclug_ndn );
slapi_ch_free ( (void **) &u_group->aclug_ndn );
diff --git a/ldap/servers/plugins/acl/aclinit.c b/ldap/servers/plugins/acl/aclinit.c
index c00d667..4814059 100644
--- a/ldap/servers/plugins/acl/aclinit.c
+++ b/ldap/servers/plugins/acl/aclinit.c
@@ -56,7 +56,7 @@ aclinit_main()
/* Initialize the LIBACCESS ACL library */
if (ACL_Init() != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"ACL Library Initialization failed\n");
return 1;
}
@@ -85,21 +85,21 @@ aclinit_main()
/* ONREPL Moved to the acl_init function because extensions
need to be registered before any operations are issued
if ( 0 != acl_init_ext() ) {
- slapi_log_error ( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to initialize the extensions\n");
return 1;
} */
/* create the mutex array */
if ( 0 != aclext_alloc_lockarray ( ) ) {
- slapi_log_error ( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to create the mutext array\n");
return 1;
}
/* Allocate the pool */
if ( 0 != acl_create_aclpb_pool () ) {
- slapi_log_error ( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to create the acl private pool\n");
return 1;
}
@@ -110,7 +110,7 @@ aclinit_main()
*/
/* initialize the ACLLIST sub-system */
if ( 0 != (rv = acllist_init ( ))) {
- slapi_log_error ( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to initialize the plugin:%d\n", rv );
return 1;
}
@@ -128,7 +128,7 @@ aclinit_main()
*/
sdn = slapi_sdn_new_ndn_byval("");
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Searching for all acis(scope base) at suffix ''\n");
aclinit_search_and_update_aci ( 0, /* thisbeonly */
sdn, /* base */
@@ -140,7 +140,7 @@ aclinit_main()
sdn = slapi_get_first_suffix( &node, 1 );
while (sdn)
{
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Searching for all acis(scope subtree) at suffix '%s'\n",
slapi_sdn_get_dn(sdn) );
aclinit_search_and_update_aci ( 0, /* thisbeonly */
@@ -210,7 +210,7 @@ aclinit_search_and_update_aci ( int thisbeonly, const Slapi_DN *base,
lock_flag == DO_TAKE_ACLCACHE_WRITELOCK);
if ( thisbeonly && be_name == NULL) {
- slapi_log_error ( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Error: This be_name must be specified.\n");
return -1;
}
@@ -335,7 +335,7 @@ __aclinit_handler ( Slapi_Entry *e, void *callback_data)
*/
if ( call_back_data->op == ACL_ADD_ACIS ) {
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Adding acis for entry '%s'\n", slapi_sdn_get_dn(e_sdn));
slapi_entry_attr_find ( e, aci_attr_type, &attr );
@@ -355,7 +355,7 @@ __aclinit_handler ( Slapi_Entry *e, void *callback_data)
aclutil_print_err(rv, e_sdn, attrValue, NULL);
/* We got an error; Log it and then march along */
- slapi_log_error ( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Error: This (%s) ACL will not be considered for evaluation"
" because of syntax errors.\n",
attrValue->bv_val ? attrValue->bv_val: "NULL");
@@ -370,7 +370,7 @@ __aclinit_handler ( Slapi_Entry *e, void *callback_data)
} else if (call_back_data->op == ACL_REMOVE_ACIS) {
/* Here we are deleting the acis. */
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name, "Removing acis\n");
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "Removing acis\n");
if ( call_back_data->lock_flag == DO_TAKE_ACLCACHE_WRITELOCK) {
acllist_acicache_WRITE_LOCK();
}
@@ -378,7 +378,7 @@ __aclinit_handler ( Slapi_Entry *e, void *callback_data)
aclutil_print_err(rv, e_sdn, NULL, NULL);
/* We got an error; Log it and then march along */
- slapi_log_error ( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Error: ACls not deleted from %s\n",
slapi_sdn_get_dn(e_sdn));
call_back_data->retCode = rv;
@@ -428,14 +428,14 @@ __aclinit__RegisterAttributes(void)
rv = ACL_MethodRegister(&errp, DS_METHOD, &methodinfo);
if (rv < 0) {
acl_print_acllib_err(&errp, NULL);
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to Register the methods\n");
return ACL_ERR;
}
rv = ACL_MethodSetDefault (&errp, methodinfo);
if (rv < 0) {
acl_print_acllib_err(&errp, NULL);
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to Set the default method\n");
return ACL_ERR;
}
@@ -443,7 +443,7 @@ __aclinit__RegisterAttributes(void)
methodinfo, ACL_DBTYPE_ANY, ACL_AT_FRONT, NULL);
if (rv < 0) {
acl_print_acllib_err(&errp, NULL);
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to Register Attr ip\n");
return ACL_ERR;
}
@@ -451,7 +451,7 @@ __aclinit__RegisterAttributes(void)
methodinfo, ACL_DBTYPE_ANY, ACL_AT_FRONT, NULL);
if (rv < 0) {
acl_print_acllib_err(&errp, NULL);
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to Register Attr dns\n");
return ACL_ERR;
}
@@ -482,66 +482,66 @@ __aclinit__RegisterLases(void)
if (ACL_LasRegister(NULL, DS_LAS_USER, (LASEvalFunc_t) DS_LASUserEval,
(LASFlushFunc_t) NULL) < 0) {
- slapi_log_error (SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to register USER Las\n");
return ACL_ERR;
}
if (ACL_LasRegister(NULL, DS_LAS_GROUP, (LASEvalFunc_t) DS_LASGroupEval,
(LASFlushFunc_t) NULL) < 0) {
- slapi_log_error (SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to register GROUP Las\n");
return ACL_ERR;
}
if (ACL_LasRegister(NULL, DS_LAS_GROUPDN, (LASEvalFunc_t)DS_LASGroupDnEval,
(LASFlushFunc_t)NULL) < 0) {
- slapi_log_error (SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to register GROUPDN Las\n");
return ACL_ERR;
}
if (ACL_LasRegister(NULL, DS_LAS_ROLEDN, (LASEvalFunc_t)DS_LASRoleDnEval,
(LASFlushFunc_t)NULL) < 0) {
- slapi_log_error (SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to register ROLEDN Las\n");
return ACL_ERR;
}
if (ACL_LasRegister(NULL, DS_LAS_USERDN, (LASEvalFunc_t)DS_LASUserDnEval,
(LASFlushFunc_t)NULL) < 0) {
- slapi_log_error (SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to register USERDN Las\n");
return ACL_ERR;
}
if (ACL_LasRegister(NULL, DS_LAS_USERDNATTR,
(LASEvalFunc_t)DS_LASUserDnAttrEval,
(LASFlushFunc_t)NULL) < 0) {
- slapi_log_error (SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to register USERDNATTR Las\n");
return ACL_ERR;
}
if (ACL_LasRegister(NULL, DS_LAS_AUTHMETHOD,
(LASEvalFunc_t)DS_LASAuthMethodEval,
(LASFlushFunc_t)NULL) < 0) {
- slapi_log_error (SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to register CLIENTAUTHTYPE Las\n");
return ACL_ERR;
}
if (ACL_LasRegister(NULL, DS_LAS_GROUPDNATTR,
(LASEvalFunc_t)DS_LASGroupDnAttrEval,
(LASFlushFunc_t)NULL) < 0) {
- slapi_log_error (SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to register GROUPDNATTR Las\n");
return ACL_ERR;
}
if (ACL_LasRegister(NULL, DS_LAS_USERATTR,
(LASEvalFunc_t)DS_LASUserAttrEval,
(LASFlushFunc_t)NULL) < 0) {
- slapi_log_error (SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to register USERATTR Las\n");
return ACL_ERR;
}
if (ACL_LasRegister(NULL, DS_LAS_SSF,
(LASEvalFunc_t)DS_LASSSFEval,
(LASFlushFunc_t)NULL) < 0) {
- slapi_log_error (SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to register SSF Las\n");
return ACL_ERR;
}
diff --git a/ldap/servers/plugins/acl/acllas.c b/ldap/servers/plugins/acl/acllas.c
index 47ac0b8..b562a49 100644
--- a/ldap/servers/plugins/acl/acllas.c
+++ b/ldap/servers/plugins/acl/acllas.c
@@ -259,35 +259,35 @@ DS_LASIpGetter(NSErr_t *errp, PList_t subject, PList_t resource,
PList_t
rv = ACL_GetAttribute(errp, DS_PROP_ACLPB, (void **)&aclpb, subject, resource,
auth_info, global_auth);
if ( rv != LAS_EVAL_TRUE || ( NULL == aclpb )) {
acl_print_acllib_err(errp, NULL);
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"DS_LASIpGetter:Unable to get the ACLPB(%d)\n", rv);
return LAS_EVAL_FAIL;
}
client_praddr = (PRNetAddr *)slapi_ch_malloc(sizeof(PRNetAddr));
if(client_praddr == NULL){
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name, "DS_LASIpGetter: failed to allocate
client_praddr\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "DS_LASIpGetter: failed to
allocate client_praddr\n");
return( LAS_EVAL_FAIL );
}
if ( slapi_pblock_get( aclpb->aclpb_pblock, SLAPI_CONN_CLIENTNETADDR, client_praddr )
!= 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name, "DS_LASIpGetter: Could not get
client IP.\n" );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "DS_LASIpGetter: Could not
get client IP.\n" );
slapi_ch_free((void **)&client_praddr);
return( LAS_EVAL_FAIL );
}
rv = PListInitProp(subject, 0, ACL_ATTR_IP, (void *)client_praddr, NULL);
if (rv < 0) {
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name, "DS_LASIpGetter: "
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "DS_LASIpGetter: "
"Couldn't set the client addr property(%d)\n", rv );
slapi_ch_free((void **)&client_praddr);
return LAS_EVAL_FAIL;
}
if( PR_NetAddrToString(client_praddr, ip_str, sizeof(ip_str)) == PR_SUCCESS){
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "DS_LASIpGetter: "
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "DS_LASIpGetter: "
"Returning client ip address '%s'\n", ip_str);
} else {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "DS_LASIpGetter: "
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "DS_LASIpGetter: "
"Returning client ip address 'unknown'\n");
}
@@ -317,13 +317,13 @@ DS_LASDnsGetter(NSErr_t *errp, PList_t subject, PList_t resource,
PList_t
subject, resource, auth_info, global_auth);
if ( rv != LAS_EVAL_TRUE || ( NULL == aclpb )) {
acl_print_acllib_err(errp, NULL);
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"DS_LASDnsGetter:Unable to get the ACLPB(%d)\n", rv);
return LAS_EVAL_FAIL;
}
if ( slapi_pblock_get( aclpb->aclpb_pblock, SLAPI_CLIENT_DNS, &clientDns ) != 0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name, "Could not get client
IP.\n" );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "Could not
get client IP.\n" );
return( LAS_EVAL_FAIL );
}
@@ -346,7 +346,7 @@ DS_LASDnsGetter(NSErr_t *errp, PList_t subject, PList_t resource,
PList_t
if ( slapi_pblock_get( aclpb->aclpb_pblock, SLAPI_CONN_CLIENTNETADDR,
&client_praddr ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name, "Could not get client IP.\n"
);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "Could not get client
IP.\n" );
return( LAS_EVAL_FAIL );
}
hp = (PRHostEnt *)slapi_ch_malloc( sizeof(PRHostEnt) );
@@ -368,11 +368,11 @@ DS_LASDnsGetter(NSErr_t *errp, PList_t subject, PList_t resource,
PList_t
rv = PListInitProp(subject, 0, ACL_ATTR_DNS, dnsName, NULL);
if (rv < 0) {
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"DS_LASDnsGetter:Couldn't set the DNS property(%d)\n", rv );
return LAS_EVAL_FAIL;
}
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name, "DNS name: %s\n", dnsName );
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "DNS name: %s\n",
dnsName );
return LAS_EVAL_TRUE;
}
@@ -395,7 +395,7 @@ DS_LASUserEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
PList_t subject, PList_t resource, PList_t auth_info,
PList_t global_auth)
{
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"User LAS is not supported in the ACL\n");
return LAS_EVAL_INVALID;
@@ -407,7 +407,7 @@ DS_LASGroupEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
PList_t subject, PList_t resource, PList_t auth_info,
PList_t global_auth)
{
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Group LAS is not supported in the ACL\n");
return LAS_EVAL_INVALID;
@@ -513,7 +513,7 @@ DS_LASUserDnEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
user += LDAPS_URL_prefix_len;
} else {
char ebuf[ BUFSIZ ];
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"DS_LASUserDnEval:Syntax error(%s)\n",
escape_string_with_punctuation( user, ebuf ));
return LAS_EVAL_FAIL;
@@ -630,7 +630,7 @@ DS_LASUserDnEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
if (( filterChoice != LDAP_FILTER_SUBSTRINGS) &&
( filterChoice != LDAP_FILTER_PRESENT)) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"DS_LASUserDnEval:Error in gen. filter(%s)\n", user);
}
if ((rc = acl_match_substring( f,
@@ -642,7 +642,7 @@ DS_LASUserDnEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
break;
}
if (rc == ACL_ERR) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"DS_LASUserDnEval:Error in matching patteren(%s)\n",
user);
}
@@ -651,7 +651,7 @@ DS_LASUserDnEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
/* Must be a simple dn then */
char *normed = slapi_create_dn_string("%s", user);
if (NULL == normed) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"DS_LASUserDnEval:Error in normalizing dn(%s)\n", user);
normed = user;
}
@@ -689,7 +689,7 @@ DS_LASUserDnEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
}
} else {
rc = LAS_EVAL_FAIL;
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Returning UNDEFINED for userdn evaluation.\n");
}
@@ -773,7 +773,7 @@ DS_LASGroupDnEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
groupName += LDAP_URL_prefix_len;
} else {
char ebuf[ BUFSIZ ];
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"DS_LASGroupDnEval:Syntax error(%s)\n",
escape_string_with_punctuation( groupName, ebuf ));
}
@@ -822,7 +822,7 @@ DS_LASGroupDnEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
break;
} else if ( lasinfo.anomUser &&
(lasinfo.aclpb->aclpb_clientcert == NULL) && (!any_group)) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Group not evaluated(%s)\n", groupName);
break;
} else {
@@ -831,7 +831,7 @@ DS_LASGroupDnEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
(PL_strcasestr (groupName, ACL_RULE_MACRO_ATTR_KEY) != NULL)) {
matched = aclutil_evaluate_macro( groupName, &lasinfo,
ACL_EVAL_GROUP);
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"DS_LASGroupDnEval: Param group name:%s\n",
groupName);
} else {
@@ -882,7 +882,7 @@ DS_LASGroupDnEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
} else {
if (urlerr) {
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"DS_LASGroupDnEval: Groupname [%s] not a valid ldap url: %d
(%s)\n",
groupNameOrig, urlerr, slapi_urlparse_err2string(urlerr));
}
@@ -919,7 +919,7 @@ DS_LASGroupDnEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
}
} else {
rc = LAS_EVAL_FAIL;
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Returning UNDEFINED for groupdn evaluation.\n");
}
@@ -999,7 +999,7 @@ DS_LASRoleDnEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
role += LDAP_URL_prefix_len;
} else {
char ebuf[ BUFSIZ ];
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"DS_LASRoleDnEval:Syntax error(%s)\n",
escape_string_with_punctuation( role, ebuf ));
}
@@ -1039,7 +1039,7 @@ DS_LASRoleDnEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
break;
} else if ( lasinfo.anomUser &&
(lasinfo.aclpb->aclpb_clientcert == NULL) && (!any_role)) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Role not evaluated(%s) for anon user\n", role);
break;
} else {
@@ -1051,7 +1051,7 @@ DS_LASRoleDnEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
matched = aclutil_evaluate_macro( role, &lasinfo,
ACL_EVAL_ROLE);
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"DS_LASRoleDnEval: Param role name:%s\n",
role);
} else {/* normal evaluation */
@@ -1085,7 +1085,7 @@ DS_LASRoleDnEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
}
} else {
rc = LAS_EVAL_FAIL;
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Returning UNDEFINED for roledn evaluation.\n");
}
@@ -1144,7 +1144,7 @@ DS_LASUserDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
if (attr_name == NULL ||
(strcmp(DS_LAS_SELFDNATTR, attr_name) &&
strcmp(DS_LAS_USERDNATTR, attr_name))) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"DS_LASUserDnattr: invalid attr_name (should be %s or
%s)\n",
DS_LAS_SELFDNATTR, DS_LAS_USERDNATTR);
return LAS_EVAL_FAIL;
@@ -1212,7 +1212,7 @@ DS_LASUserDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
* Here, ignore the extra levels..it's really
* a syntax error which should have been ruled out at parse time
*/
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"DS_LASUserDnattr: Exceeded the ATTR LIMIT:%d: Ignoring extra levels\n",
ACLLAS_MAX_LEVELS);
}
@@ -1243,7 +1243,7 @@ DS_LASUserDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
return LAS_EVAL_FAIL;
}
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,"Attr:%s\n" , attrName);
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,"Attr:%s\n" ,
attrName);
matched = ACL_FALSE;
for (i=0; i < numOflevels; i++) {
if ( levels[i] == 0 ) {
@@ -1262,10 +1262,10 @@ DS_LASUserDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
if ( lasinfo.aclpb->aclpb_optype == SLAPI_OPERATION_ADD) {
if (selfdn) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG,
plugin_name,
"ACL info: %s DOES allow ADD
permission at level 0.\n", attr_name);
} else {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG,
plugin_name,
"ACL info: %s does not allow ADD
permission at level 0.\n", attr_name);
got_undefined = 1;
continue;
@@ -1280,7 +1280,7 @@ DS_LASUserDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
*/
slapi_attr_get_numvalues((const Slapi_Attr *) a,
&numValues);
if (numValues != 1) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG,
plugin_name,
"DS_LASSelfDnAttrEval: fail because
the retrieved %s in resource has more than one value (%d)\n",
attrName, numValues);
got_undefined = 1;
@@ -1293,7 +1293,7 @@ DS_LASUserDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
/* Here if atleast 1 value matches then we are done.*/
val = slapi_create_dn_string("%s", attrVal->bv_val);
if (NULL == val) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"DS_LASUserDnAttrEval: Invalid syntax: %s\n",
attrVal->bv_val );
slapi_ch_free ( (void**) &s_attrName);
@@ -1303,7 +1303,7 @@ DS_LASUserDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
if (slapi_utf8casecmp((ACLUCHP)val, (ACLUCHP)lasinfo.clientDn ) == 0) {
char ebuf [ BUFSIZ ];
/* Wow it matches */
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"%s matches(%s, %s) level (%d)\n", attr_name,
val, ACL_ESCAPE_STRING_WITH_PUNCTUATION (lasinfo.clientDn, ebuf), 0);
matched = ACL_TRUE;
@@ -1353,7 +1353,7 @@ DS_LASUserDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
*/
if (info.result) {
matched = ACL_TRUE;
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"%s matches at level (%d)\n", attr_name, levels[i]);
}
}
@@ -1377,7 +1377,7 @@ DS_LASUserDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
}
} else {
rc = LAS_EVAL_FAIL;
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Returning UNDEFINED for %s evaluation.\n", attr_name);
}
@@ -1476,7 +1476,7 @@ DS_LASLdapUrlAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
* Here, ignore the extra levels..it's really
* a syntax error which should have been ruled out at parse time
*/
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"DS_LASLdapUrlattr: Exceeded the ATTR LIMIT:%d: Ignoring extra
levels\n",
ACLLAS_MAX_LEVELS);
}
@@ -1508,7 +1508,7 @@ DS_LASLdapUrlAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
return LAS_EVAL_FAIL;
}
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,"Attr:%s\n" , attrName);
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,"Attr:%s\n" ,
attrName);
matched = ACL_FALSE;
for (i = 0; i < numOflevels; i++) {
if ( levels[i] == 0 ) { /* parent[0] or the target itself */
@@ -1583,7 +1583,7 @@ DS_LASLdapUrlAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
*/
if (info.result) {
matched = ACL_TRUE;
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"userdnAttr matches at level (%d)\n", levels[i]);
}
}
@@ -1607,7 +1607,7 @@ DS_LASLdapUrlAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
}
} else {
rc = LAS_EVAL_FAIL;
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Returning UNDEFINED for userdnattr evaluation.\n");
}
@@ -1676,7 +1676,7 @@ DS_LASAuthMethodEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
LDAP_UTF8DEC(ptr);
}
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"DS_LASAuthMethodEval:authtype:%s authmethod:%s\n",
lasinfo.authType, attr);
@@ -1756,23 +1756,23 @@ DS_LASSSFEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
aclssf = (int) strtol(attr, &ptr, 10);
if (*ptr != '\0') {
rc = LAS_EVAL_FAIL;
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Error parsing numeric SSF from bind rule.\n");
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Returning UNDEFINED for ssf evaluation.\n");
}
/* Check for negative values or a value overflow. */
if ((aclssf < 0) || (((aclssf == INT_MAX) || (aclssf == INT_MIN)) && (errno
== ERANGE))){
rc = LAS_EVAL_FAIL;
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"SSF \"%s\" is invalid. Value must range from 0 to %d",
attr, INT_MAX);
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Returning UNDEFINED for ssf evaluation.\n");
}
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"DS_LASSSFEval: aclssf:%d, ssf:%d\n",
aclssf, lasinfo.ssf);
@@ -1824,10 +1824,10 @@ DS_LASSSFEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
* validated by __acllas_setup(), but better safe
* than sorry. */
rc = LAS_EVAL_FAIL;
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Invalid comparator \"%d\" evaluating SSF.\n",
(int)comparator);
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Returning UNDEFINED for ssf evaluation.\n");
}
@@ -1912,7 +1912,7 @@ dump_eval_info (char *caller, struct eval_info *info, int idx)
sprintf ( &buf[len], "\n [%d]: ", i );
dump_member_info ( info, info->memberInfo[i], buf );
}
- slapi_log_error ( SLAPI_LOG_FATAL, NULL, "\n======== candidate member info in
eval_info ========%s\n\n", buf );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "\n======== candidate member info
in eval_info ========%s\n\n", buf );
}
else
{
@@ -1934,7 +1934,7 @@ dump_eval_info (char *caller, struct eval_info *info, int idx)
break;
}
dump_member_info ( info, info->memberInfo[idx], buf );
- slapi_log_error ( SLAPI_LOG_FATAL, NULL, "%s\n", buf );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "%s\n", buf );
}
}
#endif
@@ -1989,33 +1989,33 @@ acllas__user_ismember_of_group( struct acl_pblock *aclpb,
** a member of the cached list of groups.
*/
if ( (u_group = aclg_get_usersGroup ( aclpb , clientDN )) == NULL) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Failed to find/allocate a usergroup--aborting evaluation\n");
return(ACL_DONT_KNOW);
}
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "Evaluating user %s in group
%s?\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "Evaluating user %s in group
%s?\n",
clientDN, groupDN );
/* Before I start using, get a reader lock on the group cache */
aclg_lock_groupCache ( 1 /* reader */ );
for ( i= 0; i < u_group->aclug_numof_member_group; i++) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "-- In %s\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "-- In %s\n",
u_group->aclug_member_groups[i] );
if ( slapi_utf8casecmp((ACLUCHP)groupDN, (ACLUCHP)u_group->aclug_member_groups[i])
== 0){
aclg_unlock_groupCache ( 1 /* reader */ );
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "Evaluated ACL_TRUE\n");
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "Evaluated
ACL_TRUE\n");
return ACL_TRUE;
}
}
/* see if we know the client is not a member of a group. */
for ( i= 0; i < u_group->aclug_numof_notmember_group; i++) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "-- Not in %s\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "-- Not in %s\n",
u_group->aclug_notmember_groups[i] );
if ( slapi_utf8casecmp((ACLUCHP)groupDN,
(ACLUCHP)u_group->aclug_notmember_groups[i]) == 0){
aclg_unlock_groupCache ( 1 /* reader */ );
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "Evaluated ACL_FALSE\n");
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "Evaluated
ACL_FALSE\n");
return ACL_FALSE;
}
}
@@ -2100,9 +2100,9 @@ eval_another_member:
NULL /* referral_callback */);
if ( info.result == ACL_TRUE )
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,"-- In %s\n",
info.memberInfo[info.c_idx]->member );
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,"-- In %s\n",
info.memberInfo[info.c_idx]->member );
else if ( info.result == ACL_FALSE )
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,"-- Not in %s\n",
info.memberInfo[info.c_idx]->member );
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,"-- Not in %s\n",
info.memberInfo[info.c_idx]->member );
slapi_pblock_destroy (aPb);
}
@@ -2113,7 +2113,7 @@ eval_another_member:
** group or one of the nested groups. We are done.
*/
result = ACL_TRUE;
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "Evaluated ACL_TRUE\n");
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "Evaluated
ACL_TRUE\n");
goto free_and_return;
}
numOfMembersVisited++;
@@ -2134,7 +2134,7 @@ eval_another_member:
}
if ((nesting_level > max_nestlevel)) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"GroupEval:Member not found within the allowed nesting level (Allowed:%d Looked
at:%d)\n",
max_nestlevel, nesting_level);
@@ -2145,7 +2145,7 @@ eval_another_member:
/* limit of -1 means "no limit */
if (info.c_idx > max_memberlimit &&
max_memberlimit != -1 ) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"GroupEval:Looked at too many entries:(%d, %d)\n",
info.c_idx, info.lu_idx);
result = ACL_DONT_KNOW; /* don't try to cache info based on this result */
@@ -2274,7 +2274,7 @@ free_and_return:
ACLUG_INCR_GROUPS_LIST;
}
u_group->aclug_member_groups[ngr] = slapi_ch_strdup ( groupMember->member );
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Adding Group (%s) ParentGroup (%s) to the IN GROUP List\n",
groupMember->member , parentGroup ? parentGroup->member: "NULL");
@@ -2319,7 +2319,7 @@ free_and_return:
ACLUG_INCR_GROUPS_LIST;
}
u_group->aclug_notmember_groups[ngr] = slapi_ch_strdup ( groupMember->member );
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Adding Group (%s) ParentGroup (%s) to the NOT IN GROUP List\n",
groupMember->member , parentGroup ? parentGroup->member: "NULL");
@@ -2332,7 +2332,7 @@ free_and_return:
* We terminated the search without reaching a conclusion--so
* don't cache any info based on this evaluation.
*/
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "Evaluated ACL_DONT_KNOW\n");
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "Evaluated
ACL_DONT_KNOW\n");
}
/* Unlock the group cache, we are done with updating */
@@ -2401,14 +2401,14 @@ acllas__handle_group_entry (Slapi_Entry* e, void *callback_data)
attrVal = slapi_value_get_berval ( sval );
n_dn = slapi_create_dn_string( "%s", attrVal->bv_val );
if (NULL == n_dn) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"acllas__handle_group_entry: Invalid syntax: %s\n",
attrVal->bv_val );
return 0;
}
n = ++info->lu_idx;
if (n < 0) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"acllas__handle_group_entry: last member index lu_idx is overflown:%d: Too
many group ACL members\n", n);
slapi_ch_free_string(&n_dn);
return 0;
@@ -2420,7 +2420,7 @@ acllas__handle_group_entry (Slapi_Entry* e, void *callback_data)
(n + ACLLAS_MAX_GRP_MEMBER) *
sizeof(struct member_info *));
if (!info->memberInfo) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"acllas__handle_group_entry: out of memory - could not allocate space for
%d group members\n",
n + ACLLAS_MAX_GRP_MEMBER );
info->memberInfo = orig_memberInfo;
@@ -2465,12 +2465,12 @@ acllas__handle_group_entry (Slapi_Entry* e, void *callback_data)
savURL = memberURL =
slapi_create_dn_string("%s", attrVal->bv_val);
if (NULL == savURL) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"acllas__handle_group_entry: Invalid syntax: %s\n",
attrVal->bv_val );
return 0;
}
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"ACL Group Eval:MemberURL:%s\n", memberURL);
info->result = acllas__client_match_URL (
info->aclpb,
@@ -2481,7 +2481,7 @@ acllas__handle_group_entry (Slapi_Entry* e, void *callback_data)
return 0;
} else {
/* This means that the URL is ill-formed */
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"ACL Group Eval:Badly Formed MemberURL:%s\n", attrVal->bv_val);
}
i = slapi_attr_next_value ( currAttr, i, &sval );
@@ -2490,7 +2490,7 @@ acllas__handle_group_entry (Slapi_Entry* e, void *callback_data)
} else if ((strcasecmp (attrType, type_memberCert) == 0) ) {
/* Do we have the certificate around */
if (!info->clientCert) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
" acllas__handle_group_entry:Client Cert missing\n" );
/* cannot evaulate cert membership without cert - go to next attribute */
goto nextattr;
@@ -2622,7 +2622,7 @@ DS_LASGroupDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
LDAP_UTF8DEC(ptr);
}
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,"Attr:%s\n" , attrName);
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,"Attr:%s\n" ,
attrName);
/* See if we have a parent[2].attr" rule */
if (strstr(attrName, "parent[") != NULL) {
@@ -2646,7 +2646,7 @@ DS_LASGroupDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
* Here, ignore the extra levels..it's really
* a syntax error which should have been ruled out at parse time
*/
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"DS_LASGroupDnattr: Exceeded the ATTR LIMIT:%d: Ignoring extra
levels\n",
ACLLAS_MAX_LEVELS);
}
@@ -2683,7 +2683,7 @@ DS_LASGroupDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
*/
if ( lasinfo.aclpb->aclpb_optype == SLAPI_OPERATION_ADD) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"ACL info: groupdnAttr does not allow ADD permission at level 0.\n");
got_undefined = 1;
continue;
@@ -2695,7 +2695,7 @@ DS_LASGroupDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
attrVal = slapi_value_get_berval ( sval );
n_groupdn = slapi_create_dn_string("%s", attrVal->bv_val);
if (NULL == n_groupdn) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"DS_LASGroupDnAttrEval: Invalid syntax: %s\n",
attrVal->bv_val );
slapi_ch_free_string(&s_attrName);
@@ -2707,7 +2707,7 @@ DS_LASGroupDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
lasinfo.aclpb->aclpb_clientcert);
slapi_ch_free ( (void **) &n_groupdn);
if (matched == ACL_TRUE ) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"groupdnattr matches at level (%d)\n", levels[i]);
break;
} else if ( matched == ACL_DONT_KNOW ) {
@@ -2784,7 +2784,7 @@ DS_LASGroupDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
slapi_ch_free ((void **) &info.member);
}
if (matched == ACL_TRUE) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"groupdnattr matches at level (%d)\n", levels[i]);
break;
} else if ( matched == ACL_DONT_KNOW ) {
@@ -2810,7 +2810,7 @@ DS_LASGroupDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
}
} else {
rc = LAS_EVAL_FAIL;
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Returning UNDEFINED for groupdnattr evaluation.\n");
}
@@ -2867,7 +2867,7 @@ acllas__eval_memberGroupDnAttr (char *attrName, Slapi_Entry *e,
}
if ( (u_group = aclg_get_usersGroup ( aclpb , n_clientdn )) == NULL) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Failed to find/allocate a usergroup--aborting evaluation\n");
slapi_ch_free ( (void **)&s_str );
return(ACL_DONT_KNOW);
@@ -2909,7 +2909,7 @@ acllas__eval_memberGroupDnAttr (char *attrName, Slapi_Entry *e,
}
normed = slapi_create_dn_string("%s", base);
if (NULL == normed) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"acllas__eval_memberGroupDnAttr: Invalid syntax: %s\n",
base );
slapi_ch_free ( (void **)&s_str );
@@ -2966,11 +2966,11 @@ acllas__eval_memberGroupDnAttr (char *attrName, Slapi_Entry *e,
if (slapi_is_loglevel_set(SLAPI_LOG_ACL)) {
char ebuf[BUFSIZ];
if (tt == info.lu_idx) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name, "currDn:(%s) \n\tNO MEMBER
ADDED\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "currDn:(%s) \n\tNO
MEMBER ADDED\n",
ACL_ESCAPE_STRING_WITH_PUNCTUATION (curMemberDn, ebuf));
} else {
for (i=tt; i < info.lu_idx; i++) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"currDn:(%s) \n\tADDED MEMBER[%d]=%s\n",
ACL_ESCAPE_STRING_WITH_PUNCTUATION (curMemberDn, ebuf), i,
info.member[i]);
}
@@ -3022,7 +3022,7 @@ acllas__eval_memberGroupDnAttr (char *attrName, Slapi_Entry *e,
if (slapi_is_loglevel_set(SLAPI_LOG_ACL)) {
char ebuf[BUFSIZ];
for (j = 0; j < u_group->aclug_numof_member_group; j++) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"acllas__eval_memberGroupDnAttr:GROUP[%d] IN CACHE:%s\n",
j, ACL_ESCAPE_STRING_WITH_PUNCTUATION
(u_group->aclug_member_groups[j], ebuf));
}
@@ -3040,7 +3040,7 @@ acllas__eval_memberGroupDnAttr (char *attrName, Slapi_Entry *e,
attrVal = slapi_value_get_berval ( sval );
n_attrval = slapi_create_dn_string("%s", attrVal->bv_val);
if (NULL == n_attrval) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"acllas__eval_memberGroupDnAttr: Invalid syntax: %s\n",
attrVal->bv_val );
slapi_ch_free ( (void **)&s_str );
@@ -3202,7 +3202,7 @@ acllas__verify_client (Slapi_Entry* e, void *callback_data)
attrVal = slapi_value_get_berval ( sval );
val = slapi_create_dn_string("%s", attrVal->bv_val);
if (NULL == val) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"acllas__verify_client: Invalid syntax: %s\n",
attrVal->bv_val );
return 0;
@@ -3296,7 +3296,7 @@ acllas__get_members (Slapi_Entry* e, void *callback_data)
attrVal =slapi_value_get_berval ( sval );
info->member[i] = slapi_create_dn_string ("%s", attrVal->bv_val);
if (NULL == info->member[i]) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"acllas__get_members: Invalid syntax: %s\n",
attrVal->bv_val );
}
@@ -3356,7 +3356,7 @@ DS_LASUserAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
/* Which rule are we evaluating ? */
attrName = slapi_ch_strdup (attr_pattern );
if ( NULL == (p = strchr ( attrName, '#' ))) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"DS_LASUserAttrEval:Invalid value(%s)\n", attr_pattern);
slapi_ch_free ( (void **) &attrName );
return LAS_EVAL_FAIL;
@@ -3422,7 +3422,7 @@ DS_LASUserAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
}
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"DS_LASUserAttrEval: AttrName:%s, attrVal:%s\n", attrName, attrValue );
/*
@@ -3508,7 +3508,7 @@ acllas__client_match_URL (struct acl_pblock *aclpb, char
*n_clientdn, char *url
int result = ACL_FALSE;
if ( NULL == aclpb ) {
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"acllas__client_match_URL: NULL acl pblock\n");
return ACL_FALSE;
}
@@ -3544,7 +3544,7 @@ acllas__client_match_URL (struct acl_pblock *aclpb, char
*n_clientdn, char *url
}
if ( NULL == aclpb->aclpb_client_entry ) {
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"acllas__client_match_URL: Unable to get client's entry\n");
goto done;
}
@@ -3559,7 +3559,7 @@ acllas__client_match_URL (struct acl_pblock *aclpb, char
*n_clientdn, char *url
} else if (strncasecmp (url, LDAPS_URL_prefix, LDAPS_URL_prefix_len) == 0) {
prefix_len = LDAPS_URL_prefix_len;
} else {
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"acllas__client_match_URL: url %s does not have a recognized ldap protocol
prefix\n", url);
goto done;
}
@@ -3573,7 +3573,7 @@ acllas__client_match_URL (struct acl_pblock *aclpb, char
*n_clientdn, char *url
rawdn = strchr(tmpp, '/');
size_t hostport_len = 0;
if (NULL == rawdn) {
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"acllas__client_match_URL: url %s does not have a valid ldap protocol
prefix\n", url);
goto done;
}
@@ -3590,7 +3590,7 @@ acllas__client_match_URL (struct acl_pblock *aclpb, char
*n_clientdn, char *url
}
dn = slapi_create_dn_string("%s", rawdn);
if (NULL == dn) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"acllas__client_match_URL: error normalizing dn [%s] part of URL
[%s]\n",
rawdn, url);
goto done;
@@ -3606,13 +3606,13 @@ acllas__client_match_URL (struct acl_pblock *aclpb, char
*n_clientdn, char *url
slapi_ch_free_string(&dn);
rc = slapi_ldap_url_parse(normed, &ludp, 1, NULL);
if (rc) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"acllas__client_match_URL: url [%s] is invalid: %d (%s)\n",
normed, rc, slapi_urlparse_err2string(rc));
goto done;
}
if ( ( NULL == ludp->lud_dn) || ( NULL == ludp->lud_filter) ) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"acllas__client_match_URL: url [%s] has no base dn [%s] or filter
[%s]\n",
normed,
NULL == ludp->lud_dn ? "null" : ludp->lud_dn,
@@ -3623,7 +3623,7 @@ acllas__client_match_URL (struct acl_pblock *aclpb, char
*n_clientdn, char *url
/* Check the scope */
if ( ludp->lud_scope == LDAP_SCOPE_SUBTREE ) {
if (!slapi_dn_issuffix(n_clientdn, ludp->lud_dn)) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"acllas__client_match_URL: url [%s] scope is subtree but dn [%s] "
"is not a suffix of [%s]\n",
normed, ludp->lud_dn, n_clientdn );
@@ -3633,7 +3633,7 @@ acllas__client_match_URL (struct acl_pblock *aclpb, char
*n_clientdn, char *url
char *parent = slapi_dn_parent (n_clientdn);
if (slapi_utf8casecmp ((ACLUCHP)parent, (ACLUCHP)ludp->lud_dn) != 0 ) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"acllas__client_match_URL: url [%s] scope is onelevel but dn [%s] "
"is not a direct child of [%s]\n",
normed, ludp->lud_dn, parent );
@@ -3643,7 +3643,7 @@ acllas__client_match_URL (struct acl_pblock *aclpb, char
*n_clientdn, char *url
slapi_ch_free_string(&parent);
} else { /* default */
if (slapi_utf8casecmp ( (ACLUCHP)n_clientdn, (ACLUCHP)ludp->lud_dn) != 0 ) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"acllas__client_match_URL: url [%s] scope is base but dn [%s] "
"does not match [%s]\n",
normed, ludp->lud_dn, n_clientdn );
@@ -3656,7 +3656,7 @@ acllas__client_match_URL (struct acl_pblock *aclpb, char
*n_clientdn, char *url
f = slapi_str2filter ( ludp->lud_filter );
if (ludp->lud_filter && (f == NULL)) { /* bogus filter */
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"DS_LASUserAttrEval: The member URL [%s] search filter in entry [%s] is not
valid: [%s]\n",
normed, n_clientdn, ludp->lud_filter);
goto done;
@@ -3716,7 +3716,7 @@ __acllas_setup ( NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
*LAS_cookie = (void *)0;
if (strcmp(attr_name, lasType) != 0) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"%s:Invalid LAS(%s)\n", lasName, attr_name);
return LAS_EVAL_INVALID;
}
@@ -3725,11 +3725,11 @@ __acllas_setup ( NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
if (allow_range && (comparator != CMP_OP_EQ) && (comparator !=
CMP_OP_NE) &&
(comparator != CMP_OP_GT) && (comparator != CMP_OP_LT) &&
(comparator != CMP_OP_GE) && (comparator != CMP_OP_LE)) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"%s:Invalid comparator(%d)\n", lasName, (int)comparator);
return LAS_EVAL_INVALID;
} else if (!allow_range && (comparator != CMP_OP_EQ) && (comparator !=
CMP_OP_NE)) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"%s:Invalid comparator(%d)\n", lasName, (int)comparator);
return LAS_EVAL_INVALID;
}
@@ -3741,7 +3741,7 @@ __acllas_setup ( NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
if ( rc != LAS_EVAL_TRUE ) {
acl_print_acllib_err(errp, NULL);
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"%s:Unable to get the clientdn attribute(%d)\n",lasName, rc);
return LAS_EVAL_FAIL;
}
@@ -3752,7 +3752,7 @@ __acllas_setup ( NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
if (*(linfo->clientDn) == '\0')
linfo->anomUser = ACL_TRUE;
} else {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"%s: No user\n",lasName);
return LAS_EVAL_FAIL;
}
@@ -3760,7 +3760,7 @@ __acllas_setup ( NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
if ((rc = PListFindValue(subject, DS_ATTR_ENTRY,
(void **)&linfo->resourceEntry, NULL)) < 0){
acl_print_acllib_err(errp, NULL);
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"%s:Unable to get the Slapi_Entry attr(%d)\n",lasName, rc);
return LAS_EVAL_FAIL;
}
@@ -3770,21 +3770,21 @@ __acllas_setup ( NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
subject, resource, auth_info, global_auth);
if ( rc != LAS_EVAL_TRUE ) {
acl_print_acllib_err(errp, NULL);
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"%s:Unable to get the ACLPB(%d)\n", lasName, rc);
return LAS_EVAL_FAIL;
}
/* LDAPI? */
if ((rc = PListFindValue(subject, DS_ATTR_LDAPI, (void **)&linfo->ldapi, NULL))
< 0){
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"%s:Unable to get LDAPI value(%d)\n", lasName, rc);
return LAS_EVAL_FAIL;
}
if (NULL == attr_pattern ) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"%s:No rule value in the ACL\n", lasName);
return LAS_EVAL_FAIL;
@@ -3793,7 +3793,7 @@ __acllas_setup ( NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
if ((rc = PListFindValue(subject, DS_ATTR_AUTHTYPE,
(void **)&linfo->authType, NULL)) < 0) {
acl_print_acllib_err(errp, NULL);
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"%s:Unable to get the auth type(%d)\n", lasName, rc);
return LAS_EVAL_FAIL;
}
@@ -3802,7 +3802,7 @@ __acllas_setup ( NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
if ((rc = PListFindValue(subject, DS_ATTR_SSF,
(void **)&linfo->ssf, NULL)) < 0) {
acl_print_acllib_err(errp, NULL);
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"%s:Unable to get the ssf(%d)\n", lasName, rc);
}
return 0;
@@ -3820,7 +3820,7 @@ static int acllas__user_has_role( struct acl_pblock *aclpb,
int present = 0;
if ( NULL == aclpb ) {
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error ( SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"acllas__user_has_role: NULL acl pblock\n");
return ACL_FALSE;
}
@@ -3856,7 +3856,7 @@ static int acllas__user_has_role( struct acl_pblock *aclpb,
}
if ( NULL == aclpb->aclpb_client_entry ) {
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error ( SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"acllas__user_has_role: Unable to get client's entry\n");
return ACL_FALSE;
}
@@ -3930,7 +3930,7 @@ DS_LASRoleDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
*
*
*/
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"ACL info: userattr=XXX#ROLEDN does not allow ADD permission.\n");
got_undefined = 1;
} else {
@@ -3948,7 +3948,7 @@ DS_LASRoleDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t
comparator,
attrVal = slapi_value_get_berval ( sval );
n_attrval = slapi_create_dn_string("%s", attrVal->bv_val);
if (NULL == n_attrval) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"DS_LASRoleDnAttrEval: Invalid syntax: %s\n",
attrVal->bv_val );
return LAS_EVAL_FAIL;
@@ -4025,7 +4025,7 @@ aclutil_evaluate_macro( char * rule, lasInfo *lasinfo,
* We have alredy done this matching once beofer at tasrget match time.
*/
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"aclutil_evaluate_macro for aci '%s' index '%d'\n",
aci->aclName, aci->aci_index );
if ( aci->aci_macro == NULL ) {
@@ -4040,13 +4040,13 @@ aclutil_evaluate_macro( char * rule, lasInfo *lasinfo,
if ( (matched_val = (char *)acl_ht_lookup( aclpb->aclpb_macro_ht,
(PLHashNumber)aci->aci_index)) == NULL) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"ACL info: failed to locate the calculated target"
"macro for aci '%s' index '%d'\n",
aci->aclName, aci->aci_index );
return(ACL_FALSE); /* Not a match */
} else {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"ACL info: found matched_val (%s) for aci index %d"
"in macro ht\n",
aci->aclName, aci->aci_index );
@@ -4311,7 +4311,7 @@ acllas_replace_attr_macro( char *rule, lasInfo *lasinfo)
str = strstr(macro_str, ".");
if (!str) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"acllas_replace_attr_macro: Invalid macro \"%s\".",
macro_str);
slapi_ch_free_string(¯o_str);
@@ -4491,11 +4491,11 @@ acllas_eval_one_role(char *role, lasInfo *lasinfo) {
if (slapi_is_loglevel_set(SLAPI_LOG_ACL)) {
char ebuf[BUFSIZ];
if (rc == ACL_TRUE ) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"role evaluation: user '%s' does have role
'%s'\n",
ACL_ESCAPE_STRING_WITH_PUNCTUATION (lasinfo->clientDn, ebuf),
role);
} else {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"role evaluation: user '%s' does NOT have role
'%s'\n",
ACL_ESCAPE_STRING_WITH_PUNCTUATION (lasinfo->clientDn, ebuf),
role);
}
@@ -4515,7 +4515,7 @@ static int acllas_eval_one_target_filter( char * str, Slapi_Entry
*e) {
PR_ASSERT(str);
if ((f = slapi_str2filter(str)) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Warning: Bad targetfilter(%s) in aci: does not match\n", str);
return(ACL_DONT_KNOW);
}
diff --git a/ldap/servers/plugins/acl/acllist.c b/ldap/servers/plugins/acl/acllist.c
index 2db505c..10c9c96 100644
--- a/ldap/servers/plugins/acl/acllist.c
+++ b/ldap/servers/plugins/acl/acllist.c
@@ -72,7 +72,7 @@ acllist_init(void)
{
if (( aci_rwlock = slapi_new_rwlock() ) == NULL ) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"acllist_init:failed in getting the rwlock\n" );
return 1;
}
@@ -114,12 +114,12 @@ void acl_be_state_change_fnc ( void *handle, char *be_name, int
old_state,
if ( old_state == SLAPI_BE_STATE_ON && new_state != SLAPI_BE_STATE_ON) {
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Backend %s is no longer STARTED--deactivating it's acis\n",
be_name);
if ( (be = slapi_be_select_by_instance_name( be_name )) == NULL) {
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Failed to retrieve backend--NOT activating it's acis\n");
return;
}
@@ -129,7 +129,7 @@ void acl_be_state_change_fnc ( void *handle, char *be_name, int
old_state,
*/
if ( (sdn = slapi_be_getsuffix( be, 0)) == NULL ) {
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Failed to retrieve backend--NOT activating it's acis\n");
return;
}
@@ -142,11 +142,11 @@ void acl_be_state_change_fnc ( void *handle, char *be_name, int
old_state,
DO_TAKE_ACLCACHE_WRITELOCK);
} else if ( old_state != SLAPI_BE_STATE_ON && new_state == SLAPI_BE_STATE_ON) {
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Backend %s is now STARTED--activating it's acis\n", be_name);
if ( (be = slapi_be_select_by_instance_name( be_name )) == NULL) {
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Failed to retrieve backend--NOT activating it's acis\n");
return;
}
@@ -156,7 +156,7 @@ void acl_be_state_change_fnc ( void *handle, char *be_name, int
old_state,
*/
if ( (sdn = slapi_be_getsuffix( be, 0)) == NULL ) {
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Failed to retrieve backend--NOT activating it's acis\n");
return;
}
@@ -195,7 +195,7 @@ acllist_insert_aci_needsLock_ext( Slapi_PBlock *pb, const Slapi_DN
*e_sdn, const
acl_str = slapi_ch_strdup(aci_attr->bv_val);
/* Parse the ACL TEXT */
if ( 0 != (rv = acl_parse ( pb, acl_str, aci, NULL )) ) {
- slapi_log_error (SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"ACL PARSE ERR(rv=%d): %s\n", rv, acl_str );
slapi_ch_free ( (void **) &acl_str );
acllist_free_aci ( aci );
@@ -205,7 +205,7 @@ acllist_insert_aci_needsLock_ext( Slapi_PBlock *pb, const Slapi_DN
*e_sdn, const
/* Now add it to the list */
if ( 0 != (rv =__acllist_add_aci ( aci ))) {
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"ACL ADD ACI ERR(rv=%d): %s\n", rv, acl_str );
slapi_ch_free ( (void **) &acl_str );
acllist_free_aci ( aci );
@@ -241,7 +241,7 @@ __acllist_add_aci ( aci_t *aci )
/* Find the node that contains the acl. */
if ( NULL == (head = (AciContainer *) avl_find( acllistRoot, aciListHead,
(IFP) __acllist_aciContainer_node_cmp ) ) ) {
- slapi_log_error ( SLAPI_PLUGIN_ACL, plugin_name,
+ slapi_log_error ( SLAPI_PLUGIN_ACL, LOG_DEBUG, plugin_name,
"Can't insert the acl in the tree\n");
rv = 1;
} else {
@@ -255,7 +255,7 @@ __acllist_add_aci ( aci_t *aci )
/* Now add the new one to the end of the list */
t_aci->aci_next = aci;
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name, "Added the ACL:%s to existing
container:[%d]%s\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "Added the ACL:%s to
existing container:[%d]%s\n",
aci->aclName, head->acic_index, slapi_sdn_get_ndn( head->acic_sdn ));
}
@@ -290,7 +290,7 @@ __acllist_add_aci ( aci_t *aci )
aciContainerArray[ aciListHead->acic_index ] = aciListHead;
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name, "Added %s to container:%d\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "Added %s to
container:%d\n",
slapi_sdn_get_ndn( aciListHead->acic_sdn ), aciListHead->acic_index );
break;
}
@@ -359,7 +359,7 @@ acllist_remove_aci_needsLock( const Slapi_DN *sdn, const struct
berval *attr )
/* In that case we don't have any acl for this entry. cool !!! */
acllist_free_aciContainer ( &aciListHead );
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"No acis to remove in this entry\n" );
return 0;
}
@@ -384,7 +384,7 @@ acllist_remove_aci_needsLock( const Slapi_DN *sdn, const struct
berval *attr )
/* remove the container from the slot */
aciContainerArray[root->acic_index] = NULL;
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Removing container[%d]=%s\n", root->acic_index,
slapi_sdn_get_ndn ( root->acic_sdn) );
dContainer = (AciContainer *) avl_delete ( &acllistRoot, aciListHead,
@@ -409,7 +409,7 @@ acllist_remove_aci_needsLock( const Slapi_DN *sdn, const struct
berval *attr )
LDAP_SCOPE_BASE,
ACL_ADD_ACIS,
DONT_TAKE_ACLCACHE_WRITELOCK))) {
- slapi_log_error ( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
" Can't add the rest of the acls for entry:%s after delete\n",
slapi_sdn_get_dn ( sdn ) );
}
@@ -624,7 +624,7 @@ acllist_init_scan (Slapi_PBlock *pb, int scope, const char *base)
}
aclpb = acl_get_aclpb (pb, ACLPB_BINDDN_PBLOCK );
if ( !aclpb ) {
- slapi_log_error ( SLAPI_LOG_FATAL, plugin_name, "Missing aclpb 4 \n" );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "Missing aclpb 4 \n"
);
return;
}
@@ -665,7 +665,7 @@ acllist_init_scan (Slapi_PBlock *pb, int scope, const char *base)
/* slapi_dn_parent returns the "parent" dn syntactically.
* Most likely, basedn is above suffix (e.g., dn=com).
* Thus, no need to make it FATAL. */
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Failed to find root for base: %s \n", basedn );
}
tmp = slapi_dn_parent ( basedn );
@@ -699,7 +699,7 @@ acllist_aciscan_update_scan ( Acl_PBlock *aclpb, char *edn )
int is_not_search_base = 1;
if ( !aclpb ) {
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"acllist_aciscan_update_scan: NULL acl pblock\n");
return;
}
@@ -745,7 +745,7 @@ acllist_aciscan_update_scan ( Acl_PBlock *aclpb, char *edn )
(caddr_t) aclpb->aclpb_aclContainer,
(IFP) __acllist_aciContainer_node_cmp);
- slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Searching AVL tree for update:%s: container:%d\n", basedn ,
root ? root->acic_index: -1);
if ( index >= aclpb_max_selected_acls -2 ) {
@@ -910,7 +910,7 @@ acllist_moddn_aci_needsLock ( Slapi_DN *oldsdn, char *newdn )
if ( NULL == (head = (AciContainer *) avl_find( acllistRoot, aciListHead,
(IFP) __acllist_aciContainer_node_cmp ) ) ) {
- slapi_log_error ( SLAPI_PLUGIN_ACL, plugin_name,
+ slapi_log_error ( SLAPI_PLUGIN_ACL, LOG_DEBUG, plugin_name,
"Can't find the acl in the tree for moddn operation:olddn%s\n",
slapi_sdn_get_ndn ( oldsdn ));
aciListHead->acic_sdn = NULL;
@@ -956,7 +956,7 @@ acllist_print_tree ( Avlnode *root, int *depth, char *start, char
*side)
return;
}
aciHeadList = (AciContainer *) root->avl_data;
- slapi_log_error ( SLAPI_LOG_ACL, "plugin_name",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, "plugin_name",
"Container[ Depth=%d%s-%s]: %s\n", *depth, start, side,
slapi_sdn_get_ndn ( aciHeadList->acic_sdn ) );
diff --git a/ldap/servers/plugins/acl/aclparse.c b/ldap/servers/plugins/acl/aclparse.c
index 4b77c0e..662753e 100644
--- a/ldap/servers/plugins/acl/aclparse.c
+++ b/ldap/servers/plugins/acl/aclparse.c
@@ -148,7 +148,7 @@ acl_parse(Slapi_PBlock *pb, char * str, aci_t *aci_item, char
**errbuf)
slapi_search_internal_pb(temppb);
slapi_pblock_get(temppb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if (rc != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"The ACL target %s does not exist\n", slapi_sdn_get_dn(&targdn));
}
@@ -183,7 +183,7 @@ acl_parse(Slapi_PBlock *pb, char * str, aci_t *aci_item, char
**errbuf)
if (!(aci_item->aci_type & ACI_TARGET_MACRO_DN) &&
(aci_item->aci_ruleType & ACI_PARAM_DNRULE)) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"acl_parse: A macro in a subject ($dn) must have a macro in the target.\n");
return(ACL_INVALID_TARGET);
}
@@ -294,7 +294,7 @@ __aclp__parse_aci(char *str, aci_t *aci_item, char **errbuf)
/* Must have a targetmacro */
if ( !(aci_item->aci_type & ACI_TARGET_MACRO_DN)) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"acl_parse: A macro in a targetfilter ($dn) must have a macro in the
target.\n");
return(ACL_SYNTAX_ERR);
}
@@ -468,7 +468,7 @@ __aclp__parse_aci(char *str, aci_t *aci_item, char **errbuf)
filterChoice = slapi_filter_get_choice ( f );
if ( (type & (ACI_TARGET_DN | ACI_TARGET_MODDN)) &&
( filterChoice == LDAP_FILTER_PRESENT)) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"acl__parse_aci: Unsupported filter type:%d\n", filterChoice);
return(ACL_SYNTAX_ERR);
} else if (( filterChoice == LDAP_FILTER_SUBSTRINGS) &&
@@ -489,7 +489,7 @@ __aclp__parse_aci(char *str, aci_t *aci_item, char **errbuf)
(type & ACI_TARGET_PATTERN)) {
if (aci_item->target) {
/* There is something already. ERROR */
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Multiple targets in the ACL syntax\n");
slapi_filter_free(f, 1);
return(ACL_SYNTAX_ERR);
@@ -498,7 +498,7 @@ __aclp__parse_aci(char *str, aci_t *aci_item, char **errbuf)
}
} else if ( type & ACI_TARGET_FILTER) {
if (aci_item->targetFilter) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Multiple target Filters in the ACL Syntax\n");
slapi_filter_free(f, 1);
return(ACL_SYNTAX_ERR);
@@ -509,7 +509,7 @@ __aclp__parse_aci(char *str, aci_t *aci_item, char **errbuf)
if (is_target_to) {
if (aci_item->target_to) {
/* There is something already. ERROR */
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG,
plugin_name,
"Multiple targets (target_to) in the
ACL syntax\n");
slapi_filter_free(f, 1);
return(ACL_SYNTAX_ERR);
@@ -519,7 +519,7 @@ __aclp__parse_aci(char *str, aci_t *aci_item, char **errbuf)
} else {
if (aci_item->target_from) {
/* There is something already. ERROR */
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG,
plugin_name,
"Multiple targets (target_from) in the ACL syntax\n");
slapi_filter_free(f, 1);
return(ACL_SYNTAX_ERR);
@@ -531,7 +531,7 @@ __aclp__parse_aci(char *str, aci_t *aci_item, char **errbuf)
break; /* 't' */
default:
/* Here the keyword did not start with 'v' ot 't' so error */
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Unknown keyword at \"%s\"\n Expecting"
" \"target\", \"targetattr\", \"targetfilter\",
\"targattrfilters\""
" or \"version\"\n", str);
@@ -649,7 +649,7 @@ __aclp__sanity_check_acltxt (aci_t *aci_item, char *str)
if ((newstr = __aclp__normalize_acltxt (aci_item, str )) == NULL) {
return ACL_SYNTAX_ERR;
}
- slapi_log_error(SLAPI_LOG_ACL, plugin_name, "Normalized String:%s\n",
newstr);
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "Normalized
String:%s\n", newstr);
/* check for acl syntax error */
if ((handle = (ACLListHandle_t *) ACL_ParseString(&errp, newstr)) == NULL) {
@@ -1514,7 +1514,7 @@ __aclp__init_targetattr (aci_t *aci, char *attr_val, char **errbuf)
char *errstr =
slapi_ch_smprintf("The statement does not begin and end "
"with a \": [%s]. ", attr_val);
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"__aclp__init_targetattr: %s\n", errstr);
if (errbuf) {
aclutil_str_append(errbuf, errstr);
@@ -1591,7 +1591,7 @@ __aclp__init_targetattr (aci_t *aci, char *attr_val, char **errbuf)
if (f == NULL) {
char *errstr = slapi_ch_smprintf("Unable to generate filter"
" (%s). ", lineptr);
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"__aclp__init_targetattr: %s\n", errstr);
if (errbuf) {
aclutil_str_append(errbuf, errstr);
@@ -1617,7 +1617,7 @@ __aclp__init_targetattr (aci_t *aci, char *attr_val, char **errbuf)
char *errstr = slapi_ch_smprintf("targetattr \"%s\" does not "
"exist in schema. Please add attributeTypes "
"\"%s\" to schema if necessary. ", str, str);
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"__aclp__init_targetattr: %s\n", errstr);
if (errbuf) {
aclutil_str_append(errbuf, errstr);
@@ -1845,7 +1845,7 @@ acl_check_for_target_macro( aci_t *aci_item, char *value)
/* Macro dn needs to normalize. E.g., "ou=Groups, ($dN), dn=example,dn=com"
*/
aci_item->aci_macro->match_this = slapi_create_dn_string_case("%s",
value);
if (NULL == aci_item->aci_macro->match_this) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"acl_check_for_target_macro: Error: Invalid macro target dn:
\"%s\"\n", value);
aci_item->aci_type &= ~ACI_TARGET_MACRO_DN;
slapi_ch_free((void **)&aci_item->aci_macro);
@@ -1986,7 +1986,7 @@ static int __acl__init_targetattrfilters( aci_t *aci, char
*input_str) {
s[len-1] = '\0';
s++; /* skip the first " */
} else { /* No matching quotes */
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"__aclp__init_targetattrfilters: Error: The statement does not begin and end
with a \": [%s]\n",
s);
return (ACL_SYNTAX_ERR);
@@ -2214,7 +2214,7 @@ static int __acl_init_targetattrfilter( Targetattrfilter
*attrfilter,
if ( (tmp_ptr = strstr( str, ":")) == NULL ) {
/* No :, syntax error */
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Bad targetattrfilter %s:%s\n",
str,"Expecting \":\"");
@@ -2228,7 +2228,7 @@ static int __acl_init_targetattrfilter( Targetattrfilter
*attrfilter,
/* s should be the attribute name-make sure it's non-empty. */
if ( *s == '\0' ) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"No attribute name in targattrfilters\n");
return(ACL_SYNTAX_ERR);
}
@@ -2245,7 +2245,7 @@ static int __acl_init_targetattrfilter( Targetattrfilter
*attrfilter,
tmp_ptr = __acl_trim_filterstr(filter_ptr);
if ((f = slapi_str2filter(tmp_ptr)) == NULL) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Bad targetattr filter for attribute %s:%s\n",
attrfilter->attr_str,tmp_ptr);
slapi_ch_free( (void **) &attrfilter->attr_str);
@@ -2260,7 +2260,7 @@ static int __acl_init_targetattrfilter( Targetattrfilter
*attrfilter,
if (acl_verify_exactly_one_attribute( attrfilter->attr_str, f) !=
SLAPI_FILTER_SCAN_NOMORE) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"Exactly one attribute type per filter allowed in targattrfilters
(%s)\n",
attrfilter->attr_str);
slapi_ch_free( (void **) &attrfilter->attr_str);
diff --git a/ldap/servers/plugins/acl/aclplugin.c b/ldap/servers/plugins/acl/aclplugin.c
index d963bd7..55f3bc6 100644
--- a/ldap/servers/plugins/acl/aclplugin.c
+++ b/ldap/servers/plugins/acl/aclplugin.c
@@ -94,7 +94,7 @@ acl_preopInit (Slapi_PBlock *pb)
#endif
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "<= acl_preop_Init
%d\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "<=
acl_preop_Init %d\n", rc );
return( rc );
}
@@ -187,7 +187,7 @@ aclplugin_preop_common( Slapi_PBlock *pb )
aclpb = acl_get_aclpb ( pb, ACLPB_BINDDN_PBLOCK );
if (aclpb == NULL) {
- slapi_log_error( SLAPI_LOG_ACL, plugin_name, "aclplugin_preop_common: Error: aclpb
is NULL\n" );
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "aclplugin_preop_common:
Error: aclpb is NULL\n" );
slapi_send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL, NULL, 0, NULL );
return 1;
}
@@ -220,7 +220,7 @@ aclplugin_preop_common( Slapi_PBlock *pb )
if ( proxy_dn) {
TNF_PROBE_0_DEBUG(proxyacpb_init_start,"ACL","");
- slapi_log_error( SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"proxied authorization dn is (%s)\n", proxy_dn );
acl_init_aclpb ( pb, aclpb, proxy_dn, 1 );
aclpb = acl_new_proxy_aclpb ( pb );
@@ -297,10 +297,10 @@ acl_init( Slapi_PBlock *pb )
{
int rc =0;
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "=> acl_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "=>
acl_init\n" );
if ( 0 != acl_init_ext() ) {
- slapi_log_error ( SLAPI_LOG_FATAL, plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Unable to initialize the extensions\n");
return 1;
}
@@ -324,7 +324,7 @@ acl_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_ACL_MODS_UPDATE,
(void *) acl_modified );
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "<= acl_init %d\n",
rc);
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "<= acl_init
%d\n", rc);
return( rc );
}
@@ -356,7 +356,7 @@ acl_access_allowed_main ( Slapi_PBlock *pb, Slapi_Entry *e, char
**attrs,
rc = acl_read_access_allowed_on_entry ( pb, e, attrs, access);
} else if ( ACLPLUGIN_ACCESS_READ_ON_ATTR == flags) {
if (attr == NULL) {
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "Missing attribute\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "Missing
attribute\n" );
rc = LDAP_OPERATIONS_ERROR;
} else {
rc = acl_read_access_allowed_on_attr ( pb, e, attr, val, access);
diff --git a/ldap/servers/plugins/acl/aclutil.c b/ldap/servers/plugins/acl/aclutil.c
index 047f532..f3935c3 100644
--- a/ldap/servers/plugins/acl/aclutil.c
+++ b/ldap/servers/plugins/acl/aclutil.c
@@ -115,10 +115,10 @@ acl_print_acllib_err (NSErr_t *errp , char * str)
msgbuf[ACLUTIL_ACLLIB_MSGBUF_LEN-1] = '\0';
if (strlen(msgbuf) > 0) {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,"ACL LIB ERR:(%s)(%s)\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,"ACL LIB
ERR:(%s)(%s)\n",
msgbuf, str ? str: "NULL");
} else {
- slapi_log_error(SLAPI_LOG_ACL, plugin_name,"ACL LIB ERR:(%s)\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,"ACL LIB ERR:(%s)\n",
str ? str: "NULL");
}
@@ -134,30 +134,30 @@ aclutil_print_aci (aci_t *aci_item, char *type)
if (!aci_item) {
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"acl__print_aci: Null item\n");
return;
}
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"***BEGIN ACL INFO[ Name:%s]***\n", aci_item->aclName);
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"ACL Index:%d ACL_ELEVEL:%d\n", aci_item->aci_index,
aci_item->aci_elevel );
aclutil__access_str (aci_item->aci_access, str);
aclutil__typestr (aci_item->aci_type, &str[strlen(str)]);
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"ACI type:(%s)\n", str);
aclutil__Ruletypestr (aci_item->aci_ruleType, str);
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"ACI RULE type:(%s)\n",str);
dn = slapi_sdn_get_dn ( aci_item->aci_sdn );
- slapi_log_error (SLAPI_LOG_ACL, plugin_name, "Slapi_Entry DN:%s\n", dn);
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "Slapi_Entry DN:%s\n",
dn);
- slapi_log_error (SLAPI_LOG_ACL, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
"***END ACL INFO*****************************\n");
}
@@ -263,7 +263,7 @@ aclutil_print_err (int rv , const Slapi_DN *sdn, const struct berval*
val,
aclutil_str_append(errbuf, lineptr);
}
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name, "%s", lineptr);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "%s", lineptr);
slapi_ch_free_string(&newline);
}
@@ -491,21 +491,21 @@ aclutil_print_resource( struct acl_pblock *aclpb, const char *right
, char *attr
if ( ! slapi_is_loglevel_set ( SLAPI_LOG_ACL ) )
return;
- slapi_log_error (SLAPI_LOG_ACL, plugin_name, " ************ RESOURCE INFO STARTS
*********\n");
- slapi_log_error (SLAPI_LOG_ACL, plugin_name, " Client DN: %s\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, " ************ RESOURCE
INFO STARTS *********\n");
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, " Client DN: %s\n",
clientdn ? clientdn : "NULL");
aclutil__access_str (aclpb->aclpb_access, str);
aclutil__typestr (aclpb->aclpb_res_type, &str[strlen(str)]);
- slapi_log_error (SLAPI_LOG_ACL, plugin_name, " resource type:%d(%s)\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, " resource
type:%d(%s)\n",
aclpb->aclpb_res_type, str);
dn = slapi_sdn_get_dn ( aclpb->aclpb_curr_entry_sdn );
- slapi_log_error (SLAPI_LOG_ACL, plugin_name, " Slapi_Entry DN: %s\n",
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, " Slapi_Entry DN:
%s\n",
dn ? dn : "NULL");
- slapi_log_error (SLAPI_LOG_ACL, plugin_name, " ATTR: %s\n", attr ? attr :
"NULL");
- slapi_log_error (SLAPI_LOG_ACL, plugin_name, " rights:%s\n", right ? right:
"NULL");
- slapi_log_error (SLAPI_LOG_ACL, plugin_name, " ************ RESOURCE INFO ENDS
*********\n");
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, " ATTR: %s\n", attr
? attr : "NULL");
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, " rights:%s\n",
right ? right: "NULL");
+ slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, " ************ RESOURCE
INFO ENDS *********\n");
}
/*
* The input string contains a rule like
diff --git a/ldap/servers/plugins/automember/automember.c
b/ldap/servers/plugins/automember/automember.c
index d4c0707..b36d628 100644
--- a/ldap/servers/plugins/automember/automember.c
+++ b/ldap/servers/plugins/automember/automember.c
@@ -160,7 +160,7 @@ automember_init(Slapi_PBlock *pb)
int preadd = SLAPI_PLUGIN_PRE_ADD_FN;
int premod = SLAPI_PLUGIN_PRE_MODIFY_FN;
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_init\n");
/* get args */
@@ -191,7 +191,7 @@ automember_init(Slapi_PBlock *pb)
(void *) &pdesc) != 0 ||
slapi_pblock_set(pb, premod, (void *) automember_mod_pre_op) != 0 ||
slapi_pblock_set(pb, preadd, (void *) automember_add_pre_op) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_init: failed to register plugin\n");
status = -1;
}
@@ -205,7 +205,7 @@ automember_init(Slapi_PBlock *pb)
NULL, /* ? */
plugin_identity /* access control */
)) {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_init: failed to register internalpostoperation
plugin\n");
status = -1;
}
@@ -224,13 +224,13 @@ automember_init(Slapi_PBlock *pb)
plugin_identity /* access control */
)
) {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_init: failed to register postop
plugin\n");
status = -1;
}
}
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_init\n");
return status;
}
@@ -253,7 +253,7 @@ automember_internal_postop_init(Slapi_PBlock *pb)
(void *) automember_mod_post_op) != 0 ||
slapi_pblock_set(pb, SLAPI_PLUGIN_INTERNAL_POST_MODRDN_FN,
(void *) automember_modrdn_post_op) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_internal_postop_init: failed to register
plugin\n");
status = -1;
}
@@ -285,7 +285,7 @@ automember_postop_init(Slapi_PBlock *pb)
slapi_pblock_set(pb, delfn, (void *) automember_del_post_op) != 0 ||
slapi_pblock_set(pb, modfn, (void *) automember_mod_post_op) != 0 ||
slapi_pblock_set(pb, mdnfn, (void *) automember_modrdn_post_op) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_postop_init: failed to register
plugin\n");
status = -1;
}
@@ -306,7 +306,7 @@ automember_start(Slapi_PBlock * pb)
Slapi_DN *plugindn = NULL;
char *config_area = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_start\n");
slapi_plugin_task_register_handler("automember rebuild membership",
automember_task_add, pb);
@@ -314,7 +314,7 @@ automember_start(Slapi_PBlock * pb)
slapi_plugin_task_register_handler("automember map updates",
automember_task_add_map_entries, pb);
if ((g_automember_config_lock = slapi_new_rwlock()) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_start: lock creation failed\n");
return -1;
}
@@ -324,7 +324,7 @@ automember_start(Slapi_PBlock * pb)
* and store it for future use. */
slapi_pblock_get(pb, SLAPI_TARGET_SDN, &plugindn);
if (NULL == plugindn || 0 == slapi_sdn_get_ndn_len(plugindn)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_start: unable to retrieve plugin dn\n");
return -1;
}
@@ -344,14 +344,14 @@ automember_start(Slapi_PBlock * pb)
PR_INIT_CLIST(g_automember_config);
if (automember_load_config() != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_start: unable to load plug-in
configuration\n");
return -1;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"auto membership plug-in: ready for service\n");
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_start\n");
return 0;
@@ -365,7 +365,7 @@ automember_start(Slapi_PBlock * pb)
static int
automember_close(Slapi_PBlock * pb)
{
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_close\n");
/* unregister the tasks */
@@ -382,7 +382,7 @@ automember_close(Slapi_PBlock * pb)
slapi_destroy_rwlock(g_automember_config_lock);
g_automember_config_lock = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_close\n");
return 0;
@@ -413,7 +413,7 @@ automember_load_config(void)
Slapi_PBlock *search_pb;
Slapi_Entry **entries = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_load_config\n");
/* Clear out any old config. */
@@ -430,7 +430,7 @@ automember_load_config(void)
* config entry. */
if (automember_get_config_area()) {
/* Find the config entries beneath the alternate config area. */
- slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_load_config: Looking for config entries "
"beneath \"%s\".\n",
slapi_sdn_get_ndn(automember_get_config_area()));
@@ -439,7 +439,7 @@ automember_load_config(void)
NULL, 0, NULL, NULL, automember_get_plugin_id(),
0);
} else {
/* Find the config entries beneath our plugin entry. */
- slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_load_config: Looking for config entries "
"beneath \"%s\".\n",
slapi_sdn_get_ndn(automember_get_plugin_sdn()));
@@ -453,7 +453,7 @@ automember_load_config(void)
if (LDAP_SUCCESS != result) {
if (automember_get_config_area() && (result == LDAP_NO_SUCH_OBJECT)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_load_config: Config container
\"%s\" does "
"not exist.\n",
slapi_sdn_get_ndn(automember_get_config_area()));
goto cleanup;
@@ -468,7 +468,7 @@ automember_load_config(void)
/* Loop through all of the entries we found and parse them. */
for (i = 0; entries && (entries[i] != NULL); i++) {
- slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_load_config: parsing config entry "
"\"%s\".\n",
slapi_entry_get_dn(entries[i]));
/* We don't care about the status here because we may have
@@ -481,7 +481,7 @@ automember_load_config(void)
slapi_free_search_results_internal(search_pb);
slapi_pblock_destroy(search_pb);
automember_config_unlock();
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_load_config\n");
return status;
@@ -515,7 +515,7 @@ automember_parse_config_entry(Slapi_Entry * e, int apply)
int i = 0;
int ret = 0;
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_parse_config_entry\n");
/* If this is the main plug-in config entry or
@@ -550,14 +550,14 @@ automember_parse_config_entry(Slapi_Entry * e, int apply)
if (value) {
entry->dn = slapi_ch_strdup(value);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_config_entry: Error "
"reading dn from config entry\n");
ret = -1;
goto bail;
}
- slapi_log_error(SLAPI_LOG_CONFIG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"----------> dn [%s]\n", entry->dn);
/* Load the scope */
@@ -565,7 +565,7 @@ automember_parse_config_entry(Slapi_Entry * e, int apply)
if (value) {
entry->scope = value;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_config_entry: The %s config "
"setting is required for config entry
\"%s\".\n",
AUTOMEMBER_SCOPE_TYPE, entry->dn);
@@ -578,7 +578,7 @@ automember_parse_config_entry(Slapi_Entry * e, int apply)
if (value) {
/* Convert to a Slapi_Filter to improve performance. */
if (NULL == (entry->filter = slapi_str2filter(value))) {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM ,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM ,
"automember_parse_config_entry: Invalid search filter in "
"%s config setting for config entry \"%s\" "
"(filter = \"%s\").\n", AUTOMEMBER_FILTER_TYPE,
entry->dn, value);
@@ -591,7 +591,7 @@ automember_parse_config_entry(Slapi_Entry * e, int apply)
goto bail;
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_config_entry: The %s config "
"setting is required for config entry
\"%s\".\n",
AUTOMEMBER_FILTER_TYPE, entry->dn);
@@ -614,7 +614,7 @@ automember_parse_config_entry(Slapi_Entry * e, int apply)
dn = slapi_sdn_new_dn_byref(values[i]);
if(slapi_sdn_issuffix(dn, automember_get_config_area())){
/* The groups are under the config area - not good */
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_config_entry: The default
group \"%s\" can not be "
"a child of the plugin config area
\"%s\".\n",
values[i],
slapi_sdn_get_dn(automember_get_config_area()));
@@ -633,7 +633,7 @@ automember_parse_config_entry(Slapi_Entry * e, int apply)
if (value) {
if (automember_parse_grouping_attr(value, &(entry->grouping_attr),
&(entry->grouping_value)) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_config_entry: Invalid "
"%s config setting for config entry \"%s\"
"
"(value: \"%s\").\n",
AUTOMEMBER_GROUPING_ATTR_TYPE,
@@ -646,7 +646,7 @@ automember_parse_config_entry(Slapi_Entry * e, int apply)
goto bail;
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_config_entry: The %s config "
"setting is required for config entry
\"%s\".\n",
AUTOMEMBER_GROUPING_ATTR_TYPE, entry->dn);
@@ -666,7 +666,7 @@ automember_parse_config_entry(Slapi_Entry * e, int apply)
* when we are simply validating config. We can just ignore no
* such object errors. */
if ((LDAP_SUCCESS != result) && (LDAP_NO_SUCH_OBJECT != result)) {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_config_entry: Error searching "
"for child rule entries for config \"%s\"
(err=%d).",
entry->dn, result);
@@ -679,7 +679,7 @@ automember_parse_config_entry(Slapi_Entry * e, int apply)
/* Go through each child rule entry and parse it. */
for (i = 0; rule_entries && (rule_entries[i] != NULL); i++) {
- slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_config_entry: parsing regex rule entry
"
"\"%s\".\n",
slapi_entry_get_dn(rule_entries[i]));
automember_parse_regex_entry(entry, rule_entries[i]);
@@ -703,7 +703,7 @@ automember_parse_config_entry(Slapi_Entry * e, int apply)
* the entry before that list item. */
if (slapi_dn_issuffix(entry->scope, config_entry->scope)) {
PR_INSERT_BEFORE(&(entry->list), list);
- slapi_log_error(SLAPI_LOG_CONFIG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG,
AUTOMEMBER_PLUGIN_SUBSYSTEM,
"store [%s] before [%s] \n", entry->dn,
config_entry->dn);
@@ -716,7 +716,7 @@ automember_parse_config_entry(Slapi_Entry * e, int apply)
/* If we hit the end of the list, add to the tail. */
if (g_automember_config == list) {
PR_INSERT_BEFORE(&(entry->list), list);
- slapi_log_error(SLAPI_LOG_CONFIG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG,
AUTOMEMBER_PLUGIN_SUBSYSTEM,
"store [%s] at tail\n", entry->dn);
entry_added = 1;
@@ -726,7 +726,7 @@ automember_parse_config_entry(Slapi_Entry * e, int apply)
} else {
/* first entry */
PR_INSERT_LINK(&(entry->list), g_automember_config);
- slapi_log_error(SLAPI_LOG_CONFIG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"store [%s] at head \n", entry->dn);
entry_added = 1;
@@ -736,7 +736,7 @@ automember_parse_config_entry(Slapi_Entry * e, int apply)
if (0 == entry_added) {
/* Don't log error if we weren't asked to apply config */
if ((apply != 0) && (entry != NULL)) {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_config_entry: Invalid config entry
"
"[%s] skipped\n", entry->dn);
}
@@ -750,7 +750,7 @@ automember_parse_config_entry(Slapi_Entry * e, int apply)
slapi_free_search_results_internal(search_pb);
slapi_pblock_destroy(search_pb);
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_parse_config_entry\n");
return ret;
@@ -765,7 +765,7 @@ automember_free_config_entry(struct configEntry ** entry)
return;
if (e->dn) {
- slapi_log_error(SLAPI_LOG_CONFIG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"freeing config entry [%s]\n", e->dn);
slapi_ch_free_string(&e->dn);
}
@@ -847,12 +847,12 @@ static Slapi_DN *
automember_get_sdn(Slapi_PBlock * pb)
{
Slapi_DN *sdn = 0;
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_get_sdn\n");
slapi_pblock_get(pb, SLAPI_TARGET_SDN, &sdn);
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_get_sdn\n");
return sdn;
@@ -880,7 +880,7 @@ automember_dn_is_config(Slapi_DN *sdn)
{
int ret = 0;
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_dn_is_config\n");
if (sdn == NULL) {
@@ -904,7 +904,7 @@ automember_dn_is_config(Slapi_DN *sdn)
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_dn_is_config\n");
return ret;
@@ -922,11 +922,11 @@ automember_oktodo(Slapi_PBlock *pb)
int ret = 1;
int oprc = 0;
- slapi_log_error( SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_oktodo\n" );
if(slapi_pblock_get(pb, SLAPI_PLUGIN_OPRETURN, &oprc) != 0) {
- slapi_log_error( SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_oktodo: could not get parameters\n" );
ret = -1;
}
@@ -936,7 +936,7 @@ automember_oktodo(Slapi_PBlock *pb)
ret = 0;
}
- slapi_log_error( SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_oktodo\n" );
return ret;
@@ -953,12 +953,12 @@ automember_isrepl(Slapi_PBlock *pb)
{
int is_repl = 0;
- slapi_log_error( SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_isrepl\n" );
slapi_pblock_get(pb, SLAPI_IS_REPLICATED_OPERATION, &is_repl);
- slapi_log_error( SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_isrepl\n" );
return is_repl;
@@ -980,13 +980,13 @@ automember_parse_regex_entry(struct configEntry *config, Slapi_Entry
*e)
PRCList *list;
int i = 0;
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_parse_regex_entry\n");
/* Make sure the target group was specified. */
target_group = slapi_entry_attr_get_charptr(e, AUTOMEMBER_TARGET_GROUP_TYPE);
if (!target_group) {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_regex_entry: The %s config "
"setting is required for rule entry
\"%s\".\n",
AUTOMEMBER_TARGET_GROUP_TYPE, slapi_entry_get_ndn(e));
@@ -995,7 +995,7 @@ automember_parse_regex_entry(struct configEntry *config, Slapi_Entry
*e)
/* Ensure that the target group DN is valid. */
if (slapi_dn_syntax_check(NULL, target_group, 1) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_regex_entry: invalid target group DN
"
"in rule \"%s\" (dn=\"%s\").\n",
slapi_entry_get_ndn(e),
target_group);
@@ -1007,7 +1007,7 @@ automember_parse_regex_entry(struct configEntry *config, Slapi_Entry
*e)
group_dn = slapi_sdn_new_dn_byref(target_group);
if(slapi_sdn_issuffix(group_dn, automember_get_config_area())){
/* The target group is under the plugin config area - not good */
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_regex_entry: The target group \"%s\" can
not be "
"a child of the plugin config area \"%s\".\n",
slapi_sdn_get_dn(group_dn),
slapi_sdn_get_dn(automember_get_config_area()));
@@ -1060,7 +1060,7 @@ automember_parse_regex_entry(struct configEntry *config, Slapi_Entry
*e)
PR_INSERT_LINK(&(rule->list), (PRCList
*)config->inclusive_rules);
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_regex_entry: Skipping invalid
inclusive "
"regex rule in rule entry \"%s\" (rule =
\"%s\").\n",
slapi_entry_get_ndn(e), values[i]);
@@ -1114,7 +1114,7 @@ automember_parse_regex_entry(struct configEntry *config, Slapi_Entry
*e)
PR_INSERT_LINK(&(rule->list), (PRCList
*)config->exclusive_rules);
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_regex_entry: Skipping invalid
exclusive "
"regex rule in rule entry \"%s\" (rule =
\"%s\").\n",
slapi_entry_get_ndn(e), values[i]);
@@ -1128,7 +1128,7 @@ automember_parse_regex_entry(struct configEntry *config, Slapi_Entry
*e)
bail:
slapi_ch_free_string(&target_group);
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_parse_regex_entry\n");
}
@@ -1153,7 +1153,7 @@ automember_parse_regex_rule(char *rule_string)
/* A rule is in the form "attr=regex". */
/* Find the comparison attribute name. */
if ((p = strchr(rule_string, '=')) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_regex_rule: Unable to parse "
"regex rule (missing '=' delimeter).\n");
goto bail;
@@ -1161,14 +1161,14 @@ automember_parse_regex_rule(char *rule_string)
/* Make sure the attribute name is not empty. */
if (p == rule_string) {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_regex_rule: Unable to parse "
" regex rule (missing comparison attribute).\n");
goto bail;
}
if ((attr = strndup(rule_string, p - rule_string)) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_regex_rule: Unable to allocate "
"memory.\n");
goto bail;
@@ -1177,7 +1177,7 @@ automember_parse_regex_rule(char *rule_string)
/* Validate the attribute. */
for (p2 = attr; p2 && (*p2 != '\0'); p2++) {
if (!IS_ATTRDESC_CHAR(*p2)) {
- slapi_log_error( SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_regex_rule: Invalid comparison "
"attribute name \"%s\".\n", attr);
goto bail;
@@ -1187,7 +1187,7 @@ automember_parse_regex_rule(char *rule_string)
/* Find the regex. */
p++;
if (*p == '\0') {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_regex_rule: Unable to parse "
"regex rule (missing regex).\n");
goto bail;
@@ -1196,7 +1196,7 @@ automember_parse_regex_rule(char *rule_string)
/* Compile the regex to validate it. */
regex = slapi_re_comp(p, &recomp_result);
if (!regex) {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_regex_rule: Unable to parse "
"regex rule (invalid regex). Error
\"%s\".\n",
recomp_result?recomp_result:"unknown");
@@ -1270,7 +1270,7 @@ automember_parse_grouping_attr(char *value, char **grouping_attr,
char **groupin
/* split out the type from the value (use the first ':') */
if ((p = strchr(value, ':')) == NULL) {
- slapi_log_error( SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_grouping_attr: Value for grouping
attribute "
"is not in the correct format. (value:
\"%s\").\n", value);
ret = 1;
@@ -1279,7 +1279,7 @@ automember_parse_grouping_attr(char *value, char **grouping_attr,
char **groupin
/* Ensure the type is not empty. */
if (p == value) {
- slapi_log_error( SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_grouping_attr: Value for grouping
attribute "
"is not in the correct format. The grouping attribute is
missing. "
"(value: \"%s\").\n", value);
@@ -1298,7 +1298,7 @@ automember_parse_grouping_attr(char *value, char **grouping_attr,
char **groupin
/* Ensure the value is not empty. */
if (*p == '\0') {
- slapi_log_error( SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_grouping_attr: Value for grouping
attribute "
"is not in the correct format. The grouping value is "
"missing. (value: \"%s\").\n", value);
@@ -1311,7 +1311,7 @@ automember_parse_grouping_attr(char *value, char **grouping_attr,
char **groupin
/* Ensure that memory was allocated successfully. */
if ((*grouping_attr == NULL) || (*grouping_value == NULL)) {
- slapi_log_error( SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_grouping_attr: Error allocating
memory.\n");
ret = 1;
goto bail;
@@ -1320,7 +1320,7 @@ automember_parse_grouping_attr(char *value, char **grouping_attr,
char **groupin
/* Ensure that the grouping attr is a legal attr name. */
for (p = *grouping_attr; p && (*p != '\0'); p++) {
if (!IS_ATTRDESC_CHAR(*p)) {
- slapi_log_error( SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_grouping_attr: Invalid value for
"
"grouping attribute. The grouping attribute type is
"
"illegal. (type: \"%s\").\n",
*grouping_attr);
@@ -1332,7 +1332,7 @@ automember_parse_grouping_attr(char *value, char **grouping_attr,
char **groupin
/* Ensure that the grouping value type is a legal attr name. */
for (p = *grouping_value; p && (*p != '\0'); p++) {
if (!IS_ATTRDESC_CHAR(*p)) {
- slapi_log_error( SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_parse_grouping_attr: Invalid value for
"
"grouping attribute. The grouping value type is "
"illegal. (type: \"%s\").\n",
*grouping_value);
@@ -1374,7 +1374,7 @@ automember_update_membership(struct configEntry *config, Slapi_Entry
*e, PRFileD
return -1;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_update_membership: Processing \"%s\"
"
"definition entry for candidate entry
\"%s\".\n",
config->dn, slapi_entry_get_dn(e));
@@ -1401,7 +1401,7 @@ automember_update_membership(struct configEntry *config, Slapi_Entry
*e, PRFileD
if (slapi_re_exec(curr_rule->regex, vals[i], -1) == 1) {
/* Found a match. Add to end of the exclusion list
* and set last as a hint to ourselves. */
- slapi_log_error(SLAPI_LOG_PLUGIN,
AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_update_membership: Adding
\"%s\" "
"to list of excluded groups for
\"%s\" "
"(matched:
\"%s=%s\").\n",
@@ -1476,7 +1476,7 @@ automember_update_membership(struct configEntry *config, Slapi_Entry
*e, PRFileD
if (slapi_re_exec(curr_rule->regex, vals[i], -1) == 1) {
/* Found a match. Add to the end of the targets list
* and set last as a hint to ourselves. */
- slapi_log_error(SLAPI_LOG_PLUGIN,
AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_update_membership: Adding
\"%s\" "
"to list of target groups for
\"%s\" "
"(matched:
\"%s=%s\").\n",
@@ -1601,7 +1601,7 @@ automember_add_member_value(Slapi_Entry *member_e, const char
*group_dn, char *g
mods[1] = 0;
/* Perform the modify operation. */
- slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_add_member_value: Adding \"%s\" as
"
"a \"%s\" value to group
\"%s\".\n",
member_value, grouping_attr, group_dn);
@@ -1612,7 +1612,7 @@ automember_add_member_value(Slapi_Entry *member_e, const char
*group_dn, char *g
slapi_pblock_get(mod_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
if ((result != LDAP_SUCCESS) && (result != LDAP_TYPE_OR_VALUE_EXISTS)) {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_add_member_value: Unable to add
\"%s\" as "
"a \"%s\" value to group \"%s\"
(%s).\n",
member_value, grouping_attr, group_dn,
@@ -1620,7 +1620,7 @@ automember_add_member_value(Slapi_Entry *member_e, const char
*group_dn, char *g
rc = result;
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_add_member_value: Unable to find grouping
"
"value attribute \"%s\" in entry
\"%s\".\n",
grouping_value, slapi_entry_get_dn(member_e));
@@ -1658,7 +1658,7 @@ automember_pre_op(Slapi_PBlock * pb, int modop)
char *errstr = NULL;
int ret = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_pre_op\n");
if (0 == (sdn = automember_get_sdn(pb)))
@@ -1733,7 +1733,7 @@ automember_pre_op(Slapi_PBlock * pb, int modop)
slapi_entry_free(e);
if (ret) {
- slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_pre_op: operation failure [%d]\n", ret);
slapi_send_ldap_result(pb, ret, NULL, errstr, 0, NULL);
slapi_ch_free((void **)&errstr);
@@ -1741,7 +1741,7 @@ automember_pre_op(Slapi_PBlock * pb, int modop)
ret = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_pre_op\n");
return ret;
@@ -1770,7 +1770,7 @@ automember_mod_post_op(Slapi_PBlock *pb)
{
Slapi_DN *sdn = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_mod_post_op\n");
if (automember_oktodo(pb) && (sdn = automember_get_sdn(pb))) {
@@ -1780,7 +1780,7 @@ automember_mod_post_op(Slapi_PBlock *pb)
}
}
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_mod_post_op\n");
return SLAPI_PLUGIN_SUCCESS;
@@ -1795,7 +1795,7 @@ automember_add_post_op(Slapi_PBlock *pb)
PRCList *list = NULL;
int rc = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_add_post_op\n");
/* Reload config if a config entry was added. */
@@ -1804,7 +1804,7 @@ automember_add_post_op(Slapi_PBlock *pb)
automember_load_config();
}
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_add_post_op: Error retrieving dn\n");
rc = SLAPI_PLUGIN_FAILURE;
@@ -1854,13 +1854,13 @@ automember_add_post_op(Slapi_PBlock *pb)
automember_config_unlock();
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_add_post_op: Error "
"retrieving post-op entry %s\n",
slapi_sdn_get_dn(sdn));
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_add_post_op (%d)\n", rc);
if(rc){
@@ -1885,7 +1885,7 @@ automember_del_post_op(Slapi_PBlock *pb)
{
Slapi_DN *sdn = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_del_post_op\n");
/* Reload config if a config entry was deleted. */
@@ -1893,12 +1893,12 @@ automember_del_post_op(Slapi_PBlock *pb)
if (automember_dn_is_config(sdn))
automember_load_config();
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_del_post_op: Error "
"retrieving dn\n");
}
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_del_post_op\n");
return SLAPI_PLUGIN_SUCCESS;
@@ -2077,7 +2077,7 @@ automember_task_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry
*eAfter,
(void *)task, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL){
- slapi_log_error( SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"unable to create task thread!\n");
*returncode = LDAP_OPERATIONS_ERROR;
slapi_task_finish(task, *returncode);
@@ -2112,7 +2112,7 @@ void automember_rebuild_task_thread(void *arg)
return; /* no task */
}
slapi_task_inc_refcount(task);
- slapi_log_error( SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_rebuild_task_thread --> refcount
incremented.\n" );
/*
* Fetch our task data from the task
@@ -2142,7 +2142,7 @@ void automember_rebuild_task_thread(void *arg)
slapi_task_log_status(task, "Automember rebuild membership task unable to
search"
" on base (%s) filter (%s) error (%d)\n",
slapi_sdn_get_dn(td->base_dn),
td->filter_str, result);
- slapi_log_error( SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"Task: unable to search on base (%s) filter (%s) error
(%d)\n",
slapi_sdn_get_dn(td->base_dn), td->filter_str, result);
goto out;
@@ -2159,11 +2159,11 @@ void automember_rebuild_task_thread(void *arg)
fixup_pb = slapi_pblock_new();
slapi_pblock_set(fixup_pb, SLAPI_BACKEND, be);
if(slapi_back_transaction_begin(fixup_pb) != LDAP_SUCCESS){
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_rebuild_task_thread: failed to start
transaction\n");
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_rebuild_task_thread: failed to get be backend from
%s\n",
slapi_sdn_get_dn(td->base_dn));
}
@@ -2218,7 +2218,7 @@ out:
slapi_task_inc_progress(task);
slapi_task_finish(task, result);
slapi_task_dec_refcount(task);
- slapi_log_error( SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_rebuild_task_thread <-- refcount
decremented.\n" );
}
@@ -2308,7 +2308,7 @@ automember_task_add_export_updates(Slapi_PBlock *pb, Slapi_Entry *e,
Slapi_Entry
(void *)task, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL){
- slapi_log_error( SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"unable to create export task thread!\n");
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -2339,7 +2339,7 @@ void automember_export_task_thread(void *arg)
return; /* no task */
}
slapi_task_inc_refcount(task);
- slapi_log_error( SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_export_task_thread --> refcount
incremented.\n" );
td = (task_data *)slapi_task_get_data(task);
@@ -2354,7 +2354,7 @@ void automember_export_task_thread(void *arg)
td->ldif_out, rc, slapi_system_strerror(rc));
slapi_task_log_status(task, "Automember export task could not open ldif file
\"%s\" for writing, error %d (%s)\n",
td->ldif_out, rc, slapi_system_strerror(rc) );
- slapi_log_error( SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"Could not open ldif file \"%s\" for writing,
error %d (%s)\n",
td->ldif_out, rc, slapi_system_strerror(rc) );
result = SLAPI_DSE_CALLBACK_ERROR;
@@ -2378,7 +2378,7 @@ void automember_export_task_thread(void *arg)
slapi_sdn_get_dn(td->base_dn), td->filter_str,
result);
slapi_task_log_status(task, "Automember task failed to search on base (%s)
filter (%s) error (%d)\n",
slapi_sdn_get_dn(td->base_dn), td->filter_str,
result);
- slapi_log_error( SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"Task: unable to search on base (%s) filter (%s) error
(%d)\n",
slapi_sdn_get_dn(td->base_dn), td->filter_str, result);
goto out;
@@ -2427,7 +2427,7 @@ out:
slapi_task_inc_progress(task);
slapi_task_finish(task, result);
slapi_task_dec_refcount(task);
- slapi_log_error( SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_export_task_thread <-- refcount
decremented.\n" );
}
@@ -2495,7 +2495,7 @@ automember_task_add_map_entries(Slapi_PBlock *pb, Slapi_Entry *e,
Slapi_Entry *e
(void *)task, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL){
- slapi_log_error( SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"unable to create map task thread!\n");
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -2538,7 +2538,7 @@ void automember_map_task_thread(void *arg)
return; /* no task */
}
slapi_task_inc_refcount(task);
- slapi_log_error( SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_map_task_thread --> refcount
incremented.\n" );
td = (task_data *)slapi_task_get_data(task);
slapi_task_begin(task, 1);
@@ -2554,7 +2554,7 @@ void automember_map_task_thread(void *arg)
td->ldif_out, rc, slapi_system_strerror(rc));
slapi_task_log_status(task, "The ldif file %s could not be accessed, error
%d (%s). Aborting task.\n",
td->ldif_out, rc, slapi_system_strerror(rc));
- slapi_log_error( SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"Could not open ldif file \"%s\" for writing,
error %d (%s)\n",
td->ldif_out, rc, slapi_system_strerror(rc) );
result = SLAPI_DSE_CALLBACK_ERROR;
@@ -2574,7 +2574,7 @@ void automember_map_task_thread(void *arg)
td->ldif_in, rc, errstr);
slapi_task_log_status(task, "The ldif file %s could not be accessed, error
%d (%s). Aborting task.\n",
td->ldif_in, rc, errstr);
- slapi_log_error( SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"Could not open ldif file \"%s\" for reading,
error %d (%s)\n",
td->ldif_in, rc, errstr );
result = SLAPI_DSE_CALLBACK_ERROR;
@@ -2635,7 +2635,7 @@ out:
slapi_task_inc_progress(task);
slapi_task_finish(task, result);
slapi_task_dec_refcount(task);
- slapi_log_error( SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_map_task_thread <-- refcount
decremented.\n" );
}
@@ -2655,7 +2655,7 @@ automember_modrdn_post_op(Slapi_PBlock *pb)
PRCList *list = NULL;
int rc = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_modrdn_post_op\n");
/* Just bail if we aren't ready to service requests yet. */
@@ -2672,7 +2672,7 @@ automember_modrdn_post_op(Slapi_PBlock *pb)
if (post_e) {
new_sdn = slapi_entry_get_sdn(post_e);
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_modrdn_post_op: Error "
"retrieving post-op entry\n");
return SLAPI_PLUGIN_FAILURE;
@@ -2683,7 +2683,7 @@ automember_modrdn_post_op(Slapi_PBlock *pb)
automember_load_config();
}
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_modrdn_post_op: Error "
"retrieving dn\n");
return SLAPI_PLUGIN_FAILURE;
@@ -2730,7 +2730,7 @@ automember_modrdn_post_op(Slapi_PBlock *pb)
slapi_pblock_set(pb, SLAPI_PB_RESULT_TEXT, &errtxt);
}
- slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_modrdn_post_op (%d)\n", rc);
return rc;
diff --git a/ldap/servers/plugins/chainingdb/cb_add.c
b/ldap/servers/plugins/chainingdb/cb_add.c
index 25b8f17..08df9b7 100644
--- a/ldap/servers/plugins/chainingdb/cb_add.c
+++ b/ldap/servers/plugins/chainingdb/cb_add.c
@@ -87,7 +87,7 @@ chaining_back_add ( Slapi_PBlock *pb )
if (LDAP_SUCCESS != rc) {
static int warned_get_conn = 0;
if (!warned_get_conn) {
- slapi_log_error(SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"cb_get_connection failed (%d) %s\n",
rc, ldap_err2string(rc));
warned_get_conn = 1;
@@ -121,7 +121,7 @@ chaining_back_add ( Slapi_PBlock *pb )
* Call the backend preoperation plugins
*/
if((rc = slapi_plugin_call_preop_be_plugins(pb, SLAPI_PLUGIN_ADD_OP))){
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM, "add (%s): pre betxn
failed, error (%d)\n",dn,rc);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM, "add (%s): pre
betxn failed, error (%d)\n",dn,rc);
cb_release_op_connection(cb->pool,ld,0);
ldap_mods_free(mods,1);
ldap_controls_free(ctrls);
@@ -138,7 +138,7 @@ chaining_back_add ( Slapi_PBlock *pb )
ldap_controls_free(ctrls);
if ( rc != LDAP_SUCCESS ) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"ldap_add_ext failed -- %s\n", ldap_err2string(rc) );
cb_send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL, ENDUSERMSG, 0, NULL );
@@ -199,7 +199,7 @@ chaining_back_add ( Slapi_PBlock *pb )
if ( parse_rc != LDAP_SUCCESS ) {
static int warned_parse_rc = 0;
if (!warned_parse_rc) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"%s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?": ":"",
@@ -220,7 +220,7 @@ chaining_back_add ( Slapi_PBlock *pb )
struct berval ** refs = referrals2berval(referrals);
static int warned_rc = 0;
if (!warned_rc && error_msg) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"%s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?": ":"",
@@ -245,7 +245,7 @@ chaining_back_add ( Slapi_PBlock *pb )
/* Call the backend postoperation plugins */
if((rc = slapi_plugin_call_postop_be_plugins(pb, SLAPI_PLUGIN_ADD_OP))){
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM, "add (%s): post betxn
failed, error (%d)\n",dn,rc);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM, "add (%s): post
betxn failed, error (%d)\n",dn,rc);
}
/* Add control response sent by the farm server */
diff --git a/ldap/servers/plugins/chainingdb/cb_bind.c
b/ldap/servers/plugins/chainingdb/cb_bind.c
index 6c09b97..6d1c354 100644
--- a/ldap/servers/plugins/chainingdb/cb_bind.c
+++ b/ldap/servers/plugins/chainingdb/cb_bind.c
@@ -91,7 +91,7 @@ cb_sasl_bind_once_s( cb_conn_pool *pool, const char *dn, ber_tag_t
method,
if (LDAP_SUCCESS != rc) {
static int warned_get_conn = 0;
if (!warned_get_conn) {
- slapi_log_error(SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"cb_get_connection failed (%d) %s\n",
rc, ldap_err2string(rc));
warned_get_conn = 1;
@@ -157,7 +157,7 @@ cb_sasl_bind_once_s( cb_conn_pool *pool, const char *dn, ber_tag_t
method,
static int warned_bind_once = 0;
if (!warned_bind_once) {
int hasmatched = (matcheddnp && *matcheddnp && (**matcheddnp !=
'\0'));
- slapi_log_error(SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"cb_sasl_bind_once_s failed (%s%s%s)\n",
hasmatched ? *matcheddnp : "",
hasmatched ? ": " : "",
diff --git a/ldap/servers/plugins/chainingdb/cb_close.c
b/ldap/servers/plugins/chainingdb/cb_close.c
index 5d09b8a..a7e16bb 100644
--- a/ldap/servers/plugins/chainingdb/cb_close.c
+++ b/ldap/servers/plugins/chainingdb/cb_close.c
@@ -72,7 +72,7 @@ int cb_back_close( Slapi_PBlock *pb )
{
const char *betype = slapi_be_gettype(be);
if (!betype || strcasecmp(betype,CB_CHAINING_BACKEND_TYPE)) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM, "Wrong database
type.\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM, "Wrong database
type.\n");
free_cb_backend(cb);
return 0;
}
@@ -81,7 +81,7 @@ int cb_back_close( Slapi_PBlock *pb )
inst = cb_get_instance(be);
CB_ASSERT( inst != NULL );
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,"Stopping chaining database
instance %s\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,"Stopping chaining
database instance %s\n",
inst->configDn);
/*
* emulate a backend instance deletion to clean up everything
diff --git a/ldap/servers/plugins/chainingdb/cb_compare.c
b/ldap/servers/plugins/chainingdb/cb_compare.c
index 28fae31..9bb9b78 100644
--- a/ldap/servers/plugins/chainingdb/cb_compare.c
+++ b/ldap/servers/plugins/chainingdb/cb_compare.c
@@ -93,7 +93,7 @@ chaining_back_compare ( Slapi_PBlock *pb )
if (LDAP_SUCCESS != rc) {
static int warned_get_conn = 0;
if (!warned_get_conn) {
- slapi_log_error(SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"cb_get_connection failed (%d) %s\n",
rc, ldap_err2string(rc));
warned_get_conn = 1;
@@ -184,7 +184,7 @@ chaining_back_compare ( Slapi_PBlock *pb )
if ( parse_rc != LDAP_SUCCESS ) {
static int warned_parse_rc = 0;
if (!warned_parse_rc) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"%s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?":
":"",
diff --git a/ldap/servers/plugins/chainingdb/cb_config.c
b/ldap/servers/plugins/chainingdb/cb_config.c
index c48f516..7bd87c5 100644
--- a/ldap/servers/plugins/chainingdb/cb_config.c
+++ b/ldap/servers/plugins/chainingdb/cb_config.c
@@ -43,7 +43,7 @@ int cb_config_add_dse_entries(cb_backend *cb, char **entries, char
*string1, cha
slapi_add_internal_pb(util_pb);
slapi_pblock_get(util_pb, SLAPI_PLUGIN_INTOP_RESULT, &res);
if ( LDAP_SUCCESS != res && LDAP_ALREADY_EXISTS != res ) {
- slapi_log_error(SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"Unable to add config entry (%s) to the DSE: %s\n",
slapi_entry_get_dn(e),
ldap_err2string(res));
@@ -84,7 +84,7 @@ int cb_config_load_dse_info(Slapi_PBlock * pb) {
if ( LDAP_SUCCESS == res ) {
slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES,
&entries);
if (NULL == entries || entries[0] == NULL) {
- slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"Error accessing entry <%s>\n",cb->configDN);
slapi_free_search_results_internal(search_pb);
slapi_pblock_destroy(search_pb);
@@ -98,7 +98,7 @@ int cb_config_load_dse_info(Slapi_PBlock * pb) {
} else {
slapi_free_search_results_internal(search_pb);
slapi_pblock_destroy(search_pb);
- slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"Error accessing entry <%s>
(%s)\n",cb->configDN,ldap_err2string(res));
return 1;
}
@@ -122,7 +122,7 @@ int cb_config_load_dse_info(Slapi_PBlock * pb) {
slapi_search_internal_pb (search_pb);
slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_RESULT, &res);
if (res != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"Error accessing the config DSE (%s)\n",ldap_err2string(res));
slapi_free_search_results_internal(search_pb);
slapi_pblock_destroy(search_pb);
@@ -206,7 +206,7 @@ int cb_config_add_check_callback(Slapi_PBlock *pb, Slapi_Entry* e,
Slapi_Entry*
while (i != -1 ) {
bval = (struct berval *) slapi_value_get_berval(sval);
if (!cb_is_control_forwardable(cb,bval->bv_val)) {
-
slapi_log_error(SLAPI_LOG_PLUGIN,CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
LOG_DEBUG,CB_PLUGIN_SUBSYSTEM,
"control %s can't be
forwarded.\n",bval->bv_val);
*returncode=LDAP_CONSTRAINT_VIOLATION;
return SLAPI_DSE_CALLBACK_ERROR;
@@ -246,7 +246,7 @@ cb_config_add_callback(Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry*
e2, int *r
while (i != -1 ) {
bval = (struct berval *) slapi_value_get_berval(sval);
if (!cb_is_control_forwardable(cb,bval->bv_val)) {
-
slapi_log_error(SLAPI_LOG_PLUGIN,CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
LOG_DEBUG,CB_PLUGIN_SUBSYSTEM,
"control %s can't be
forwarded.\n",bval->bv_val);
*returncode=LDAP_CONSTRAINT_VIOLATION;
return SLAPI_DSE_CALLBACK_ERROR;
@@ -359,7 +359,7 @@ cb_config_modify_check_callback(Slapi_PBlock *pb, Slapi_Entry*
entryBefore, Slap
for (j = 0; mods[i]->mod_bvalues &&
mods[i]->mod_bvalues[j]; j++) {
config_attr_value = (char *)
mods[i]->mod_bvalues[j]->bv_val;
if (!cb_is_control_forwardable(cb,config_attr_value)) {
-
slapi_log_error(SLAPI_LOG_PLUGIN,CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
LOG_DEBUG,CB_PLUGIN_SUBSYSTEM,
"control %s can't be
forwarded.\n",config_attr_value);
*returncode=LDAP_CONSTRAINT_VIOLATION;
return SLAPI_DSE_CALLBACK_ERROR;
@@ -393,7 +393,7 @@ cb_config_modify_callback(Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entr
for (j = 0; mods[i]->mod_bvalues && mods[i]->mod_bvalues[j]; j++)
{
config_attr_value = (char *) mods[i]->mod_bvalues[j]->bv_val;
if (!cb_is_control_forwardable(cb,config_attr_value)) {
- slapi_log_error(SLAPI_LOG_PLUGIN,CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,CB_PLUGIN_SUBSYSTEM,
"control %s can't be forwarded.\n",config_attr_value);
*returncode=LDAP_CONSTRAINT_VIOLATION;
return SLAPI_DSE_CALLBACK_ERROR;
diff --git a/ldap/servers/plugins/chainingdb/cb_conn_stateless.c
b/ldap/servers/plugins/chainingdb/cb_conn_stateless.c
index 91e38ff..f3dd149 100644
--- a/ldap/servers/plugins/chainingdb/cb_conn_stateless.c
+++ b/ldap/servers/plugins/chainingdb/cb_conn_stateless.c
@@ -91,7 +91,7 @@ void cb_close_conn_pool(cb_conn_pool * pool) {
for (i=0; i< MAX_CONN_ARRAY; i++) {
for (conn = pool->connarray[i]; conn != NULL; conn = nextconn) {
if ( conn->status != CB_CONNSTATUS_OK ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"cb_close_conn_pool: unexpected connection state
(%d)\n",conn->status);
}
nextconn=conn->next;
@@ -102,7 +102,7 @@ void cb_close_conn_pool(cb_conn_pool * pool) {
else {
for ( conn = pool->conn.conn_list; conn != NULL; conn = nextconn ) {
if ( conn->status != CB_CONNSTATUS_OK ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"cb_close_conn_pool: unexpected connection state (%d)\n",conn->status);
}
nextconn=conn->next;
@@ -194,7 +194,7 @@ cb_get_connection(cb_conn_pool * pool,
if (maxconnections <=0) {
static int warned_maxconn = 0;
if (!warned_maxconn) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"<== cb_get_connection error (no connection available)\n");
warned_maxconn = 1;
}
@@ -238,7 +238,7 @@ cb_get_connection(cb_conn_pool * pool,
slapi_lock_mutex( pool->conn.conn_list_mutex );
if (cb_debug_on()) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"==> cb_get_connection server %s conns: %d maxconns: %d\n",
hostname, pool->conn.conn_list_count, maxconnections );
}
@@ -248,7 +248,7 @@ cb_get_connection(cb_conn_pool * pool,
/* time limit mgmt */
if (checktime) {
if (current_time() > endbefore ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"cb_get_connection server %s expired.\n", hostname );
if ( errmsg ) {
*errmsg = PR_smprintf(error1,"timelimit exceeded");
@@ -269,7 +269,7 @@ cb_get_connection(cb_conn_pool * pool,
if ((conn->ThreadId == PR_MyThreadId()) && (conn->status ==
CB_CONNSTATUS_OK &&
conn->refcount < maxconcurrency)){
if (cb_debug_on()) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"<= cb_get_connection server found conn 0x%p to
use)\n", conn );
}
goto unlock_and_return; /* found one */
@@ -280,7 +280,7 @@ cb_get_connection(cb_conn_pool * pool,
connprev = NULL;
for ( conn = pool->conn.conn_list; conn != NULL; conn = conn->next ) {
if (cb_debug_on()) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"list: conn 0x%p status %d refcount %lu\n", conn,
conn->status, conn->refcount );
}
@@ -288,7 +288,7 @@ cb_get_connection(cb_conn_pool * pool,
if ( conn->status == CB_CONNSTATUS_OK
&& conn->refcount < maxconcurrency ) {
if (cb_debug_on()) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"<= cb_get_connection server found conn 0x%p to
use)\n", conn );
}
goto unlock_and_return; /* found one */
@@ -311,7 +311,7 @@ cb_get_connection(cb_conn_pool * pool,
if (NULL == ld) {
static int warned_init = 0;
if (!warned_init) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"Can't contact server <%s> port
<%d>.\n",
hostname, port );
warned_init = 1;
@@ -340,7 +340,7 @@ cb_get_connection(cb_conn_pool * pool,
rc=LDAP_SUCCESS;
if (cb_debug_on()) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
CB_PLUGIN_SUBSYSTEM,
"Bind to to server <%s> port
<%d> as <%s>\n",
hostname, port, binddn);
}
@@ -352,7 +352,7 @@ cb_get_connection(cb_conn_pool * pool,
{
static int warned_pw = 0;
if (!warned_pw) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"Internal credentials decoding error; "
"password storage schemes do not match or "
"encrypted password is corrupted.\n");
@@ -374,7 +374,7 @@ cb_get_connection(cb_conn_pool * pool,
if ( rc == LDAP_TIMEOUT ) {
static int warned_bind_timeout = 0;
if (!warned_bind_timeout) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"Can't bind to server <%s> port <%d>. (%s)\n",
hostname, port, "time-out expired");
warned_bind_timeout = 1;
@@ -388,7 +388,7 @@ cb_get_connection(cb_conn_pool * pool,
prerr=PR_GetError();
static int warned_bind_err = 0;
if (!warned_bind_err) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"Can't bind to server <%s> port <%d>. "
"(LDAP error %d - %s; "
SLAPI_COMPONENT_NAME_NSPR " error %d - %s)\n",
@@ -412,7 +412,7 @@ cb_get_connection(cb_conn_pool * pool,
if ( !(strcmp( serverctrls[ i ]->ldctl_oid, LDAP_CONTROL_PWEXPIRED)) )
{
/* Bind is successful but password has expired */
- slapi_log_error(SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"Successfully bound as %s to remote server %s:%d, "
"but password has expired.\n",
binddn, hostname, port);
@@ -424,7 +424,7 @@ cb_get_connection(cb_conn_pool * pool,
(serverctrls[ i ]->ldctl_value.bv_len > 0) )
{
int password_expiring = atoi( serverctrls[ i ]->ldctl_value.bv_val );
- slapi_log_error(SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"Successfully bound as %s to remote server %s:%d, "
"but password is expiring in %d seconds.\n",
binddn, hostname, port, password_expiring);
@@ -437,12 +437,12 @@ cb_get_connection(cb_conn_pool * pool,
/* the start_tls operation is usually performed in slapi_ldap_bind, but
since we are not binding we still need to start_tls */
if (cb_debug_on()) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"<= cb_get_connection doing start_tls on connection 0x%p\n", conn
);
}
if ((rc = ldap_start_tls_s(ld, NULL, NULL))) {
PRErrorCode prerr = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"Unable to do start_tls on connection to %s:%d "
"LDAP error %d:%s NSS error %d:%s\n", hostname, port,
rc, ldap_err2string(rc), prerr,
@@ -479,7 +479,7 @@ cb_get_connection(cb_conn_pool * pool,
++pool->conn.conn_list_count;
if (cb_debug_on()) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"<= cb_get_connection added new conn 0x%p, "
"conn count now %d\n", conn->ld,
pool->conn.conn_list_count );
}
@@ -487,14 +487,14 @@ cb_get_connection(cb_conn_pool * pool,
}
if (cb_debug_on()) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"... cb_get_connection waiting for conn to free up\n" );
}
if (!secure) slapi_wait_condvar( pool->conn.conn_list_cv, NULL );
if (cb_debug_on()) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"... cb_get_connection awake again\n" );
}
}
@@ -505,7 +505,7 @@ unlock_and_return:
*lld=conn->ld;
*cc=conn;
if (cb_debug_on()) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"<== cb_get_connection ld=0x%p (concurrency now
%lu)\n",*lld, conn->refcount );
}
@@ -515,7 +515,7 @@ unlock_and_return:
}
if (cb_debug_on()) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"<== cb_get_connection error %d\n", rc );
}
}
@@ -558,14 +558,14 @@ void cb_release_op_connection(cb_conn_pool* pool, LDAP *lld, int
dispose) {
}
if ( conn == NULL ) { /* ld not found -- unexpected */
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"==> cb_release_op_connection ld=0x%p not found\n", lld );
} else {
--conn->refcount;
if (cb_debug_on()) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"release conn 0x%p status %d refcount after release
%lu\n", conn,
conn->status, conn->refcount );
}
@@ -648,7 +648,7 @@ static void cb_check_for_stale_connections(cb_conn_pool * pool) {
(( connlifetime > 0) && (curtime - conn->opentime >
connlifetime))) {
if ( conn->refcount == 0 ) {
if (cb_debug_on()) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
CB_PLUGIN_SUBSYSTEM,
"cb_check_for_stale_connections: conn 0x%p idle and stale\n",conn);
}
--pool->conn.conn_list_count;
@@ -669,7 +669,7 @@ static void cb_check_for_stale_connections(cb_conn_pool * pool) {
conn->status = CB_CONNSTATUS_STALE;
}
if (cb_debug_on()) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
CB_PLUGIN_SUBSYSTEM,
"cb_check_for_stale_connections: conn 0x%p
stale\n",conn);
}
}
@@ -693,7 +693,7 @@ static void cb_check_for_stale_connections(cb_conn_pool * pool) {
connprev->next=conn->next;
if (cb_debug_on()) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
CB_PLUGIN_SUBSYSTEM,
"cb_check_for_stale_connections: conn 0x%p idle and stale\n",conn);
}
--pool->conn.conn_list_count;
@@ -709,7 +709,7 @@ static void cb_check_for_stale_connections(cb_conn_pool * pool) {
conn->status = CB_CONNSTATUS_STALE;
}
if (cb_debug_on()) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
CB_PLUGIN_SUBSYSTEM,
"cb_check_for_stale_connections: conn 0x%p
stale\n",conn);
}
}
@@ -907,7 +907,7 @@ void cb_update_failed_conn_cpt ( cb_backend_instance *cb ) {
cb->monitor_availability.unavailableTimeLimit = now +
CB_UNAVAILABLE_PERIOD ;
slapi_unlock_mutex(cb->monitor_availability.lock_timeLimit);
cb->monitor_availability.farmserver_state = FARMSERVER_UNAVAILABLE ;
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"cb_update_failed_conn_cpt: Farm server unavailable");
}
@@ -920,7 +920,7 @@ void cb_reset_conn_cpt( cb_backend_instance *cb ) {
cb->monitor_availability.cpt = 0 ;
if (cb->monitor_availability.farmserver_state == FARMSERVER_UNAVAILABLE) {
cb->monitor_availability.farmserver_state = FARMSERVER_AVAILABLE ;
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"cb_reset_conn_cpt: Farm server is back");
}
slapi_unlock_mutex(cb->monitor_availability.cpt_lock);
@@ -942,7 +942,7 @@ int cb_check_availability( cb_backend_instance *cb, Slapi_PBlock *pb )
{
cb_send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL, "FARM SERVER TEMPORARY
UNAVAILABLE", 0, NULL) ;
return FARMSERVER_UNAVAILABLE ;
}
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"cb_check_availability: ping the farm server and check if it's still
unavailable");
if (cb_ping_farm(cb, NULL, 0) != LDAP_SUCCESS) { /* farm still unavailable... Just
change the timelimit */
slapi_lock_mutex(cb->monitor_availability.lock_timeLimit);
@@ -950,7 +950,7 @@ int cb_check_availability( cb_backend_instance *cb, Slapi_PBlock *pb )
{
cb->monitor_availability.unavailableTimeLimit = now + CB_UNAVAILABLE_PERIOD ;
slapi_unlock_mutex(cb->monitor_availability.lock_timeLimit);
cb_send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL, "FARM SERVER TEMPORARY
UNAVAILABLE", 0, NULL) ;
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"cb_check_availability: Farm server still unavailable");
return FARMSERVER_UNAVAILABLE ;
}
diff --git a/ldap/servers/plugins/chainingdb/cb_controls.c
b/ldap/servers/plugins/chainingdb/cb_controls.c
index 85a6dea..8217fd6 100644
--- a/ldap/servers/plugins/chainingdb/cb_controls.c
+++ b/ldap/servers/plugins/chainingdb/cb_controls.c
@@ -158,7 +158,7 @@ int cb_update_controls( Slapi_PBlock * pb,
/* we have to force remote acl checking if the associated backend to this
chaining backend is disabled - disabled == no acl check possible */
if (!cb->local_acl && !cb->associated_be_is_disabled) {
- slapi_log_error( SLAPI_LOG_PLUGIN,CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,CB_PLUGIN_SUBSYSTEM,
"local aci check required to handle proxied auth control. Deny
access.\n");
rc= LDAP_INSUFFICIENT_ACCESS;
break;
@@ -177,7 +177,7 @@ int cb_update_controls( Slapi_PBlock * pb,
slapi_dn_ignore_case(requestorCopy);
if (!strcmp( requestorCopy, rootdn )) { /* UTF8- aware */
- slapi_log_error( SLAPI_LOG_PLUGIN,CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,CB_PLUGIN_SUBSYSTEM,
"Use of user <%s> incompatible with proxied auth.
control\n",
rootdn);
rc = LDAP_UNAVAILABLE_CRITICAL_EXTENSION;
@@ -202,7 +202,7 @@ int cb_update_controls( Slapi_PBlock * pb,
ber = ber_init(&(reqControls[cCount]->ldctl_value));
if (LBER_ERROR == ber_scanf(ber,"i",&hops)) {
- slapi_log_error( SLAPI_LOG_PLUGIN,CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,CB_PLUGIN_SUBSYSTEM,
"Unable to get number of hops from the chaining
control\n");
}
ber_free(ber,1);
@@ -255,7 +255,7 @@ int cb_update_controls( Slapi_PBlock * pb,
if ( slapi_ldap_create_proxyauth_control(ld, proxyDN, isabandon?0:1, 0,
&ctrls[dCount] )) {
ldap_controls_free(ctrls);
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"LDAP_CONTROL_PROXYAUTH control encoding failed.\n");
return LDAP_OPERATIONS_ERROR;
}
diff --git a/ldap/servers/plugins/chainingdb/cb_delete.c
b/ldap/servers/plugins/chainingdb/cb_delete.c
index 03788ea..6cb4bda 100644
--- a/ldap/servers/plugins/chainingdb/cb_delete.c
+++ b/ldap/servers/plugins/chainingdb/cb_delete.c
@@ -86,7 +86,7 @@ chaining_back_delete ( Slapi_PBlock *pb )
if (LDAP_SUCCESS != rc) {
static int warned_get_conn = 0;
if (!warned_get_conn) {
- slapi_log_error(SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"cb_get_connection failed (%d) %s\n",
rc, ldap_err2string(rc));
warned_get_conn = 1;
@@ -123,7 +123,7 @@ chaining_back_delete ( Slapi_PBlock *pb )
* Call the backend preoperation plugins
*/
if((rc = slapi_plugin_call_preop_be_plugins(pb, SLAPI_PLUGIN_DEL_OP))){
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM, "delete (%s): pre betxn
failed, error (%d)\n",dn,rc);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM, "delete (%s): pre
betxn failed, error (%d)\n",dn,rc);
cb_release_op_connection(cb->pool,ld,0);
ldap_controls_free(ctrls);
return -1;
@@ -176,7 +176,7 @@ chaining_back_delete ( Slapi_PBlock *pb )
if ( parse_rc != LDAP_SUCCESS ) {
static int warned_parse_rc = 0;
if (!warned_parse_rc) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"%s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?": ":"",
@@ -197,7 +197,7 @@ chaining_back_delete ( Slapi_PBlock *pb )
struct berval ** refs = referrals2berval(referrals);
static int warned_rc = 0;
if (!warned_rc && error_msg) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"%s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?": ":"",
@@ -219,7 +219,7 @@ chaining_back_delete ( Slapi_PBlock *pb )
/* Call the backend postoperation plugins */
if((rc = slapi_plugin_call_postop_be_plugins(pb, SLAPI_PLUGIN_DEL_OP))){
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM, "delete (%s): post betxn
failed, error (%d)\n",dn,rc);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM, "delete (%s):
post betxn failed, error (%d)\n",dn,rc);
}
/* Add control response sent by the farm server */
diff --git a/ldap/servers/plugins/chainingdb/cb_init.c
b/ldap/servers/plugins/chainingdb/cb_init.c
index 49b8edd..a75f8c9 100644
--- a/ldap/servers/plugins/chainingdb/cb_init.c
+++ b/ldap/servers/plugins/chainingdb/cb_init.c
@@ -117,7 +117,7 @@ chaining_back_init( Slapi_PBlock *pb )
*/
if ( rc != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM, "chaining_back_init
failed\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"chaining_back_init failed\n");
return( -1 );
}
diff --git a/ldap/servers/plugins/chainingdb/cb_instance.c
b/ldap/servers/plugins/chainingdb/cb_instance.c
index c42cb9f..3029e39 100644
--- a/ldap/servers/plugins/chainingdb/cb_instance.c
+++ b/ldap/servers/plugins/chainingdb/cb_instance.c
@@ -502,7 +502,7 @@ cb_parse_instance_config_entry(cb_backend * cb, Slapi_Entry * e)
attrValue = slapi_value_get_berval(sval);
instname = attrValue->bv_val;
} else {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"Malformed backend instance (<%s> missing)>\n",
CB_CONFIG_INSTNAME);
return -1;
}
@@ -609,7 +609,7 @@ cb_instance_config_initialize(cb_backend_instance * inst, Slapi_Entry
* e , int
if (cb_instance_config_set((void *) inst, attr_name,
cb_the_instance_config, bval, err_buf, phase, apply ) != LDAP_SUCCESS) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,"Error with config
attribute %s : %s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,"Error with config
attribute %s : %s\n",
attr_name, err_buf);
rc = -1;
break;
@@ -627,7 +627,7 @@ cb_instance_config_initialize(cb_backend_instance * inst, Slapi_Entry
* e , int
if (LDAP_SUCCESS == rc) {
if (!urlfound) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"Malformed backend instance entry. Mandatory attr <%s>
missing\n",CB_CONFIG_HOSTURL);
rc = -1;
}
@@ -650,7 +650,7 @@ cb_instance_config_initialize(cb_backend_instance * inst, Slapi_Entry
* e , int
if (inst->impersonate && inst->pool && inst->pool->binddn
&&
!strcmp(inst->pool->binddn,rootdn)) { /* UTF8 aware */
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"Error with config attribute %s (%s: forbidden value)\n",
CB_CONFIG_BINDUSER, rootdn);
rc= -1;
}
@@ -1563,7 +1563,7 @@ void cb_instance_config_get(void *arg, cb_instance_config_info
*config, char *bu
}
break;
default:
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"Invalid attribute syntax.\n");
}
@@ -1755,7 +1755,7 @@ int cb_instance_add_config_check_callback(Slapi_PBlock *pb,
Slapi_Entry* e, Slap
instname=attrValue->bv_val;
}
if ( instname == NULL ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"Malformed backend instance (<%s>
missing)>\n", CB_CONFIG_INSTNAME);
*returncode = LDAP_LOCAL_ERROR;
return SLAPI_DSE_CALLBACK_ERROR;
@@ -1768,7 +1768,7 @@ int cb_instance_add_config_check_callback(Slapi_PBlock *pb,
Slapi_Entry* e, Slap
/* the default instance config and the specific entry specified */
if ((rc=cb_build_backend_instance_config(inst,e,0))
!= LDAP_SUCCESS) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"Can't instantiate chaining backend instance
%s.\n",inst->inst_name);
*returncode=rc;
cb_instance_free(inst);
@@ -1811,7 +1811,7 @@ int cb_instance_add_config_callback(Slapi_PBlock *pb, Slapi_Entry*
e, Slapi_Entr
instname=attrValue->bv_val;
}
if ( instname == NULL ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"Malformed backend instance (<%s>
missing)>\n", CB_CONFIG_INSTNAME);
*returncode = LDAP_LOCAL_ERROR;
return SLAPI_DSE_CALLBACK_ERROR;
@@ -1824,7 +1824,7 @@ int cb_instance_add_config_callback(Slapi_PBlock *pb, Slapi_Entry*
e, Slapi_Entr
/* the default instance config and the specific entry specified */
if ((rc=cb_build_backend_instance_config(inst,e,0))
!= LDAP_SUCCESS) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"Can't instantiate chaining backend instance
%s.\n",inst->inst_name);
*returncode=rc;
cb_instance_free(inst);
@@ -1939,7 +1939,7 @@ int cb_create_default_backend_instance_config(cb_backend * cb) {
slapi_add_internal_pb(pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if ( LDAP_SUCCESS != rc ) {
- slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"Add %s failed (%s)\n",defaultDn,ldap_err2string(rc));
}
diff --git a/ldap/servers/plugins/chainingdb/cb_modify.c
b/ldap/servers/plugins/chainingdb/cb_modify.c
index 3eccd04..203a399 100644
--- a/ldap/servers/plugins/chainingdb/cb_modify.c
+++ b/ldap/servers/plugins/chainingdb/cb_modify.c
@@ -64,7 +64,7 @@ chaining_back_modify ( Slapi_PBlock *pb )
dn = slapi_sdn_get_dn(sdn);
if (cb_debug_on()) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,"modify:
target:<%s>\n",dn);
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,"modify:
target:<%s>\n",dn);
}
ctrls = serverctrls = NULL;
@@ -92,7 +92,7 @@ chaining_back_modify ( Slapi_PBlock *pb )
if (LDAP_SUCCESS != rc) {
static int warned_get_conn = 0;
if (!warned_get_conn) {
- slapi_log_error(SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"cb_get_connection failed (%d) %s\n",
rc, ldap_err2string(rc));
warned_get_conn = 1;
@@ -131,7 +131,7 @@ chaining_back_modify ( Slapi_PBlock *pb )
* Call the backend preoperation plugins
*/
if((rc = slapi_plugin_call_preop_be_plugins(pb, SLAPI_PLUGIN_MOD_OP))){
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM, "modify (%s): pre betxn
failed, error (%d)\n",dn,rc);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM, "modify (%s): pre
betxn failed, error (%d)\n",dn,rc);
cb_release_op_connection(cb->pool,ld,0);
ldap_controls_free(ctrls);
return -1;
@@ -185,7 +185,7 @@ chaining_back_modify ( Slapi_PBlock *pb )
if ( parse_rc != LDAP_SUCCESS ) {
static int warned_parse_rc = 0;
if (!warned_parse_rc) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"%s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?": ":"",
@@ -206,7 +206,7 @@ chaining_back_modify ( Slapi_PBlock *pb )
struct berval ** refs = referrals2berval(referrals);
static int warned_rc = 0;
if (!warned_rc && error_msg) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"%s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?": ":"",
@@ -228,7 +228,7 @@ chaining_back_modify ( Slapi_PBlock *pb )
/* Call the backend postoperation plugins */
if((rc = slapi_plugin_call_postop_be_plugins(pb, SLAPI_PLUGIN_MOD_OP))){
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM, "modify (%s): post betxn
failed, error (%d)\n",dn,rc);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM, "modify (%s):
post betxn failed, error (%d)\n",dn,rc);
}
/* Add control response sent by the farm server */
diff --git a/ldap/servers/plugins/chainingdb/cb_modrdn.c
b/ldap/servers/plugins/chainingdb/cb_modrdn.c
index a386745..9211ff3 100644
--- a/ldap/servers/plugins/chainingdb/cb_modrdn.c
+++ b/ldap/servers/plugins/chainingdb/cb_modrdn.c
@@ -97,7 +97,7 @@ chaining_back_modrdn ( Slapi_PBlock *pb )
if (LDAP_SUCCESS != rc) {
static int warned_get_conn = 0;
if (!warned_get_conn) {
- slapi_log_error(SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"cb_get_connection failed (%d) %s\n",
rc, ldap_err2string(rc));
warned_get_conn = 1;
@@ -135,7 +135,7 @@ chaining_back_modrdn ( Slapi_PBlock *pb )
* Call the backend preoperation plugins
*/
if((rc = slapi_plugin_call_preop_be_plugins(pb, SLAPI_PLUGIN_MODRDN_OP))){
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM, "modrdn (%s): pre betxn
failed, error (%d)\n",ndn,rc);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM, "modrdn (%s): pre
betxn failed, error (%d)\n",ndn,rc);
cb_release_op_connection(cb->pool,ld,0);
ldap_controls_free(ctrls);
return -1;
@@ -193,7 +193,7 @@ chaining_back_modrdn ( Slapi_PBlock *pb )
if ( parse_rc != LDAP_SUCCESS ) {
static int warned_parse_rc = 0;
if (!warned_parse_rc) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"%s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?":
":"",
@@ -214,7 +214,7 @@ chaining_back_modrdn ( Slapi_PBlock *pb )
struct berval ** refs = referrals2berval(referrals);
static int warned_rc = 0;
if (!warned_rc && error_msg) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"%s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?":
":"",
@@ -236,7 +236,7 @@ chaining_back_modrdn ( Slapi_PBlock *pb )
/* Call the backend postoperation plugins */
if((rc = slapi_plugin_call_postop_be_plugins(pb, SLAPI_PLUGIN_MODRDN_OP))){
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM, "modrdn (%s): post betxn
failed, error (%d)\n",ndn,rc);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM, "modrdn (%s):
post betxn failed, error (%d)\n",ndn,rc);
}
/* Add control response sent by the farm server */
diff --git a/ldap/servers/plugins/chainingdb/cb_monitor.c
b/ldap/servers/plugins/chainingdb/cb_monitor.c
index 45c65ea..0e7dc43 100644
--- a/ldap/servers/plugins/chainingdb/cb_monitor.c
+++ b/ldap/servers/plugins/chainingdb/cb_monitor.c
@@ -212,7 +212,7 @@ cb_update_monitor_info(Slapi_PBlock * pb, cb_backend_instance *
inst,int op)
inst->monitor.searchsubtreecount++;
break;
default:
- slapi_log_error( SLAPI_LOG_PLUGIN,
CB_PLUGIN_SUBSYSTEM,"cb_update_monitor_info: invalid op type <%d>\n",op);
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
CB_PLUGIN_SUBSYSTEM,"cb_update_monitor_info: invalid op type <%d>\n",op);
}
slapi_unlock_mutex(inst->monitor.mutex);
}
diff --git a/ldap/servers/plugins/chainingdb/cb_schema.c
b/ldap/servers/plugins/chainingdb/cb_schema.c
index 0e5d6ed..50d130a 100644
--- a/ldap/servers/plugins/chainingdb/cb_schema.c
+++ b/ldap/servers/plugins/chainingdb/cb_schema.c
@@ -37,7 +37,7 @@ void cb_eliminate_illegal_attributes(cb_backend_instance * inst,
Slapi_Entry * e
slapi_attr_get_type(attr,&aType);
if (aType &&
slapi_attr_types_equivalent(inst->illegal_attributes[j],aType)) {
tobefreed=aType;
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"attribute <%s> not forwarded.\n",aType);
}
rc = slapi_entry_next_attr(e, attr, &attr);
diff --git a/ldap/servers/plugins/chainingdb/cb_search.c
b/ldap/servers/plugins/chainingdb/cb_search.c
index d4ddf3c..784fe73 100644
--- a/ldap/servers/plugins/chainingdb/cb_search.c
+++ b/ldap/servers/plugins/chainingdb/cb_search.c
@@ -64,7 +64,7 @@ chainingdb_build_candidate_list ( Slapi_PBlock *pb )
if ( LDAP_SUCCESS != (parse_rc=cb_forward_operation(pb) )) {
/* Don't return errors */
if (cb_debug_on()) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"local search: base:<%s> scope:<%s>
filter:<%s>\n",target,
scope==LDAP_SCOPE_SUBTREE?"SUBTREE":scope==LDAP_SCOPE_ONELEVEL ?
"ONE-LEVEL" : "BASE" , filter);
}
@@ -85,7 +85,7 @@ chainingdb_build_candidate_list ( Slapi_PBlock *pb )
}
if (cb_debug_on()) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"chained search: base:<%s> scope:<%s>
filter:<%s>\n",target,
scope==LDAP_SCOPE_SUBTREE ? "SUBTREE": scope==LDAP_SCOPE_ONELEVEL ?
"ONE-LEVEL" : "BASE",
filter);
@@ -183,7 +183,7 @@ chainingdb_build_candidate_list ( Slapi_PBlock *pb )
if (LDAP_SUCCESS != rc) {
static int warned_get_conn = 0;
if (!warned_get_conn) {
- slapi_log_error(SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"cb_get_connection failed (%d) %s\n",
rc, ldap_err2string(rc));
warned_get_conn = 1;
@@ -284,7 +284,7 @@ chainingdb_build_candidate_list ( Slapi_PBlock *pb )
/* Local timeout management */
if (timelimit != -1) {
if (current_time() > endbefore) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"Local timeout expiration\n");
cb_send_ldap_result(pb,LDAP_TIMELIMIT_EXCEEDED,
NULL,NULL, 0, NULL);
@@ -329,7 +329,7 @@ chainingdb_build_candidate_list ( Slapi_PBlock *pb )
if ( parse_rc != LDAP_SUCCESS ) {
static int warned_parse_rc = 0;
if (!warned_parse_rc && error_msg) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"%s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?": ":"",
@@ -342,7 +342,7 @@ chainingdb_build_candidate_list ( Slapi_PBlock *pb )
static int warned_rc = 0;
if (!warned_rc) {
slapi_ldap_get_lderrno( ctx->ld, &matched_msg, &error_msg );
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"%s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?": ":"",
@@ -426,7 +426,7 @@ chainingdb_next_search_entry ( Slapi_PBlock *pb )
/* End of local search */
slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_SET,NULL);
slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_ENTRY,NULL);
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"Unexpected NULL ctx in chainingdb_next_search_entry\n");
return 0;
}
@@ -584,7 +584,7 @@ chainingdb_next_search_entry ( Slapi_PBlock *pb )
/* The server sent one of the entries found by the search */
if ((entry = cb_LDAPMessage2Entry(ctx->ld,res,attrsonly)) == NULL) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,"Invalid entry
received.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,"Invalid
entry received.\n");
slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_SET,NULL);
slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_ENTRY,NULL);
@@ -676,7 +676,7 @@ chainingdb_next_search_entry ( Slapi_PBlock *pb )
if ( parse_rc != LDAP_SUCCESS ) {
static int warned_parse_rc = 0;
if (!warned_parse_rc) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"%s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?":
":"",
@@ -691,7 +691,7 @@ chainingdb_next_search_entry ( Slapi_PBlock *pb )
static int warned_rc = 0;
slapi_ldap_get_lderrno( ctx->ld, &matched_msg, &error_msg );
if (!warned_rc) {
- slapi_log_error( SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"%s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?":
":"",
@@ -722,7 +722,7 @@ chainingdb_next_search_entry ( Slapi_PBlock *pb )
return retcode;
default:
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"chainingdb_next_search_entry:default case.\n");
}
@@ -734,7 +734,7 @@ chainingdb_next_search_entry ( Slapi_PBlock *pb )
int
chaining_back_entry_release ( Slapi_PBlock *pb ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
"chaining_back_entry_release\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"chaining_back_entry_release\n");
return 0;
}
@@ -743,7 +743,7 @@ chaining_back_search_results_release ( void **sr )
{
cb_searchContext *ctx = (cb_searchContext *)(*sr);
- slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"chaining_back_search_results_release\n");
if (ctx->readahead != ctx->tobefreed) {
slapi_entry_free(ctx->readahead);
diff --git a/ldap/servers/plugins/chainingdb/cb_utils.c
b/ldap/servers/plugins/chainingdb/cb_utils.c
index aa24f96..b258e1d 100644
--- a/ldap/servers/plugins/chainingdb/cb_utils.c
+++ b/ldap/servers/plugins/chainingdb/cb_utils.c
@@ -111,7 +111,7 @@ cb_forward_operation(Slapi_PBlock * pb)
slapi_pblock_get (pb, SLAPI_OPERATION, &op);
if (NULL == op) {
- slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM, "No operation is
set.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM, "No operation is
set.\n");
return LDAP_UNWILLING_TO_PERFORM;
}
@@ -133,7 +133,7 @@ cb_forward_operation(Slapi_PBlock * pb)
BerElement *ber = NULL;
if ((ber = ber_init(ctl_value)) == NULL) {
- slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"cb_forward_operation: ber_init: Memory allocation failed");
if (iscritical)
return LDAP_UNAVAILABLE_CRITICAL_EXTENSION; /* RFC
4511 4.1.11 */
@@ -142,7 +142,7 @@ cb_forward_operation(Slapi_PBlock * pb)
}
rc = ber_scanf(ber,"i",&hops);
if (LBER_ERROR == rc) {
- slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"Loop detection control badly encoded.");
ber_free(ber,1);
if (iscritical)
@@ -152,7 +152,7 @@ cb_forward_operation(Slapi_PBlock * pb)
}
if (hops <= 0) {
- slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"Max hop count exceeded. Loop detected.\n");
ber_free(ber,1);
if (iscritical)
@@ -170,14 +170,14 @@ cb_forward_operation(Slapi_PBlock * pb)
slapi_pblock_get (pb, SLAPI_PLUGIN_IDENTITY, &cid);
if ( cid == NULL ) {
/* programming error in the front-end */
- slapi_log_error(SLAPI_LOG_FATAL, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"NULL component identity in an internal operation.");
return LDAP_UNWILLING_TO_PERFORM;
}
pname=cid->sci_component_name;
if (cb_debug_on()) {
- slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
"internal op received from %s component \n",pname ? pname :
"NULL");
}
@@ -352,7 +352,7 @@ cb_be_state_change (void *handle, char *be_name, int old_be_state, int
new_be_st
if (cbinst) {
/* the backend is disabled if the state is not ON */
cbinst->associated_be_is_disabled = (new_be_state != SLAPI_BE_STATE_ON);
- slapi_log_error(SLAPI_LOG_PLUGIN, "chainbe", "cb_be_state_change:
set the "
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "chainbe",
"cb_be_state_change: set the "
"state of chainbe for %s to %d\n",
slapi_sdn_get_dn(cbsuffix), (new_be_state != SLAPI_BE_STATE_ON));
}
diff --git a/ldap/servers/plugins/collation/orfilter.c
b/ldap/servers/plugins/collation/orfilter.c
index 4a22ee3..7404d0f 100644
--- a/ldap/servers/plugins/collation/orfilter.c
+++ b/ldap/servers/plugins/collation/orfilter.c
@@ -977,7 +977,7 @@ orderingRule_init (Slapi_PBlock* pb)
#endif
if ( slapi_pblock_get( pb, SLAPI_CONFIG_DIRECTORY, &cfgpath ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, SLAPI_ORPLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPI_ORPLUGIN_NAME,
"Unable to retrieve slapd configuration pathname; using default\n" );
cfgpath = NULL;
}
diff --git a/ldap/servers/plugins/cos/cos.c b/ldap/servers/plugins/cos/cos.c
index 4a1de56..3b62d4c 100644
--- a/ldap/servers/plugins/cos/cos.c
+++ b/ldap/servers/plugins/cos/cos.c
@@ -33,7 +33,7 @@
/*** from proto-slap.h ***/
-int slapd_log_error_proc( char *subsystem, char *fmt, ... );
+int slapd_log_error_proc( char *subsystem, int sev_level, char *fmt, ... );
/*** end secrets ***/
@@ -103,7 +103,7 @@ cos_postop_init ( Slapi_PBlock *pb )
slapi_pblock_set(pb, SLAPI_PLUGIN_POST_MODIFY_FN, (void *)cos_post_op ) != 0 ||
slapi_pblock_set(pb, SLAPI_PLUGIN_POST_MODRDN_FN, (void *)cos_post_op ) != 0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, COS_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, COS_PLUGIN_SUBSYSTEM,
"cos_postop_init: failed to register plugin\n" );
rc = -1;
}
@@ -126,7 +126,7 @@ cos_internalpostop_init ( Slapi_PBlock *pb )
slapi_pblock_set(pb, SLAPI_PLUGIN_INTERNAL_POST_DELETE_FN,
(void *) cos_post_op ) != 0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, COS_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, COS_PLUGIN_SUBSYSTEM,
"cos_internalpostop_init: failed to register plugin\n" );
rc = -1;
}
@@ -159,7 +159,7 @@ int cos_init( Slapi_PBlock *pb )
slapi_pblock_set(pb, SLAPI_PLUGIN_CLOSE_FN, (void *) cos_close ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION, (void *)&pdesc ) != 0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, COS_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, COS_PLUGIN_SUBSYSTEM,
"cos_init: failed to register plugin\n" );
ret = -1;
goto bailout;
diff --git a/ldap/servers/plugins/cos/cos_cache.c b/ldap/servers/plugins/cos/cos_cache.c
index 45439b9..6c04a1e 100644
--- a/ldap/servers/plugins/cos/cos_cache.c
+++ b/ldap/servers/plugins/cos/cos_cache.c
@@ -93,7 +93,7 @@ int config_get_schemacheck(void);
void oc_lock_read( void );
void oc_unlock( void );
struct objclass* g_get_global_oc_nolock(void);
-int slapd_log_error_proc( char *subsystem, char *fmt, ... );
+int slapd_log_error_proc( char *subsystem, int sev_level, char *fmt, ... );
/* defined in cos.c */
void * cos_get_plugin_identity(void);
@@ -308,7 +308,7 @@ int cos_cache_init(void)
start_cond == NULL ||
something_changed == NULL)
{
- slapi_log_error( SLAPI_LOG_FATAL, COS_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, COS_PLUGIN_SUBSYSTEM,
"cos_cache_init: cannot create mutexes\n" );
ret = -1;
goto out;
@@ -326,7 +326,7 @@ int cos_cache_init(void)
cos_cache_vattr_compare,
cos_cache_vattr_types) != 0)
{
- slapi_log_error( SLAPI_LOG_FATAL, COS_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, COS_PLUGIN_SUBSYSTEM,
"cos_cache_init: cannot register as service provider\n" );
ret = -1;
goto out;
@@ -340,7 +340,7 @@ int cos_cache_init(void)
PR_UNJOINABLE_THREAD,
SLAPD_DEFAULT_THREAD_STACKSIZE) == NULL )
{
- slapi_log_error( SLAPI_LOG_FATAL, COS_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, COS_PLUGIN_SUBSYSTEM,
"cos_cache_init: PR_CreateThread failed\n" );
ret = -1;
goto out;
@@ -869,7 +869,7 @@ cos_dn_defs_cb (Slapi_Entry* e, void *callback_data)
parent = slapi_create_dn_string("%s", orig);
if (!parent) {
parent = orig;
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"cos_dn_defs_cb: "
"failed to normalize parent dn %s. "
"Adding the pre normalized dn.\n",
@@ -886,18 +886,18 @@ cos_dn_defs_cb (Slapi_Entry* e, void *callback_data)
}
slapi_ch_free_string(&orig);
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"cos_dn_defs_cb: "
"failed to get parent dn of cos definition %s.\n",
pDn->val);
if (!pCosTemplateDn) {
if (!pCosTargetTree) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "cosTargetTree and cosTemplateDn are not
set.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "cosTargetTree and cosTemplateDn are
not set.\n");
} else {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "cosTemplateDn is not set.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "cosTemplateDn is not set.\n");
}
} else if (!pCosTargetTree) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "cosTargetTree is not set.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "cosTargetTree is not set.\n");
}
}
}
@@ -3306,7 +3306,7 @@ void cos_cache_change_notify(Slapi_PBlock *pb)
/* need to work out if a cache rebuild is necessary */
if(slapi_pblock_get( pb, SLAPI_TARGET_SDN, &sdn )) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "cos_cache_change_notify: "
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_change_notify: "
"failed to get dn of changed entry\n");
goto bail;
}
@@ -3361,7 +3361,7 @@ void cos_cache_change_notify(Slapi_PBlock *pb)
* stays lean in the face of errors.
*/
if( !do_update && cos_cache_template_index_bsearch(dn)) {
- LDAPDebug1Arg(LDAP_DEBUG_PLUGIN, "cos_cache_change_notify: "
+ LDAPDebug1Arg(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos_cache_change_notify: "
"updating due to indirect template change(%s)\n", dn);
do_update = 1;
}
@@ -3568,14 +3568,14 @@ static int cos_cache_entry_is_cos_related( Slapi_Entry *e) {
Slapi_Attr *pObjclasses = NULL;
if ( e == NULL ) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "cos_cache_change_notify: "
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_change_notify: "
"modified entry is NULL--updating cache just in case\n");
rc = 1;
} else {
if(slapi_entry_attr_find( e, "objectclass", &pObjclasses ))
{
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "cos_cache_change_notify: "
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_change_notify: "
" failed to get objectclass from %s\n",
slapi_entry_get_dn(e));
rc = 0;
diff --git a/ldap/servers/plugins/deref/deref.c b/ldap/servers/plugins/deref/deref.c
index 76c7af3..ab61a26 100644
--- a/ldap/servers/plugins/deref/deref.c
+++ b/ldap/servers/plugins/deref/deref.c
@@ -157,7 +157,7 @@ deref_init(Slapi_PBlock *pb)
int status = 0;
char *plugin_identity = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
"--> deref_init\n");
/* Store the plugin identity for later use.
@@ -181,7 +181,7 @@ deref_init(Slapi_PBlock *pb)
(void *) deref_pre_entry) != 0 ||
deref_register_operation_extension()
) {
- slapi_log_error(SLAPI_LOG_FATAL, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DEREF_PLUGIN_SUBSYSTEM,
"deref_init: failed to register plugin\n");
status = -1;
}
@@ -190,7 +190,7 @@ deref_init(Slapi_PBlock *pb)
slapi_register_supported_control(LDAP_CONTROL_X_DEREF, SLAPI_OPERATION_SEARCH);
}
- slapi_log_error(SLAPI_LOG_TRACE, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
"<-- deref_init\n");
return status;
}
@@ -204,13 +204,13 @@ deref_init(Slapi_PBlock *pb)
static int
deref_start(Slapi_PBlock * pb)
{
- slapi_log_error(SLAPI_LOG_TRACE, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
"--> deref_start\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
"linked attributes plug-in: ready for service\n");
- slapi_log_error(SLAPI_LOG_TRACE, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
"<-- deref_start\n");
return 0;
@@ -224,10 +224,10 @@ deref_start(Slapi_PBlock * pb)
static int
deref_close(Slapi_PBlock * pb)
{
- slapi_log_error(SLAPI_LOG_TRACE, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
"--> deref_close\n");
- slapi_log_error(SLAPI_LOG_TRACE, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
"<-- deref_close\n");
return 0;
@@ -414,7 +414,7 @@ deref_pre_search(Slapi_PBlock *pb)
int ii;
int iscritical = 0;
- slapi_log_error(SLAPI_LOG_TRACE, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
"--> deref_pre_search\n");
/* see if the deref request control is in the list of
@@ -424,25 +424,25 @@ deref_pre_search(Slapi_PBlock *pb)
const LDAPControl *ctrl = reqctrls[ii];
if (!strcmp(ctrl->ldctl_oid, LDAP_CONTROL_X_DEREF)) {
if (derefctrl) { /* already specified */
- slapi_log_error(SLAPI_LOG_FATAL, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DEREF_PLUGIN_SUBSYSTEM,
"The dereference control was specified more than
once - it must be specified only once in the search request\n");
ldapcode = LDAP_PROTOCOL_ERROR;
ldaperrtext = "The dereference control cannot be specified more than
once";
derefctrl = NULL;
} else if (!ctrl->ldctl_value.bv_len) {
- slapi_log_error(SLAPI_LOG_FATAL, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DEREF_PLUGIN_SUBSYSTEM,
"No control value specified for dereference
control\n");
ldapcode = LDAP_PROTOCOL_ERROR;
ldaperrtext = "The dereference control must have a value";
iscritical = ctrl->ldctl_iscritical;
} else if (!ctrl->ldctl_value.bv_val) {
- slapi_log_error(SLAPI_LOG_FATAL, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DEREF_PLUGIN_SUBSYSTEM,
"No control value specified for dereference
control\n");
ldapcode = LDAP_PROTOCOL_ERROR;
ldaperrtext = "The dereference control must have a value";
iscritical = ctrl->ldctl_iscritical;
} else if (!ctrl->ldctl_value.bv_val[0] || !ctrl->ldctl_value.bv_len)
{
- slapi_log_error(SLAPI_LOG_FATAL, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DEREF_PLUGIN_SUBSYSTEM,
"Empty control value specified for dereference
control\n");
ldapcode = LDAP_PROTOCOL_ERROR;
ldaperrtext = "The dereference control must have a non-empty
value";
@@ -457,7 +457,7 @@ deref_pre_search(Slapi_PBlock *pb)
}
if (derefctrl && incompatible) {
- slapi_log_error(SLAPI_LOG_FATAL, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DEREF_PLUGIN_SUBSYSTEM,
"Cannot use the dereference control and control [%s] for the
same search operation\n",
incompatible);
/* not sure if this is a hard failure - the current spec says:
@@ -495,7 +495,7 @@ deref_pre_search(Slapi_PBlock *pb)
deref_set_operation_extension(pb, speclist);
}
- slapi_log_error(SLAPI_LOG_TRACE, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
"<-- deref_pre_op\n");
return ldapcode;
@@ -529,7 +529,7 @@ deref_check_access(Slapi_PBlock *pb, const Slapi_Entry *ent, const
char *entdn,
/* first, check access control - see if client can read the requested attribute
*/
int ret = slapi_access_allowed(pb, etest, (char *)attrname, NULL, rights);
if (ret != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
"The client does not have permission to read attribute
%s in entry %s\n",
attrname, slapi_entry_get_dn_const(etest));
} else {
@@ -589,7 +589,7 @@ deref_do_deref_attr(Slapi_PBlock *pb, BerElement *ctrlber, const char
*derefdn,
if (entries) {
if (entries[1]) {
/* too many entries */
- slapi_log_error(SLAPI_LOG_PLUGIN, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
"More than one entry matching DN [%s]\n",
derefdn);
} else {
@@ -597,7 +597,7 @@ deref_do_deref_attr(Slapi_PBlock *pb, BerElement *ctrlber, const char
*derefdn,
int needattrvals = 1; /* need attrvals sequence? */
if (deref_check_access(pb, entries[0], derefdn, attrs, &retattrs,
(SLAPI_ACL_SEARCH|SLAPI_ACL_READ))) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
"The client does not have permission to read the
requested "
"attributes in entry %s\n", derefdn);
} else {
@@ -615,7 +615,7 @@ deref_do_deref_attr(Slapi_PBlock *pb, BerElement *ctrlber, const char
*derefdn,
#if defined(USE_OLD_UNHASHED)
if (is_type_forbidden(retattrs[ii])) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
DEREF_PLUGIN_SUBSYSTEM,
"skip forbidden attribute [%s]\n", derefdn);
continue;
}
@@ -663,12 +663,12 @@ deref_do_deref_attr(Slapi_PBlock *pb, BerElement *ctrlber, const
char *derefdn,
}
}
} else { /* nothing */
- slapi_log_error(SLAPI_LOG_PLUGIN, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
"No entries matching [%s]\n", derefdn);
}
} else {
/* handle error */
- slapi_log_error(SLAPI_LOG_PLUGIN, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
"Could not read entry with DN [%s]: error %d:%s\n",
derefdn, rc, ldap_err2string(rc));
}
@@ -715,7 +715,7 @@ deref_pre_entry(Slapi_PBlock *pb)
if (deref_check_access(pb, ent, NULL, attrs, &retattrs,
(SLAPI_ACL_SEARCH|SLAPI_ACL_READ))) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
"The client does not have permission to read attribute
%s in entry %s\n",
spec->derefattr, slapi_entry_get_dn_const(ent));
continue;
diff --git a/ldap/servers/plugins/dna/dna.c b/ldap/servers/plugins/dna/dna.c
index c766dd1..c0c3676 100644
--- a/ldap/servers/plugins/dna/dna.c
+++ b/ldap/servers/plugins/dna/dna.c
@@ -438,7 +438,7 @@ dna_init(Slapi_PBlock *pb)
int preadd = SLAPI_PLUGIN_BE_PRE_ADD_FN;
int premod = SLAPI_PLUGIN_BE_PRE_MODIFY_FN;
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"--> dna_init\n");
/**
@@ -460,7 +460,7 @@ dna_init(Slapi_PBlock *pb)
(void *) &pdesc) != 0 ||
slapi_pblock_set(pb, premod, (void *) dna_mod_pre_op) != 0 ||
slapi_pblock_set(pb, preadd, (void *) dna_add_pre_op) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_init: failed to register plugin\n");
status = DNA_FAILURE;
}
@@ -476,7 +476,7 @@ dna_init(Slapi_PBlock *pb)
NULL, /* ? */
plugin_identity /* access control */
)) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_init: failed to register postop plugin\n");
status = DNA_FAILURE;
}
@@ -493,7 +493,7 @@ dna_init(Slapi_PBlock *pb)
plugin_identity /* access control */
)
) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_init: failed to register plugin\n");
status = DNA_FAILURE;
}
@@ -510,13 +510,13 @@ dna_init(Slapi_PBlock *pb)
NULL, /* ? */
plugin_identity /* access control */
)) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_init: failed to register be_txn_pre_op
plugin\n");
status = DNA_FAILURE;
}
}
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_init\n");
return status;
}
@@ -537,7 +537,7 @@ dna_postop_init(Slapi_PBlock *pb)
slapi_pblock_set(pb, mdnfn, (void *) dna_config_check_post_op) != 0 ||
slapi_pblock_set(pb, delfn, (void *) dna_config_check_post_op) != 0 ||
slapi_pblock_set(pb, modfn, (void *) dna_config_check_post_op) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_postop_init: failed to register plugin\n");
status = DNA_FAILURE;
}
@@ -561,7 +561,7 @@ dna_exop_init(Slapi_PBlock * pb)
(void *) dna_extend_exop) != 0 ||
slapi_pblock_set(pb, SLAPI_PLUGIN_EXT_OP_BACKEND_FN,
(void *) dna_extend_exop_backend) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_exop_init: failed to register plugin\n");
status = DNA_FAILURE;
}
@@ -577,7 +577,7 @@ dna_be_txn_preop_init(Slapi_PBlock *pb){
slapi_pblock_set(pb, SLAPI_PLUGIN_DESCRIPTION, (void *) &pdesc) != 0 ||
slapi_pblock_set(pb, SLAPI_PLUGIN_BE_TXN_PRE_ADD_FN, (void
*)dna_be_txn_add_pre_op) != 0 ||
slapi_pblock_set(pb, SLAPI_PLUGIN_BE_TXN_PRE_MODIFY_FN, (void
*)dna_be_txn_mod_pre_op) != 0){
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_init: failed to register be_txn_pre_op
plugin\n");
status = DNA_FAILURE;
}
@@ -597,19 +597,19 @@ dna_start(Slapi_PBlock * pb)
Slapi_DN *pluginsdn = NULL;
const char *plugindn = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"--> dna_start\n");
g_dna_cache_lock = slapi_new_rwlock();
if (!g_dna_cache_lock) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_start: global config lock creation failed\n");
return DNA_FAILURE;
}
g_dna_cache_server_lock = slapi_new_rwlock();
if (!g_dna_cache_server_lock) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_start: global server lock creation failed\n");
return DNA_FAILURE;
}
@@ -621,12 +621,12 @@ dna_start(Slapi_PBlock * pb)
*/
slapi_pblock_get(pb, SLAPI_TARGET_SDN, &pluginsdn);
if (NULL == pluginsdn || 0 == slapi_sdn_get_ndn_len(pluginsdn)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"dna_start: had to use hard coded config dn\n");
plugindn = DNA_DN;
} else {
plugindn = slapi_sdn_get_dn(pluginsdn);
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"dna_start: config at %s\n", plugindn);
}
@@ -637,7 +637,7 @@ dna_start(Slapi_PBlock * pb)
* in case shared config is enabled for any of the
* ranges we are managing. */
if (dna_load_host_port() != DNA_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_start: unable to load host and port
information\n");
}
@@ -649,7 +649,7 @@ dna_start(Slapi_PBlock * pb)
PR_INIT_CLIST(dna_global_config);
if (dna_load_plugin_config(pb, 1/* use eventq */) != DNA_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_start: unable to load plug-in configuration\n");
return DNA_FAILURE;
}
@@ -658,14 +658,14 @@ dna_start(Slapi_PBlock * pb)
* Load all shared server configs
*/
if (dna_load_shared_servers() ) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_start: shared config server initialization
failed.\n");
return DNA_FAILURE;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"dna: ready for service\n");
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_start\n");
return DNA_SUCCESS;
@@ -679,7 +679,7 @@ dna_start(Slapi_PBlock * pb)
static int
dna_close(Slapi_PBlock * pb)
{
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"--> dna_close\n");
slapi_eq_cancel(eq_ctx);
@@ -696,7 +696,7 @@ dna_close(Slapi_PBlock * pb)
slapi_ch_free_string(&portnum);
slapi_ch_free_string(&secureportnum);
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_close\n");
return DNA_SUCCESS;
@@ -710,20 +710,20 @@ dna_parse_exop_ber(Slapi_PBlock *pb, char **shared_dn)
struct berval *reqdata = NULL;
BerElement *tmp_bere = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"----> dna_parse_exop_ber\n");
/* Fetch the request OID */
slapi_pblock_get(pb, SLAPI_EXT_OP_REQ_OID, &oid);
if (!oid) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_exop_ber: Unable to retrieve request
OID.\n");
goto out;
}
/* Make sure the request OID is correct. */
if (strcmp(oid, DNA_EXTEND_EXOP_REQUEST_OID) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_exop_ber: Received incorrect request
OID.\n");
goto out;
}
@@ -731,7 +731,7 @@ dna_parse_exop_ber(Slapi_PBlock *pb, char **shared_dn)
/* Fetch the request data */
slapi_pblock_get(pb, SLAPI_EXT_OP_REQ_VALUE, &reqdata);
if (!BV_HAS_DATA(reqdata)) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_exop_ber: No request data received.\n");
goto out;
}
@@ -755,7 +755,7 @@ out:
tmp_bere = NULL;
}
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"<---- dna_parse_exop_ber %s\n", *shared_dn);
return ret;
}
@@ -858,7 +858,7 @@ dna_load_plugin_config(Slapi_PBlock *pb, int use_eventq)
Slapi_PBlock *search_pb;
Slapi_Entry **entries = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"--> dna_load_plugin_config %s\n",
use_eventq?"using event queue":"");
@@ -911,7 +911,7 @@ dna_load_plugin_config(Slapi_PBlock *pb, int use_eventq)
cleanup:
slapi_free_search_results_internal(search_pb);
slapi_pblock_destroy(search_pb);
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_load_plugin_config\n");
return status;
@@ -940,7 +940,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int apply)
int ret = DNA_SUCCESS;
char **plugin_attr_values;
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"--> dna_parse_config_entry\n");
/* If this is the main DNA plug-in
@@ -957,12 +957,12 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
entry->dn = slapi_ch_strdup(value);
}
- slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"----------> dn [%s]\n", entry->dn);
entry->types = slapi_entry_attr_get_charray(e, DNA_TYPE);
if (entry->types == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: The %s config "
"setting is required for range %s.\n",
DNA_TYPE, entry->dn);
@@ -972,14 +972,14 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
for (i = 0; entry->types && entry->types[i]; i++) {
if (!slapi_attr_syntax_exists(entry->types[i])){
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: dnaType (%s) does "
"not exist.\n",
entry->types[i]);
ret = DNA_FAILURE;
goto bail;
}
- slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"----------> %s [%s]\n", DNA_TYPE,
entry->types[i]);
}
@@ -988,7 +988,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int apply)
entry->nextval = strtoull(value, 0, 0);
slapi_ch_free_string(&value);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: The %s config "
"setting is required for range %s.\n",
DNA_NEXTVAL, entry->dn);
@@ -996,7 +996,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int apply)
goto bail;
}
- slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"----------> %s [%" NSPRIu64 "]\n",
DNA_NEXTVAL,
entry->nextval);
@@ -1012,7 +1012,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
slapi_ch_free_string(&value);
}
- slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"----------> %s [%s]\n", DNA_PREFIX, entry->prefix);
/* Set the default interval to 1 */
@@ -1025,14 +1025,14 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
slapi_ch_free_string(&value);
}
- slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"----------> %s [%" NSPRIu64 "]\n",
DNA_INTERVAL, entry->interval);
#endif
value = slapi_entry_attr_get_charptr(e, DNA_GENERATE);
if (value) {
entry->generate = value;
- slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"----------> %s [%s]\n", DNA_GENERATE,
entry->generate);
}
@@ -1040,14 +1040,14 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
if (value) {
entry->filter = value;
if (NULL == (entry->slapi_filter = slapi_str2filter(value))) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM ,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM ,
"Error: Invalid search filter in entry [%s]: [%s]\n",
entry->dn, value);
ret = DNA_FAILURE;
goto bail;
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: The %s config "
"setting is required for range %s.\n",
DNA_FILTER, entry->dn);
@@ -1055,7 +1055,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
goto bail;
}
- slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"----------> %s [%s]\n", DNA_FILTER, value);
value = slapi_entry_attr_get_charptr(e, DNA_SCOPE);
@@ -1070,7 +1070,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
* RDN elements to still work. */
test_dn = slapi_sdn_new_dn_byref(value);
if (slapi_dn_syntax_check(NULL, (char *)slapi_sdn_get_ndn(test_dn), 1) == 1) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"Error: Invalid DN used as scope in entry [%s]: [%s]\n",
entry->dn, value);
ret = DNA_FAILURE;
@@ -1079,7 +1079,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
}
slapi_sdn_free(&test_dn);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: The %s config "
"config setting is required for range %s.\n",
DNA_SCOPE, entry->dn);
@@ -1087,7 +1087,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
goto bail;
}
- slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"----------> %s [%s]\n", DNA_SCOPE, entry->scope);
plugin_attr_values = slapi_entry_attr_get_charray(e, DNA_EXCLUDE_SCOPE);
@@ -1101,7 +1101,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
/* Copy them in the config at the condition they are valid DN */
for (i = 0; plugin_attr_values[i]; i++) {
if (slapi_dn_syntax_check(NULL, plugin_attr_values[i], 1) == 1) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"Error: Ignoring invalid DN used as excluded scope:
[%s]\n", plugin_attr_values[i]);
slapi_ch_free_string(&plugin_attr_values[i]);
} else {
@@ -1111,7 +1111,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
slapi_ch_free((void**) &plugin_attr_values);
}
for (i = 0; entry->excludescope && entry->excludescope[i]; i++) {
- slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"----------> %s[%d] [%s]\n", DNA_EXCLUDE_SCOPE, i,
slapi_sdn_get_dn(entry->excludescope[i]));
}
@@ -1125,7 +1125,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
entry->maxval = -1;
}
- slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"----------> %s [%" NSPRIu64 "]\n",
DNA_MAXVAL,
entry->maxval);
@@ -1137,7 +1137,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
sdn = slapi_sdn_new_dn_passin(value);
if (!sdn) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: Unable to create "
"slapi_dn from dnaRemoteBindDN (%s)\n", value);
ret = DNA_FAILURE;
@@ -1146,7 +1146,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
}
normdn = (char *)slapi_sdn_get_dn(sdn);
if (NULL == normdn) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: failed to normalize dn: "
"%s\n", value);
ret = DNA_FAILURE;
@@ -1162,7 +1162,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
/* validate that we have both a bind dn or password, or we have none */
if((entry->remote_bindpw != NULL && entry->remote_binddn == NULL) ||
(entry->remote_binddn != NULL && entry->remote_bindpw == NULL)){
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: Invalid remote bind DN and password
settings.\n");
ret = DNA_FAILURE;
goto bail;
@@ -1178,7 +1178,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
sdn = slapi_sdn_new_dn_passin(value);
if (!sdn) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: Unable to create "
"slapi_dn (%s)\n", value);
ret = DNA_FAILURE;
@@ -1194,7 +1194,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
if (!shared_e) {
/* We didn't locate the shared config container entry. Log
* a message and skip this config entry. */
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: Unable to locate "
"shared configuration entry (%s)\n", value);
ret = DNA_FAILURE;
@@ -1207,7 +1207,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
normdn = (char *)slapi_sdn_get_dn(sdn);
if (NULL == normdn) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: failed to normalize dn: "
"%s\n", value);
ret = DNA_FAILURE;
@@ -1223,7 +1223,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
hostname, DNA_PORTNUM, portnum,
entry->shared_cfg_base);
if (NULL == normdn) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: failed to create dn: "
"%s=%s+%s=%s,%s", DNA_HOSTNAME,
hostname, DNA_PORTNUM, portnum, value);
@@ -1232,7 +1232,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
}
entry->shared_cfg_dn = normdn;
- slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"----------> %s [%s]\n", DNA_SHARED_CFG_DN,
entry->shared_cfg_base);
}
@@ -1241,12 +1241,12 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
if (value) {
entry->threshold = strtoull(value, 0, 0);
- slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"----------> %s [%s]\n", DNA_THRESHOLD, value);
if (entry->threshold <= 0) {
entry->threshold = 1;
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"----------> %s too low, setting to [%s]\n",
DNA_THRESHOLD, value);
}
@@ -1255,7 +1255,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
entry->threshold = 1;
}
- slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"----------> %s [%" NSPRIu64 "]\n",
DNA_THRESHOLD,
entry->threshold);
@@ -1267,7 +1267,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
entry->timeout = DNA_DEFAULT_TIMEOUT;
}
- slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"----------> %s [%" NSPRIu64 "]\n",
DNA_RANGE_REQUEST_TIMEOUT,
entry->timeout);
@@ -1284,7 +1284,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
/* validate that upper is greater than lower */
if (entry->next_range_upper <= entry->next_range_lower) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: Illegal %s "
"setting specified for range %s. Legal "
"format is <lower>-<upper>.\n",
@@ -1300,7 +1300,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
(entry->next_range_upper >= entry->nextval)) ||
((entry->next_range_lower <= entry->maxval) &&
(entry->next_range_lower >= entry->nextval))) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: Illegal %s "
"setting specified for range %s. %s "
"overlaps with the active range.\n",
@@ -1310,7 +1310,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
entry->next_range_upper = 0;
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: Illegal %s "
"setting specified for range %s. Legal "
"format is <lower>-<upper>.\n",
@@ -1342,7 +1342,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
/* create the new value lock for this range */
entry->lock = slapi_new_mutex();
if (!entry->lock) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: Unable to create lock "
"for range %s.\n", entry->dn);
ret = DNA_FAILURE;
@@ -1354,7 +1354,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
if (entry->slapi_filter) {
ret = slapi_vattr_filter_test(pb, e, entry->slapi_filter, 0);
if (LDAP_SUCCESS == ret) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: "
"Error: shared config entry (%s) matches scope
\"%s\", and filter \"%s\" "
"of the DNA config entry (%s).\n",
entry->shared_cfg_base,
entry->scope, entry->filter, entry->dn);
@@ -1378,7 +1378,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
if (slapi_dn_issuffix(entry->scope, config_entry->scope)) {
PR_INSERT_BEFORE(&(entry->list), list);
- slapi_log_error(SLAPI_LOG_CONFIG,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG,
DNA_PLUGIN_SUBSYSTEM,
"store [%s] before [%s] \n", entry->scope,
config_entry->scope);
@@ -1391,7 +1391,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
if (dna_global_config == list) {
/* add to tail */
PR_INSERT_BEFORE(&(entry->list), list);
- slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"store [%s] at tail\n", entry->scope);
entry_added = 1;
break;
@@ -1400,7 +1400,7 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int
apply)
} else {
/* first entry */
PR_INSERT_LINK(&(entry->list), dna_global_config);
- slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"store [%s] at head \n", entry->scope);
entry_added = 1;
}
@@ -1409,7 +1409,7 @@ bail:
if (0 == entry_added) {
/* Don't log error if we weren't asked to apply config */
if ((apply != 0) && (entry != NULL)) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: Invalid config entry "
"[%s] skipped\n", entry->dn);
}
@@ -1418,7 +1418,7 @@ bail:
ret = DNA_SUCCESS;
}
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_parse_config_entry\n");
return ret;
@@ -1434,7 +1434,7 @@ dna_free_config_entry(struct configEntry ** entry)
e = *entry;
if (e->dn) {
- slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"freeing config entry [%s]\n", e->dn);
slapi_ch_free_string(&e->dn);
}
@@ -1528,7 +1528,7 @@ dna_load_host_port(void)
Slapi_DN *config_dn = NULL;
char *attrs[4];
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"--> dna_load_host_port\n");
attrs[0] = "nsslapd-localhost";
@@ -1553,7 +1553,7 @@ dna_load_host_port(void)
status = DNA_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_load_host_port\n");
return status;
@@ -1627,13 +1627,13 @@ dna_update_config_event(time_t event_time, void *arg)
slapi_back_transaction_commit(dna_pb);
} else {
if (slapi_back_transaction_abort(dna_pb) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
"dna_update_config_event: failed to abort transaction!\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
DNA_PLUGIN_SUBSYSTEM, "dna_update_config_event: failed to abort
transaction!\n");
}
}
slapi_pblock_destroy(dna_pb);
slapi_pblock_init(pb);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_update_config_event: failed to start
transaction\n");
}
}
@@ -1686,7 +1686,7 @@ static int dna_fix_maxval(struct configEntry *config_entry,
if (config_entry->next_range_lower != 0) {
ret = dna_activate_next_range(config_entry);
if (ret != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_fix_maxval: Unable to activate the "
"next range for range %s.\n",
config_entry->dn);
}
@@ -1759,7 +1759,7 @@ dna_notice_allocation(struct configEntry *config_entry, PRUint64
new,
if (config_entry->next_range_lower != 0) {
/* Make the next range active */
if (dna_activate_next_range(config_entry) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_notice_allocation: Unable to activate "
"the next range for range %s.\n",
config_entry->dn);
}
@@ -1817,7 +1817,7 @@ dna_get_shared_servers(struct configEntry *config_entry, PRCList
**servers, int
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &ret);
if (LDAP_SUCCESS != ret) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_get_shared_servers: search failed for shared "
"config: %s [error %d]\n",
config_entry->shared_cfg_base,
ret);
@@ -1861,7 +1861,7 @@ dna_get_shared_servers(struct configEntry *config_entry, PRCList
**servers, int
if (!server->host || (server->port == 0 &&
server->secureport == 0))
{
/* free and skip this one */
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"dna_get_shared_servers: skipping invalid
"
"shared config entry (%s)\n",
slapi_entry_get_dn(entries[i]));
dna_free_shared_server(&server);
@@ -1891,7 +1891,7 @@ dna_get_shared_servers(struct configEntry *config_entry, PRCList
**servers, int
}
}
if(err){
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
DNA_PLUGIN_SUBSYSTEM,
"dna_get_shared_servers: skipping invalid
"
"shared config entry (%s). Reason:
%s\n",
slapi_entry_get_dn(entries[i]), reason);
@@ -1986,7 +1986,7 @@ static int dna_request_range(struct configEntry *config_entry,
slapi_lock_mutex(config_entry->extend_lock);
if (config_entry->extend_in_progress) {
/* We're already processing a range extention, so bail. */
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"dna_request_range: Already processing a "
"range extension request. Skipping request.\n");
slapi_unlock_mutex(config_entry->extend_lock);
@@ -2002,21 +2002,21 @@ static int dna_request_range(struct configEntry *config_entry,
if (dna_get_replica_bind_creds(config_entry->shared_cfg_base, server,
&bind_dn, &bind_passwd, &bind_method,
&is_ssl, &port) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_request_range: Unable to retrieve "
"replica bind credentials.\n");
goto bail;
}
if ((request = dna_create_range_request(config_entry->shared_cfg_base)) == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_request_range: Failed to create "
"range extension extended operation request.\n");
goto bail;
}
if ((ld = slapi_ldap_init(server->host, port, is_ssl, 0)) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_request_range: Unable to "
"initialize LDAP session to server %s:%u.\n",
server->host, server->port);
@@ -2039,7 +2039,7 @@ static int dna_request_range(struct configEntry *config_entry,
NULL, NULL, NULL, NULL);
if (ret != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"dna_request_range: Error binding "
" to replica server %s:%u. [error %d]\n",
server->host, server->port, ret);
@@ -2051,7 +2051,7 @@ static int dna_request_range(struct configEntry *config_entry,
request, NULL, NULL, &retoid, &responsedata);
if (ret != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_request_range: Error sending "
"range extension extended operation request "
"to server %s:%u [error %d]\n", server->host,
@@ -2062,7 +2062,7 @@ static int dna_request_range(struct configEntry *config_entry,
/* Verify that the OID is correct. */
if (strcmp(retoid, DNA_EXTEND_EXOP_RESPONSE_OID) != 0) {
ret = LDAP_OPERATIONS_ERROR;
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_request_range: Received incorrect response
OID.\n");
goto bail;
}
@@ -2120,21 +2120,21 @@ static struct berval *dna_create_range_request(char *range_dn)
shared_dn.bv_len = strlen(shared_dn.bv_val);
if((ber = ber_alloc()) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_create_range_request: Error "
"allocating request data.\n");
goto bail;
}
if (LBER_ERROR == (ber_printf(ber, "{o}", shared_dn.bv_val,
shared_dn.bv_len))) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_create_range_request: Error "
"encoding request data.\n");
goto bail;
}
if (ber_flatten(ber, &requestdata) == -1) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_create_range_request: Error "
"encoding request data.\n");
goto bail;
@@ -2153,17 +2153,17 @@ bail:
static char *dna_get_dn(Slapi_PBlock * pb)
{
Slapi_DN *sdn = 0;
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"--> dna_get_dn\n");
if (slapi_pblock_get(pb, SLAPI_TARGET_SDN, &sdn)) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_get_dn: failed to get dn of changed entry");
goto bail;
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_get_dn\n");
return (char *)slapi_sdn_get_dn(sdn);
@@ -2176,14 +2176,14 @@ static int dna_dn_is_config(char *dn)
{
int ret = 0;
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"--> dna_is_config %s\n", dn);
if (slapi_dn_issuffix(dn, getPluginDN())) {
ret = 1;
}
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_is_config\n");
return ret;
@@ -2454,7 +2454,7 @@ static int dna_get_next_value(struct configEntry *config_entry,
PRUint64 nextval = 0;
int ret;
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"--> dna_get_next_value\n");
/* get the lock to prevent contention with other threads over
@@ -2473,7 +2473,7 @@ static int dna_get_next_value(struct configEntry *config_entry,
* while within a transaction. */
ret = dna_fix_maxval(config_entry, 1 /* skip range transfer request */ );
if (LDAP_SUCCESS != ret) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_get_next_value: no more values
available!!\n");
goto done;
}
@@ -2484,7 +2484,7 @@ static int dna_get_next_value(struct configEntry *config_entry,
goto done;
} else {
/* dna_first_free_value() failed for some unknown reason */
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_get_next_value: failed to allocate a new
ID!!\n");
goto done;
}
@@ -2540,7 +2540,7 @@ static int dna_get_next_value(struct configEntry *config_entry,
slapi_pblock_destroy(pb);
}
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_get_next_value\n");
return ret;
@@ -2673,7 +2673,7 @@ dna_update_shared_config(struct configEntry *config_entry)
}
if (ret != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_update_shared_config: Unable to update shared config
entry: %s [error %d]\n",
config_entry->shared_cfg_dn, ret);
}
@@ -2737,7 +2737,7 @@ dna_update_next_range(struct configEntry *config_entry,
pb = NULL;
if (ret != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_update_next_range: Error updating "
"configuration entry [err=%d]\n", ret);
} else {
@@ -2819,7 +2819,7 @@ dna_activate_next_range(struct configEntry *config_entry)
pb = NULL;
if (ret != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_activate_next_range: Error updating "
"configuration entry [err=%d]\n", ret);
} else {
@@ -2870,7 +2870,7 @@ static int dna_is_replica_bind_dn(char *range_dn, char *bind_dn)
/* This function converts the old DN style to the new one. */
replica_dn =
slapi_create_dn_string("cn=replica,cn=\"%s\",cn=mapping
tree,cn=config", be_suffix);
if (NULL == replica_dn) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"dna_is_replica_bind_dn: failed to create "
"replica dn for %s\n", be_suffix);
ret = 1;
@@ -2919,7 +2919,7 @@ static int dna_is_replica_bind_dn(char *range_dn, char *bind_dn)
}
slapi_value_free(&bind_dn_sv);
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"dna_is_replica_bind_dn: Failed to fetch replica entry
"
"for range %s\n", range_dn);
}
@@ -2960,7 +2960,7 @@ static int dna_get_replica_bind_creds(char *range_dn, struct
dnaServer *server,
/* This function converts the old DN style to the new one. */
replica_dn =
slapi_create_dn_string("cn=replica,cn=\"%s\",cn=mapping
tree,cn=config", be_suffix);
if (NULL == replica_dn) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"dna_get_replica_bind_creds: failed to create "
"replica dn for %s\n", be_suffix);
ret = LDAP_PARAM_ERROR;
@@ -2980,7 +2980,7 @@ static int dna_get_replica_bind_creds(char *range_dn, struct
dnaServer *server,
pb = slapi_pblock_new();
if (NULL == pb) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_get_replica_bind_creds: Failed to "
"allocate pblock\n");
goto bail;
@@ -2993,7 +2993,7 @@ static int dna_get_replica_bind_creds(char *range_dn, struct
dnaServer *server,
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &ret);
if (LDAP_SUCCESS != ret) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_get_replica_bind_creds: Failed to fetch replica
"
"bind credentials for range %s, server %s, port %u
[error %d]\n",
range_dn, server->host,
@@ -3013,7 +3013,7 @@ static int dna_get_replica_bind_creds(char *range_dn, struct
dnaServer *server,
ret = dna_get_remote_config_info(server, bind_dn, bind_passwd,
bind_method, is_ssl, port);
goto bail;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"dna_get_replica_bind_creds: Failed to fetch replication
"
"agreement for range %s, server %s, port %u\n",
range_dn,
server->host, server->port ? server->port :
server->secureport);
@@ -3064,7 +3064,7 @@ static int dna_get_replica_bind_creds(char *range_dn, struct
dnaServer *server,
pw_ret = pw_rever_decode(bind_cred, bind_passwd, DNA_REPL_CREDS);
if (pw_ret == -1) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_get_replica_bind_creds: Failed to decode "
"replica bind credentials for range %s, server %s,
"
"port %u\n", range_dn, server->host,
server->port);
@@ -3134,7 +3134,7 @@ dna_get_remote_config_info( struct dnaServer *server, char
**bind_dn, char **bin
if (server->secureport){
*port = server->secureport;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_get_remote_config_info: Using SSL protocol, but the secure
"
"port is not defined.\n");
return -1;
@@ -3143,7 +3143,7 @@ dna_get_remote_config_info( struct dnaServer *server, char
**bind_dn, char **bin
if(server->port){
*port = server->port;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_get_remote_config_info: Using %s protocol, but the
non-secure "
"port is not defined.\n", server->remote_conn_prot);
return -1;
@@ -3159,7 +3159,7 @@ dna_get_remote_config_info( struct dnaServer *server, char
**bind_dn, char **bin
pw_ret = pw_rever_decode(bind_cred, bind_passwd, DNA_REPL_CREDS);
if (pw_ret == -1) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_get_remote_config_info: Failed to decode "
"replica bind credentials for server %s, "
"port %u\n", server->host,
@@ -3410,21 +3410,21 @@ _dna_pre_op_add(Slapi_PBlock *pb, Slapi_Entry *e, char **errstr)
/* Did we already service all of these configured types? */
if (dna_list_contains_types(generated_types, config_entry->types)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM, " no
types to act upon.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, "
no types to act upon.\n");
goto next;
}
/* is the entry in scope? */
if (config_entry->scope &&
!slapi_dn_issuffix(dn, config_entry->scope)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM, " dn not
in scope\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, "
dn not in scope\n");
goto next;
}
/* is this entry in an excluded scope? */
for (i = 0; config_entry->excludescope &&
config_entry->excludescope[i]; i++) {
if (slapi_dn_issuffix(dn,
slapi_sdn_get_dn(config_entry->excludescope[i]))) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM, " dn
in excluded scope\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
" dn in excluded scope\n");
goto next;
}
}
@@ -3433,7 +3433,7 @@ _dna_pre_op_add(Slapi_PBlock *pb, Slapi_Entry *e, char **errstr)
if (config_entry->slapi_filter) {
ret = slapi_vattr_filter_test(pb, e, config_entry->slapi_filter, 0);
if (LDAP_SUCCESS != ret) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM, " dn
does not match filter\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
" dn does not match filter\n");
goto next;
}
}
@@ -3465,7 +3465,7 @@ _dna_pre_op_add(Slapi_PBlock *pb, Slapi_Entry *e, char **errstr)
if (types_to_generate && types_to_generate[0]) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM, " adding
%s to %s as -2\n", types_to_generate[0], dn);
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, "
adding %s to %s as -2\n", types_to_generate[0], dn);
/* add - add to entry */
for (i = 0; types_to_generate && types_to_generate[i]; i++) {
slapi_entry_attr_set_charptr(e, types_to_generate[i],
@@ -3504,14 +3504,14 @@ _dna_pre_op_add(Slapi_PBlock *pb, Slapi_Entry *e, char **errstr)
slapi_lock_mutex(config_entry->lock);
ret = dna_first_free_value(config_entry, &setval);
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM, "
retrieved value %" PRIu64 " ret %d\n", setval, ret);
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, "
retrieved value %" PRIu64 " ret %d\n", setval, ret);
if (LDAP_SUCCESS != ret) {
/* check if we overflowed the configured range */
if (setval > config_entry->maxval) {
/* try for a new range or fail */
ret = dna_fix_maxval(config_entry, 0);
if (LDAP_SUCCESS != ret) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
DNA_PLUGIN_SUBSYSTEM,
"dna_pre_op: no more values
available!!\n");
/* Set an error string to be returned to the client. */
*errstr = slapi_ch_smprintf("Allocation of a new value
for range"
@@ -3524,7 +3524,7 @@ _dna_pre_op_add(Slapi_PBlock *pb, Slapi_Entry *e, char **errstr)
/* Make sure dna_first_free_value() doesn't error out */
ret = dna_first_free_value(config_entry, &setval);
if (LDAP_SUCCESS != ret){
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
DNA_PLUGIN_SUBSYSTEM,
"dna_pre_op: failed to allocate a new ID
1\n");
/* Set an error string to be returned to the client. */
*errstr = slapi_ch_smprintf("Allocation of a new value
for range"
@@ -3535,7 +3535,7 @@ _dna_pre_op_add(Slapi_PBlock *pb, Slapi_Entry *e, char **errstr)
}
} else {
/* dna_first_free_value() failed for some unknown reason */
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_pre_op: failed to allocate a new ID!!
2\n");
/* Set an error string to be returned to the client. */
*errstr = slapi_ch_smprintf("Allocation of a new value for
range"
@@ -3553,7 +3553,7 @@ _dna_pre_op_add(Slapi_PBlock *pb, Slapi_Entry *e, char **errstr)
* really a soft failure. */
if ((config_entry->next_range_lower == 0) &&
(config_entry->remaining <= config_entry->threshold)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"dna_pre_op: Passed threshold of %"
NSPRIu64 " remaining values "
"for range %s. (%" NSPRIu64 " values
remain)\n",
@@ -3783,7 +3783,7 @@ _dna_pre_op_modify(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Mods
*smods, char **e
/* try for a new range or fail */
ret = dna_fix_maxval(config_entry, 0);
if (LDAP_SUCCESS != ret) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
DNA_PLUGIN_SUBSYSTEM,
"dna_pre_op: no more values
available!!\n");
/* Set an error string to be returned to the client. */
*errstr = slapi_ch_smprintf("Allocation of a new value
for range"
@@ -3796,7 +3796,7 @@ _dna_pre_op_modify(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Mods
*smods, char **e
/* Make sure dna_first_free_value() doesn't error out */
ret = dna_first_free_value(config_entry, &setval);
if (LDAP_SUCCESS != ret){
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
DNA_PLUGIN_SUBSYSTEM,
"dna_pre_op: failed to allocate a new
ID\n");
/* Set an error string to be returned to the client. */
*errstr = slapi_ch_smprintf("Allocation of a new value
for range"
@@ -3807,7 +3807,7 @@ _dna_pre_op_modify(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Mods
*smods, char **e
}
} else {
/* dna_first_free_value() failed for some unknown reason */
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_pre_op: failed to allocate a new
ID!!\n");
/* Set an error string to be returned to the client. */
*errstr = slapi_ch_smprintf("Allocation of a new value for
range"
@@ -3825,7 +3825,7 @@ _dna_pre_op_modify(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Mods
*smods, char **e
* really a soft failure. */
if ((config_entry->next_range_lower == 0) &&
(config_entry->remaining <= config_entry->threshold)) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_pre_op: Passed threshold of %"
NSPRIu64 " remaining values "
"for range %s. (%" NSPRIu64 " values
remain)\n",
@@ -3868,7 +3868,7 @@ dna_pre_op(Slapi_PBlock * pb, int modtype)
LDAPMod **mods;
int ret = 0;
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"--> dna_pre_op\n");
if (0 == (dn = dna_get_dn(pb))) {
@@ -3883,14 +3883,14 @@ dna_pre_op(Slapi_PBlock * pb, int modtype)
if (LDAP_CHANGETYPE_ADD == modtype) {
slapi_pblock_get(pb, SLAPI_ADD_ENTRY, &e);
if (NULL == e) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"dna_pre_op: no add entry set for add\n");
goto bail;
}
} else {
slapi_pblock_get(pb, SLAPI_MODIFY_EXISTING_ENTRY, &e);
if (NULL == e) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"dna_pre_op: no pre op entry set for modify\n");
goto bail;
}
@@ -3959,7 +3959,7 @@ bail:
slapi_mods_free(&smods);
if (ret) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"dna_pre_op: operation failure [%d]\n", ret);
slapi_send_ldap_result(pb, ret, NULL, errstr, 0, NULL);
slapi_ch_free((void **)&errstr);
@@ -3967,7 +3967,7 @@ bail:
ret = DNA_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_pre_op\n");
return ret;
@@ -4031,26 +4031,26 @@ static int dna_be_txn_pre_op(Slapi_PBlock *pb, int modtype)
int numvals, e_numvals = 0;
int i, len, ret = DNA_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"--> dna_be_txn_pre_op\n");
if (!slapi_plugin_running(pb)) {
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM, " --x bailing, plugin
not running\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, " --x
bailing, plugin not running\n");
goto bail;
}
if (0 == (dn = dna_get_dn(pb))) {
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM, " --x bailing, is dna
dn\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, " --x
bailing, is dna dn\n");
goto bail;
}
if (dna_dn_is_config(dn)) {
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM, " --x bailing is dna
config dn\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, " --x
bailing is dna config dn\n");
goto bail;
}
if (dna_isrepl(pb)) {
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM, " --x bailing
replicated operation\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, " --x
bailing replicated operation\n");
/* if repl, the dna values should be already in the entry. */
goto bail;
}
@@ -4062,7 +4062,7 @@ static int dna_be_txn_pre_op(Slapi_PBlock *pb, int modtype)
}
if (e == NULL) {
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM, " --x bailing entry
is NULL\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, " --x
bailing entry is NULL\n");
goto bail;
} else if (LDAP_CHANGETYPE_MODIFY == modtype) {
slapi_pblock_get(pb, SLAPI_MODIFY_MODS, &mods);
@@ -4074,21 +4074,21 @@ static int dna_be_txn_pre_op(Slapi_PBlock *pb, int modtype)
if (!PR_CLIST_IS_EMPTY(dna_global_config)) {
list = PR_LIST_HEAD(dna_global_config);
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM, " using global
config...\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, "
using global config...\n");
while (list != dna_global_config && LDAP_SUCCESS == ret) {
config_entry = (struct configEntry *) list;
/* Did we already service all of these configured types? */
if (dna_list_contains_types(generated_types, config_entry->types)) {
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM, " All
types already serviced\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, "
All types already serviced\n");
goto next;
}
/* is the entry in scope? */
if (config_entry->scope) {
if (!slapi_dn_issuffix(dn, config_entry->scope)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM, "
Entry not in scope of dnaScope!\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
" Entry not in scope of dnaScope!\n");
goto next;
}
}
@@ -4096,7 +4096,7 @@ static int dna_be_txn_pre_op(Slapi_PBlock *pb, int modtype)
/* is this entry in an excluded scope? */
for (i = 0; config_entry->excludescope &&
config_entry->excludescope[i]; i++) {
if (slapi_dn_issuffix(dn,
slapi_sdn_get_dn(config_entry->excludescope[i]))) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM, "
Entry in excluded scope, next\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
" Entry in excluded scope, next\n");
goto next;
}
}
@@ -4104,7 +4104,7 @@ static int dna_be_txn_pre_op(Slapi_PBlock *pb, int modtype)
/* does the entry match the filter? */
if (config_entry->slapi_filter) {
if(LDAP_SUCCESS !=
slapi_vattr_filter_test(pb,e,config_entry->slapi_filter, 0)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM, "
Entry does not match filter\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
" Entry does not match filter\n");
goto next;
}
}
@@ -4290,7 +4290,7 @@ bail:
slapi_ch_array_free(generated_types);
if (ret) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"dna_be_txn_pre_op: operation failure [%d]\n", ret);
slapi_send_ldap_result(pb, ret, NULL, errstr, 0, NULL);
slapi_ch_free((void **)&errstr);
@@ -4298,7 +4298,7 @@ bail:
ret = DNA_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_be_txn_pre_op\n");
return ret;
@@ -4312,7 +4312,7 @@ static int dna_config_check_post_op(Slapi_PBlock * pb)
return DNA_SUCCESS;
}
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"--> dna_config_check_post_op\n");
@@ -4327,7 +4327,7 @@ static int dna_config_check_post_op(Slapi_PBlock * pb)
}
}
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_config_check_post_op\n");
return DNA_SUCCESS;
@@ -4339,7 +4339,7 @@ static int dna_config_check_post_op(Slapi_PBlock * pb)
***************************************************/
static int dna_extend_exop_backend(Slapi_PBlock *pb, Slapi_Backend **target)
{
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"--> dna_parse_exop_backend\n");
Slapi_DN *shared_sdn = NULL;
char *shared_dn = NULL;
@@ -4356,7 +4356,7 @@ static int dna_extend_exop_backend(Slapi_PBlock *pb, Slapi_Backend
**target)
}
res = LDAP_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_parse_exop_backend %d\n", res);
return res;
}
@@ -4377,14 +4377,14 @@ static int dna_extend_exop(Slapi_PBlock *pb)
return ret;
}
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"--> dna_extend_exop\n");
if(dna_parse_exop_ber(pb, &shared_dn) != LDAP_SUCCESS) {
return ret;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"dna_extend_exop: received range extension "
"request for range [%s]\n", shared_dn);
@@ -4425,7 +4425,7 @@ static int dna_extend_exop(Slapi_PBlock *pb)
if (LBER_ERROR == (ber_printf(respber, "{oo}",
range_low.bv_val, range_low.bv_len,
range_high.bv_val, range_high.bv_len))) {
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_extend_exop: Unable to encode exop response.\n");
ber_free(respber, 1);
ret = LDAP_ENCODING_ERROR;
@@ -4443,7 +4443,7 @@ static int dna_extend_exop(Slapi_PBlock *pb)
ret = SLAPI_PLUGIN_EXTENDED_SENT_RESULT;
ber_bvfree(respdata);
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"dna_extend_exop: Released range %" NSPRIu64
"-%" NSPRIu64 ".\n",
lower, upper);
}
@@ -4452,7 +4452,7 @@ static int dna_extend_exop(Slapi_PBlock *pb)
slapi_ch_free_string(&shared_dn);
slapi_ch_free_string(&bind_dn);
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_extend_exop\n");
return ret;
@@ -4475,7 +4475,7 @@ dna_release_range(char *range_dn, PRUint64 *lower, PRUint64 *upper)
struct configEntry *config_entry = NULL;
int set_extend_flag = 0;
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"--> dna_release_range\n");
if (range_dn) {
@@ -4525,7 +4525,7 @@ dna_release_range(char *range_dn, PRUint64 *lower, PRUint64 *upper)
slapi_lock_mutex(config_entry->extend_lock);
if (config_entry->extend_in_progress) {
/* We're already processing a range extention, so bail. */
- slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"dna_release_range: Already processing a "
"range extension request. Skipping
request.\n");
slapi_unlock_mutex(config_entry->extend_lock);
@@ -4627,7 +4627,7 @@ dna_release_range(char *range_dn, PRUint64 *lower, PRUint64 *upper)
* want to give the caller any range */
*lower = 0;
*upper = 0;
- slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_release_range: Error updating "
"configuration entry [err=%d]\n", ret);
}
@@ -4648,7 +4648,7 @@ bail:
dna_unlock();
}
- slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_release_range\n");
return ret;
diff --git a/ldap/servers/plugins/http/http_client.c
b/ldap/servers/plugins/http/http_client.c
index 16befdb..44cfa4c 100644
--- a/ldap/servers/plugins/http/http_client.c
+++ b/ldap/servers/plugins/http/http_client.c
@@ -29,7 +29,7 @@
/*** from proto-slap.h ***/
-int slapd_log_error_proc( char *subsystem, char *fmt, ... );
+int slapd_log_error_proc( char *subsystem, int sev_level, char *fmt, ... );
/*** from ldaplog.h ***/
@@ -47,10 +47,10 @@ extern "C" {
/* debugging stuff */
extern int slapd_ldap_debug;
-#define LDAPDebug( level, fmt, arg1, arg2, arg3 ) \
+#define LDAPDebug( level, sev_level, fmt, arg1, arg2, arg3 ) \
{ \
if ( slapd_ldap_debug & level ) { \
- slapd_log_error_proc( NULL, fmt, arg1, arg2, arg3 ); \
+ slapd_log_error_proc( NULL, sev_level, fmt, arg1, arg2, arg3 ); \
} \
}
@@ -124,7 +124,7 @@ int http_client_init(Slapi_PBlock *pb)
slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION,
(void *)&pdesc ) != 0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
"http_client_init: failed to register plugin\n" );
status = HTTP_FAILURE;
}
@@ -132,7 +132,7 @@ int http_client_init(Slapi_PBlock *pb)
/* Retrieve and save the plugin identity to later pass to
internal operations */
if (slapi_pblock_get(pb, SLAPI_PLUGIN_IDENTITY, &plugin_id) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
"http_client_init: Failed to retrieve
SLAPI_PLUGIN_IDENTITY\n");
return HTTP_FAILURE;
}
@@ -158,7 +158,7 @@ static int http_client_start(Slapi_PBlock *pb)
api[6] = (void *)_http_post;
if( slapi_apib_register(HTTP_v1_0_GUID, api) ) {
- slapi_log_error( SLAPI_LOG_FATAL, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
"http_client_start: failed to register functions\n" );
status = HTTP_FAILURE;
}
diff --git a/ldap/servers/plugins/http/http_impl.c
b/ldap/servers/plugins/http/http_impl.c
index f4605e2..ebd6c10 100644
--- a/ldap/servers/plugins/http/http_impl.c
+++ b/ldap/servers/plugins/http/http_impl.c
@@ -35,7 +35,7 @@
/*** from proto-slap.h ***/
-int slapd_log_error_proc( char *subsystem, char *fmt, ... );
+int slapd_log_error_proc( char *subsystem, int sev_level, char *fmt, ... );
/*** from ldaplog.h ***/
@@ -59,10 +59,10 @@ extern "C" {
/* debugging stuff */
extern int slapd_ldap_debug;
-#define LDAPDebug( level, fmt, arg1, arg2, arg3 ) \
+#define LDAPDebug( level, sev_level, fmt, arg1, arg2, arg3 ) \
{ \
if ( slapd_ldap_debug & level ) { \
- slapd_log_error_proc( NULL, fmt, arg1, arg2, arg3 ); \
+ slapd_log_error_proc( NULL, sev_level, fmt, arg1, arg2, arg3 ); \
} \
}
@@ -225,7 +225,7 @@ static int doRequest(const char *url, httpheader **httpheaderArray,
char *body,
/* Parse the URL and initialize the host, port, path */
if (parseURI(url, &host, &port, &path, &sslOn) == PR_FAILURE) {
- slapi_log_error( SLAPI_LOG_FATAL, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
"doRequest: %s \n", HTTP_ERROR_BAD_URL);
status = PR_FAILURE;
goto bail;
@@ -242,7 +242,7 @@ static int doRequest(const char *url, httpheader **httpheaderArray,
char *body,
if (status == PR_SUCCESS) {
PR_EnumerateHostEnt(0, &ent, (PRUint16)port, &addr);
} else {
- slapi_log_error( SLAPI_LOG_FATAL, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
"doRequest: %s\n", HTTP_ERROR_NET_ADDR);
status = HTTP_CLIENT_ERROR_NET_ADDR;
goto bail;
@@ -256,7 +256,7 @@ static int doRequest(const char *url, httpheader **httpheaderArray,
char *body,
/* open a TCP connection to the server */
fd = PR_NewTCPSocket();
if (!fd) {
- slapi_log_error( SLAPI_LOG_FATAL, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
"doRequest: %s\n", HTTP_ERROR_SOCKET_CREATE);
status = HTTP_CLIENT_ERROR_SOCKET_CREATE;
goto bail;
@@ -270,7 +270,7 @@ static int doRequest(const char *url, httpheader **httpheaderArray,
char *body,
if (sslOn) {
fd = setupSSLSocket(fd);
if (fd == NULL) {
- slapi_log_error( SLAPI_LOG_FATAL, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
"doRequest: %s\n", HTTP_ERROR_SSLSOCKET_CREATE);
status = HTTP_CLIENT_ERROR_SSLSOCKET_CREATE;
goto bail;
@@ -278,7 +278,7 @@ static int doRequest(const char *url, httpheader **httpheaderArray,
char *body,
if (SSL_SetURL(fd, host) != 0) {
errcode = PR_GetError();
- slapi_log_error( SLAPI_LOG_FATAL, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
"doRequest: SSL_SetURL -> NSPR Error code (%d) \n", errcode);
status = HTTP_CLIENT_ERROR_SSLSOCKET_CREATE;
goto bail;
@@ -290,7 +290,7 @@ static int doRequest(const char *url, httpheader **httpheaderArray,
char *body,
/* connect to the host */
if (PR_Connect(fd, &addr, PR_MillisecondsToInterval(http_connection_time_out)) ==
PR_FAILURE) {
errcode = PR_GetError();
- slapi_log_error( SLAPI_LOG_FATAL, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
"doRequest: %s (%s:%d) -> NSPR Error code (%d)\n",
HTTP_ERROR_CONNECT_FAILED, host, addr.inet.port, errcode);
status = HTTP_CLIENT_ERROR_CONNECT_FAILED;
@@ -302,7 +302,7 @@ static int doRequest(const char *url, httpheader **httpheaderArray,
char *body,
/* send the request to the server */
if (reqType == HTTP_REQ_TYPE_POST) {
if (sendPostReq(fd, path, httpheaderArray, body) == PR_FAILURE) {
- slapi_log_error( SLAPI_LOG_FATAL, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
"doRequest-sendPostReq: %s (%s)\n", HTTP_ERROR_SEND_REQ, path);
status = HTTP_CLIENT_ERROR_SEND_REQ;
goto bail;
@@ -310,7 +310,7 @@ static int doRequest(const char *url, httpheader **httpheaderArray,
char *body,
}
else {
if (sendGetReq(fd, path) == PR_FAILURE) {
- slapi_log_error( SLAPI_LOG_FATAL, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
"doRequest-sendGetReq: %s (%s)\n", HTTP_ERROR_SEND_REQ, path);
status = HTTP_CLIENT_ERROR_SEND_REQ;
goto bail;
@@ -321,7 +321,7 @@ static int doRequest(const char *url, httpheader **httpheaderArray,
char *body,
/* read the response */
if (processResponse(fd, buf, bytesRead, reqType) == PR_FAILURE) {
- slapi_log_error( SLAPI_LOG_FATAL, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
"doRequest: %s (%s)\n", HTTP_ERROR_BAD_RESPONSE, url);
status = HTTP_CLIENT_ERROR_BAD_RESPONSE;
goto bail;
@@ -602,7 +602,7 @@ static PRStatus sendFullData( PRFileDesc *fd, char *buf, int timeOut)
else
{
errcode = PR_GetError();
- slapi_log_error( SLAPI_LOG_FATAL, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
"sendFullData: dataSent=%d bufLen=%d -> NSPR Error code (%d)\n",
dataSent, bufLen, errcode);
LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "---------->NSPR Error code (%d)
\n", errcode,0,0);
@@ -693,7 +693,7 @@ static PRStatus getChar(PRFileDesc *fd, char *buf)
PRInt32 bytesRead = http_read(fd, buf, 1);
if (bytesRead <=0) {
PRInt32 errcode = PR_GetError();
- slapi_log_error( SLAPI_LOG_FATAL, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
"getChar: NSPR Error code (%d)\n", errcode);
return PR_FAILURE;
}
@@ -963,31 +963,31 @@ PRFileDesc* setupSSLSocket(PRFileDesc* fd)
socketOption.option = PR_SockOpt_Nonblocking;
socketOption.value.non_blocking = PR_FALSE;
if( PR_SetSocketOption(fd, &socketOption) != 0) {
- slapi_log_error( SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
"Cannot set socket option NSS \n");
return NULL;
}
sslSocket = SSL_ImportFD(NULL, fd);
if (!sslSocket) {
- slapi_log_error( SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
"setupSSLSocket: Cannot import to SSL Socket\n" );
goto sslbail;
}
- slapi_log_error( SLAPI_LOG_FATAL, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
"setupSSLSocket: setupssl socket created\n" );
secStatus = SSL_OptionSet(sslSocket, SSL_SECURITY, 1);
if (SECSuccess != secStatus) {
- slapi_log_error( SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
"setupSSLSocket: Cannot set SSL_SECURITY option\n");
goto sslbail;
}
secStatus = SSL_OptionSet(sslSocket, SSL_HANDSHAKE_AS_CLIENT, 1);
if (SECSuccess != secStatus) {
- slapi_log_error( SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
"setupSSLSocket: CAnnot set SSL_HANDSHAKE_AS_CLIENT
option\n");
goto sslbail;
}
@@ -998,7 +998,7 @@ PRFileDesc* setupSSLSocket(PRFileDesc* fd)
(SSLGetClientAuthData) getClientAuthData,
(void *)certNickname);
if (secStatus != SECSuccess) {
- slapi_log_error( SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
"setupSSLSocket: SSL_GetClientAuthDataHook Failed\n");
goto sslbail;
}
@@ -1007,7 +1007,7 @@ PRFileDesc* setupSSLSocket(PRFileDesc* fd)
(SSLAuthCertificate) authCertificate,
(void *)CERT_GetDefaultCertDB());
if (secStatus != SECSuccess) {
- slapi_log_error( SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
"setupSSLSocket: SSL_AuthCertificateHook Failed\n");
goto sslbail;
}
@@ -1015,7 +1015,7 @@ PRFileDesc* setupSSLSocket(PRFileDesc* fd)
secStatus = SSL_BadCertHook(sslSocket,
(SSLBadCertHandler) badCertHandler, NULL);
if (secStatus != SECSuccess) {
- slapi_log_error( SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
"setupSSLSocket: SSL_BadCertHook Failed\n");
goto sslbail;
}
@@ -1023,7 +1023,7 @@ PRFileDesc* setupSSLSocket(PRFileDesc* fd)
secStatus = SSL_HandshakeCallback(sslSocket,
(SSLHandshakeCallback) handshakeCallback, NULL);
if (secStatus != SECSuccess) {
- slapi_log_error( SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
"setupSSLSocket: SSL_HandshakeCallback Failed\n");
goto sslbail;
}
@@ -1047,7 +1047,7 @@ SECStatus
SECStatus secStatus;
if (!arg || !socket) {
- slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
" authCertificate: Faulty socket in callback function \n");
return SECFailure;
}
@@ -1122,7 +1122,7 @@ SECStatus
break;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
"Bad certificate: %d\n", err);
return secStatus;
@@ -1200,7 +1200,7 @@ SECStatus
SECStatus
handshakeCallback(PRFileDesc *socket, void *arg)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
"----------> Handshake has completed, ready to send data
securely.\n");
return SECSuccess;
}
@@ -1212,7 +1212,7 @@ SECStatus
int http_impl_init(Slapi_ComponentId *plugin_id)
{
int status = HTTP_IMPL_SUCCESS;
- slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
"-> http_impl_init \n");
httpConfig = NULL;
@@ -1220,19 +1220,19 @@ int http_impl_init(Slapi_ComponentId *plugin_id)
status = readConfigLDAPurl(plugin_id, HTTP_PLUGIN_DN);
if (status != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
"http_impl_start: Unable to get HTTP config information
\n");
return HTTP_IMPL_FAILURE;
}
status = readConfigLDAPurl(plugin_id, CONFIG_DN);
if (status != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
"http_impl_start: Unable to get config information
\n");
return HTTP_IMPL_FAILURE;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
"<- http_impl_init \n");
return status;
@@ -1286,14 +1286,14 @@ static int readConfigLDAPurl(Slapi_ComponentId *plugin_id, char
*plugindn) {
rc = slapi_search_internal_get_entry(sdn, NULL, &entry, plugin_id);
slapi_sdn_free(&sdn);
if (rc != LDAP_SUCCESS) {
- slapi_log_error( SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
"readConfigLDAPurl: Could not find entry %s (error
%d)\n", plugindn, rc);
status = HTTP_IMPL_FAILURE;
return status;
}
if (NULL == entry)
{
- slapi_log_error( SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
"readConfigLDAPurl: No entries found for <%s>\n",
plugindn);
status = HTTP_IMPL_FAILURE;
diff --git a/ldap/servers/plugins/linkedattrs/fixup_task.c
b/ldap/servers/plugins/linkedattrs/fixup_task.c
index e5fc8bc..99d8aca 100644
--- a/ldap/servers/plugins/linkedattrs/fixup_task.c
+++ b/ldap/servers/plugins/linkedattrs/fixup_task.c
@@ -71,7 +71,7 @@ linked_attrs_fixup_task_add(Slapi_PBlock *pb, Slapi_Entry *e,
(void *)task, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL) {
- slapi_log_error( SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"unable to create task thread!\n");
*returncode = LDAP_OPERATIONS_ERROR;
slapi_task_finish(task, *returncode);
@@ -116,7 +116,7 @@ linked_attrs_fixup_task_thread(void *arg)
return; /* no task */
}
slapi_task_inc_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_fixup_task_thread --> refcount
incremented.\n" );
/* Fetch our task data from the task */
td = (task_data *)slapi_task_get_data(task);
@@ -128,7 +128,7 @@ linked_attrs_fixup_task_thread(void *arg)
slapi_task_begin(task, 1);
slapi_task_log_notice(task, "Linked attributes fixup task starting (link dn:
\"%s\") ...\n",
td->linkdn ? td->linkdn : "");
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"Syntax validate task starting (link dn: \"%s\")
...\n",
td->linkdn ? td->linkdn : "");
@@ -147,7 +147,7 @@ linked_attrs_fixup_task_thread(void *arg)
found_config = 1;
slapi_task_log_notice(task, "Fixing up linked attribute pair
(%s)\n",
config_entry->dn);
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"Fixing up linked attribute pair (%s)\n",
config_entry->dn);
linked_attrs_fixup_links(config_entry);
@@ -157,7 +157,7 @@ linked_attrs_fixup_task_thread(void *arg)
/* No config DN was supplied, so fix up all configured links. */
slapi_task_log_notice(task, "Fixing up linked attribute pair
(%s)\n",
config_entry->dn);
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"Fixing up linked attribute pair (%s)\n",
config_entry->dn);
linked_attrs_fixup_links(config_entry);
@@ -171,7 +171,7 @@ linked_attrs_fixup_task_thread(void *arg)
if (td->linkdn && !found_config) {
slapi_task_log_notice(task, "Requested link config DN not found
(%s)\n",
td->linkdn);
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"Requested link config DN not found (%s)\n", td->linkdn);
}
@@ -180,14 +180,14 @@ linked_attrs_fixup_task_thread(void *arg)
/* Log finished message. */
slapi_task_log_notice(task, "Linked attributes fixup task complete.");
slapi_task_log_status(task, "Linked attributes fixup task complete.");
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM, "Linked attributes fixup
task complete.\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM, "Linked attributes
fixup task complete.\n");
slapi_task_inc_progress(task);
/* this will queue the destruction of the task */
slapi_task_finish(task, rc);
slapi_task_dec_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_fixup_task_thread <-- refcount
decremented.\n");
}
@@ -219,11 +219,11 @@ linked_attrs_fixup_links(struct configEntry *config)
fixup_pb = slapi_pblock_new();
slapi_pblock_set(fixup_pb, SLAPI_BACKEND, be);
if(slapi_back_transaction_begin(fixup_pb) != LDAP_SUCCESS){
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_fixup_links: failed to start
transaction\n");
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_fixup_links: failed to get be backend from
%s\n",
config->scope);
}
@@ -276,11 +276,11 @@ linked_attrs_fixup_links(struct configEntry *config)
fixup_pb = slapi_pblock_new();
slapi_pblock_set(fixup_pb, SLAPI_BACKEND, be);
if(slapi_back_transaction_begin(fixup_pb) != LDAP_SUCCESS){
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_fixup_links: failed to start
transaction\n");
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_fixup_links: failed to get be backend from
%s\n",
slapi_sdn_get_dn(config->suffix));
}
@@ -361,7 +361,7 @@ linked_attrs_remove_backlinks_callback(Slapi_Entry *e, void
*callback_data)
mods[0] = &mod;
mods[1] = 0;
- slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"Removing backpointer attribute (%s) from entry (%s)\n",
type, slapi_sdn_get_dn(sdn));
@@ -436,7 +436,7 @@ linked_attrs_add_backlinks_callback(Slapi_Entry *e, void
*callback_data)
}
if (perform_update) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"Adding backpointer (%s) in entry (%s)\n",
linkdn, targetdn);
diff --git a/ldap/servers/plugins/linkedattrs/linked_attrs.c
b/ldap/servers/plugins/linkedattrs/linked_attrs.c
index 72711f1..e29442f 100644
--- a/ldap/servers/plugins/linkedattrs/linked_attrs.c
+++ b/ldap/servers/plugins/linkedattrs/linked_attrs.c
@@ -148,7 +148,7 @@ linked_attrs_init(Slapi_PBlock *pb)
int preadd = SLAPI_PLUGIN_PRE_ADD_FN;
int premod = SLAPI_PLUGIN_PRE_MODIFY_FN;
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_init\n");
if ((slapi_pblock_get(pb, SLAPI_PLUGIN_CONFIG_ENTRY, &plugin_entry) == 0)
&&
@@ -178,7 +178,7 @@ linked_attrs_init(Slapi_PBlock *pb)
(void *) &pdesc) != 0 ||
slapi_pblock_set(pb, premod, (void *) linked_attrs_mod_pre_op) != 0 ||
slapi_pblock_set(pb, preadd, (void *) linked_attrs_add_pre_op) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_init: failed to register plugin\n");
status = -1;
}
@@ -192,7 +192,7 @@ linked_attrs_init(Slapi_PBlock *pb)
NULL, /* ? */
plugin_identity /* access control */
)) {
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_init: failed to register internalpostoperation
plugin\n");
status = -1;
}
@@ -210,13 +210,13 @@ linked_attrs_init(Slapi_PBlock *pb)
NULL, /* ? */
plugin_identity /* access control */
)) {
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_init: failed to register postop
plugin\n");
status = -1;
}
}
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"<-- linked_attrs_init\n");
return status;
}
@@ -239,7 +239,7 @@ linked_attrs_internal_postop_init(Slapi_PBlock *pb)
(void *) linked_attrs_mod_post_op) != 0 ||
slapi_pblock_set(pb, SLAPI_PLUGIN_INTERNAL_POST_MODRDN_FN,
(void *) linked_attrs_modrdn_post_op) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_internal_postop_init: failed to register
plugin\n");
status = -1;
}
@@ -271,7 +271,7 @@ linked_attrs_postop_init(Slapi_PBlock *pb)
slapi_pblock_set(pb, delfn, (void *) linked_attrs_del_post_op) != 0 ||
slapi_pblock_set(pb, modfn, (void *) linked_attrs_mod_post_op) != 0 ||
slapi_pblock_set(pb, mdnfn, (void *) linked_attrs_modrdn_post_op) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_postop_init: failed to register
plugin\n");
status = -1;
}
@@ -290,13 +290,13 @@ linked_attrs_start(Slapi_PBlock * pb)
{
Slapi_DN *plugindn = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_start\n");
g_config_lock = slapi_new_rwlock();
if (!g_config_lock) {
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_start: lock creation failed\n");
return -1;
@@ -307,7 +307,7 @@ linked_attrs_start(Slapi_PBlock * pb)
* and store it for future use. */
slapi_pblock_get(pb, SLAPI_TARGET_SDN, &plugindn);
if (NULL == plugindn || 0 == slapi_sdn_get_ndn_len(plugindn)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_start: unable to retrieve plugin dn\n");
return -1;
}
@@ -323,7 +323,7 @@ linked_attrs_start(Slapi_PBlock * pb)
PR_INIT_CLIST(g_managed_config_index);
if (linked_attrs_load_config() != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_start: unable to load plug-in
configuration\n");
return -1;
}
@@ -333,9 +333,9 @@ linked_attrs_start(Slapi_PBlock * pb)
*/
slapi_plugin_task_register_handler("fixup linked attributes",
linked_attrs_fixup_task_add, pb);
- slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"linked attributes plug-in: ready for service\n");
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"<-- linked_attrs_start\n");
return 0;
@@ -349,7 +349,7 @@ linked_attrs_start(Slapi_PBlock * pb)
static int
linked_attrs_close(Slapi_PBlock * pb)
{
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_close\n");
slapi_plugin_task_unregister_handler("fixup linked attributes",
linked_attrs_fixup_task_add);
@@ -360,7 +360,7 @@ linked_attrs_close(Slapi_PBlock * pb)
slapi_ch_free((void **)&g_link_config);
slapi_ch_free((void **)&g_managed_config_index);
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"<-- linked_attrs_close\n");
return 0;
@@ -388,7 +388,7 @@ linked_attrs_load_config(void)
Slapi_PBlock *search_pb;
Slapi_Entry **entries = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_load_config\n");
/* Clear out any old config. */
@@ -427,7 +427,7 @@ linked_attrs_load_config(void)
slapi_free_search_results_internal(search_pb);
slapi_pblock_destroy(search_pb);
linked_attrs_unlock();
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"<-- linked_attrs_load_config\n");
return status;
@@ -453,7 +453,7 @@ linked_attrs_parse_config_entry(Slapi_Entry * e, int apply)
int entry_added = 0;
int ret = 0;
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_parse_config_entry\n");
/* If this is the main plug-in
@@ -473,14 +473,14 @@ linked_attrs_parse_config_entry(Slapi_Entry * e, int apply)
if (value) {
entry->dn = slapi_ch_strdup(value);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_parse_config_entry: Error "
"reading dn from config entry\n");
ret = -1;
goto bail;
}
- slapi_log_error(SLAPI_LOG_CONFIG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"----------> dn [%s]\n", entry->dn);
value = slapi_entry_attr_get_charptr(e, LINK_LINK_TYPE);
@@ -502,14 +502,14 @@ linked_attrs_parse_config_entry(Slapi_Entry * e, int apply)
/* Check if the link type's syntax is Distinguished Name.
* We only treat this as a warning. */
if (not_dn_syntax) {
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_parse_config_entry: The %s config "
"setting must be set to an attribute with the "
"Distinguished Name syntax for linked attribute "
"pair \"%s\" attribute
\"%s\".\n", LINK_LINK_TYPE, entry->dn, value);
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_parse_config_entry: The %s config "
"setting is required for linked attribute pair
\"%s\".\n",
LINK_LINK_TYPE, entry->dn);
@@ -517,7 +517,7 @@ linked_attrs_parse_config_entry(Slapi_Entry * e, int apply)
goto bail;
}
- slapi_log_error(SLAPI_LOG_CONFIG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"----------> %s [%s]\n", LINK_LINK_TYPE,
entry->linktype);
value = slapi_entry_attr_get_charptr(e, LINK_MANAGED_TYPE);
@@ -540,7 +540,7 @@ linked_attrs_parse_config_entry(Slapi_Entry * e, int apply)
/* Ensure that the managed type is a multi-valued attribute. */
if (single_valued) {
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_parse_config_entry: The %s config "
"setting must be set to a multi-valued attribute "
"for linked attribute pair \"%s\".\n",
@@ -550,14 +550,14 @@ linked_attrs_parse_config_entry(Slapi_Entry * e, int apply)
/* Check if the link type's syntax is Distinguished Name.
* We only treat this as a warning. */
} else if (not_dn_syntax) {
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_parse_config_entry: The %s config "
"setting must be set to an attribute with the "
"Distinguished Name syntax for linked attribute "
"pair \"%s\".\n", LINK_MANAGED_TYPE,
entry->dn);
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_parse_config_entry: The %s config "
"setting is required for linked attribute pair
\"%s\".\n",
LINK_MANAGED_TYPE, entry->dn);
@@ -565,7 +565,7 @@ linked_attrs_parse_config_entry(Slapi_Entry * e, int apply)
goto bail;
}
- slapi_log_error(SLAPI_LOG_CONFIG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"----------> %s [%s]\n", LINK_MANAGED_TYPE,
entry->managedtype);
@@ -576,14 +576,14 @@ linked_attrs_parse_config_entry(Slapi_Entry * e, int apply)
entry->scope = value;
}
- slapi_log_error(SLAPI_LOG_CONFIG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"----------> %s [%s]\n", LINK_SCOPE,
entry->scope ? entry->scope : "NULL");
/* Check if config already exists for
* the link type at the same scope. */
if (linked_attrs_config_exists(entry)) {
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_parse_config_entry: A config "
"entry for the link attribute %s already "
"exists at a scope of \"%s\".\n",
entry->linktype,
@@ -595,7 +595,7 @@ linked_attrs_parse_config_entry(Slapi_Entry * e, int apply)
/* Check if config already exists for
* the managed type at the same scope. */
if (linked_attrs_config_exists_reverse(entry)) {
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_parse_config_entry: A config "
"entry for the managed attribute %s already "
"exists at a scope of \"%s\".\n",
entry->managedtype,
@@ -613,7 +613,7 @@ linked_attrs_parse_config_entry(Slapi_Entry * e, int apply)
/* Create a lock for this attribute pair. */
entry->lock = slapi_new_mutex();
if (!entry->lock) {
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_parse_config_entry: Unable to create "
"lock for linked attribute pair \"%s\".\n",
entry->dn);
ret = -1;
@@ -631,7 +631,7 @@ linked_attrs_parse_config_entry(Slapi_Entry * e, int apply)
* entries for the same link type together. */
if (slapi_attr_type_cmp(config_entry->linktype, entry->linktype, 1) ==
0) {
PR_INSERT_BEFORE(&(entry->list), list);
- slapi_log_error(SLAPI_LOG_CONFIG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"store [%s] before [%s] \n", entry->dn,
config_entry->dn);
@@ -647,7 +647,7 @@ linked_attrs_parse_config_entry(Slapi_Entry * e, int apply)
if (g_link_config == list) {
/* add to tail */
PR_INSERT_BEFORE(&(entry->list), list);
- slapi_log_error(SLAPI_LOG_CONFIG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"store [%s] at tail\n", entry->dn);
/* add to managed type index */
@@ -660,7 +660,7 @@ linked_attrs_parse_config_entry(Slapi_Entry * e, int apply)
} else {
/* first entry */
PR_INSERT_LINK(&(entry->list), g_link_config);
- slapi_log_error(SLAPI_LOG_CONFIG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"store [%s] at head \n", entry->dn);
/* add to managed type index */
@@ -673,7 +673,7 @@ linked_attrs_parse_config_entry(Slapi_Entry * e, int apply)
if (0 == entry_added) {
/* Don't log error if we weren't asked to apply config */
if ((apply != 0) && (entry != NULL)) {
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_parse_config_entry: Invalid config entry
"
"[%s] skipped\n", entry->dn);
}
@@ -682,7 +682,7 @@ linked_attrs_parse_config_entry(Slapi_Entry * e, int apply)
ret = 0;
}
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"<-- linked_attrs_parse_config_entry\n");
return ret;
@@ -716,7 +716,7 @@ linked_attrs_insert_config_index(struct configEntry *entry)
/* See if the types match. */
if (slapi_attr_type_cmp(config_entry->managedtype, entry->managedtype,
1) == 0) {
PR_INSERT_BEFORE(&(index_entry->list), list);
- slapi_log_error(SLAPI_LOG_CONFIG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"store [%s] before [%s] \n", entry->dn,
config_entry->dn);
inserted = 1;
@@ -728,7 +728,7 @@ linked_attrs_insert_config_index(struct configEntry *entry)
if (g_managed_config_index == list) {
/* add to tail */
PR_INSERT_BEFORE(&(index_entry->list), list);
- slapi_log_error(SLAPI_LOG_CONFIG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"store [%s] at tail\n", entry->dn);
inserted = 1;
break;
@@ -736,7 +736,7 @@ linked_attrs_insert_config_index(struct configEntry *entry)
}
} else {
/* first entry */
- slapi_log_error(SLAPI_LOG_CONFIG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"store [%s] at head \n", entry->dn);
PR_INSERT_LINK(&(index_entry->list), g_managed_config_index);
inserted = 1;
@@ -755,7 +755,7 @@ linked_attrs_free_config_entry(struct configEntry ** entry)
return;
if (e->dn) {
- slapi_log_error(SLAPI_LOG_CONFIG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"freeing config entry [%s]\n", e->dn);
slapi_ch_free_string(&e->dn);
}
@@ -812,18 +812,18 @@ linked_attrs_get_dn(Slapi_PBlock * pb)
{
const char *dn = 0;
Slapi_DN *sdn = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_get_dn\n");
if (slapi_pblock_get(pb, SLAPI_TARGET_SDN, &sdn)) {
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_get_dn: failed to get dn of changed
entry");
goto bail;
}
dn = slapi_sdn_get_dn(sdn);
bail:
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"<-- linked_attrs_get_dn\n");
return (char *)dn;
@@ -833,10 +833,10 @@ static Slapi_DN *
linked_attrs_get_sdn(Slapi_PBlock * pb)
{
Slapi_DN *sdn = 0;
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_get_sdn\n");
slapi_pblock_get(pb, SLAPI_TARGET_SDN, &sdn);
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"<-- linked_attrs_get_sdn\n");
return sdn;
@@ -852,7 +852,7 @@ linked_attrs_dn_is_config(char *dn)
{
int ret = 0;
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_dn_is_config\n");
/* Return 1 if the passed in dn is a child of the main
@@ -862,7 +862,7 @@ linked_attrs_dn_is_config(char *dn)
ret = 1;
}
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"<-- linked_attrs_dn_is_config\n");
return ret;
@@ -1140,12 +1140,12 @@ linked_attrs_oktodo(Slapi_PBlock *pb)
int ret = 1;
int oprc = 0;
- slapi_log_error( SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_oktodo\n" );
if(slapi_pblock_get(pb, SLAPI_PLUGIN_OPRETURN, &oprc) != 0)
{
- slapi_log_error( SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_oktodo: could not get parameters\n" );
ret = -1;
}
@@ -1156,7 +1156,7 @@ linked_attrs_oktodo(Slapi_PBlock *pb)
ret = 0;
}
- slapi_log_error( SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"<-- linked_attrs_oktodo\n" );
return ret;
@@ -1453,7 +1453,7 @@ linked_attrs_mod_backpointers(Slapi_PBlock *pb, char *linkdn, char
*type,
}
if (perform_update) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"%s backpointer (%s) in entry (%s)\n",
(modop == LDAP_MOD_ADD) ? "Adding" :
"Removing",
linkdn, targetdn);
@@ -1474,13 +1474,13 @@ linked_attrs_mod_backpointers(Slapi_PBlock *pb, char *linkdn, char
*type,
} else if (rc != LDAP_SUCCESS) {
char *err_msg = NULL;
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"Linked Attrs Plugin: Failed to update link to
target entry (%s) error %d",
targetdn, rc);
err_msg = PR_smprintf("Linked Attrs Plugin: Failed to update "
"link to target entry (%s) error %d",
targetdn, rc);
- slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
"%s\n", err_msg);
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"%s\n", err_msg);
slapi_pblock_set(pb, SLAPI_PB_RESULT_TEXT, err_msg);
PR_smprintf_free(err_msg);
slapi_sdn_free(&targetsdn);
@@ -1538,7 +1538,7 @@ linked_attrs_pre_op(Slapi_PBlock * pb, int modop)
char *errstr = NULL;
int ret = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_pre_op\n");
if (0 == (dn = linked_attrs_get_dn(pb)))
@@ -1595,7 +1595,7 @@ linked_attrs_pre_op(Slapi_PBlock * pb, int modop)
slapi_entry_free(e);
if (ret) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_pre_op: operation failure [%d]\n", ret);
slapi_send_ldap_result(pb, ret, NULL, errstr, 0, NULL);
slapi_ch_free((void **)&errstr);
@@ -1603,7 +1603,7 @@ linked_attrs_pre_op(Slapi_PBlock * pb, int modop)
ret = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"<-- linked_attrs_pre_op\n");
return ret;
@@ -1633,7 +1633,7 @@ linked_attrs_mod_post_op(Slapi_PBlock *pb)
void *caller_id = NULL;
int rc = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_mod_post_op\n");
/* We don't want to process internal modify
@@ -1702,7 +1702,7 @@ linked_attrs_mod_post_op(Slapi_PBlock *pb)
rc = linked_attrs_replace_backpointers(pb, dn, config, smod);
break;
default:
- slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_mod_post_op: unknown mod
type\n" );
rc = SLAPI_PLUGIN_FAILURE;
break;
@@ -1710,7 +1710,7 @@ linked_attrs_mod_post_op(Slapi_PBlock *pb)
slapi_unlock_mutex(config->lock);
if(rc != LDAP_SUCCESS){
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_mod_post_op - update failed
(%d)\n",rc);
linked_attrs_unlock();
slapi_mod_done(next_mod);
@@ -1733,7 +1733,7 @@ linked_attrs_mod_post_op(Slapi_PBlock *pb)
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &rc);
rc = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"<-- linked_attrs_mod_post_op (%d)\n", rc);
return rc;
@@ -1746,7 +1746,7 @@ linked_attrs_add_post_op(Slapi_PBlock *pb)
char *dn = NULL;
int rc = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_add_post_op\n");
/* Reload config if a config entry was added. */
@@ -1754,7 +1754,7 @@ linked_attrs_add_post_op(Slapi_PBlock *pb)
if (linked_attrs_dn_is_config(dn))
linked_attrs_load_config();
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_add_post_op: Error "
"retrieving dn\n");
}
@@ -1795,7 +1795,7 @@ linked_attrs_add_post_op(Slapi_PBlock *pb)
slapi_unlock_mutex(config->lock);
slapi_valueset_free(vals);
if(rc != LDAP_SUCCESS){
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_add_post_op: update failed
(%d)\n",rc);
linked_attrs_unlock();
break;
@@ -1808,7 +1808,7 @@ linked_attrs_add_post_op(Slapi_PBlock *pb)
slapi_entry_next_attr(e, attr, &attr);
}
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_add_post_op: Error "
"retrieving post-op entry %s\n", dn);
}
@@ -1817,7 +1817,7 @@ linked_attrs_add_post_op(Slapi_PBlock *pb)
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &rc);
rc = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"<-- linked_attrs_add_post_op\n");
return rc;
@@ -1830,7 +1830,7 @@ linked_attrs_del_post_op(Slapi_PBlock *pb)
Slapi_Entry *e = NULL;
int rc = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_del_post_op\n");
/* Just bail if we aren't ready to service requests yet. */
@@ -1843,7 +1843,7 @@ linked_attrs_del_post_op(Slapi_PBlock *pb)
if (linked_attrs_dn_is_config(dn))
linked_attrs_load_config();
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_del_post_op: Error "
"retrieving dn\n");
}
@@ -1884,7 +1884,7 @@ linked_attrs_del_post_op(Slapi_PBlock *pb)
slapi_unlock_mutex(config->lock);
slapi_valueset_free(vals);
if (rc != LDAP_SUCCESS){
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_del_post_op - update failed
(%d)\n",rc);
linked_attrs_unlock();
break;
@@ -1919,7 +1919,7 @@ linked_attrs_del_post_op(Slapi_PBlock *pb)
slapi_valueset_free(vals);
config = NULL;
if(rc != LDAP_SUCCESS){
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_del_post_op: update failed
(%d)\n",rc);
linked_attrs_unlock();
goto bail;
@@ -1935,7 +1935,7 @@ linked_attrs_del_post_op(Slapi_PBlock *pb)
slapi_entry_next_attr(e, attr, &attr);
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_del_post_op: Error "
"retrieving pre-op entry %s\n", dn);
rc = SLAPI_PLUGIN_FAILURE;
@@ -1946,7 +1946,7 @@ bail:
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &rc);
rc = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"<-- linked_attrs_del_post_op\n");
return rc;
@@ -1963,7 +1963,7 @@ linked_attrs_modrdn_post_op(Slapi_PBlock *pb)
struct configEntry *config = NULL;
int rc = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_modrdn_post_op\n");
/* Just bail if we aren't ready to service requests yet. */
@@ -1978,7 +1978,7 @@ linked_attrs_modrdn_post_op(Slapi_PBlock *pb)
if (post_e) {
new_dn = slapi_entry_get_ndn(post_e);
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_modrdn_post_op: Error "
"retrieving post-op entry\n");
rc = LDAP_OPERATIONS_ERROR;
@@ -1989,7 +1989,7 @@ linked_attrs_modrdn_post_op(Slapi_PBlock *pb)
if (linked_attrs_dn_is_config(old_dn) || linked_attrs_dn_is_config(new_dn))
linked_attrs_load_config();
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_modrdn_post_op: Error "
"retrieving dn\n");
rc = LDAP_OPERATIONS_ERROR;
@@ -2028,7 +2028,7 @@ linked_attrs_modrdn_post_op(Slapi_PBlock *pb)
slapi_valueset_free(vals);
config = NULL;
if(rc != LDAP_SUCCESS){
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_modrdn_post_op: update failed(old
type) (%d)\n",rc);
linked_attrs_unlock();
break;
@@ -2055,7 +2055,7 @@ linked_attrs_modrdn_post_op(Slapi_PBlock *pb)
slapi_valueset_free(vals);
config = NULL;
if(rc != LDAP_SUCCESS){
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_modrdn_post_op: update failed(new
type) (%d)\n",rc);
linked_attrs_unlock();
break;
@@ -2085,7 +2085,7 @@ linked_attrs_modrdn_post_op(Slapi_PBlock *pb)
rc = linked_attrs_mod_backpointers(pb, old_dn, config->linktype,
config->scope, LDAP_MOD_DELETE,
vals);
if(rc != LDAP_SUCCESS){
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_modrdn_post_op: update
failed(old dn) (%d)\n",rc);
slapi_unlock_mutex(config->lock);
slapi_valueset_free(vals);
@@ -2101,7 +2101,7 @@ linked_attrs_modrdn_post_op(Slapi_PBlock *pb)
slapi_valueset_free(vals);
config = NULL;
if(rc != LDAP_SUCCESS){
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_modrdn_post_op: update
failed(new dn) (%d)\n",rc);
linked_attrs_unlock();
goto done;
@@ -2118,7 +2118,7 @@ linked_attrs_modrdn_post_op(Slapi_PBlock *pb)
}
done:
- slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"<-- linked_attrs_modrdn_post_op\n");
if (rc) {
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &rc);
@@ -2172,14 +2172,14 @@ linked_attrs_dump_config_index()
void
linked_attrs_dump_config_entry(struct configEntry * entry)
{
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"<==== Linked Attribute Pair =====>\n");
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"<---- config entry dn -----> %s\n", entry->dn);
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"<---- link type -----------> %s\n",
entry->linktype);
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"<---- managed type --------> %s\n",
entry->managedtype);
- slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"<---- scope ---------------> %s\n",
entry->scope);
}
diff --git a/ldap/servers/plugins/memberof/memberof.c
b/ldap/servers/plugins/memberof/memberof.c
index eae2b43..8c3a6ad 100644
--- a/ldap/servers/plugins/memberof/memberof.c
+++ b/ldap/servers/plugins/memberof/memberof.c
@@ -172,7 +172,7 @@ memberof_postop_init(Slapi_PBlock *pb)
int modfn = SLAPI_PLUGIN_POST_MODIFY_FN;
int addfn = SLAPI_PLUGIN_POST_ADD_FN;
- slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"--> memberof_postop_init\n" );
/* get args */
@@ -227,13 +227,13 @@ memberof_postop_init(Slapi_PBlock *pb)
NULL, /* ? */
memberof_plugin_identity /* access control */))
{
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_postop_init failed\n" );
ret = -1;
}
else if (ret)
{
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_postop_init failed\n" );
ret = -1;
}
@@ -248,18 +248,18 @@ memberof_postop_init(Slapi_PBlock *pb)
NULL, /* ? */
memberof_plugin_identity /* access control */))
{
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_preop_init failed\n" );
ret = -1;
}
else if (ret)
{
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_preop_init failed\n");
ret = -1;
}
- slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"<-- memberof_postop_init\n" );
return ret;
@@ -274,7 +274,7 @@ memberof_preop_init(Slapi_PBlock *pb)
slapi_pblock_set(pb, SLAPI_PLUGIN_DESCRIPTION, (void *) &pdesc) != 0 ||
slapi_pblock_set(pb, premodfn, (void *)memberof_shared_config_validate) != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_internal_postop_init: failed to register plugin\n");
status = -1;
}
@@ -299,7 +299,7 @@ memberof_internal_postop_init(Slapi_PBlock *pb)
(void *) memberof_postop_modify ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_INTERNAL_POST_ADD_FN,
(void *) memberof_postop_add ) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_internal_postop_init: failed to register plugin\n");
status = -1;
}
@@ -322,7 +322,7 @@ int memberof_postop_start(Slapi_PBlock *pb)
int result = 0;
int rc = 0;
- slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"--> memberof_postop_start\n" );
memberof_operation_lock = PR_NewMonitor();
@@ -350,7 +350,7 @@ int memberof_postop_start(Slapi_PBlock *pb)
if (LDAP_SUCCESS != result) {
if (result == LDAP_NO_SUCH_OBJECT) {
/* log an error and use the plugin entry for the config */
- slapi_log_error(SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_postop_start: Config entry \"%s\" does "
"not exist.\n", config_area);
rc = -1;
@@ -361,7 +361,7 @@ int memberof_postop_start(Slapi_PBlock *pb)
if(entries && entries[0]){
config_e = entries[0];
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_postop_start: Config entry \"%s\" was "
"not located.\n", config_area);
rc = -1;
@@ -371,7 +371,7 @@ int memberof_postop_start(Slapi_PBlock *pb)
} else {
/* The plugin entry itself contains the config */
if ( slapi_pblock_get( pb, SLAPI_ADD_ENTRY, &config_e ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"missing config entry\n" );
rc = -1;
goto bail;
@@ -380,7 +380,7 @@ int memberof_postop_start(Slapi_PBlock *pb)
memberof_set_config_area(slapi_entry_get_sdn(config_e));
if (( rc = memberof_config( config_e, pb )) != LDAP_SUCCESS ) {
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"configuration failed (%s)\n", ldap_err2string( rc ));
rc = -1;
goto bail;
@@ -406,7 +406,7 @@ bail:
slapi_free_search_results_internal(search_pb);
slapi_pblock_destroy(search_pb);
- slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"<-- memberof_postop_start\n" );
return rc;
@@ -420,7 +420,7 @@ bail:
*/
int memberof_postop_close(Slapi_PBlock *pb)
{
- slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"--> memberof_postop_close\n" );
slapi_plugin_task_unregister_handler("memberof task", memberof_task_add);
@@ -432,7 +432,7 @@ int memberof_postop_close(Slapi_PBlock *pb)
PR_DestroyMonitor(memberof_operation_lock);
memberof_operation_lock = NULL;
- slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"<-- memberof_postop_close\n" );
return 0;
}
@@ -496,7 +496,7 @@ int memberof_postop_del(Slapi_PBlock *pb)
Slapi_DN *sdn;
void *caller_id = NULL;
- slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"--> memberof_postop_del\n" );
/* We don't want to process internal modify
@@ -529,7 +529,7 @@ int memberof_postop_del(Slapi_PBlock *pb)
* membership lists of groups
*/
if((ret = memberof_del_dn_from_groups(pb, &configCopy, sdn))){
- slapi_log_error(SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_postop_del: error deleting dn (%s) from group. Error
(%d)\n",
slapi_sdn_get_dn(sdn),ret);
memberof_unlock();
@@ -548,7 +548,7 @@ int memberof_postop_del(Slapi_PBlock *pb)
if (0 == slapi_entry_attr_find(e, configCopy.groupattrs[i], &attr))
{
if((ret = memberof_del_attr_list(pb, &configCopy, sdn, attr))){
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_postop_del: error deleting attr list - dn (%s). Error
(%d)\n",
slapi_sdn_get_dn(sdn),ret);
}
@@ -565,7 +565,7 @@ bail:
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &ret);
ret = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"<-- memberof_postop_del\n" );
return ret;
}
@@ -806,7 +806,7 @@ int memberof_postop_modrdn(Slapi_PBlock *pb)
int ret = SLAPI_PLUGIN_SUCCESS;
void *caller_id = NULL;
- slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"--> memberof_postop_modrdn\n" );
/* We don't want to process internal modify
@@ -866,7 +866,7 @@ int memberof_postop_modrdn(Slapi_PBlock *pb)
if((ret = memberof_moddn_attr_list(pb, &configCopy, pre_sdn,
post_sdn, attr) != 0))
{
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_postop_modrdn - update failed for (%s), error (%d)\n",
slapi_sdn_get_dn(pre_sdn), ret);
break;
@@ -881,7 +881,7 @@ int memberof_postop_modrdn(Slapi_PBlock *pb)
if (ret == LDAP_SUCCESS && pre_sdn && post_sdn) {
if (!memberof_entry_in_scope(&configCopy, post_sdn)){
if((ret = memberof_del_dn_from_groups(pb, &configCopy, pre_sdn))){
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_postop_modrdn - delete dn failed for (%s), error (%d)\n",
slapi_sdn_get_dn(pre_sdn), ret);
}
@@ -896,7 +896,7 @@ int memberof_postop_modrdn(Slapi_PBlock *pb)
for (i = 0; configCopy.groupattrs[i] && ret == LDAP_SUCCESS; i++) {
if (0 == slapi_entry_attr_find(pre_e, configCopy.groupattrs[i], &attr)) {
if((ret = memberof_del_attr_list(pb, &configCopy, pre_sdn, attr))){
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_postop_modrdn: error deleting attr list - dn (%s). Error
(%d)\n",
slapi_sdn_get_dn(pre_sdn),ret);
}
@@ -907,14 +907,14 @@ int memberof_postop_modrdn(Slapi_PBlock *pb)
if(ret == LDAP_SUCCESS) {
memberof_del_dn_data del_data = {0, configCopy.memberof_attr};
if((ret = memberof_del_dn_type_callback(post_e, &del_data))){
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_postop_modrdn - delete dn callback failed for (%s), error
(%d)\n",
slapi_entry_get_dn(post_e), ret);
}
}
} else {
if((ret = memberof_replace_dn_from_groups(pb, &configCopy, pre_sdn, post_sdn))){
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_postop_modrdn - replace dn failed for (%s), error (%d)\n",
slapi_sdn_get_dn(pre_sdn), ret);
}
@@ -929,7 +929,7 @@ bail:
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &ret);
ret = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"<-- memberof_postop_modrdn\n" );
return ret;
}
@@ -1039,7 +1039,7 @@ int memberof_postop_modify(Slapi_PBlock *pb)
Slapi_Mod *next_mod = 0;
void *caller_id = NULL;
- slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"--> memberof_postop_modify\n" );
/* We don't want to process internal modify
@@ -1061,7 +1061,7 @@ int memberof_postop_modify(Slapi_PBlock *pb)
slapi_pblock_get(pb, SLAPI_ENTRY_POST_OP, &entry);
if(entry){
if( SLAPI_DSE_CALLBACK_ERROR == memberof_apply_config (pb, NULL, entry, &result,
returntext, NULL)){
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM, "%s",
returntext);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM, "%s",
returntext);
ret = SLAPI_PLUGIN_FAILURE;
goto done;
}
@@ -1134,7 +1134,7 @@ int memberof_postop_modify(Slapi_PBlock *pb)
{
/* add group DN to targets */
if((ret = memberof_add_smod_list(pb, &configCopy, sdn, smod))){
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_postop_modify: failed to add dn (%s) to target. "
"Error (%d)\n", slapi_sdn_get_dn(sdn), ret );
slapi_mod_done(next_mod);
@@ -1153,7 +1153,7 @@ int memberof_postop_modify(Slapi_PBlock *pb)
if (slapi_mod_get_num_values(smod) == 0)
{
if((ret = memberof_replace_list(pb, &configCopy, sdn))){
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_postop_modify: failed to replace list (%s). "
"Error (%d)\n", slapi_sdn_get_dn(sdn), ret );
slapi_mod_done(next_mod);
@@ -1165,7 +1165,7 @@ int memberof_postop_modify(Slapi_PBlock *pb)
{
/* remove group DN from target values in smod*/
if((ret = memberof_del_smod_list(pb, &configCopy, sdn, smod))){
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_postop_modify: failed to remove dn (%s). "
"Error (%d)\n", slapi_sdn_get_dn(sdn), ret );
slapi_mod_done(next_mod);
@@ -1180,7 +1180,7 @@ int memberof_postop_modify(Slapi_PBlock *pb)
{
/* replace current values */
if((ret = memberof_replace_list(pb, &configCopy, sdn))){
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_postop_modify: failed to replace values in dn (%s). "
"Error (%d)\n", slapi_sdn_get_dn(sdn), ret );
slapi_mod_done(next_mod);
@@ -1194,6 +1194,7 @@ int memberof_postop_modify(Slapi_PBlock *pb)
{
slapi_log_error(
SLAPI_LOG_FATAL,
+ LOG_ERR,
MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_postop_modify: unknown mod type\n" );
ret = SLAPI_PLUGIN_FAILURE;
@@ -1223,7 +1224,7 @@ done:
ret = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"<-- memberof_postop_modify\n" );
return ret;
}
@@ -1242,7 +1243,7 @@ int memberof_postop_add(Slapi_PBlock *pb)
Slapi_DN *sdn = 0;
void *caller_id = NULL;
- slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"--> memberof_postop_add\n" );
/* We don't want to process internal modify
@@ -1289,7 +1290,7 @@ int memberof_postop_add(Slapi_PBlock *pb)
if(0 == slapi_entry_attr_find(e, configCopy.groupattrs[i], &attr))
{
if((ret = memberof_add_attr_list(pb, &configCopy, sdn, attr))){
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_postop_add: failed to add dn(%s), error (%d)\n",
slapi_sdn_get_dn(sdn), ret);
break;
@@ -1308,7 +1309,7 @@ bail:
ret = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"<-- memberof_postop_add\n" );
return ret;
@@ -1331,7 +1332,7 @@ int memberof_oktodo(Slapi_PBlock *pb)
int ret = 1;
int oprc = 0;
- slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"--> memberof_postop_oktodo\n" );
if (!slapi_plugin_running(pb)) {
@@ -1341,7 +1342,7 @@ int memberof_oktodo(Slapi_PBlock *pb)
if(slapi_pblock_get(pb, SLAPI_PLUGIN_OPRETURN, &oprc) != 0)
{
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_postop_oktodo: could not get parameters\n" );
ret = -1;
}
@@ -1353,7 +1354,7 @@ int memberof_oktodo(Slapi_PBlock *pb)
}
bail:
- slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"<-- memberof_postop_oktodo\n" );
return ret;
@@ -1468,14 +1469,14 @@ memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig
*config,
}
if(to_dn_val == NULL){
const char *udn = op_to_sdn ? slapi_sdn_get_udn(op_to_sdn) : "";
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_modop_one_replace_r: failed to get DN value from "
"member value (%s)\n", udn);
goto bail;
}
if(this_dn_val == NULL){
const char *udn = op_this_sdn ? slapi_sdn_get_udn(op_this_sdn) : "";
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_modop_one_replace_r: failed to get DN value from"
"group (%s)\n", udn);
goto bail;
@@ -1485,7 +1486,7 @@ memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig
*config,
slapi_value_set_flags(to_dn_val, SLAPI_ATTR_FLAG_NORMALIZED_CIS);
if (config == NULL) {
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_modop_one_replace_r: NULL config parameter\n");
goto bail;
}
@@ -1546,7 +1547,7 @@ memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig
*config,
/* get result and log an error */
int res = 0;
slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_RESULT, &res);
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_modop_one_replace_r: error searching for members: %d\n", res);
} else {
slapi_pblock_get(search_pb, SLAPI_NENTRIES, &n_entries);
@@ -1592,7 +1593,7 @@ memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig
*config,
op_str = "UNKNOWN";
}
- slapi_log_error( SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_modop_one_replace_r: %s %s in %s\n"
,op_str, op_this, op_to);
@@ -1618,7 +1619,7 @@ memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig
*config,
/* someone set up infinitely
recursive groups - bail out */
- slapi_log_error( SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_modop_one_replace_r: group recursion"
" detected in %s\n"
@@ -1631,7 +1632,7 @@ memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig
*config,
}
/* do op on group */
- slapi_log_error( SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_modop_one_replace_r: descending into group %s\n",
op_to);
@@ -1675,7 +1676,7 @@ memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig
*config,
if (this_dn_val) {
strval = slapi_value_get_string(this_dn_val);
}
- slapi_log_error( SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_modop_one_replace_r: not processing memberOf "
"operations on self entry: %s\n", strval);
@@ -2074,7 +2075,7 @@ int memberof_get_groups_callback(Slapi_Entry *e, void
*callback_data)
if (!groupvals || !group_norm_vals)
{
- slapi_log_error( SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_get_groups_callback: NULL groupvals or group_norm_vals\n");
rc = -1;
goto bail;
@@ -2092,7 +2093,7 @@ int memberof_get_groups_callback(Slapi_Entry *e, void
*callback_data)
/* A recursive group caused us to find our original
* entry we passed to memberof_get_groups(). We just
* skip processing this entry. */
- slapi_log_error( SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_get_groups_callback: group recursion"
" detected in %s\n" ,group_ndn);
slapi_value_free(&group_ndn_val);
@@ -2111,7 +2112,7 @@ int memberof_get_groups_callback(Slapi_Entry *e, void
*callback_data)
* a member of a group through multiple paths. Either
* way, we can just skip processing this entry since we've
* already gone through this part of the grouping hierarchy. */
- slapi_log_error( SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_get_groups_callback: possible group recursion"
" detected in %s\n" ,group_ndn);
slapi_value_free(&group_ndn_val);
@@ -2644,7 +2645,7 @@ void memberof_fixup_task_thread(void *arg)
return; /* no task */
}
slapi_task_inc_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_fixup_task_thread --> refcount incremented.\n"
);
/* Fetch our task data from the task */
td = (task_data *)slapi_task_get_data(task);
@@ -2655,7 +2656,7 @@ void memberof_fixup_task_thread(void *arg)
slapi_task_begin(task, 1);
slapi_task_log_notice(task, "Memberof task starts (arg: %s) ...\n",
td->filter_str);
- slapi_log_error(SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"Memberof task starts (arg: %s) ...\n", td->filter_str);
/* We need to get the config lock first. Trying to get the
@@ -2678,11 +2679,11 @@ void memberof_fixup_task_thread(void *arg)
slapi_pblock_set(fixup_pb, SLAPI_BACKEND, be);
rc = slapi_back_transaction_begin(fixup_pb);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_fixup_task_thread: failed to start transaction\n");
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_fixup_task_thread: failed to get be backend from %s\n",
td->dn);
}
@@ -2710,13 +2711,13 @@ void memberof_fixup_task_thread(void *arg)
slapi_task_log_notice(task, "Memberof task finished.");
slapi_task_log_status(task, "Memberof task finished.");
slapi_task_inc_progress(task);
- slapi_log_error(SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"Memberof task finished (arg: %s) ...\n", td->filter_str);
/* this will queue the destruction of the task */
slapi_task_finish(task, rc);
slapi_task_dec_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_fixup_task_thread <-- refcount decremented.\n");
}
@@ -2793,7 +2794,7 @@ int memberof_task_add(Slapi_PBlock *pb, Slapi_Entry *e,
PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL)
{
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"unable to create task thread!\n");
*returncode = LDAP_OPERATIONS_ERROR;
slapi_task_finish(task, *returncode);
@@ -2809,7 +2810,7 @@ out:
void
memberof_task_destructor(Slapi_Task *task)
{
- slapi_log_error( SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_task_destructor -->\n" );
if (task) {
task_data *mydata = (task_data *)slapi_task_get_data(task);
@@ -2825,7 +2826,7 @@ memberof_task_destructor(Slapi_Task *task)
slapi_ch_free((void **)&mydata);
}
}
- slapi_log_error( SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_task_destructor <--\n" );
}
@@ -2992,7 +2993,7 @@ memberof_add_objectclass(char *auto_add_oc, const char *dn)
slapi_pblock_get(mod_pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if (rc){
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"Failed to add objectclass (%s) to entry (%s)\n",
auto_add_oc, dn);
}
diff --git a/ldap/servers/plugins/memberof/memberof.h
b/ldap/servers/plugins/memberof/memberof.h
index bea0353..9a3a6a2 100644
--- a/ldap/servers/plugins/memberof/memberof.h
+++ b/ldap/servers/plugins/memberof/memberof.h
@@ -32,7 +32,7 @@
/*
* macros
*/
-#define MEMBEROF_PLUGIN_SUBSYSTEM "memberof-plugin" /* used for logging */
+#define MEMBEROF_PLUGIN_SUBSYSTEM "memberof-plugin" /* used for logging */
#define MEMBEROF_INT_PREOP_DESC "memberOf internal postop plugin"
#define MEMBEROF_PREOP_DESC "memberof preop plugin"
#define MEMBEROF_GROUP_ATTR "memberOfGroupAttr"
diff --git a/ldap/servers/plugins/memberof/memberof_config.c
b/ldap/servers/plugins/memberof/memberof_config.c
index d2f8414..556f362 100644
--- a/ldap/servers/plugins/memberof/memberof_config.c
+++ b/ldap/servers/plugins/memberof/memberof_config.c
@@ -89,7 +89,7 @@ memberof_config(Slapi_Entry *config_e, Slapi_PBlock *pb)
char returntext[SLAPI_DSE_RETURNTEXT_SIZE];
if ( inited ) {
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"only one memberOf plugin instance can be used\n" );
return( LDAP_PARAM_ERROR );
}
@@ -130,7 +130,7 @@ memberof_config(Slapi_Entry *config_e, Slapi_PBlock *pb)
inited = 1;
if (returncode != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"Error %d: %s\n", returncode, returntext);
}
@@ -297,7 +297,7 @@ memberof_validate_config (Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entr
rc = slapi_dn_syntax_check(pb, config_dn, 1);
if (rc) { /* syntax check failed */
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_validate_config: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_validate_config: "
"%s does not contain a valid DN (%s)\n",
SLAPI_PLUGIN_SHARED_CONFIG_AREA, config_dn);
*returncode = LDAP_INVALID_DN_SYNTAX;
@@ -483,7 +483,7 @@ memberof_apply_config (Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry*
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE,
"memberof_apply_config: Failed to locate shared config entry (%s)",
sharedcfg);
- slapi_log_error( SLAPI_LOG_FATAL,
MEMBEROF_PLUGIN_SUBSYSTEM,"%s\n",returntext);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
MEMBEROF_PLUGIN_SUBSYSTEM,"%s\n",returntext);
*returncode = LDAP_UNWILLING_TO_PERFORM;
goto done;
}
@@ -586,7 +586,7 @@ memberof_apply_config (Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry*
*/
if ((theConfig.group_filter = slapi_str2filter(filter_str)) == NULL)
{
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"Unable to create the group check filter. The memberOf "
"plug-in will not operate on changes to groups. Please check "
"your %s configuration settings. (filter: %s)\n",
@@ -988,7 +988,7 @@ bail:
if (ret){
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &ret);
slapi_pblock_set(pb, SLAPI_PB_RESULT_TEXT, returntext);
- slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_shared_config_validate: %s/n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_shared_config_validate: %s/n",
returntext);
}
slapi_sdn_free(&config_sdn);
diff --git a/ldap/servers/plugins/mep/mep.c b/ldap/servers/plugins/mep/mep.c
index a59cfd8..2237868 100644
--- a/ldap/servers/plugins/mep/mep.c
+++ b/ldap/servers/plugins/mep/mep.c
@@ -159,7 +159,7 @@ mep_init(Slapi_PBlock *pb)
int predel = SLAPI_PLUGIN_PRE_DELETE_FN;
int premdn = SLAPI_PLUGIN_PRE_MODRDN_FN;
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"--> mep_init\n");
if ((slapi_pblock_get(pb, SLAPI_PLUGIN_CONFIG_ENTRY, &plugin_entry) == 0)
&&
@@ -193,7 +193,7 @@ mep_init(Slapi_PBlock *pb)
slapi_pblock_set(pb, preadd, (void *) mep_add_pre_op) != 0 ||
slapi_pblock_set(pb, predel, (void *) mep_del_pre_op) != 0 ||
slapi_pblock_set(pb, premdn, (void *) mep_modrdn_pre_op) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_init: failed to register plugin\n");
status = -1;
}
@@ -207,7 +207,7 @@ mep_init(Slapi_PBlock *pb)
NULL, /* ? */
plugin_identity /* access control */
)) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_init: failed to register internalpostoperation
plugin\n");
status = -1;
}
@@ -222,13 +222,13 @@ mep_init(Slapi_PBlock *pb)
NULL, /* ? */
plugin_identity /* access control */
)) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_init: failed to register plugin\n");
status = -1;
}
}
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"<-- mep_init\n");
return status;
}
@@ -251,7 +251,7 @@ mep_internal_postop_init(Slapi_PBlock *pb)
(void *) mep_mod_post_op) != 0 ||
slapi_pblock_set(pb, SLAPI_PLUGIN_INTERNAL_POST_MODRDN_FN,
(void *) mep_modrdn_post_op) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_internal_postop_init: failed to register
plugin\n");
status = -1;
}
@@ -283,7 +283,7 @@ mep_postop_init(Slapi_PBlock *pb)
slapi_pblock_set(pb, delfn, (void *) mep_del_post_op) != 0 ||
slapi_pblock_set(pb, modfn, (void *) mep_mod_post_op) != 0 ||
slapi_pblock_set(pb, mdnfn, (void *) mep_modrdn_post_op) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_postop_init: failed to register plugin\n");
status = -1;
}
@@ -303,13 +303,13 @@ mep_start(Slapi_PBlock * pb)
Slapi_DN *plugindn = NULL;
char *config_area = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"--> mep_start\n");
g_mep_config_lock = slapi_new_rwlock();
if (!g_mep_config_lock) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_start: lock creation failed\n");
return -1;
@@ -320,7 +320,7 @@ mep_start(Slapi_PBlock * pb)
* and store it for future use. */
slapi_pblock_get(pb, SLAPI_TARGET_SDN, &plugindn);
if (NULL == plugindn || 0 == slapi_sdn_get_ndn_len(plugindn)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"mep_start: unable to retrieve plugin dn\n");
return -1;
}
@@ -340,14 +340,14 @@ mep_start(Slapi_PBlock * pb)
PR_INIT_CLIST(g_mep_config);
if (mep_load_config() != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_start: unable to load plug-in configuration\n");
return -1;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"managed entries plug-in: ready for service\n");
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"<-- mep_start\n");
return 0;
@@ -361,7 +361,7 @@ mep_start(Slapi_PBlock * pb)
static int
mep_close(Slapi_PBlock * pb)
{
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"--> mep_close\n");
mep_delete_config();
@@ -371,7 +371,7 @@ mep_close(Slapi_PBlock * pb)
slapi_sdn_free(&_PluginDN);
slapi_sdn_free(&_ConfigAreaDN);
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"<-- mep_close\n");
return 0;
@@ -398,7 +398,7 @@ mep_load_config(void)
Slapi_PBlock *search_pb;
Slapi_Entry **entries = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"--> mep_load_config\n");
/* Clear out any old config. */
@@ -413,7 +413,7 @@ mep_load_config(void)
* config entry. */
if (mep_get_config_area()) {
/* Find the config entries beneath the alternate config area. */
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"mep_load_config: Looking for config entries "
"beneath \"%s\".\n",
slapi_sdn_get_ndn(mep_get_config_area()));
slapi_search_internal_set_pb(search_pb,
slapi_sdn_get_ndn(mep_get_config_area()),
@@ -421,7 +421,7 @@ mep_load_config(void)
NULL, 0, NULL, NULL, mep_get_plugin_id(), 0);
} else {
/* Find the config entries beneath our plugin entry. */
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"mep_load_config: Looking for config entries "
"beneath \"%s\".\n",
slapi_sdn_get_ndn(mep_get_plugin_sdn()));
@@ -436,7 +436,7 @@ mep_load_config(void)
if (LDAP_SUCCESS != result) {
if (mep_get_config_area() && (result == LDAP_NO_SUCH_OBJECT)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"mep_load_config: Config container \"%s\" does
"
"not exist.\n",
slapi_sdn_get_ndn(mep_get_config_area()));
goto cleanup;
@@ -461,7 +461,7 @@ mep_load_config(void)
slapi_free_search_results_internal(search_pb);
slapi_pblock_destroy(search_pb);
mep_config_unlock();
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"<-- mep_load_config\n");
return status;
@@ -487,7 +487,7 @@ mep_parse_config_entry(Slapi_Entry * e, int apply)
int entry_added = 0;
int ret = 0;
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"--> mep_parse_config_entry\n");
/* If this is the main plug-in
@@ -507,14 +507,14 @@ mep_parse_config_entry(Slapi_Entry * e, int apply)
entry->sdn = slapi_sdn_dup(slapi_entry_get_sdn(e));
if(entry->sdn == NULL){
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_parse_config_entry: Error "
"reading dn from config entry\n");
ret = -1;
goto bail;
}
- slapi_log_error(SLAPI_LOG_CONFIG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"----------> dn [%s]\n",
slapi_sdn_get_dn(entry->sdn));
/* Load the origin scope */
@@ -522,7 +522,7 @@ mep_parse_config_entry(Slapi_Entry * e, int apply)
if (value) {
entry->origin_scope = value;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_parse_config_entry: The %s config "
"setting is required for config entry
\"%s\".\n",
MEP_SCOPE_TYPE, slapi_sdn_get_dn(entry->sdn));
@@ -535,7 +535,7 @@ mep_parse_config_entry(Slapi_Entry * e, int apply)
if (value) {
/* Convert to a Slapi_Filter to improve performance. */
if (NULL == (entry->origin_filter = slapi_str2filter(value))) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM ,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM ,
"mep_parse_config_entry: Invalid search filter in "
"%s config setting for config entry \"%s\" "
"(filter = \"%s\").\n", MEP_FILTER_TYPE,
slapi_sdn_get_dn(entry->sdn), value);
@@ -548,7 +548,7 @@ mep_parse_config_entry(Slapi_Entry * e, int apply)
goto bail;
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_parse_config_entry: The %s config "
"setting is required for config entry
\"%s\".\n",
MEP_FILTER_TYPE, slapi_sdn_get_dn(entry->sdn));
@@ -561,7 +561,7 @@ mep_parse_config_entry(Slapi_Entry * e, int apply)
if (value) {
entry->managed_base = value;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_parse_config_entry: The %s config "
"setting is required for config entry
\"%s\".\n",
MEP_MANAGED_BASE_TYPE, slapi_sdn_get_dn(entry->sdn));
@@ -582,7 +582,7 @@ mep_parse_config_entry(Slapi_Entry * e, int apply)
&entry->template_entry, mep_get_plugin_id());
if (entry->template_entry == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_parse_config_entry: The managed entry "
"template \"%s\" does not exist. Please
"
"add it or correct the %s config setting for "
@@ -596,7 +596,7 @@ mep_parse_config_entry(Slapi_Entry * e, int apply)
* entry and running a schema check on it */
test_entry = mep_create_managed_entry(entry, NULL);
if (test_entry == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_parse_config_entry: Unable to create "
"a test managed entry from managed entry "
"template \"%s\". Please check the template
"
@@ -607,7 +607,7 @@ mep_parse_config_entry(Slapi_Entry * e, int apply)
/* Check the schema */
if (slapi_entry_schema_check(NULL, test_entry) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_parse_config_entry: Test managed "
"entry created from managed entry template "
"\"%s\" violates the schema. Please check
"
@@ -627,7 +627,7 @@ mep_parse_config_entry(Slapi_Entry * e, int apply)
slapi_entry_free(test_entry);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_parse_config_entry: The %s config "
"setting is required for config entry
\"%s\".\n",
MEP_MANAGED_TEMPLATE_TYPE, slapi_sdn_get_dn(entry->sdn));
@@ -652,7 +652,7 @@ mep_parse_config_entry(Slapi_Entry * e, int apply)
* the entry before that list item. */
if (slapi_dn_issuffix(entry->origin_scope, config_entry->origin_scope))
{
PR_INSERT_BEFORE(&(entry->list), list);
- slapi_log_error(SLAPI_LOG_CONFIG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"store [%s] before [%s] \n",
slapi_sdn_get_dn(entry->sdn),
slapi_sdn_get_dn(config_entry->sdn));
@@ -665,7 +665,7 @@ mep_parse_config_entry(Slapi_Entry * e, int apply)
/* If we hit the end of the list, add to the tail. */
if (g_mep_config == list) {
PR_INSERT_BEFORE(&(entry->list), list);
- slapi_log_error(SLAPI_LOG_CONFIG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"store [%s] at tail\n",
slapi_sdn_get_dn(entry->sdn));
entry_added = 1;
@@ -675,7 +675,7 @@ mep_parse_config_entry(Slapi_Entry * e, int apply)
} else {
/* first entry */
PR_INSERT_LINK(&(entry->list), g_mep_config);
- slapi_log_error(SLAPI_LOG_CONFIG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"store [%s] at head \n",
slapi_sdn_get_dn(entry->sdn));
entry_added = 1;
@@ -685,7 +685,7 @@ mep_parse_config_entry(Slapi_Entry * e, int apply)
if (0 == entry_added) {
/* Don't log error if we weren't asked to apply config */
if ((apply != 0) && (entry != NULL)) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_parse_config_entry: Invalid config entry "
"[%s] skipped\n",
slapi_sdn_get_dn(entry->sdn));
}
@@ -694,7 +694,7 @@ mep_parse_config_entry(Slapi_Entry * e, int apply)
ret = 0;
}
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"<-- mep_parse_config_entry\n");
return ret;
@@ -709,7 +709,7 @@ mep_free_config_entry(struct configEntry ** entry)
return;
if (e->sdn) {
- slapi_log_error(SLAPI_LOG_CONFIG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"freeing config entry [%s]\n",
slapi_sdn_get_dn(e->sdn));
slapi_sdn_free(&e->sdn);
}
@@ -789,7 +789,7 @@ mep_parse_mapped_origin_attr(char *mapping, char **origin_type)
/* split out the type from the value (use the first ':') */
if ((p = strchr(mapping, ':')) == NULL) {
- slapi_log_error( SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_parse_mapped_origin_attr: Value for mapped attribute
"
"is not in the correct format. (value:
\"%s\").\n",
mapping);
@@ -799,7 +799,7 @@ mep_parse_mapped_origin_attr(char *mapping, char **origin_type)
/* Ensure the type is not empty. */
if (p == mapping) {
- slapi_log_error( SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_parse_mapped_origin_attr: Value for mapped attribute
"
"is not in the correct format. The type is missing. "
"(value: \"%s\").\n",
@@ -824,7 +824,7 @@ mep_parse_mapped_origin_attr(char *mapping, char **origin_type)
for (; p <= end; p++) {
if (*p == '$') {
if (p == end) {
- slapi_log_error( SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_parse_mapped_origin_attr: Invalid mapped
"
"attribute value for type \"%s\".\n",
mapping);
ret = 1;
@@ -853,7 +853,7 @@ mep_parse_mapped_origin_attr(char *mapping, char **origin_type)
if (p < end) {
p++;
} else {
- slapi_log_error( SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_parse_mapped_origin_attr: Invalid
mapped "
"attribute value for type
\"%s\".\n", mapping);
ret = 1;
@@ -874,7 +874,7 @@ mep_parse_mapped_origin_attr(char *mapping, char **origin_type)
/* If the variable is quoted and this is not a closing
* brace, there is a syntax error in the mapping rule. */
if (quoted && (*p != '}')) {
- slapi_log_error( SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_parse_mapped_origin_attr: Invalid
mapped "
"attribute value for type
\"%s\".\n", mapping);
ret = 1;
@@ -974,10 +974,10 @@ static Slapi_DN *
mep_get_sdn(Slapi_PBlock * pb)
{
Slapi_DN *sdn = 0;
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"--> mep_get_sdn\n");
slapi_pblock_get(pb, SLAPI_TARGET_SDN, &sdn);
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"<-- mep_get_sdn\n");
return sdn;
@@ -1005,7 +1005,7 @@ mep_dn_is_config(Slapi_DN *sdn)
{
int ret = 0;
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"--> mep_dn_is_config\n");
if (sdn == NULL) {
@@ -1029,7 +1029,7 @@ mep_dn_is_config(Slapi_DN *sdn)
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"<-- mep_dn_is_config\n");
return ret;
@@ -1155,11 +1155,11 @@ mep_oktodo(Slapi_PBlock *pb)
int ret = 1;
int oprc = 0;
- slapi_log_error( SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"--> mep_oktodo\n" );
if(slapi_pblock_get(pb, SLAPI_PLUGIN_OPRETURN, &oprc) != 0) {
- slapi_log_error( SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_oktodo: could not get parameters\n" );
ret = -1;
}
@@ -1169,7 +1169,7 @@ mep_oktodo(Slapi_PBlock *pb)
ret = 0;
}
- slapi_log_error( SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"<-- mep_oktodo\n" );
return ret;
@@ -1186,12 +1186,12 @@ mep_isrepl(Slapi_PBlock *pb)
{
int is_repl = 0;
- slapi_log_error( SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"--> mep_isrepl\n" );
slapi_pblock_get(pb, SLAPI_IS_REPLICATED_OPERATION, &is_repl);
- slapi_log_error( SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"<-- mep_isrepl\n" );
return is_repl;
@@ -1229,7 +1229,7 @@ mep_create_managed_entry(struct configEntry *config, Slapi_Entry
*origin)
/* Ensure that a RDN type was specified in the template. */
if ((rdn_type = slapi_entry_attr_get_charptr(template, MEP_RDN_ATTR_TYPE)) == NULL)
{
- slapi_log_error( SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_create_managed_entry: The %s config attribute "
"was not found in template \"%s\". This attribute
"
"is required.\n", MEP_RDN_ATTR_TYPE,
slapi_sdn_get_dn(config->template_sdn));
@@ -1248,7 +1248,7 @@ mep_create_managed_entry(struct configEntry *config, Slapi_Entry
*origin)
struct berval bvtype = {0, NULL}, bvvalue = {0, NULL};
int freeval = 0;
if (slapi_ldif_parse_line(vals[i], &bvtype, &bvvalue, &freeval) != 0)
{
- slapi_log_error( SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_create_managed_entry: Value for %s config setting
"
"is not in the correct format in template \"%s\".
"
"(value: \"%s\")\n", MEP_STATIC_ATTR_TYPE,
@@ -1289,7 +1289,7 @@ mep_create_managed_entry(struct configEntry *config, Slapi_Entry
*origin)
slapi_ch_free_string(&type);
slapi_ch_free_string(&value);
} else {
- slapi_log_error( SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_create_managed_entry: Error parsing mapped attribute
"
"in template \"%s\".\n",
slapi_sdn_get_dn(config->template_sdn));
err = 1;
@@ -1300,7 +1300,7 @@ mep_create_managed_entry(struct configEntry *config, Slapi_Entry
*origin)
/* The RDN attribute must be a mapped attribute. If we didn't find it,
* we need to bail. */
if (!found_rdn_map) {
- slapi_log_error( SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_create_managed_entry: The RDN type \"%s\"
"
"was not found as a mapped attribute in template "
"\"%s\". It must be a mapped attribute.\n",
@@ -1336,7 +1336,7 @@ mep_create_managed_entry(struct configEntry *config, Slapi_Entry
*origin)
if (dn != NULL) {
slapi_sdn_set_dn_passin(slapi_entry_get_sdn(managed_entry), dn);
} else {
- slapi_log_error( SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_create_managed_entry: Error setting DN "
"in managed entry based off of template entry "
"\"%s\" (origin entry
\"%s\").\n",
@@ -1385,14 +1385,14 @@ mep_add_managed_entry(struct configEntry *config,
int result = LDAP_SUCCESS;
/* Create the managed entry */
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"mep_add_managed_entry: Creating a managed "
"entry from origin entry \"%s\" using "
"config \"%s\".\n", slapi_entry_get_dn(origin),
slapi_sdn_get_dn(config->sdn));
managed_entry = mep_create_managed_entry(config, origin);
if (managed_entry == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_add_managed_entry: Unable to create a managed "
"entry from origin entry \"%s\" using config "
"\"%s\".\n", slapi_entry_get_dn(origin),
slapi_sdn_get_dn(config->sdn));
@@ -1404,7 +1404,7 @@ mep_add_managed_entry(struct configEntry *config,
managed_dn = slapi_ch_strdup(slapi_entry_get_dn(managed_entry));
/* Add managed entry to db. The entry will be consumed. */
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"Adding managed entry \"%s\" for origin "
"entry \"%s\"\n.", managed_dn,
slapi_entry_get_dn(origin));
slapi_add_entry_internal_set_pb(mod_pb, managed_entry, NULL,
@@ -1413,7 +1413,7 @@ mep_add_managed_entry(struct configEntry *config,
slapi_pblock_get(mod_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
if (result != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_add_managed_entry: Unable to add managed "
"entry \"%s\" for origin entry \"%s\"
(%s).\n",
managed_dn, slapi_entry_get_dn(origin),
@@ -1448,7 +1448,7 @@ mep_add_managed_entry(struct configEntry *config,
slapi_modify_internal_pb(mod_pb);
slapi_pblock_get(mod_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
if (result != LDAP_SUCCESS && result != LDAP_TYPE_OR_VALUE_EXISTS){
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_add_managed_entry: Failed to add managed entry
"
"objectclass in origin entry \"%s\", error
(%s)\n",
slapi_entry_get_dn(origin), ldap_err2string(result));
@@ -1467,7 +1467,7 @@ mep_add_managed_entry(struct configEntry *config,
mods[0] = &pointer_mod;
mods[1] = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"Adding %s pointer to \"%s\" in entry
\"%s\"\n.",
MEP_MANAGED_ENTRY_TYPE, managed_dn, slapi_entry_get_dn(origin));
@@ -1477,7 +1477,7 @@ mep_add_managed_entry(struct configEntry *config,
slapi_pblock_get(mod_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
if (result != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_add_managed_entry: Unable to add pointer to "
"managed entry \"%s\" in origin entry
\"%s\" "
"(%s).\n", managed_dn, slapi_entry_get_dn(origin),
@@ -1524,7 +1524,7 @@ mep_rename_managed_entry(Slapi_Entry *origin,
slapi_pblock_get(mep_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
if (result != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_rename_managed_entry: Unable to rename managed "
"entry \"%s\" to \"%s\" (%s).\n",
slapi_sdn_get_dn(old_dn),
slapi_sdn_get_dn(new_dn), ldap_err2string(result));
@@ -1542,7 +1542,7 @@ mep_rename_managed_entry(Slapi_Entry *origin,
mods[1] = 0;
/* Perform the modify operation. */
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"mep_rename_managed_entry: Updating %s pointer to "
"\"%s\" in entry \"%s\"\n.",
MEP_MANAGED_ENTRY_TYPE,
vals[0], slapi_entry_get_dn(origin));
@@ -1552,7 +1552,7 @@ mep_rename_managed_entry(Slapi_Entry *origin,
slapi_pblock_get(mep_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
if (result != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_rename_managed_entry: Unable to update %s "
"pointer in entry \"%s\" (%s).\n",
MEP_MANAGED_ENTRY_TYPE,
slapi_entry_get_dn(origin), ldap_err2string(result));
@@ -1603,7 +1603,7 @@ static Slapi_Mods *mep_get_mapped_mods(struct configEntry *config,
/* Find the the RDN type for the managed entry. */
if ((rdn_type = slapi_entry_attr_get_charptr(template, MEP_RDN_ATTR_TYPE)) == NULL)
{
- slapi_log_error( SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_get_mapped_mods: Error getting RDN type from tempate "
"\"%s\".\n",
slapi_sdn_get_dn(config->template_sdn));
slapi_mods_free(&smods);
@@ -1629,7 +1629,7 @@ static Slapi_Mods *mep_get_mapped_mods(struct configEntry *config,
slapi_ch_free_string(&type);
slapi_ch_free_string(&value);
} else {
- slapi_log_error( SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_get_mapped_mods: Error parsing mapped attribute "
"in template \"%s\".\n",
slapi_sdn_get_dn(config->template_sdn));
slapi_mods_free(&smods);
@@ -1670,7 +1670,7 @@ mep_parse_mapped_attr(char *mapping, Slapi_Entry *origin,
/* split out the type from the value (use the first ':') */
if ((p = strchr(mapping, ':')) == NULL) {
- slapi_log_error( SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_parse_mapped_attr: Value for mapped attribute "
"is not in the correct format. (value:
\"%s\").\n",
mapping);
@@ -1680,7 +1680,7 @@ mep_parse_mapped_attr(char *mapping, Slapi_Entry *origin,
/* Ensure the type is not empty. */
if (p == mapping) {
- slapi_log_error( SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_parse_mapped_attr: Value for mapped attribute "
"is not in the correct format. The type is missing. "
"(value: \"%s\").\n",
@@ -1710,7 +1710,7 @@ mep_parse_mapped_attr(char *mapping, Slapi_Entry *origin,
for (; p <= end; p++) {
if (*p == '$') {
if (p == end) {
- slapi_log_error( SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_parse_mapped_attr: Invalid mapped "
"attribute value for type \"%s\".\n",
mapping);
ret = 1;
@@ -1739,7 +1739,7 @@ mep_parse_mapped_attr(char *mapping, Slapi_Entry *origin,
if (p < end) {
p++;
} else {
- slapi_log_error( SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_parse_mapped_attr: Invalid mapped
"
"attribute value for type
\"%s\".\n", mapping);
ret = 1;
@@ -1760,7 +1760,7 @@ mep_parse_mapped_attr(char *mapping, Slapi_Entry *origin,
/* If the variable is quoted and this is not a closing
* brace, there is a syntax error in the mapping rule. */
if (quoted && (*p != '}')) {
- slapi_log_error( SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_parse_mapped_attr: Invalid mapped
"
"attribute value for type
\"%s\".\n", mapping);
ret = 1;
@@ -1805,7 +1805,7 @@ mep_parse_mapped_attr(char *mapping, Slapi_Entry *origin,
for (p = post_str; p && (p <= end); p++) {
if (*p == '$') {
if ((p == end) || (*(p+1) != '$')) {
- slapi_log_error( SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
MEP_PLUGIN_SUBSYSTEM,
"mep_parse_mapped_attr: Invalid mapped
"
"attribute value for type
\"%s\".\n", mapping);
ret = 1;
@@ -1847,7 +1847,7 @@ mep_parse_mapped_attr(char *mapping, Slapi_Entry *origin,
slapi_ch_free_string(&map_val);
}
} else {
- slapi_log_error( SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_parse_mapped_attr: Mapped attribute \"%s\"
"
"is not present in origin entry \"%s\". Please
"
"correct template to only map attributes "
@@ -1862,7 +1862,7 @@ mep_parse_mapped_attr(char *mapping, Slapi_Entry *origin,
post_str);
}
} else {
- slapi_log_error( SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_parse_mapped_attr: No variable found in "
"mapped attribute value for type \"%s\".\n",
mapping);
@@ -1969,7 +1969,7 @@ mep_pre_op(Slapi_PBlock * pb, int modop)
void *caller_id = NULL;
int ret = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"--> mep_pre_op\n");
/* See if we're calling ourselves. */
@@ -2198,7 +2198,7 @@ mep_pre_op(Slapi_PBlock * pb, int modop)
slapi_mod_free(&next_mod);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
MEP_PLUGIN_SUBSYSTEM,
"mep_pre_op: Unable to fetch config for
"
"origin entry \"%s\".\n",
origin_dn);
}
@@ -2210,11 +2210,11 @@ mep_pre_op(Slapi_PBlock * pb, int modop)
slapi_pblock_get(pb, SLAPI_OPERATION, &op);
if(operation_is_flag_set(op, OP_FLAG_INTERNAL)){
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
MEP_PLUGIN_SUBSYSTEM,
"mep_pre_op: (internal operation) Unable to
fetch "
"origin entry \"%s\".\n",
origin_dn);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
MEP_PLUGIN_SUBSYSTEM,
"mep_pre_op: Unable to fetch origin entry
"
"\"%s\".\n", origin_dn);
}
@@ -2243,7 +2243,7 @@ mep_pre_op(Slapi_PBlock * pb, int modop)
slapi_entry_free(e);
if (ret) {
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"mep_pre_op: operation failure [%d]\n", ret);
slapi_send_ldap_result(pb, ret, NULL, errstr, 0, NULL);
slapi_ch_free((void **)&errstr);
@@ -2251,7 +2251,7 @@ mep_pre_op(Slapi_PBlock * pb, int modop)
ret = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"<-- mep_pre_op\n");
return ret;
@@ -2297,7 +2297,7 @@ mep_mod_post_op(Slapi_PBlock *pb)
LDAPMod **mods = NULL;
int i, abort_mod = 1;
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"--> mep_mod_post_op\n");
if (mep_oktodo(pb) && (sdn = mep_get_sdn(pb))) {
@@ -2315,7 +2315,7 @@ mep_mod_post_op(Slapi_PBlock *pb)
* backend, so don't treat the message as fatal. */
slapi_pblock_get(pb, SLAPI_ENTRY_POST_OP, &e);
if (e == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_mod_post_op: Unable to fetch postop
entry.\n");
result = SLAPI_PLUGIN_FAILURE;
goto bail;
@@ -2369,7 +2369,7 @@ mep_mod_post_op(Slapi_PBlock *pb)
mep_pb = slapi_pblock_new();
/* Perform the modify operation. */
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"mep_mod_post_op: Updating mapped attributes "
"in entry \"%s\"\n.", managed_dn);
slapi_modify_internal_set_pb(mep_pb, managed_dn,
@@ -2379,7 +2379,7 @@ mep_mod_post_op(Slapi_PBlock *pb)
slapi_pblock_get(mep_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
if (result != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_mod_post_op: Unable to update mapped
"
"attributes from origin entry \"%s\"
in managed "
"entry \"%s\" (%s).\n",
slapi_sdn_get_dn(sdn), managed_dn,
@@ -2403,7 +2403,7 @@ mep_mod_post_op(Slapi_PBlock *pb)
slapi_sdn_free(&managed_sdn);
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_mod_post_op: Unable to find config for origin "
"entry \"%s\".\n", slapi_sdn_get_dn(sdn));
}
@@ -2417,7 +2417,7 @@ bail:
result = SLAPI_PLUGIN_FAILURE;
}
slapi_ch_free_string(&managed_dn);
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"<-- mep_mod_post_op\n");
return result;
@@ -2431,7 +2431,7 @@ mep_add_post_op(Slapi_PBlock *pb)
struct configEntry *config = NULL;
int result = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"--> mep_add_post_op\n");
/* Reload config if a config entry was added. */
@@ -2440,7 +2440,7 @@ mep_add_post_op(Slapi_PBlock *pb)
mep_load_config();
}
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"mep_add_post_op: Error "
"retrieving dn\n");
}
@@ -2485,12 +2485,12 @@ mep_add_post_op(Slapi_PBlock *pb)
mep_config_unlock();
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"mep_add_post_op: Error "
"retrieving post-op entry %s\n",
slapi_sdn_get_dn(sdn));
}
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"<-- mep_add_post_op\n");
return result;
@@ -2503,7 +2503,7 @@ mep_del_post_op(Slapi_PBlock *pb)
Slapi_DN *sdn = NULL;
int result = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"--> mep_del_post_op\n");
/* Reload config if a config entry was deleted. */
@@ -2511,7 +2511,7 @@ mep_del_post_op(Slapi_PBlock *pb)
if (mep_dn_is_config(sdn))
mep_load_config();
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"mep_del_post_op: Error "
"retrieving dn\n");
}
@@ -2538,7 +2538,7 @@ mep_del_post_op(Slapi_PBlock *pb)
Slapi_PBlock *mep_pb = slapi_pblock_new();
/* Delete the managed entry. */
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"mep_del_post_op: Deleting managed entry "
"\"%s\" due to deletion of origin entry
"
"\"%s\".\n ", managed_dn,
slapi_sdn_get_dn(sdn));
@@ -2547,7 +2547,7 @@ mep_del_post_op(Slapi_PBlock *pb)
slapi_delete_internal_pb(mep_pb);
slapi_pblock_get(mep_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
if(result){
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_del_post_op: failed to delete managed entry
"
"(%s) - error (%d)\n",managed_dn, result);
}
@@ -2555,7 +2555,7 @@ mep_del_post_op(Slapi_PBlock *pb)
slapi_pblock_destroy(mep_pb);
}
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"mep_del_post_op: Error "
"retrieving pre-op entry %s\n",
slapi_sdn_get_dn(sdn));
}
@@ -2565,7 +2565,7 @@ mep_del_post_op(Slapi_PBlock *pb)
result = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"<-- mep_del_post_op\n");
return result;
@@ -2582,7 +2582,7 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
struct configEntry *config = NULL;
int result = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"--> mep_modrdn_post_op\n");
/* Just bail if we aren't ready to service requests yet. */
@@ -2597,7 +2597,7 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
new_sdn = slapi_entry_get_sdn(post_e);
new_dn = slapi_sdn_get_dn(new_sdn);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_modrdn_post_op: Error "
"retrieving post-op entry\n");
return SLAPI_PLUGIN_FAILURE;
@@ -2607,7 +2607,7 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
if (mep_dn_is_config(old_sdn) || mep_dn_is_config(new_sdn))
mep_load_config();
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"mep_modrdn_post_op: Error "
"retrieving dn\n");
}
@@ -2651,7 +2651,7 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
char *vals2[2];
/* Delete the associated managed entry. */
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"mep_modrdn_post_op: Removing managed entry \"%s\"
"
"since origin entry \"%s\" was moved out of
scope.\n",
managed_dn, slapi_sdn_get_dn(old_sdn));
@@ -2660,7 +2660,7 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
slapi_delete_internal_pb(mep_pb);
slapi_pblock_get(mep_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
if(result){
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_modrdn_post_op: failed to delete managed entry
"
"(%s) - error (%d)\n",managed_dn, result);
goto bailmod;
@@ -2686,7 +2686,7 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
mods[2] = 0;
/* Perform the modify operation. */
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"mep_modrdn_post_op: Removing %s pointer and %s "
"objectclass from entry \"%s\".\n",
MEP_MANAGED_ENTRY_TYPE, MEP_ORIGIN_OC, new_dn);
@@ -2696,7 +2696,7 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
slapi_pblock_get(mep_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
if (result != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_modrdn_post_op: Unable to remove %s "
"pointer and %s objectclass from entry "
"\"%s\".\n", MEP_MANAGED_ENTRY_TYPE,
@@ -2717,7 +2717,7 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
* we need to make to the existing managed entry. */
new_managed_entry = mep_create_managed_entry(config, post_e);
if (new_managed_entry == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_modrdn_post_op: Unable to create in-memory "
"managed entry from origin entry \"%s\".\n",
new_dn);
result = SLAPI_PLUGIN_FAILURE;
@@ -2740,7 +2740,7 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
}
/* Perform the modify operation. */
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"mep_modrdn_post_op: Updating %s pointer to \"%s\"
"
"in entry \"%s\".\n", MEP_MANAGED_BY_TYPE,
new_dn, managed_dn);
slapi_modify_internal_set_pb(mep_pb, managed_dn, mods, 0, 0,
@@ -2749,7 +2749,7 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
slapi_pblock_get(mep_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
if (result != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_modrdn_post_op: Unable to update pointer to "
"origin entry \"%s\" in managed entry
\"%s\" "
"(%s).\n", new_dn, managed_dn,
ldap_err2string(result));
@@ -2758,7 +2758,7 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
/* See if we need to rename the managed entry. */
if (slapi_sdn_compare(slapi_entry_get_sdn(new_managed_entry),
managed_sdn) != 0) {
/* Rename the managed entry. */
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"mep_modrdn_post_op: Renaming managed entry
"
"\"%s\" to \"%s\" due to
rename of origin "
"entry \"%s\".\n ", managed_dn,
@@ -2780,7 +2780,7 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
slapi_pblock_init(mep_pb);
/* Perform the modify operation. */
- slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"mep_modrdn_post_op: Updating mapped attributes "
"in entry \"%s\"\n.", managed_dn);
slapi_modify_internal_set_pb_ext(mep_pb,
@@ -2791,7 +2791,7 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
slapi_pblock_get(mep_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
if (result != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
"mep_modrdn_post_op: Unable to update mapped
"
"attributes from origin entry \"%s\"
in managed "
"entry \"%s\" (%s).\n", new_dn,
@@ -2847,7 +2847,7 @@ bailmod:
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &result);
result = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
"<-- mep_modrdn_post_op\n");
return result;
diff --git a/ldap/servers/plugins/pam_passthru/pam_ptconfig.c
b/ldap/servers/plugins/pam_passthru/pam_ptconfig.c
index 01f115d..a225330 100644
--- a/ldap/servers/plugins/pam_passthru/pam_ptconfig.c
+++ b/ldap/servers/plugins/pam_passthru/pam_ptconfig.c
@@ -52,7 +52,7 @@ pam_passthru_load_config(int skip_validate)
Slapi_PBlock *search_pb;
Slapi_Entry **entries = NULL;
- slapi_log_error( SLAPI_LOG_TRACE, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"=> pam_passthru_load_config\n");
pam_passthru_write_lock();
@@ -100,12 +100,12 @@ pam_passthru_load_config(int skip_validate)
if (skip_validate || (PAM_PASSTHRU_SUCCESS ==
pam_passthru_validate_config(entries[i], NULL))) {
if (PAM_PASSTHRU_FAILURE == pam_passthru_apply_config(entries[i])) {
- slapi_log_error( SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"pam_passthru_load_config: unable to apply config
"
"for entry \"%s\"\n",
slapi_entry_get_ndn(entries[i]));
}
} else {
- slapi_log_error( SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"pam_passthru_load_config: skipping invalid config
"
"entry \"%s\"\n",
slapi_entry_get_ndn(entries[i]));
}
@@ -115,7 +115,7 @@ pam_passthru_load_config(int skip_validate)
slapi_free_search_results_internal(search_pb);
slapi_pblock_destroy(search_pb);
pam_passthru_unlock();
- slapi_log_error(SLAPI_LOG_TRACE, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"<= pam_passthru_load_config\n");
return status;
@@ -279,7 +279,7 @@ parse_map_method(char *map_method, int *one, int *two, int *three,
char *returnt
"The map method in the string [%s] is invalid: must be "
"one of %s", map_method, get_map_method_values());
} else {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"The map method in the string [%s] is invalid: must be "
"one of %s\n", map_method, get_map_method_values());
}
@@ -293,7 +293,7 @@ parse_map_method(char *map_method, int *one, int *two, int *three,
char *returnt
"The map method in the string [%s] is invalid: must be "
"one of %s", map_method, get_map_method_values());
} else {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"The map method in the string [%s] is invalid: must be "
"one of %s\n", map_method, get_map_method_values());
}
@@ -307,7 +307,7 @@ parse_map_method(char *map_method, int *one, int *two, int *three,
char *returnt
"The map method in the string [%s] is invalid: must be "
"one of %s", map_method, get_map_method_values());
} else {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"The map method in the string [%s] is invalid: must be "
"one of %s\n", map_method, get_map_method_values());
}
@@ -320,7 +320,7 @@ parse_map_method(char *map_method, int *one, int *two, int *three,
char *returnt
"Invalid extra text [%s] after last map method",
((ptr && *ptr) ? *ptr : "(null)"));
} else {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"Invalid extra text [%s] after last map method\n",
((ptr && *ptr) ? *ptr : "(null)"));
}
@@ -337,13 +337,13 @@ print_suffixes(void)
{
void *cookie = NULL;
Slapi_DN *sdn = NULL;
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"The following is the list of valid suffixes to use with "
PAMPT_EXCLUDES_ATTR " and " PAMPT_INCLUDES_ATTR ":\n");
for (sdn = slapi_get_first_suffix(&cookie, 1);
sdn && cookie;
sdn = slapi_get_next_suffix(&cookie, 1)) {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"\t%s\n", slapi_sdn_get_dn(sdn));
}
}
@@ -376,7 +376,7 @@ pam_passthru_validate_config (Slapi_Entry* e, char *returntext)
"Error: valid values for %s are %s",
PAMPT_MISSING_SUFFIX_ATTR, get_missing_suffix_values());
} else {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"Error: valid values for %s are %s\n",
PAMPT_MISSING_SUFFIX_ATTR, get_missing_suffix_values());
}
@@ -422,7 +422,7 @@ pam_passthru_validate_config (Slapi_Entry* e, char *returntext)
}
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"The suffixes listed in %s or %s are not present in "
"this server\n", PAMPT_EXCLUDES_ATTR, PAMPT_INCLUDES_ATTR);
}
@@ -432,7 +432,7 @@ pam_passthru_validate_config (Slapi_Entry* e, char *returntext)
print_suffixes();
if (missing_suffix != PAMPT_MISSING_SUFFIX_ERROR) {
if (returntext) {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"Warning: %s\n", returntext);
*returntext = 0; /* log error, don't report back to user */
}
@@ -458,7 +458,7 @@ pam_passthru_validate_config (Slapi_Entry* e, char *returntext)
" was specified, but no %s was given",
PAMPT_MAP_METHOD_ENTRY_STRING, PAMPT_PAM_IDENT_ATTR);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"Error: the %s method was specified, but no %s was given\n",
PAMPT_MAP_METHOD_ENTRY_STRING, PAMPT_PAM_IDENT_ATTR);
}
@@ -472,7 +472,7 @@ pam_passthru_validate_config (Slapi_Entry* e, char *returntext)
" specified for %s, should be one or more of %s",
PAMPT_MAP_METHOD_ATTR, get_map_method_values());
} else {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"Error: no method(s) specified for %s, should be "
"one or more of %s\n", PAMPT_MAP_METHOD_ATTR,
get_map_method_values());
@@ -492,7 +492,7 @@ pam_passthru_validate_config (Slapi_Entry* e, char *returntext)
"filter specified for %s (filter: \"%s\")",
PAMPT_FILTER_ATTR, pam_filter_str);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"Error: invalid filter specified for %s "
"(filter: \"%s\")\n", PAMPT_FILTER_ATTR,
pam_filter_str);
@@ -658,7 +658,7 @@ pam_passthru_apply_config (Slapi_Entry* e)
if (pam_passthru_global_config == list) {
/* add to tail */
PR_INSERT_BEFORE(&(entry->list), list);
- slapi_log_error(SLAPI_LOG_CONFIG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG,
PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"store [%s] at tail\n", entry->dn);
inserted = 1;
break;
@@ -667,7 +667,7 @@ pam_passthru_apply_config (Slapi_Entry* e)
} else {
/* first entry */
PR_INSERT_LINK(&(entry->list), pam_passthru_global_config);
- slapi_log_error(SLAPI_LOG_CONFIG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"store [%s] at head \n", entry->dn);
inserted = 1;
}
diff --git a/ldap/servers/plugins/pam_passthru/pam_ptimpl.c
b/ldap/servers/plugins/pam_passthru/pam_ptimpl.c
index a23658f..ef77d6f 100644
--- a/ldap/servers/plugins/pam_passthru/pam_ptimpl.c
+++ b/ldap/servers/plugins/pam_passthru/pam_ptimpl.c
@@ -87,17 +87,17 @@ derive_from_bind_entry(Slapi_PBlock *pb, const Slapi_DN *bindsdn,
pam_passthruauth_get_plugin_identity());
if (rc != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"Could not find BIND dn %s (error %d - %s)\n",
slapi_sdn_get_ndn(bindsdn), rc, ldap_err2string(rc));
init_my_str_buf(pam_id, NULL);
} else if (NULL == entry) {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"Could not find entry for BIND dn %s\n",
slapi_sdn_get_ndn(bindsdn));
init_my_str_buf(pam_id, NULL);
} else if (slapi_check_account_lock( pb, entry, 0, 0, 0 ) == 1) {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"Account %s inactivated.\n",
slapi_sdn_get_ndn(bindsdn));
init_my_str_buf(pam_id, NULL);
@@ -117,7 +117,7 @@ static void
report_pam_error(char *str, int rc, pam_handle_t *pam_handle)
{
if (rc != PAM_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"Error from PAM %s (%d: %s)\n",
str, rc, pam_strerror(pam_handle, rc));
}
@@ -168,7 +168,7 @@ pam_conv_func(int num_msg, const struct pam_message **msg, struct
pam_response *
sizeof(struct pam_response));
slapi_pblock_get( my_data->pb, SLAPI_BIND_CREDENTIALS, &creds ); /* the password
*/
for (ii = 0; ii < num_msg; ++ii) {
- slapi_log_error(SLAPI_LOG_PLUGIN, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"pam msg [%d] = %d %s\n", ii, msg[ii]->msg_style,
msg[ii]->msg);
/* hard to tell what prompt is for . . . */
@@ -182,13 +182,13 @@ pam_conv_func(int num_msg, const struct pam_message **msg, struct
pam_response *
} else if (msg[ii]->msg_style == PAM_PROMPT_ECHO_ON) { /* assume username */
reply[ii].resp = slapi_ch_strdup(my_data->pam_identity);
} else if (msg[ii]->msg_style == PAM_ERROR_MSG) {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"pam msg [%d] error [%s]\n", ii, msg[ii]->msg);
} else if (msg[ii]->msg_style == PAM_TEXT_INFO) {
- slapi_log_error(SLAPI_LOG_PLUGIN, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"pam msg [%d] text info [%s]\n", ii, msg[ii]->msg);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"Error: unknown pam message type (%d: %s)\n",
msg[ii]->msg_style, msg[ii]->msg);
ret = PAM_CONV_ERR;
@@ -370,7 +370,7 @@ done:
}
if (retcode != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"%s\n", errmsg);
if (final_method && !fallback) {
slapi_send_ldap_result(pb, retcode, NULL, errmsg, 0, NULL);
diff --git a/ldap/servers/plugins/pam_passthru/pam_ptpreop.c
b/ldap/servers/plugins/pam_passthru/pam_ptpreop.c
index 5485630..8263690 100644
--- a/ldap/servers/plugins/pam_passthru/pam_ptpreop.c
+++ b/ldap/servers/plugins/pam_passthru/pam_ptpreop.c
@@ -92,7 +92,7 @@ pam_passthruauth_init( Slapi_PBlock *pb )
PAM_PASSTHRU_ASSERT( pb != NULL );
- slapi_log_error( SLAPI_LOG_TRACE, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"=> pam_passthruauth_init\n" );
slapi_pblock_get (pb, SLAPI_PLUGIN_IDENTITY, &pam_passthruauth_plugin_identity);
@@ -121,7 +121,7 @@ pam_passthruauth_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, premod, (void *)pam_passthru_mod_preop ) ||
slapi_pblock_set( pb, predel, (void *)pam_passthru_del_preop ) ||
slapi_pblock_set( pb, premdn, (void *)pam_passthru_modrdn_preop )) {
- slapi_log_error( SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"pam_passthruauth_init failed\n");
status = -1;
goto bail;
@@ -136,7 +136,7 @@ pam_passthruauth_init( Slapi_PBlock *pb )
NULL, /* ? */
pam_passthruauth_plugin_identity /* access control
*/
)) {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"pam_passthruauth_init: "
"failed to register preop plugin\n");
status = -1;
@@ -156,7 +156,7 @@ pam_passthruauth_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, premod, (void *)pam_passthru_mod_preop ) ||
slapi_pblock_set( pb, predel, (void *)pam_passthru_del_preop ) ||
slapi_pblock_set( pb, premdn, (void *)pam_passthru_modrdn_preop )) {
- slapi_log_error( SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"pam_passthruauth_init failed\n");
status = -1;
goto bail;
@@ -171,7 +171,7 @@ pam_passthruauth_init( Slapi_PBlock *pb )
NULL, /* ? */
pam_passthruauth_plugin_identity /* access control
*/
)) {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"pam_passthruauth_init: "
"failed to register internal postop plugin\n");
status = -1;
@@ -188,7 +188,7 @@ pam_passthruauth_init( Slapi_PBlock *pb )
NULL, /* ? */
pam_passthruauth_plugin_identity /* access control */
)) {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"pam_passthruauth_init: "
"failed to register (%s) plugin\n",
is_betxn ? "postoperation" :
"betxnpostoperation");
@@ -196,7 +196,7 @@ pam_passthruauth_init( Slapi_PBlock *pb )
goto bail;
}
- slapi_log_error( SLAPI_LOG_TRACE, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"<= pam_passthruauth_init\n" );
bail:
@@ -214,7 +214,7 @@ pam_passthru_preop_init(Slapi_PBlock *pb)
if ( slapi_pblock_set( pb, SLAPI_PLUGIN_PRE_BIND_FN,
(void *)pam_passthru_bindpreop ) ||
slapi_pblock_set( pb, SLAPI_PLUGIN_CLOSE_FN, (void
*)pam_passthru_bindpreop_close )) {
- slapi_log_error( SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"pam_passthruauth_preop_init failed\n");
status = -1;
}
@@ -238,7 +238,7 @@ pam_passthru_internal_postop_init(Slapi_PBlock *pb)
(void *) pam_passthru_postop) != 0 ||
slapi_pblock_set(pb, SLAPI_PLUGIN_INTERNAL_POST_MODRDN_FN,
(void *) pam_passthru_postop) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"pam_passthru_internal_postop_init: failed to register
plugin\n");
status = -1;
}
@@ -277,7 +277,7 @@ pam_passthru_postop_init(Slapi_PBlock *pb)
slapi_pblock_set(pb, postdel, (void *) pam_passthru_postop) ||
slapi_pblock_set(pb, postmod, (void *) pam_passthru_postop) ||
slapi_pblock_set(pb, postmdn, (void *) pam_passthru_postop) ) {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"pam_passthru_postop_init: "
"failed to register (%s) plugin\n",
is_betxn ? "betxn postop" : "postop");
@@ -300,13 +300,13 @@ pam_passthru_bindpreop_start( Slapi_PBlock *pb )
PAM_PASSTHRU_ASSERT( pb != NULL );
- slapi_log_error( SLAPI_LOG_TRACE, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"=> pam_passthru_bindpreop_start\n" );
/* Get the plug-in configuration DN and store it for later use. */
slapi_pblock_get(pb, SLAPI_TARGET_SDN, &pluginsdn);
if (NULL == pluginsdn || 0 == slapi_sdn_get_ndn_len(pluginsdn)) {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"pam_passthru_bindpreop_start: unable to determine plug-in
config dn\n");
rc = PAM_PASSTHRU_FAILURE;
goto done;
@@ -323,7 +323,7 @@ pam_passthru_bindpreop_start( Slapi_PBlock *pb )
pam_passthru_set_config_area(slapi_sdn_dup(pluginsdn));
}
- slapi_log_error(SLAPI_LOG_PLUGIN, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"pam_passthru_bindpreop_start: config at %s\n",
slapi_sdn_get_ndn(pam_passthru_get_config_area()));
@@ -331,7 +331,7 @@ pam_passthru_bindpreop_start( Slapi_PBlock *pb )
g_pam_config_lock = slapi_new_rwlock();
if (!g_pam_config_lock) {
- slapi_log_error( SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"pam_passthru_bindpreop_start: lock creation
failed\n");
rc = PAM_PASSTHRU_FAILURE;
goto done;
@@ -346,7 +346,7 @@ pam_passthru_bindpreop_start( Slapi_PBlock *pb )
pam_passthru_load_config(0 /* don't skip validation */);
if (( rc = pam_passthru_pam_init()) != LDAP_SUCCESS ) {
- slapi_log_error( SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"could not initialize PAM subsystem (%d)\n", rc);
rc = PAM_PASSTHRU_FAILURE;
goto done;
@@ -359,11 +359,11 @@ done:
g_pam_config_lock = NULL;
slapi_ch_free((void **)&pam_passthru_global_config);
} else {
- slapi_log_error( SLAPI_LOG_PLUGIN, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"pam_passthru: ready for service\n" );
}
- slapi_log_error( SLAPI_LOG_TRACE, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"<= pam_passthru_bindpreop_start\n" );
return( rc );
@@ -378,7 +378,7 @@ pam_passthru_bindpreop_close( Slapi_PBlock *pb )
{
PAM_PASSTHRU_ASSERT( pb != NULL );
- slapi_log_error( SLAPI_LOG_TRACE, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"=> pam_passthru_bindpreop_close\n" );
pam_passthru_delete_config();
@@ -391,7 +391,7 @@ pam_passthru_bindpreop_close( Slapi_PBlock *pb )
slapi_destroy_rwlock(g_pam_config_lock);
g_pam_config_lock = NULL;
- slapi_log_error( SLAPI_LOG_TRACE, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"<= pam_passthru_bindpreop_close\n" );
return( 0 );
@@ -412,7 +412,7 @@ pam_passthru_bindpreop( Slapi_PBlock *pb )
PAM_PASSTHRU_ASSERT( pb != NULL );
- slapi_log_error( SLAPI_LOG_TRACE, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"=> pam_passthru_bindpreop\n" );
/*
@@ -421,7 +421,7 @@ pam_passthru_bindpreop( Slapi_PBlock *pb )
if ( slapi_pblock_get( pb, SLAPI_BIND_METHOD, &method ) != 0 ||
slapi_pblock_get( pb, SLAPI_BIND_TARGET_SDN, &bindsdn ) != 0 ||
slapi_pblock_get( pb, SLAPI_BIND_CREDENTIALS, &creds ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"<= not handled (unable to retrieve bind
parameters)\n" );
return retcode;
}
@@ -433,7 +433,7 @@ pam_passthru_bindpreop( Slapi_PBlock *pb )
*/
if ((method != LDAP_AUTH_SIMPLE) || (*normbinddn == '\0') ||
(creds->bv_len == 0)) {
- slapi_log_error( SLAPI_LOG_PLUGIN, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"<= not handled (not simple bind or NULL
dn/credentials)\n" );
return retcode;
}
@@ -451,7 +451,7 @@ pam_passthru_bindpreop( Slapi_PBlock *pb )
cfg = pam_passthru_get_config(bindsdn);
if (!cfg) {
- slapi_log_error( SLAPI_LOG_PLUGIN, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"<= \"%s\" not handled (doesn't meet
configuration criteria)\n", normbinddn );
goto done;
}
@@ -460,7 +460,7 @@ pam_passthru_bindpreop( Slapi_PBlock *pb )
int is_ssl = 0;
slapi_pblock_get(pb, SLAPI_CONN_IS_SSL_SESSION, &is_ssl);
if (!is_ssl) {
- slapi_log_error( SLAPI_LOG_PLUGIN, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"<= connection not secure (secure connection
required; check config)");
goto done;
}
@@ -484,7 +484,7 @@ pam_passthru_bindpreop( Slapi_PBlock *pb )
slapi_ch_free_string(&ndn);
rc = LDAP_OPERATIONS_ERROR;
errmsg = "unable to set connection DN or AUTHTYPE";
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"%s\n", errmsg);
} else {
LDAPControl **reqctrls = NULL;
@@ -508,10 +508,10 @@ pam_passthru_bindpreop( Slapi_PBlock *pb )
done:
pam_passthru_unlock();
- slapi_log_error(SLAPI_LOG_PLUGIN, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"<= handled (error %d - %s)\n", rc,
ldap_err2string(rc));
- slapi_log_error( SLAPI_LOG_TRACE, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"<= pam_passthru_bindpreop\n" );
return retcode;
@@ -530,7 +530,7 @@ pam_passthru_preop(Slapi_PBlock *pb, int modtype)
char returntext[SLAPI_DSE_RETURNTEXT_SIZE];
int ret = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"=> pam_passthru_preop\n");
/* Get the target SDN. */
@@ -595,7 +595,7 @@ bail:
slapi_send_ldap_result(pb, ret, NULL, returntext, 0, NULL);
ret = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"<= pam_passthru_preop\n");
return ret;
@@ -638,7 +638,7 @@ pam_passthru_postop(Slapi_PBlock *pb)
int optype = SLAPI_OPERATION_NONE;
int oprc = -1;
- slapi_log_error(SLAPI_LOG_TRACE, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"=> pam_passthru_postop\n");
/* Make sure the operation succeeded and bail if it didn't. */
@@ -651,7 +651,7 @@ pam_passthru_postop(Slapi_PBlock *pb)
/* Get the target SDN. */
slapi_pblock_get(pb, SLAPI_TARGET_SDN, &sdn);
if (!sdn) {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"pam_passthru_postop: unale to fetch target SDN.\n");
ret = SLAPI_PLUGIN_FAILURE;
goto bail;
@@ -665,7 +665,7 @@ pam_passthru_postop(Slapi_PBlock *pb)
if (e) {
new_sdn = slapi_entry_get_sdn(e);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"pam_passthru_postop: unable to fetch post-op "
"entry for rename operation.\n");
ret = SLAPI_PLUGIN_FAILURE;
@@ -680,7 +680,7 @@ pam_passthru_postop(Slapi_PBlock *pb)
pam_passthru_load_config(1); /* skip validation, as it was done at preop */
}
- slapi_log_error(SLAPI_LOG_TRACE, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"<= pam_passthru_postop\n");
bail:
diff --git a/ldap/servers/plugins/passthru/ptbind.c
b/ldap/servers/plugins/passthru/ptbind.c
index 00af661..128b96a 100644
--- a/ldap/servers/plugins/passthru/ptbind.c
+++ b/ldap/servers/plugins/passthru/ptbind.c
@@ -56,7 +56,7 @@ passthru_simple_bind_s( Slapi_PBlock *pb, PassThruServer *srvr, int
tries,
* check to see if operation has been abandoned...
*/
if ( slapi_op_abandoned( pb )) {
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"operation abandoned\n" );
rc = LDAP_USER_CANCELLED;
} else {
diff --git a/ldap/servers/plugins/passthru/ptconfig.c
b/ldap/servers/plugins/passthru/ptconfig.c
index 8529c02..646ec58 100644
--- a/ldap/servers/plugins/passthru/ptconfig.c
+++ b/ldap/servers/plugins/passthru/ptconfig.c
@@ -80,7 +80,7 @@ passthru_config( int argc, char **argv )
int ret = LDAP_SUCCESS;
if ( inited ) {
- slapi_log_error( SLAPI_LOG_FATAL, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
"only one pass through plugin instance can be used\n" );
ret = LDAP_PARAM_ERROR;
goto error;
@@ -93,7 +93,7 @@ passthru_config( int argc, char **argv )
* providing at least one remote server. Return an error if attempted.
*/
if ( argc < 1 ) {
- slapi_log_error( SLAPI_LOG_FATAL, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
"no pass through servers found in configuration "
"(at least one must be listed)\n" );
ret = LDAP_PARAM_ERROR;
@@ -153,7 +153,7 @@ passthru_config( int argc, char **argv )
&srvr->ptsrvr_maxconcurrency, &tosecs,
&srvr->ptsrvr_ldapversion,
&srvr->ptsrvr_connlifetime, &starttls);
if ( rc < 4 ) {
- slapi_log_error( SLAPI_LOG_FATAL, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
"server parameters should be in the form "
"\"maxconnections,maxconcurrency,timeout,ldapversion,"
"connlifetime\" (got \"%s\")\n", p );
@@ -172,7 +172,7 @@ passthru_config( int argc, char **argv )
}
if ( srvr->ptsrvr_ldapversion != LDAP_VERSION2 &&
srvr->ptsrvr_ldapversion != LDAP_VERSION3 ) {
- slapi_log_error( SLAPI_LOG_FATAL, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
"LDAP protocol version should be %d or %d (got %d)\n",
LDAP_VERSION2, LDAP_VERSION3, srvr->ptsrvr_ldapversion );
ret = LDAP_PARAM_ERROR;
@@ -180,7 +180,7 @@ passthru_config( int argc, char **argv )
}
if ( srvr->ptsrvr_maxconnections <= 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
"maximum connections must be greater than "
"zero (got %d)\n", srvr->ptsrvr_maxconnections );
ret = LDAP_PARAM_ERROR;
@@ -188,7 +188,7 @@ passthru_config( int argc, char **argv )
}
if ( srvr->ptsrvr_maxconcurrency <= 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
"maximum concurrency must be greater than "
"zero (got %d)\n", srvr->ptsrvr_maxconcurrency );
ret = LDAP_PARAM_ERROR;
@@ -207,7 +207,7 @@ passthru_config( int argc, char **argv )
* parse the LDAP URL
*/
if (( rc = slapi_ldap_url_parse( srvr->ptsrvr_url, &ludp, 1, &secure
)) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
"unable to parse LDAP URL \"%s\" (%s)\n",
srvr->ptsrvr_url, slapi_urlparse_err2string( rc ));
ret = LDAP_PARAM_ERROR;
@@ -215,7 +215,7 @@ passthru_config( int argc, char **argv )
}
if ( ludp->lud_dn == NULL || *ludp->lud_dn == '\0' ) {
- slapi_log_error( SLAPI_LOG_FATAL, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
"missing suffix in LDAP URL \"%s\"\n",
srvr->ptsrvr_url );
ret = LDAP_PARAM_ERROR;
goto error;
@@ -241,7 +241,7 @@ passthru_config( int argc, char **argv )
* split the DN into multiple suffixes (separated by ';')
*/
if (( suffixarray = slapi_str2charray( ludp->lud_dn, ";" )) == NULL
) {
- slapi_log_error( SLAPI_LOG_FATAL, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
"unable to parse suffix string \"%s\" within
\"%s\"\n",
ludp->lud_dn, srvr->ptsrvr_url );
ret = LDAP_PARAM_ERROR;
@@ -304,7 +304,7 @@ passthru_config( int argc, char **argv )
/*
* log configuration for debugging purposes
*/
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"PTA server host: \"%s\", port: %d, secure: %d, "
"maxconnections: %d, maxconcurrency: %d, timeout: %d, "
"ldversion: %d, connlifetime: %d\n",
@@ -317,7 +317,7 @@ passthru_config( int argc, char **argv )
for ( prevsuffix = srvr->ptsrvr_suffixes; prevsuffix != NULL;
prevsuffix = prevsuffix->ptsuffix_next )
{
- slapi_log_error( SLAPI_LOG_FATAL, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
" normalized suffix: \"%s\"\n",
prevsuffix->ptsuffix_normsuffix );
}
#endif
diff --git a/ldap/servers/plugins/passthru/ptconn.c
b/ldap/servers/plugins/passthru/ptconn.c
index 72d59e3..0c74de1 100644
--- a/ldap/servers/plugins/passthru/ptconn.c
+++ b/ldap/servers/plugins/passthru/ptconn.c
@@ -128,7 +128,7 @@ passthru_get_connection( PassThruServer *srvr, LDAP **ldp )
slapi_lock_mutex( srvr->ptsrvr_connlist_mutex );
rc = LDAP_SUCCESS; /* optimistic */
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"=> passthru_get_connection server %s:%d conns: %d maxconns: %d\n",
srvr->ptsrvr_hostname, srvr->ptsrvr_port, srvr->ptsrvr_connlist_count,
srvr->ptsrvr_maxconnections );
@@ -143,7 +143,7 @@ passthru_get_connection( PassThruServer *srvr, LDAP **ldp )
if ( conn->ptconn_status == PASSTHRU_CONNSTATUS_OK
&& conn->ptconn_usecount < srvr->ptsrvr_maxconcurrency ) {
#ifdef PASSTHRU_VERBOSE_LOGGING
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"<= passthru_get_connection server found "
"conn 0x%x to use)\n", conn->ptconn_ld );
#endif
@@ -160,7 +160,7 @@ passthru_get_connection( PassThruServer *srvr, LDAP **ldp )
if (( ld = slapi_ldap_init( srvr->ptsrvr_hostname,
srvr->ptsrvr_port, srvr->ptsrvr_secure, 1 )) == NULL ) {
#ifdef PASSTHRU_VERBOSE_LOGGING
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"<= passthru_get_connection slapi_ldap_init failed\n" );
#endif
rc = LDAP_LOCAL_ERROR;
@@ -195,7 +195,7 @@ passthru_get_connection( PassThruServer *srvr, LDAP **ldp )
++srvr->ptsrvr_connlist_count;
#ifdef PASSTHRU_VERBOSE_LOGGING
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"<= passthru_get_connection added new conn 0x%x, "
"conn count now %d\n", ld, srvr->ptsrvr_connlist_count );
#endif
@@ -203,13 +203,13 @@ passthru_get_connection( PassThruServer *srvr, LDAP **ldp )
}
#ifdef PASSTHRU_VERBOSE_LOGGING
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"... passthru_get_connection waiting for conn to free up\n" );
#endif
slapi_wait_condvar( srvr->ptsrvr_connlist_cv, NULL );
#ifdef PASSTHRU_VERBOSE_LOGGING
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"... passthru_get_connection awake again\n" );
#endif
}
@@ -218,11 +218,11 @@ unlock_and_return:
if ( conn != NULL ) {
++conn->ptconn_usecount;
*ldp = conn->ptconn_ld;
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"<= passthru_get_connection ld=0x%p (concurrency now %d)\n",
*ldp, conn->ptconn_usecount );
} else {
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"<= passthru_get_connection error %d\n", rc );
}
@@ -245,7 +245,7 @@ passthru_release_connection( PassThruServer *srvr, LDAP *ld, int
dispose )
PASSTHRU_ASSERT( ld != NULL );
#ifdef PASSTHRU_VERBOSE_LOGGING
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"=> passthru_release_connection ld=0x%x%s\n", ld,
dispose ? " (disposing)" : "" );
#endif
@@ -265,7 +265,7 @@ passthru_release_connection( PassThruServer *srvr, LDAP *ld, int
dispose )
}
if ( conn == NULL ) { /* ld not found -- unexpected */
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"=> passthru_release_connection ld=0x%p not found\n", ld );
} else {
PASSTHRU_ASSERT( conn->ptconn_usecount > 0 );
@@ -371,7 +371,7 @@ check_for_stale_connections( PassThruServer *srvr )
PASSTHRU_ASSERT( srvr != NULL );
#ifdef PASSTHRU_VERBOSE_LOGGING
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"check_for_stale_connections: server %s (lifetime %d secs)\n",
srvr->ptsrvr_url, srvr->ptsrvr_connlifetime );
#endif
@@ -395,7 +395,7 @@ check_for_stale_connections( PassThruServer *srvr )
* connection is idle and stale -- remove from server's list
*/
#ifdef PASSTHRU_VERBOSE_LOGGING
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"check_for_stale_connections: discarding idle, "
"stale connection 0x%x\n", conn->ptconn_ld );
#endif
@@ -411,7 +411,7 @@ check_for_stale_connections( PassThruServer *srvr )
* connection is stale but in use -- mark to be disposed later
*/
#ifdef PASSTHRU_VERBOSE_LOGGING
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"check_for_stale_connections: marking connection 0x%x "
"stale (use count %d)\n", conn->ptconn_ld,
conn->ptconn_usecount );
diff --git a/ldap/servers/plugins/passthru/ptpreop.c
b/ldap/servers/plugins/passthru/ptpreop.c
index 95b3b33..c5c57ed 100644
--- a/ldap/servers/plugins/passthru/ptpreop.c
+++ b/ldap/servers/plugins/passthru/ptpreop.c
@@ -38,7 +38,7 @@ passthruauth_init( Slapi_PBlock *pb )
{
PASSTHRU_ASSERT( pb != NULL );
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"=> passthruauth_init\n" );
if ( slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
@@ -51,12 +51,12 @@ passthruauth_init( Slapi_PBlock *pb )
(void *)passthru_bindpreop ) != 0
|| slapi_pblock_set( pb, SLAPI_PLUGIN_CLOSE_FN,
(void *)passthru_bindpreop_close ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
"passthruauth_init failed\n" );
return( -1 );
}
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"<= passthruauth_init succeeded\n" );
return( 0 );
@@ -75,18 +75,18 @@ passthru_bindpreop_start( Slapi_PBlock *pb )
PASSTHRU_ASSERT( pb != NULL );
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"=> passthru_bindpreop_start\n" );
if ( slapi_pblock_get( pb, SLAPI_PLUGIN_ARGC, &argc ) != 0 ||
slapi_pblock_get( pb, SLAPI_PLUGIN_ARGV, &argv ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
"unable to get arguments\n" );
return( -1 );
}
if (( rc = passthru_config( argc, argv )) != LDAP_SUCCESS ) {
- slapi_log_error( SLAPI_LOG_FATAL, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
"configuration failed (%s)\n", ldap_err2string( rc ));
return( -1 );
}
@@ -103,7 +103,7 @@ passthru_bindpreop_close( Slapi_PBlock *pb )
{
PASSTHRU_ASSERT( pb != NULL );
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"=> passthru_bindpreop_close\n" );
/*
@@ -133,7 +133,7 @@ passthru_bindpreop( Slapi_PBlock *pb )
PASSTHRU_ASSERT( pb != NULL );
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"=> passthru_bindpreop\n" );
/*
@@ -142,7 +142,7 @@ passthru_bindpreop( Slapi_PBlock *pb )
if ( slapi_pblock_get( pb, SLAPI_BIND_METHOD, &method ) != 0 ||
slapi_pblock_get( pb, SLAPI_BIND_TARGET_SDN, &sdn ) != 0 ||
slapi_pblock_get( pb, SLAPI_BIND_CREDENTIALS, &creds ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
"<= not handled (unable to retrieve bind parameters)\n"
);
return( PASSTHRU_OP_NOT_HANDLED );
}
@@ -157,7 +157,7 @@ passthru_bindpreop( Slapi_PBlock *pb )
*/
if ( method != LDAP_AUTH_SIMPLE || *normbinddn == '\0'
|| creds->bv_len == 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"<= not handled (not simple bind or NULL dn/credentials)\n"
);
return( PASSTHRU_OP_NOT_HANDLED );
}
@@ -172,7 +172,7 @@ passthru_bindpreop( Slapi_PBlock *pb )
* another server.
*/
if ( passthru_dn2server( cfg, normbinddn, &srvr ) != LDAP_SUCCESS ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"<= not handled (not one of our suffixes)\n" );
return( PASSTHRU_OP_NOT_HANDLED );
}
@@ -187,7 +187,7 @@ passthru_bindpreop( Slapi_PBlock *pb )
if ( slapi_pblock_get( pb, SLAPI_REQCONTROLS, &reqctrls ) != 0 ) {
rc = LDAP_OPERATIONS_ERROR;
errmsg = "unable to retrieve bind controls";
- slapi_log_error( SLAPI_LOG_FATAL, PASSTHRU_PLUGIN_SUBSYSTEM, "%s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM, "%s\n",
errmsg );
} else {
int lderrno;
@@ -224,7 +224,7 @@ passthru_bindpreop( Slapi_PBlock *pb )
slapi_ch_free((void **)&ndn);
rc = LDAP_OPERATIONS_ERROR;
errmsg = "unable to set connection DN or AUTHTYPE";
- slapi_log_error( SLAPI_LOG_FATAL, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
"%s\n", errmsg );
}
}
@@ -259,7 +259,7 @@ passthru_bindpreop( Slapi_PBlock *pb )
ldap_memfree( matcheddn );
}
- slapi_log_error( SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
"<= handled (error %d - %s)\n", rc, ldap_err2string( rc ));
return( PASSTHRU_OP_HANDLED );
diff --git a/ldap/servers/plugins/posix-winsync/posix-group-func.c
b/ldap/servers/plugins/posix-winsync/posix-group-func.c
index a497f3f..c9d15d9 100644
--- a/ldap/servers/plugins/posix-winsync/posix-group-func.c
+++ b/ldap/servers/plugins/posix-winsync/posix-group-func.c
@@ -77,7 +77,7 @@ addDynamicGroupIfNecessary(Slapi_Entry *entry, Slapi_Mods *smods) {
Slapi_Entry *
getEntry(const char *udn, char **attrs)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME, "getEntry: search
%s\n", udn);
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"getEntry: search %s\n", udn);
Slapi_DN *udn_sdn = slapi_sdn_new_dn_byval(udn);
Slapi_Entry *result = NULL;
@@ -89,12 +89,12 @@ getEntry(const char *udn, char **attrs)
return result; /* Must be freed */
}
else {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"getEntry: %s not found\n", udn);
}
}
else {
- slapi_log_error(SLAPI_LOG_FATAL, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, POSIX_WINSYNC_PLUGIN_NAME,
"getEntry: error searching for uid %s: %d\n", udn,
rc);
}
@@ -118,10 +118,10 @@ searchUid(const char *udn)
if (slapi_entry_attr_find(entry, "uid", &attr) == 0 &&
hasObjectClass(entry, "posixAccount")) {
slapi_attr_first_value(attr, &v);
uid = slapi_ch_strdup(slapi_value_get_string(v));
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"searchUid: return uid %s\n", uid);
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"searchUid: uid in %s not found\n", udn);
}
@@ -129,13 +129,13 @@ searchUid(const char *udn)
uid = slapi_dn_ignore_case(uid);
}
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"searchUid: About to free entry (%s)\n", udn);
slapi_entry_free(entry);
}
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"searchUid(%s): <==\n", udn);
return uid;
@@ -180,7 +180,7 @@ uid_in_set(const char* uid, char **uids)
char *i_uid = NULL;
char *t = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME, "uid_in_set:
comp %s %s \n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"uid_in_set: comp %s %s \n",
uid, uids[i]);
i_rdn = slapi_rdn_new_dn(uids[i]);
if (slapi_rdn_get_first(i_rdn, &t, &i_uid) == 1) {
@@ -210,7 +210,7 @@ uid_in_valueset(const char* uid, Slapi_ValueSet *uids)
const char *uid_i = slapi_value_get_string(v);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"uid_in_valueset: comp %s %s \n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"uid_in_valueset: comp %s %s \n",
uid, uid_i);
i_rdn = slapi_rdn_new_dn(uid_i);
if (slapi_rdn_get_first(i_rdn, &t, &i_uid) == 1) {
@@ -271,7 +271,7 @@ hasObjectClass(Slapi_Entry *entry, const char *objectClass)
return 0; /* Doesn't have any objectclasses */
}
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"Scanning objectclasses\n");
for (
@@ -309,7 +309,7 @@ posix_winsync_foreach_parent(Slapi_Entry *entry, char **attrs,
plugin_search_ent
if (base_sdn == NULL) {
continue;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"posix_winsync_foreach_parent: Searching subtree %s for
%s\n",
slapi_sdn_get_dn(base_sdn),
filter);
@@ -339,9 +339,9 @@ posix_winsync_foreach_parent(Slapi_Entry *entry, char **attrs,
plugin_search_ent
void
getMembershipFromDownward(Slapi_Entry *entry, Slapi_ValueSet *muid_vs, Slapi_ValueSet
*muid_nested_vs, Slapi_ValueSet *deletions, const Slapi_DN *base_sdn, int depth)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"getMembershipFromDownward: ==>\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"getMembershipFromDownward: entry name: %s\n",
slapi_entry_get_dn_const(entry));
@@ -350,14 +350,14 @@ getMembershipFromDownward(Slapi_Entry *entry, Slapi_ValueSet
*muid_vs, Slapi_Val
Slapi_Value *uid_value = NULL; /* uniqueMember attribute values */
if (depth >= MAX_RECURSION_DEPTH) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"getMembershipFromDownward: recursion limit reached:
%d\n", depth);
return;
}
rc = slapi_entry_attr_find(entry, "uniquemember", &um_attr);
if (rc != 0 || um_attr == NULL) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"getMembershipFromDownward end: attribute uniquemember not
found\n");
return;
}
@@ -368,13 +368,13 @@ getMembershipFromDownward(Slapi_Entry *entry, Slapi_ValueSet
*muid_vs, Slapi_Val
char *attrs[] = { "uniqueMember", "memberUid",
"uid", "objectClass", NULL };
const char *uid_dn = slapi_value_get_string(uid_value);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"getMembershipFromDownward: iterating uniqueMember:
%s\n",
uid_dn);
if (deletions && !slapi_sdn_compare(slapi_entry_get_sdn_const(entry),
base_sdn)) {
if (slapi_valueset_find(um_attr, deletions, uid_value)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"getMembershipFromDownward: Skipping iteration
because of deletion\n");
continue;
@@ -384,7 +384,7 @@ getMembershipFromDownward(Slapi_Entry *entry, Slapi_ValueSet *muid_vs,
Slapi_Val
Slapi_Entry *child = getEntry(uid_dn, attrs);
if (!child) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"getMembershipFromDownward end: child not found:
%s\n", uid_dn);
}
else {
@@ -403,7 +403,7 @@ getMembershipFromDownward(Slapi_Entry *entry, Slapi_ValueSet *muid_vs,
Slapi_Val
slapi_attr_first_value(uid_attr, &v);
if (v && !slapi_valueset_find(uid_attr, muid_vs, v)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
POSIX_WINSYNC_PLUGIN_NAME,
"getMembershipFromDownward: adding member:
%s\n",
slapi_value_get_string(v));
slapi_valueset_add_value(muid_vs, v);
@@ -417,7 +417,7 @@ getMembershipFromDownward(Slapi_Entry *entry, Slapi_ValueSet *muid_vs,
Slapi_Val
slapi_attr_first_value(uid_attr, &v);
if (v && !slapi_valueset_find(uid_attr, muid_vs, v)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
POSIX_WINSYNC_PLUGIN_NAME,
"getMembershipFromDownward: adding member:
%s\n",
slapi_value_get_string(v));
slapi_valueset_add_value(muid_vs, v);
@@ -429,7 +429,7 @@ getMembershipFromDownward(Slapi_Entry *entry, Slapi_ValueSet *muid_vs,
Slapi_Val
}
}
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"getMembershipFromDownward: <==\n");
}
@@ -453,14 +453,14 @@ void
propogateMembershipUpward(Slapi_Entry *entry, Slapi_ValueSet *muid_vs, int depth)
{
if (depth >= MAX_RECURSION_DEPTH) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"propogateMembershipUpward: recursion limit reached:
%d\n", depth);
return;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"propogateMembershipUpward: ==>\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"propogateMembershipUpward: entry name: %s\n",
slapi_entry_get_dn_const(entry));
@@ -476,7 +476,7 @@ propogateMembershipUpward(Slapi_Entry *entry, Slapi_ValueSet *muid_vs,
int depth
Slapi_ValueSet *muid_old_vs = NULL;
int rc = slapi_entry_attr_find(entry, "memberUid",
&muid_old_attr);
if (rc != 0 || muid_old_attr == NULL) { /* Found no memberUid list, so create
*/
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"propogateMembershipUpward: no attribute
memberUid\n");
/* There's no values from this entry to add */
@@ -497,7 +497,7 @@ propogateMembershipUpward(Slapi_Entry *entry, Slapi_ValueSet *muid_vs,
int depth
i = slapi_valueset_next_value(muid_vs, i, &v)) {
if (!slapi_valueset_find(muid_old_attr, muid_old_vs, v)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
POSIX_WINSYNC_PLUGIN_NAME,
"propogateMembershipUpward: adding %s to
set\n",
slapi_value_get_string(v));
@@ -535,7 +535,7 @@ propogateMembershipUpward(Slapi_Entry *entry, Slapi_ValueSet *muid_vs,
int depth
slapi_valueset_free(muid_upward_vs); muid_upward_vs = NULL;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"propogateMembershipUpward: <==\n");
}
@@ -563,14 +563,14 @@ propogateDeletionsUpward(Slapi_Entry *entry, const Slapi_DN
*base_sdn, Slapi_Val
if (smod_deluids == NULL) return;
if (depth >= MAX_RECURSION_DEPTH) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"propogateDeletionsUpward: recursion limit reached:
%d\n", depth);
return;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"propogateDeletionsUpward: ==>\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"propogateDeletionsUpward: entry name: %s\n",
slapi_entry_get_dn_const(entry));
@@ -596,14 +596,14 @@ propogateDeletionsUpward(Slapi_Entry *entry, const Slapi_DN
*base_sdn, Slapi_Val
if (!slapi_valueset_find(muid_attr, muid_vs, v)) {
const char *uid = slapi_value_get_string(v);
if (depth == 0 && !uid_in_valueset(uid, smod_deluids)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
POSIX_WINSYNC_PLUGIN_NAME,
"propogateDeletionsUpward: Adding deletion to
modlist: %s\n",
slapi_value_get_string(v));
slapi_valueset_add_value(del_nested_vs, v);
}
else if (depth > 0) {
slapi_valueset_add_value(muid_deletions_vs, v);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
POSIX_WINSYNC_PLUGIN_NAME,
"propogateDeletionsUpward: Adding deletion to
deletion list: %s\n",
slapi_value_get_string(v));
}
@@ -611,7 +611,7 @@ propogateDeletionsUpward(Slapi_Entry *entry, const Slapi_DN *base_sdn,
Slapi_Val
}
if (depth > 0) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"propogateDeletionsUpward: executing deletion
list\n");
Slapi_Mods *smods = slapi_mods_new();
@@ -632,21 +632,21 @@ propogateDeletionsUpward(Slapi_Entry *entry, const Slapi_DN
*base_sdn, Slapi_Val
slapi_valueset_free(muid_deletions_vs); muid_deletions_vs = NULL;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"propogateDeletionsUpward: <==\n");
}
int
modGroupMembership(Slapi_Entry *entry, Slapi_Mods *smods, int *do_modify, int
newposixgroup)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership: ==>\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership: Modding %s\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership: ==>\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership: Modding %s\n",
slapi_entry_get_dn_const(entry));
int posixGroup = hasObjectClass(entry, "posixGroup");
if (!(posixGroup || hasObjectClass(entry, "ntGroup")) &&
!newposixgroup) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership end: Not a posixGroup or
ntGroup\n");
return 0;
}
@@ -657,7 +657,7 @@ modGroupMembership(Slapi_Entry *entry, Slapi_Mods *smods, int
*do_modify, int ne
char **smod_adduids = NULL;
Slapi_ValueSet *smod_deluids = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership: posixGroup -> look for
uniquemember\n");
if (slapi_is_loglevel_set(SLAPI_LOG_PLUGIN))
slapi_mods_dump(smods, "memberUid - mods dump - initial");
@@ -680,13 +680,13 @@ modGroupMembership(Slapi_Entry *entry, Slapi_Mods *smods, int
*do_modify, int ne
if (!smod_deluids) smod_deluids = slapi_valueset_new();
slapi_valueset_add_value(smod_deluids, sv);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership: add to deluids %s\n",
bv->bv_val);
} else {
slapi_ch_array_add(&smod_adduids,
slapi_ch_strdup(slapi_value_get_string(sv)));
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership: add to adduids %s\n",
bv->bv_val);
}
@@ -719,7 +719,7 @@ modGroupMembership(Slapi_Entry *entry, Slapi_Mods *smods, int
*do_modify, int ne
int rc = slapi_entry_attr_find(entry, "uniquemember",
&um_attr);
if (rc != 0 || um_attr == NULL) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership end: attribute uniquemember
not found\n");
break;
}
@@ -727,7 +727,7 @@ modGroupMembership(Slapi_Entry *entry, Slapi_Mods *smods, int
*do_modify, int ne
slapi_attr_get_valueset(um_attr, &smod_deluids);
}
if (muid_rc != 0 || muid_attr == NULL) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership end: attribute memberUid not
found\n");
}
else if (posix_winsync_config_get_mapMemberUid()) {
@@ -736,14 +736,14 @@ modGroupMembership(Slapi_Entry *entry, Slapi_Mods *smods, int
*do_modify, int ne
j = slapi_attr_next_value(muid_attr, j, &uid_value)) {
/* remove from uniquemember: remove from memberUid also */
const char *uid = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership: test dellist \n");
uid = slapi_value_get_string(uid_value);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership: test dellist %s\n",
uid);
if (uid_in_valueset(uid, smod_deluids)) {
slapi_valueset_add_value(deluids, uid_value);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership: add to dellist
%s\n", uid);
}
}
@@ -763,7 +763,7 @@ modGroupMembership(Slapi_Entry *entry, Slapi_Mods *smods, int
*do_modify, int ne
if (smod_adduids != NULL) { /* not MOD_DELETE */
const char *uid_dn = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership: posixGroup -> look for
uniquemember\n");
if (muid_rc == 0 && muid_attr == NULL) {
@@ -781,13 +781,13 @@ modGroupMembership(Slapi_Entry *entry, Slapi_Mods *smods, int
*do_modify, int ne
static char *uid = NULL;
uid_dn = smod_adduids[j];
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership: perform user %s\n",
uid_dn);
uid = searchUid(uid_dn);
if (uid == NULL) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership: uid not found for %s,
cannot do anything\n",
uid_dn); /* member on longer on server, do nothing
*/
} else {
@@ -797,14 +797,14 @@ modGroupMembership(Slapi_Entry *entry, Slapi_Mods *smods, int
*do_modify, int ne
if (muid_rc == 0 && muid_attr != NULL &&
slapi_valueset_find(muid_attr, muid_vs, v) != NULL) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership: uid found in memberuid
list %s nothing to do\n",
uid);
}
else {
slapi_valueset_add_value(adduids, v);
slapi_valueset_add_value(muid_vs, v);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership: add to modlist
%s\n", uid);
}
@@ -821,7 +821,7 @@ modGroupMembership(Slapi_Entry *entry, Slapi_Mods *smods, int
*do_modify, int ne
if (child) {
if (hasObjectClass(child, "ntGroup") ||
hasObjectClass(child, "posixGroup")) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership: Found mod to add group,
adding membership: %s\n",
smod_adduids[j]);
Slapi_ValueSet *muid_tempnested = slapi_valueset_new();
@@ -831,7 +831,7 @@ modGroupMembership(Slapi_Entry *entry, Slapi_Mods *smods, int
*do_modify, int ne
}
}
else {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership: entry not found for dn:
%s\n",
smod_adduids[j]);
}
@@ -910,7 +910,7 @@ modGroupMembership(Slapi_Entry *entry, Slapi_Mods *smods, int
*do_modify, int ne
slapi_valueset_free(muid_vs); muid_vs = NULL;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership: <==\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership: <==\n");
return 0;
}
@@ -941,12 +941,12 @@ addGroupMembership(Slapi_Entry *entry, Slapi_Entry *ad_entry)
int rc = 0;
int i;
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"addGroupMembership: ==>\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"addGroupMembership: ==>\n");
int posixGroup = hasObjectClass(entry, "posixGroup");
if(!(posixGroup || hasObjectClass(entry, "ntGroup"))) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"addGroupMembership: didn't find posixGroup or ntGroup
objectclass\n");
return 0;
}
@@ -957,18 +957,18 @@ addGroupMembership(Slapi_Entry *entry, Slapi_Entry *ad_entry)
Slapi_ValueSet *newvs = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"addGroupMembership: posixGroup -> look for
uniquemember\n");
rc = slapi_entry_attr_find(entry, "uniquemember", &um_attr);
if (rc != 0 || um_attr == NULL) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"addGroupMembership end: attribute uniquemember not
found\n");
return 0;
}
/* found attribute uniquemember */
rc = slapi_entry_attr_find(entry, "memberUid", &muid_attr);
if (rc != 0 || muid_attr == NULL) { /* Found no memberUid list, so create */
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"addGroupMembership: no attribute memberUid\n");
muid_attr = NULL;
}
@@ -982,11 +982,11 @@ addGroupMembership(Slapi_Entry *entry, Slapi_Entry *ad_entry)
Slapi_Value *v = NULL;
uid_dn = slapi_value_get_string(uid_value);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"addGroupMembership: perform member %s\n",
uid_dn);
uid = searchUid(uid_dn);
if (uid == NULL) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"addGroupMembership: uid not found for %s, cannot do
anything\n",
uid_dn); /* member on longer on server, do nothing */
} else {
@@ -1021,7 +1021,7 @@ addGroupMembership(Slapi_Entry *entry, Slapi_Entry *ad_entry)
slapi_valueset_free(newvs); newvs = NULL;
posix_winsync_config_get_MOFTaskCreated();
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"addGroupMembership: <==\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"addGroupMembership: <==\n");
return 0;
}
diff --git a/ldap/servers/plugins/posix-winsync/posix-group-task.c
b/ldap/servers/plugins/posix-winsync/posix-group-task.c
index c76545a..5d54f7a 100644
--- a/ldap/servers/plugins/posix-winsync/posix-group-task.c
+++ b/ldap/servers/plugins/posix-winsync/posix-group-task.c
@@ -75,7 +75,7 @@ posix_group_task_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry
*eAfter, int
*returncode = LDAP_SUCCESS;
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"posix_group_task_add: ==>\n");
/* get arg(s) */
@@ -86,7 +86,7 @@ posix_group_task_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry
*eAfter, int
goto out;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"posix_group_task_add: retrieved basedn: %s\n", dn);
if ((filter = fetch_attr(e, "filter",
"(&(objectclass=ntGroup)(|(uniquemember=*)(memberuid=*)))")) == NULL) {
@@ -95,7 +95,7 @@ posix_group_task_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry
*eAfter, int
goto out;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"posix_group_task_add: retrieved filter: %s\n", filter);
/* setup our task data */
@@ -108,31 +108,31 @@ posix_group_task_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry
*eAfter, int
mytaskdata->dn = slapi_ch_strdup(dn);
mytaskdata->filter_str = slapi_ch_strdup(filter);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"posix_group_task_add: task data allocated\n");
/* allocate new task now */
char * ndn = slapi_entry_get_ndn(e);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"posix_group_task_add: creating task object: %s\n",
ndn);
task = slapi_new_task(ndn);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"posix_group_task_add: task object created\n");
/* register our destructor for cleaning up our private data */
slapi_task_set_destructor_fn(task, posix_group_task_destructor);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"posix_group_task_add: task destructor set\n");
/* Stash a pointer to our data in the task */
slapi_task_set_data(task, mytaskdata);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"posix_group_task_add: task object initialized\n");
/* start the sample task as a separate thread */
@@ -140,11 +140,11 @@ posix_group_task_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry
*eAfter, int
PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_UNJOINABLE_THREAD,
SLAPD_DEFAULT_THREAD_STACKSIZE);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"posix_group_task_add: thread created\n");
if (thread == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, POSIX_WINSYNC_PLUGIN_NAME,
"unable to create task thread!\n");
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -154,7 +154,7 @@ posix_group_task_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry
*eAfter, int
}
out:
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"posix_group_task_add: <==\n");
return rv;
@@ -176,7 +176,7 @@ posix_group_task_destructor(Slapi_Task *task)
slapi_ch_free((void **) &mydata);
}
}
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"posix_group_task_destructor <--\n");
}
@@ -247,7 +247,7 @@ static int
posix_group_fix_memberuid_callback(Slapi_Entry *e, void *callback_data)
{
int i;
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"_fix_memberuid ==>\n");
cb_data *the_cb_data = (cb_data *) callback_data;
@@ -291,14 +291,14 @@ posix_group_fix_memberuid_callback(Slapi_Entry *e, void
*callback_data)
slapi_attr_get_valueset(dsmuid_attr, &dsmuid_vs);
}
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"_fix_memberuid scan for orphaned memberuids\n");
for (i = slapi_attr_first_value(muid_attr, &v); i != -1;
i = slapi_attr_next_value(muid_attr, i, &v)) {
char *muid = (char *)slapi_value_get_string(v);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"_fix_memberuid iterating memberuid: %s\n",
muid);
@@ -316,7 +316,7 @@ posix_group_fix_memberuid_callback(Slapi_Entry *e, void
*callback_data)
attrs, 0, NULL, NULL,
posix_winsync_get_plugin_identity(), 0);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"_fix_memberuid searching %s with filter: %s\n",
the_cb_data->dn, filter);
@@ -325,14 +325,14 @@ posix_group_fix_memberuid_callback(Slapi_Entry *e, void
*callback_data)
slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES,
&search_entries);
if (!search_entries || !search_entries[0]) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"_fix_memberuid Adding bad memberuid %s\n",
slapi_value_get_string(v));
slapi_mods_add_string(smods, LDAP_MOD_DELETE, "memberuid",
slapi_value_get_string(v));
if (dsmuid_vs && slapi_valueset_find(dsmuid_attr, dsmuid_vs, v))
{
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
POSIX_WINSYNC_PLUGIN_NAME,
"_fix_memberuid Adding bad dsonlymemberuid
%s\n",
slapi_value_get_string(v));
@@ -360,7 +360,7 @@ posix_group_fix_memberuid_callback(Slapi_Entry *e, void
*callback_data)
Slapi_ValueSet *bad_ums = NULL;
Slapi_Value *uniqval = NULL; /* uniquemeber Attribute values */
Slapi_ValueSet *uids = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"_fix_memberuid scan uniquemember, group %s\n", dn);
for (i = slapi_attr_first_value(obj_attr, &uniqval); i != -1;
i = slapi_attr_next_value(obj_attr, i, &uniqval)) {
@@ -372,7 +372,7 @@ posix_group_fix_memberuid_callback(Slapi_Entry *e, void
*callback_data)
if (child) {
slapi_entry_free(child);
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"_fix_memberuid orphaned uniquemember found:
%s\n", member);
if ((strncasecmp(member, "cn=", 3) == 0) ||
@@ -388,7 +388,7 @@ posix_group_fix_memberuid_callback(Slapi_Entry *e, void
*callback_data)
if (is_posix_group) {
char *uid = NULL;
/* search uid for member (DN) */
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME, "search
%s\n", member);
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"search %s\n", member);
if ((uid = searchUid(member)) != NULL) {
Slapi_Value *value = slapi_value_new();
/* Search an entry having "member" as DN and get uid value
from it. */
@@ -425,13 +425,13 @@ posix_group_fix_memberuid_callback(Slapi_Entry *e, void
*callback_data)
}
slapi_valueset_free(uids);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"_fix_memberuid Finishing...\n");
if (fixMembership && posix_winsync_config_get_mapNestedGrouping()) {
Slapi_ValueSet *del_nested_vs = slapi_valueset_new();
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"_fix_memberuid group deleted, recalculating
nesting\n");
propogateDeletionsUpward(e, sdn, bad_ums, del_nested_vs, 0);
@@ -459,7 +459,7 @@ posix_group_fix_memberuid_callback(Slapi_Entry *e, void
*callback_data)
}
slapi_mods_free(&smods);
bail:
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"_fix_memberuid <==\n");
/*
* Since Ticket #481 "expand nested posix groups",
@@ -473,7 +473,7 @@ bail:
static void
posix_group_fixup_task_thread(void *arg)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"_task_thread ==>\n");
Slapi_Task *task = (Slapi_Task *) arg;
@@ -484,7 +484,7 @@ posix_group_fixup_task_thread(void *arg)
return; /* no task */
}
slapi_task_inc_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"posix_group_fixup_task_thread --> refcount
incremented.\n" );
/* Fetch our task data from the task */
td = (task_data *) slapi_task_get_data(task);
@@ -506,15 +506,15 @@ posix_group_fixup_task_thread(void *arg)
slapi_task_log_status(task, "posix_group task finished.");
slapi_task_inc_progress(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"_task_thread finishing\n");
/* this will queue the destruction of the task */
slapi_task_finish(task, rc);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"_task_thread <==\n");
slapi_task_dec_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"posix_group_fixup_task_thread <-- refcount
decremented.\n");
}
diff --git a/ldap/servers/plugins/posix-winsync/posix-winsync-config.c
b/ldap/servers/plugins/posix-winsync/posix-winsync-config.c
index bf6e39e..8ab3b3d 100644
--- a/ldap/servers/plugins/posix-winsync/posix-winsync-config.c
+++ b/ldap/servers/plugins/posix-winsync/posix-winsync-config.c
@@ -46,7 +46,7 @@ posix_winsync_agmt_init(const Slapi_DN *ds_subtree, const Slapi_DN
*ad_subtree)
return NULL;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"--> posix_winsync_agmt_init [%s] [%s] -- begin\n",
slapi_sdn_get_dn(ds_subtree), slapi_sdn_get_dn(ad_subtree));
@@ -55,7 +55,7 @@ posix_winsync_agmt_init(const Slapi_DN *ds_subtree, const Slapi_DN
*ad_subtree)
/* if sdn is a parent of ds_subtree or sdn is the WinSync Subtree itself */
if (slapi_sdn_isparent(sdn, ds_subtree) || !slapi_sdn_compare(sdn, ds_subtree))
{
theConfig.rep_suffix = sdn;
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME, "Found
suffix's '%s'\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"Found suffix's '%s'\n",
slapi_sdn_get_dn(sdn));
break;
}
@@ -63,13 +63,13 @@ posix_winsync_agmt_init(const Slapi_DN *ds_subtree, const Slapi_DN
*ad_subtree)
}
if (!sdn) {
char *pardn = slapi_dn_parent(slapi_sdn_get_dn(ds_subtree));
- slapi_log_error(SLAPI_LOG_FATAL, POSIX_WINSYNC_PLUGIN_NAME, "suffix not
found for '%s'\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, POSIX_WINSYNC_PLUGIN_NAME, "suffix
not found for '%s'\n",
pardn);
slapi_ch_free_string(&pardn);
}
plugin_op_finished();
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"<-- posix_winsync_agmt_init -- end\n");
return cbdata;
@@ -151,10 +151,10 @@ posix_winsync_config(Slapi_Entry *config_e)
theConfig.config_e = NULL;
theConfig.lock = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME, "--> _config %s
-- begin\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME, "-->
_config %s -- begin\n",
slapi_entry_get_dn_const(config_e));
if (inited) {
- slapi_log_error(SLAPI_LOG_FATAL, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, POSIX_WINSYNC_PLUGIN_NAME,
"Error: POSIX WinSync plug-in already configured. "
"Please remove the plugin config entry [%s]\n",
slapi_entry_get_dn_const(config_e));
@@ -183,7 +183,7 @@ posix_winsync_config(Slapi_Entry *config_e)
const char *config_dn = slapi_entry_get_dn_const(config_e);
if (!memberUidLockInit()) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"posix_winsync_config -- init Monitor failed\n");
}
@@ -193,7 +193,7 @@ posix_winsync_config(Slapi_Entry *config_e)
rc = slapi_task_register_handler("memberuid task",
posix_group_task_add);
if (rc) {
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"posix_winsync_config -- register memberuid task
failed\n");
}
}
@@ -201,7 +201,7 @@ posix_winsync_config(Slapi_Entry *config_e)
inited = 1;
if (returncode != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, POSIX_WINSYNC_PLUGIN_NAME, "Error %d:
%s\n", returncode,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, POSIX_WINSYNC_PLUGIN_NAME, "Error
%d: %s\n", returncode,
returntext);
}
@@ -237,7 +237,7 @@ posix_winsync_apply_config(Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Ent
/* get msfuSchema value */
if (!slapi_entry_attr_find(e, POSIX_WINSYNC_MSSFU_SCHEMA, &testattr) &&
(NULL != testattr)) {
mssfuSchema = slapi_entry_attr_get_bool(e, POSIX_WINSYNC_MSSFU_SCHEMA);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"_apply_config: Config parameter %s: %d\n",
POSIX_WINSYNC_MSSFU_SCHEMA,
mssfuSchema);
}
@@ -245,7 +245,7 @@ posix_winsync_apply_config(Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Ent
/* get memberUid value */
if (!slapi_entry_attr_find(e, POSIX_WINSYNC_MAP_MEMBERUID, &testattr) &&
(NULL != testattr)) {
mapMemberUID = slapi_entry_attr_get_bool(e, POSIX_WINSYNC_MAP_MEMBERUID);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"_apply_config: Config parameter %s: %d\n",
POSIX_WINSYNC_MAP_MEMBERUID,
mapMemberUID);
}
@@ -253,21 +253,21 @@ posix_winsync_apply_config(Slapi_PBlock *pb, Slapi_Entry*
entryBefore, Slapi_Ent
if (!slapi_entry_attr_find(e, POSIX_WINSYNC_CREATE_MEMBEROFTASK, &testattr)
&& (NULL
!= testattr)) {
createMemberOfTask = slapi_entry_attr_get_bool(e,
POSIX_WINSYNC_CREATE_MEMBEROFTASK);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"_apply_config: Config parameter %s: %d\n",
POSIX_WINSYNC_CREATE_MEMBEROFTASK, createMemberOfTask);
}
/* get lower case UID in memberUID */
if (!slapi_entry_attr_find(e, POSIX_WINSYNC_LOWER_CASE, &testattr) &&
(NULL != testattr)) {
lowercase = slapi_entry_attr_get_bool(e, POSIX_WINSYNC_LOWER_CASE);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"_apply_config: Config parameter %s: %d\n",
POSIX_WINSYNC_LOWER_CASE,
lowercase);
}
/* propogate memberuids in nested grouping */
if (!slapi_entry_attr_find(e, POSIX_WINSYNC_MAP_NESTED_GROUPING, &testattr)
&& (NULL != testattr)) {
mapNestedGrouping = slapi_entry_attr_get_bool(e,
POSIX_WINSYNC_MAP_NESTED_GROUPING);
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"_apply_config: Config parameter %s: %d\n",
POSIX_WINSYNC_MAP_NESTED_GROUPING,
mapNestedGrouping);
}
@@ -286,7 +286,7 @@ posix_winsync_apply_config(Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Ent
theConfig.mapNestedGrouping = mapNestedGrouping;
/* success */
- slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
"<-- _apply_config: config evaluated\n");
*returncode = LDAP_SUCCESS;
diff --git a/ldap/servers/plugins/posix-winsync/posix-winsync.c
b/ldap/servers/plugins/posix-winsync/posix-winsync.c
index 1b1f44d..ab482dd 100644
--- a/ldap/servers/plugins/posix-winsync/posix-winsync.c
+++ b/ldap/servers/plugins/posix-winsync/posix-winsync.c
@@ -165,7 +165,7 @@ _check_account_lock(Slapi_Entry *ds_entry, int *isvirt)
rc = 0; /* account is disabled */
}
slapi_ch_free_string(&strval);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- _check_account_lock - entry [%s] has real "
"attribute nsAccountLock and entry %s locked\n",
slapi_entry_get_dn_const(ds_entry), rc ? "is not" :
"is");
@@ -194,13 +194,13 @@ _check_account_lock(Slapi_Entry *ds_entry, int *isvirt)
if (values != NULL) {
slapi_vattr_values_free(&values, &actual_type_name,
attr_free_flags);
}
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- _check_account_lock - entry [%s] has virtual "
"attribute nsAccountLock and entry %s locked\n",
slapi_entry_get_dn_const(ds_entry), rc ? "is not" :
"is");
} else {
rc = 1; /* no attr == entry is enabled */
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- _check_account_lock - entry [%s] does not "
"have attribute nsAccountLock - entry is not
locked\n",
slapi_entry_get_dn_const(ds_entry));
@@ -242,7 +242,7 @@ sync_acct_disable(void *cbdata, /* the usual domain config data */
ds_is_enabled = 0;
}
if (isvirt)
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- sync_acct_disable - %s DS nsaccountlock is
virtual!!!!\n",
slapi_entry_get_dn_const(ds_entry));
/* get the account lock state of the ad entry */
@@ -269,7 +269,7 @@ sync_acct_disable(void *cbdata, /* the usual domain config data */
}
if (update_entry) {
slapi_entry_attr_set_ulong(update_entry, "userAccountControl",
adval);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- sync_acct_disable - %s AD account [%s] - "
"new value is [%ld]\n", (ds_is_enabled) ?
"enabled" : "disabled",
slapi_entry_get_dn_const(update_entry), adval);
@@ -326,7 +326,7 @@ sync_acct_disable(void *cbdata, /* the usual domain config data */
mod_bval->bv_val = slapi_ch_strdup(acctvalstr);
mod_bval->bv_len = strlen(acctvalstr);
}
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- sync_acct_disable - %s AD account [%s] - "
"new value is [%ld]\n", (ds_is_enabled) ?
"enabled" : "disabled",
slapi_entry_get_dn_const(ad_entry), adval);
@@ -353,7 +353,7 @@ sync_acct_disable(void *cbdata, /* the usual domain config data */
if (update_entry) {
slapi_entry_attr_set_charptr(update_entry, attrtype, attrval);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- sync_acct_disable - %s DS account [%s]\n",
(ad_is_enabled)
? "enable" : "disable",
slapi_entry_get_dn_const(ds_entry));
} else { /* do mod */
@@ -373,7 +373,7 @@ sync_acct_disable(void *cbdata, /* the usual domain config data */
slapi_mods_add_ldapmod(smods, slapi_mod_get_ldapmod_passout(smod));
slapi_mod_free(&smod);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- sync_acct_disable - %s DS account [%s]\n",
(ad_is_enabled)
? "enable" : "disable",
slapi_entry_get_dn_const(ds_entry));
if (do_modify) {
@@ -465,7 +465,7 @@ getNisDomainName(const Slapi_Entry *ds_entry)
Slapi_Entry *entry = NULL;
int rc = -1;
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name, "getNisDomainName
start DN:%s\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"getNisDomainName start DN:%s\n",
slapi_sdn_get_dn(entry_sdn));
/* search NIS domain name */
slapi_sdn_get_parent(entry_sdn, subtree_sdn);
@@ -484,7 +484,7 @@ getNisDomainName(const Slapi_Entry *ds_entry)
if (rc == 0 && entry) {
nisdomainname = slapi_entry_attr_get_charptr(entry, type_NisDomain);
if (nisdomainname != NULL){
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
posix_winsync_plugin_name,
"getNisDomainName NisDomain %s found in DN:%s\n",
nisdomainname, slapi_sdn_get_dn(childparent));
break;
@@ -492,7 +492,7 @@ getNisDomainName(const Slapi_Entry *ds_entry)
}
}
slapi_sdn_copy(childparent, subtree_sdn);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"getNisDomainName iterate DN:%s\n",
slapi_sdn_get_dn(subtree_sdn));
slapi_entry_free(entry);
entry = NULL;
@@ -500,7 +500,7 @@ getNisDomainName(const Slapi_Entry *ds_entry)
slapi_pblock_destroy(pb);
if (rc != 0 || nisdomainname == NULL ) {
- slapi_log_error(SLAPI_LOG_REPL, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, posix_winsync_plugin_name,
"getNisDomainName: no nisdomainname found in %s, LDAP
Err%d\n",
slapi_sdn_get_dn(subtree_sdn), rc);
}
@@ -518,7 +518,7 @@ addNisDomainName(Slapi_Mod *smod, const Slapi_Entry *ds_entry)
char* nisdomainname = getNisDomainName(ds_entry);
if ( nisdomainname == NULL ) {
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"addNisDomainName NisDomain not found\n");
rc = LDAP_NO_SUCH_ATTRIBUTE;
} else {
@@ -533,7 +533,7 @@ addNisDomainName(Slapi_Mod *smod, const Slapi_Entry *ds_entry)
if (slapi_is_loglevel_set(SLAPI_LOG_PLUGIN))
slapi_mod_dump((LDAPMod*) slapi_mod_get_ldapmod_byref(smod), 0);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"addNisDomainName NisDomain %s found\n",
nisdomainname);
slapi_ch_free_string(&nisdomainname); /* allocated by
slapi_entry_attr_getchrptr */
}
@@ -544,10 +544,10 @@ static void
posix_winsync_dirsync_search_params_cb(void *cbdata, const char *agmt_dn, char **base,
int *scope,
char **filter, char ***attrs, LDAPControl ***serverctrls)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_dirsync_search_params_cb --
begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_dirsync_search_params_cb -- end\n");
return;
@@ -558,10 +558,10 @@ static void
posix_winsync_pre_ad_search_cb(void *cbdata, const char *agmt_dn, char **base, int
*scope,
char **filter, char ***attrs, LDAPControl ***serverctrls)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_pre_ad_search_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_pre_ad_search_cb -- end\n");
return;
@@ -578,7 +578,7 @@ posix_winsync_pre_ds_search_entry_cb(void *cbdata, const char
*agmt_dn, char **b
char *s = tmpbase;
int i=0;
*/
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name, "-->
_pre_ds_search_cb -- begin\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name, "-->
_pre_ds_search_cb -- begin\n");
/* skip the first subtree container ou=xyz, */
/* if (strlen(*base) > 3) {
s++;
@@ -595,11 +595,11 @@ posix_winsync_pre_ds_search_entry_cb(void *cbdata, const char
*agmt_dn, char **b
}
}
*/
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"-- _pre_ds_search_cb - base [%s] "
"scope [%d] filter [%s]\n", *base, *scope, *filter);
/* slapi_ch_free_string(&tmpbase); */
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name, "<--
_pre_ds_search_cb -- end\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name, "<--
_pre_ds_search_cb -- end\n");
return;
}
@@ -608,14 +608,14 @@ static void
posix_winsync_pre_ds_search_all_cb(void *cbdata, const char *agmt_dn, char **base, int
*scope,
char **filter, char ***attrs, LDAPControl ***serverctrls)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_pre_ds_search_all_cb -- orig filter [%s]
-- begin\n",
((filter && *filter) ? *filter : "NULL"));
/* slapi_ch_free_string(filter);
*filter =
slapi_ch_strdup("(|(objectclass=posixaccount)(objectclass=posixgroup))");
*/
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_pre_ds_search_all_cb -- end\n");
return;
@@ -636,7 +636,7 @@ posix_winsync_pre_ad_mod_user_cb(void *cbdata, const Slapi_Entry
*rawentry, Slap
return;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_pre_ad_mod_user_cb -- begin DS account
[%s]\n",
slapi_entry_get_dn_const(ds_entry));
if (posix_winsync_config_get_msSFUSchema()) {
@@ -651,7 +651,7 @@ posix_winsync_pre_ad_mod_user_cb(void *cbdata, const Slapi_Entry
*rawentry, Slap
size_t i = 0;
slapi_attr_get_type(attr, &type);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"_pre_ad_mod_user_cb -- check modify type %s\n",
type);
for (; attr_map[i].windows_attribute_name != NULL; i++) {
if (0 == slapi_attr_type_cmp(type, attr_map[i].ldap_attribute_name,
@@ -669,8 +669,7 @@ posix_winsync_pre_ad_mod_user_cb(void *cbdata, const Slapi_Entry
*rawentry, Slap
int values_equal = 0;
values_equal = attr_compare_equal(attr, ad_attr);
if (!values_equal) {
- slapi_log_error(
- SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
posix_winsync_plugin_name,
"_pre_ad_mod_user_cb -- update mods: %s, %s
: values are different -> modify\n",
slapi_sdn_get_dn(slapi_entry_get_sdn_const(ds_entry)),
@@ -694,7 +693,7 @@ posix_winsync_pre_ad_mod_user_cb(void *cbdata, const Slapi_Entry
*rawentry, Slap
slapi_ch_free((void**) &ad_type);
slapi_valueset_free(vs);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"_pre_ad_mod_user_cb -- add modify %s DS account
[%s]\n",
attr_map[i].windows_attribute_name,
slapi_entry_get_dn_const(ds_entry));
@@ -711,7 +710,7 @@ posix_winsync_pre_ad_mod_user_cb(void *cbdata, const Slapi_Entry
*rawentry, Slap
}
}
plugin_op_finished();
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_pre_ad_mod_user_cb -- end\n");
return;
@@ -735,7 +734,7 @@ posix_winsync_pre_ad_mod_group_cb(void *cbdata, const Slapi_Entry
*rawentry, Sla
if (posix_winsync_config_get_msSFUSchema())
attr_map = group_mssfu_attribute_map;
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> _pre_ad_mod_group_cb -- begin DS account [%s]\n",
slapi_entry_get_dn_const(ds_entry));
@@ -746,7 +745,7 @@ posix_winsync_pre_ad_mod_group_cb(void *cbdata, const Slapi_Entry
*rawentry, Sla
size_t i = 0;
slapi_attr_get_type(attr, &type);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"_pre_ad_mod_group_cb -- check modify type %s\n",
type);
for (; attr_map[i].windows_attribute_name != NULL; i++) {
if (0 == slapi_attr_type_cmp(type, attr_map[i].ldap_attribute_name,
@@ -792,8 +791,7 @@ posix_winsync_pre_ad_mod_group_cb(void *cbdata, const Slapi_Entry
*rawentry, Sla
int values_equal = 0;
values_equal = attr_compare_equal(attr, ad_attr);
if (!values_equal) {
- slapi_log_error(
- SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
posix_winsync_plugin_name,
"_pre_ad_mod_group_cb -- update mods: %s, %s
: values are different -> modify\n",
slapi_sdn_get_dn(slapi_entry_get_sdn_const(ds_entry)),
@@ -817,21 +815,21 @@ posix_winsync_pre_ad_mod_group_cb(void *cbdata, const Slapi_Entry
*rawentry, Sla
slapi_ch_free((void**) &ad_type);
slapi_valueset_free(vs);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"_pre_ad_mod_group_cb -- add modify %s DS account
[%s]\n",
attr_map[i].windows_attribute_name,
slapi_entry_get_dn_const(ds_entry));
}
}
}
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"_pre_ad_mod_group_cb -- step\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"_pre_ad_mod_group_cb -- step\n");
if (slapi_is_loglevel_set(SLAPI_LOG_PLUGIN)) {
for (mod = slapi_mods_get_first_mod(smods); mod; mod =
slapi_mods_get_next_mod(smods)) {
slapi_mod_dump(mod, 0);
}
}
plugin_op_finished();
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- _pre_ad_mod_group_cb -- end\n");
return;
@@ -856,11 +854,11 @@ posix_winsync_pre_ds_mod_user_cb(void *cbdata, const Slapi_Entry
*rawentry, Slap
return;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> _pre_ds_mod_user_cb -- begin\n");
if ((NULL == ad_entry) || (NULL == ds_entry)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- _pre_ds_mod_user_cb -- Empty %s entry.\n",
(NULL==ad_entry)?"ad entry":"ds entry");
plugin_op_finished();
@@ -882,7 +880,7 @@ posix_winsync_pre_ds_mod_user_cb(void *cbdata, const Slapi_Entry
*rawentry, Slap
&pa_attr)) {
/* required attribute does not exist */
posixval = PR_FALSE;
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"AD entry %s does not have required attribute %s for
posixAccount objectclass.\n",
slapi_entry_get_dn_const(ad_entry),
attr_map[i].ldap_attribute_name);
@@ -914,7 +912,7 @@ posix_winsync_pre_ds_mod_user_cb(void *cbdata, const Slapi_Entry
*rawentry, Slap
posixval = PR_TRUE;
values_equal = attr_compare_equal(attr, local_attr);
if (!values_equal) {
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
posix_winsync_plugin_name,
"_pre_ds_mod_user_cb -- update mods: %s, %s
: values are different -> modify\n",
slapi_sdn_get_dn(slapi_entry_get_sdn_const(ds_entry)),
local_type);
@@ -935,7 +933,7 @@ posix_winsync_pre_ds_mod_user_cb(void *cbdata, const Slapi_Entry
*rawentry, Slap
}
}
}
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- _pre_ds_mod_user_cb present %d modify %d isPosixaccount
%s\n",
is_present_local, do_modify_local,
posixval?"yes":"no");
@@ -955,7 +953,7 @@ posix_winsync_pre_ds_mod_user_cb(void *cbdata, const Slapi_Entry
*rawentry, Slap
slapi_attr_get_valueset(oc_attr, &oc_vs);
slapi_value_init_string(oc_nv, "posixAccount");
slapi_valueset_add_value(oc_vs, oc_nv);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- _pre_ds_mod_user_cb add
oc:posixAccount\n");
slapi_value_init_string(voc, "shadowAccount");
@@ -964,7 +962,7 @@ posix_winsync_pre_ds_mod_user_cb(void *cbdata, const Slapi_Entry
*rawentry, Slap
slapi_value_init_string(oc_nv, "shadowAccount");
slapi_valueset_add_value(oc_vs, oc_nv);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
posix_winsync_plugin_name,
"<-- _pre_ds_mod_user_cb add
oc:shadowAccount\n");
}
slapi_mods_add_mod_values(smods, LDAP_MOD_REPLACE,
"objectClass",
@@ -982,7 +980,7 @@ posix_winsync_pre_ds_mod_user_cb(void *cbdata, const Slapi_Entry
*rawentry, Slap
slapi_value_free(&voc);
}
sync_acct_disable(cbdata, ad_entry, ds_entry, ACCT_DISABLE_TO_DS, NULL, smods,
do_modify);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name, "<--
_pre_ds_mod_user_cb %s %s\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name, "<--
_pre_ds_mod_user_cb %s %s\n",
slapi_sdn_get_dn(slapi_entry_get_sdn_const(ds_entry)), (do_modify) ?
"modified"
: "not modified");
@@ -992,7 +990,7 @@ posix_winsync_pre_ds_mod_user_cb(void *cbdata, const Slapi_Entry
*rawentry, Slap
}
}
plugin_op_finished();
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name, "<--
_pre_ds_mod_user_cb -- end\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name, "<--
_pre_ds_mod_user_cb -- end\n");
return;
}
@@ -1017,7 +1015,7 @@ posix_winsync_pre_ds_mod_group_cb(void *cbdata, const Slapi_Entry
*rawentry, Sla
if (posix_winsync_config_get_msSFUSchema())
attr_map = group_mssfu_attribute_map;
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> _pre_ds_mod_group_cb -- begin\n");
/* in the ad to ds case we have no changelog, so we have to compare the entries */
for (rc = slapi_entry_first_attr(ad_entry, &attr); rc == 0; rc
@@ -1033,7 +1031,7 @@ posix_winsync_pre_ds_mod_group_cb(void *cbdata, const Slapi_Entry
*rawentry, Sla
Slapi_Attr *local_attr = NULL;
char *local_type = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"_pre_ds_mod_group_cb -- found AD attr %s\n",
type);
slapi_attr_get_valueset(attr, &vs);
local_type = slapi_ch_strdup(attr_map[i].ldap_attribute_name);
@@ -1041,11 +1039,11 @@ posix_winsync_pre_ds_mod_group_cb(void *cbdata, const Slapi_Entry
*rawentry, Sla
is_present_local = (NULL == local_attr) ? 0 : 1;
if (is_present_local) {
int values_equal = 0;
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
posix_winsync_plugin_name,
"_pre_ds_mod_group_cb -- compare with DS attr
%s\n", local_type);
values_equal = attr_compare_equal(attr, local_attr);
if (!values_equal) {
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
posix_winsync_plugin_name,
"_pre_ds_mod_group_cb -- update mods: %s, %s
: values are different -> modify\n",
slapi_sdn_get_dn(slapi_entry_get_sdn_const(ds_entry)),
local_type);
@@ -1055,14 +1053,14 @@ posix_winsync_pre_ds_mod_group_cb(void *cbdata, const Slapi_Entry
*rawentry, Sla
*do_modify = 1;
}
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
posix_winsync_plugin_name,
"_pre_ds_mod_group_cb -- add attr\n");
slapi_mods_add_mod_values(smods, LDAP_MOD_ADD, local_type,
valueset_get_valuearray(vs));
*do_modify = do_modify_local = 1;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"_pre_ds_mod_group_cb -- values compared\n");
slapi_ch_free((void**) &local_type);
@@ -1071,11 +1069,11 @@ posix_winsync_pre_ds_mod_group_cb(void *cbdata, const Slapi_Entry
*rawentry, Sla
}
}
}
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"_pre_ds_mod_group_cb present %d modify %d before\n",
is_present_local,
do_modify_local);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"_pre_ds_mod_group_cb present %d modify %d\n",
is_present_local,
do_modify_local);
@@ -1092,7 +1090,7 @@ posix_winsync_pre_ds_mod_group_cb(void *cbdata, const Slapi_Entry
*rawentry, Sla
slapi_attr_get_valueset(oc_attr, &oc_vs);
slapi_value_init_string(oc_nv, "posixGroup");
slapi_valueset_add_value(oc_vs, oc_nv);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"_pre_ds_mod_group_cb add oc:posixGroup\n");
slapi_mods_add_mod_values(smods, LDAP_MOD_REPLACE, "objectClass",
valueset_get_valuearray(oc_vs));
@@ -1107,14 +1105,14 @@ posix_winsync_pre_ds_mod_group_cb(void *cbdata, const Slapi_Entry
*rawentry, Sla
memberUidUnlock();
}
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"_pre_ds_mod_group_cb step\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"_pre_ds_mod_group_cb step\n");
if (slapi_is_loglevel_set(SLAPI_LOG_PLUGIN)) {
for (mod = slapi_mods_get_first_mod(smods); mod; mod =
slapi_mods_get_next_mod(smods)) {
slapi_mod_dump(mod, 0);
}
}
plugin_op_finished();
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- _pre_ds_mod_group_cb -- end\n");
return;
@@ -1140,7 +1138,7 @@ posix_winsync_pre_ds_add_user_cb(void *cbdata, const Slapi_Entry
*rawentry, Slap
attr_map = user_mssfu_attribute_map;
/* add objectclass: posixAccount, uidnumber, gidnumber, homeDirectory, loginShell */
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> _pre_ds_add_user_cb -- begin\n");
/* check all of the required attributes are in the ad_entry:
@@ -1155,7 +1153,7 @@ posix_winsync_pre_ds_add_user_cb(void *cbdata, const Slapi_Entry
*rawentry, Slap
&pa_attr)) {
/* required attribute does not exist */
posixval = PR_FALSE;
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"AD entry %s does not have required attribute %s for
posixAccount objectclass.\n",
slapi_entry_get_dn_const(ad_entry),
attr_map[i].ldap_attribute_name);
@@ -1174,7 +1172,7 @@ posix_winsync_pre_ds_add_user_cb(void *cbdata, const Slapi_Entry
*rawentry, Slap
continue;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> _pre_ds_add_user_cb -- "
"look for [%s] to new entry [%s]\n",
type, slapi_entry_get_dn_const(ds_entry));
@@ -1187,7 +1185,7 @@ posix_winsync_pre_ds_add_user_cb(void *cbdata, const Slapi_Entry
*rawentry, Slap
attr_map[i].ldap_attribute_name, svs);
slapi_valueset_free(svs);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
posix_winsync_plugin_name,
"--> _pre_ds_add_user_cb -- "
"adding val for [%s] to new entry [%s]\n",
type, slapi_entry_get_dn_const(ds_entry));
@@ -1198,7 +1196,7 @@ posix_winsync_pre_ds_add_user_cb(void *cbdata, const Slapi_Entry
*rawentry, Slap
rc |= slapi_entry_add_string(ds_entry, "objectClass",
"shadowAccount");
rc |= slapi_entry_add_string(ds_entry, "objectClass",
"inetUser");
if (rc != 0) {
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- _pre_ds_add_user_cb -- adding objectclass for
new entry failed %d\n",
rc);
} else {
@@ -1211,7 +1209,7 @@ posix_winsync_pre_ds_add_user_cb(void *cbdata, const Slapi_Entry
*rawentry, Slap
}
sync_acct_disable(cbdata, ad_entry, ds_entry, ACCT_DISABLE_TO_DS, ds_entry, NULL,
NULL);
plugin_op_finished();
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name, "<--
_pre_ds_add_user_cb -- end\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name, "<--
_pre_ds_add_user_cb -- end\n");
return;
}
@@ -1234,7 +1232,7 @@ posix_winsync_pre_ds_add_group_cb(void *cbdata, const Slapi_Entry
*rawentry, Sla
if (posix_winsync_config_get_msSFUSchema())
attr_map = group_mssfu_attribute_map;
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_pre_ds_add_group_cb -- begin\n");
for (slapi_entry_first_attr(ad_entry, &attr); attr;
slapi_entry_next_attr(ad_entry, attr, &attr)) {
@@ -1245,7 +1243,7 @@ posix_winsync_pre_ds_add_group_cb(void *cbdata, const Slapi_Entry
*rawentry, Sla
continue;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name, "-->
_pre_ds_add_group_cb -- "
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> _pre_ds_add_group_cb -- "
"look for [%s] to new entry [%s]\n", type,
slapi_entry_get_dn_const(ds_entry));
for (i = 0; attr_map && attr_map[i].windows_attribute_name != NULL; i++)
{
if (slapi_attr_type_cmp(attr_map[i].windows_attribute_name, type,
@@ -1255,7 +1253,7 @@ posix_winsync_pre_ds_add_group_cb(void *cbdata, const Slapi_Entry
*rawentry, Sla
slapi_entry_add_valueset(ds_entry, attr_map[i].ldap_attribute_name,
svs);
slapi_valueset_free(svs);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> _pre_ds_add_group_cb -- "
"adding val for [%s] to new entry [%s]\n",
type,
slapi_entry_get_dn_const(ds_entry));
@@ -1267,7 +1265,7 @@ posix_winsync_pre_ds_add_group_cb(void *cbdata, const Slapi_Entry
*rawentry, Sla
int rc;
rc = slapi_entry_add_string(ds_entry, "objectClass",
"posixGroup");
if (rc != 0) {
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- _pre_ds_add_group_cb -- adding objectclass for
new entry failed %d\n",
rc);
}
@@ -1278,7 +1276,7 @@ posix_winsync_pre_ds_add_group_cb(void *cbdata, const Slapi_Entry
*rawentry, Sla
memberUidUnlock();
}
plugin_op_finished();
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_pre_ds_add_group_cb -- end\n");
return;
@@ -1289,11 +1287,11 @@ posix_winsync_get_new_ds_user_dn_cb(void *cbdata, const
Slapi_Entry *rawentry,
Slapi_Entry *ad_entry, char **new_dn_string, const Slapi_DN *ds_suffix,
const Slapi_DN *ad_suffix)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_get_new_ds_user_dn_cb -- old dn [%s] --
begin\n",
*new_dn_string);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_get_new_ds_user_dn_cb -- new dn [%s] --
end\n",
*new_dn_string);
@@ -1305,10 +1303,10 @@ posix_winsync_get_new_ds_group_dn_cb(void *cbdata, const
Slapi_Entry *rawentry,
Slapi_Entry *ad_entry, char **new_dn_string, const Slapi_DN *ds_suffix,
const Slapi_DN *ad_suffix)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_get_new_ds_group_dn_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_get_new_ds_group_dn_cb -- end\n");
return;
@@ -1336,7 +1334,7 @@ posix_winsync_pre_ad_mod_user_mods_cb(void *cbdata, const
Slapi_Entry *rawentry,
attr_map = user_mssfu_attribute_map;
/* mod if changed objectclass: posixAccount, uidnumber, gidnumber, homeDirectory,
loginShell */
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> _pre_ad_mod_user_mods_cb -- begin DS account [%s]
\n",
slapi_entry_get_dn_const(ds_entry));
@@ -1346,7 +1344,7 @@ posix_winsync_pre_ad_mod_user_mods_cb(void *cbdata, const
Slapi_Entry *rawentry,
for (mod = slapi_mods_get_first_mod(smods); mod; mod =
slapi_mods_get_next_mod(smods)) {
size_t i = 0;
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"_pre_ad_mod_user_mods_cb -- check modify type %s\n",
mod->mod_type);
for (; attr_map[i].windows_attribute_name != NULL; i++) {
if (0 == slapi_attr_type_cmp(mod->mod_type,
attr_map[i].ldap_attribute_name,
@@ -1356,13 +1354,13 @@ posix_winsync_pre_ad_mod_user_mods_cb(void *cbdata, const
Slapi_Entry *rawentry,
slapi_mod_set_type(mysmod, attr_map[i].windows_attribute_name);
slapi_mods_add_ldapmod(new_smods,
slapi_mod_get_ldapmod_passout(mysmod));
slapi_mod_free(&mysmod);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"_pre_ad_mod_user_mods_cb -- add modify %s DS
account [%s]\n",
attr_map[i].windows_attribute_name,
slapi_entry_get_dn_const(ds_entry));
if (0 == slapi_attr_type_cmp(mod->mod_type, "uidNumber",
SLAPI_TYPE_CMP_SUBTYPE)) {
Slapi_Mod *ocsmod = slapi_mod_new();
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
posix_winsync_plugin_name,
"_pre_ad_mod_user_mods_cb -- add
NisDomain\n");
addNisDomainName(ocsmod, ds_entry);
slapi_mods_add_ldapmod(new_smods,
slapi_mod_get_ldapmod_passout(ocsmod));
@@ -1387,7 +1385,7 @@ posix_winsync_pre_ad_mod_user_mods_cb(void *cbdata, const
Slapi_Entry *rawentry,
slapi_mods_free(&smods);
slapi_mods_free(&new_smods);
plugin_op_finished();
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- _pre_ad_mod_user_mods_cb -- end\n");
return;
@@ -1415,7 +1413,7 @@ posix_winsync_pre_ad_mod_group_mods_cb(void *cbdata, const
Slapi_Entry *rawentry
if (posix_winsync_config_get_msSFUSchema())
attr_map = group_mssfu_attribute_map;
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> _pre_ad_mod_group_mods_cb -- begin\n");
/* wrap the modstosend in a Slapi_Mods for convenience */
slapi_mods_init_passin(new_smods, *modstosend);
@@ -1423,7 +1421,7 @@ posix_winsync_pre_ad_mod_group_mods_cb(void *cbdata, const
Slapi_Entry *rawentry
for (mod = slapi_mods_get_first_mod(smods); mod; mod =
slapi_mods_get_next_mod(smods)) {
size_t i = 0;
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"_pre_ad_mod_group_mods_cb -- check modify type %s\n",
mod->mod_type);
for (; attr_map[i].windows_attribute_name != NULL; i++) {
if (0 == slapi_attr_type_cmp(mod->mod_type,
attr_map[i].ldap_attribute_name,
@@ -1438,7 +1436,7 @@ posix_winsync_pre_ad_mod_group_mods_cb(void *cbdata, const
Slapi_Entry *rawentry
slapi_mod_set_type(mysmod, attr_map[i].windows_attribute_name);
if (0 == slapi_attr_type_cmp(mod->mod_type, "gidNumber",
SLAPI_TYPE_CMP_SUBTYPE)) {
Slapi_Mod *ocsmod = slapi_mod_new();
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
posix_winsync_plugin_name,
"_pre_ad_mod_group_mods_cb -- add
NisDomain\n");
addNisDomainName(ocsmod, ds_entry);
slapi_mods_add_ldapmod(new_smods,
slapi_mod_get_ldapmod_passout(ocsmod));
@@ -1447,7 +1445,7 @@ posix_winsync_pre_ad_mod_group_mods_cb(void *cbdata, const
Slapi_Entry *rawentry
}
slapi_mods_add_ldapmod(new_smods,
slapi_mod_get_ldapmod_passout(mysmod));
slapi_mod_free(&mysmod);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"_pre_ad_mod_group_mods_cb -- add modify %s DS
account [%s]\n",
attr_map[i].windows_attribute_name,
slapi_entry_get_dn_const(ds_entry));
@@ -1465,7 +1463,7 @@ posix_winsync_pre_ad_mod_group_mods_cb(void *cbdata, const
Slapi_Entry *rawentry
slapi_mods_free(&new_smods);
plugin_op_finished();
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- _pre_ad_mod_group_mods_cb -- end\n");
return;
@@ -1475,10 +1473,10 @@ static int
posix_winsync_can_add_entry_to_ad_cb(void *cbdata, const Slapi_Entry *local_entry,
const Slapi_DN *remote_dn)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_can_add_entry_to_ad_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_can_add_entry_to_ad_cb -- end\n");
return 1; /* false - do not allow entries to be added to ad */
@@ -1494,12 +1492,12 @@ posix_winsync_begin_update_cb(void *cbdata, const Slapi_DN
*ds_subtree, const Sl
return;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_begin_update_cb -- begin\n");
posix_winsync_config_reset_MOFTaskCreated();
plugin_op_finished();
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_begin_update_cb -- end\n");
return;
@@ -1516,7 +1514,7 @@ posix_winsync_end_update_cb(void *cbdata, const Slapi_DN
*ds_subtree, const Slap
return;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_end_update_cb -- begin %d %d\n",
posix_winsync_config_get_MOFTaskCreated(),
posix_winsync_config_get_createMOFTask());
@@ -1531,16 +1529,16 @@ posix_winsync_end_update_cb(void *cbdata, const Slapi_DN
*ds_subtree, const Slap
if (NULL == dn) {
slapi_pblock_destroy(pb);
slapi_entry_free(e_task);
- slapi_log_error(SLAPI_LOG_FATAL, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, posix_winsync_plugin_name,
"posix_winsync_end_update_cb: "
"failed to create task dn:
cn=%s,%s,cn=tasks,cn=config\n",
posix_winsync_plugin_name, MEMBEROFTASK);
plugin_op_finished();
return;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_end_update_cb, create task %s\n",
dn);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_end_update_cb, init'ing
task\n");
slapi_entry_init(e_task, dn, NULL);
@@ -1551,24 +1549,24 @@ posix_winsync_end_update_cb(void *cbdata, const Slapi_DN
*ds_subtree, const Slap
slapi_add_entry_internal_set_pb(pb, e_task, NULL,
posix_winsync_get_plugin_identity(), 0);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_end_update_cb, adding task\n");
slapi_add_internal_pb(pb);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_end_update_cb, retrieving return
code\n");
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if (LDAP_ALREADY_EXISTS == rc) {
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"posix_winsync_end_update_cb: "
"task entry %s already exists\n",
posix_winsync_plugin_name);
} else if (rc != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, posix_winsync_plugin_name,
"posix_winsync_end_update_cb: "
"failed to add task entry (%d)\n", rc);
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"posix_winsync_end_update_cb: "
"add task entry\n");
}
@@ -1578,7 +1576,7 @@ posix_winsync_end_update_cb(void *cbdata, const Slapi_DN
*ds_subtree, const Slap
posix_winsync_config_reset_MOFTaskCreated();
}
plugin_op_finished();
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_end_update_cb -- end\n");
return;
@@ -1587,10 +1585,10 @@ posix_winsync_end_update_cb(void *cbdata, const Slapi_DN
*ds_subtree, const Slap
static void
posix_winsync_destroy_agmt_cb(void *cbdata, const Slapi_DN *ds_subtree, const Slapi_DN
*ad_subtree)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_destroy_agmt_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_destroy_agmt_cb -- end\n");
return;
@@ -1599,16 +1597,16 @@ posix_winsync_destroy_agmt_cb(void *cbdata, const Slapi_DN
*ds_subtree, const Sl
static void
posix_winsync_post_ad_mod_user_cb(void *cookie, const Slapi_Entry *rawentry, Slapi_Entry
*ad_entry, Slapi_Entry *ds_entry, Slapi_Mods *smods, int *result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_post_ad_mod_user_cb -- begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"Result of modifying AD entry [%s] was [%d:%s]\n",
slapi_entry_get_dn(ad_entry), *result, ldap_err2string(*result));
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_post_ad_mod_user_cb -- end\n");
return;
@@ -1617,16 +1615,16 @@ posix_winsync_post_ad_mod_user_cb(void *cookie, const Slapi_Entry
*rawentry, Sla
static void
posix_winsync_post_ad_mod_group_cb(void *cookie, const Slapi_Entry *rawentry, Slapi_Entry
*ad_entry, Slapi_Entry *ds_entry, Slapi_Mods *smods, int *result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_post_ad_mod_group_cb -- begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"Result of modifying AD entry [%s] was [%d:%s]\n",
slapi_entry_get_dn(ad_entry), *result, ldap_err2string(*result));
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_post_ad_mod_group_cb -- end\n");
return;
@@ -1635,16 +1633,16 @@ posix_winsync_post_ad_mod_group_cb(void *cookie, const Slapi_Entry
*rawentry, Sl
static void
posix_winsync_post_ds_mod_user_cb(void *cookie, const Slapi_Entry *rawentry, Slapi_Entry
*ad_entry, Slapi_Entry *ds_entry, Slapi_Mods *smods, int *result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_post_ds_mod_user_cb -- begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"Result of modifying DS entry [%s] was [%d:%s]\n",
slapi_entry_get_dn(ds_entry), *result, ldap_err2string(*result));
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_post_ds_mod_user_cb -- end\n");
return;
@@ -1653,16 +1651,16 @@ posix_winsync_post_ds_mod_user_cb(void *cookie, const Slapi_Entry
*rawentry, Sla
static void
posix_winsync_post_ds_mod_group_cb(void *cookie, const Slapi_Entry *rawentry, Slapi_Entry
*ad_entry, Slapi_Entry *ds_entry, Slapi_Mods *smods, int *result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_post_ds_mod_group_cb -- begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"Result of modifying DS entry [%s] was [%d:%s]\n",
slapi_entry_get_dn(ds_entry), *result, ldap_err2string(*result));
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_post_ds_mod_group_cb -- end\n");
return;
@@ -1671,16 +1669,16 @@ posix_winsync_post_ds_mod_group_cb(void *cookie, const Slapi_Entry
*rawentry, Sl
static void
posix_winsync_post_ds_add_user_cb(void *cookie, const Slapi_Entry *rawentry, Slapi_Entry
*ad_entry, Slapi_Entry *ds_entry, int *result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_post_ds_add_user_cb -- begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"Result of adding DS entry [%s] was [%d:%s]\n",
slapi_entry_get_dn(ds_entry), *result, ldap_err2string(*result));
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_post_ds_add_user_cb -- end\n");
return;
@@ -1689,16 +1687,16 @@ posix_winsync_post_ds_add_user_cb(void *cookie, const Slapi_Entry
*rawentry, Sla
static void
posix_winsync_post_ds_add_group_cb(void *cookie, const Slapi_Entry *rawentry, Slapi_Entry
*ad_entry, Slapi_Entry *ds_entry, int *result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_post_ds_add_group_cb -- begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"Result of adding DS entry [%s] was [%d:%s]\n",
slapi_entry_get_dn(ds_entry), *result, ldap_err2string(*result));
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_post_ds_add_group_cb -- end\n");
return;
@@ -1723,7 +1721,7 @@ posix_winsync_pre_ad_add_user_cb(void *cookie, Slapi_Entry
*ad_entry, Slapi_Entr
/* if ds_entry has oc posixAccount add uidnumber, gidnumber, homeDirectory, loginShell,
gecos */
/* syncing/mapping of nsaccountlock -> userAccountControl will already done by the
normal Win Sync-Service */
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> _pre_ad_add_user_cb -- begin DS account [%s] \n",
slapi_entry_get_dn_const(ds_entry));
rc = slapi_entry_attr_find(ds_entry, "objectclass", &obj_attr);
@@ -1731,7 +1729,7 @@ posix_winsync_pre_ad_add_user_cb(void *cookie, Slapi_Entry
*ad_entry, Slapi_Entr
int i;
Slapi_Value * value = NULL; /* Attribute values */
- slapi_log_error( SLAPI_LOG_PLUGIN,
POSIX_WINSYNC_PLUGIN_NAME,"_pre_ad_add_user_cb -- test objectclass
posixAccount\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
POSIX_WINSYNC_PLUGIN_NAME,"_pre_ad_add_user_cb -- test objectclass
posixAccount\n");
for (
i = slapi_attr_first_value(obj_attr, &value);
i != -1;
@@ -1740,7 +1738,7 @@ posix_winsync_pre_ad_add_user_cb(void *cookie, Slapi_Entry
*ad_entry, Slapi_Entr
const char * oc = NULL;
oc = slapi_value_get_string(value);
- slapi_log_error( SLAPI_LOG_PLUGIN,
POSIX_WINSYNC_PLUGIN_NAME,"_pre_ad_add_user_cb -- oc: %s \n", oc);
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
POSIX_WINSYNC_PLUGIN_NAME,"_pre_ad_add_user_cb -- oc: %s \n", oc);
if (strncasecmp(oc,"posixAccount",13)==0){ /* entry has objectclass
posixAccount */
Slapi_Attr *attr = NULL;
char *nisdomainname = getNisDomainName(ds_entry);
@@ -1752,7 +1750,7 @@ posix_winsync_pre_ad_add_user_cb(void *cookie, Slapi_Entry
*ad_entry, Slapi_Entr
size_t i = 0;
slapi_attr_get_type( attr, &type );
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
posix_winsync_plugin_name,
"_pre_ad_add_user_cb -- check add attr: %s\n", type);
for (; attr_map[i].windows_attribute_name != NULL; i++) {
if (0 ==
slapi_attr_type_cmp(type,attr_map[i].ldap_attribute_name, SLAPI_TYPE_CMP_SUBTYPE)){
@@ -1762,7 +1760,7 @@ posix_winsync_pre_ad_add_user_cb(void *cookie, Slapi_Entry
*ad_entry, Slapi_Entr
slapi_entry_add_valueset(ad_entry,
attr_map[i].windows_attribute_name, vs);
slapi_valueset_free(vs);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
posix_winsync_plugin_name,
"--> _pre_ad_add_user_cb --
"
"adding val for [%s] to new entry
[%s]\n",
type,
slapi_entry_get_dn_const(ad_entry));
@@ -1772,7 +1770,7 @@ posix_winsync_pre_ad_add_user_cb(void *cookie, Slapi_Entry
*ad_entry, Slapi_Entr
if (nisdomainname) {
slapi_entry_add_value(ad_entry,
"msSFU30NisDomain",
slapi_value_new_string(nisdomainname));
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
posix_winsync_plugin_name,
"--> _pre_ad_add_user_cb --
"
"adding val for [%s] to new entry
[%s]\n",
"msSFU30NisDomain",
nisdomainname);
@@ -1782,7 +1780,7 @@ posix_winsync_pre_ad_add_user_cb(void *cookie, Slapi_Entry
*ad_entry, Slapi_Entr
}
}
plugin_op_finished();
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- _pre_ad_add_user_cb -- end\n");
return;
@@ -1806,7 +1804,7 @@ posix_winsync_pre_ad_add_group_cb(void *cookie, Slapi_Entry
*ad_entry, Slapi_Ent
}
/* if ds_entry has oc posixGroup add gidnumber, ... */
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> _pre_ad_add_group_cb -- begin DS account [%s] \n",
slapi_entry_get_dn_const(ds_entry));
rc = slapi_entry_attr_find(ds_entry, "objectclass", &obj_attr);
@@ -1814,7 +1812,7 @@ posix_winsync_pre_ad_add_group_cb(void *cookie, Slapi_Entry
*ad_entry, Slapi_Ent
int i;
Slapi_Value * value = NULL; /* Attribute values */
- slapi_log_error( SLAPI_LOG_PLUGIN,
POSIX_WINSYNC_PLUGIN_NAME,"_pre_ad_add_group_cb -- test objectclass
posixGroup\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
POSIX_WINSYNC_PLUGIN_NAME,"_pre_ad_add_group_cb -- test objectclass
posixGroup\n");
for (i = slapi_attr_first_value(obj_attr, &value);
i != -1;
i = slapi_attr_next_value(obj_attr, i, &value)) {
@@ -1832,7 +1830,7 @@ posix_winsync_pre_ad_add_group_cb(void *cookie, Slapi_Entry
*ad_entry, Slapi_Ent
int j = 0;
slapi_attr_get_type( attr, &type );
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
posix_winsync_plugin_name,
"_pre_ad_add_group_cb -- check add attr: %s\n", type);
for (j = 0; attr_map && attr_map[j].windows_attribute_name !=
NULL; j++) {
if (0 ==
slapi_attr_type_cmp(type,attr_map[j].ldap_attribute_name, SLAPI_TYPE_CMP_SUBTYPE)){
@@ -1842,7 +1840,7 @@ posix_winsync_pre_ad_add_group_cb(void *cookie, Slapi_Entry
*ad_entry, Slapi_Ent
slapi_entry_add_valueset(ad_entry,
attr_map[j].windows_attribute_name, vs);
slapi_valueset_free(vs);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
posix_winsync_plugin_name,
"--> _pre_ad_add_group_cb --
"
"adding val for [%s] to new entry
[%s]\n",
type,
slapi_entry_get_dn_const(ad_entry));
@@ -1851,7 +1849,7 @@ posix_winsync_pre_ad_add_group_cb(void *cookie, Slapi_Entry
*ad_entry, Slapi_Ent
}
if (nisdomainname) {
slapi_entry_add_value(ad_entry, "msSFU30NisDomain",
slapi_value_new_string(nisdomainname));
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
posix_winsync_plugin_name,
"--> _pre_ad_add_group_cb --
"
"adding val for [%s] to new
entry [%s]\n",
"msSFU30NisDomain",
nisdomainname);
@@ -1861,7 +1859,7 @@ posix_winsync_pre_ad_add_group_cb(void *cookie, Slapi_Entry
*ad_entry, Slapi_Ent
}
}
plugin_op_finished();
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- _pre_ad_add_group_cb -- end\n");
return;
@@ -1870,16 +1868,16 @@ posix_winsync_pre_ad_add_group_cb(void *cookie, Slapi_Entry
*ad_entry, Slapi_Ent
static void
posix_winsync_post_ad_add_user_cb(void *cookie, Slapi_Entry *ds_entry, Slapi_Entry
*ad_entry, int *result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_post_ad_add_user_cb -- begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"Result of adding AD entry [%s] was [%d:%s]\n",
slapi_entry_get_dn(ad_entry), *result, ldap_err2string(*result));
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_post_ad_add_user_cb -- end\n");
return;
@@ -1888,16 +1886,16 @@ posix_winsync_post_ad_add_user_cb(void *cookie, Slapi_Entry
*ds_entry, Slapi_Ent
static void
posix_winsync_post_ad_add_group_cb(void *cookie, Slapi_Entry *ds_entry, Slapi_Entry
*ad_entry, int *result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_post_ad_add_group_cb -- begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"Result of adding AD entry [%s] was [%d:%s]\n",
slapi_entry_get_dn(ad_entry), *result, ldap_err2string(*result));
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_post_ad_add_group_cb -- end\n");
return;
@@ -1906,16 +1904,16 @@ posix_winsync_post_ad_add_group_cb(void *cookie, Slapi_Entry
*ds_entry, Slapi_En
static void
posix_winsync_post_ad_mod_user_mods_cb(void *cookie, const Slapi_Entry *rawentry, const
Slapi_DN *local_dn, const Slapi_Entry *ds_entry, LDAPMod * const *origmods, Slapi_DN
*remote_dn, LDAPMod ***modstosend, int *result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_post_ad_mod_user_mods_cb --
begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"Result of modifying AD entry [%s] was [%d:%s]\n",
slapi_sdn_get_dn(remote_dn), *result, ldap_err2string(*result));
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_post_ad_mod_user_mods_cb -- end\n");
return;
@@ -1924,16 +1922,16 @@ posix_winsync_post_ad_mod_user_mods_cb(void *cookie, const
Slapi_Entry *rawentry
static void
posix_winsync_post_ad_mod_group_mods_cb(void *cookie, const Slapi_Entry *rawentry, const
Slapi_DN *local_dn, const Slapi_Entry *ds_entry, LDAPMod * const *origmods, Slapi_DN
*remote_dn, LDAPMod ***modstosend, int *result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_post_ad_mod_group_mods_cb --
begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"Result of modifying AD entry [%s] was [%d:%s]\n",
slapi_sdn_get_dn(remote_dn), *result, ldap_err2string(*result));
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_post_ad_mod_group_mods_cb --
end\n");
return;
@@ -2006,28 +2004,28 @@ posix_winsync_plugin_start(Slapi_PBlock *pb)
int rc;
Slapi_Entry *config_e = NULL; /* entry containing plugin config */
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_plugin_start -- begin\n");
if (slapi_apib_register(WINSYNC_v3_0_GUID, posix_winsync_api)) {
- slapi_log_error(SLAPI_LOG_FATAL, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, posix_winsync_plugin_name,
"<-- posix_winsync_plugin_start -- failed to register
winsync api -- end\n");
return -1;
}
if (slapi_pblock_get(pb, SLAPI_ADD_ENTRY, &config_e) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, posix_winsync_plugin_name, "missing config
entry\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, posix_winsync_plugin_name,
"missing config entry\n");
return (-1);
}
if ((rc = posix_winsync_config(config_e)) != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, posix_winsync_plugin_name, "configuration
failed (%s)\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, posix_winsync_plugin_name,
"configuration failed (%s)\n",
ldap_err2string(rc));
return (-1);
}
g_plugin_started = 1;
op_counter = slapi_counter_new();
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_plugin_start -- registered; end\n");
return 0;
}
@@ -2035,7 +2033,7 @@ posix_winsync_plugin_start(Slapi_PBlock *pb)
static int
posix_winsync_plugin_close(Slapi_PBlock *pb)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_plugin_close -- begin\n");
g_plugin_started = 0;
@@ -2043,7 +2041,7 @@ posix_winsync_plugin_close(Slapi_PBlock *pb)
slapi_apib_unregister(WINSYNC_v1_0_GUID);
posix_winsync_config_free();
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_plugin_close -- end\n");
return 0;
}
@@ -2057,7 +2055,7 @@ posix_winsync_plugin_init(Slapi_PBlock *pb)
void *plugin_id = NULL;
Slapi_Entry *confige = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"--> posix_winsync_plugin_init -- begin\n");
if (slapi_pblock_get(pb, SLAPI_PLUGIN_CONFIG_ENTRY, &confige) && confige)
{
@@ -2071,7 +2069,7 @@ posix_winsync_plugin_init(Slapi_PBlock *pb)
|| slapi_pblock_set(pb, SLAPI_PLUGIN_START_FN, (void *)
posix_winsync_plugin_start) != 0
|| slapi_pblock_set(pb, SLAPI_PLUGIN_CLOSE_FN, (void *)
posix_winsync_plugin_close) != 0
|| slapi_pblock_set(pb, SLAPI_PLUGIN_DESCRIPTION, (void *)
&posix_winsync_pdesc) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, posix_winsync_plugin_name,
"<-- posix_winsync_plugin_init -- failed to register
plugin -- end\n");
return -1;
}
@@ -2079,14 +2077,14 @@ posix_winsync_plugin_init(Slapi_PBlock *pb)
/* Retrieve and save the plugin identity to later pass to
internal operations */
if (slapi_pblock_get(pb, SLAPI_PLUGIN_IDENTITY, &plugin_id) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, posix_winsync_plugin_name,
"<-- posix_winsync_plugin_init -- failed to retrieve
plugin identity -- end\n");
return -1;
}
posix_winsync_set_plugin_identity(plugin_id);
- slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
"<-- posix_winsync_plugin_init -- end\n");
return 0;
}
diff --git a/ldap/servers/plugins/presence/presence.c
b/ldap/servers/plugins/presence/presence.c
index 4af3d9c..c81edfd 100644
--- a/ldap/servers/plugins/presence/presence.c
+++ b/ldap/servers/plugins/presence/presence.c
@@ -269,7 +269,7 @@ int presence_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION,
(void *)&pdesc ) != 0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, PRESENCE_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PRESENCE_PLUGIN_SUBSYSTEM,
"presence_init: failed to register plugin\n" );
status = PRESENCE_FAILURE;
}
@@ -307,7 +307,7 @@ int presence_start( Slapi_PBlock *pb )
presence_vattr_compare,
presence_vattr_types) != 0)
{
- slapi_log_error( SLAPI_LOG_FATAL, PRESENCE_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PRESENCE_PLUGIN_SUBSYSTEM,
"presence_start: cannot register as service provider\n" );
return PRESENCE_FAILURE;
}
@@ -340,7 +340,7 @@ int presence_start( Slapi_PBlock *pb )
*/
if (loadPluginConfig() != PRESENCE_SUCCESS)
{
- slapi_log_error( SLAPI_LOG_FATAL, PRESENCE_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PRESENCE_PLUGIN_SUBSYSTEM,
"presence_start: unable to load plug-in configuration\n" );
return PRESENCE_FAILURE;
}
@@ -509,7 +509,7 @@ static int loadPluginConfig(void)
if (status != PRESENCE_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, PRESENCE_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PRESENCE_PLUGIN_SUBSYSTEM,
"Error getting level1 presence configurations<%s>\n", getPluginDN());
status = PRESENCE_FAILURE;
goto cleanup;
@@ -518,7 +518,7 @@ static int loadPluginConfig(void)
slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries);
if (NULL == entries || entries[0] == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, PRESENCE_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PRESENCE_PLUGIN_SUBSYSTEM,
"No entries found for <%s>\n", getPluginDN());
status = PRESENCE_FAILURE;
@@ -722,7 +722,7 @@ static int imIDExists(Slapi_Entry *e, char *type, char **value, _Vmap
**map, _Co
* this should not happen but no harm we just return
*/
status = PRESENCE_FAILURE;
- slapi_log_error(SLAPI_LOG_FATAL, PRESENCE_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PRESENCE_PLUGIN_SUBSYSTEM,
"No hashtable for vattr types\n");
goto bail;
}
@@ -805,7 +805,7 @@ static int makeHttpRequest(char *id, _Vmap *map, _ConfigEntry *info,
char **BUF,
* properly checked and throw warning/errors in case
* of any invalid entry
*/
- slapi_log_error(SLAPI_LOG_FATAL, PRESENCE_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PRESENCE_PLUGIN_SUBSYSTEM,
"Unknown request type <%s>\n", info->requestMethod);
status = PRESENCE_FAILURE;
goto bail;
diff --git a/ldap/servers/plugins/pwdstorage/md5_pwd.c
b/ldap/servers/plugins/pwdstorage/md5_pwd.c
index 0bc8f3c..6dec2ba 100644
--- a/ldap/servers/plugins/pwdstorage/md5_pwd.c
+++ b/ldap/servers/plugins/pwdstorage/md5_pwd.c
@@ -40,7 +40,7 @@ md5_pw_cmp( const char *userpwd, const char *dbpwd )
ctx = PK11_CreateDigestContext(SEC_OID_MD5);
if (ctx == NULL) {
- slapi_log_error(SLAPI_LOG_PLUGIN, MD5_SUBSYSTEM_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MD5_SUBSYSTEM_NAME,
"Could not create context for digest operation for password compare");
goto loser;
}
@@ -59,7 +59,7 @@ md5_pw_cmp( const char *userpwd, const char *dbpwd )
if (bver) {
rc = strcmp(bver,dbpwd);
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, MD5_SUBSYSTEM_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MD5_SUBSYSTEM_NAME,
"Could not base64 encode hashed value for password compare");
}
loser:
@@ -78,7 +78,7 @@ md5_pw_enc( const char *pwd )
ctx = PK11_CreateDigestContext(SEC_OID_MD5);
if (ctx == NULL) {
- slapi_log_error(SLAPI_LOG_PLUGIN, MD5_SUBSYSTEM_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MD5_SUBSYSTEM_NAME,
"Could not create context for digest operation for password
encoding");
return NULL;
}
@@ -97,7 +97,7 @@ md5_pw_enc( const char *pwd )
enc = slapi_ch_smprintf("%c%s%c%s", PWD_HASH_PREFIX_START,
MD5_SCHEME_NAME,
PWD_HASH_PREFIX_END, bver );
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, MD5_SUBSYSTEM_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MD5_SUBSYSTEM_NAME,
"Could not base64 encode hashed value for password encoding");
}
diff --git a/ldap/servers/plugins/pwdstorage/pwd_init.c
b/ldap/servers/plugins/pwdstorage/pwd_init.c
index 5c14c95..889d06a 100644
--- a/ldap/servers/plugins/pwdstorage/pwd_init.c
+++ b/ldap/servers/plugins/pwdstorage/pwd_init.c
@@ -51,7 +51,7 @@ sha_pwd_storage_scheme_init( Slapi_PBlock *pb )
{
int rc;
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "=>
sha_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "=>
sha_pwd_storage_scheme_init\n" );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -64,7 +64,7 @@ sha_pwd_storage_scheme_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_PWD_STORAGE_SCHEME_NAME,
"SHA" );
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "<= sha_pwd_storage_scheme_init
%d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "<=
sha_pwd_storage_scheme_init %d\n\n", rc );
return( rc );
}
@@ -74,7 +74,7 @@ ssha_pwd_storage_scheme_init( Slapi_PBlock *pb )
{
int rc;
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "=>
ssha_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "=>
ssha_pwd_storage_scheme_init\n" );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -87,7 +87,7 @@ ssha_pwd_storage_scheme_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_PWD_STORAGE_SCHEME_NAME,
"SSHA" );
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "<= ssha_pwd_storage_scheme_init
%d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "<=
ssha_pwd_storage_scheme_init %d\n\n", rc );
return( rc );
}
@@ -96,7 +96,7 @@ sha256_pwd_storage_scheme_init( Slapi_PBlock *pb )
{
int rc;
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "=>
sha256_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "=>
sha256_pwd_storage_scheme_init\n" );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -109,7 +109,7 @@ sha256_pwd_storage_scheme_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_PWD_STORAGE_SCHEME_NAME,
"SHA256" );
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "<=
sha256_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "<=
sha256_pwd_storage_scheme_init %d\n\n", rc );
return( rc );
}
@@ -119,7 +119,7 @@ ssha256_pwd_storage_scheme_init( Slapi_PBlock *pb )
{
int rc;
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "=>
ssha256_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "=>
ssha256_pwd_storage_scheme_init\n" );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -132,7 +132,7 @@ ssha256_pwd_storage_scheme_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_PWD_STORAGE_SCHEME_NAME,
"SSHA256" );
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "<=
ssha256_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "<=
ssha256_pwd_storage_scheme_init %d\n\n", rc );
return( rc );
}
@@ -141,7 +141,7 @@ sha384_pwd_storage_scheme_init( Slapi_PBlock *pb )
{
int rc;
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "=>
sha384_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "=>
sha384_pwd_storage_scheme_init\n" );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -154,7 +154,7 @@ sha384_pwd_storage_scheme_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_PWD_STORAGE_SCHEME_NAME,
"SHA384" );
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "<=
sha384_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "<=
sha384_pwd_storage_scheme_init %d\n\n", rc );
return( rc );
}
@@ -164,7 +164,7 @@ ssha384_pwd_storage_scheme_init( Slapi_PBlock *pb )
{
int rc;
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "=>
ssha384_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "=>
ssha384_pwd_storage_scheme_init\n" );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -177,7 +177,7 @@ ssha384_pwd_storage_scheme_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_PWD_STORAGE_SCHEME_NAME,
"SSHA384" );
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "<=
ssha384_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "<=
ssha384_pwd_storage_scheme_init %d\n\n", rc );
return( rc );
}
@@ -186,7 +186,7 @@ sha512_pwd_storage_scheme_init( Slapi_PBlock *pb )
{
int rc;
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "=>
sha512_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "=>
sha512_pwd_storage_scheme_init\n" );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -199,7 +199,7 @@ sha512_pwd_storage_scheme_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_PWD_STORAGE_SCHEME_NAME,
"SHA512" );
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "<=
sha512_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "<=
sha512_pwd_storage_scheme_init %d\n\n", rc );
return( rc );
}
@@ -209,7 +209,7 @@ ssha512_pwd_storage_scheme_init( Slapi_PBlock *pb )
{
int rc;
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "=>
ssha512_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "=>
ssha512_pwd_storage_scheme_init\n" );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -222,7 +222,7 @@ ssha512_pwd_storage_scheme_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_PWD_STORAGE_SCHEME_NAME,
"SSHA512" );
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "<=
ssha512_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "<=
ssha512_pwd_storage_scheme_init %d\n\n", rc );
return( rc );
}
@@ -231,7 +231,7 @@ crypt_pwd_storage_scheme_init( Slapi_PBlock *pb )
{
int rc;
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "=>
crypt_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "=>
crypt_pwd_storage_scheme_init\n" );
crypt_init();
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
@@ -245,7 +245,7 @@ crypt_pwd_storage_scheme_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_PWD_STORAGE_SCHEME_NAME,
"CRYPT" );
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "<=
crypt_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "<=
crypt_pwd_storage_scheme_init %d\n\n", rc );
return( rc );
}
@@ -254,7 +254,7 @@ clear_pwd_storage_scheme_init( Slapi_PBlock *pb )
{
int rc;
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "=>
clear_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "=>
clear_pwd_storage_scheme_init\n" );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -267,7 +267,7 @@ clear_pwd_storage_scheme_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_PWD_STORAGE_SCHEME_NAME,
"CLEAR" );
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "<=
clear_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "<=
clear_pwd_storage_scheme_init %d\n\n", rc );
return( rc );
}
@@ -276,7 +276,7 @@ ns_mta_md5_pwd_storage_scheme_init( Slapi_PBlock *pb )
{
int rc;
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "=>
ns_mta_md5_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "=>
ns_mta_md5_pwd_storage_scheme_init\n" );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -289,7 +289,7 @@ ns_mta_md5_pwd_storage_scheme_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_PWD_STORAGE_SCHEME_NAME,
"NS-MTA-MD5" );
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "<=
ns_mta_md5_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "<=
ns_mta_md5_pwd_storage_scheme_init %d\n\n", rc );
return( rc );
}
@@ -298,7 +298,7 @@ md5_pwd_storage_scheme_init( Slapi_PBlock *pb )
{
int rc;
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "=>
md5_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "=>
md5_pwd_storage_scheme_init\n" );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -311,7 +311,7 @@ md5_pwd_storage_scheme_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_PWD_STORAGE_SCHEME_NAME,
"MD5" );
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "<= md5_pwd_storage_scheme_init
%d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "<=
md5_pwd_storage_scheme_init %d\n\n", rc );
return( rc );
}
@@ -320,7 +320,7 @@ smd5_pwd_storage_scheme_init( Slapi_PBlock *pb )
{
int rc;
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "=>
smd5_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "=>
smd5_pwd_storage_scheme_init\n" );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -333,6 +333,6 @@ smd5_pwd_storage_scheme_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_PWD_STORAGE_SCHEME_NAME,
"SMD5" );
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "<= smd5_pwd_storage_scheme_init
%d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "<=
smd5_pwd_storage_scheme_init %d\n\n", rc );
return( rc );
}
diff --git a/ldap/servers/plugins/pwdstorage/sha_pwd.c
b/ldap/servers/plugins/pwdstorage/sha_pwd.c
index 8d8479e..58940d8 100644
--- a/ldap/servers/plugins/pwdstorage/sha_pwd.c
+++ b/ldap/servers/plugins/pwdstorage/sha_pwd.c
@@ -99,7 +99,7 @@ sha_pw_cmp (const char *userpwd, const char *dbpwd, unsigned int shaLen
)
}
hashresult = PL_Base64Decode( dbpwd, dbpwd_len, dbhash );
if (NULL == hashresult) {
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, hasherrmsg, schemeName, dbpwd );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, hasherrmsg, schemeName,
dbpwd );
goto loser;
} else if ( hash_len >= shaLen ) { /* must be salted */
salt.bv_val = (void*)(dbhash + shaLen); /* salt starts after hash value */
@@ -108,14 +108,14 @@ sha_pw_cmp (const char *userpwd, const char *dbpwd, unsigned int
shaLen )
salt.bv_val = (void*)dbhash;
salt.bv_len = OLD_SALT_LENGTH;
} else { /* unsupported, invalid BASE64 (hash_len < 0), or similar */
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, hasherrmsg, schemeName,
dbpwd );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, hasherrmsg,
schemeName, dbpwd );
goto loser;
}
/* hash the user's key */
memset( userhash, 0, sizeof(userhash) );
if ( sha_salted_hash( userhash, userpwd, &salt, secOID ) != SECSuccess ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "sha_pw_cmp:
sha_salted_hash() failed\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"sha_pw_cmp: sha_salted_hash() failed\n");
goto loser;
}
diff --git a/ldap/servers/plugins/pwdstorage/smd5_pwd.c
b/ldap/servers/plugins/pwdstorage/smd5_pwd.c
index 5d6fecf..ca98145 100644
--- a/ldap/servers/plugins/pwdstorage/smd5_pwd.c
+++ b/ldap/servers/plugins/pwdstorage/smd5_pwd.c
@@ -44,7 +44,7 @@ smd5_pw_cmp( const char *userpwd, const char *dbpwd )
ctx = PK11_CreateDigestContext(SEC_OID_MD5);
if (ctx == NULL) {
- slapi_log_error(SLAPI_LOG_PLUGIN, SALTED_MD5_SUBSYSTEM_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, SALTED_MD5_SUBSYSTEM_NAME,
"Could not create context for digest operation for password compare");
goto loser;
}
@@ -62,7 +62,7 @@ smd5_pw_cmp( const char *userpwd, const char *dbpwd )
hashresult = PL_Base64Decode( dbpwd, 0, dbhash );
if (NULL == hashresult) {
- slapi_log_error( SLAPI_LOG_PLUGIN, SALTED_MD5_SUBSYSTEM_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, SALTED_MD5_SUBSYSTEM_NAME,
"smd5_pw_cmp: userPassword \"%s\" is the wrong length "
"or is not properly encoded BASE64\n", dbpwd );
goto loser;
@@ -101,7 +101,7 @@ smd5_pw_enc( const char *pwd )
ctx = PK11_CreateDigestContext(SEC_OID_MD5);
if (ctx == NULL) {
- slapi_log_error(SLAPI_LOG_PLUGIN, SALTED_MD5_SUBSYSTEM_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, SALTED_MD5_SUBSYSTEM_NAME,
"Could not create context for digest operation for password
encoding");
return NULL;
}
@@ -129,7 +129,7 @@ smd5_pw_enc( const char *pwd )
enc = slapi_ch_smprintf("%c%s%c%s", PWD_HASH_PREFIX_START,
SALTED_MD5_SCHEME_NAME,
PWD_HASH_PREFIX_END, bver );
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, SALTED_MD5_SUBSYSTEM_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, SALTED_MD5_SUBSYSTEM_NAME,
"Could not base64 encode hashed value for password encoding");
}
diff --git a/ldap/servers/plugins/referint/referint.c
b/ldap/servers/plugins/referint/referint.c
index 91bf7e0..f5dfe2f 100644
--- a/ldap/servers/plugins/referint/referint.c
+++ b/ldap/servers/plugins/referint/referint.c
@@ -166,7 +166,7 @@ referint_postop_init( Slapi_PBlock *pb )
PR_ASSERT (referint_plugin_identity);
if((config = (referint_config *)slapi_ch_calloc (1, sizeof (referint_config))) ==
NULL){
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_init failed to "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_init failed to "
"allocate configuration\n" );
return ( -1 );
}
@@ -203,7 +203,7 @@ referint_postop_init( Slapi_PBlock *pb )
plugin_EntryScope = (Slapi_DN **)slapi_ch_calloc(sizeof(Slapi_DN *),i+1);
for (i=0; plugin_attr_values[i];i++) {
if (slapi_dn_syntax_check(NULL, plugin_attr_values[i], 1) == 1) {
- slapi_log_error(SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"Error: Ignoring invalid DN used as plugin entry scope:
[%s]\n",
plugin_attr_values[i]);
slapi_ch_free_string(&plugin_attr_values[i]);
@@ -216,7 +216,7 @@ referint_postop_init( Slapi_PBlock *pb )
plugin_attr_value = slapi_entry_attr_get_charptr(plugin_entry,
"nsslapd-pluginExcludeEntryScope");
if(plugin_attr_value) {
if (slapi_dn_syntax_check(NULL, plugin_attr_value, 1) == 1) {
- slapi_log_error(SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"Error: Ignoring invalid DN used as plugin exclude entry
scope: [%s]\n",
plugin_attr_value);
slapi_ch_free_string(&plugin_attr_value);
@@ -228,7 +228,7 @@ referint_postop_init( Slapi_PBlock *pb )
plugin_attr_value = slapi_entry_attr_get_charptr(plugin_entry,
"nsslapd-pluginContainerScope");
if(plugin_attr_value) {
if (slapi_dn_syntax_check(NULL, plugin_attr_value, 1) == 1) {
- slapi_log_error(SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"Error: Ignoring invalid DN used as plugin container scope:
[%s]\n",
plugin_attr_value);
slapi_ch_free_string(&plugin_attr_value);
@@ -248,7 +248,7 @@ referint_postop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_START_FN, (void *) referint_postop_start ) !=
0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_CLOSE_FN, (void *) referint_postop_close ) !=
0)
{
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_init failed\n" );
return( -1 );
}
@@ -263,7 +263,7 @@ referint_postop_init( Slapi_PBlock *pb )
NULL, /* ? */
referint_plugin_identity /* access control */))
{
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
"referint_preop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"referint_preop_init failed\n" );
return ( -1 );
}
@@ -300,13 +300,13 @@ load_config(Slapi_PBlock *pb, Slapi_Entry *config_entry, int apply)
slapi_rwlock_wrlock(config_rwlock);
if(config == NULL){
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"load_config: config is NULL\n" );
rc = SLAPI_PLUGIN_FAILURE;
goto done;
}
if((tmp_config = (referint_config *)slapi_ch_calloc (1, sizeof (referint_config))) ==
NULL){
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM, "load_config
failed to "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"load_config failed to "
"allocate configuration\n" );
rc = SLAPI_PLUGIN_FAILURE;
goto done;
@@ -338,19 +338,19 @@ load_config(Slapi_PBlock *pb, Slapi_Entry *config_entry, int apply)
if(new_config_present){
/* Verify we have everything we need */
if(tmp_config->delay == -1){
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM, "Plugin
configuration is missing %s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"Plugin configuration is missing %s\n",
REFERINT_ATTR_DELAY);
rc = SLAPI_PLUGIN_FAILURE;
} else if (!tmp_config->logfile){
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM, "Plugin
configuration is missing %s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"Plugin configuration is missing %s\n",
REFERINT_ATTR_LOGFILE);
rc = SLAPI_PLUGIN_FAILURE;
} else if (tmp_config->logchanges == -1){
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM, "Plugin
configuration is missing %s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"Plugin configuration is missing %s\n",
REFERINT_ATTR_LOGCHANGES);
rc = SLAPI_PLUGIN_FAILURE;
} else if (!tmp_config->attrs){
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM, "Plugin
configuration is missing %s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"Plugin configuration is missing %s\n",
REFERINT_ATTR_MEMBERSHIP);
rc = SLAPI_PLUGIN_FAILURE;
}
@@ -359,19 +359,19 @@ load_config(Slapi_PBlock *pb, Slapi_Entry *config_entry, int apply)
* We are using the old plugin arg configuration, get the args
*/
if ( slapi_pblock_get( pb, SLAPI_PLUGIN_ARGC, &argc ) != 0) {
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop failed to get argc\n" );
rc = SLAPI_PLUGIN_FAILURE;
goto done;
}
if ( slapi_pblock_get( pb, SLAPI_PLUGIN_ARGV, &argv ) != 0) {
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop failed to get argv\n" );
rc = SLAPI_PLUGIN_FAILURE;
goto done;
}
if(argv == NULL){
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_del, args are NULL\n" );
rc = SLAPI_PLUGIN_FAILURE;
goto done;
@@ -389,7 +389,7 @@ load_config(Slapi_PBlock *pb, Slapi_Entry *config_entry, int apply)
slapi_ch_array_add(&tmp_config->attrs, slapi_ch_strdup(argv[i]));
}
} else {
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop insufficient arguments supplied\n" );
rc = SLAPI_PLUGIN_FAILURE;
goto done;
@@ -431,7 +431,7 @@ referint_postop_modify(Slapi_PBlock *pb)
if (referint_sdn_config_cmp(sdn) == 0 && slapi_sdn_compare(sdn,
referint_get_plugin_area()))
{
if( SLAPI_PLUGIN_FAILURE == load_config(pb, entry, 1)){
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM, "Failed to
update configuration.\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"Failed to update configuration.\n");
return SLAPI_PLUGIN_FAILURE;
}
} else if (slapi_sdn_compare(sdn, referint_get_plugin_area()) == 0){
@@ -442,7 +442,7 @@ referint_postop_modify(Slapi_PBlock *pb)
if((config_area = slapi_entry_attr_get_charptr(entry,
SLAPI_PLUGIN_SHARED_CONFIG_AREA))){
rc = slapi_dn_syntax_check(pb, config_area, 1);
if (rc) { /* syntax check failed */
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_modify: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_modify: "
"%s does not contain a valid DN (%s)\n",
SLAPI_PLUGIN_SHARED_CONFIG_AREA, config_area);
rc = LDAP_INVALID_DN_SYNTAX;
@@ -453,7 +453,7 @@ referint_postop_modify(Slapi_PBlock *pb)
if (LDAP_SUCCESS != result) {
if (result == LDAP_NO_SUCH_OBJECT) {
/* log an error and use the plugin entry for the config */
- slapi_log_error(SLAPI_LOG_PLUGIN, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_modify: Config entry \"%s\"
does "
"not exist.\n", config_area);
rc = LDAP_OPERATIONS_ERROR;
@@ -463,7 +463,7 @@ referint_postop_modify(Slapi_PBlock *pb)
if(e){
config_e = e;
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_modify: Config entry \"%s\"
was not located.\n", config_area);
rc = LDAP_OPERATIONS_ERROR;
goto bail;
@@ -617,7 +617,7 @@ referint_postop_del( Slapi_PBlock *pb )
slapi_pblock_get( pb, SLAPI_DELETE_TARGET_SDN, &sdn ) != 0 ||
slapi_pblock_get(pb, SLAPI_PLUGIN_OPRETURN, &oprc) != 0)
{
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_del: could not get parameters\n" );
return SLAPI_PLUGIN_FAILURE;
}
@@ -670,7 +670,7 @@ referint_postop_modrdn( Slapi_PBlock *pb )
slapi_pblock_get( pb, SLAPI_MODRDN_NEWSUPERIOR_SDN, &newsuperior ) != 0 ||
slapi_pblock_get( pb, SLAPI_PLUGIN_OPRETURN, &oprc) != 0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_modrdn: could not get parameters\n" );
return SLAPI_PLUGIN_FAILURE;
}
@@ -791,7 +791,7 @@ _update_one_per_mod(Slapi_DN *entrySDN, /* DN of the searched
entry */
list_of_mods[1] = NULL;
rc = _do_modify(mod_pb, entrySDN, list_of_mods);
if (rc) {
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"_update_one_value: entry %s: deleting \"%s: %s\" failed
(%d)"
"\n", slapi_sdn_get_dn(entrySDN), attrName,
slapi_sdn_get_dn(origDN), rc);
}
@@ -802,14 +802,14 @@ _update_one_per_mod(Slapi_DN *entrySDN, /* DN of the searched
entry */
Slapi_Value *v = NULL;
if (NULL == origDN) {
- slapi_log_error(SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"_update_one_value: NULL dn was passed\n");
goto bail;
}
/* need to put together rdn into a dn */
dnParts = slapi_ldap_explode_dn( slapi_sdn_get_dn(origDN), 0 );
if (NULL == dnParts) {
- slapi_log_error(SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"_update_one_value: failed to explode dn %s\n",
slapi_sdn_get_dn(origDN));
goto bail;
@@ -881,7 +881,7 @@ _update_one_per_mod(Slapi_DN *entrySDN, /* DN of the searched
entry */
list_of_mods[2] = NULL;
rc = _do_modify(mod_pb, entrySDN, list_of_mods);
if (rc) {
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"_update_one_value: entry %s: replacing \"%s: %s\"
"
"with \"%s: %s\" failed (%d)\n",
slapi_sdn_get_dn(entrySDN), attrName,
@@ -911,7 +911,7 @@ _update_one_per_mod(Slapi_DN *entrySDN, /* DN of the searched
entry */
list_of_mods[2] = NULL;
rc = _do_modify(mod_pb, entrySDN, list_of_mods);
if (rc) {
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"_update_one_value: entry %s: replacing \"%s: %s\"
"
"with \"%s: %s\" failed (%d)\n",
slapi_sdn_get_dn(entrySDN), attrName, sval, attrName, newvalue,
rc);
@@ -974,7 +974,7 @@ _update_all_per_mod(Slapi_DN *entrySDN, /* DN of the searched
entry */
mods[1] = NULL;
rc = _do_modify(mod_pb, entrySDN, mods);
if (rc) {
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"_update_all_per_mod: entry %s: deleting \"%s: %s\" failed
(%d)"
"\n", slapi_sdn_get_dn(entrySDN), attrName,
slapi_sdn_get_dn(origDN), rc);
}
@@ -985,14 +985,14 @@ _update_all_per_mod(Slapi_DN *entrySDN, /* DN of the searched
entry */
Slapi_Value *v = NULL;
if (NULL == origDN) {
- slapi_log_error(SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"_update_all_per_mod: NULL dn was passed\n");
goto bail;
}
/* need to put together rdn into a dn */
dnParts = slapi_ldap_explode_dn( slapi_sdn_get_dn(origDN), 0 );
if (NULL == dnParts) {
- slapi_log_error(SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"_update_all_per_mod: failed to explode dn %s\n",
slapi_sdn_get_dn(origDN));
goto bail;
@@ -1069,7 +1069,7 @@ _update_all_per_mod(Slapi_DN *entrySDN, /* DN of the searched
entry */
}
rc = _do_modify(mod_pb, entrySDN, slapi_mods_get_ldapmods_byref(smods));
if (rc) {
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"_update_all_per_mod: entry %s failed (%d)\n",
slapi_sdn_get_dn(entrySDN), rc);
}
@@ -1219,7 +1219,7 @@ update_integrity(Slapi_DN *origSDN,
}
} else {
if (isFatalSearchError(search_result)){
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
REFERINT_PLUGIN_SUBSYSTEM,
"update_integrity search (base=%s filter=%s) returned
"
"error %d\n", search_base, filter, search_result);
rc = SLAPI_PLUGIN_FAILURE;
@@ -1267,7 +1267,7 @@ int referint_postop_start( Slapi_PBlock *pb)
int rc = 0;
if((config_rwlock = slapi_new_rwlock()) == NULL){
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_init failed to "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_init failed to "
"create rwlock.\n" );
return ( -1 );
}
@@ -1280,7 +1280,7 @@ int referint_postop_start( Slapi_PBlock *pb)
{
rc = slapi_dn_syntax_check(pb, config_area, 1);
if (rc) { /* syntax check failed */
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_start: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_start: "
"%s does not contain a valid DN (%s)\n",
SLAPI_PLUGIN_SHARED_CONFIG_AREA, config_area);
rc = LDAP_INVALID_DN_SYNTAX;
@@ -1291,7 +1291,7 @@ int referint_postop_start( Slapi_PBlock *pb)
if (LDAP_SUCCESS != result) {
if (result == LDAP_NO_SUCH_OBJECT) {
/* log an error and use the plugin entry for the config */
- slapi_log_error(SLAPI_LOG_PLUGIN, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_start: Config entry \"%s\" does
"
"not exist.\n", config_area);
rc = -1;
@@ -1301,7 +1301,7 @@ int referint_postop_start( Slapi_PBlock *pb)
if(e){
config_e = e;
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_start: Config entry \"%s\" was
not located.\n", config_area);
rc = -1;
goto bail;
@@ -1338,7 +1338,7 @@ int referint_postop_start( Slapi_PBlock *pb)
PR_UNJOINABLE_THREAD,
SLAPD_DEFAULT_THREAD_STACKSIZE);
if ( referint_tid == NULL ) {
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_start PR_CreateThread failed\n" );
exit( 1 );
}
@@ -1455,7 +1455,7 @@ referint_thread_func(void *arg)
if (strcasecmp(ptoken, "NULL") != 0) {
/* Set the bind DN in the thread data */
if(slapi_td_set_dn(slapi_ch_strdup(ptoken))){
- slapi_log_error( SLAPI_LOG_FATAL,
REFERINT_PLUGIN_SUBSYSTEM,"Failed to set thread data\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
REFERINT_PLUGIN_SUBSYSTEM,"Failed to set thread data\n");
}
}
@@ -1470,7 +1470,7 @@ referint_thread_func(void *arg)
/* remove the original file */
if( PR_SUCCESS != PR_Delete(logfilename) ){
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_close could not delete \"%s\"\n",
logfilename );
}
@@ -1590,7 +1590,7 @@ writeintegritylog(Slapi_PBlock *pb, char *logfilename, Slapi_DN
*sdn,
if (( prfd = PR_Open( logfilename, PR_WRONLY | PR_CREATE_FILE | PR_APPEND,
REFERINT_DEFAULT_FILE_MODE )) == NULL )
{
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop could not write integrity log \"%s\" "
SLAPI_COMPONENT_NAME_NSPR " %d (%s)\n",
logfilename, PR_GetError(), slapd_pr_strerror(PR_GetError()) );
@@ -1636,7 +1636,7 @@ writeintegritylog(Slapi_PBlock *pb, char *logfilename, Slapi_DN
*sdn,
}
if(len_to_write > MAX_LINE ){
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop could not write integrity log:"
" line length exceeded. It will not be able"
" to update references to this entry.\n");
@@ -1646,7 +1646,7 @@ writeintegritylog(Slapi_PBlock *pb, char *logfilename, Slapi_DN
*sdn,
(newsuperiordn != NULL) ? newsuperiordn : "NULL",
requestordn ? requestordn : "NULL");
if (PR_Write(prfd,buffer,strlen(buffer)) < 0){
- slapi_log_error(SLAPI_LOG_FATAL,REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,REFERINT_PLUGIN_SUBSYSTEM,
" writeintegritylog: PR_Write failed : The disk"
" may be full or the file is unwritable :: NSPR error - %d\n",
PR_GetError());
@@ -1656,7 +1656,7 @@ writeintegritylog(Slapi_PBlock *pb, char *logfilename, Slapi_DN
*sdn,
/* If file descriptor is closed successfully, PR_SUCCESS */
rc = PR_Close(prfd);
if (rc != PR_SUCCESS){
- slapi_log_error(SLAPI_LOG_FATAL,REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,REFERINT_PLUGIN_SUBSYSTEM,
" writeintegritylog: failed to close the file descriptor prfd; NSPR
error - %d\n",
PR_GetError());
}
@@ -1672,7 +1672,7 @@ referint_preop_init(Slapi_PBlock *pb)
slapi_pblock_set(pb, SLAPI_PLUGIN_DESCRIPTION, (void *) &pdesc) != 0 ||
slapi_pblock_set(pb, premodfn, (void *)referint_validate_config) != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"referint_preop_init: failed to register plugin\n");
status = -1;
}
@@ -1700,7 +1700,7 @@ referint_validate_config(Slapi_PBlock *pb)
slapi_pblock_get(pb, SLAPI_TARGET_SDN, &sdn);
slapi_pblock_get(pb, SLAPI_ENTRY_PRE_OP, &pre_entry);
if (!pre_entry) {
- slapi_log_error(SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
"referint_validate_config: Null pre op entry.\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"referint_validate_config: Null pre op entry.\n");
rc = LDAP_OPERATIONS_ERROR;
goto bail;
}
@@ -1724,7 +1724,7 @@ referint_validate_config(Slapi_PBlock *pb)
}
if ( SLAPI_PLUGIN_FAILURE == load_config(pb, resulting_entry, 0)) {
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
"referint_validate_config: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"referint_validate_config: "
"configuration validation failed.\n");
rc = LDAP_UNWILLING_TO_PERFORM;
goto bail;
@@ -1748,7 +1748,7 @@ referint_validate_config(Slapi_PBlock *pb)
if((config_area = slapi_entry_attr_get_charptr(resulting_entry,
SLAPI_PLUGIN_SHARED_CONFIG_AREA))){
rc = slapi_dn_syntax_check(pb, config_area, 1);
if (rc) { /* syntax check failed */
- slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
"referint_validate_config: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
"referint_validate_config: "
"%s does not contain a valid DN (%s)\n",
SLAPI_PLUGIN_SHARED_CONFIG_AREA, config_area);
rc = LDAP_INVALID_DN_SYNTAX;
@@ -1758,7 +1758,7 @@ referint_validate_config(Slapi_PBlock *pb)
rc = slapi_search_internal_get_entry(config_sdn, NULL, &e,
referint_plugin_identity);
if (LDAP_SUCCESS != rc) {
/* log an error and use the plugin entry for the config */
- slapi_log_error(SLAPI_LOG_PLUGIN, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, REFERINT_PLUGIN_SUBSYSTEM,
"referint_validate_config: Config entry \"%s\"
couild not be found, error %d\n",
config_area, rc);
rc = LDAP_OPERATIONS_ERROR;
@@ -1767,7 +1767,7 @@ referint_validate_config(Slapi_PBlock *pb)
if(e){
config_e = e;
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
REFERINT_PLUGIN_SUBSYSTEM,
"referint_validate_config: Config entry
\"%s\" was not located.\n", config_area);
rc = LDAP_OPERATIONS_ERROR;
goto bail;
diff --git a/ldap/servers/plugins/replication/cl4_api.c
b/ldap/servers/plugins/replication/cl4_api.c
index 069327d..047a91b 100644
--- a/ldap/servers/plugins/replication/cl4_api.c
+++ b/ldap/servers/plugins/replication/cl4_api.c
@@ -61,7 +61,7 @@ int cl4Init ()
s_cl4Desc.csnPL = csnplNew ();
if (s_cl4Desc.csnPL == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "cl4Init: failed to create CSN
pending list\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "cl4Init: failed to
create CSN pending list\n");
return CL4_CSNPL_ERROR;
}
@@ -90,14 +90,14 @@ int cl4WriteOperation (const slapi_operation_parameters *op)
if (op == NULL || !IsValidOperation (op))
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "cl4WriteEntry: invalid
entry\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "cl4WriteEntry:
invalid entry\n");
return CL4_BAD_DATA;
}
rc = _cl4WriteOperation (op);
if (rc != CL4_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "cl4WriteEntry: failed to write
changelog entry\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "cl4WriteEntry: failed
to write changelog entry\n");
return rc;
}
@@ -109,7 +109,7 @@ int cl4WriteOperation (const slapi_operation_parameters *op)
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"cl4WriteEntry: failed to remove CSN from the pending list\n");
rc = CL4_CSNPL_ERROR;
}
@@ -127,7 +127,7 @@ int cl4ChangeTargetDN (const CSN *csn, const char *newDN)
if (csn == NULL || newDN == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "cl4ChangeTargetDN: invalid
argument\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "cl4ChangeTargetDN:
invalid argument\n");
return CL4_BAD_DATA;
}
@@ -135,7 +135,7 @@ int cl4ChangeTargetDN (const CSN *csn, const char *newDN)
changeEntryDN = _cl4MakeCSNDN (csn);
if (changeEntryDN == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"cl4ChangeTargetDN: failed to construct change entry dn\n");
return CL4_MEMORY_ERROR;
}
@@ -158,7 +158,7 @@ int cl4ChangeTargetDN (const CSN *csn, const char *newDN)
if (res != LDAP_SUCCESS)
{
char s[CSN_STRSIZE];
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"cl4ChangeTargetDN: an error occured while modifying change entry with csn %s:
%s. "
"Logging of changes is disabled.\n", csn_as_string(csn,PR_FALSE,s),
ldap_err2string(res));
/* GGOODREPL g_set_repl_backend( NULL ); */
@@ -191,7 +191,7 @@ void cl4AssignChangeNumbers (time_t when, void *arg)
slapi_entry_free (entry);
if (rc != CL4_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "cl4AssignChangeNumbers:
failed to resolve target dn\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"cl4AssignChangeNumbers: failed to resolve target dn\n");
break;
}
@@ -213,7 +213,7 @@ void cl4AssignChangeNumbers (time_t when, void *arg)
if (rc != CL4_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"cl4AssignChangeNumbers: failed to update changelog entry\n");
break;
}
@@ -239,7 +239,7 @@ static int _cl4WriteOperation (const slapi_operation_parameters *op)
Slapi_Value *values[3];
char s[CSN_STRSIZE];
- slapi_log_error (SLAPI_LOG_PLUGIN, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"_cl4WriteEntry: writing change record with csn %s for dn:
\"%s\"\n",
csn_as_string(op->csn,PR_FALSE,s), op->target_address.dn);
@@ -247,7 +247,7 @@ static int _cl4WriteOperation (const slapi_operation_parameters *op)
changeEntryDN = _cl4MakeCSNDN (op->csn);
if (changeEntryDN == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_cl4WriteEntry: failed to create entry dn\n");
return CL4_MEMORY_ERROR;
}
@@ -259,7 +259,7 @@ static int _cl4WriteOperation (const slapi_operation_parameters *op)
e = slapi_entry_alloc();
if (e == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_cl4WriteEntry: failed to allocate change entry\n");
return CL4_MEMORY_ERROR;
}
@@ -343,7 +343,7 @@ static int _cl4WriteOperation (const slapi_operation_parameters *op)
if (res != LDAP_SUCCESS)
{
char s[CSN_STRSIZE];
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_cl4WriteEntry: an error occured while adding change entry with csn %s, dn = %s:
%s. "
"Logging of changes is disabled.\n", csn_as_string(op->csn,PR_FALSE,s),
op->target_address.dn,
ldap_err2string(res));
@@ -365,7 +365,7 @@ static void _cl4AssignCSNCallback (const CSN *csn, void *data)
if (csn == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "_cl4AssignCSNCallback: null
csn\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_cl4AssignCSNCallback: null csn\n");
return;
}
@@ -374,7 +374,7 @@ static void _cl4AssignCSNCallback (const CSN *csn, void *data)
if (rc == -1)
{
char s[CSN_STRSIZE];
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_cl4AssignCSNCallback: failed to insert csn %s to the pending list\n",
csn_as_string(csn,PR_FALSE,s));
}
@@ -386,7 +386,7 @@ static void _cl4AbortCSNCallback (const CSN *csn, void *data)
if (csn == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "_cl4AbortCSNCallback: null
csn\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "_cl4AbortCSNCallback:
null csn\n");
return;
}
@@ -394,7 +394,7 @@ static void _cl4AbortCSNCallback (const CSN *csn, void *data)
if (rc == -1)
{
char s[CSN_STRSIZE];
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_cl4AbortCSNCallback: failed to remove csn %s from the pending list\n",
csn_as_string(csn,PR_FALSE,s));
}
@@ -443,7 +443,7 @@ static int _cl4GetEntry (const CSN *csn, Slapi_Entry **entry)
if (rc != 0 || ret.err != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "_cl4GetEntry: failed to get
next changelog entry\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "_cl4GetEntry: failed
to get next changelog entry\n");
return CL4_INTERNAL_ERROR;
}
@@ -510,14 +510,14 @@ static int _cl4ResolveTargetDN (Slapi_Entry *entry, Slapi_DN
**newTargetDN)
rc = _cl4GetTargetEntry (targetSDN, uniqueid, &targetEntry);
if (rc != CL4_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "_cl4ResolveTargetDN: failed to
get target entry\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "_cl4ResolveTargetDN:
failed to get target entry\n");
goto done;
}
teDNCSN = entry_get_dncsn(targetEntry);
if (teDNCSN == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "_cl4ResolveTargetDN: failed to
get target entry dn\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "_cl4ResolveTargetDN:
failed to get target entry dn\n");
rc = CL4_BAD_FORMAT;
goto done;
}
@@ -583,7 +583,7 @@ static int _cl4GetTargetEntry (Slapi_DN *sdn, const char *uniqueid,
Slapi_Entry
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &res);
if (res == LDAP_NO_SUCH_OBJECT) /* entry not found */
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "_cl4GetTargetEntry: entry (%s)
not found\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "_cl4GetTargetEntry:
entry (%s) not found\n",
slapi_sdn_get_ndn(sdn));
rc = CL4_NOT_FOUND;
goto done;
@@ -591,7 +591,7 @@ static int _cl4GetTargetEntry (Slapi_DN *sdn, const char *uniqueid,
Slapi_Entry
if (res != LDAP_SUCCESS)
{
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_cl4ResolveTargetDN: an error occured while searching for directory entry with
uniqueid %s: %s. "
"Logging of changes is disabled.\n", uniqueid, ldap_err2string(res));
/* GGOODREPL g_set_repl_backend( NULL ); */
@@ -602,7 +602,7 @@ static int _cl4GetTargetEntry (Slapi_DN *sdn, const char *uniqueid,
Slapi_Entry
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries);
if (entries == NULL || entries [0] == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "_cl4GetTargetEntry: entry (%s)
not found\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "_cl4GetTargetEntry:
entry (%s) not found\n",
slapi_sdn_get_ndn(sdn));
rc = CL4_NOT_FOUND;
goto done;
@@ -655,7 +655,7 @@ static int _cl4FindTargetDN (const CSN *csn, const char *uniqueid,
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &res);
if (res == LDAP_NO_SUCH_OBJECT) /* entry not found */
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "_cl4FindTargetDN: no entries
much filter (%s)\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "_cl4FindTargetDN: no
entries much filter (%s)\n",
filter);
rc = CL4_NOT_FOUND;
goto done;
@@ -663,7 +663,7 @@ static int _cl4FindTargetDN (const CSN *csn, const char *uniqueid,
if (res != LDAP_SUCCESS)
{
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_cl4ResolveTargetDN: an error occured while searching change entries matching
filter %s: %s. "
"Logging of changes is disabled.\n", filter, ldap_err2string(res));
/* GGOODREPL g_set_repl_backend( NULL ); */
@@ -674,7 +674,7 @@ static int _cl4FindTargetDN (const CSN *csn, const char *uniqueid,
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries);
if (entries == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "_cl4FindTargetDN: no entries
much filter (%s)\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "_cl4FindTargetDN: no
entries much filter (%s)\n",
filter);
rc = CL4_NOT_FOUND;
goto done;
@@ -744,14 +744,14 @@ static int _cl4UpdateEntry (const CSN *csn, const char *changeType,
if (csn == NULL || changeType == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "_cl4UpdateEntry: invalid
argument\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "_cl4UpdateEntry:
invalid argument\n");
return CL4_BAD_DATA;
}
dn = _cl4MakeCSNDN (csn);
if (dn == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "_cl4UpdateEntry: failed to
create entry dn\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "_cl4UpdateEntry:
failed to create entry dn\n");
return CL4_MEMORY_ERROR;
}
@@ -787,7 +787,7 @@ static int _cl4UpdateEntry (const CSN *csn, const char *changeType,
if (res != LDAP_SUCCESS)
{
char s[CSN_STRSIZE];
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"cl4ChangeTargetDN: an error occured while modifying change entry with csn %s:
%s. "
"Logging of changes is disabled.\n", csn_as_string(csn,PR_FALSE,s),
ldap_err2string(res));
/* GGOODREPL g_set_repl_backend( NULL ); */
diff --git a/ldap/servers/plugins/replication/cl4_init.c
b/ldap/servers/plugins/replication/cl4_init.c
index 4ae0315..408010d 100644
--- a/ldap/servers/plugins/replication/cl4_init.c
+++ b/ldap/servers/plugins/replication/cl4_init.c
@@ -84,7 +84,7 @@ int changelog4_init ()
if(rc != 0)
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"An error occurred configuring the changelog database\n" );
}
@@ -107,7 +107,7 @@ changelog4_close()
rc = slapi_be_getentrypoint (rbe, SLAPI_PLUGIN_CLOSE_FN, (void**)&closefn, pb);
if (rc != 0)
{
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Error: backend close entry point is missing. "
"Replication subsystem disabled.\n");
slapi_pblock_destroy (pb);
@@ -120,7 +120,7 @@ changelog4_close()
if (rc != 0)
{
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name, "Error: the changelog database
could "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Error: the changelog
database could "
"not be closed. Replication subsystem disabled.\n");
set_repl_backend( NULL );
rc = -1;
@@ -142,7 +142,7 @@ changelog4_remove()
rc = slapi_be_getentrypoint (rbe, SLAPI_PLUGIN_DB_RMDB_FN, (void**)&rmdbfn, pb);
if (rc != 0)
{
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Error: backend rmdb entry point is missing. "
"Replication subsystem disabled.\n");
slapi_pblock_destroy (pb);
@@ -155,13 +155,13 @@ changelog4_remove()
if (rc != 0)
{
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name, "Error: the changelog database
could "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Error: the changelog
database could "
"not be removed. Replication subsystem disabled.\n");
rc = -1;
}
else
{
- slapi_log_error( SLAPI_LOG_REPL, repl_plugin_name, "New database generation
computed. "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "New database
generation computed. "
"Changelog database removed.\n");
}
@@ -222,7 +222,7 @@ changelog4_create_be()
char *cl_suffix;
if ( cl_dir == NULL ) {
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Error: no directory specified for changelog database.\n");
return -1;
}
@@ -231,7 +231,7 @@ changelog4_create_be()
if ( cl_suffix == NULL ) {
slapi_ch_free ((void **)&cl_dir);
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Error: no suffix specified for changelog database.\n");
return -1;
}
@@ -298,7 +298,7 @@ changelog4_create_be()
if (rbe == NULL)
{
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Error: failed to create changelog backend. "
"Replication disabled.\n");
return -1;
@@ -331,7 +331,7 @@ changelog4_start_be ()
rc = slapi_be_getentrypoint(rbe, SLAPI_PLUGIN_START_FN, (void**)&startfn, pb);
if (rc != 0)
{
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Error: backend start entry point is missing. "
"Replication subsystem disabled.\n");
slapi_pblock_destroy (pb);
@@ -344,7 +344,7 @@ changelog4_start_be ()
if (rc != 0)
{
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Error: Failed to start changelog backend. "
"Replication subsystem disabled.\n");
set_repl_backend( NULL );
diff --git a/ldap/servers/plugins/replication/cl5_api.c
b/ldap/servers/plugins/replication/cl5_api.c
index acb1bf1..9ae46ba 100644
--- a/ldap/servers/plugins/replication/cl5_api.c
+++ b/ldap/servers/plugins/replication/cl5_api.c
@@ -366,14 +366,14 @@ int cl5Init(void)
s_cl5Desc.stLock = slapi_new_rwlock();
if (s_cl5Desc.stLock == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5Init: failed to create state lock; NSPR error - %d\n",
PR_GetError ());
return CL5_SYSTEM_ERROR;
}
if ((s_cl5Desc.clLock = PR_NewLock()) == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5Init: failed to create on close lock; NSPR error -
%d\n",
PR_GetError ());
return CL5_SYSTEM_ERROR;
@@ -381,7 +381,7 @@ int cl5Init(void)
}
if ((s_cl5Desc.clCvar = PR_NewCondVar(s_cl5Desc.clLock)) == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5Init: failed to create on close cvar; NSPR error - %d\n",
PR_GetError ());
return CL5_SYSTEM_ERROR;
@@ -451,13 +451,13 @@ int cl5Open (const char *dir, const CL5DBConfig *config)
if (dir == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "cl5Open: null
directory\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "cl5Open: null
directory\n");
return CL5_BAD_DATA;
}
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5Open: changelog is not initialized\n");
return CL5_BAD_STATE;
}
@@ -468,14 +468,14 @@ int cl5Open (const char *dir, const CL5DBConfig *config)
/* already open - ignore */
if (s_cl5Desc.dbState == CL5_STATE_OPEN)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5Open: changelog already opened; request ignored\n");
rc = CL5_SUCCESS;
goto done;
}
else if (s_cl5Desc.dbState != CL5_STATE_CLOSED)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5Open: invalid state - %d\n", s_cl5Desc.dbState);
rc = CL5_BAD_STATE;
goto done;
@@ -484,7 +484,7 @@ int cl5Open (const char *dir, const CL5DBConfig *config)
rc = _cl5Open (dir, config, CL5_OPEN_NORMAL);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5Open: failed to open changelog\n");
goto done;
}
@@ -493,7 +493,7 @@ int cl5Open (const char *dir, const CL5DBConfig *config)
rc = _cl5DispatchDBThreads ();
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5Open: failed to start database monitoring threads\n");
_cl5Close ();
@@ -528,7 +528,7 @@ int cl5Close ()
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5Close: changelog is not initialized\n");
return CL5_BAD_STATE;
}
@@ -538,14 +538,14 @@ int cl5Close ()
/* already closed - ignore */
if (s_cl5Desc.dbState == CL5_STATE_CLOSED)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name_cl,
"cl5Close: changelog closed; request ignored\n");
slapi_rwlock_unlock (s_cl5Desc.stLock);
return CL5_SUCCESS;
}
else if (s_cl5Desc.dbState != CL5_STATE_OPEN)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5Close: invalid state - %d\n", s_cl5Desc.dbState);
slapi_rwlock_unlock (s_cl5Desc.stLock);
return CL5_BAD_STATE;
@@ -581,13 +581,13 @@ int cl5Delete (const char *dir)
if (dir == NULL)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name_cl, "cl5Delete: null
directory\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name_cl, "cl5Delete: null
directory\n");
return CL5_BAD_DATA;
}
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5Delete: changelog is not initialized\n");
return CL5_BAD_STATE;
}
@@ -596,7 +596,7 @@ int cl5Delete (const char *dir)
if (s_cl5Desc.dbState != CL5_STATE_CLOSED)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5Delete: invalid state - %d\n", s_cl5Desc.dbState);
slapi_rwlock_unlock (s_cl5Desc.stLock);
return CL5_BAD_STATE;
@@ -605,7 +605,7 @@ int cl5Delete (const char *dir)
rc = _cl5Delete (dir, PR_TRUE /* remove changelog dir */);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5Delete: failed to remove changelog\n");
}
@@ -625,7 +625,7 @@ int cl5DeleteDBSync (Object *replica)
if (replica == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5DeleteDBSync: invalid database id\n");
return CL5_BAD_DATA;
}
@@ -633,7 +633,7 @@ int cl5DeleteDBSync (Object *replica)
/* changelog is not initialized */
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "cl5DeleteDBSync: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "cl5DeleteDBSync:
"
"changelog is not initialized\n");
return CL5_BAD_STATE;
}
@@ -665,7 +665,7 @@ int cl5DeleteDBSync (Object *replica)
{
Replica *r = (Replica*)object_get_data (replica);
PR_ASSERT (r);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "cl5DeleteDBSync:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5DeleteDBSync: "
"file for replica at (%s) not found\n",
slapi_sdn_get_dn (replica_get_root (r)));
}
@@ -693,7 +693,7 @@ int cl5GetUpperBoundRUV (Replica *r, RUV **ruv)
if (r == NULL || ruv == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5GetUpperBoundRUV: invalid parameters\n");
return CL5_BAD_DATA;
}
@@ -701,7 +701,7 @@ int cl5GetUpperBoundRUV (Replica *r, RUV **ruv)
/* changelog is not initialized */
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "cl5GetUpperBoundRUV: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5GetUpperBoundRUV: "
"changelog is not initialized\n");
return CL5_BAD_STATE;
}
@@ -726,7 +726,7 @@ int cl5GetUpperBoundRUV (Replica *r, RUV **ruv)
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "cl5GetUpperBoundRUV: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5GetUpperBoundRUV: "
"could not find DB object for replica\n");
}
@@ -759,14 +759,14 @@ int cl5ExportLDIF (const char *ldifFile, Object **replicas)
if (ldifFile == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5ExportLDIF: null ldif file name\n");
return CL5_BAD_DATA;
}
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5ExportLDIF: changelog is not initialized\n");
return CL5_BAD_STATE;
}
@@ -779,14 +779,14 @@ int cl5ExportLDIF (const char *ldifFile, Object **replicas)
prFile = PR_Open (ldifFile, PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE, 0600);
if (prFile == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5ExportLDIF: failed to open (%s) file; NSPR error - %d\n",
ldifFile, PR_GetError ());
rc = CL5_SYSTEM_ERROR;
goto done;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name_cl,
"cl5ExportLDIF: starting changelog export to (%s) ...\n", ldifFile);
if (replicas) /* export only selected files */
@@ -805,7 +805,7 @@ int cl5ExportLDIF (const char *ldifFile, Object **replicas)
PR_ASSERT (r);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
"cl5ExportLDIF: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5ExportLDIF: "
"failed to locate changelog file for replica at
(%s)\n",
slapi_sdn_get_dn (replica_get_root (r)));
}
@@ -826,7 +826,7 @@ done:;
_cl5RemoveThread ();
if (rc == CL5_SUCCESS)
- slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name_cl,
"cl5ExportLDIF: changelog export is finished.\n");
if (prFile)
@@ -878,21 +878,21 @@ cl5ImportLDIF (const char *clDir, const char *ldifFile, Object
**replicas)
/* validate params */
if (ldifFile == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5ImportLDIF: null ldif file name\n");
return CL5_BAD_DATA;
}
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5ImportLDIF: changelog is not initialized\n");
return CL5_BAD_STATE;
}
if (replicas == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5ImportLDIF: null list of replicas\n");
return CL5_BAD_DATA;
}
@@ -901,7 +901,7 @@ cl5ImportLDIF (const char *clDir, const char *ldifFile, Object
**replicas)
if (NULL == prim_replica_obj)
{
/* Never happens for now. (see replica_execute_ldif2cl_task) */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5ImportLDIF: empty replica list\n");
return CL5_BAD_DATA;
}
@@ -913,7 +913,7 @@ cl5ImportLDIF (const char *clDir, const char *ldifFile, Object
**replicas)
/* make sure changelog is closed */
if (s_cl5Desc.dbState != CL5_STATE_CLOSED)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5ImportLDIF: invalid state - %d \n", s_cl5Desc.dbState);
slapi_rwlock_unlock (s_cl5Desc.stLock);
@@ -928,7 +928,7 @@ cl5ImportLDIF (const char *clDir, const char *ldifFile, Object
**replicas)
#endif
if (file == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5ImportLDIF: failed to open (%s) ldif file; system error - %d\n",
ldifFile, errno);
rc = CL5_SYSTEM_ERROR;
@@ -939,7 +939,7 @@ cl5ImportLDIF (const char *clDir, const char *ldifFile, Object
**replicas)
rc = _cl5Delete (clDir, PR_FALSE);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5ImportLDIF: failed to remove changelog\n");
goto done;
}
@@ -948,7 +948,7 @@ cl5ImportLDIF (const char *clDir, const char *ldifFile, Object
**replicas)
rc = _cl5Open (clDir, NULL, CL5_OPEN_LDIF2CL);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5ImportLDIF: failed to open changelog\n");
goto done;
}
@@ -1040,7 +1040,7 @@ cl5ImportLDIF (const char *clDir, const char *ldifFile, Object
**replicas)
replGen, &op, 1);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5ImportLDIF: "
"failed to write operation to the changelog: "
"type: %lu, dn: %s\n",
@@ -1060,7 +1060,7 @@ cl5ImportLDIF (const char *clDir, const char *ldifFile, Object
**replicas)
replGen, &op, 1);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5ImportLDIF: "
"failed to write operation to the changelog: "
"type: %lu, dn: %s\n",
@@ -1157,7 +1157,7 @@ cl5ConfigTrimming (int maxEntries, const char *maxAge, int
compactInterval, int
{
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5ConfigTrimming: changelog is not initialized\n");
return CL5_BAD_STATE;
}
@@ -1165,7 +1165,7 @@ cl5ConfigTrimming (int maxEntries, const char *maxAge, int
compactInterval, int
/* make sure changelog is not closed while trimming configuration
is updated.*/
if (CL5_SUCCESS != _cl5AddThread ()) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5ConfigTrimming: could not start changelog trimming thread\n");
return CL5_BAD_STATE;
}
@@ -1233,25 +1233,25 @@ int cl5GetOperation (Object *replica, slapi_operation_parameters
*op)
if (replica == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "cl5GetOperation: NULL
replica\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "cl5GetOperation:
NULL replica\n");
return CL5_BAD_DATA;
}
if (op == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "cl5GetOperation: NULL
operation\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5GetOperation: NULL operation\n");
return CL5_BAD_DATA;
}
if (op->csn == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "%s: cl5GetOperation:
operation contains no CSN\n", agmt_name);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "%s:
cl5GetOperation: operation contains no CSN\n", agmt_name);
return CL5_BAD_DATA;
}
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"%s: cl5GetOperation: changelog is not initialized\n", agmt_name);
return CL5_BAD_STATE;
}
@@ -1287,7 +1287,7 @@ int cl5GetFirstOperation (Object *replica,
slapi_operation_parameters *op, void
if (replica == NULL || op == NULL || iterator == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5GetFirstOperation: invalid argument\n");
return CL5_BAD_DATA;
}
@@ -1297,7 +1297,7 @@ int cl5GetFirstOperation (Object *replica,
slapi_operation_parameters *op, void
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
agmt_name = get_thread_private_agmtname();
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"%s: cl5GetFirstOperation: changelog is not initialized\n", agmt_name);
return CL5_BAD_STATE;
}
@@ -1341,14 +1341,14 @@ int cl5GetNextOperation (slapi_operation_parameters *op, void
*iterator)
if (op == NULL || iterator == NULL || !_cl5IsValidIterator (iterator))
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5GetNextOperation: invalid argument\n");
return CL5_BAD_DATA;
}
if (s_cl5Desc.dbState != CL5_STATE_OPEN)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5GetNextOperation: changelog is not open\n");
return CL5_BAD_STATE;
}
@@ -1405,7 +1405,7 @@ int cl5WriteOperationTxn(const char *replName, const char *replGen,
if (op == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5WriteOperation: NULL operation passed\n");
return CL5_BAD_DATA;
}
@@ -1418,7 +1418,7 @@ int cl5WriteOperationTxn(const char *replName, const char *replGen,
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5WriteOperation: changelog is not initialized\n");
return CL5_BAD_STATE;
}
@@ -1511,7 +1511,7 @@ int cl5CreateReplayIteratorEx (Private_Repl_Protocol *prp, const RUV
*consumerRu
replica = prp->replica_object;
if (replica == NULL || consumerRuv == NULL || iterator == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5CreateReplayIteratorEx: invalid parameter\n");
return CL5_BAD_DATA;
}
@@ -1520,7 +1520,7 @@ int cl5CreateReplayIteratorEx (Private_Repl_Protocol *prp, const RUV
*consumerRu
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5CreateReplayIteratorEx: changelog is not initialized\n");
return CL5_BAD_STATE;
}
@@ -1540,7 +1540,7 @@ int cl5CreateReplayIteratorEx (Private_Repl_Protocol *prp, const RUV
*consumerRu
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5CreateReplayIteratorEx: could not find DB object for replica\n");
}
@@ -1572,7 +1572,7 @@ int cl5CreateReplayIterator (Private_Repl_Protocol *prp, const RUV
*consumerRuv,
replica = prp->replica_object;
if (replica == NULL || consumerRuv == NULL || iterator == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5CreateReplayIterator: invalid parameter\n");
return CL5_BAD_DATA;
}
@@ -1581,7 +1581,7 @@ int cl5CreateReplayIterator (Private_Repl_Protocol *prp, const RUV
*consumerRuv,
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5CreateReplayIterator: changelog is not initialized\n");
return CL5_BAD_STATE;
}
@@ -1601,7 +1601,7 @@ int cl5CreateReplayIterator (Private_Repl_Protocol *prp, const RUV
*consumerRuv,
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5CreateReplayIterator: could not find DB object for replica\n");
}
@@ -1654,7 +1654,7 @@ cl5GetNextOperationToReplay (CL5ReplayIterator *iterator, CL5Entry
*entry)
if (entry == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"%s: cl5GetNextOperationToReplay: invalid parameter passed\n",
agmt_name);
return CL5_BAD_DATA;
}
@@ -1672,7 +1672,7 @@ cl5GetNextOperationToReplay (CL5ReplayIterator *iterator, CL5Entry
*entry)
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "%s: cl5GetNextOperationToReplay: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "%s: cl5GetNextOperationToReplay:
"
"failed to read next entry; DB error %d\n", agmt_name, rc);
return CL5_DB_ERROR;
}
@@ -1691,7 +1691,7 @@ cl5GetNextOperationToReplay (CL5ReplayIterator *iterator, CL5Entry
*entry)
/* Callers of this function should cl5_operation_parameters_done(op) */
if ( 0 != cl5DBData2Entry ( data, datalen, entry ) )
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"%s: cl5GetNextOperationToReplay: failed to format entry rc=%d\n",
agmt_name, rc);
return rc;
}
@@ -1708,7 +1708,7 @@ void cl5DestroyReplayIterator (CL5ReplayIterator **iterator)
{
if (iterator == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5DestroyReplayIterator: invalid iterartor passed\n");
return;
}
@@ -1793,7 +1793,7 @@ int cl5GetOperationCount (Object *replica)
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5GetOperationCount: changelog is not initialized\n");
return -1;
}
@@ -1824,13 +1824,13 @@ int cl5GetOperationCount (Object *replica)
PR_ASSERT (file);
count = file->entryCount;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5GetOperationCount: found DB object %p\n", obj);
object_release (obj);
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5GetOperationCount: could not get DB object for replica\n");
count = 0;
}
@@ -1863,7 +1863,7 @@ static int _cl5Open (const char *dir, const CL5DBConfig *config,
CL5OpenMode ope
rc = _cl5TrimInit ();
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5Open: failed to initialize trimming\n");
goto done;
}
@@ -1872,7 +1872,7 @@ static int _cl5Open (const char *dir, const CL5DBConfig *config,
CL5OpenMode ope
rc = cl5CreateDirIfNeeded (dir);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5Open: failed to create changelog directory (%s)\n", dir);
goto done;
}
@@ -1886,7 +1886,7 @@ static int _cl5Open (const char *dir, const CL5DBConfig *config,
CL5OpenMode ope
rc = _cl5CheckDBVersion ();
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5Open: invalid db
version\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "_cl5Open: invalid
db version\n");
goto done;
}
@@ -1896,7 +1896,7 @@ static int _cl5Open (const char *dir, const CL5DBConfig *config,
CL5OpenMode ope
rc = _cl5AppInit ();
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5Open: failed to initialize db environment\n");
goto done;
}
@@ -1911,7 +1911,7 @@ static int _cl5Open (const char *dir, const CL5DBConfig *config,
CL5OpenMode ope
rc = _cl5DBOpen ();
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5Open: failed to open changelog database\n");
goto done;
@@ -1959,7 +1959,7 @@ int cl5CreateDirIfNeeded (const char *dirName)
rc = PR_MkDir (buff, DIR_CREATE_MODE);
if (rc != PR_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5CreateDirIfNeeded: failed to create dir (%s); NSPR error - %d\n",
dirName, PR_GetError ());
return CL5_SYSTEM_ERROR;
@@ -1975,7 +1975,7 @@ int cl5CreateDirIfNeeded (const char *dirName)
rc = PR_MkDir (buff, DIR_CREATE_MODE);
if (rc != PR_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5CreateDirIfNeeded: failed to create dir; NSPR error - %d\n",
PR_GetError ());
return CL5_SYSTEM_ERROR;
@@ -2011,7 +2011,7 @@ static int _cl5AppInit (void)
if (rc == 0 && dbEnv && pagesize)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5AppInit: fetched backend dbEnv (%p)\n", dbEnv);
s_cl5Desc.dbEnv = dbEnv;
s_cl5Desc.dbEnvOpenFlags = openflags;
@@ -2020,7 +2020,7 @@ static int _cl5AppInit (void)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5AppInit: failed to fetch backend dbenv (%p) and/or "
"index page size (%lu)\n", dbEnv, (long unsigned int)pagesize);
return CL5_DB_ERROR;
@@ -2043,7 +2043,7 @@ static int _cl5DBOpen ()
dir = PR_OpenDir(s_cl5Desc.dbDir);
if (dir == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5DBOpen: failed to open changelog dir; NSPR error - %d\n",
PR_GetError ());
return CL5_SYSTEM_ERROR;
@@ -2069,7 +2069,7 @@ static int _cl5DBOpen ()
PR_FALSE /* check for duplicates */);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBOpen: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "_cl5DBOpen:
"
"Error opening file %s\n",
entry->name);
return rc;
@@ -2081,7 +2081,7 @@ static int _cl5DBOpen ()
else /* there is no matching replica for the file - remove */
{
char fullpathname[MAXPATHLEN];
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBOpen:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5DBOpen: "
"file %s has no matching replica; removing\n",
entry->name);
PR_snprintf(fullpathname, MAXPATHLEN, "%s/%s", s_cl5Desc.dbDir,
entry->name);
@@ -2090,13 +2090,13 @@ static int _cl5DBOpen ()
DEFAULT_DB_ENV_OP_FLAGS);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5DBOpen: failed to remove (%s) file; "
"libdb error - %d (%s)\n",
fullpathname, rc, db_strerror(rc));
if (PR_Delete(fullpathname) != PR_SUCCESS) {
PRErrorCode prerr = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5DBOpen: failed to remove (%s) file; "
"nspr error - %d (%s)\n",
fullpathname, prerr, slapd_pr_strerror(prerr));
@@ -2106,7 +2106,7 @@ static int _cl5DBOpen ()
}
}
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBOpen: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "_cl5DBOpen:
"
"opened %d existing databases in %s\n", count, s_cl5Desc.dbDir);
PR_CloseDir(dir);
@@ -2197,7 +2197,7 @@ static int _cl5Entry2DBData (const CL5Entry *entry, char **data,
PRUint32 *len)
(*data) = slapi_ch_malloc (size);
if ((*data) == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5Entry2DBData: failed to allocate data buffer\n");
return CL5_MEMORY_ERROR;
}
@@ -2250,7 +2250,7 @@ static int _cl5Entry2DBData (const CL5Entry *entry, char **data,
PRUint32 *len)
(*len) = pos - *data;
if (*len > size) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5Entry2DBData: real len %d > estimated size %d\n",
*len, size);
return CL5_MEMORY_ERROR;
@@ -2294,7 +2294,7 @@ cl5DBData2Entry (const char *data, PRUint32 len, CL5Entry *entry)
version = (PRUint8)(*pos);
if (version != V_5)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5DBData2Entry: invalid data version\n");
return CL5_BAD_FORMAT;
}
@@ -2359,7 +2359,7 @@ cl5DBData2Entry (const char *data, PRUint32 len, CL5Entry *entry)
break;
default: rc = CL5_BAD_FORMAT;
- slapi_log_error(SLAPI_LOG_FATAL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
repl_plugin_name_cl,
"cl5DBData2Entry: failed to format entry\n");
break;
@@ -2378,7 +2378,7 @@ static int _cl5DispatchDBThreads(void)
PR_UNJOINABLE_THREAD, DEFAULT_THREAD_STACKSIZE);
if (NULL == pth)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5DispatchDBThreads: failed to create trimming "
"thread; NSPR error - %d\n", PR_GetError ());
return CL5_SYSTEM_ERROR;
@@ -2397,7 +2397,7 @@ static int _cl5AddThread(void)
/* open changelog if it is not already open */
if (s_cl5Desc.dbState != CL5_STATE_OPEN)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5AddThread: invalid changelog state - %d\n", s_cl5Desc.dbState);
slapi_rwlock_unlock (s_cl5Desc.stLock);
return CL5_BAD_STATE;
@@ -2550,7 +2550,7 @@ _cl5WriteMod (LDAPMod *mod, char **buff)
/* successfully encrypted. use the encrypted bv */
bv_to_use = encbv;
} else { /* failed */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5WriteMod: encrypting \"%s: %s\" failed\n",
slapi_mod_get_type(&smod), bv->bv_val);
bv_to_use = NULL;
@@ -2676,7 +2676,7 @@ static int _cl5ReadMod (Slapi_Mod *smod, char **buff)
ptr += 3;
}
*ptr = '\0';
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5ReadMod: decrypting \"%s: %s\" failed\n",
slapi_mod_get_type(smod), encstr);
bv_to_use = NULL;
@@ -2881,7 +2881,7 @@ static int _cl5UpgradeMajor(char *fromVersion, char *toVersion)
rc = _cl5AppInit ();
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5UpgradeMajor: failed to open the db env\n");
return rc;
}
@@ -2890,7 +2890,7 @@ static int _cl5UpgradeMajor(char *fromVersion, char *toVersion)
dir = PR_OpenDir(s_cl5Desc.dbDir);
if (dir == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5UpgradeMajor: failed to open changelog dir %s; NSPR error - %d\n",
s_cl5Desc.dbDir, PR_GetError ());
goto out;
@@ -2923,7 +2923,7 @@ static int _cl5UpgradeMajor(char *fromVersion, char *toVersion)
/* db->rename closes DB; need to create every time */
rc = db_create(&thisdb, s_cl5Desc.dbEnv, 0);
if (0 != rc) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5UpgradeMajor: failed to get db handle\n");
goto out;
}
@@ -2934,13 +2934,13 @@ static int _cl5UpgradeMajor(char *fromVersion, char *toVersion)
PR_snprintf(nName, MAXPATHLEN+1, "%s", oName);
PR_snprintf(nName + baselen, MAXPATHLEN+1-baselen, "%s", DB_EXTENSION);
*p = c;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5UpgradeMajor: renaming %s to %s\n", oName, nName);
rc = thisdb->rename(thisdb, (const char *)oName, NULL /* subdb */,
(const char *)nName, 0);
if (rc != PR_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5UpgradeMajor: failed to rename file (%s -> %s); "
"db error - %d %s\n", oName, nName, rc, db_strerror(rc));
break;
@@ -2949,7 +2949,7 @@ static int _cl5UpgradeMajor(char *fromVersion, char *toVersion)
}
/* update the version file */
_cl5WriteDBVersion ();
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"Upgrading from %s to %s is successfully done (%s)\n",
fromVersion, toVersion, s_cl5Desc.dbDir);
out:
@@ -2976,7 +2976,7 @@ static int _cl5UpgradeMinor(char *fromVersion, char *toVersion)
rc = _cl5AppInit ();
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5UpgradeMinor: failed to open the db env\n");
return rc;
}
@@ -2984,7 +2984,7 @@ static int _cl5UpgradeMinor(char *fromVersion, char *toVersion)
/* update the version file */
_cl5WriteDBVersion ();
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"Upgrading from %s to %s is successfully done (%s)\n",
fromVersion, toVersion, s_cl5Desc.dbDir);
@@ -3017,7 +3017,7 @@ static int _cl5CheckDBVersion(void)
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5CheckDBVersion: invalid dbversion\n");
rc = CL5_BAD_DBVERSION;
goto bailout;
@@ -3036,7 +3036,7 @@ static int _cl5CheckDBVersion(void)
}
if (NULL == versionp || versionp == versionendp)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5CheckDBVersion: invalid dbversion: %s\n", dbVersion);
rc = CL5_BAD_DBVERSION;
goto bailout;
@@ -3060,7 +3060,7 @@ static int _cl5CheckDBVersion(void)
rc = _cl5UpgradeMajor(dbVersion, clVersion);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5CheckDBVersion: upgrade %s -> %s failed\n",
dbVersion, clVersion);
rc = CL5_BAD_DBVERSION;
@@ -3072,7 +3072,7 @@ static int _cl5CheckDBVersion(void)
rc = _cl5UpgradeMinor(dbVersion, clVersion);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5CheckDBVersion: upgrade %s -> %s failed\n",
dbVersion, clVersion);
rc = CL5_BAD_DBVERSION;
@@ -3103,7 +3103,7 @@ static int _cl5ReadDBVersion (const char *dir, char *clVersion, int
buflen)
file = PR_Open (fName, PR_RDONLY, 777);
if (file == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5ReadDBVersion: failed to open DBVERSION; NSPR error - %d\n",
PR_GetError ());
return CL5_SYSTEM_ERROR;
@@ -3112,7 +3112,7 @@ static int _cl5ReadDBVersion (const char *dir, char *clVersion, int
buflen)
size = slapi_read_buffer (file, buff, BUFSIZ);
if (size < 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5ReadDBVersion: failed to read DBVERSION; NSPR error - %d\n",
PR_GetError ());
PR_Close (file);
@@ -3133,7 +3133,7 @@ static int _cl5ReadDBVersion (const char *dir, char *clVersion, int
buflen)
rc = PR_Close (file);
if (rc != PR_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5ReadDBVersion: failed to close DBVERSION; NSPR error - %d\n",
PR_GetError ());
return CL5_SYSTEM_ERROR;
@@ -3156,7 +3156,7 @@ static int _cl5WriteDBVersion(void)
s_cl5Desc.dbConfig.fileMode);
if (file == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5WriteDBVersion: failed to open DBVERSION; NSPR error - %d\n",
PR_GetError ());
return CL5_SYSTEM_ERROR;
@@ -3170,7 +3170,7 @@ static int _cl5WriteDBVersion(void)
size = slapi_write_buffer (file, clVersion, len);
if (size != len)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5WriteDBVersion: failed to write DBVERSION; NSPR error - %d\n",
PR_GetError ());
PR_Close (file);
@@ -3180,7 +3180,7 @@ static int _cl5WriteDBVersion(void)
rc = PR_Close (file);
if (rc != PR_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5WriteDBVersion: failed to close DBVERSION; NSPR error - %d\n",
PR_GetError ());
return CL5_SYSTEM_ERROR;
@@ -3204,7 +3204,7 @@ static void _cl5Close(void)
interval = PR_MillisecondsToInterval(100);
while (s_cl5Desc.threadCount > 0)
{
- slapi_log_error( SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5Close: waiting for threads to exit: %d thread(s) still active\n",
s_cl5Desc.threadCount);
DS_Sleep(interval);
@@ -3223,7 +3223,7 @@ static void _cl5Close(void)
if (_cl5Delete (s_cl5Desc.dbDir, 1) != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5Close: failed to remove changelog\n");
}
s_cl5Desc.dbRmOnClose = PR_FALSE;
@@ -3244,10 +3244,10 @@ static void _cl5DBClose(void)
Object *obj;
for (obj = objset_first_obj(s_cl5Desc.dbFiles); obj;
obj = objset_next_obj(s_cl5Desc.dbFiles, obj)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5DBClose: deleting DB object %p\n", obj);
}
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5DBClose: closing databases in %s\n", s_cl5Desc.dbDir);
objset_delete (&s_cl5Desc.dbFiles);
}
@@ -3290,7 +3290,7 @@ static int _cl5Delete (const char *clDir, int rmDir)
dir = PR_OpenDir(clDir);
if (dir == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5Delete: failed to open changelog dir; NSPR error - %d\n",
PR_GetError ());
return CL5_SYSTEM_ERROR;
@@ -3304,7 +3304,7 @@ static int _cl5Delete (const char *clDir, int rmDir)
break;
}
if (!_cl5IsDbFile(entry->name)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5Delete: Skipping file [%s/%s] because it is not a changelogdb
file.\n",
clDir, entry->name);
dirisempty = 0; /* skipped at least one file - dir not empty */
@@ -3317,7 +3317,7 @@ static int _cl5Delete (const char *clDir, int rmDir)
/* DBVERSION */
rc = PR_Delete(filename) != PR_SUCCESS;
if (PR_SUCCESS != rc) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5Delete: failed to remove \"%s\"; NSPR error - %d\n",
filename, PR_GetError ());
}
@@ -3326,7 +3326,7 @@ static int _cl5Delete (const char *clDir, int rmDir)
rc = s_cl5Desc.dbEnv->dbremove(s_cl5Desc.dbEnv, 0, filename, 0,
DEFAULT_DB_ENV_OP_FLAGS);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5Delete: failed to remove \"%s\"; "
"libdb error - %d (%s)\n",
filename, rc, db_strerror(rc));
@@ -3337,7 +3337,7 @@ static int _cl5Delete (const char *clDir, int rmDir)
rc = PR_CloseDir(dir);
if (rc != PR_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5Delete: failed to close changelog dir (%s); NSPR error - %d\n",
clDir, PR_GetError ());
return CL5_SYSTEM_ERROR;
@@ -3348,13 +3348,13 @@ static int _cl5Delete (const char *clDir, int rmDir)
rc = PR_RmDir (clDir);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5Delete: failed to remove changelog dir (%s); errno = %d\n",
clDir, errno);
return CL5_SYSTEM_ERROR;
}
} else if (rmDir && !dirisempty) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5Delete: changelog dir (%s) is not empty - cannot remove\n",
clDir);
}
@@ -3387,7 +3387,7 @@ static int _cl5TrimInit(void)
if (s_cl5Desc.dbTrim.lock == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5InitTrimming: failed to create lock; NSPR error - %d\n",
PR_GetError ());
return CL5_SYSTEM_ERROR;
@@ -3442,7 +3442,7 @@ static int _cl5TrimMain (void *param)
}
PR_AtomicDecrement (&s_cl5Desc.threadCount);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5TrimMain:
exiting\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "_cl5TrimMain:
exiting\n");
return 0;
}
@@ -3510,11 +3510,11 @@ static void _cl5DoPurging (Replica *replica)
/* We found our changelog, now purge it */
_cl5PurgeRID (obj, rid);
object_release (obj);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"Purged rid (%d) from suffix (%s)\n",
rid, slapi_sdn_get_dn(sdn));
} else {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"Purge rid (%d) failed to find changelog file (%s) for suffix (%s)\n",
rid, fileName, slapi_sdn_get_dn(sdn));
}
@@ -3541,7 +3541,7 @@ _cl5CompactDBs(void)
PR_Lock (s_cl5Desc.dbTrim.lock);
rc = TXN_BEGIN(s_cl5Desc.dbEnv, NULL, &txnid, 0);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5CompactDBs: failed to begin transaction; db error - %d %s\n",
rc, db_strerror(rc));
goto bail;
@@ -3557,12 +3557,12 @@ _cl5CompactDBs(void)
rc = db->compact(db, txnid, NULL/*start*/, NULL/*stop*/,
&c_data, DB_FREE_SPACE, NULL/*end*/);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5CompactDBs: failed to compact %s; db error - %d %s\n",
dbFile->replName, rc, db_strerror(rc));
goto bail;
}
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5CompactDBs: %s - %d pages freed\n",
dbFile->replName, c_data.compact_pages_free);
}
@@ -3573,14 +3573,14 @@ bail:
if (rc) {
rc = TXN_ABORT (txnid);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5CompactDBs: failed to abort transaction; db error - %d %s\n",
rc, db_strerror(rc));
}
} else {
rc = TXN_COMMIT (txnid, 0);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5CompactDBs: failed to commit transaction; db error - %d %s\n",
rc, db_strerror(rc));
}
@@ -3611,7 +3611,7 @@ _cl5PurgeGetFirstEntry(Object *obj, CL5Entry *entry, void
**iterator, DB_TXN *tx
rc = file->db->cursor(file->db, txnid, &cursor, 0);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5PurgeGetFirstEntry: failed to create cursor; db error - %d %s\n", rc,
db_strerror(rc));
rc = CL5_DB_ERROR;
goto done;
@@ -3634,7 +3634,7 @@ _cl5PurgeGetFirstEntry(Object *obj, CL5Entry *entry, void
**iterator, DB_TXN *tx
slapi_ch_free(&(data.data));
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5PurgeGetFirstEntry: failed to format entry: %d\n", rc);
goto done;
}
@@ -3659,7 +3659,7 @@ _cl5PurgeGetFirstEntry(Object *obj, CL5Entry *entry, void
**iterator, DB_TXN *tx
}
/* db error occured while iterating */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5PurgeGetFirstEntry: failed to get entry; db error - %d %s\n",
rc, db_strerror(rc));
rc = CL5_DB_ERROR;
@@ -3709,6 +3709,7 @@ _cl5PurgeGetNextEntry (CL5Entry *entry, void *iterator, DBT *key)
slapi_ch_free(&key->data);
}
slapi_log_error(rc == CL5_DB_LOCK_ERROR?SLAPI_LOG_REPL:SLAPI_LOG_FATAL,
+ rc == CL5_DB_LOCK_ERROR?LOG_DEBUG:LOG_ERR,
repl_plugin_name_cl,
"_cl5PurgeGetNextEntry: failed to format entry: %d\n",
rc);
@@ -3731,6 +3732,7 @@ _cl5PurgeGetNextEntry (CL5Entry *entry, void *iterator, DBT *key)
/* cursor operation failed */
slapi_log_error(rc == CL5_DB_LOCK_ERROR?SLAPI_LOG_REPL:SLAPI_LOG_FATAL,
+ rc == CL5_DB_LOCK_ERROR?LOG_DEBUG:LOG_ERR,
repl_plugin_name_cl,
"_cl5PurgeGetNextEntry: failed to get entry; db error - %d %s\n",
rc, db_strerror(rc));
@@ -3784,7 +3786,7 @@ _cl5PurgeRID(Object *obj, ReplicaId cleaned_rid)
rc = TXN_BEGIN(s_cl5Desc.dbEnv, NULL, &txnid, 0);
if (rc != 0){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5PurgeRID: failed to begin transaction; db error - %d %s. "
"Changelog was not purged of rid(%d)\n",
rc, db_strerror(rc), cleaned_rid);
@@ -3826,7 +3828,7 @@ _cl5PurgeRID(Object *obj, ReplicaId cleaned_rid)
* Reduce the the batch count and reset the key to
* the starting point
*/
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5PurgeRID: Ran out of db locks deleting entry. "
"Reduce the batch value and restart.\n");
batch_count = trimmed - 10;
@@ -3841,7 +3843,7 @@ _cl5PurgeRID(Object *obj, ReplicaId cleaned_rid)
break;
} else {
/* fatal error */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5PurgeRID: fatal error (%d)\n", rc);
slapi_ch_free(&(key.data));
finished = 1;
@@ -3861,7 +3863,7 @@ _cl5PurgeRID(Object *obj, ReplicaId cleaned_rid)
* Reduce the the batch count and reset the key to the starting
* point.
*/
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5PurgeRID: Ran out of db locks getting the next entry. "
"Reduce the batch value and restart.\n");
batch_count = trimmed - 10;
@@ -3892,7 +3894,7 @@ _cl5PurgeRID(Object *obj, ReplicaId cleaned_rid)
if (rc == CL5_SUCCESS || rc == CL5_NOTFOUND){
rc = TXN_COMMIT (txnid, 0);
if (rc != 0){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5PurgeRID: failed to commit transaction; db error - %d %s. "
"Changelog was not completely purged of rid (%d)\n",
rc, db_strerror(rc), cleaned_rid);
@@ -3909,14 +3911,14 @@ _cl5PurgeRID(Object *obj, ReplicaId cleaned_rid)
} else {
rc = TXN_ABORT (txnid);
if (rc != 0){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5PurgeRID: failed to abort transaction; db error - %d %s. "
"Changelog was not completely purged of rid (%d)\n",
rc, db_strerror(rc), cleaned_rid);
}
if (batch_count == 0){
/* This was not a retry. Fatal error, break out */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5PurgeRID: Changelog was not purged of rid (%d)\n",
cleaned_rid);
break;
@@ -3925,7 +3927,7 @@ _cl5PurgeRID(Object *obj, ReplicaId cleaned_rid)
}
slapi_ch_free_string(&starting_key);
- slapi_log_error (SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5PurgeRID: Removed (%ld entries) that originated from rid (%d)\n",
totalTrimmed, cleaned_rid);
}
@@ -3970,7 +3972,7 @@ static void _cl5TrimFile (Object *obj, long *numToTrim)
rc = TXN_BEGIN(s_cl5Desc.dbEnv, NULL, &txnid, 0);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5TrimFile: failed to begin transaction; db error - %d %s\n",
rc, db_strerror(rc));
finished = PR_TRUE;
@@ -3985,7 +3987,7 @@ static void _cl5TrimFile (Object *obj, long *numToTrim)
* parameters and has been seen by all consumers.
*/
if(op.csn == NULL){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "_cl5TrimFile: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "_cl5TrimFile:
"
"Operation missing csn, moving on to next entry.\n");
cl5_operation_parameters_done (&op);
finished =_cl5GetNextEntry (&entry, it);
@@ -4032,7 +4034,7 @@ static void _cl5TrimFile (Object *obj, long *numToTrim)
else
{
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error (SLAPI_LOG_REPL, NULL,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL,
"Changelog purge skipped anchor csn %s\n",
csn_as_string (maxcsn, PR_FALSE, strCSN));
}
@@ -4067,7 +4069,7 @@ static void _cl5TrimFile (Object *obj, long *numToTrim)
rc = TXN_ABORT (txnid);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5TrimFile: failed to abort transaction; db error - %d %s\n",
rc, db_strerror(rc));
}
@@ -4078,7 +4080,7 @@ static void _cl5TrimFile (Object *obj, long *numToTrim)
if (rc != 0)
{
finished = 1;
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5TrimFile: failed to commit transaction; db error - %d %s\n",
rc, db_strerror(rc));
}
@@ -4095,7 +4097,7 @@ static void _cl5TrimFile (Object *obj, long *numToTrim)
if (totalTrimmed)
{
- slapi_log_error (SLAPI_LOG_REPL, NULL, "Trimmed %d changes from the
changelog\n", totalTrimmed);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "Trimmed %d changes from the
changelog\n", totalTrimmed);
}
}
@@ -4165,7 +4167,7 @@ static int _cl5ReadRUV (const char *replGen, Object *obj, PRBool
purge)
}
if (rc != RUV_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG,
repl_plugin_name_cl,
"%s: _cl5ReadRUV: failed to initialize %s ruv; "
"RUV error %d\n", agmt_name, purge?
"purge" : "upper bound", rc);
@@ -4184,7 +4186,7 @@ static int _cl5ReadRUV (const char *replGen, Object *obj, PRBool
purge)
rc = _cl5ConstructRUV (replGen, obj, purge);
goto done;
- default: slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ default: slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"%s: _cl5ReadRUV: failed to get purge RUV; "
"db error - %d %s\n", agmt_name, rc, db_strerror(rc));
rc = CL5_DB_ERROR;
@@ -4240,7 +4242,7 @@ static int _cl5WriteRUV (CL5DBFile *file, PRBool purge)
rc = txn_begin(s_cl5Desc.dbEnv, NULL, &txnid, 0);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5WriteRUV: failed to begin transaction; db error - %d %s\n",
rc, db_strerror(rc));
return CL5_DB_ERROR;
@@ -4255,7 +4257,7 @@ static int _cl5WriteRUV (CL5DBFile *file, PRBool purge)
rc = txn_commit (txnid, 0);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5WriteRUV: failed to commit transaction; db error - %d %s\n",
rc, db_strerror(rc));
return CL5_DB_ERROR;
@@ -4265,7 +4267,7 @@ static int _cl5WriteRUV (CL5DBFile *file, PRBool purge)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5WriteRUV: failed to write %s RUV for file %s; db error - %d (%s)\n",
purge? "purge" : "upper bound", file->name, rc,
db_strerror(rc));
@@ -4278,7 +4280,7 @@ static int _cl5WriteRUV (CL5DBFile *file, PRBool purge)
rc = txn_abort (txnid);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5WriteRUV: failed to abort transaction; db error - %d %s\n",
rc, db_strerror(rc));
}
@@ -4310,7 +4312,7 @@ static int _cl5ConstructRUV (const char *replGen, Object *obj,
PRBool purge)
rc = ruv_init_new (replGen, 0, NULL, &file->maxRUV);
if (rc != RUV_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5ConstructRUV:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5ConstructRUV: "
"failed to initialize %s RUV for file %s; ruv error - %d\n",
purge? "purge" : "upper bound", file->name, rc);
return CL5_RUV_ERROR;
@@ -4323,7 +4325,7 @@ static int _cl5ConstructRUV (const char *replGen, Object *obj,
PRBool purge)
if(op.csn){
rid = csn_get_replicaid (op.csn);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "_cl5ConstructRUV:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5ConstructRUV: "
"Operation missing csn, moving on to next entry.\n");
cl5_operation_parameters_done (&op);
rc = _cl5GetNextEntry (&entry, iterator);
@@ -4331,7 +4333,7 @@ static int _cl5ConstructRUV (const char *replGen, Object *obj,
PRBool purge)
}
if(is_cleaned_rid(rid)){
/* skip this entry as the rid is invalid */
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5ConstructRUV:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5ConstructRUV: "
"skipping entry because its csn contains a cleaned rid(%d)\n",
rid);
cl5_operation_parameters_done (&op);
rc = _cl5GetNextEntry (&entry, iterator);
@@ -4345,7 +4347,7 @@ static int _cl5ConstructRUV (const char *replGen, Object *obj,
PRBool purge)
cl5_operation_parameters_done (&op);
if (rc != RUV_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5ConstructRUV:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5ConstructRUV: "
"failed to updated %s RUV for file %s; ruv error - %d\n",
purge ? "purge" : "upper bound", file->name, rc);
rc = CL5_RUV_ERROR;
@@ -4413,7 +4415,7 @@ static int _cl5UpdateRUV (Object *obj, CSN *csn, PRBool newReplica,
PRBool purge
if (rc != RUV_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5UpdatePurgeRUV:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5UpdatePurgeRUV: "
"failed to update %s RUV for file %s; ruv error - %d\n",
purge ? "purge" : "upper bound", file->name, rc);
return CL5_RUV_ERROR;
@@ -4506,7 +4508,7 @@ static int _cl5GetRUV2Purge2 (Object *fileObj, RUV **ruv)
rc = ruv_enumerate_elements (consRUV, _cl5EnumConsumerRUV, *ruv);
if (rc != RUV_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
"_cl5GetRUV2Purge2: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5GetRUV2Purge2: "
"failed to construct ruv; ruv error - %d\n", rc);
rc = CL5_RUV_ERROR;
object_release (consRUVObj);
@@ -4564,7 +4566,7 @@ static int _cl5GetEntryCount (CL5DBFile *file)
/* delete the entry. the entry is re-added when file
is successfully closed */
file->db->del (file->db, NULL, &key, DEFAULT_DB_OP_FLAGS(NULL));
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG,
repl_plugin_name_cl,
"_cl5GetEntryCount: %d changes for replica %s\n",
file->entryCount, file->replName);
return CL5_SUCCESS;
@@ -4580,7 +4582,7 @@ static int _cl5GetEntryCount (CL5DBFile *file)
#endif
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5GetEntryCount: failed to get changelog statistics; "
"db error - %d %s\n", rc, db_strerror(rc));
return CL5_DB_ERROR;
@@ -4591,14 +4593,14 @@ static int _cl5GetEntryCount (CL5DBFile *file)
#else /* DB31 */
file->entryCount = stats->bt_ndata;
#endif
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG,
repl_plugin_name_cl,
"_cl5GetEntryCount: %d changes for replica %s\n",
file->entryCount, file->replName);
slapi_ch_free ((void **)&stats);
return CL5_SUCCESS;
- default: slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ default: slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5GetEntryCount: failed to get count entry; "
"db error - %d %s\n", rc, db_strerror(rc));
return CL5_DB_ERROR;
@@ -4621,7 +4623,7 @@ static int _cl5WriteEntryCount (CL5DBFile *file)
rc = txn_begin(s_cl5Desc.dbEnv, NULL, &txnid, 0);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5WriteEntryCount: failed to begin transaction; db error - %d %s\n",
rc, db_strerror(rc));
return CL5_DB_ERROR;
@@ -4634,7 +4636,7 @@ static int _cl5WriteEntryCount (CL5DBFile *file)
rc = txn_commit (txnid, 0);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5WriteEntryCount: failed to commit transaction; db error - %d %s\n",
rc, db_strerror(rc));
return CL5_DB_ERROR;
@@ -4644,7 +4646,7 @@ static int _cl5WriteEntryCount (CL5DBFile *file)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5WriteEntryCount: "
"failed to write count entry for file %s; db error - %d %s\n",
file->name, rc, db_strerror(rc));
@@ -4657,7 +4659,7 @@ static int _cl5WriteEntryCount (CL5DBFile *file)
rc = txn_abort (txnid);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5WriteEntryCount: failed to abort transaction; db error - %d %s\n",
rc, db_strerror(rc));
}
@@ -4721,7 +4723,7 @@ static int _cl5Operation2LDIF (const slapi_operation_parameters *op,
const char
switch (op->operation_type)
{
case SLAPI_OPERATION_ADD: if (NULL == op->p.p_add.target_entry) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5Operation2LDIF(ADD): entry is NULL\n");
return CL5_BAD_FORMAT;
}
@@ -4736,7 +4738,7 @@ static int _cl5Operation2LDIF (const slapi_operation_parameters *op,
const char
break;
case SLAPI_OPERATION_MODIFY: if (NULL == op->p.p_modify.modify_mods) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5Operation2LDIF(MODIFY): mods are NULL\n");
return CL5_BAD_FORMAT;
}
@@ -4746,7 +4748,7 @@ static int _cl5Operation2LDIF (const slapi_operation_parameters *op,
const char
break;
case SLAPI_OPERATION_MODRDN: if (NULL == op->p.p_modrdn.modrdn_mods) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5Operation2LDIF(MODRDN): mods are NULL\n");
return CL5_BAD_FORMAT;
}
@@ -4767,14 +4769,14 @@ static int _cl5Operation2LDIF (const slapi_operation_parameters
*op, const char
break;
case SLAPI_OPERATION_DELETE: if (NULL == REPL_GET_DN(&op->target_address)) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5Operation2LDIF(DELETE): target dn is NULL\n");
return CL5_BAD_FORMAT;
}
len += LDIF_SIZE_NEEDED(strlen (T_DNSTR),
REPL_GET_DN_LEN(&op->target_address));
break;
- default: slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ default: slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5Operation2LDIF: invalid operation type - %lu\n",
op->operation_type);
return CL5_BAD_FORMAT;
@@ -4785,7 +4787,7 @@ static int _cl5Operation2LDIF (const slapi_operation_parameters *op,
const char
start = buff;
if (buff == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5Operation2LDIF: memory allocation failed\n");
return CL5_MEMORY_ERROR;
}
@@ -4878,7 +4880,7 @@ _cl5LDIF2Operation (char *ldifEntry, slapi_operation_parameters *op,
char **repl
rc = slapi_ldif_parse_line(line, &type, &value, &freeval);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5LDIF2Operation: warning - failed to parse ldif line\n");
continue;
}
@@ -4947,7 +4949,7 @@ _cl5LDIF2Operation (char *ldifEntry, slapi_operation_parameters *op,
char **repl
* not NULL.
*/
if (NULL == rawDN) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5LDIF2Operation: corrupted format "
"for operation type - %lu\n",
op->operation_type);
@@ -4974,7 +4976,7 @@ _cl5LDIF2Operation (char *ldifEntry, slapi_operation_parameters *op,
char **repl
slapi_mods_free (&mods);
break;
- default: slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ default: slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5LDIF2Operation: invalid operation type - %lu\n",
op->operation_type);
if (freeval) {
@@ -4998,7 +5000,7 @@ _cl5LDIF2Operation (char *ldifEntry, slapi_operation_parameters *op,
char **repl
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5LDIF2Operation: invalid data format\n");
}
}
@@ -5028,14 +5030,14 @@ static int _cl5WriteOperationTxn(const char *replName, const char
*replGen,
PR_TRUE /* check for duplicates */);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5WriteOperationTxn: failed to find or open DB object for replica
%s\n", replName);
return rc;
}
}
else if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5WriteOperationTxn: failed to get db file for target dn (%s)",
REPL_GET_DN(&op->target_address));
return CL5_OBJSET_ERROR;
@@ -5055,7 +5057,7 @@ static int _cl5WriteOperationTxn(const char *replName, const char
*replGen,
if (rc != CL5_SUCCESS)
{
char s[CSN_STRSIZE];
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5WriteOperationTxn: failed to convert entry with csn (%s) "
"to db format\n",
csn_as_string(op->csn,PR_FALSE,s));
goto done;
@@ -5070,7 +5072,7 @@ static int _cl5WriteOperationTxn(const char *replName, const char
*replGen,
rc = file->db->put(file->db, NULL, &key, data, 0);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5WriteOperationTxn: failed to write entry; db error - %d %s\n",
rc, db_strerror(rc));
if (CL5_OS_ERR_IS_DISKFULL(rc))
@@ -5095,7 +5097,7 @@ static int _cl5WriteOperationTxn(const char *replName, const char
*replGen,
rc = TXN_ABORT (txnid);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5WriteOperationTxn: failed to abort transaction; db error - %d
%s\n",
rc, db_strerror(rc));
rc = CL5_DB_ERROR;
@@ -5111,7 +5113,7 @@ static int _cl5WriteOperationTxn(const char *replName, const char
*replGen,
rc = TXN_BEGIN(s_cl5Desc.dbEnv, parent_txnid, &txnid, 0);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5WriteOperationTxn: failed to start transaction; db error - %d
%s\n",
rc, db_strerror(rc));
rc = CL5_DB_ERROR;
@@ -5130,7 +5132,7 @@ static int _cl5WriteOperationTxn(const char *replName, const char
*replGen,
}
if (CL5_OS_ERR_IS_DISKFULL(rc))
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5WriteOperationTxn: changelog (%s) DISK FULL; db error - %d %s\n",
s_cl5Desc.dbDir, rc, db_strerror(rc));
cl5_set_diskfull();
@@ -5141,11 +5143,11 @@ static int _cl5WriteOperationTxn(const char *replName, const char
*replGen,
{
if (rc == 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "_cl5WriteOperationTxn:
retry (%d) the transaction (csn=%s) succeeded\n", cnt, (char*)key.data);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5WriteOperationTxn: retry (%d) the transaction (csn=%s) succeeded\n", cnt,
(char*)key.data);
}
else if ((cnt + 1) >= MAX_TRIALS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "_cl5WriteOperationTxn:
retry (%d) the transaction (csn=%s) failed (rc=%d (%s))\n", cnt, (char*)key.data, rc,
db_strerror(rc));
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5WriteOperationTxn: retry (%d) the transaction (csn=%s) failed (rc=%d
(%s))\n", cnt, (char*)key.data, rc, db_strerror(rc));
}
}
cnt ++;
@@ -5160,7 +5162,7 @@ static int _cl5WriteOperationTxn(const char *replName, const char
*replGen,
else
{
char s[CSN_STRSIZE];
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5WriteOperationTxn: failed to write entry with csn (%s); "
"db error - %d %s\n", csn_as_string(op->csn,PR_FALSE,s),
rc, db_strerror(rc));
@@ -5168,7 +5170,7 @@ static int _cl5WriteOperationTxn(const char *replName, const char
*replGen,
rc = TXN_ABORT (txnid);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5WriteOperationTxn: failed to abort transaction; db error - %d
%s\n",
rc, db_strerror(rc));
}
@@ -5183,7 +5185,7 @@ static int _cl5WriteOperationTxn(const char *replName, const char
*replGen,
/* update purge vector if we have not seen any changes from this replica before */
_cl5UpdateRUV (file_obj, op->csn, PR_TRUE, PR_TRUE);
- slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name_cl,
"cl5WriteOperationTxn: successfully written entry with csn (%s)\n",
csnStr);
rc = CL5_SUCCESS;
done:
@@ -5219,7 +5221,7 @@ static int _cl5GetFirstEntry (Object *obj, CL5Entry *entry, void
**iterator, DB_
rc = file->db->cursor(file->db, txnid, &cursor, 0);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5GetFirstEntry: failed to create cursor; db error - %d %s\n", rc,
db_strerror(rc));
rc = CL5_DB_ERROR;
goto done;
@@ -5243,7 +5245,7 @@ static int _cl5GetFirstEntry (Object *obj, CL5Entry *entry, void
**iterator, DB_
slapi_ch_free (&(data.data));
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5GetFirstOperation: failed to format entry: %d\n", rc);
goto done;
}
@@ -5281,7 +5283,7 @@ static int _cl5GetFirstEntry (Object *obj, CL5Entry *entry, void
**iterator, DB_
/* db error occured while iterating */
/* On this path, the condition "rc != 0" cannot be false */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5GetFirstEntry: failed to get entry; db error - %d %s\n",
rc, db_strerror(rc));
rc = CL5_DB_ERROR;
@@ -5323,7 +5325,7 @@ static int _cl5GetNextEntry (CL5Entry *entry, void *iterator)
slapi_ch_free (&(data.data));
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5GetNextEntry: failed to format entry: %d\n", rc);
}
@@ -5353,6 +5355,7 @@ static int _cl5GetNextEntry (CL5Entry *entry, void *iterator)
/* cursor operation failed */
slapi_log_error(rc == CL5_DB_LOCK_ERROR?SLAPI_LOG_REPL:SLAPI_LOG_FATAL,
+ rc == CL5_DB_LOCK_ERROR?LOG_DEBUG:LOG_ERR,
repl_plugin_name_cl,
"_cl5GetNextEntry: failed to get entry; db error - %d %s\n",
rc, db_strerror(rc));
@@ -5378,7 +5381,7 @@ static int _cl5CurrentDeleteEntry (void *iterator)
PR_AtomicDecrement (&file->entryCount);
return CL5_SUCCESS;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5CurrentDeleteEntry failed, err=%d %s\n",
rc, db_strerror(rc));
/*
@@ -5427,25 +5430,25 @@ static int _cl5GetOperation (Object *replica,
slapi_operation_parameters *op)
rc = cl5DBData2Entry (data.data, data.size, &entry);
if (rc == CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name_cl,
"_cl5GetOperation: successfully retrieved operation with csn (%s)\n",
csnStr);
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5GetOperation: failed to convert db data to operation;"
" csn - %s\n", csnStr);
}
goto done;
- case DB_NOTFOUND: slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ case DB_NOTFOUND: slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5GetOperation: operation for csn (%s) is not found in db that should
contain dn (%s)\n",
csnStr, REPL_GET_DN(&op->target_address));
rc = CL5_NOTFOUND;
goto done;
- default: slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ default: slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5GetOperation: failed to get entry for csn (%s); "
"db error - %d %s\n", csnStr, rc, db_strerror(rc));
rc = CL5_DB_ERROR;
@@ -5477,7 +5480,7 @@ PRBool cl5HelperEntry (const char *csnstr, CSN *csnp)
}
if (csn == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5HelperEntry: failed to get csn time; csn error\n");
return PR_FALSE;
}
@@ -5548,9 +5551,9 @@ static int _cl5PositionCursorForReplay (ReplicaId consumerRID, const
RUV *consum
agmt_name = get_thread_private_agmtname();
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, NULL, "_cl5PositionCursorForReplay (%s): Consumer
RUV:\n", agmt_name);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "_cl5PositionCursorForReplay
(%s): Consumer RUV:\n", agmt_name);
ruv_dump (consumerRuv, agmt_name, NULL);
- slapi_log_error(SLAPI_LOG_REPL, NULL, "_cl5PositionCursorForReplay (%s): Supplier
RUV:\n", agmt_name);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "_cl5PositionCursorForReplay
(%s): Supplier RUV:\n", agmt_name);
ruv_dump (supplierRuv, agmt_name, NULL);
}
@@ -5567,7 +5570,7 @@ static int _cl5PositionCursorForReplay (ReplicaId consumerRID, const
RUV *consum
rc = CL5_SUCCESS;
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
csn_as_string(startCSN, PR_FALSE, csnStr);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"%s: CSN %s found, position set for replay\n", agmt_name, csnStr);
}
}
@@ -5586,14 +5589,14 @@ static int _cl5PositionCursorForReplay (ReplicaId consumerRID,
const RUV *consum
{
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
csn_as_string(startCSN, PR_FALSE, csnStr);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"%s: CSN %s not found, seems to be
missing\n", agmt_name, csnStr);
}
}
else /* we are not as up to date or we purged */
{
csn_as_string(startCSN, PR_FALSE, csnStr);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"%s: CSN %s not found, we aren't as up to date,
or we purged\n",
agmt_name, csnStr);
}
@@ -5602,7 +5605,7 @@ static int _cl5PositionCursorForReplay (ReplicaId consumerRID, const
RUV *consum
{
csn_as_string(startCSN, PR_FALSE, csnStr);
/* db error */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"%s: Failed to retrieve change with CSN %s; db error -
%d %s\n",
agmt_name, csnStr, rc, db_strerror(rc));
@@ -5617,7 +5620,7 @@ static int _cl5PositionCursorForReplay (ReplicaId consumerRID, const
RUV *consum
if (*iterator == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"%s: _cl5PositionCursorForReplay: failed to allocate iterator\n",
agmt_name);
rc = CL5_MEMORY_ERROR;
goto done;
@@ -5823,7 +5826,7 @@ static int _cl5CheckMissingCSN (const CSN *csn, const RUV
*supplierRuv, CL5DBFil
/* we have not seen any changes from this replica so it is
ok not to have this csn */
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
"_cl5CheckMissingCSN: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5CheckMissingCSN: "
"can't locate %s csn: we have not seen any changes
for replica %d\n",
csn_as_string (csn, PR_FALSE, csnStr), rid);
}
@@ -5837,7 +5840,7 @@ static int _cl5CheckMissingCSN (const CSN *csn, const RUV
*supplierRuv, CL5DBFil
if (csn_compare (csn, supplierCsn) <= 0)
{
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
"_cl5CheckMissingCSN: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5CheckMissingCSN: "
"the change with %s csn was never logged because it
was imported "
"during replica initialization\n",
csn_as_string (csn, PR_FALSE, csnStr));
}
@@ -5846,7 +5849,7 @@ static int _cl5CheckMissingCSN (const CSN *csn, const RUV
*supplierRuv, CL5DBFil
else
{
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
"_cl5CheckMissingCSN: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5CheckMissingCSN: "
"change with %s csn has not yet been seen by this
server; "
" last csn seen from that replica is %s\n",
csn_as_string (csn, PR_FALSE, csnStr),
@@ -5866,7 +5869,7 @@ static int _cl5CheckMissingCSN (const CSN *csn, const RUV
*supplierRuv, CL5DBFil
if (csn_compare (csn, supplierCsn) <= 0) /* we should have the data but we
don't */
{
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
"_cl5CheckMissingCSN: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5CheckMissingCSN: "
"change with %s csn has been purged by this
server; "
"the current purge point for that replica is
%s\n",
csn_as_string (csn, PR_FALSE, csnStr),
@@ -5877,7 +5880,7 @@ static int _cl5CheckMissingCSN (const CSN *csn, const RUV
*supplierRuv, CL5DBFil
else
{
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
"_cl5CheckMissingCSN: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5CheckMissingCSN: "
"change with %s csn has not yet been seen by
this server; "
" last csn seen from that replica is %s\n",
csn_as_string (csn, PR_FALSE, csnStr),
@@ -5926,7 +5929,7 @@ _cl5FileName2Replica (const char *file_name, Object **replica)
len = strlen (file_gen);
if (len <= extlen + 1)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5FileName2Replica "
"invalid file name (%s)\n", file_name);
}
@@ -5943,7 +5946,7 @@ _cl5FileName2Replica (const char *file_name, Object **replica)
PR_ASSERT (repl_gen);
if (strcmp (file_gen, repl_gen) != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5FileName2Replica "
"replica generation mismatch for replica at (%s),
"
"file generation %s, new replica generation
%s\n",
@@ -5959,7 +5962,7 @@ _cl5FileName2Replica (const char *file_name, Object **replica)
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
"_cl5FileName2Replica "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5FileName2Replica "
"malformed file name - %s\n", file_name);
}
@@ -6041,7 +6044,7 @@ static int _cl5DBOpenFileByReplicaName (const char *replName, const
char *replGe
slapi_ch_free((void **)&file_name);
if (tmpObj) /* this file already exist */
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5DBOpenFileByReplicaName: Found DB object %p for replica %s\n",
tmpObj, replName);
/* if we were asked for file handle - keep the handle */
if (obj)
@@ -6072,7 +6075,7 @@ static int _cl5DBOpenFileByReplicaName (const char *replName, const
char *replGe
rc = _cl5ReadRUV (replGen, tmpObj, PR_TRUE);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5DBOpenFileByReplicaName: failed to get purge RUV\n");
goto done;
}
@@ -6081,7 +6084,7 @@ static int _cl5DBOpenFileByReplicaName (const char *replName, const
char *replGe
rc = _cl5ReadRUV (replGen, tmpObj, PR_FALSE);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5DBOpenFileByReplicaName: failed to get upper bound RUV\n");
goto done;
}
@@ -6089,7 +6092,7 @@ static int _cl5DBOpenFileByReplicaName (const char *replName, const
char *replGe
/* Mark the DB File initialize */
_cl5DBFileInitialized(tmpObj);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5DBOpenFileByReplicaName: created new DB object %p\n", tmpObj);
if (obj)
{
@@ -6129,7 +6132,7 @@ static int _cl5AddDBFile (CL5DBFile *file, Object **obj)
rc = objset_add_obj(s_cl5Desc.dbFiles, tmpObj);
if (rc != OBJSET_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5AddDBFile: failed to add db file to the list; "
"repl_objset error - %d\n", rc);
object_release (tmpObj);
@@ -6137,7 +6140,7 @@ static int _cl5AddDBFile (CL5DBFile *file, Object **obj)
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5AddDBFile: Added new DB object %p\n", tmpObj);
}
@@ -6164,7 +6167,7 @@ static int _cl5NewDBFile (const char *replName, const char *replGen,
CL5DBFile**
PR_ASSERT (replName && replGen && dbFile);
if (!dbFile) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5NewDBFile: NULL dbFile\n");
return CL5_UNKNOWN_ERROR;
}
@@ -6172,7 +6175,7 @@ static int _cl5NewDBFile (const char *replName, const char *replGen,
CL5DBFile**
(*dbFile) = (CL5DBFile *)slapi_ch_calloc (1, sizeof (CL5DBFile));
if (*dbFile == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5NewDBFile: memory allocation failed\n");
return CL5_MEMORY_ERROR;
}
@@ -6215,7 +6218,7 @@ static int _cl5NewDBFile (const char *replName, const char *replGen,
CL5DBFile**
out:
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5NewDBFile: db_open failed; db error - %d %s\n",
rc, db_strerror(rc));
rc = CL5_DB_ERROR;
@@ -6263,12 +6266,12 @@ out:
if ( semadir != NULL )
{
(*dbFile)->semaName = slapi_ch_smprintf("%s/%s.sema", semadir, replName);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5NewDBFile: semaphore %s\n", (*dbFile)->semaName);
(*dbFile)->sema = PR_OpenSemaphore((*dbFile)->semaName,
PR_SEM_CREATE | PR_SEM_EXCL, 0666,
s_cl5Desc.dbConfig.maxConcurrentWrites );
- slapi_log_error (SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5NewDBFile:
maxConcurrentWrites=%d\n", s_cl5Desc.dbConfig.maxConcurrentWrites );
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "_cl5NewDBFile:
maxConcurrentWrites=%d\n", s_cl5Desc.dbConfig.maxConcurrentWrites );
}
if ((*dbFile)->sema == NULL )
@@ -6282,7 +6285,7 @@ out:
PR_DeleteSemaphore((*dbFile)->semaName);
prerr = PR_GetError();
if (PR_SUCCESS != prerr) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5NewDBFile: PR_DeleteSemaphore: %s; NSPR error -
%d\n",
(*dbFile)->semaName ? (*dbFile)->semaName : "(nil)",
prerr);
}
@@ -6297,14 +6300,14 @@ out:
{
PRErrorCode prerr = PR_GetError();
if (PR_FILE_EXISTS_ERROR == prerr) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5NewDBFile: PR_OpenSemaphore: %s; sema: 0x%p, NSPR error -
%d\n",
(*dbFile)->semaName ? (*dbFile)->semaName : "(nil)",
(*dbFile)->sema, prerr);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
" : Leftover semaphores may exist. "
"Run \"ipcs -s\", and remove them with \"ipcrm -s
<SEMID>\" if any\n");
} else {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5NewDBFile: failed to create semaphore %s; NSPR error -
%d\n",
(*dbFile)->semaName ? (*dbFile)->semaName : "(nil)",
prerr);
}
@@ -6323,7 +6326,7 @@ out:
rc = _cl5GetEntryCount (*dbFile);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5NewDBFile: failed to get entry count\n");
goto done;
}
@@ -6353,7 +6356,7 @@ static void _cl5DBCloseFile (void **data)
PR_ASSERT (file);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBCloseFile: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "_cl5DBCloseFile:
"
"Closing database %s\n", file->name);
/* close the file */
@@ -6369,7 +6372,7 @@ static void _cl5DBCloseFile (void **data)
/* close the db */
if (file->db) {
rc = file->db->close(file->db, 0);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5DBCloseFile: "
"Closed the changelog database handle for %s "
"(rc: %d)\n", file->name, rc);
@@ -6380,18 +6383,18 @@ static void _cl5DBCloseFile (void **data)
{
/* We need to use the libdb API to delete the files, otherwise we'll
* run into problems when we try to checkpoint transactions later. */
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBCloseFile: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5DBCloseFile: "
"removing the changelog %s (flag %d)\n",
file->name, DEFAULT_DB_ENV_OP_FLAGS);
rc = s_cl5Desc.dbEnv->dbremove(s_cl5Desc.dbEnv, 0, file->name, 0,
DEFAULT_DB_ENV_OP_FLAGS);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBCloseFile: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "_cl5DBCloseFile:
"
"failed to remove (%s) file; libdb error - %d (%s)\n",
file->name, rc, db_strerror(rc));
} else {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBCloseFile: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "_cl5DBCloseFile:
"
"Deleted the changelog database file %s\n", file->name);
}
@@ -6425,14 +6428,14 @@ static int _cl5GetDBFile (Object *replica, Object **obj)
*obj = objset_find(s_cl5Desc.dbFiles, _cl5CompareDBFile, fileName);
if (*obj)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5GetDBFile: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "_cl5GetDBFile:
"
"found DB object %p for database %s\n", *obj, fileName);
slapi_ch_free_string(&fileName);
return CL5_SUCCESS;
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5GetDBFile: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "_cl5GetDBFile:
"
"no DB object found for database %s\n", fileName);
slapi_ch_free_string(&fileName);
return CL5_NOTFOUND;
@@ -6451,14 +6454,14 @@ static int _cl5GetDBFileByReplicaName (const char *replName, const
char *replGen
*obj = objset_find(s_cl5Desc.dbFiles, _cl5CompareDBFile, fileName);
if (*obj)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5GetDBFileByReplicaName:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5GetDBFileByReplicaName: "
"found DB object %p for database %s\n", *obj, fileName);
slapi_ch_free_string(&fileName);
return CL5_SUCCESS;
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5GetDBFileByReplicaName:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"_cl5GetDBFileByReplicaName: "
"no DB object found for database %s\n", fileName);
slapi_ch_free_string(&fileName);
return CL5_NOTFOUND;
@@ -6477,10 +6480,10 @@ static void _cl5DBDeleteFile (Object *obj)
file->flags |= DB_FILE_DELETED;
rc = objset_remove_obj(s_cl5Desc.dbFiles, obj);
if (rc != OBJSET_SUCCESS) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBDeleteFile: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "_cl5DBDeleteFile:
"
"could not find DB object %p\n", obj);
} else {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBDeleteFile: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "_cl5DBDeleteFile:
"
"removed DB object %p\n", obj);
}
object_release (obj);
@@ -6562,7 +6565,7 @@ static int _cl5ExportFile (PRFileDesc *prFile, Object *obj)
rc = _cl5Operation2LDIF (&op, file->replGen, &buff, &len);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5ExportFile: failed to convert operation to ldif\n");
operation_parameters_done (&op);
break;
@@ -6572,7 +6575,7 @@ static int _cl5ExportFile (PRFileDesc *prFile, Object *obj)
slapi_ch_free((void **)&buff);
if (wlen < len)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5ExportFile: failed to write to ldif file\n");
rc = CL5_SYSTEM_ERROR;
operation_parameters_done (&op);
@@ -6591,7 +6594,7 @@ static int _cl5ExportFile (PRFileDesc *prFile, Object *obj)
if (rc != CL5_NOTFOUND)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"_cl5ExportFile: failed to retrieve changelog entry\n");
}
else
@@ -6698,7 +6701,7 @@ cl5_diskspace_is_available()
struct statvfs fsbuf;
if (statvfs(s_cl5Desc.dbDir, &fsbuf) < 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5_diskspace_is_available: Cannot get file system info\n");
rval = 0;
}
@@ -6707,7 +6710,7 @@ cl5_diskspace_is_available()
unsigned long fsiz = fsbuf.f_bavail * fsbuf.f_frsize;
if (fsiz < NO_DISK_SPACE)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5_diskspace_is_available: No enough diskspace for changelog: (%u
bytes free)\n", fsiz);
rval = 0;
}
@@ -6722,7 +6725,7 @@ cl5_diskspace_is_available()
struct statfs fsbuf;
if (statfs(s_cl5Desc.dbDir, &fsbuf) < 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5_diskspace_is_available: Cannot get file system info\n");
rval = 0;
}
@@ -6731,7 +6734,7 @@ cl5_diskspace_is_available()
unsigned long fsiz = fsbuf.f_bavail * fsbuf.f_bsize;
if (fsiz < NO_DISK_SPACE)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5_diskspace_is_available: No enough diskspace for changelog: (%lu
bytes free)\n", fsiz);
rval = 0;
}
@@ -6818,7 +6821,7 @@ cl5WriteRUV()
* And the server IS running.
* RUVs are not in the changelog and no easy way to retrieve them.
* bail out - return failure */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5WriteRUV: server (pid %d) is already running;
bail.\n",
slapd_pid);
rc = 1;
@@ -6830,7 +6833,7 @@ cl5WriteRUV()
if (CL5_STATE_OPEN != s_cl5Desc.dbState) {
rc = _cl5Open(config.dir, &config.dbconfig, CL5_OPEN_NORMAL);
if (rc != CL5_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5WriteRUV: failed to open changelog\n");
goto bail;
}
@@ -6898,7 +6901,7 @@ cl5DeleteRUV()
* And the server IS running.
* RUVs are not in the changelog.
* bail out - return success */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5DeleteRUV: server (pid %d) is already running;
bail.\n",
slapd_pid);
goto bail;
@@ -6909,7 +6912,7 @@ cl5DeleteRUV()
if (CL5_STATE_OPEN != s_cl5Desc.dbState) {
rc = _cl5Open(config.dir, &config.dbconfig, CL5_OPEN_NORMAL);
if (rc != CL5_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5DeleteRUV: failed to open changelog\n");
goto bail;
}
@@ -6925,20 +6928,20 @@ cl5DeleteRUV()
rc = _cl5GetEntryCount(dbfile);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"cl5DeleteRUV: failed to get/delete entry
count\n");
goto bail;
}
/* _cl5ReadRUV deletes RUV after reading it */
rc = _cl5ReadRUV (dbfile->replGen, file_obj, PR_TRUE);
if (rc != CL5_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5DeleteRUV: failed to read/delete purge RUV\n");
goto bail;
}
rc = _cl5ReadRUV (dbfile->replGen, file_obj, PR_FALSE);
if (rc != CL5_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"cl5DeleteRUV: failed to read/delete upper bound
RUV\n");
goto bail;
}
@@ -6987,7 +6990,7 @@ void trigger_cl_purging(Replica *replica){
(void *)replica, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD, DEFAULT_THREAD_STACKSIZE);
if (NULL == trim_tid){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"trigger_cl_purging: failed to create trimming "
"thread; NSPR error - %d\n", PR_GetError ());
} else {
@@ -7012,7 +7015,7 @@ trigger_cl_purging_thread(void *arg){
/* Bump the changelog thread count */
if (CL5_SUCCESS != _cl5AddThread()) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"trigger_cl_purging: Abort - failed to increment thread count "
"NSPR error - %d\n", PR_GetError ());
return;
@@ -7021,7 +7024,7 @@ trigger_cl_purging_thread(void *arg){
/* Purge the changelog */
_cl5DoPurging(replica);
_cl5RemoveThread();
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"trigger_cl_purging: purged changelog for (%s) rid (%d)\n",
slapi_sdn_get_dn(replica_get_root(replica)), replica_get_rid(replica));
}
diff --git a/ldap/servers/plugins/replication/cl5_clcache.c
b/ldap/servers/plugins/replication/cl5_clcache.c
index a7544a6..c7aec92 100644
--- a/ldap/servers/plugins/replication/cl5_clcache.c
+++ b/ldap/servers/plugins/replication/cl5_clcache.c
@@ -221,9 +221,9 @@ clcache_get_buffer ( CLC_Buffer **buf, DB *db, ReplicaId consumer_rid,
const RUV
need_new = (!_pool || !_pool->pl_busy_lists ||
!_pool->pl_busy_lists->bl_buffers);
if ( (!need_new) && (NULL != ( *buf = (CLC_Buffer*) get_thread_private_cache()))
) {
- slapi_log_error ( SLAPI_LOG_REPL, get_thread_private_agmtname(),
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, get_thread_private_agmtname(),
"clcache_get_buffer: found thread private buffer cache %p\n", *buf);
- slapi_log_error ( SLAPI_LOG_REPL, get_thread_private_agmtname(),
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, get_thread_private_agmtname(),
"clcache_get_buffer: _pool is %p _pool->pl_busy_lists is %p
_pool->pl_busy_lists->bl_buffers is %p\n",
_pool, _pool ? _pool->pl_busy_lists : NULL,
(_pool && _pool->pl_busy_lists) ?
_pool->pl_busy_lists->bl_buffers : NULL);
@@ -274,7 +274,7 @@ clcache_get_buffer ( CLC_Buffer **buf, DB *db, ReplicaId consumer_rid,
const RUV
csn_free(&l_csn);
}
else {
- slapi_log_error ( SLAPI_LOG_FATAL, get_thread_private_agmtname(),
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, get_thread_private_agmtname(),
"clcache_get_buffer: can't allocate new buffer\n" );
rc = CL5_MEMORY_ERROR;
}
@@ -290,7 +290,7 @@ clcache_return_buffer ( CLC_Buffer **buf )
{
int i;
- slapi_log_error ( SLAPI_LOG_REPL, (*buf)->buf_agmt_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, (*buf)->buf_agmt_name,
"session end: state=%d load=%d sent=%d skipped=%d skipped_new_rid=%d "
"skipped_csn_gt_cons_maxcsn=%d skipped_up_to_date=%d "
"skipped_csn_gt_ruv=%d skipped_csn_covered=%d\n",
@@ -353,7 +353,7 @@ clcache_load_buffer ( CLC_Buffer *buf, CSN **anchorCSN )
}
}
else {
- slapi_log_error ( SLAPI_LOG_FATAL, buf->buf_agmt_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, buf->buf_agmt_name,
"Can't locate CSN %s in the changelog (DB rc=%d). If replication stops, the
consumer may need to be reinitialized.\n",
(char*)buf->buf_key.data, rc );
}
@@ -362,7 +362,7 @@ clcache_load_buffer ( CLC_Buffer *buf, CSN **anchorCSN )
}
if ( rc != 0 ) {
- slapi_log_error ( SLAPI_LOG_REPL, buf->buf_agmt_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, buf->buf_agmt_name,
"clcache_load_buffer: rc=%d\n", rc );
}
@@ -385,12 +385,12 @@ clcache_load_buffer_bulk ( CLC_Buffer *buf, int flag )
#endif
if (NULL == buf) {
- slapi_log_error ( SLAPI_LOG_FATAL, "clcache_load_buffer_bulk",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "clcache_load_buffer_bulk",
"NULL buf\n" );
return rc;
}
if (NULL == buf->buf_busy_list) {
- slapi_log_error ( SLAPI_LOG_FATAL, "clcache_load_buffer_bulk",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "clcache_load_buffer_bulk",
"%s%sno buf_busy_list\n",
buf->buf_agmt_name?buf->buf_agmt_name:"",
buf->buf_agmt_name?": ":"" );
@@ -413,7 +413,7 @@ retry:
* 2. try to find another starting position as close
* as possible
*/
- slapi_log_error ( SLAPI_LOG_FATAL, "clcache_load_buffer_bulk",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "clcache_load_buffer_bulk",
"changelog record with csn (%s) not found for DB_NEXT\n",
(char *)buf->buf_key.data );
rc = cursor->c_get ( cursor, & buf->buf_key, & buf->buf_data,
@@ -433,7 +433,7 @@ retry:
if ( 0 == rc || DB_BUFFER_SMALL == rc ) {
rc = clcache_cursor_get ( cursor, buf, use_flag );
if ( rc == DB_NOTFOUND && use_flag == DB_SET) {
- slapi_log_error ( SLAPI_LOG_FATAL, "clcache_load_buffer_bulk",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "clcache_load_buffer_bulk",
"changelog record with csn (%s) not found for DB_SET\n",
(char *)buf->buf_key.data );
rc = clcache_cursor_get ( cursor, buf, DB_SET_RANGE );
@@ -454,7 +454,7 @@ retry:
PRIntervalTime interval;
tries++;
- slapi_log_error ( SLAPI_LOG_TRACE, "clcache_load_buffer_bulk",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "clcache_load_buffer_bulk",
"deadlock number [%d] - retrying\n", tries );
/* back off */
interval = PR_MillisecondsToInterval(slapi_rand() % 100);
@@ -463,7 +463,7 @@ retry:
goto retry;
}
if ((rc == DB_LOCK_DEADLOCK) && (tries >= MAX_TRIALS)) {
- slapi_log_error ( SLAPI_LOG_REPL, "clcache_load_buffer_bulk",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "clcache_load_buffer_bulk",
"could not load buffer from changelog after %d tries\n",
tries );
}
@@ -535,7 +535,7 @@ clcache_get_next_change ( CLC_Buffer *buf, void **key, size_t *keylen,
void **da
}
else {
*csn = buf->buf_current_csn;
- slapi_log_error ( SLAPI_LOG_REPL, buf->buf_agmt_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, buf->buf_agmt_name,
"load=%d rec=%d csn=%s\n",
buf->buf_load_cnt, buf->buf_record_cnt, (char*)*key );
}
@@ -649,7 +649,7 @@ clcache_initial_anchorcsn ( CLC_Buffer *buf, int *flag )
csn_as_string(cscb->local_maxcsn, 0, local);
csn_as_string(buf->buf_current_csn, 0, curr);
csn_as_string(cscb->consumer_maxcsn, 0, conmaxcsn);
- slapi_log_error(SLAPI_LOG_REPL, "clcache_initial_anchorcsn" ,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "clcache_initial_anchorcsn" ,
"%s - (cscb %d - state %d) - csnPrevMax (%s) "
"csnMax (%s) csnBuf (%s) csnConsumerMax (%s)\n",
buf->buf_agmt_name, i, cscb->state, prevmax, local,
@@ -680,7 +680,7 @@ clcache_initial_anchorcsn ( CLC_Buffer *buf, int *flag )
} else {
csn_init_by_csn(buf->buf_current_csn, anchorcsn);
csn_as_string(buf->buf_current_csn, 0, (char *)buf->buf_key.data);
- slapi_log_error(SLAPI_LOG_REPL, "clcache_initial_anchorcsn",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "clcache_initial_anchorcsn",
"anchor is now: %s\n", (char *)buf->buf_key.data);
}
@@ -710,7 +710,7 @@ clcache_adjust_anchorcsn ( CLC_Buffer *buf, int *flag )
csn_as_string(cscb->local_maxcsn, 0, local);
csn_as_string(buf->buf_current_csn, 0, curr);
csn_as_string(cscb->consumer_maxcsn, 0, conmaxcsn);
- slapi_log_error(SLAPI_LOG_REPL, "clcache_adjust_anchorcsn" ,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "clcache_adjust_anchorcsn" ,
"%s - (cscb %d - state %d) - csnPrevMax (%s) "
"csnMax (%s) csnBuf (%s) csnConsumerMax (%s)\n",
buf->buf_agmt_name, i, cscb->state, prevmax, local,
@@ -754,7 +754,7 @@ clcache_adjust_anchorcsn ( CLC_Buffer *buf, int *flag )
} else {
csn_init_by_csn(buf->buf_current_csn, anchorcsn);
csn_as_string(buf->buf_current_csn, 0, (char *)buf->buf_key.data);
- slapi_log_error(SLAPI_LOG_REPL, "clcache_adjust_anchorcsn",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "clcache_adjust_anchorcsn",
"anchor is now: %s\n", (char *)buf->buf_key.data);
}
@@ -784,7 +784,7 @@ clcache_skip_change ( CLC_Buffer *buf )
if (rid == buf->buf_consumer_rid && buf->buf_ignoreConsumerRID){
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
csn_as_string(buf->buf_current_csn, 0, buf_cur_csn_str);
- slapi_log_error(SLAPI_LOG_REPL, buf->buf_agmt_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, buf->buf_agmt_name,
"Skipping update because the consumer with Rid: [%d] is "
"ignored\n", rid);
buf->buf_skipped_csn_gt_cons_maxcsn++;
@@ -794,7 +794,7 @@ clcache_skip_change ( CLC_Buffer *buf )
/* Skip helper entry (ENTRY_COUNT, PURGE_RUV and so on) */
if ( cl5HelperEntry ( NULL, buf->buf_current_csn ) == PR_TRUE ) {
- slapi_log_error ( SLAPI_LOG_REPL, buf->buf_agmt_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, buf->buf_agmt_name,
"Skip helper entry type=%ld\n", csn_get_time( buf->buf_current_csn ));
break;
}
@@ -806,7 +806,7 @@ clcache_skip_change ( CLC_Buffer *buf )
if ( i >= buf->buf_num_cscbs ) {
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
csn_as_string(buf->buf_current_csn, 0, buf_cur_csn_str);
- slapi_log_error(SLAPI_LOG_REPL, buf->buf_agmt_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, buf->buf_agmt_name,
"Skipping update because the changelog buffer current csn [%s] rid "
"[%d] is not in the list of changelog csn buffers (length %d)\n",
buf_cur_csn_str, rid, buf->buf_num_cscbs);
@@ -877,7 +877,7 @@ clcache_skip_change ( CLC_Buffer *buf )
if ( cscb->local_maxcsn )
csn_as_string ( cscb->local_maxcsn, PR_FALSE, local );
csn_as_string ( buf->buf_current_csn, PR_FALSE, current );
- slapi_log_error ( SLAPI_LOG_REPL, buf->buf_agmt_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, buf->buf_agmt_name,
"Skip %s consumer=%s local=%s\n", current, consumer, local );
}
#endif
@@ -892,7 +892,7 @@ clcache_new_cscb(void)
cscb = (struct csn_seq_ctrl_block *) slapi_ch_calloc ( 1, sizeof (struct
csn_seq_ctrl_block) );
if (cscb == NULL) {
- slapi_log_error ( SLAPI_LOG_FATAL, NULL, "clcache: malloc failure\n" );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "clcache: malloc failure\n"
);
}
return cscb;
}
@@ -1073,7 +1073,7 @@ clcache_open_cursor ( DB_TXN *txn, CLC_Buffer *buf, DBC **cursor )
rc = buf->buf_busy_list->bl_db->cursor ( buf->buf_busy_list->bl_db, txn,
cursor, 0 );
if ( rc != 0 ) {
- slapi_log_error ( SLAPI_LOG_FATAL, get_thread_private_agmtname(),
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, get_thread_private_agmtname(),
"clcache: failed to open cursor; db error - %d %s\n",
rc, db_strerror(rc));
}
@@ -1113,19 +1113,19 @@ clcache_cursor_get ( DBC *cursor, CLC_Buffer *buf, int flag )
&( buf->buf_key ),
&( buf->buf_data ),
buf->buf_load_flag | flag );
- slapi_log_error ( SLAPI_LOG_REPL, buf->buf_agmt_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, buf->buf_agmt_name,
"clcache: (%d | %d) buf key len %d reallocated and retry returns %d\n",
buf->buf_load_flag, flag, buf->buf_key.size, rc );
}
}
switch ( rc ) {
case EINVAL:
- slapi_log_error ( SLAPI_LOG_FATAL, buf->buf_agmt_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, buf->buf_agmt_name,
"clcache_cursor_get: invalid parameter\n" );
break;
case DB_BUFFER_SMALL:
- slapi_log_error ( SLAPI_LOG_FATAL, buf->buf_agmt_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, buf->buf_agmt_name,
"clcache_cursor_get: can't allocate %u bytes\n", buf->buf_data.ulen
);
break;
diff --git a/ldap/servers/plugins/replication/cl5_config.c
b/ldap/servers/plugins/replication/cl5_config.c
index b677c0d..8bdec68 100644
--- a/ldap/servers/plugins/replication/cl5_config.c
+++ b/ldap/servers/plugins/replication/cl5_config.c
@@ -55,7 +55,7 @@ int changelog5_config_init()
}
if (s_configLock == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_config_init: failed to create configurationlock; "
"NSPR error - %d\n",PR_GetError ());
return 1;
@@ -165,7 +165,7 @@ changelog5_config_add (Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry*
entryAfter
strcpy (returntext, "attempt to add changelog when it already exists");
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_config_add: changelog already exist; "
"request ignored\n");
goto done;
@@ -180,7 +180,7 @@ changelog5_config_add (Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry*
entryAfter
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "NULL changelog
directory");
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_config_add: NULL changelog directory\n");
goto done;
}
@@ -209,7 +209,7 @@ changelog5_config_add (Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry*
entryAfter
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "failed to start changelog;
error - %d", rc);
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_config_add: failed to start changelog\n");
goto done;
}
@@ -223,7 +223,7 @@ changelog5_config_add (Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry*
entryAfter
{
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "failed to configure
changelog trimming; error - %d", rc);
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_config_add: failed to configure changelog trimming\n");
goto done;
}
@@ -273,7 +273,7 @@ changelog5_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entr
strcpy (returntext, "changelog is not configured");
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_config_modify: changelog is not configured\n");
return SLAPI_DSE_CALLBACK_ERROR;
}
@@ -289,7 +289,7 @@ changelog5_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entr
strcpy (returntext, "changelog is not configured");
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_config_modify: changelog is not configured\n");
goto done;
}
@@ -492,7 +492,7 @@ changelog5_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entr
/* changelog directory changed - need to remove the
previous changelog and create new one */
- slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name_cl,
"changelog5_config_modify: changelog directory changed; "
"old dir - %s, new dir - %s; recreating changelog.\n",
currentDir, config.dir);
@@ -506,11 +506,11 @@ changelog5_config_modify (Slapi_PBlock *pb, Slapi_Entry*
entryBefore, Slapi_Entr
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "failed to close changelog;
error - %d", rc);
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_config_modify: failed to close changelog\n");
goto done;
} else {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"changelog5_config_modify: closed the changelog\n");
}
@@ -523,11 +523,11 @@ changelog5_config_modify (Slapi_PBlock *pb, Slapi_Entry*
entryBefore, Slapi_Entr
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "failed to remove
changelog; error - %d", rc);
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_config_modify: failed to remove changelog\n");
goto done;
} else {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"changelog5_config_modify: deleted the changelog at %s\n",
currentDir);
}
@@ -540,17 +540,17 @@ changelog5_config_modify (Slapi_PBlock *pb, Slapi_Entry*
entryBefore, Slapi_Entr
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "failed to restart
changelog; error - %d", rc);
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_config_modify: failed to restart changelog\n");
/* before finishing, let's try to do some error recovery */
if (CL5_SUCCESS != cl5Open(currentDir, &config.dbconfig))
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_config_modify: failed to restore previous changelog\n");
}
goto done;
} else {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
"changelog5_config_modify: opened the changelog at %s\n", config.dir);
}
}
@@ -570,7 +570,7 @@ changelog5_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entr
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "failed to configure
changelog trimming; error - %d", rc);
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_config_modify: failed to configure changelog trimming\n");
goto done;
}
@@ -616,7 +616,7 @@ changelog5_config_delete (Slapi_PBlock *pb, Slapi_Entry* e,
Slapi_Entry* entryAf
PL_strncpyz(returntext, "changelog is not configured",
SLAPI_DSE_RETURNTEXT_SIZE);
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_config_delete: chagelog is not configured\n");
return SLAPI_DSE_CALLBACK_ERROR;
}
@@ -632,7 +632,7 @@ changelog5_config_delete (Slapi_PBlock *pb, Slapi_Entry* e,
Slapi_Entry* entryAf
PL_strncpyz(returntext, "changelog is not configured",
SLAPI_DSE_RETURNTEXT_SIZE);
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_config_delete: chagelog is not configured\n");
goto done;
}
@@ -648,7 +648,7 @@ changelog5_config_delete (Slapi_PBlock *pb, Slapi_Entry* e,
Slapi_Entry* entryAf
PL_strncpyz (returntext, "internal failure", SLAPI_DSE_RETURNTEXT_SIZE);
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_config_delete: NULL directory\n");
goto done;
}
@@ -664,7 +664,7 @@ changelog5_config_delete (Slapi_PBlock *pb, Slapi_Entry* e,
Slapi_Entry* entryAf
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "failed to close changelog;
error - %d", rc);
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_config_delete: failed to close changelog\n");
goto done;
}
@@ -678,7 +678,7 @@ changelog5_config_delete (Slapi_PBlock *pb, Slapi_Entry* e,
Slapi_Entry* entryAf
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "failed to remove changelog;
error - %d", rc);
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_config_delete: failed to remove changelog\n");
goto done;
}
@@ -753,7 +753,7 @@ static void changelog5_extract_config(Slapi_Entry* entry,
changelog5Config *conf
if (slapi_is_duration_valid(arg)) {
config->compactInterval = (long)slapi_parse_duration(arg);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_extract_config: %s: invalid value \"%s\", ignoring the
change.\n",
CONFIG_CHANGELOG_COMPACTDB_ATTRIBUTE, arg);
}
@@ -770,7 +770,7 @@ static void changelog5_extract_config(Slapi_Entry* entry,
changelog5Config *conf
if (slapi_is_duration_valid(arg)) {
config->trimInterval = (long)slapi_parse_duration(arg);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_extract_config: %s: invalid value \"%s\", ignoring the
change.\n",
CONFIG_CHANGELOG_TRIM_ATTRIBUTE, arg);
config->trimInterval = CHANGELOGDB_TRIM_INTERVAL;
@@ -787,7 +787,7 @@ static void changelog5_extract_config(Slapi_Entry* entry,
changelog5Config *conf
if (slapi_is_duration_valid(arg)) {
config->maxAge = arg;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_extract_config: %s: invalid value \"%s\", ignoring the
change.\n",
CONFIG_CHANGELOG_MAXAGE_ATTRIBUTE, arg);
slapi_ch_free_string(&arg);
diff --git a/ldap/servers/plugins/replication/cl5_init.c
b/ldap/servers/plugins/replication/cl5_init.c
index c948fc7..67b37f6 100644
--- a/ldap/servers/plugins/replication/cl5_init.c
+++ b/ldap/servers/plugins/replication/cl5_init.c
@@ -29,7 +29,7 @@ int changelog5_init()
rc = cl5Init ();
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_init: failed to initialize changelog\n");
return 1;
}
@@ -51,7 +51,7 @@ int changelog5_init()
rc = cl5Open (config.dir, &config.dbconfig);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_init: failed to start changelog at %s\n",
config.dir);
rc = 1;
@@ -62,7 +62,7 @@ int changelog5_init()
rc = cl5ConfigTrimming (config.maxEntries, config.maxAge, config.compactInterval,
config.trimInterval);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"changelog5_init: failed to configure changelog trimming\n");
rc = 1;
goto done;
diff --git a/ldap/servers/plugins/replication/cl5_test.c
b/ldap/servers/plugins/replication/cl5_test.c
index 90c2591..67fe294 100644
--- a/ldap/servers/plugins/replication/cl5_test.c
+++ b/ldap/servers/plugins/replication/cl5_test.c
@@ -74,7 +74,7 @@ static void testBasic ()
{
int rc = 0;
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "Starting basic test
...\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Starting basic test
...\n");
/* ONREPL - we can't run the tests from the startup code because
operations can't be issued until all plugins are started. So,
@@ -90,10 +90,10 @@ static void testBasic ()
}
if (rc == 0)
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"Basic test completed successfully\n");
else
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"Basic test failed\n");
}
@@ -104,7 +104,7 @@ static void testBackupRestore ()
char *baseDir;
char bkDir [MAXPATHLEN];
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "Starting backup and recovery
test ...\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Starting backup and
recovery test ...\n");
dir = cl5GetDir ();
@@ -127,10 +127,10 @@ static void testBackupRestore ()
}
if (rc == CL5_SUCCESS)
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"Backup and Restore test completed successfully\n");
else
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"Backup and Restore test failed\n");
}
@@ -146,7 +146,7 @@ static void testIteration ()
int rc;
int i;
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "Starting iteration test
...\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Starting iteration
test ...\n");
/* get replica object */
r_root = slapi_sdn_new_dn_byval(REPLICA_ROOT);
@@ -154,12 +154,12 @@ static void testIteration ()
slapi_sdn_free (&r_root);
if (r_obj == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "replica is not
configured for (%s)\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "replica is
not configured for (%s)\n",
REPLICA_ROOT);
return;
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "Starting first iteration
pass ...\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Starting first
iteration pass ...\n");
/* configure empty consumer ruv */
r = (Replica*)object_get_data (r_obj);
@@ -186,16 +186,16 @@ static void testIteration ()
if (rc == CL5_NOTFOUND)
{
if (i == 0) /* success */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "First iteration pass
completed "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "First
iteration pass completed "
"successfully: no changes to replay\n");
else /* incorrect number of entries traversed */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "First iteration pass
failed: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "First
iteration pass failed: "
"traversed %d entries; expected none\n", i);
}
else /* general error */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "First iteration pass
failed\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "First iteration
pass failed\n");
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "Starting second iteration
pass ...\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Starting second
iteration pass ...\n");
/* add some entries */
populateChangelogOp ();
@@ -219,16 +219,16 @@ static void testIteration ()
if (rc == CL5_NOTFOUND)
{
if (i == OP_COUNT) /* success */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "Second iteration pass
completed "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Second
iteration pass completed "
"successfully: %d entries traversed\n", i);
else /* incorrect number of entries traversed */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "Second iteration pass
failed: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Second
iteration pass failed: "
"traversed %d entries; expected %d\n", i, OP_COUNT);
}
else /* general error */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "Second iteration pass
failed\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Second iteration
pass failed\n");
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "Starting third iteration
pass ...\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Starting third
iteration pass ...\n");
/* add more entries */
populateChangelogOp ();
@@ -251,16 +251,16 @@ static void testIteration ()
if (rc == CL5_NOTFOUND)
{
if (i == OP_COUNT) /* success */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "Third iteration pass
completed "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Third
iteration pass completed "
"successfully: %d entries traversed\n", i);
else /* incorrect number of entries traversed */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "Third iteration pass
failed: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Third
iteration pass failed: "
"traversed %d entries; expected %d\n", i, OP_COUNT);
}
else /* general error */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "Second iteration pass
failed\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Second iteration
pass failed\n");
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "Iteration test is
complete\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Iteration test
is complete\n");
ruv_destroy (&ruv);
object_release (r_obj);
@@ -273,7 +273,7 @@ static void testTrimming ()
int count;
int rc;
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "Starting trimming test
...\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Starting trimming
test ...\n");
rc = populateChangelog (200, NULL);
@@ -288,7 +288,7 @@ static void testTrimming ()
rc = cl5ConfigTrimming (300, "1d", CHANGELOGDB_COMPACT_INTERVAL,
CHANGELOGDB_TRIM_INTERVAL);
interval = PR_SecondsToInterval(300); /* 5 min is default trimming interval */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"Trimming test: sleeping for 5 minutes until trimming kicks in\n");
DS_Sleep (interval);
@@ -297,17 +297,17 @@ static void testTrimming ()
if (rc == 0 && count == 300)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"Trimming test completed successfully: changelog contains 300 entries\n");
}
else if (rc == 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"Trimming test failed: changelog contains %d entries; expected - 300\n",
count);
}
else /* general failure */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "Trimming test
failed\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Trimming test
failed\n");
}
static void testPerformance ()
@@ -324,7 +324,7 @@ static void testPerformance ()
endtime = PR_Now();
totaltime = (endtime - starttime) / 1000; /* ms */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "Write performance:\n"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Write
performance:\n"
"entry count - %d, total time - %ldms\n"
"latency = %d msec\nthroughput = %d entry/sec\n",
entryCount, totaltime,
@@ -338,7 +338,7 @@ static void testPerformance ()
endtime = PR_Now();
totaltime = (endtime - starttime) / 1000; /* ms */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "Read performance:\n"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Read
performance:\n"
"entry count - %d, total time - %ld\n"
"latency = %d msec\nthroughput = %d entry/sec\n",
entryCount, totaltime,
@@ -375,7 +375,7 @@ static void testPerformanceMT ()
endtime = PR_Now();
totaltime = (endtime - starttime) / 1000; /* ms */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "Write performance:\n"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Write
performance:\n"
"entry count - %d, total time - %ld\n"
"latency = %d msec per entry\nthroughput = %d entry/sec\n",
entryCount, totaltime,
@@ -390,7 +390,7 @@ static void testPerformanceMT ()
endtime = PR_Now();
totaltime = (endtime - starttime) / 1000; /* ms */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "Read performance:\n"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Read
performance:\n"
"entry count - %d, total time - %ld\n"
"latency = %d msec per entry\nthroughput = %d entry/sec\n",
entryCount, totaltime,
@@ -404,7 +404,7 @@ static void testLDIF ()
char *baseDir;
char ldifFile [MAXPATHLEN];
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "Starting LDIF test
...\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Starting LDIF test
...\n");
baseDir = getBaseDir (clDir);
PR_snprintf (ldifFile, sizeof(ldifFile), "%s/cl5.ldif", baseDir);
@@ -426,10 +426,10 @@ static void testLDIF ()
PR_Delete (ldifFile);
if (rc == CL5_SUCCESS)
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"LDIF test completed successfully\n");
else
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "LDIF test failed\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "LDIF test
failed\n");
}
static void testAll ()
@@ -448,11 +448,11 @@ static void testAll ()
/* xxxPINAKI */
/* these tests are not working correctly...the call to db->put() */
/* just hangs forever */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"Starting single threaded performance measurement ...\n");
testPerformance ();
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"Starting multi threaded performance measurement ...\n");
testPerformanceMT ();
#endif
@@ -523,7 +523,7 @@ static int populateChangelog (int entryCount, CSN ***csnList)
return -1;
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"Successfully populated changelog with %d entries\n", entryCount);
return 0;
}
@@ -547,7 +547,7 @@ static int processEntries (int entryCount, CSN **csnList)
operation_parameters_done (&op);
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
"Successfully read %d entries from the changelog\n", entryCount);
return 0;
}
@@ -660,7 +660,7 @@ static int configureChangelog ()
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if (rc != LDAP_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "failed to get server
instance "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "failed to
get server instance "
"directory; LDAP error - %d\n", rc);
rc = -1;
goto done;
@@ -684,7 +684,7 @@ static int configureChangelog ()
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if (rc != LDAP_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "failed to add
changelog "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "failed to
add changelog "
"configuration entry; LDAP error - %d\n", rc);
rc = -1;
}
@@ -738,7 +738,7 @@ static int configureReplica ()
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if (rc != LDAP_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "failed to add replica
for (%s) "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "failed to
add replica for (%s) "
"configuration entry; LDAP error - %d\n", REPLICA_ROOT,
rc);
rc = -1;
}
@@ -777,7 +777,7 @@ static int populateChangelogOp ()
slapi_pblock_destroy (pb);
if (rc != LDAP_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "failed to add entry
(%s); "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "failed to
add entry (%s); "
"LDAP error - %d\n", dn, rc);
return -1;
}
@@ -800,7 +800,7 @@ static int populateChangelogOp ()
slapi_pblock_destroy (pb);
if (rc != LDAP_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "failed to modify
entry (%s); "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "failed to
modify entry (%s); "
"LDAP error - %d\n", dn, rc);
return -1;
}
@@ -816,7 +816,7 @@ static int populateChangelogOp ()
slapi_pblock_destroy (pb);
if (rc != LDAP_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "failed to rename
entry (%s); "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "failed to
rename entry (%s); "
"LDAP error - %d\n", dn, rc);
return -1;
}
@@ -831,7 +831,7 @@ static int populateChangelogOp ()
slapi_pblock_destroy (pb);
if (rc != LDAP_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, "failed to delete
entry (%s); "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "failed to
delete entry (%s); "
"LDAP error - %d\n", dn, rc);
return -1;
}
diff --git a/ldap/servers/plugins/replication/cl_crypt.c
b/ldap/servers/plugins/replication/cl_crypt.c
index 68f836e..9cad620 100644
--- a/ldap/servers/plugins/replication/cl_crypt.c
+++ b/ldap/servers/plugins/replication/cl_crypt.c
@@ -37,7 +37,7 @@ clcrypt_init(const CL5DBConfig *config, void **clcrypt_handle)
Slapi_Backend *be = NULL;
back_info_crypt_init crypt_init = {0};
- slapi_log_error(SLAPI_LOG_TRACE, repl_plugin_name, "->
clcrypt_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, repl_plugin_name, "->
clcrypt_init\n");
/* Encryption is not specified */
if (!config->encryptionAlgorithm || !clcrypt_handle) {
goto bail;
@@ -64,7 +64,7 @@ clcrypt_init(const CL5DBConfig *config, void **clcrypt_handle)
rc = 1;
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, repl_plugin_name,
"<- clcrypt_init : %d\n", rc);
return rc;
}
@@ -86,7 +86,7 @@ clcrypt_encrypt_value(void *clcrypt_handle,
Slapi_Backend *be = NULL;
back_info_crypt_value crypt_value = {0};
- slapi_log_error(SLAPI_LOG_TRACE, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, repl_plugin_name,
"-> clcrypt_encrypt_value\n");
if (NULL == out) {
goto bail;
@@ -116,7 +116,7 @@ clcrypt_encrypt_value(void *clcrypt_handle,
rc = -1;
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, repl_plugin_name,
"<- clcrypt_encrypt_entry (returning %d)\n", rc);
return rc;
}
@@ -138,7 +138,7 @@ clcrypt_decrypt_value(void *clcrypt_handle,
Slapi_Backend *be = NULL;
back_info_crypt_value crypt_value = {0};
- slapi_log_error(SLAPI_LOG_TRACE, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, repl_plugin_name,
"-> clcrypt_decrypt_value\n");
if (NULL == out) {
goto bail;
@@ -168,7 +168,7 @@ clcrypt_decrypt_value(void *clcrypt_handle,
rc = -1;
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, repl_plugin_name,
"<- clcrypt_decrypt_entry (returning %d)\n", rc);
return rc;
}
diff --git a/ldap/servers/plugins/replication/csnpl.c
b/ldap/servers/plugins/replication/csnpl.c
index acd38d0..a529c7b 100644
--- a/ldap/servers/plugins/replication/csnpl.c
+++ b/ldap/servers/plugins/replication/csnpl.c
@@ -40,7 +40,7 @@ CSNPL* csnplNew ()
csnpl = (CSNPL *)slapi_ch_malloc (sizeof (CSNPL));
if (csnpl == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"csnplNew: failed to allocate pending list\n");
return NULL;
}
@@ -48,7 +48,7 @@ CSNPL* csnplNew ()
csnpl->csnList = llistNew ();
if (csnpl->csnList == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"csnplNew: failed to allocate pending list\n");
slapi_ch_free ((void**)&csnpl);
return NULL;
@@ -59,7 +59,7 @@ CSNPL* csnplNew ()
if (csnpl->csnLock == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"csnplNew: failed to create lock; NSPR error - %d\n",
PR_GetError ());
slapi_ch_free ((void**)&(csnpl->csnList));
@@ -111,7 +111,7 @@ int csnplInsert (CSNPL *csnpl, const CSN *csn)
if (csnpl == NULL || csn == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"csnplInsert: invalid argument\n");
return -1;
}
@@ -143,7 +143,7 @@ int csnplInsert (CSNPL *csnpl, const CSN *csn)
{
char s[CSN_STRSIZE];
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"csnplInsert: failed to insert csn (%s) into pending
list\n", csn_as_string(csn,PR_FALSE,s));
}
return -1;
@@ -159,7 +159,7 @@ int csnplRemove (CSNPL *csnpl, const CSN *csn)
if (csnpl == NULL || csn == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"csnplRemove: invalid argument\n");
return -1;
}
@@ -193,7 +193,7 @@ int csnplCommit (CSNPL *csnpl, const CSN *csn)
if (csnpl == NULL || csn == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"csnplCommit: invalid argument\n");
return -1;
}
@@ -218,7 +218,7 @@ int csnplCommit (CSNPL *csnpl, const CSN *csn)
ReplicaId rid = csn_get_replicaid (csn);
if (rid < MAX_REPLICA_ID)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"csnplCommit: can't find csn %s\n", csn_str);
}
slapi_rwlock_unlock (csnpl->csnLock);
@@ -329,12 +329,12 @@ static void _csnplDumpContentNoLock(CSNPL *csnpl, const char
*caller)
data = (csnpldata *)llistGetFirst(csnpl->csnList, &iterator);
if (data) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "%s: CSN Pending list
content:\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "%s: CSN Pending
list content:\n",
caller ? caller : "");
}
while (data)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "%s, %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "%s,
%s\n",
csn_as_string(data->csn, PR_FALSE, csn_str),
data->committed ? "committed" : "not
committed");
data = (csnpldata *)llistGetNext (csnpl->csnList, &iterator);
diff --git a/ldap/servers/plugins/replication/legacy_consumer.c
b/ldap/servers/plugins/replication/legacy_consumer.c
index 8670df1..44df538 100644
--- a/ldap/servers/plugins/replication/legacy_consumer.c
+++ b/ldap/servers/plugins/replication/legacy_consumer.c
@@ -230,7 +230,7 @@ legacy_consumer_config_init()
int rc;
if ((legacy_consumer_config_lock = slapi_new_rwlock()) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Failed to create legacy_consumer config read-write lock\n");
exit(1);
}
@@ -238,7 +238,7 @@ legacy_consumer_config_init()
rc = legacy_consumer_read_config ();
if (rc != LDAP_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Failed to initialize legacy replication configuration\n");
return 1;
}
@@ -260,13 +260,13 @@ legacy_consumer_config_add (Slapi_PBlock *pb, Slapi_Entry* e,
Slapi_Entry* entry
if (rc != LDAP_SUCCESS)
{
*returncode = rc;
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Failed to configure legacy
replication\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Failed to configure
legacy replication\n");
return SLAPI_DSE_CALLBACK_ERROR;
}
/* make sure that the password is encoded */
legacy_consumer_encode_pw(e);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "legacy_consumer_config_add:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"legacy_consumer_config_add: "
"successfully configured legacy consumer credentials\n");
return SLAPI_DSE_CALLBACK_OK;
@@ -328,7 +328,7 @@ legacy_consumer_config_modify (Slapi_PBlock *pb, Slapi_Entry*
entryBefore, Slapi
if (legacy_consumer_replicationdn != NULL)
{
not_allowed = 1;
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Multiple replicationdns not permitted." );
}
else
@@ -354,7 +354,7 @@ legacy_consumer_config_modify (Slapi_PBlock *pb, Slapi_Entry*
entryBefore, Slapi
if (legacy_consumer_replicationpw != NULL)
{
not_allowed = 1;
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Multiple replicationpws not permitted." );
}
else
@@ -373,7 +373,7 @@ legacy_consumer_config_modify (Slapi_PBlock *pb, Slapi_Entry*
entryBefore, Slapi
if (not_allowed)
{
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Failed to modify legacy replication configuration\n" );
*returncode= LDAP_CONSTRAINT_VIOLATION;
return SLAPI_DSE_CALLBACK_ERROR;
@@ -586,7 +586,7 @@ get_legacy_referral (Slapi_Entry *e, char **referral, char **state)
if (rc != 0)
{
const char *target_dn = slapi_entry_get_dn_const(e);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Warning: a copiedFrom
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Warning: a
copiedFrom "
"or copyingFrom attribute was added to or removed from an "
"entry that is not the root of a replicated area. It is possible "
"that a legacy replication supplier is incorrectly configured "
@@ -653,7 +653,7 @@ legacy_consumer_init_referrals (Replica *r)
if (rc == LDAP_REFERRAL)
{
/* We are in referral mode, probably because ORC failed */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"legacy_consumer_init_referrals "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"legacy_consumer_init_referrals "
"data for replica %s is in referral mode due to failed
"
"initialization. Replica need to be
reinitialized\n",
root_dn);
@@ -661,7 +661,7 @@ legacy_consumer_init_referrals (Replica *r)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"legacy_consumer_init_referrals "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"legacy_consumer_init_referrals "
"failed to obtain root entry for replica %s; LDAP error
- %d\n",
root_dn, rc);
rc = -1;
diff --git a/ldap/servers/plugins/replication/llist.c
b/ldap/servers/plugins/replication/llist.c
index c171bed..e0db5f1 100644
--- a/ldap/servers/plugins/replication/llist.c
+++ b/ldap/servers/plugins/replication/llist.c
@@ -201,14 +201,14 @@ int llistInsertHead (LList *list, const char *key, void *data)
LNode *node;
if (list == NULL || list->head == NULL || data == NULL)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name, "llistInsertHead: invalid
argument\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name, "llistInsertHead:
invalid argument\n");
return -1;
}
node = _llistNewNode (key, data);
if (node == NULL)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name, "llistInsertHead: failed to
allocate list node\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name, "llistInsertHead:
failed to allocate list node\n");
return -1;
}
@@ -231,14 +231,14 @@ int llistInsertTail (LList *list, const char *key, void *data)
LNode *node;
if (list == NULL || list->head == NULL || data == NULL)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name, "llistInsertHead: invalid
argument\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name, "llistInsertHead:
invalid argument\n");
return -1;
}
node = _llistNewNode (key, data);
if (node == NULL)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name, "llistInsertHead: failed to
allocate list node\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name, "llistInsertHead:
failed to allocate list node\n");
return -1;
}
diff --git a/ldap/servers/plugins/replication/repl5_agmt.c
b/ldap/servers/plugins/replication/repl5_agmt.c
index 52cc8b6..bcff95d 100644
--- a/ldap/servers/plugins/replication/repl5_agmt.c
+++ b/ldap/servers/plugins/replication/repl5_agmt.c
@@ -172,36 +172,36 @@ agmt_is_valid(Repl_Agmt *ra)
if (NULL == ra->hostname)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Replication agreement
\"%s\" "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Replication agreement
\"%s\" "
"is malformed: missing host name.\n", slapi_sdn_get_dn(ra->dn));
return_value = 0;
}
if (ra->port <= 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Replication agreement
\"%s\" "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Replication agreement
\"%s\" "
"is malformed: invalid port number %d.\n", slapi_sdn_get_dn(ra->dn),
ra->port);
return_value = 0;
}
if (ra->timeout < 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Replication agreement
\"%s\" "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Replication agreement
\"%s\" "
"is malformed: invalid timeout %ld.\n", slapi_sdn_get_dn(ra->dn),
ra->timeout);
return_value = 0;
}
if (ra->busywaittime < 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Replication agreement
\"%s\" "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Replication agreement
\"%s\" "
"is malformed: invalid busy wait time %ld.\n", slapi_sdn_get_dn(ra->dn),
ra->busywaittime);
return_value = 0;
}
if (ra->pausetime < 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Replication agreement
\"%s\" "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Replication agreement
\"%s\" "
"is malformed: invalid pausetime %ld.\n", slapi_sdn_get_dn(ra->dn),
ra->pausetime);
return_value = 0;
}
if ((0 == ra->transport_flags) && (BINDMETHOD_SSL_CLIENTAUTH ==
ra->bindmethod)) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Replication agreement
\"%s\" "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Replication agreement
\"%s\" "
" is malformed: cannot use SSLCLIENTAUTH if using plain LDAP - please "
"change %s to SSL or TLS before changing %s to use SSLCLIENTAUTH\n",
slapi_sdn_get_dn(ra->dn), type_nsds5TransportInfo,
type_nsds5ReplicaBindMethod);
@@ -221,7 +221,7 @@ agmt_is_valid(Repl_Agmt *ra)
} else {
auth_mech = "Unknown";
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Replication agreement
\"%s\" "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Replication
agreement \"%s\" "
"is malformed: a bind DN and password must be supplied for authentication
"
"method \"%s\"\n", slapi_sdn_get_dn(ra->dn), auth_mech);
return_value = 0;
@@ -244,14 +244,14 @@ agmt_new_from_entry(Slapi_Entry *e)
ra = (Repl_Agmt *)slapi_ch_calloc(1, sizeof(repl5agmt));
if ((ra->lock = PR_NewLock()) == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Unable to create new lock
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Unable to create new
lock "
"for replication agreement \"%s\" - agreement ignored.\n",
slapi_entry_get_dn_const(e));
goto loser;
}
if ((ra->attr_lock = slapi_new_rwlock()) == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Unable to create new attr lock
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Unable to create new
attr lock "
"for replication agreement \"%s\" - agreement ignored.\n",
slapi_entry_get_dn_const(e));
goto loser;
@@ -382,7 +382,7 @@ agmt_new_from_entry(Slapi_Entry *e)
} else if(strcasecmp(tmpstr, "on") == 0){
ra->is_enabled = PR_TRUE;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Warning invalid value "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Warning invalid
value "
"for nsds5ReplicaEnabled (%s), value must be \"on\" or
\"off\". Ignoring "
"this repl agreement.\n",tmpstr);
slapi_ch_free_string(&tmpstr);
@@ -474,7 +474,7 @@ agmt_new_from_entry(Slapi_Entry *e)
* could be a default excluded attr list in cn=plugin default config */
if (agmt_set_replicated_attributes_from_attr(ra, sattr) != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_add_callback: failed to parse "
"replicated attributes for agreement %s\n",
agmt_get_long_name(ra));
@@ -484,7 +484,7 @@ agmt_new_from_entry(Slapi_Entry *e)
if (denied_attrs)
{
/* Report the error to the client */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"WARNING: Attempt to exclude illegal attributes "
"from a fractional agreement\n");
/* Free the list */
@@ -496,7 +496,7 @@ agmt_new_from_entry(Slapi_Entry *e)
slapi_entry_attr_find(e, type_nsds5ReplicatedAttributeListTotal, &sattr);
if (sattr && agmt_set_replicated_attributes_total_from_attr(ra, sattr) != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_add_callback: failed to parse total "
"update replicated attributes for agreement %s\n",
agmt_get_long_name(ra));
@@ -506,7 +506,7 @@ agmt_new_from_entry(Slapi_Entry *e)
if (denied_attrs)
{
/* Report the error to the client */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"WARNING: Attempt to exclude illegal attributes "
"from a fractional agreement for total update protocol\n");
/* Free the list */
@@ -531,7 +531,7 @@ agmt_new_from_entry(Slapi_Entry *e)
/* Now that the agreement is done, just check if changelog is configured */
if (cl5GetState() != CL5_STATE_OPEN) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "WARNING: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "WARNING: "
"Replication agreement added but there is no changelog configured. "
"No change will be replicated until a changelog is configured.\n");
}
@@ -697,7 +697,7 @@ agmt_start(Repl_Agmt *ra)
*/
repl_sdn = agmt_get_replarea(ra);
if (!repl_sdn) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmt_start: failed to get repl area. Please check
agreement.\n");
prot_free(&prot);
return -1;
@@ -723,7 +723,7 @@ agmt_start(Repl_Agmt *ra)
if (rc == LDAP_SUCCESS){
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries);
if (NULL == entries || NULL == entries[0]){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"agmt_start: replica ruv tombstone entry for "
"replica %s not found\n",
slapi_sdn_get_dn(ra->replarea));
@@ -739,7 +739,7 @@ agmt_start(Repl_Agmt *ra)
/* Check that replication is not already started */
if (ra->protocol != NULL) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "replication already
started for agreement \"%s\"\n", agmt_get_long_name(ra));
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "replication
already started for agreement \"%s\"\n", agmt_get_long_name(ra));
prot_free(&prot);
goto done;
}
@@ -831,7 +831,7 @@ windows_agmt_start(Repl_Agmt *ra)
/* Check that replication is not already started */
if (ra->protocol != NULL) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "replication already
started for agreement \"%s\"\n", agmt_get_long_name(ra));
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "replication
already started for agreement \"%s\"\n", agmt_get_long_name(ra));
PR_Unlock(ra->lock);
prot_free(&prot);
return 0;
@@ -1515,7 +1515,7 @@ _agmt_set_default_fractional_attrs(Repl_Agmt *ra)
rc = agmt_parse_excluded_attrs_config_attr(val,
&(ra->frac_attrs));
if (0 != rc) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_agmt_set_default_fractional_attrs: failed to "
"parse default config (%s) attribute %s value: %s\n",
SLAPI_PLUGIN_DEFAULT_CONFIG,
@@ -2264,7 +2264,7 @@ agmt_replica_init_done (const Repl_Agmt *agmt)
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if (rc != LDAP_SUCCESS && rc != LDAP_NO_SUCH_ATTRIBUTE)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "agmt_replica_init_done:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"agmt_replica_init_done: "
"failed to remove (%s) attribute from (%s) entry; LDAP error
- %d\n",
type_nsds5ReplicaInitialize, slapi_sdn_get_ndn (agmt->dn),
rc);
}
@@ -2300,7 +2300,7 @@ agmt_set_consumer_ruv (Repl_Agmt *ra, RUV *ruv)
{
if (ra == NULL || ruv == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "agmt_set_consumer_ruv:
invalid argument"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmt_set_consumer_ruv: invalid argument"
" agmt - %p, ruv - %p\n", ra, ruv);
return -1;
}
@@ -2357,7 +2357,7 @@ agmt_update_consumer_ruv (Repl_Agmt *ra)
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if (rc != LDAP_SUCCESS && rc != LDAP_NO_SUCH_ATTRIBUTE)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "%s:
agmt_update_consumer_ruv: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "%s:
agmt_update_consumer_ruv: "
"failed to update consumer's RUV; LDAP error -
%d\n",
ra->long_name, rc);
}
@@ -2483,10 +2483,10 @@ agmt_set_last_update_status (Repl_Agmt *ra, int ldaprc, int
replrc, const char *
"(If the suffix is disabled you must enable it then restart the server for
replication to take place).",
replrc, ra->long_name ? ra->long_name : "a replica");
/* Log into the errors log, as "ra->long_name" is not accessible from
the caller */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Incremental update aborted: Replication agreement for \"%s\" "
"can not be updated while the replica is disabled\n", ra->long_name ?
ra->long_name : "a replica");
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"(If the suffix is disabled you must enable it then restart the server for
replication to take place).\n");
}
else
@@ -2551,7 +2551,7 @@ agmt_set_last_init_status (Repl_Agmt *ra, int ldaprc, int replrc,
int connrc, co
else if (replrc == NSDS50_REPL_DISABLED)
{
if(agmt_is_enabled(ra)){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Total update aborted:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Total update
aborted: "
"Replication agreement for \"%s\" can not be updated while the
suffix is disabled.\n"
"You must enable it then restart the server for replication to take
place).\n",
ra->long_name ? ra->long_name : "a replica");
@@ -2561,7 +2561,7 @@ agmt_set_last_init_status (Repl_Agmt *ra, int ldaprc, int replrc,
int connrc, co
replrc, ra->long_name ? ra->long_name : "a replica");
} else {
/* You do not need to restart the server after enabling the agreement */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Total update aborted:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Total update
aborted: "
"Replication agreement for \"%s\" can not be updated while the
agreement is disabled\n",
ra->long_name ? ra->long_name : "a replica");
PR_snprintf(ra->last_init_status, STATUS_LEN, "%d Total update aborted:
"
@@ -2792,7 +2792,7 @@ agmt_get_consumer_rid ( Repl_Agmt *agmt, void *conn )
slapi_create_dn_string("cn=replica,cn=\"%s\",cn=mapping
tree,cn=config",
slapi_sdn_get_dn (agmt->replarea) );
if (NULL == mapping_tree_node) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"agmt_get_consumer_rid: failed to normalize "
"replica dn for %s\n",
slapi_sdn_get_dn (agmt->replarea));
@@ -2895,7 +2895,7 @@ agmt_set_enabled_from_entry(Repl_Agmt *ra, Slapi_Entry *e, char
*returntext){
} else if(strcasecmp(attr_val,"on") == 0){
is_enabled = PR_TRUE;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "agmt_set_enabled_from_entry:
invalid "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"agmt_set_enabled_from_entry: invalid "
"value for nsds5ReplicaEnabled (%s), the value must be \"on\" or
\"off\".\n", attr_val);
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Invalid value for
nsds5ReplicaEnabled, "
"the value must be \"on\" or \"off\".\n");
@@ -2907,7 +2907,7 @@ agmt_set_enabled_from_entry(Repl_Agmt *ra, Slapi_Entry *e, char
*returntext){
if(is_enabled){
if(!ra->is_enabled){
ra->is_enabled = PR_TRUE;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "agmt_set_enabled_from_entry:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmt_set_enabled_from_entry: "
"agreement is now enabled (%s)\n",ra->long_name);
PR_Unlock(ra->lock);
agmt_start(ra);
@@ -2916,7 +2916,7 @@ agmt_set_enabled_from_entry(Repl_Agmt *ra, Slapi_Entry *e, char
*returntext){
} else {
if(ra->is_enabled){
ra->is_enabled = PR_FALSE;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "agmt_set_enabled_from_entry:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmt_set_enabled_from_entry: "
"agreement is now disabled (%s)\n",ra->long_name);
PR_Unlock(ra->lock);
agmt_stop(ra);
@@ -3195,7 +3195,7 @@ agmt_remove_maxcsn(Repl_Agmt *ra)
pb = slapi_pblock_new();
if (!pb) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "agmt_set_maxcsn: Out of
memory\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"agmt_set_maxcsn: Out of memory\n");
goto done;
}
@@ -3204,7 +3204,7 @@ agmt_remove_maxcsn(Repl_Agmt *ra)
r = (Replica *)object_get_data(repl_obj);
tombstone_sdn = replica_get_root(r);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "agmt_set_maxcsn: Failed
to get repl object.\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"agmt_set_maxcsn: Failed to get repl object.\n");
goto done;
}
slapi_ch_free_string(&ra->maxcsn);
@@ -3237,7 +3237,7 @@ agmt_remove_maxcsn(Repl_Agmt *ra)
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries);
if (NULL == entries || NULL == entries[0]){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"agmt_set_maxcsn: replica ruv tombstone entry for "
"replica %s not found\n", slapi_sdn_get_dn(ra->replarea));
goto done;
@@ -3290,7 +3290,7 @@ agmt_remove_maxcsn(Repl_Agmt *ra)
slapi_modify_internal_pb(modpb);
slapi_pblock_get(modpb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if (rc != LDAP_SUCCESS){
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmt_set_maxcsn: failed to remove agmt maxcsn
(%s), error(%d)\n",maxcsns[i], rc);
}
slapi_mod_done(&smod);
diff --git a/ldap/servers/plugins/replication/repl5_agmtlist.c
b/ldap/servers/plugins/replication/repl5_agmtlist.c
index f50862f..99768a8 100644
--- a/ldap/servers/plugins/replication/repl5_agmtlist.c
+++ b/ldap/servers/plugins/replication/repl5_agmtlist.c
@@ -225,13 +225,13 @@ agmtlist_add_callback(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry
*entryAfter,
int *returncode, char *returntext, void *arg)
{
int rc;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "agmt_add: begin\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "agmt_add:
begin\n");
rc = add_new_agreement(e);
if (0 != rc) {
Slapi_DN *sdn = NULL;
slapi_pblock_get(pb, SLAPI_TARGET_SDN, &sdn);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "agmtlist_add_callback: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"agmtlist_add_callback: "
"Can't start agreement \"%s\"\n", slapi_sdn_get_dn(sdn));
*returncode = LDAP_UNWILLING_TO_PERFORM;
return SLAPI_DSE_CALLBACK_ERROR;
@@ -271,14 +271,14 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
slapi_pblock_get(pb, SLAPI_TARGET_SDN, &sdn);
if (NULL == sdn) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"agmtlist_modify_callback: NULL target dn\n");
goto done;
}
agmt = agmtlist_get_by_agmt_name(sdn);
if (NULL == agmt)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "agmtlist_modify_callback:
received "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"agmtlist_modify_callback: received "
"a modification for unknown replication agreement \"%s\"\n",
slapi_sdn_get_dn(sdn));
goto done;
@@ -297,7 +297,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
the replication plugin - handled above */
if (mods[i]->mod_op & LDAP_MOD_DELETE)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"agmtlist_modify_callback: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: "
"deletion of %s attribute is not allowed\n",
type_nsds5ReplicaInitialize);
*returncode = LDAP_UNWILLING_TO_PERFORM;
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -306,7 +306,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
else
{
if(val == NULL){
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"agmtlist_modify_callback: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: "
"no value provided for %s attribute\n",
type_nsds5ReplicaInitialize);
*returncode = LDAP_UNWILLING_TO_PERFORM;
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -331,7 +331,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE,
"Invalid value (%s) value supplied for attr (%s);
Ignoring ...",
val, mods[i]->mod_type);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"agmtlist_modify_callback: %s\n", errortext);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: %s\n", errortext);
*returncode = LDAP_UNWILLING_TO_PERFORM;
rc = SLAPI_DSE_CALLBACK_ERROR;
}
@@ -352,7 +352,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
/* New replica credentials */
if (agmt_set_credentials_from_entry(agmt, e) != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"agmtlist_modify_callback: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: "
"failed to update credentials for agreement
%s\n",
agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
@@ -365,7 +365,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
/* New replica timeout */
if (agmt_set_timeout_from_entry(agmt, e) != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"agmtlist_modify_callback: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: "
"failed to update timeout for agreement %s\n",
agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
@@ -378,7 +378,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
/* New replica timeout */
if (agmt_set_flowcontrolwindow_from_entry(agmt, e) != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "agmtlist_modify_callback:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: "
"failed to update the flow control window for agreement %s\n",
agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
@@ -391,7 +391,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
/* New replica timeout */
if (agmt_set_flowcontrolpause_from_entry(agmt, e) != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "agmtlist_modify_callback:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: "
"failed to update the flow control pause for agreement %s\n",
agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
@@ -404,7 +404,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
/* New replica busywaittime */
if (agmt_set_busywaittime_from_entry(agmt, e) != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"agmtlist_modify_callback: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: "
"failed to update busy wait time for agreement
%s\n",
agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
@@ -417,7 +417,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
/* New replica pausetime */
if (agmt_set_pausetime_from_entry(agmt, e) != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"agmtlist_modify_callback: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: "
"failed to update session pause time for agreement
%s\n",
agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
@@ -430,7 +430,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
/* New replica Bind DN */
if (agmt_set_binddn_from_entry(agmt, e) != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"agmtlist_modify_callback: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: "
"failed to update bind DN for agreement %s\n",
agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
@@ -442,7 +442,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
/* New replica host */
if (agmt_set_host_from_entry(agmt, e) != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: "
"failed to update host for agreement %s\n",
agmt_get_long_name(agmt));
@@ -462,7 +462,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
/* New replica port */
if (agmt_set_port_from_entry(agmt, e) != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: "
"failed to update port for agreement %s\n",
agmt_get_long_name(agmt));
@@ -482,7 +482,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
/* New Transport info */
if (agmt_set_transportinfo_from_entry(agmt, e) != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"agmtlist_modify_callback: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: "
"failed to update transport info for agreement
%s\n",
agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
@@ -494,7 +494,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
{
if (agmt_set_bind_method_from_entry(agmt, e) != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"agmtlist_modify_callback: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: "
"failed to update bind method for agreement
%s\n",
agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
@@ -508,7 +508,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
/* New set of excluded attributes */
if (agmt_set_replicated_attributes_from_entry(agmt, e) != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"agmtlist_modify_callback: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: "
"failed to update replicated attributes for
agreement %s\n",
agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
@@ -520,7 +520,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
{
/* Report the error to the client */
PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE, "attempt to exclude an
illegal attribute in a fractional agreement");
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "agmtlist_modify_callback:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: "
"attempt to exclude an illegal attribute in a fractional
agreement\n");
*returncode = LDAP_UNWILLING_TO_PERFORM;
@@ -537,7 +537,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
/* New set of excluded attributes */
if (agmt_set_replicated_attributes_total_from_entry(agmt, e) != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "agmtlist_modify_callback:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: "
"failed to update total update replicated attributes for agreement
%s\n",
agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
@@ -550,7 +550,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
/* Report the error to the client */
PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE, "attempt to exclude an
illegal total update "
"attribute in a fractional agreement");
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "agmtlist_modify_callback:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: "
"attempt to exclude an illegal total update attribute in a fractional
agreement\n");
*returncode = LDAP_UNWILLING_TO_PERFORM;
@@ -576,7 +576,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
else if (slapi_attr_types_equivalent(mods[i]->mod_type,
type_nsds5ReplicaEnabled))
{
if(agmt_set_enabled_from_entry(agmt, e, returntext) != 0){
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"agmtlist_modify_callback: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: "
"failed to set replica agmt state \"enabled/disabled\"
for %s\n",agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -585,7 +585,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
else if (slapi_attr_types_equivalent(mods[i]->mod_type,
type_nsds5ReplicaStripAttrs))
{
if(agmt_set_attrs_to_strip(agmt, e) != 0){
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"agmtlist_modify_callback: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: "
"failed to set replica agmt attributes to strip for
%s\n",agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -609,7 +609,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE,
"attribute %s value (%s) is invalid, must be a
number greater than zero.\n",
type_replicaProtocolTimeout, val ? val : "");
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "attribute %s
value (%s) is invalid, "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"attribute %s value (%s) is invalid, "
"must be a number greater than zero.\n",
type_replicaProtocolTimeout, val ? val :
"");
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -629,7 +629,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
else if ((0 == windows_handle_modify_agreement(agmt, mods[i]->mod_type, e))
&&
(0 == id_extended_agreement(agmt, mods, e)))
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"agmtlist_modify_callback: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: "
"modification of %s attribute is not allowed\n",
mods[i]->mod_type);
*returncode = LDAP_UNWILLING_TO_PERFORM;
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -664,7 +664,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry
{
if (agmt_set_schedule_from_entry(agmt, e) != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"agmtlist_modify_callback: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"agmtlist_modify_callback: "
"failed to update replication schedule for agreement
%s\n",
agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
@@ -689,12 +689,12 @@ agmtlist_delete_callback(Slapi_PBlock *pb, Slapi_Entry *e,
Slapi_Entry *entryAft
Repl_Agmt *ra;
Object *ro;
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "agmt_delete: begin\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "agmt_delete:
begin\n");
ro = objset_find(agmt_set, agmt_dn_cmp, (const void *)slapi_entry_get_sdn_const(e));
ra = (NULL == ro) ? NULL : (Repl_Agmt *)object_get_data(ro);
if (NULL == ra)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "agmtlist_delete: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "agmtlist_delete:
"
"Tried to delete replication agreement \"%s\", but no such "
"agreement was configured.\n",
slapi_sdn_get_dn(slapi_entry_get_sdn_const(e)));
}
@@ -713,7 +713,7 @@ static int
agmtlist_rename_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore, Slapi_Entry *e,
int *returncode, char *returntext, void *arg)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "agmt_rename: begin\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "agmt_rename:
begin\n");
*returncode = LDAP_SUCCESS;
return SLAPI_DSE_CALLBACK_OK;
@@ -726,7 +726,7 @@ handle_agmt_search(Slapi_Entry *e, void *callback_data)
int *agmtcount = (int *)callback_data;
int rc;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"Found replication agreement named \"%s\".\n",
slapi_sdn_get_dn(slapi_entry_get_sdn(e)));
rc = add_new_agreement(e);
@@ -736,7 +736,7 @@ handle_agmt_search(Slapi_Entry *e, void *callback_data)
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "The replication "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "The replication
"
"agreement named \"%s\" could not be correctly parsed. No "
"replication will occur with this replica.\n",
slapi_sdn_get_dn(slapi_entry_get_sdn(e)));
@@ -784,7 +784,7 @@ agmtlist_config_init()
NULL /* referral callback */);
slapi_pblock_destroy(pb);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "agmtlist_config_init: found %d
replication agreements in DIT\n", agmtcount);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "agmtlist_config_init:
found %d replication agreements in DIT\n", agmtcount);
return 0;
}
diff --git a/ldap/servers/plugins/replication/repl5_connection.c
b/ldap/servers/plugins/replication/repl5_connection.c
index 3a3c22f..e44254a 100644
--- a/ldap/servers/plugins/replication/repl5_connection.c
+++ b/ldap/servers/plugins/replication/repl5_connection.c
@@ -435,7 +435,7 @@ conn_read_result_ex(Repl_Connection *conn, char **retoidp, struct
berval **retda
/* must not access conn->ld if disconnected in another thread */
/* the other thread that actually did the conn_disconnect() */
/* will set the status and error info */
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: Connection disconnected by another thread\n",
agmt_get_long_name(conn->agmt));
}
@@ -557,7 +557,7 @@ see_if_write_available(Repl_Connection *conn, PRIntervalTime timeout)
/* get the sockbuf */
if ((ldap_get_option(conn->ld, LDAP_OPT_DESC, &fd) != LDAP_OPT_SUCCESS) || (fd
<= 0)) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: invalid connection insee_if_write_available \n",
agmt_get_long_name(conn->agmt));
conn->last_ldap_error = LDAP_PARAM_ERROR;
@@ -578,13 +578,13 @@ see_if_write_available(Repl_Connection *conn, PRIntervalTime
timeout)
/* check */
if (rc == 0) { /* timeout */
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: poll timed out - poll interval [%d]\n",
agmt_get_long_name(conn->agmt),
timeout);
return CONN_TIMEOUT;
} else if ((rc < 0) || (!(polldesc.out_flags&PR_POLL_WRITE))) { /* error */
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: error during poll attempt [%d:%s]\n",
agmt_get_long_name(conn->agmt),
PR_GetError(), slapd_pr_strerror(PR_GetError()));
@@ -615,7 +615,7 @@ see_if_write_available(Repl_Connection *conn, PRIntervalTime timeout)
iofns.lextiof_size = LDAP_X_EXTIO_FNS_SIZE;
if (ldap_get_option(conn->ld, LDAP_X_OPT_EXTIO_FN_PTRS, &iofns) < 0) {
rc = slapi_ldap_get_lderrno(conn->ld, NULL, NULL);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Failed call to ldap_get_option to get extiofns in "
"see_if_write_available: LDAP error %d (%s)\n",
agmt_get_long_name(conn->agmt),
@@ -628,7 +628,7 @@ see_if_write_available(Repl_Connection *conn, PRIntervalTime timeout)
/* set up the poll structure */
if (ldap_get_option(conn->ld, LDAP_OPT_DESC, &pollstr.lpoll_fd) < 0) {
rc = slapi_ldap_get_lderrno(conn->ld, NULL, NULL);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Failed call to ldap_get_option for poll_fd in "
"see_if_write_available: LDAP error %d (%s)\n",
agmt_get_long_name(conn->agmt),
@@ -640,7 +640,7 @@ see_if_write_available(Repl_Connection *conn, PRIntervalTime timeout)
if (ldap_get_option(conn->ld, LDAP_X_OPT_SOCKETARG,
&pollstr.lpoll_socketarg) < 0) {
rc = slapi_ldap_get_lderrno(conn->ld, NULL, NULL);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Failed call to ldap_get_option for socketarg in "
"see_if_write_available: LDAP error %d (%s)\n",
agmt_get_long_name(conn->agmt),
@@ -654,7 +654,7 @@ see_if_write_available(Repl_Connection *conn, PRIntervalTime timeout)
private = iofns.lextiof_session_arg;
if (0 == (*ldap_poll)(&pollstr, nfds, timeout, private)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: poll timed out - poll interval [%d]\n",
agmt_get_long_name(conn->agmt),
timeout);
@@ -687,12 +687,12 @@ check_flow_control_tot_init(Repl_Connection *conn, int optype, const
char *extop
*/
rcv_msgid = repl5_tot_last_rcv_msgid(conn);
if (rcv_msgid == -1) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: check_flow_control_tot_init no callback data [
msgid sent: %d]\n",
agmt_get_long_name(conn->agmt),
sent_msgid);
} else if (sent_msgid < rcv_msgid) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: check_flow_control_tot_init invalid message ids [
msgid sent: %d, rcv: %d]\n",
agmt_get_long_name(conn->agmt),
sent_msgid,
@@ -713,7 +713,7 @@ check_flow_control_tot_init(Repl_Connection *conn, int optype, const
char *extop
* Log it at least once to inform administrator there is
* a potential configuration issue here
*/
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Total update flow control gives time (%d msec) to
the consumer before sending more entries [ msgid sent: %d, rcv: %d])\n"
"If total update fails you can try to increase %s and/or
decrease %s in the replica agreement configuration\n",
agmt_get_long_name(conn->agmt),
@@ -775,7 +775,7 @@ conn_is_available(Repl_Connection *conn)
} else {
/* Else give connection to others threads */
PR_Unlock(conn->lock);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: perform_operation transient timeout. retry)\n",
agmt_get_long_name(conn->agmt));
DS_Sleep(PR_MillisecondsToInterval(yield_delay_msec));
@@ -836,7 +836,7 @@ perform_operation(Repl_Connection *conn, int optype, const char *dn,
return_value = conn_is_available(conn);
if (return_value != CONN_OPERATION_SUCCESS) {
PR_Unlock(conn->lock);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: perform_operation connection is not available (%d)\n",
agmt_get_long_name(conn->agmt),
return_value);
@@ -886,7 +886,7 @@ perform_operation(Repl_Connection *conn, int optype, const char *dn,
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Failed to send %s operation: LDAP error %d (%s)\n",
agmt_get_long_name(conn->agmt),
op_string ? op_string : "NULL", rc, ldap_err2string(rc));
@@ -1073,7 +1073,7 @@ conn_cancel_linger(Repl_Connection *conn)
PR_Lock(conn->lock);
if (conn->linger_active)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: Cancelling linger on the connection\n",
agmt_get_long_name(conn->agmt));
conn->linger_active = PR_FALSE;
@@ -1086,7 +1086,7 @@ conn_cancel_linger(Repl_Connection *conn)
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: No linger to cancel on the connection\n",
agmt_get_long_name(conn->agmt));
}
@@ -1106,7 +1106,7 @@ linger_timeout(time_t event_time, void *arg)
Repl_Connection *conn = (Repl_Connection *)arg;
PR_ASSERT(NULL != conn);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: Linger timeout has expired on the connection\n",
agmt_get_long_name(conn->agmt));
PR_Lock(conn->lock);
@@ -1134,12 +1134,12 @@ conn_start_linger(Repl_Connection *conn)
time_t now;
PR_ASSERT(NULL != conn);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: Beginning linger on the connection\n",
agmt_get_long_name(conn->agmt));
if (!conn_connected(conn))
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: No linger on the closed conn\n",
agmt_get_long_name(conn->agmt));
return;
@@ -1148,7 +1148,7 @@ conn_start_linger(Repl_Connection *conn)
PR_Lock(conn->lock);
if (conn->linger_active)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: Linger already active on the connection\n",
agmt_get_long_name(conn->agmt));
}
@@ -1215,7 +1215,7 @@ conn_connect(Repl_Connection *conn)
/* Pb occured in decryption: stop now, binding will fail */
if ( pw_ret == -1 )
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Decoding of the credentials failed.\n",
agmt_get_long_name(conn->agmt));
@@ -1241,7 +1241,7 @@ conn_connect(Repl_Connection *conn)
if (secure > 0) {
if (!NSS_IsInitialized()) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: SSL Not Initialized, Replication over SSL FAILED\n",
agmt_get_long_name(conn->agmt));
conn->last_ldap_error = LDAP_INAPPROPRIATE_AUTH;
@@ -1257,7 +1257,7 @@ conn_connect(Repl_Connection *conn)
#endif
/* Now we initialize the LDAP Structure and set options */
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: Trying %s%s slapi_ldap_init_ext\n",
agmt_get_long_name(conn->agmt),
secure ? "secure" : "non-secure",
@@ -1275,7 +1275,7 @@ conn_connect(Repl_Connection *conn)
conn->state = STATE_DISCONNECTED;
conn->last_operation = CONN_INIT;
conn->last_ldap_error = LDAP_LOCAL_ERROR;
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Failed to establish %s%sconnection to the consumer\n",
agmt_get_long_name(conn->agmt),
secure ? "secure " : "",
@@ -1286,7 +1286,7 @@ conn_connect(Repl_Connection *conn)
/* slapi_ch_strdup is OK with NULL strings */
binddn = slapi_ch_strdup(conn->binddn);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: binddn = %s, passwd = %s\n",
agmt_get_long_name(conn->agmt),
binddn?binddn:"NULL", creds->bv_val?creds->bv_val:"NULL");
@@ -1364,7 +1364,7 @@ close_connection_internal(Repl_Connection *conn)
slapi_ldap_unbind(conn->ld);
}
conn->ld = NULL;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: Disconnected from the consumer\n", agmt_get_long_name(conn->agmt));
}
@@ -1698,12 +1698,12 @@ supplier_read_consumer_definitions(Repl_Connection *conn, struct
berval ***remot
if (return_value == CONN_OPERATION_SUCCESS) {
*remote_attributetypes = remote_schema_attributetypes_bervals;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Fail to retrieve the remote schema
attributetypes\n",
agmt_get_long_name(conn->agmt));
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Fail to retrieve the remote schema
objectclasses\n",
agmt_get_long_name(conn->agmt));
}
@@ -1738,7 +1738,7 @@ update_consumer_schema(Repl_Connection *conn)
/* The consumer contains definitions that needs to be learned */
supplier_learn_new_definitions(remote_schema_objectclasses_bervals,
remote_schema_attributetypes_bervals);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"[S] Schema %s must not be overwritten (set
replication log for additional info)\n",
agmt_get_long_name(conn->agmt));
ok_to_send_schema = PR_FALSE;
@@ -1781,12 +1781,12 @@ conn_push_schema(Repl_Connection *conn, CSN **remotecsn)
if (!remotecsn)
{
return_value = CONN_OPERATION_FAILED;
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "NULL remote CSN\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "NULL remote
CSN\n");
}
else if (!conn_connected_locked(conn, 0 /* not locked */))
{
return_value = CONN_NOT_CONNECTED;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: Schema replication update failed: not connected to consumer\n",
agmt_get_long_name(conn->agmt));
}
@@ -1808,11 +1808,11 @@ conn_push_schema(Repl_Connection *conn, CSN **remotecsn)
if (*remotecsn) {
csn_as_string (*remotecsn, PR_FALSE, remotecnsstr);
csn_as_string (localcsn, PR_FALSE, localcsnstr);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"[S] Checking consumer
schema localcsn:%s / remotecsn:%s\n", localcsnstr, remotecnsstr);
} else {
csn_as_string (localcsn, PR_FALSE, localcsnstr);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"[S] Checking consumer
schema localcsn:%s / remotecsn:NULL\n", localcsnstr);
}
if (!update_consumer_schema(conn)) {
@@ -1823,10 +1823,10 @@ conn_push_schema(Repl_Connection *conn, CSN **remotecsn)
* So it could be possible that a second attempt (right
now) of update_consumer_schema
* would be successful
*/
- slapi_log_error(SLAPI_LOG_REPL, "schema",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG,
"schema",
"[S] schema definitions may
have been learned\n");
if (!update_consumer_schema(conn)) {
- slapi_log_error(SLAPI_LOG_REPL,
"schema",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG,
"schema",
"[S] learned definitions are
not suffisant to try to push the schema \n");
return_value = CONN_OPERATION_FAILED;
}
@@ -1843,7 +1843,7 @@ conn_push_schema(Repl_Connection *conn, CSN **remotecsn)
memcpy(remotecsnstr,
remote_schema_csn_bervals[0]->bv_val,
remote_schema_csn_bervals[0]->bv_len);
remotecsnstr[remote_schema_csn_bervals[0]->bv_len] = '\0';
- slapi_log_error(SLAPI_LOG_REPL,
repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL,
LOG_DEBUG, repl_plugin_name,
"[S] Reread
remotecsn:%s\n", remotecsnstr);
*remotecsn =
csn_new_by_string(remotecsnstr);
if (*remotecsn &&
(csn_compare(localcsn, *remotecsn) <= 0)) {
@@ -1853,7 +1853,7 @@ conn_push_schema(Repl_Connection *conn, CSN **remotecsn)
ber_bvecfree(remote_schema_csn_bervals);
}
if (return_value == CONN_OPERATION_SUCCESS) {
- slapi_log_error(SLAPI_LOG_REPL,
repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL,
LOG_DEBUG, repl_plugin_name,
"Schema checking successful:
ok to push the schema (%s)\n", agmt_get_long_name(conn->agmt));
}
@@ -1898,7 +1898,7 @@ conn_push_schema(Repl_Connection *conn, CSN **remotecsn)
if (NULL == entries || NULL == entries[0])
{
/* Whoops - couldn't read our own schema! */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Error: unable to read local schema definitions.\n",
agmt_get_long_name(conn->agmt));
return_value = CONN_OPERATION_FAILED;
@@ -1942,7 +1942,7 @@ conn_push_schema(Repl_Connection *conn, CSN **remotecsn)
{
int ldaperr = -1, optype = -1;
conn_get_error(conn, &optype, &ldaperr);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Schema replication update failed: %s\n",
agmt_get_long_name(conn->agmt),
ldaperr == -1 ? "Unknown Error" : ldap_err2string(ldaperr));
@@ -1962,7 +1962,7 @@ conn_push_schema(Repl_Connection *conn, CSN **remotecsn)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Schema replication update failed: "
"unable to prepare schema entry for transmission.\n",
agmt_get_long_name(conn->agmt));
@@ -2081,7 +2081,8 @@ bind_and_check_pwp(Repl_Connection *conn, char * binddn, char
*password)
log_level = SLAPI_LOG_REPL;
}
conn->last_ldap_error = rc;
- slapi_log_error(log_level, repl_plugin_name,
+ slapi_log_error(log_level, log_level==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
+ repl_plugin_name,
"%s: Replication bind with %s auth resumed\n",
agmt_get_long_name(conn->agmt),
mech ? mech : "SIMPLE");
@@ -2095,7 +2096,7 @@ bind_and_check_pwp(Repl_Connection *conn, char * binddn, char
*password)
if ( !(strcmp( ctrls[ i ]->ldctl_oid, LDAP_CONTROL_PWEXPIRED)) )
{
/* Bind is successfull but password has expired */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Successfully bound %s to consumer, "
"but password has expired on consumer.\n",
agmt_get_long_name(conn->agmt), binddn);
@@ -2107,7 +2108,7 @@ bind_and_check_pwp(Repl_Connection *conn, char * binddn, char
*password)
(ctrls[ i ]->ldctl_value.bv_len > 0) )
{
int password_expiring = atoi( ctrls[ i ]->ldctl_value.bv_val );
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Successfully bound %s to consumer, "
"but password is expiring on consumer in %d seconds.\n",
agmt_get_long_name(conn->agmt), binddn, password_expiring);
@@ -2131,6 +2132,7 @@ bind_and_check_pwp(Repl_Connection *conn, char * binddn, char
*password)
/* errmsg is a pointer directly into the ld structure - do not free */
rc = slapi_ldap_get_lderrno( ld, NULL, &errmsg );
slapi_log_error(rc == LDAP_LOCAL_ERROR ? SLAPI_LOG_REPL : SLAPI_LOG_FATAL,
+ rc == LDAP_LOCAL_ERROR ? LOG_DEBUG : LOG_ERR,
repl_plugin_name,
"%s: Replication bind with %s auth failed: LDAP error %d (%s) (%s)\n",
agmt_get_long_name(conn->agmt),
@@ -2140,7 +2142,7 @@ bind_and_check_pwp(Repl_Connection *conn, char * binddn, char
*password)
char *errmsg = NULL;
/* errmsg is a pointer directly into the ld structure - do not free */
rc = slapi_ldap_get_lderrno( ld, NULL, &errmsg );
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: Replication bind with %s auth failed: LDAP error %d (%s) (%s)\n",
agmt_get_long_name(conn->agmt),
mech ? mech : "SIMPLE", rc,
@@ -2222,7 +2224,7 @@ repl5_debug_timeout_callback(time_t when, void *arg)
sprintf(buf, "%d", s_debug_level);
config_set_errorlog_level("nsslapd-errorlog-level", buf, NULL, 1);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"repl5_debug_timeout_callback: set debug level to %d at %ld\n",
s_debug_level, when);
}
diff --git a/ldap/servers/plugins/replication/repl5_inc_protocol.c
b/ldap/servers/plugins/replication/repl5_inc_protocol.c
index 5676462..f853145 100644
--- a/ldap/servers/plugins/replication/repl5_inc_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_inc_protocol.c
@@ -230,7 +230,7 @@ repl5_inc_log_operation_failure(int operation_code, int ldap_error,
char* ldap_e
{
char *op_string = slapi_op_type_to_string(operation_code);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Received error %d: %s for %s operation\n",
agreement_name,
ldap_error, ldap_error_string ? ldap_error_string : "NULL",
@@ -249,7 +249,7 @@ repl5_inc_result_threadmain(void *param)
int message_id = 0;
int yield_session = 0;
- slapi_log_error(SLAPI_LOG_REPL, NULL, "repl5_inc_result_threadmain
starting\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "repl5_inc_result_threadmain
starting\n");
while (!finished)
{
LDAPControl **returned_controls = NULL;
@@ -274,7 +274,7 @@ repl5_inc_result_threadmain(void *param)
while (!finished)
{
conres = conn_read_result_ex(conn, NULL, NULL, &returned_controls, LDAP_RES_ANY,
&message_id, 0);
- slapi_log_error(SLAPI_LOG_REPL, NULL, "repl5_inc_result_threadmain: read result
for message_id %d\n", message_id);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "repl5_inc_result_threadmain:
read result for message_id %d\n", message_id);
/* Timeout here means that we didn't block, not a real timeout */
if (CONN_TIMEOUT == conres)
{
@@ -337,7 +337,7 @@ repl5_inc_result_threadmain(void *param)
}
conn_get_error_ex(conn, &operation_code, &connection_error,
&ldap_error_string);
- slapi_log_error(SLAPI_LOG_REPL, NULL,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL,
"repl5_inc_result_threadmain: result %d, %d, %d, %d, %s\n",
operation_code,connection_error,conres,message_id,ldap_error_string);
return_value = repl5_inc_update_from_op_result(rd->prp, conres, connection_error,
@@ -345,7 +345,7 @@ repl5_inc_result_threadmain(void *param)
&(rd->num_changes_sent));
if (return_value || should_finish)
{
- slapi_log_error(SLAPI_LOG_REPL, NULL,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL,
"repl5_inc_result_threadmain: got op result %d should finish
%d\n",
return_value, should_finish);
/* If so then we need to take steps to abort the update process */
@@ -374,7 +374,7 @@ repl5_inc_result_threadmain(void *param)
if (!finished && yield_session && rd->abort != SESSION_ABORTED
&& rd->abort_time == 0) {
rd->abort_time = time( NULL );
rd->abort = SESSION_ABORTED; /* only set the abort time once */
- slapi_log_error(SLAPI_LOG_REPL, "repl5_inc_result_threadmain",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "repl5_inc_result_threadmain",
"Abort control detected, setting abort time...(%s)\n",
agmt_get_long_name(rd->prp->agmt));
}
@@ -388,7 +388,7 @@ repl5_inc_result_threadmain(void *param)
repl5_inc_op_free(op);
}
}
- slapi_log_error(SLAPI_LOG_REPL, NULL, "repl5_inc_result_threadmain
exiting\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "repl5_inc_result_threadmain
exiting\n");
}
static result_data *
@@ -442,7 +442,7 @@ repl5_inc_create_async_result_thread(result_data *rd)
SLAPD_DEFAULT_THREAD_STACKSIZE);
if (NULL == tid)
{
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"repl5_tot_create_async_result_thread failed. "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
PR_GetError(), slapd_pr_strerror( PR_GetError() ));
@@ -499,7 +499,7 @@ repl5_inc_waitfor_async_results(result_data *rd)
/* Lock the structure to force memory barrier */
PR_Lock(rd->lock);
/* Are we caught up ? */
- slapi_log_error(SLAPI_LOG_REPL, NULL,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL,
"repl5_inc_waitfor_async_results: %d %d\n",
rd->last_message_id_received, rd->last_message_id_sent);
if (rd->last_message_id_received >= rd->last_message_id_sent) {
@@ -524,7 +524,7 @@ repl5_inc_waitfor_async_results(result_data *rd)
if (!done && (loops > 300))
{
/* Log a warning */
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"repl5_inc_waitfor_async_results timed out waiting for responses: %d
%d\n",
rd->last_message_id_received, rd->last_message_id_sent);
done = 1;
@@ -746,7 +746,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
} else if ((e1 = event_occurred(prp, EVENT_WINDOW_CLOSED)) ||
event_occurred(prp, EVENT_BACKOFF_EXPIRED)){
/* this events - should not occur - log a warning and go to sleep */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Incremental protocol: "
"event %s should not occur in state %s; going to
sleep\n",
agmt_get_long_name(prp->agmt), e1 ? event2name(EVENT_WINDOW_CLOSED)
:
@@ -754,7 +754,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
protocol_sleep(prp, PR_INTERVAL_NO_TIMEOUT);
} else {
/* wait until window opens or an event occurs */
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: Incremental protocol: "
"waiting for update window to open\n",
agmt_get_long_name(prp->agmt));
protocol_sleep(prp, PR_INTERVAL_NO_TIMEOUT);
@@ -791,7 +791,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
wait_change_timer_set = 0;
} else if ((e1 = event_occurred(prp, EVENT_WINDOW_OPENED)) ||
event_occurred(prp, EVENT_BACKOFF_EXPIRED)){
/* this events - should not occur - log a warning and clear the event */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "%s: Incremental
protocol: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "%s:
Incremental protocol: "
"event %s should not occur in state
%s\n",agmt_get_long_name(prp->agmt),
e1 ? event2name(EVENT_WINDOW_OPENED) :
event2name(EVENT_BACKOFF_EXPIRED),
state2name(current_state));
@@ -859,7 +859,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
event_occurred (prp, EVENT_BACKOFF_EXPIRED)){
/* This should never happen */
/* this events - should not occur - log a warning and go to sleep */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Incremental protocol: event %s should not occur in state
%s\n",
agmt_get_long_name(prp->agmt),
e1 ? event2name(EVENT_WINDOW_OPENED) :
event2name(EVENT_BACKOFF_EXPIRED),
@@ -934,7 +934,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
time(&now);
next_fire_time = backoff_step(prp_priv->backoff);
/* And go back to sleep */
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: Replication session backing off for %ld seconds\n",
agmt_get_long_name(prp->agmt),next_fire_time - now);
protocol_sleep(prp, PR_INTERVAL_NO_TIMEOUT);
@@ -959,7 +959,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
}
} else if (event_occurred(prp, EVENT_WINDOW_OPENED)){
/* this should never happen - log an error and go to sleep */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "%s: Incremental
protocol: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "%s:
Incremental protocol: "
"event %s should not occur in state %s; going to sleep\n",
agmt_get_long_name(prp->agmt), event2name(EVENT_WINDOW_OPENED),
state2name(current_state));
@@ -1006,7 +1006,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
agmt_set_consumer_schema_csn ( prp->agmt, cons_schema_csn );
}
if (CONN_SCHEMA_UPDATED != rc && CONN_SCHEMA_NO_UPDATE_NEEDED != rc){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Warning: unable to replicate schema: rc=%d\n",
agmt_get_long_name(prp->agmt), rc);
/* But keep going */
}
@@ -1021,7 +1021,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
next_state = STATE_STOP_FATAL_ERROR;
break;
case EXAMINE_RUV_PRISTINE_REPLICA:
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Replica has no update vector. It has never been
initialized.\n",
agmt_get_long_name(prp->agmt));
agmt_set_last_update_status(prp->agmt, 0, NSDS50_REPL_RUV_ERROR,
@@ -1029,7 +1029,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
next_state = STATE_BACKOFF_START;
break;
case EXAMINE_RUV_GENERATION_MISMATCH:
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: The remote replica has a different database generation ID
than "
"the local database. You may have to reinitialize the remote
replica, "
"or the local replica.\n",
agmt_get_long_name(prp->agmt));
@@ -1039,7 +1039,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
next_state = STATE_BACKOFF_START;
break;
case EXAMINE_RUV_REPLICA_TOO_OLD:
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Replica update vector is too out of date to bring "
"into sync using the incremental protocol. The replica "
"must be reinitialized.\n",
agmt_get_long_name(prp->agmt));
@@ -1056,14 +1056,14 @@ repl5_inc_run(Private_Repl_Protocol *prp)
object_release (prp->replica_object);
replica = NULL;
if (rc == CSN_LIMIT_EXCEEDED) /* too much skew */ {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Incremental protocol: fatal error - too much time
skew between replicas!\n",
agmt_get_long_name(prp->agmt));
agmt_set_last_update_status(prp->agmt, 0,
NSDS50_REPL_EXCESSIVE_CLOCK_SKEW,
"fatal error - too much time skew between
replicas");
next_state = STATE_STOP_FATAL_ERROR;
} else if (rc != 0) /* internal error */ {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Incremental protocol: fatal internal error updating
the CSN generator!\n",
agmt_get_long_name(prp->agmt));
agmt_set_last_update_status(prp->agmt, 0,
NSDS50_REPL_INTERNAL_ERROR,
@@ -1152,7 +1152,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
loops = pausetime;
/* the while loop is so that we don't just sleep and sleep if an
* event comes in that we should handle immediately (like shutdown) */
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: Pausing updates for %ld seconds to allow other suppliers
to update consumer\n",
agmt_get_long_name(prp->agmt), pausetime);
while (loops-- && !(PROTOCOL_IS_SHUTDOWN(prp))){
@@ -1171,7 +1171,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
* We encountered some sort of a fatal error. Suspend.
*/
dev_debug("repl5_inc_run(STATE_STOP_FATAL_ERROR)");
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Incremental update failed and requires administrator
action\n",
agmt_get_long_name(prp->agmt));
next_state = STATE_STOP_FATAL_ERROR_PART2;
@@ -1220,7 +1220,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
break;
}
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,"%s: State: %s ->
%s\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,"%s: State: %s
-> %s\n",
agmt_get_long_name(prp->agmt),state2name(current_state),
state2name(next_state));
current_state = next_state;
@@ -1248,7 +1248,7 @@ protocol_sleep(Private_Repl_Protocol *prp, PRIntervalTime duration)
PR_WaitCondVar(prp->cvar, duration);
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: Incremental protocol: can't go to sleep: event bits - %x\n",
agmt_get_long_name(prp->agmt), prp->eventbits);
}
@@ -1338,7 +1338,7 @@ replay_update(Private_Repl_Protocol *prp, slapi_operation_parameters
*op, int *m
if (create_NSDS50ReplUpdateInfoControl(op->target_address.uniqueid,
parentuniqueid, op->csn, modrdn_mods, &update_control) != LDAP_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: replay_update: Unable to create NSDS50ReplUpdateInfoControl "
"for operation with csn %s. Skipping update.\n",
agmt_get_long_name(prp->agmt), csn_as_string(op->csn, PR_FALSE, csn_str));
@@ -1346,7 +1346,7 @@ replay_update(Private_Repl_Protocol *prp, slapi_operation_parameters
*op, int *m
else
{
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: replay_update: Sending %s operation (dn=\"%s\"
csn=%s)\n",
agmt_get_long_name(prp->agmt),
op2string(op->operation_type), REPL_GET_DN(&op->target_address),
@@ -1364,7 +1364,7 @@ replay_update(Private_Repl_Protocol *prp, slapi_operation_parameters
*op, int *m
&entryattrs);
if (NULL == entryattrs)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: replay_update: Cannot convert entry to LDAPMods.\n",
agmt_get_long_name(prp->agmt));
return_value = CONN_LOCAL_ERROR;
@@ -1378,7 +1378,7 @@ replay_update(Private_Repl_Protocol *prp, slapi_operation_parameters
*op, int *m
}
if (MODS_ARE_EMPTY(entryattrs)) {
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: replay_update: %s operation (dn=\"%s\" csn=%s) "
"not sent - empty\n",
agmt_get_long_name(prp->agmt),
@@ -1403,7 +1403,7 @@ replay_update(Private_Repl_Protocol *prp, slapi_operation_parameters
*op, int *m
}
if (MODS_ARE_EMPTY(op->p.p_modify.modify_mods)) {
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: replay_update: %ss operation (dn=\"%s\" csn=%s) "
"not sent - empty\n",
agmt_get_long_name(prp->agmt),
@@ -1430,7 +1430,7 @@ replay_update(Private_Repl_Protocol *prp, slapi_operation_parameters
*op, int *m
update_control, message_id);
break;
default:
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "%s: replay_update: Unknown
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "%s: replay_update:
Unknown "
"operation type %lu found in changelog - skipping change.\n",
agmt_get_long_name(prp->agmt), op->operation_type);
}
@@ -1441,7 +1441,7 @@ replay_update(Private_Repl_Protocol *prp, slapi_operation_parameters
*op, int *m
if (CONN_OPERATION_SUCCESS == return_value)
{
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: replay_update: Consumer successfully sent operation with csn
%s\n",
agmt_get_long_name(prp->agmt), csn_as_string(op->csn, PR_FALSE, csn_str));
}
@@ -1449,7 +1449,7 @@ replay_update(Private_Repl_Protocol *prp, slapi_operation_parameters
*op, int *m
else
{
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: replay_update: Consumer could not replay operation with csn %s\n",
agmt_get_long_name(prp->agmt), csn_as_string(op->csn, PR_FALSE, csn_str));
}
@@ -1524,7 +1524,9 @@ repl5_inc_update_from_op_result(Private_Repl_Protocol *prp,
ConnResult replay_cr
{
agmt_inc_last_update_changecount (prp->agmt, replica_id, 1 /*skipped*/);
}
- slapi_log_error(*finished ? SLAPI_LOG_FATAL : slapi_log_urp, repl_plugin_name,
+ slapi_log_error(*finished ? SLAPI_LOG_FATAL : slapi_log_urp,
+ *finished ? LOG_ERR : LOG_DEBUG,
+ repl_plugin_name,
"%s: Consumer failed to replay change (uniqueid %s, CSN %s): %s (%d).
%s.\n",
agmt_get_long_name(prp->agmt),
uniqueid, csn_str,
@@ -1537,7 +1539,7 @@ repl5_inc_update_from_op_result(Private_Repl_Protocol *prp,
ConnResult replay_cr
return_value = UPDATE_CONNECTION_LOST;
*finished = 1;
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Consumer failed to replay change (uniqueid %s, CSN %s): "
"%s(%d). Will retry later.\n",
agmt_get_long_name(prp->agmt),
@@ -1549,7 +1551,7 @@ repl5_inc_update_from_op_result(Private_Repl_Protocol *prp,
ConnResult replay_cr
{
return_value = UPDATE_TIMEOUT;
*finished = 1;
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Consumer timed out to replay change (uniqueid %s, CSN %s): "
"%s.\n",
agmt_get_long_name(prp->agmt),
@@ -1564,7 +1566,7 @@ repl5_inc_update_from_op_result(Private_Repl_Protocol *prp,
ConnResult replay_cr
*/
return_value = UPDATE_TRANSIENT_ERROR;
*finished = 1;
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Failed to replay change (uniqueid %s, CSN %s): "
"Local error. Will retry later.\n",
agmt_get_long_name(prp->agmt),
@@ -1622,7 +1624,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
switch (rc)
{
case CL5_BAD_DATA: /* invalid parameter passed to the function */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Invalid parameter passed to cl5CreateReplayIterator\n",
agmt_get_long_name(prp->agmt));
agmt_set_last_update_status(prp->agmt, 0, NSDS50_REPL_CL_ERROR,
@@ -1630,7 +1632,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
return_value = UPDATE_FATAL_ERROR;
break;
case CL5_BAD_FORMAT: /* db data has unexpected format */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Unexpected format encountered in changelog database\n",
agmt_get_long_name(prp->agmt));
agmt_set_last_update_status(prp->agmt, 0, NSDS50_REPL_CL_ERROR,
@@ -1638,7 +1640,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
return_value = UPDATE_FATAL_ERROR;
break;
case CL5_BAD_STATE: /* changelog is in an incorrect state for attempted operation */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Changelog database was in an incorrect state\n",
agmt_get_long_name(prp->agmt));
agmt_set_last_update_status(prp->agmt, 0, NSDS50_REPL_CL_ERROR,
@@ -1646,7 +1648,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
return_value = UPDATE_FATAL_ERROR;
break;
case CL5_BAD_DBVERSION: /* changelog has invalid dbversion */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Incorrect dbversion found in changelog database\n",
agmt_get_long_name(prp->agmt));
agmt_set_last_update_status(prp->agmt, 0, NSDS50_REPL_CL_ERROR,
@@ -1654,7 +1656,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
return_value = UPDATE_FATAL_ERROR;
break;
case CL5_DB_ERROR: /* database error */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: A changelog database error was encountered\n",
agmt_get_long_name(prp->agmt));
agmt_set_last_update_status(prp->agmt, 0, NSDS50_REPL_CL_ERROR,
@@ -1662,13 +1664,13 @@ send_updates(Private_Repl_Protocol *prp, RUV
*remote_update_vector, PRUint32 *nu
return_value = UPDATE_FATAL_ERROR;
break;
case CL5_NOTFOUND: /* we have no changes to send */
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: No changes to send\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_NO_MORE_UPDATES;
break;
case CL5_MEMORY_ERROR: /* memory allocation failed */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Memory allocation error occurred\n",
agmt_get_long_name(prp->agmt));
agmt_set_last_update_status(prp->agmt, 0, NSDS50_REPL_CL_ERROR,
@@ -1676,31 +1678,31 @@ send_updates(Private_Repl_Protocol *prp, RUV
*remote_update_vector, PRUint32 *nu
return_value = UPDATE_FATAL_ERROR;
break;
case CL5_SYSTEM_ERROR: /* NSPR error occurred: use PR_GetError for further info */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: An NSPR error (%d) occurred\n",
agmt_get_long_name(prp->agmt), PR_GetError());
return_value = UPDATE_TRANSIENT_ERROR;
break;
case CL5_CSN_ERROR: /* CSN API failed */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: A CSN API failure was encountered\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_TRANSIENT_ERROR;
break;
case CL5_RUV_ERROR: /* RUV API failed */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: An RUV API failure occurred\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_TRANSIENT_ERROR;
break;
case CL5_OBJSET_ERROR: /* namedobjset api failed */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: A namedobject API failure occurred\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_TRANSIENT_ERROR;
break;
case CL5_PURGED_DATA: /* requested data has been purged */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Data required to update replica has been purged from the changelog. "
"The replica must be reinitialized.\n",
agmt_get_long_name(prp->agmt));
@@ -1710,7 +1712,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
return_value = UPDATE_FATAL_ERROR;
break;
case CL5_MISSING_DATA: /* data should be in the changelog, but is missing */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Missing data encountered\n",
agmt_get_long_name(prp->agmt));
agmt_set_last_update_status(prp->agmt, 0, NSDS50_REPL_CL_ERROR,
@@ -1718,13 +1720,13 @@ send_updates(Private_Repl_Protocol *prp, RUV
*remote_update_vector, PRUint32 *nu
return_value = UPDATE_FATAL_ERROR;
break;
case CL5_UNKNOWN_ERROR: /* unclassified error */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: An unknown error was encountered\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_TRANSIENT_ERROR;
break;
default:
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: An unknown error (%d) occurred "
"(cl5CreateReplayIterator)\n",
agmt_get_long_name(prp->agmt), rc);
@@ -1749,7 +1751,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
{
rc = repl5_inc_create_async_result_thread(rd);
if (rc) {
- slapi_log_error (SLAPI_LOG_FATAL, repl_plugin_name, "%s: repl5_inc_run: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "%s: repl5_inc_run:
"
"repl5_inc_create_async_result_thread failed; error - %d\n",
agmt_get_long_name(prp->agmt), rc);
agmt_set_last_update_status(prp->agmt, 0, rc, "Failed to create result
thread");
@@ -1770,7 +1772,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
/* check that we don't return dummy entries */
if (is_dummy_operation (entry.op))
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: changelog iteration code returned a dummy entry with csn %s, "
"skipping ...\n",
agmt_get_long_name(prp->agmt), csn_as_string(entry.op->csn, PR_FALSE,
csn_str));
@@ -1800,7 +1802,8 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
{
agmt_inc_last_update_changecount (prp->agmt,
csn_get_replicaid(entry.op->csn), 1 /*skipped*/);
}
- slapi_log_error(finished ? SLAPI_LOG_FATAL : slapi_log_urp, repl_plugin_name,
+ slapi_log_error(finished ? SLAPI_LOG_FATAL : slapi_log_urp,
+ finished ? LOG_ERR : LOG_DEBUG, repl_plugin_name,
"%s: Failed to send update operation to consumer (uniqueid %s, CSN %s): %s.
%s.\n",
agmt_get_long_name(prp->agmt),
entry.op->target_address.uniqueid, csn_str,
@@ -1813,7 +1816,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
return_value = UPDATE_CONNECTION_LOST;
finished = 1;
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Failed to send update operation to consumer (uniqueid %s, CSN %s):
"
"%s. Will retry later.\n",
agmt_get_long_name(prp->agmt),
@@ -1824,7 +1827,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
{
return_value = UPDATE_TIMEOUT;
finished = 1;
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Timed out sending update operation to consumer (uniqueid %s, CSN %s):
"
"%s.\n",
agmt_get_long_name(prp->agmt),
@@ -1839,7 +1842,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
*/
return_value = UPDATE_TRANSIENT_ERROR;
finished = 1;
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Failed to send update operation to consumer (uniqueid %s, CSN %s):
"
"Local error. Will retry later.\n",
agmt_get_long_name(prp->agmt),
@@ -1889,7 +1892,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
repl5_int_push_operation(rd,sop);
repl5_inc_flow_control_results(prp->agmt, rd);
} else {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: Skipping update operation with no message_id (uniqueid %s, CSN
%s):\n",
agmt_get_long_name(prp->agmt),
entry.op->target_address.uniqueid, csn_str);
@@ -1898,7 +1901,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
{
skipped_updates++;
if (skipped_updates > FRACTIONAL_SKIPPED_THRESHOLD) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: skipped updates is too high (%d) if no other update is sent we will
update the subentry\n",
agmt_get_long_name(prp->agmt), skipped_updates);
subentry_update_needed = PR_TRUE;
@@ -1908,7 +1911,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
}
break;
case CL5_BAD_DATA:
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Invalid parameter passed to cl5GetNextOperationToReplay\n",
agmt_get_long_name(prp->agmt));
agmt_set_last_update_status(prp->agmt, 0, NSDS50_REPL_CL_ERROR,
@@ -1917,14 +1920,14 @@ send_updates(Private_Repl_Protocol *prp, RUV
*remote_update_vector, PRUint32 *nu
finished = 1;
break;
case CL5_NOTFOUND:
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: No more updates to send (cl5GetNextOperationToReplay)\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_NO_MORE_UPDATES;
finished = 1;
break;
case CL5_DB_ERROR:
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: A database error occurred (cl5GetNextOperationToReplay)\n",
agmt_get_long_name(prp->agmt));
agmt_set_last_update_status(prp->agmt, 0, NSDS50_REPL_CL_ERROR,
@@ -1933,12 +1936,12 @@ send_updates(Private_Repl_Protocol *prp, RUV
*remote_update_vector, PRUint32 *nu
finished = 1;
break;
case CL5_BAD_FORMAT:
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: A malformed changelog entry was encountered
(cl5GetNextOperationToReplay)\n",
agmt_get_long_name(prp->agmt));
break;
case CL5_MEMORY_ERROR:
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: A memory allocation error occurred (cl5GetNextOperationToReplay)\n",
agmt_get_long_name(prp->agmt));
agmt_set_last_update_status(prp->agmt, 0, NSDS50_REPL_CL_ERROR,
@@ -1948,7 +1951,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
case CL5_IGNORE_OP:
break;
default:
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Unknown error code (%d) returned from
cl5GetNextOperationToReplay\n",
agmt_get_long_name(prp->agmt), rc);
return_value = UPDATE_TRANSIENT_ERROR;
@@ -1974,7 +1977,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
rd->result = UPDATE_YIELD;
return_value = UPDATE_YIELD;
finished = 1;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"Aborting send_updates...(%s)\n",
agmt_get_long_name(rd->prp->agmt));
}
@@ -1997,12 +2000,12 @@ send_updates(Private_Repl_Protocol *prp, RUV
*remote_update_vector, PRUint32 *nu
{
rid = replica_get_rid(replica);
}
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: skipped updates was definitely too high (%d) update the subentry
now\n",
agmt_get_long_name(prp->agmt), skipped_updates);
replarea_sdn = agmt_get_replarea(prp->agmt);
if (!replarea_sdn) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"send_updates: Unknown replication area due to agreement not
found.");
agmt_set_last_update_status(prp->agmt, 0, -1, "Agreement is corrupted:
missing suffix");
return_value = UPDATE_FATAL_ERROR;
@@ -2036,7 +2039,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
rc = repl5_inc_destroy_async_result_thread(rd);
if (rc) {
- slapi_log_error (SLAPI_LOG_FATAL, repl_plugin_name, "%s: repl5_inc_run: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "%s: repl5_inc_run:
"
"repl5_tot_destroy_async_result_thread failed; error - %d\n",
agmt_get_long_name(prp->agmt), rc);
}
@@ -2044,7 +2047,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
}
PR_Lock(rd->lock);
if (rd->flowcontrol_detection) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: Incremental update flow control triggered %d times\n"
"You may increase %s and/or decrease %s in the replica agreement
configuration\n",
agmt_get_long_name(prp->agmt),
@@ -2099,21 +2102,21 @@ repl5_inc_stop(Private_Repl_Protocol *prp)
{
/* Isn't listening. Do something drastic. */
return_value = -1;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: repl5_inc_stop: protocol does not stop after %" NSPRIu64 "
seconds\n",
agmt_get_long_name(prp->agmt), timeout);
}
else
{
return_value = 0;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: repl5_inc_stop: protocol stopped after %d seconds\n",
agmt_get_long_name(prp->agmt),
PR_IntervalToSeconds(now-start));
}
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
if (NULL == prp->replica_object) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: repl5_inc_stop: protocol replica_object is NULL\n",
agmt_get_long_name(prp->agmt));
} else {
@@ -2121,13 +2124,13 @@ repl5_inc_stop(Private_Repl_Protocol *prp)
object_acquire(prp->replica_object);
replica = object_get_data(prp->replica_object);
if (NULL == replica) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: repl5_inc_stop: replica is NULL\n",
agmt_get_long_name(prp->agmt));
} else {
Object *ruv_obj = replica_get_ruv(replica);
if (NULL == ruv_obj) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: repl5_inc_stop: ruv_obj is NULL\n",
agmt_get_long_name(prp->agmt));
} else {
@@ -2135,7 +2138,7 @@ repl5_inc_stop(Private_Repl_Protocol *prp)
object_acquire(ruv_obj);
ruv = (RUV*)object_get_data (ruv_obj);
if (NULL == ruv) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: repl5_inc_stop: ruv is NULL\n",
agmt_get_long_name(prp->agmt));
diff --git a/ldap/servers/plugins/replication/repl5_init.c
b/ldap/servers/plugins/replication/repl5_init.c
index fd21901..1eac6f7 100644
--- a/ldap/servers/plugins/replication/repl5_init.c
+++ b/ldap/servers/plugins/replication/repl5_init.c
@@ -224,7 +224,7 @@ multimaster_preop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_PRE_COMPARE_FN, (void *)
multimaster_preop_compare ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_PRE_ENTRY_FN, (void *)
multimaster_ruv_search ) != 0)
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name, "multimaster_preop_init
failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"multimaster_preop_init failed\n" );
rc= -1;
}
return rc;
@@ -245,7 +245,7 @@ multimaster_postop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_POST_MODIFY_FN, (void *) multimaster_postop_modify )
!= 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_POST_MODRDN_FN, (void *)
multimaster_postop_modrdn ) != 0 )
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name, "multimaster_postop_init
failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"multimaster_postop_init failed\n" );
rc= -1;
}
@@ -264,7 +264,7 @@ multimaster_internalpreop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_INTERNAL_PRE_MODIFY_FN, (void *)
multimaster_preop_modify ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_INTERNAL_PRE_MODRDN_FN, (void *)
multimaster_preop_modrdn ) != 0 )
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name,
"multimaster_internalpreop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"multimaster_internalpreop_init failed\n" );
rc= -1;
}
return rc;
@@ -282,7 +282,7 @@ multimaster_internalpostop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_INTERNAL_POST_MODIFY_FN, (void *)
multimaster_postop_modify ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_INTERNAL_POST_MODRDN_FN, (void *)
multimaster_postop_modrdn ) != 0 )
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name,
"multimaster_internalpostop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"multimaster_internalpostop_init failed\n" );
rc= -1;
}
@@ -307,7 +307,7 @@ multimaster_bepreop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_BE_PRE_CLOSE_FN, (void *) cl5Close ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_BE_PRE_BACKUP_FN, (void *) cl5WriteRUV ) != 0 )
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name, "multimaster_bepreop_init
failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"multimaster_bepreop_init failed\n" );
rc= -1;
}
@@ -342,7 +342,7 @@ multimaster_bepostop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_BE_POST_OPEN_FN, (void *) changelog5_init ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_BE_POST_BACKUP_FN, (void *) cl5DeleteRUV ) != 0 )
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name, "multimaster_bepostop_init
failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"multimaster_bepostop_init failed\n" );
rc= -1;
}
@@ -364,7 +364,7 @@ multimaster_betxn_bepostop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_BE_POST_OPEN_FN, (void *) changelog5_init ) ||
slapi_pblock_set( pb, SLAPI_PLUGIN_BE_POST_BACKUP_FN, (void *) cl5DeleteRUV ) )
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name,
"multimaster_betxn_bepostop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"multimaster_betxn_bepostop_init failed\n" );
rc= -1;
}
@@ -399,7 +399,7 @@ multimaster_betxnpostop_init( Slapi_PBlock *pb )
slapi_pblock_set(pb, SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN, del_fn) ||
slapi_pblock_set(pb, SLAPI_PLUGIN_BE_TXN_POST_MODRDN_FN, mdn_fn) ||
slapi_pblock_set(pb, SLAPI_PLUGIN_BE_TXN_POST_MODIFY_FN, mod_fn)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"multimaster_betxnpostop_init failed\n");
rc = -1;
}
@@ -418,7 +418,7 @@ multimaster_start_extop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_NAMELIST, (void *)start_name_list ) != 0
||
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_FN, (void
*)multimaster_extop_StartNSDS50ReplicationRequest ))
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name, "multimaster_start_extop_init
(StartNSDS50ReplicationRequest) failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"multimaster_start_extop_init (StartNSDS50ReplicationRequest) failed\n" );
rc= -1;
}
@@ -439,7 +439,7 @@ multimaster_end_extop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_NAMELIST, (void *)end_name_list ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_FN, (void
*)multimaster_extop_EndNSDS50ReplicationRequest ))
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name, "multimaster_end_extop_init
(EndNSDS50ReplicationRequest) failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"multimaster_end_extop_init (EndNSDS50ReplicationRequest) failed\n" );
rc= -1;
}
@@ -462,7 +462,7 @@ multimaster_cleanruv_maxcsn_extop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_NAMELIST, (void
*)cleanruv_maxcsn_name_list ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_FN, (void
*)multimaster_extop_cleanruv_get_maxcsn ))
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name,
"multimaster_cleanruv_extop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"multimaster_cleanruv_extop_init failed\n" );
rc= -1;
}
@@ -485,7 +485,7 @@ multimaster_cleanruv_status_extop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_NAMELIST, (void
*)cleanruv_status_name_list ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_FN, (void
*)multimaster_extop_cleanruv_check_status ))
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name,
"multimaster_cleanruv_extop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"multimaster_cleanruv_extop_init failed\n" );
rc= -1;
}
@@ -509,7 +509,7 @@ multimaster_total_extop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_NAMELIST, (void *)total_name_list ) != 0
||
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_FN, (void
*)multimaster_extop_NSDS50ReplicationEntry ))
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name, "multimaster_start_extop_init
(NSDS50ReplicationEntry failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"multimaster_start_extop_init (NSDS50ReplicationEntry failed\n" );
rc= -1;
}
@@ -532,7 +532,7 @@ multimaster_response_extop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_NAMELIST, (void *)response_name_list ) != 0
||
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_FN, (void *)extop_noop ))
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name, "multimaster_start_extop_init
(NSDS50ReplicationResponse failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"multimaster_start_extop_init (NSDS50ReplicationResponse failed\n" );
rc= -1;
}
@@ -555,7 +555,7 @@ multimaster_cleanruv_extop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_NAMELIST, (void *)cleanruv_name_list ) != 0
||
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_FN, (void *)multimaster_extop_cleanruv ))
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name,
"multimaster_cleanruv_extop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"multimaster_cleanruv_extop_init failed\n" );
rc= -1;
}
@@ -578,7 +578,7 @@ multimaster_cleanruv_abort_extop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_NAMELIST, (void *)cleanruv_abort_name_list )
!= 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_FN, (void *)multimaster_extop_abort_cleanruv
))
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name,
"multimaster_cleanruv_abort_extop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"multimaster_cleanruv_abort_extop_init failed\n" );
rc= -1;
}
@@ -633,7 +633,7 @@ create_repl_schema_policy(void)
slapi_add_internal_pb(pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &return_value);
if (return_value != LDAP_SUCCESS && return_value != LDAP_ALREADY_EXISTS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Warning: unable
to "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Warning: unable to "
"create configuration entry %s: %s\n",
repl_schema_top,
ldap_err2string(return_value));
rc = -1;
@@ -653,7 +653,7 @@ create_repl_schema_policy(void)
slapi_add_internal_pb(pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &return_value);
if (return_value != LDAP_SUCCESS && return_value != LDAP_ALREADY_EXISTS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Warning: unable
to "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Warning: unable to "
"create configuration entry %s: %s\n",
repl_schema_supplier,
ldap_err2string(return_value));
rc = -1;
@@ -673,7 +673,7 @@ create_repl_schema_policy(void)
slapi_add_internal_pb(pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &return_value);
if (return_value != LDAP_SUCCESS && return_value != LDAP_ALREADY_EXISTS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Warning: unable
to "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Warning: unable to "
"create configuration entry %s: %s\n",
repl_schema_consumer,
ldap_err2string(return_value));
rc = -1;
@@ -687,7 +687,7 @@ create_repl_schema_policy(void)
/* Load the policies of the schema replication */
if (slapi_schema_load_repl_policies()) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Warning: unable
to "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Warning: unable to "
"load the schema replication policies\n");
rc = -1;
goto done;
diff --git a/ldap/servers/plugins/replication/repl5_mtnode_ext.c
b/ldap/servers/plugins/replication/repl5_mtnode_ext.c
index c5f8aaf..034b99c 100644
--- a/ldap/servers/plugins/replication/repl5_mtnode_ext.c
+++ b/ldap/servers/plugins/replication/repl5_mtnode_ext.c
@@ -62,7 +62,7 @@ multimaster_mtnode_construct_replicas ()
mtnode = slapi_get_mapping_tree_node_by_dn(root);
if (mtnode == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"multimaster_mtnode_construct_replicas: "
"failed to locate mapping tree node for %s\n",
slapi_sdn_get_dn (root));
@@ -72,7 +72,7 @@ multimaster_mtnode_construct_replicas ()
ext = (multimaster_mtnode_extension *)repl_con_get_ext (REPL_CON_EXT_MTNODE, mtnode);
if (ext == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"multimaster_mtnode_construct_replicas: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"multimaster_mtnode_construct_replicas: "
"failed to locate replication extension of mapping tree node for
%s\n",
slapi_sdn_get_dn (root));
continue;
@@ -147,7 +147,7 @@ replica_get_replica_from_dn (const Slapi_DN *dn)
mtnode = slapi_get_mapping_tree_node_by_dn(dn);
if (mtnode == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"replica_get_replica_from_dn: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"replica_get_replica_from_dn: "
"failed to locate mapping tree node for %s\n",
slapi_sdn_get_dn (dn));
return NULL;
@@ -156,7 +156,7 @@ replica_get_replica_from_dn (const Slapi_DN *dn)
ext = (multimaster_mtnode_extension *)repl_con_get_ext (REPL_CON_EXT_MTNODE,
mtnode);
if (ext == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"replica_get_replica_from_dn: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"replica_get_replica_from_dn: "
"failed to locate replication extension of mapping tree node
for %s\n",
slapi_sdn_get_dn (dn));
return NULL;
diff --git a/ldap/servers/plugins/replication/repl5_plugins.c
b/ldap/servers/plugins/replication/repl5_plugins.c
index b331c81..51f4a2d 100644
--- a/ldap/servers/plugins/replication/repl5_plugins.c
+++ b/ldap/servers/plugins/replication/repl5_plugins.c
@@ -79,7 +79,7 @@ multimaster_set_local_purl()
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "multimaster_set_local_purl:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"multimaster_set_local_purl: "
"unable to read server configuration: error %d\n", rc);
}
else
@@ -87,7 +87,7 @@ multimaster_set_local_purl()
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries);
if (NULL == entries || NULL == entries[0])
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "multimaster_set_local_purl:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"multimaster_set_local_purl: "
"server configuration missing\n");
rc = -1;
}
@@ -98,7 +98,7 @@ multimaster_set_local_purl()
char *sslport = slapi_entry_attr_get_charptr(entries[0],
"nsslapd-secureport");
if (host == NULL || ((port == NULL && sslport == NULL)))
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"multimaster_set_local_purl: invalid server "
"configuration\n");
}
@@ -189,7 +189,7 @@ multimaster_preop_add (Slapi_PBlock *pb)
int drc = decode_NSDS50ReplUpdateInfoControl(ctrlp, &target_uuid,
&superior_uuid, &csn, NULL /* modrdn_mods */);
if (-1 == drc)
{
- slapi_log_error(SLAPI_LOG_FATAL, REPLICATION_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REPLICATION_SUBSYSTEM,
"%s An error occurred while decoding the replication
update "
"control - Add\n", sessionid);
}
@@ -240,7 +240,7 @@ multimaster_preop_add (Slapi_PBlock *pb)
{
if(strcasecmp(entry_uuid,target_uuid)!=0)
{
- slapi_log_error(SLAPI_LOG_FATAL, REPLICATION_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
REPLICATION_SUBSYSTEM,
"%s Replicated Add received with Control_UUID=%s
and Entry_UUID=%s.\n",
sessionid, target_uuid,entry_uuid);
}
@@ -318,7 +318,7 @@ multimaster_preop_delete (Slapi_PBlock *pb)
int drc = decode_NSDS50ReplUpdateInfoControl(ctrlp, &target_uuid,
NULL, &csn, NULL /* modrdn_mods */);
if (-1 == drc)
{
- slapi_log_error(SLAPI_LOG_FATAL, REPLICATION_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REPLICATION_SUBSYSTEM,
"%s An error occurred while decoding the replication
update "
"control - Delete\n", sessionid);
}
@@ -331,7 +331,7 @@ multimaster_preop_delete (Slapi_PBlock *pb)
slapi_send_ldap_result(pb, LDAP_SUCCESS, 0,
"replication operation not processed, replica
unavailable "
"or csn ignored", 0, 0);
- slapi_log_error(SLAPI_LOG_REPL, REPLICATION_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG,
REPLICATION_SUBSYSTEM,
"%s replication operation not processed, replica
unavailable "
"or csn ignored\n", sessionid);
csn_free (&csn);
@@ -417,7 +417,7 @@ multimaster_preop_modify (Slapi_PBlock *pb)
int drc = decode_NSDS50ReplUpdateInfoControl(ctrlp, &target_uuid,
NULL, &csn, NULL /* modrdn_mods */);
if (-1 == drc)
{
- slapi_log_error(SLAPI_LOG_FATAL, REPLICATION_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REPLICATION_SUBSYSTEM,
"%s An error occurred while decoding the replication
update "
"control- Modify\n", sessionid);
}
@@ -430,7 +430,7 @@ multimaster_preop_modify (Slapi_PBlock *pb)
slapi_send_ldap_result(pb, LDAP_SUCCESS, 0,
"replication operation not processed, replica
unavailable "
"or csn ignored", 0, 0);
- slapi_log_error(SLAPI_LOG_REPL, REPLICATION_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG,
REPLICATION_SUBSYSTEM,
"%s replication operation not processed, replica
unavailable "
"or csn ignored\n", sessionid);
csn_free (&csn);
@@ -522,7 +522,7 @@ multimaster_preop_modrdn (Slapi_PBlock *pb)
&csn, &modrdn_mods);
if (-1 == drc)
{
- slapi_log_error(SLAPI_LOG_FATAL, REPLICATION_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REPLICATION_SUBSYSTEM,
"%s An error occurred while decoding the replication
update "
"control - ModRDN\n", sessionid);
}
@@ -692,7 +692,7 @@ purge_entry_state_information (Slapi_PBlock *pb)
/* conntion is always null */
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
char csn_str[CSN_STRSIZE];
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"Purged state information from entry %s up to
"
"CSN %s\n", slapi_entry_get_dn(e),
csn_as_string(purge_csn, PR_FALSE, csn_str));
@@ -959,13 +959,13 @@ copy_operation_parameters(Slapi_PBlock *pb)
since client operations don't go through urp engine and pblock data can be
logged */
slapi_pblock_get( pb, SLAPI_OPERATION, &op );
if (NULL == op) {
- slapi_log_error(SLAPI_LOG_REPL, REPLICATION_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, REPLICATION_SUBSYSTEM,
"copy_operation_parameters: operation is
null.\n");
return;
}
replica = (Replica*)object_get_data (repl_obj);
if (NULL == replica) {
- slapi_log_error(SLAPI_LOG_REPL, REPLICATION_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, REPLICATION_SUBSYSTEM,
"copy_operation_parameters: replica is null.\n");
return;
}
@@ -1150,7 +1150,7 @@ write_changelog_and_ruv (Slapi_PBlock *pb)
void *txn = NULL;
if (cl5_is_diskfull() && !cl5_diskspace_is_available())
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"write_changelog_and_ruv: Skipped due to DISKFULL\n");
return return_value;
}
@@ -1161,7 +1161,7 @@ write_changelog_and_ruv (Slapi_PBlock *pb)
{
char csn_str[CSN_STRSIZE];
/* ONREPL - log error */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"write_changelog_and_ruv: can't add a change for "
"%s (uniqid: %s, optype: %lu) to changelog csn %s\n",
REPL_GET_DN(&op_params->target_address),
@@ -1206,13 +1206,13 @@ write_changelog_and_ruv (Slapi_PBlock *pb)
}
rc = update_ruv_component(r, opcsn, pb);
if (RUV_COVERS_CSN == rc) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"write_changelog_and_ruv: RUV already covers csn for "
"%s (uniqid: %s, optype: %lu) csn %s\n",
dn, uniqueid, optype,
csn_as_string(oppcsn, PR_FALSE, csn_str));
} else if ((rc != RUV_SUCCESS) && (rc != RUV_NOTFOUND)) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"write_changelog_and_ruv: failed to update RUV for "
"%s (uniqid: %s, optype: %lu) to changelog csn %s - rc %d\n",
dn, uniqueid, optype,
@@ -1274,7 +1274,7 @@ process_postop (Slapi_PBlock *pb)
rc = cancel_opcsn (pb);
/* Don't try to get session id since conn is always null */
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s process postop: canceling operation csn\n", sessionid);
} else {
rc = SLAPI_PLUGIN_FAILURE;
@@ -1325,7 +1325,7 @@ process_postop (Slapi_PBlock *pb)
slapi_pblock_get(pb, SLAPI_CONN_ID, &connid);
if (conn)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"process_postop: Failed to apply update (%s) error (%d). "
"Aborting replication session(conn=%" NSPRIu64 " op=%d)\n",
csn_as_string(opcsn, PR_FALSE, csn_str), retval,
@@ -1463,7 +1463,7 @@ process_operation (Slapi_PBlock *pb, const CSN *csn)
{
char sessionid[REPL_SESSION_ID_SIZE];
get_repl_session_id (pb, sessionid, NULL);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "%s process_operation:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "%s
process_operation: "
"can't locate replica for the replicated operation\n",
sessionid );
return PR_FALSE;
@@ -1535,7 +1535,7 @@ static const char *replica_get_purl_for_op (const Replica *r,
Slapi_PBlock *pb,
{
char sessionid[REPL_SESSION_ID_SIZE];
get_repl_session_id (pb, sessionid, NULL);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "%s replica_get_purl_for_op:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "%s
replica_get_purl_for_op: "
"cannot obtain consumer connection extension or
supplier_ruv.\n",
sessionid);
}
@@ -1614,7 +1614,7 @@ multimaster_be_state_change (void *handle, char *be_name, int
old_be_state, int
if (new_be_state == SLAPI_BE_STATE_ON)
{
/* backend came back online - restart replication */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"multimaster_be_state_change: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"multimaster_be_state_change: "
"replica %s is coming online; enabling replication\n",
slapi_sdn_get_ndn (replica_get_root (r)));
replica_enable_replication (r);
@@ -1622,7 +1622,7 @@ multimaster_be_state_change (void *handle, char *be_name, int
old_be_state, int
else if (new_be_state == SLAPI_BE_STATE_OFFLINE)
{
/* backend is about to be taken down - disable replication */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"multimaster_be_state_change: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"multimaster_be_state_change: "
"replica %s is going offline; disabling replication\n",
slapi_sdn_get_ndn (replica_get_root (r)));
replica_disable_replication (r, r_obj);
@@ -1632,7 +1632,7 @@ multimaster_be_state_change (void *handle, char *be_name, int
old_be_state, int
/* backend is about to be removed - disable replication */
if (old_be_state == SLAPI_BE_STATE_ON)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"multimaster_be_state_change: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"multimaster_be_state_change: "
"replica %s is about to be deleted; disabling replication\n",
slapi_sdn_get_ndn (replica_get_root (r)));
replica_disable_replication (r, r_obj);
diff --git a/ldap/servers/plugins/replication/repl5_protocol.c
b/ldap/servers/plugins/replication/repl5_protocol.c
index 7fdc1de..b735cc8 100644
--- a/ldap/servers/plugins/replication/repl5_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_protocol.c
@@ -85,7 +85,7 @@ prot_new(Repl_Agmt *agmt, int protocol_state)
if (NULL == rp->replica_object)
{
/* Whoa, no local replica!?!? */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Unable to locate replica object for local replica %s\n",
agmt_get_long_name(agmt),
slapi_sdn_get_dn(replarea_sdn));
@@ -246,7 +246,7 @@ prot_thread_main(void *arg)
agmt = rp->agmt;
if (!agmt) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "missing
replication agreement\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "missing
replication agreement\n");
return;
}
@@ -281,7 +281,7 @@ prot_thread_main(void *arg)
if (replica_is_state_flag_set(replica, REPLICA_TOTAL_EXCL_RECV))
{
object_release(replica_obj);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: total update on the replica is in progress. Cannot
initiate the total update.\n", agmt_get_long_name(rp->agmt));
break;
}
@@ -348,7 +348,7 @@ prot_start(Repl_Protocol *rp)
{
PRErrorCode prerr = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Unable to create protocol thread; NSPR error - %d, %s\n",
agmt_get_long_name(rp->agmt),
prerr, slapd_pr_strerror(prerr));
@@ -356,7 +356,7 @@ prot_start(Repl_Protocol *rp)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Unable to start "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Unable to start
"
"protocol object - NULL protocol object passed to prot_start.\n");
}
}
@@ -376,7 +376,7 @@ prot_stop(Repl_Protocol *rp)
{
if (rp->prp_incremental->stop(rp->prp_incremental) != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Warning: incremental protocol for replica \"%s\" "
"did not shut down properly.\n",
agmt_get_long_name(rp->agmt));
@@ -386,7 +386,7 @@ prot_stop(Repl_Protocol *rp)
{
if (rp->prp_total->stop(rp->prp_total) != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Warning: total protocol for replica \"%s\" "
"did not shut down properly.\n",
agmt_get_long_name(rp->agmt));
@@ -401,7 +401,7 @@ prot_stop(Repl_Protocol *rp)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Error: prot_stop() "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Error: prot_stop()
"
" called on NULL protocol instance.\n");
}
}
@@ -433,7 +433,7 @@ prot_notify_agmt_changed(Repl_Protocol *rp, char * agmt_name)
{
/* MAB: rp might be NULL for disabled suffixes. Don't ASSERT on it */
if (NULL == rp) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Replication agreement for %s could not be updated. "
"For replication to take place, please enable the suffix "
"and restart the server\n", agmt_name);
diff --git a/ldap/servers/plugins/replication/repl5_protocol_util.c
b/ldap/servers/plugins/replication/repl5_protocol_util.c
index 8be5d9b..62a2aa9 100644
--- a/ldap/servers/plugins/replication/repl5_protocol_util.c
+++ b/ldap/servers/plugins/replication/repl5_protocol_util.c
@@ -98,7 +98,7 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV **ruv)
if (prp->replica_acquired) /* we already acquire replica */
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Remote replica already acquired\n",
agmt_get_long_name(prp->agmt));
return_value = ACQUIRE_FATAL_ERROR;
@@ -266,7 +266,7 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV
**ruv)
/* Couldn't send the extended operation */
return_value = ACQUIRE_TRANSIENT_ERROR; /* XXX right return value? */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Unable to send a startReplication "
"extended operation to consumer (%s). Will retry later.\n",
agmt_get_long_name(prp->agmt),
@@ -298,7 +298,7 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV
**ruv)
{
/* XXXggood handle other error codes here */
case NSDS50_REPL_INTERNAL_ERROR:
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Unable to acquire replica: "
"an internal error occurred on the remote replica. "
"Replication is aborting.\n",
@@ -312,7 +312,7 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV
**ruv)
/* Not allowed to send updates */
{
char *repl_binddn = agmt_get_binddn(prp->agmt);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Unable to acquire replica: permission denied. "
"The bind dn \"%s\" does not have permission to "
"supply replication updates to the replica. "
@@ -331,7 +331,7 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV
**ruv)
/* There is no such replica on the consumer */
{
Slapi_DN *repl_root = agmt_get_replarea(prp->agmt);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Unable to acquire replica: there is no "
"replicated area \"%s\" on the consumer server. "
"Replication is aborting.\n",
@@ -347,7 +347,7 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV
**ruv)
}
case NSDS50_REPL_EXCESSIVE_CLOCK_SKEW:
/* Large clock skew between the consumer and the supplier */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Unable to acquire replica: "
"Excessive clock skew between the supplier and "
"the consumer. Replication is aborting.\n",
@@ -356,7 +356,7 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV
**ruv)
break;
case NSDS50_REPL_DECODING_ERROR:
/* We sent something the replica couldn't understand. */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Unable to acquire replica: "
"the consumer was unable to decode the "
"startReplicationRequest extended operation sent by the "
@@ -376,7 +376,7 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV
**ruv)
if (strcmp(REPL_NSDS50_TOTAL_PROTOCOL_OID,
prot_oid) == 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Unable to acquire replica: "
"the replica is currently being updated"
"by another supplier.\n",
@@ -384,7 +384,7 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV
**ruv)
}
else /* REPL_NSDS50_INCREMENTAL_PROTOCOL_OID */
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: Unable to acquire replica: "
"the replica is currently being updated"
"by another supplier. Will try later\n",
@@ -398,7 +398,7 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV
**ruv)
break;
case NSDS50_REPL_LEGACY_CONSUMER:
/* remote replica is a legacy consumer */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Unable to acquire replica: the replica "
"is supplied by a legacy supplier. "
"Replication is aborting.\n", agmt_get_long_name(prp->agmt));
@@ -409,7 +409,7 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV
**ruv)
break;
case NSDS50_REPL_REPLICAID_ERROR:
/* remote replica detected a duplicate ReplicaID */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Unable to aquire replica: the replica "
"has the same Replica ID as this one. "
"Replication is aborting.\n",
@@ -422,7 +422,7 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV
**ruv)
case NSDS50_REPL_BACKOFF:
/* A replication sesssion hook on the replica
* wants us to go into backoff mode. */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Unable to acquire
replica: "
"the replica instructed us
to go into "
"backoff mode. Will retry
later.\n",
@@ -462,7 +462,7 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV
**ruv)
}
/* We've acquired the replica. */
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: Replica was successfully acquired.\n",
agmt_get_long_name(prp->agmt));
/* Parse the update vector */
@@ -472,7 +472,7 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV
**ruv)
{
/* Couldn't parse the update vector */
*ruv = NULL;
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Warning: acquired replica, "
"but could not parse update vector. "
"The replica must be reinitialized.\n",
@@ -496,7 +496,7 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV
**ruv)
else
{
/* Couldn't parse the response */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Unable to parse the response to the "
"startReplication extended operation. "
"Replication is aborting.\n",
@@ -516,7 +516,7 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV
**ruv)
/* Couldn't send the extended operation */
return_value = ACQUIRE_TRANSIENT_ERROR; /* XXX right return value? */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Unable to receive the response for a startReplication "
"extended operation to consumer (%s). Will retry later.\n",
agmt_get_long_name(prp->agmt),
@@ -529,7 +529,7 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV
**ruv)
else
{
/* Couldn't get a current CSN */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Unable to obtain current CSN. "
"Replication is aborting.\n",
agmt_get_long_name(prp->agmt));
@@ -599,7 +599,7 @@ release_replica(Private_Repl_Protocol *prp)
{
int operation, error;
conn_get_error(prp->conn, &operation, &error);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Warning: unable to send endReplication extended operation (%s)\n",
agmt_get_long_name(prp->agmt),
error ? ldap_err2string(error) : "unknown error");
@@ -611,7 +611,7 @@ release_replica(Private_Repl_Protocol *prp)
{
int operation, error;
conn_get_error(prp->conn, &operation, &error);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Warning: Attempting to release replica, but unable to receive endReplication
extended "
"operation response from the replica. Error %d (%s)\n",
agmt_get_long_name(prp->agmt), error,
error ? ldap_err2string(error) : "unknown error");
@@ -629,7 +629,7 @@ release_replica(Private_Repl_Protocol *prp)
{
int operation, error;
conn_get_error(prp->conn, &operation, &error);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Warning: response message id does not match the request (%s)\n",
agmt_get_long_name(prp->agmt),
error ? ldap_err2string(error) : "unknown error");
@@ -649,12 +649,12 @@ release_replica(Private_Repl_Protocol *prp)
{
if (NSDS50_REPL_REPLICA_RELEASE_SUCCEEDED == extop_result)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: Successfully released consumer\n",
agmt_get_long_name(prp->agmt));
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Unable to release consumer: response code %d\n",
agmt_get_long_name(prp->agmt), extop_result);
/* disconnect from the consumer so that it does not stay locked */
@@ -664,7 +664,7 @@ release_replica(Private_Repl_Protocol *prp)
else
{
/* Couldn't parse the response */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Warning: Unable to parse the response "
" to the endReplication extended operation.\n",
agmt_get_long_name(prp->agmt));
diff --git a/ldap/servers/plugins/replication/repl5_replica.c
b/ldap/servers/plugins/replication/repl5_replica.c
index 7360d97..d7f2251 100644
--- a/ldap/servers/plugins/replication/repl5_replica.c
+++ b/ldap/servers/plugins/replication/repl5_replica.c
@@ -141,7 +141,7 @@ replica_new(const Slapi_DN *root)
if (NULL == r)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Unable to "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Unable to "
"configure replica %s: %s\n",
slapi_sdn_get_dn(root),
errorbuf);
@@ -267,7 +267,7 @@ replica_new_from_entry (Slapi_Entry *e, char *errortext, PRBool
is_add_operation
if (r->legacy_consumer)
{
legacy_consumer_init_referrals (r);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "replica_new_from_entry:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"replica_new_from_entry: "
"replica for %s was configured as legacy consumer\n",
slapi_sdn_get_dn(r->repl_root));
}
@@ -325,7 +325,7 @@ replica_destroy(void **arg)
PR_ASSERT(r);
- slapi_log_error (SLAPI_LOG_REPL, NULL, "replica_destroy\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "replica_destroy\n");
/*
* The function will not be called unless the refcnt of its
@@ -438,13 +438,13 @@ replica_subentry_create(Slapi_DN *repl_root, ReplicaId rid)
entry_string = slapi_ch_smprintf("dn: cn=%s %d,%s\nobjectclass:
top\nobjectclass: ldapsubentry\nobjectclass: extensibleObject\ncn: %s %d",
KEEP_ALIVE_ENTRY, rid, slapi_sdn_get_dn(repl_root), KEEP_ALIVE_ENTRY, rid);
if (entry_string == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_subentry_create add failed in slapi_ch_smprintf\n");
rc = -1;
goto done;
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "add %s\n",
entry_string);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "add %s\n",
entry_string);
e = slapi_str2entry(entry_string, 0);
/* create the entry */
@@ -459,7 +459,7 @@ replica_subentry_create(Slapi_DN *repl_root, ReplicaId rid)
return_value != LDAP_ALREADY_EXISTS &&
return_value != LDAP_REFERRAL /* CONSUMER */)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Warning: unable to
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Warning: unable
to "
"create replication keep alive entry %s: %s\n",
slapi_entry_get_dn_const(e),
ldap_err2string(return_value));
rc = -1;
@@ -495,16 +495,16 @@ replica_subentry_check(Slapi_DN *repl_root, ReplicaId rid)
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries);
if (entries && (entries[0] == NULL))
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Need to create replication keep alive entry <cn=%s
%d,%s>\n", KEEP_ALIVE_ENTRY, rid, slapi_sdn_get_dn(repl_root));
rc = replica_subentry_create(repl_root, rid);
} else {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"replication keep alive entry <cn=%s %d,%s> already
exists\n", KEEP_ALIVE_ENTRY, rid, slapi_sdn_get_dn(repl_root));
rc = 0;
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Error accessing replication keep alive entry <cn=%s %d,%s>
res=%d\n",
KEEP_ALIVE_ENTRY, rid, slapi_sdn_get_dn(repl_root), res);
/* The status of the entry is not clear, do not attempt to create it */
@@ -537,7 +537,7 @@ replica_subentry_update(Slapi_DN *repl_root, ReplicaId rid)
gmtime_r(&curtime, <m);
strftime(buf, sizeof (buf), "%Y%m%d%H%M%SZ", <m);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "subentry_update called at
%s\n", buf);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "subentry_update
called at %s\n", buf);
val.bv_val = buf;
@@ -564,11 +564,11 @@ replica_subentry_update(Slapi_DN *repl_root, ReplicaId rid)
if (ldrc != LDAP_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"Failure (%d) to update replication keep alive entry \"%s:
%s\"\n", ldrc, KEEP_ALIVE_ATTR, buf);
rc = ldrc;
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"Successful update of replication keep alive entry \"%s:
%s\"\n", KEEP_ALIVE_ATTR, buf);
}
@@ -604,7 +604,7 @@ replica_get_exclusive_access(Replica *r, PRBool *isInc, PRUint64
connid, int opi
if (isInc)
*isInc = (r->repl_state_flags & REPLICA_INCREMENTAL_IN_PROGRESS);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d repl=\"%s\": "
"Replica in use locking_purl=%s\n",
connid, opid,
@@ -627,7 +627,7 @@ replica_get_exclusive_access(Replica *r, PRBool *isInc, PRUint64
connid, int opi
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d repl=\"%s\": Acquired
replica\n",
connid, opid,
slapi_sdn_get_dn(r->repl_root));
@@ -670,13 +670,13 @@ replica_relinquish_exclusive_access(Replica *r, PRUint64 connid, int
opid)
/* check to see if the replica is in use and log a warning if not */
if (!(r->repl_state_flags & REPLICA_IN_USE))
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d repl=\"%s\": "
"Replica not in use\n",
connid, opid,
slapi_sdn_get_dn(r->repl_root));
} else {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d repl=\"%s\": "
"Released replica held by locking_purl=%s\n",
connid, opid,
@@ -856,19 +856,19 @@ replica_update_ruv(Replica *r, const CSN *updated_csn, const char
*replica_purl)
PR_ASSERT(NULL != r);
PR_ASSERT(NULL != updated_csn);
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"replica_update_ruv: csn %s\n",
csn_as_string(updated_csn, PR_FALSE, csn_str)); /* XXXggood remove debugging */
#endif
if (NULL == r)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_update_ruv: replica
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "replica_update_ruv:
replica "
"is NULL\n");
rc = RUV_BAD_DATA;
}
else if (NULL == updated_csn)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_update_ruv: csn
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "replica_update_ruv:
csn "
"is NULL when updating replica %s\n", slapi_sdn_get_dn(r->repl_root));
rc = RUV_BAD_DATA;
}
@@ -906,7 +906,7 @@ replica_update_ruv(Replica *r, const CSN *updated_csn, const char
*replica_purl)
rc = ruv_update_ruv (ruv, updated_csn, replica_purl, rid == r->repl_rid);
if (RUV_COVERS_CSN == rc)
{
- slapi_log_error(SLAPI_LOG_REPL,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG,
repl_plugin_name, "replica_update_ruv: RUV "
"for replica %s already covers max_csn = %s\n",
slapi_sdn_get_dn(r->repl_root),
@@ -915,7 +915,7 @@ replica_update_ruv(Replica *r, const CSN *updated_csn, const char
*replica_purl)
}
else if (RUV_SUCCESS != rc)
{
- slapi_log_error(SLAPI_LOG_FATAL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
repl_plugin_name, "replica_update_ruv: unable "
"to update RUV for replica %s, csn = %s\n",
slapi_sdn_get_dn(r->repl_root),
@@ -929,7 +929,7 @@ replica_update_ruv(Replica *r, const CSN *updated_csn, const char
*replica_purl)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_update_ruv: unable to get RUV object for replica "
"%s\n", slapi_sdn_get_dn(r->repl_root));
rc = RUV_NOTFOUND;
@@ -937,7 +937,7 @@ replica_update_ruv(Replica *r, const CSN *updated_csn, const char
*replica_purl)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_update_ruv: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "replica_update_ruv:
"
"unable to initialize RUV for replica %s\n",
slapi_sdn_get_dn(r->repl_root));
rc = RUV_NOTFOUND;
@@ -1199,7 +1199,7 @@ replica_is_updatedn (Replica *r, const Slapi_DN *sdn)
Slapi_ValueSet *updatedn_groups_copy = NULL;
ReplicaUpdateDNList groupdn_list = replica_updatedn_list_new(NULL);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "Authorized
replication managers is resync (%ld)\n", now);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"Authorized replication managers is resync (%ld)\n", now);
updatedn_groups_copy = slapi_valueset_new();
slapi_valueset_set_valueset(updatedn_groups_copy,
r->updatedn_groups);
r->updatedn_group_last_check = now; /* Just to be sure no one will try
to reload */
@@ -1222,7 +1222,7 @@ replica_is_updatedn (Replica *r, const Slapi_DN *sdn)
/* the unpdatedn_groups has been updated while we released the
replica
* groupdn_list in the replica is up to date. Do not replace it
*/
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "Authorized
replication managers (%s) was updated during a refresh\n", attr_replicaBindDnGroup);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"Authorized replication managers (%s) was updated during a refresh\n",
attr_replicaBindDnGroup);
replica_updatedn_list_delete(groupdn_list, NULL);
replica_updatedn_list_free(groupdn_list);
}
@@ -1493,22 +1493,22 @@ replica_dump(Replica *r)
replica_lock(r->repl_lock);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "Replica state:\n");
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "\treplica root: %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "Replica
state:\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "\treplica root:
%s\n",
slapi_sdn_get_ndn (r->repl_root));
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "\treplica type: %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "\treplica type:
%s\n",
_replica_type_as_string (r));
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "\treplica id: %d\n",
r->repl_rid);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "\tflags: %d\n",
r->repl_flags);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "\tstate flags: %lu\n",
r->repl_state_flags);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "\treplica id:
%d\n", r->repl_rid);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "\tflags:
%d\n", r->repl_flags);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "\tstate flags:
%lu\n", r->repl_state_flags);
if (r->updatedn_list)
updatedn_list = replica_updatedn_list_to_string(r->updatedn_list,
"\n\t\t");
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "\tupdate dn: %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "\tupdate dn:
%s\n",
updatedn_list? updatedn_list : "not configured");
slapi_ch_free_string(&updatedn_list);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "\truv: %s configured and is
%sdirty\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "\truv: %s
configured and is %sdirty\n",
r->repl_ruv ? "" : "not", r->repl_ruv_dirty
? "" : "not ");
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "\tCSN generator: %s
configured\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "\tCSN generator:
%s configured\n",
r->repl_csngen ? "" : "not");
/* JCMREPL - Dump Referrals */
@@ -1731,7 +1731,7 @@ replica_reload_ruv (Replica *r)
r_obj = object_new (r, NULL);
/* We can't use existing changelog - remove existing file */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"replica_reload_ruv: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_reload_ruv: "
"Warning: new data for replica %s does not match the data in the
changelog.\n"
" Recreating the changelog file. This could affect replication
with replica's "
" consumers in which case the consumers should be
reinitialized.\n",
@@ -1850,7 +1850,7 @@ int replica_check_for_data_reload (Replica *r, void *arg)
*/
if (slapi_disordely_shutdown(PR_FALSE)) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"replica_check_for_data_reload: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_check_for_data_reload: "
"Warning: disordely shutdown for replica %s. Check if DB RUV
needs to be updated\n",
slapi_sdn_get_dn(r->repl_root));
@@ -1873,7 +1873,7 @@ int replica_check_for_data_reload (Replica *r, void *arg)
r_obj = object_new(r, NULL);
/* We can't use existing changelog - remove existing file */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"replica_check_for_data_reload: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_check_for_data_reload: "
"Warning: data for replica %s does not match the data in
the changelog. "
"Recreating the changelog file. "
"This could affect replication with replica's
consumers in which case the "
@@ -1889,7 +1889,7 @@ int replica_check_for_data_reload (Replica *r, void *arg)
rc = replica_log_ruv_elements(r);
}
} else if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"replica_check_for_data_reload: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_check_for_data_reload: "
"Warning: for replica %s there were some differences
between the changelog max RUV and the "
"database RUV. If there are obsolete elements in the
database RUV, you "
"should remove them using the CLEANALLRUV task. If they
are not obsolete, "
@@ -1936,7 +1936,7 @@ _replica_get_config_entry (const Slapi_DN *root, const char
**attrs)
dn = _replica_get_config_dn (root);
if (NULL == dn) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_replica_get_config_entry: failed to get the config dn for %s\n",
slapi_sdn_get_dn (root));
return NULL;
@@ -2042,7 +2042,7 @@ _replica_init_from_config (Replica *r, Slapi_Entry *e, char
*errortext)
PR_snprintf (errormsg, SLAPI_DSE_RETURNTEXT_SIZE, "failed to retrieve %s
attribute from (%s)\n",
attr_replicaRoot,
(char*)slapi_entry_get_dn ((Slapi_Entry*)e));
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"_replica_init_from_config: %s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_replica_init_from_config: %s\n",
errormsg);
return -1;
}
@@ -2077,7 +2077,7 @@ _replica_init_from_config (Replica *r, Slapi_Entry *e, char
*errortext)
if(slapi_entry_attr_exists(e, type_replicaBackoffMin)){
backoff_min = slapi_entry_attr_get_int(e, type_replicaBackoffMin);
if(backoff_min <= 0){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Invalid value for
%s: %d Using default value (%d)\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Invalid
value for %s: %d Using default value (%d)\n",
type_replicaBackoffMin, backoff_min, PROTOCOL_BACKOFF_MINIMUM );
backoff_min = PROTOCOL_BACKOFF_MINIMUM;
}
@@ -2088,7 +2088,7 @@ _replica_init_from_config (Replica *r, Slapi_Entry *e, char
*errortext)
if(slapi_entry_attr_exists(e, type_replicaBackoffMax)){
backoff_max = slapi_entry_attr_get_int(e, type_replicaBackoffMax);
if(backoff_max <= 0){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Invalid value for
%s: %d Using default value (%d)\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Invalid
value for %s: %d Using default value (%d)\n",
type_replicaBackoffMax, backoff_max, PROTOCOL_BACKOFF_MAXIMUM );
backoff_max = PROTOCOL_BACKOFF_MAXIMUM;
}
@@ -2098,7 +2098,7 @@ _replica_init_from_config (Replica *r, Slapi_Entry *e, char
*errortext)
if(backoff_min > backoff_max){
/* Ok these values are invalid, reset back the defaults */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Backoff minimum (%d) can
not be greater than "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Backoff minimum
(%d) can not be greater than "
"the backoff maximum (%d). Using default values: min (%d) max
(%d)\n", backoff_min, backoff_max,
PROTOCOL_BACKOFF_MINIMUM, PROTOCOL_BACKOFF_MAXIMUM);
slapi_counter_set_value(r->backoff_min, PROTOCOL_BACKOFF_MINIMUM);
@@ -2133,7 +2133,7 @@ _replica_init_from_config (Replica *r, Slapi_Entry *e, char
*errortext)
slapi_counter_set_value(r->precise_purging, 0);
} else{
/* Invalid value */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Invalid value for %s: %s Using default value (off)\n",
type_replicaPrecisePurge, precise_purging);
slapi_counter_set_value(r->precise_purging, 0);
@@ -2168,7 +2168,7 @@ _replica_init_from_config (Replica *r, Slapi_Entry *e, char
*errortext)
"and less than %d: entry %s",
attr_replicaId, READ_ONLY_REPLICA_ID,
(char*)slapi_entry_get_dn ((Slapi_Entry*)e));
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_replica_init_from_config: %s\n", errormsg);
return -1;
} else {
@@ -2178,7 +2178,7 @@ _replica_init_from_config (Replica *r, Slapi_Entry *e, char
*errortext)
PR_snprintf (errormsg, SLAPI_DSE_RETURNTEXT_SIZE,
"failed to retrieve required %s attribute from %s",
attr_replicaId,(char*)slapi_entry_get_dn ((Slapi_Entry*)e));
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_replica_init_from_config: %s\n", errormsg);
return -1;
}
@@ -2191,7 +2191,7 @@ _replica_init_from_config (Replica *r, Slapi_Entry *e, char
*errortext)
PR_snprintf (errormsg, SLAPI_DSE_RETURNTEXT_SIZE,
"failed to create csn generator for replica (%s)",
(char*)slapi_entry_get_dn ((Slapi_Entry*)e));
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_replica_init_from_config: %s\n", errormsg);
return -1;
}
@@ -2226,7 +2226,7 @@ _replica_init_from_config (Replica *r, Slapi_Entry *e, char
*errortext)
PR_snprintf (errormsg, SLAPI_DSE_RETURNTEXT_SIZE,
"failed to assign replica name for replica (%s); uuid generator
error - %d ",
(char*)slapi_entry_get_dn ((Slapi_Entry*)e), rc);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"_replica_init_from_config: %s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_replica_init_from_config: %s\n",
errormsg);
return -1;
} else
@@ -2302,12 +2302,12 @@ replica_check_for_tasks(Replica *r, Slapi_Entry *e)
if(token){
rid = atoi(token);
if(rid <= 0 || rid >= READ_ONLY_REPLICA_ID){
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name, "CleanAllRUV
Task: invalid replica id(%d) "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"CleanAllRUV Task: invalid replica id(%d) "
"aborting task.\n", rid);
goto done;
}
} else {
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name, "CleanAllRUV
Task: unable to parse cleanallruv "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"CleanAllRUV Task: unable to parse cleanallruv "
"data (%s), aborting task.\n",clean_vals[i]);
goto done;
}
@@ -2320,7 +2320,7 @@ replica_check_for_tasks(Replica *r, Slapi_Entry *e)
forcing = "no";
}
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name, "CleanAllRUV Task:
cleanAllRUV task found, "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV
Task: cleanAllRUV task found, "
"resuming the cleaning of rid(%d)...\n", rid);
/*
* Create payload
@@ -2330,7 +2330,7 @@ replica_check_for_tasks(Replica *r, Slapi_Entry *e)
slapi_ch_free_string(&ridstr);
if(payload == NULL){
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name, "CleanAllRUV
Task: Startup: Failed to "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"CleanAllRUV Task: Startup: Failed to "
"create extended op payload, aborting task");
csn_free(&maxcsn);
goto done;
@@ -2340,7 +2340,7 @@ replica_check_for_tasks(Replica *r, Slapi_Entry *e)
*/
data = (cleanruv_data*)slapi_ch_calloc(1, sizeof(cleanruv_data));
if (data == NULL) {
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name, "cleanAllRUV:
failed to allocate cleanruv_data.\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"cleanAllRUV: failed to allocate cleanruv_data.\n");
csn_free(&maxcsn);
} else {
/* setup our data */
@@ -2359,7 +2359,7 @@ replica_check_for_tasks(Replica *r, Slapi_Entry *e)
PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL) {
/* log an error and free everything */
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name,
"cleanAllRUV: unable to create cleanAllRUV "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"cleanAllRUV: unable to create cleanAllRUV "
"thread for rid(%d)\n", (int)data->rid);
csn_free(&maxcsn);
slapi_sdn_free(&data->sdn);
@@ -2393,12 +2393,12 @@ done:
if(token){
rid = atoi(token);
if(rid <= 0 || rid >= READ_ONLY_REPLICA_ID){
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name, "Abort
CleanAllRUV Task: invalid replica id(%d) "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Abort CleanAllRUV Task: invalid replica id(%d) "
"aborting abort task.\n", rid);
goto done2;
}
} else {
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name, "Abort
CleanAllRUV Task: unable to parse cleanallruv "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Abort
CleanAllRUV Task: unable to parse cleanallruv "
"data (%s), aborting abort task.\n",clean_vals[i]);
goto done2;
}
@@ -2407,7 +2407,7 @@ done:
certify = ldap_utf8strtok_r(iter, ":", &iter);
if(!is_cleaned_rid(rid)){
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name, "Abort
CleanAllRUV Task: replica id(%d) is not "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Abort
CleanAllRUV Task: replica id(%d) is not "
"being cleaned, nothing to abort. Aborting abort task.\n",
rid);
delete_aborted_rid(r, rid, repl_root, 0);
goto done2;
@@ -2416,21 +2416,21 @@ done:
add_aborted_rid(rid, r, repl_root);
stop_ruv_cleaning();
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name, "Abort CleanAllRUV
Task: abort task found, "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Abort
CleanAllRUV Task: abort task found, "
"resuming abort of rid(%d).\n", rid);
/*
* Setup the data struct, and fire off the abort thread.
*/
data = (cleanruv_data*)slapi_ch_calloc(1, sizeof(cleanruv_data));
if (data == NULL) {
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name, "Abort
CleanAllRUV Task: failed to allocate cleanruv_data.\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Abort
CleanAllRUV Task: failed to allocate cleanruv_data.\n");
} else {
ridstr = slapi_ch_smprintf("%d:%s:%s", rid, repl_root,
certify);
payload = create_cleanruv_payload(ridstr);
slapi_ch_free_string(&ridstr);
if(payload == NULL){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Abort
CleanAllRUV Task: failed to create extended "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Abort CleanAllRUV Task: failed to create extended "
"op payload\n");
slapi_ch_free((void **)&data);
} else {
@@ -2448,7 +2448,7 @@ done:
(void *)data, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL) {
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name, "Abort
CleanAllRUV Task: unable to create abort cleanAllRUV "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Abort CleanAllRUV Task: unable to create abort cleanAllRUV "
"thread for rid(%d)\n", (int)data->rid);
slapi_sdn_free(&data->sdn);
ber_bvfree(data->payload);
@@ -2482,7 +2482,7 @@ _replica_update_entry (Replica *r, Slapi_Entry *e, char *errortext)
if (rc != CSN_SUCCESS)
{
PR_snprintf(errortext, SLAPI_DSE_RETURNTEXT_SIZE, "failed to get csn
generator's state; csn error - %d", rc);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_replica_update_entry: %s\n", errortext);
return -1;
}
@@ -2497,7 +2497,7 @@ _replica_update_entry (Replica *r, Slapi_Entry *e, char *errortext)
if (rc != 0)
{
PR_snprintf(errortext, SLAPI_DSE_RETURNTEXT_SIZE, "failed to update replica
entry");
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_replica_update_entry: %s\n", errortext);
return -1;
}
@@ -2507,7 +2507,7 @@ _replica_update_entry (Replica *r, Slapi_Entry *e, char *errortext)
if (rc != 0)
{
PR_snprintf(errortext, SLAPI_DSE_RETURNTEXT_SIZE, "failed to update replica
entry");
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_replica_update_entry: %s\n", errortext);
return -1;
}
@@ -2557,7 +2557,7 @@ _replica_configure_ruv (Replica *r, PRBool isLocked)
/* read ruv state from the ruv tombstone entry */
pb = slapi_pblock_new();
if (!pb) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_replica_configure_ruv: Out of memory\n");
goto done;
}
@@ -2584,7 +2584,7 @@ _replica_configure_ruv (Replica *r, PRBool isLocked)
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries);
if (NULL == entries || NULL == entries[0])
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_replica_configure_ruv: replica ruv tombstone entry for "
"replica %s not found\n",
slapi_sdn_get_dn(r->repl_root));
@@ -2594,7 +2594,7 @@ _replica_configure_ruv (Replica *r, PRBool isLocked)
rc = slapi_entry_attr_find(entries[0], type_ruvElement, &attr);
if (rc != 0) /* ruv attribute is missing - this not allowed */
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_replica_configure_ruv: replica ruv tombstone entry for "
"replica %s does not contain %s\n",
slapi_sdn_get_dn(r->repl_root), type_ruvElement);
@@ -2673,7 +2673,7 @@ _replica_configure_ruv (Replica *r, PRBool isLocked)
OP_FLAG_REPL_RUV);
rc = replica_create_ruv_tombstone(r);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_replica_configure_ruv: "
"failed to recreate replica ruv tombstone entry"
" (%s); LDAP error - %d\n",
@@ -2691,7 +2691,7 @@ _replica_configure_ruv (Replica *r, PRBool isLocked)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"RUV for replica %s is missing replica generation\n",
slapi_sdn_get_dn(r->repl_root));
goto done;
@@ -2699,7 +2699,7 @@ _replica_configure_ruv (Replica *r, PRBool isLocked)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Unable to convert %s attribute in entry %s to a replica update
vector.\n",
type_ruvElement, slapi_sdn_get_dn(r->repl_root));
goto done;
@@ -2725,7 +2725,7 @@ _replica_configure_ruv (Replica *r, PRBool isLocked)
* XXXrichm - you can also get this error when the backend is in
* read only mode c.f. bug 539782
*/
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_replica_configure_ruv: failed to create replica ruv tombstone "
"entry (%s); LDAP error - %d\n",
slapi_sdn_get_dn(r->repl_root), rc);
@@ -2733,7 +2733,7 @@ _replica_configure_ruv (Replica *r, PRBool isLocked)
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"_replica_configure_ruv: No ruv tombstone found for replica %s. "
"Created a new one\n",
slapi_sdn_get_dn(r->repl_root));
@@ -2746,7 +2746,7 @@ _replica_configure_ruv (Replica *r, PRBool isLocked)
char *state = slapi_mtn_get_state(r->repl_root);
if (state && !strcasecmp(state, "disabled"))
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_replica_configure_ruv: replication disabled for "
"entry (%s); LDAP error - %d\n",
slapi_sdn_get_dn(r->repl_root), rc);
@@ -2755,7 +2755,7 @@ _replica_configure_ruv (Replica *r, PRBool isLocked)
}
else if (!r->repl_ruv) /* other error */
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_replica_configure_ruv: replication broken for "
"entry (%s); LDAP error - %d\n",
slapi_sdn_get_dn(r->repl_root), rc);
@@ -2764,7 +2764,7 @@ _replica_configure_ruv (Replica *r, PRBool isLocked)
}
else /* some error but continue anyway? */
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"_replica_configure_ruv: Error %d reading tombstone for replica
%s.\n",
rc, slapi_sdn_get_dn(r->repl_root));
return_value = 0;
@@ -2866,7 +2866,7 @@ replica_update_state (time_t when, void *arg)
/* EY: the consumer needs to flush ruv to disk. */
replica_unlock(r->repl_lock);
if (replica_write_ruv(r)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"_replica_update_state: failed write RUV for %s\n",
slapi_sdn_get_dn (r->repl_root));
}
@@ -2888,7 +2888,7 @@ replica_update_state (time_t when, void *arg)
dn = _replica_get_config_dn (r->repl_root);
if (NULL == dn) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_update_state: failed to get the config dn for %s\n",
slapi_sdn_get_dn (r->repl_root));
replica_unlock(r->repl_lock);
@@ -2930,7 +2930,7 @@ replica_update_state (time_t when, void *arg)
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if (rc != LDAP_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_update_state: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "replica_update_state:
"
"failed to update state of csn generator for replica %s: LDAP "
"error - %d\n", slapi_sdn_get_dn(r->repl_root), rc);
}
@@ -2941,7 +2941,7 @@ replica_update_state (time_t when, void *arg)
/* update RUV - performs its own locking */
if (replica_write_ruv(r)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"_replica_update_state: failed write RUV for %s\n",
slapi_sdn_get_dn (r->repl_root));
}
@@ -3027,7 +3027,7 @@ replica_write_ruv (Replica *r)
}
else /* error */
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"replica_write_ruv: failed to update RUV tombstone for %s; "
"LDAP error - %d\n",
slapi_sdn_get_dn(r->repl_root), rc);
@@ -3067,7 +3067,7 @@ replica_ruv_smods_for_op( Slapi_PBlock *pb, char **uniqueid,
Slapi_Mods **smods
if (target_entry && is_ruv_tombstone_entry(target_entry)) {
/* disallow direct modification of the RUV tombstone entry
must use the CLEANRUV task instead */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_ruv_smods_for_op: attempted to directly modify the
tombstone RUV "
"entry [%s] - use the CLEANALLRUV task instead\n",
slapi_entry_get_dn_const(target_entry));
@@ -3162,7 +3162,7 @@ _delete_tombstone(const char *tombstone_dn, const char *uniqueid,
int ext_op_fla
PR_ASSERT(NULL != tombstone_dn && NULL != uniqueid);
if (NULL == tombstone_dn || NULL == uniqueid)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "_delete_tombstone: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "_delete_tombstone:
"
"NULL tombstone_dn or uniqueid provided.\n");
}
else
@@ -3176,7 +3176,7 @@ _delete_tombstone(const char *tombstone_dn, const char *uniqueid,
int ext_op_fla
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &ldaprc);
if (LDAP_SUCCESS != ldaprc)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_delete_tombstone: unable to delete tombstone %s, "
"uniqueid %s: %s.\n", tombstone_dn, uniqueid,
ldap_err2string(ldaprc));
@@ -3209,7 +3209,7 @@ process_reap_entry (Slapi_Entry *entry, void *cb_data)
/* abort reaping if we've been told to stop or we're shutting down */
if (*tombstone_reap_stop || slapi_is_shutting_down()) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"process_reap_entry: the tombstone reap process "
" has been stopped\n");
return rc;
@@ -3224,7 +3224,7 @@ process_reap_entry (Slapi_Entry *entry, void *cb_data)
if ((NULL == deletion_csn || csn_compare(deletion_csn, purge_csn) < 0) &&
(!is_ruv_tombstone_entry(entry))) {
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"process_reap_entry: removing tombstone %s "
"because its deletion csn (%s) is less than the "
"purge csn (%s).\n",
@@ -3240,7 +3240,7 @@ process_reap_entry (Slapi_Entry *entry, void *cb_data)
}
else {
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"process_reap_entry: NOT removing tombstone "
"%s\n", slapi_entry_get_dn(entry));
}
@@ -3268,13 +3268,13 @@ _replica_reap_tombstones(void *arg)
Replica *replica = NULL;
CSN *purge_csn = NULL;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"Info: Beginning tombstone reap for replica %s.\n",
replica_name ? replica_name : "(null)");
if (NULL == replica_name)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"Warning: Replica name is null in tombstone reap\n");
goto done;
}
@@ -3287,7 +3287,7 @@ _replica_reap_tombstones(void *arg)
replica_object = replica_get_by_name(replica_name);
if (NULL == replica_object)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"Warning: Replica object %s is null in tombstone reap\n", replica_name);
goto done;
}
@@ -3296,14 +3296,14 @@ _replica_reap_tombstones(void *arg)
replica = (Replica *)object_get_data(replica_object);
if (NULL == replica)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"Warning: Replica %s is null in tombstone reap\n", replica_name);
goto done;
}
if (replica->tombstone_reap_stop)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"Info: Replica %s reap stop flag is set for tombstone reap\n",
replica_name);
goto done;
}
@@ -3374,7 +3374,7 @@ _replica_reap_tombstones(void *arg)
if (LDAP_SUCCESS != oprc)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"_replica_reap_tombstones: failed when searching for "
"tombstones in replica %s: %s. Will try again in %ld "
"seconds.\n", slapi_sdn_get_dn(replica->repl_root),
@@ -3382,7 +3382,7 @@ _replica_reap_tombstones(void *arg)
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"_replica_reap_tombstones: purged %ld of %ld tombstones "
"in replica %s. Will try again in %ld "
"seconds.\n", cb_data.num_purged_entries, cb_data.num_entries,
@@ -3392,7 +3392,7 @@ _replica_reap_tombstones(void *arg)
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"Info: No purge CSN for tombstone reap for replica %s.\n",
replica_name);
}
@@ -3421,7 +3421,7 @@ done:
replica = NULL;
}
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"Info: Finished tombstone reap for replica %s.\n",
replica_name ? replica_name : "(null)");
@@ -3470,7 +3470,7 @@ eq_cb_reap_tombstones(time_t when, void *arg)
SLAPD_DEFAULT_THREAD_STACKSIZE) == NULL)
{
replica->tombstone_reap_active = PR_FALSE;
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Error: unable to create the tombstone reap thread for replica %s. "
"Possible system resources problem\n",
replica_name);
@@ -3552,13 +3552,13 @@ replica_create_ruv_tombstone(Replica *r)
r->repl_ruv_dirty = PR_TRUE;
return_value = LDAP_SUCCESS;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Cannot create
new replica update vector for %s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Cannot
create new replica update vector for %s\n",
slapi_sdn_get_dn(r->repl_root));
ruv_destroy(&ruv);
goto done;
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Cannot obtain CSN
for new replica update vector for %s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Cannot
obtain CSN for new replica update vector for %s\n",
slapi_sdn_get_dn(r->repl_root));
csn_free(&csn);
goto done;
@@ -3631,7 +3631,7 @@ assign_csn_callback(const CSN *csn, void *data)
char csn_str[CSN_STRSIZE]; /* For logging only */
/* Ack, we can't keep track of min csn. Punt. */
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"assign_csn_callback: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"assign_csn_callback: "
"failed to insert csn %s for replica %s\n",
csn_as_string(csn, PR_FALSE, csn_str),
slapi_sdn_get_dn(r->repl_root));
@@ -3669,7 +3669,7 @@ abort_csn_callback(const CSN *csn, void *data)
{
int rc = csnplRemove(r->min_csn_pl, csn);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "csnplRemove
failed");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "csnplRemove
failed");
return;
}
}
@@ -3786,7 +3786,7 @@ replica_remove_legacy_attr (const Slapi_DN *repl_root_sdn, const
char *attr)
if (rc != LDAP_SUCCESS)
{
/* this is not a fatal error because the attribute may not be there */
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "replica_remove_legacy_attr:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"replica_remove_legacy_attr: "
"failed to remove legacy attribute %s for replica %s; LDAP error - %d\n",
attr, slapi_sdn_get_dn(repl_root_sdn), rc);
}
@@ -3878,7 +3878,7 @@ replica_set_tombstone_reap_interval (Replica *r, long interval)
repl_name = slapi_eq_get_arg (r->repl_eqcxt_tr);
slapi_ch_free ((void**)&repl_name);
found = slapi_eq_cancel (r->repl_eqcxt_tr);
- slapi_log_error (SLAPI_LOG_REPL, NULL,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL,
"tombstone_reap event (interval=%ld) was %s\n",
r->tombstone_reap_interval, (found ? "cancelled" : "not
found"));
r->repl_eqcxt_tr = NULL;
@@ -3890,7 +3890,7 @@ replica_set_tombstone_reap_interval (Replica *r, long interval)
r->repl_eqcxt_tr = slapi_eq_repeat (eq_cb_reap_tombstones, repl_name,
current_time() + r->tombstone_reap_interval,
1000 * r->tombstone_reap_interval);
- slapi_log_error (SLAPI_LOG_REPL, NULL,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL,
"tombstone_reap event (interval=%ld) was %s\n",
r->tombstone_reap_interval, (r->repl_eqcxt_tr ? "scheduled" :
"not scheduled successfully"));
}
@@ -3913,7 +3913,7 @@ replica_strip_cleaned_rids(Replica *r)
ruv_delete_replica(ruv, rid[i]);
replica_set_ruv_dirty(r);
if (replica_write_ruv(r)) {
- slapi_log_error (SLAPI_LOG_REPL, "replica_strip_cleaned_rids", "failed
to write RUV\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "replica_strip_cleaned_rids",
"failed to write RUV\n");
}
i++;
}
@@ -3943,7 +3943,7 @@ replica_replace_ruv_tombstone(Replica *r)
dn = _replica_get_config_dn (r->repl_root);
if (NULL == dn) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_replace_ruv_tombstone: "
"failed to get the config dn for %s\n",
slapi_sdn_get_dn (r->repl_root));
@@ -3975,7 +3975,7 @@ replica_replace_ruv_tombstone(Replica *r)
{
if ((rc != LDAP_NO_SUCH_OBJECT && rc != LDAP_TYPE_OR_VALUE_EXISTS) ||
!replica_is_state_flag_set(r, REPLICA_IN_USE))
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"replica_replace_ruv_tombstone: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_replace_ruv_tombstone: "
"failed to update replication update vector for replica %s: LDAP
"
"error - %d\n", (char*)slapi_sdn_get_dn (r->repl_root),
rc);
}
@@ -4101,7 +4101,7 @@ replica_enable_replication (Replica *r)
/* retrieve new ruv */
rc = replica_reload_ruv (r);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"replica_enable_replication: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_enable_replication: "
"reloading ruv failed\n");
/* What to do ? */
}
@@ -4124,7 +4124,7 @@ replica_enable_replication (Replica *r)
replica_set_state_flag(r, REPLICA_AGREEMENTS_DISABLED, PR_TRUE /* clear */);
PR_Unlock(r->agmt_lock);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "replica_enable_replication:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"replica_enable_replication: "
"replica %s is relinquished\n",
slapi_sdn_get_ndn (replica_get_root (r)));
}
@@ -4169,7 +4169,7 @@ replica_disable_replication (Replica *r, Object *r_obj)
if (!isInc) /* already locked, but not by inc update - break */
break;
isInc = PR_FALSE;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"replica_disable_replication: "
"replica %s is already locked by (%s) for incoming "
"incremental update; sleeping 100ms\n",
@@ -4184,7 +4184,7 @@ replica_disable_replication (Replica *r, Object *r_obj)
replica_set_state_flag(r, REPLICA_AGREEMENTS_DISABLED, PR_FALSE);
PR_Unlock(r->agmt_lock);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "replica_disable_replication:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"replica_disable_replication: "
"replica %s is acquired\n",
slapi_sdn_get_ndn (replica_get_root (r)));
}
@@ -4284,7 +4284,7 @@ replica_generate_next_csn ( Slapi_PBlock *pb, const CSN *basecsn )
csngen_adjust_time (gen, basecsn);
csngen_new_csn (gen, &opcsn, PR_FALSE /* don't notify */);
csn_as_string (opcsn, PR_FALSE, opcsn2str);
- slapi_log_error (SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"replica_generate_next_csn: "
"opcsn=%s <= basecsn=%s, adjusted opcsn=%s\n",
opcsnstr, basecsnstr, opcsn2str);
@@ -4429,7 +4429,7 @@ replica_add_session_abort_control(Slapi_PBlock *pb)
/* Build the BER payload */
if ( (ber = der_alloc()) == NULL ) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"add_session_abort_control: Failed to create ber\n");
return;
}
@@ -4439,7 +4439,7 @@ replica_add_session_abort_control(Slapi_PBlock *pb)
}
ber_free( ber, 1 );
if ( rc == -1 ) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"add_session_abort_control: Failed to flatten ber\n");
return;
}
@@ -4450,7 +4450,7 @@ replica_add_session_abort_control(Slapi_PBlock *pb)
ber_bvfree( bvp );
slapi_pblock_set(pb, SLAPI_ADD_RESCONTROL, &ctrl);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"add_session_abort_control: abort control successfully added to result\n");
}
diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c
b/ldap/servers/plugins/replication/repl5_replica_config.c
index bbaf574..0ad517d 100644
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
@@ -106,7 +106,7 @@ replica_config_init()
if (s_configLock == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_config_init: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "replica_config_init:
"
"failed to create configuration lock; NSPR error -
%d\n",
PR_GetError ());
return -1;
@@ -114,24 +114,24 @@ replica_config_init()
rid_lock = slapi_new_rwlock();
if(rid_lock == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_config_init: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "replica_config_init:
"
"failed to create rid_lock; NSPR error - %d\n", PR_GetError ());
return -1;
}
abort_rid_lock = slapi_new_rwlock();
if(abort_rid_lock == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_config_init: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "replica_config_init:
"
"failed to create abort_rid_lock; NSPR error - %d\n", PR_GetError ());
return -1;
}
if ( ( notify_lock = PR_NewLock()) == NULL ) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_config_init: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "replica_config_init:
"
"failed to create notify lock; NSPR error - %d\n", PR_GetError ());
return -1;
}
if ( ( notify_cvar = PR_NewCondVar( notify_lock )) == NULL ) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_config_init: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "replica_config_init:
"
"failed to create notify cond var; NSPR error - %d\n", PR_GetError ());
return -1;
}
@@ -212,7 +212,7 @@ replica_config_add (Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry*
entryAfter,
if (mtnode_ext->replica)
{
PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE, "replica already
configured for %s", replica_root);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_config_add:
%s\n", errortext);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_config_add: %s\n", errortext);
*returncode = LDAP_UNWILLING_TO_PERFORM;
goto done;
}
@@ -302,7 +302,7 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry*
if (mtnode_ext->replica == NULL)
{
PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE, "replica does not exist
for %s", replica_root);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_config_modify:
%s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_config_modify: %s\n",
errortext);
*returncode = LDAP_OPERATIONS_ERROR;
goto done;
@@ -343,7 +343,7 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry*
*returncode = LDAP_UNWILLING_TO_PERFORM;
PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE, "modification of
%s attribute is not allowed",
config_attr);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"replica_config_modify: %s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_config_modify: %s\n",
errortext);
}
/* this is a request to delete an attribute */
@@ -417,7 +417,7 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry*
{
*returncode = LDAP_UNWILLING_TO_PERFORM;
PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE, "deletion of
%s attribute is not allowed", config_attr);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"replica_config_modify: %s\n", errortext);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_config_modify: %s\n", errortext);
}
}
else /* modify an attribute */
@@ -427,7 +427,7 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry*
*returncode = LDAP_UNWILLING_TO_PERFORM;
PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE, "attribute %s
value is NULL.\n",
config_attr);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"replica_config_modify: %s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_config_modify: %s\n",
errortext);
break;
}
@@ -530,7 +530,7 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry*
PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE,
"attribute %s value (%s) is invalid, must
be a number greater than zero.\n",
config_attr, config_attr_value);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"replica_config_modify: %s\n", errortext);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_config_modify: %s\n", errortext);
break;
}
replica_set_protocol_timeout(r, ptimeout);
@@ -547,7 +547,7 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry*
PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE,
"attribute %s value (%s) is invalid, must be a
number greater than zero.\n",
config_attr, config_attr_value);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"replica_config_modify: %s\n", errortext);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_config_modify: %s\n", errortext);
break;
}
replica_set_backoff_min(r, val);
@@ -564,7 +564,7 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry*
PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE,
"attribute %s value (%s) is invalid, must be a
number greater than zero.\n",
config_attr, config_attr_value);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"replica_config_modify: %s\n", errortext);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_config_modify: %s\n", errortext);
break;
}
replica_set_backoff_max(r, val);
@@ -587,7 +587,7 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry*
PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE,
"Invalid value for %s: %s Value should be
\"on\" or \"off\"\n",
type_replicaPrecisePurge, config_attr_value);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
repl_plugin_name,
"Invalid value for %s: %s Value should be
\"on\" or \"off\")\n",
type_replicaPrecisePurge, config_attr_value);
break;
@@ -609,7 +609,7 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry*
PR_snprintf(errortext, SLAPI_DSE_RETURNTEXT_SIZE,
"attribute %s value (%s) is invalid, must be a
number zero or greater.\n",
config_attr, config_attr_value);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_config_modify: %s\n",
errortext);
break;
} else {
@@ -623,7 +623,7 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry*
*returncode = LDAP_UNWILLING_TO_PERFORM;
PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE,
"modification of attribute %s is not allowed in replica entry",
config_attr);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"replica_config_modify: %s\n", errortext);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_config_modify: %s\n", errortext);
}
}
}
@@ -711,7 +711,7 @@ replica_config_post_modify(Slapi_PBlock *pb,
{
PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE,
"replica does not exist for %s", replica_root);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_config_post_modify: %s\n",
errortext);
*returncode = LDAP_OPERATIONS_ERROR;
@@ -750,7 +750,7 @@ replica_config_post_modify(Slapi_PBlock *pb,
PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE,
"modification of %s attribute is not allowed",
config_attr);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_config_post_modify: %s\n",
errortext);
}
@@ -818,7 +818,7 @@ replica_config_delete (Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry*
entryAfter
r = (Replica*)object_get_data (mtnode_ext->replica);
PR_ASSERT (r);
/* The changelog for this replica is no longer valid, so we should remove it. */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_config_delete:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_config_delete: "
"Warning: The changelog for replica %s is no longer valid
since "
"the replica config is being deleted. Removing the
changelog.\n",
slapi_sdn_get_dn(replica_get_root(r)));
@@ -1136,7 +1136,7 @@ static int replica_execute_task (Object *r, const char *task_name,
char *returnt
int temprid = atoi(&(task_name[CLEANRUVLEN]));
if (temprid <= 0 || temprid >= READ_ONLY_REPLICA_ID){
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Invalid replica id (%d) for
task - %s", temprid, task_name);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_execute_task:
%s\n", returntext);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_execute_task: %s\n", returntext);
return LDAP_OPERATIONS_ERROR;
}
if (apply_mods)
@@ -1151,7 +1151,7 @@ static int replica_execute_task (Object *r, const char *task_name,
char *returnt
int temprid = atoi(&(task_name[CLEANALLRUVLEN]));
if (temprid <= 0 || temprid >= READ_ONLY_REPLICA_ID){
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Invalid replica id (%d) for
task - (%s)", temprid, task_name);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_execute_task:
%s\n", returntext);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_execute_task: %s\n", returntext);
return LDAP_OPERATIONS_ERROR;
}
if (apply_mods)
@@ -1165,7 +1165,7 @@ static int replica_execute_task (Object *r, const char *task_name,
char *returnt
else
{
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "unsupported replica task
- %s", task_name);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_execute_task: %s\n", returntext);
return LDAP_OPERATIONS_ERROR;
}
@@ -1224,7 +1224,7 @@ replica_task_done(Replica *replica)
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if ((rc != LDAP_SUCCESS) && (rc != LDAP_NO_SUCH_ATTRIBUTE)) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_task_done: "
"failed to remove (%s) attribute from (%s) entry; "
"LDAP error - %d\n",
@@ -1248,7 +1248,7 @@ static int replica_execute_cl2ldif_task (Object *r, char
*returntext)
if (cl5GetState () != CL5_STATE_OPEN)
{
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "changelog is not
open");
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_execute_cl2ldif_task: %s\n", returntext);
rc = LDAP_OPERATIONS_ERROR;
goto bail;
@@ -1272,12 +1272,12 @@ static int replica_execute_cl2ldif_task (Object *r, char
*returntext)
}
PR_snprintf (fName, MAXPATHLEN, "%s/%s.ldif", clDir, replica_get_name
(replica));
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Beginning changelog export of replica
\"%s\"\n",
replica_get_name(replica));
rc = cl5ExportLDIF (fName, rlist);
if (rc == CL5_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Finished changelog export of replica
\"%s\"\n",
replica_get_name(replica));
rc = LDAP_SUCCESS;
@@ -1285,7 +1285,7 @@ static int replica_execute_cl2ldif_task (Object *r, char
*returntext)
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE,
"Failed changelog export replica %s; "
"changelog error - %d", replica_get_name(replica), rc);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_execute_cl2ldif_task: %s\n", returntext);
rc = LDAP_OPERATIONS_ERROR;
}
@@ -1307,7 +1307,7 @@ static int replica_execute_ldif2cl_task (Object *r, char
*returntext)
if (cl5GetState () != CL5_STATE_OPEN)
{
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "changelog is not
open");
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_execute_ldif2cl_task: %s\n", returntext);
rc = LDAP_OPERATIONS_ERROR;
goto bail;
@@ -1338,18 +1338,18 @@ static int replica_execute_ldif2cl_task (Object *r, char
*returntext)
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE,
"failed to close changelog to import changelog data; "
"changelog error - %d", rc);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_execute_ldif2cl_task: %s\n", returntext);
rc = LDAP_OPERATIONS_ERROR;
goto bail;
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Beginning changelog import of replica
\"%s\"\n",
replica_get_name(replica));
imprc = cl5ImportLDIF (clDir, fName, rlist);
if (CL5_SUCCESS == imprc)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Finished changelog import of replica
\"%s\"\n",
replica_get_name(replica));
}
@@ -1358,7 +1358,7 @@ static int replica_execute_ldif2cl_task (Object *r, char
*returntext)
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE,
"Failed changelog import replica %s; "
"changelog error - %d", replica_get_name(replica), rc);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_execute_ldif2cl_task: %s\n", returntext);
imprc = LDAP_OPERATIONS_ERROR;
}
@@ -1371,7 +1371,7 @@ static int replica_execute_ldif2cl_task (Object *r, char
*returntext)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_execute_ldif2cl_task: failed to start changelog at %s\n",
config.dir?config.dir:"null config dir");
rc = LDAP_OPERATIONS_ERROR;
@@ -1397,7 +1397,7 @@ _replica_config_get_mtnode_ext (const Slapi_Entry *e)
replica_root = slapi_entry_attr_get_charptr (e, attr_replicaRoot);
if (replica_root == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_config_add:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_config_add: "
"configuration entry %s missing %s attribute\n",
slapi_entry_get_dn((Slapi_Entry *)e),
attr_replicaRoot);
@@ -1410,7 +1410,7 @@ _replica_config_get_mtnode_ext (const Slapi_Entry *e)
mtnode = slapi_get_mapping_tree_node_by_dn (sdn);
if (mtnode == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_config_add:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_config_add: "
"failed to locate mapping tree node for dn %s\n",
slapi_sdn_get_dn(sdn));
}
@@ -1440,7 +1440,7 @@ replica_execute_cleanruv_task (Object *r, ReplicaId rid, char
*returntext /* not
int rc = 0;
PR_ASSERT (replica);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "cleanruv_task: cleaning rid
(%d)...\n",(int)rid);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "cleanruv_task:
cleaning rid (%d)...\n",(int)rid);
RUVObj = replica_get_ruv(replica);
PR_ASSERT(RUVObj);
local_ruv = (RUV*)object_get_data (RUVObj);
@@ -1455,7 +1455,7 @@ replica_execute_cleanruv_task (Object *r, ReplicaId rid, char
*returntext /* not
rc = ruv_delete_replica(local_ruv, rid);
replica_set_ruv_dirty(replica);
if (replica_write_ruv(replica)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "cleanruv_task: could not write
RUV\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "cleanruv_task: could
not write RUV\n");
}
object_release(RUVObj);
@@ -1473,10 +1473,10 @@ replica_execute_cleanruv_task (Object *r, ReplicaId rid, char
*returntext /* not
trigger_cl_purging(replica);
if (rc != RUV_SUCCESS){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "cleanruv_task: task
failed(%d)\n",rc);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "cleanruv_task: task
failed(%d)\n",rc);
return LDAP_OPERATIONS_ERROR;
}
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "cleanruv_task: finished
successfully\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "cleanruv_task:
finished successfully\n");
return LDAP_SUCCESS;
}
@@ -1511,7 +1511,7 @@ replica_cleanall_ruv_task(Slapi_PBlock *pb, Slapi_Entry *e,
Slapi_Entry *eAfter,
task = slapi_new_task(slapi_entry_get_ndn(e));
task_dn = slapi_entry_get_sdn(e);
if(task == NULL){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "cleanAllRUV_task: Failed
to create new task\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"cleanAllRUV_task: Failed to create new task\n");
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
@@ -1766,7 +1766,7 @@ replica_cleanallruv_thread(void *arg)
}
if (data->task) {
slapi_task_inc_refcount(data->task);
- slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"replica_cleanallruv_thread --> refcount incremented (%d).\n",
data->task->task_refcount);
}
@@ -2012,7 +2012,7 @@ done:
if(data->task){
slapi_task_finish(data->task, rc);
slapi_task_dec_refcount(data->task);
- slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name,
"replica_cleanallruv_thread <-- refcount decremented.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"replica_cleanallruv_thread <-- refcount decremented.\n");
}
if(data->payload){
ber_bvfree(data->payload);
@@ -2095,7 +2095,7 @@ remove_keep_alive_entry(Slapi_Task *task, ReplicaId rid, const char
*repl_root)
static void
replica_cleanall_ruv_destructor(Slapi_Task *task)
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"replica_cleanall_ruv_destructor -->\n" );
stop_ruv_cleaning();
if (task) {
@@ -2104,14 +2104,14 @@ replica_cleanall_ruv_destructor(Slapi_Task *task)
DS_Sleep (PR_MillisecondsToInterval(100));
}
}
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"replica_cleanall_ruv_destructor <--\n" );
}
static void
replica_cleanall_ruv_abort_destructor(Slapi_Task *task)
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"replica_cleanall_ruv_abort_destructor -->\n" );
stop_ruv_cleaning();
if (task) {
@@ -2120,7 +2120,7 @@ replica_cleanall_ruv_abort_destructor(Slapi_Task *task)
DS_Sleep (PR_MillisecondsToInterval(100));
}
}
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"replica_cleanall_ruv_abort_destructor <--\n" );
}
@@ -2646,7 +2646,7 @@ add_cleaned_rid(ReplicaId rid, Replica *r, char *maxcsn, char
*forcing)
slapi_modify_internal_pb (pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if (rc != LDAP_SUCCESS && rc != LDAP_TYPE_OR_VALUE_EXISTS && rc !=
LDAP_NO_SUCH_OBJECT){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "CleanAllRUV Task: failed
to update replica "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV
Task: failed to update replica "
"config (%d), rid (%d)\n", rc, rid);
}
slapi_ch_free_string(&dn);
@@ -2699,7 +2699,7 @@ add_aborted_rid(ReplicaId rid, Replica *r, char *repl_root)
slapi_modify_internal_pb (pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if (rc != LDAP_SUCCESS && rc != LDAP_TYPE_OR_VALUE_EXISTS && rc !=
LDAP_NO_SUCH_OBJECT){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Abort CleanAllRUV Task:
failed to update "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Abort
CleanAllRUV Task: failed to update "
"replica config (%d), rid (%d)\n", rc, rid);
}
@@ -2752,7 +2752,7 @@ delete_aborted_rid(Replica *r, ReplicaId rid, char *repl_root, int
skip){
slapi_modify_internal_pb (pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if (rc != LDAP_SUCCESS && rc != LDAP_NO_SUCH_OBJECT){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Abort CleanAllRUV
Task: failed to remove replica "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Abort
CleanAllRUV Task: failed to remove replica "
"config (%d), rid (%d)\n", rc, rid);
}
slapi_pblock_destroy (pb);
@@ -3100,7 +3100,7 @@ replica_abort_task_thread(void *arg)
}
if (data->task) {
slapi_task_inc_refcount(data->task);
- slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name,
"replica_abort_task_thread --> refcount incremented.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"replica_abort_task_thread --> refcount incremented.\n");
}
cleanruv_log(data->task, data->rid, ABORT_CLEANALLRUV_ID, "Aborting task
for rid(%d)...",data->rid);
@@ -3212,7 +3212,7 @@ done:
if(data->task){
slapi_task_finish(data->task, agmt_not_notified);
slapi_task_dec_refcount(data->task);
- slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name,
"replica_abort_task_thread <-- refcount incremented.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"replica_abort_task_thread <-- refcount incremented.\n");
}
if(data->repl_obj && release_it)
object_release(data->repl_obj);
@@ -3492,7 +3492,7 @@ replica_cleanallruv_replica_alive(Repl_Agmt *agmt)
if(conn_connect(conn) == CONN_OPERATION_SUCCESS){
ld = conn_get_ldap(conn);
if(ld == NULL){
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "CleanAllRUV_task:
failed to get LDAP "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"CleanAllRUV_task: failed to get LDAP "
"handle from the replication agmt (%s). Moving on to the next
agmt.\n",agmt_get_long_name(agmt));
conn_delete_internal_ext(conn);
return -1;
diff --git a/ldap/servers/plugins/replication/repl5_replica_dnhash.c
b/ldap/servers/plugins/replication/repl5_replica_dnhash.c
index 7d1f7ca..12ae3e8 100644
--- a/ldap/servers/plugins/replication/repl5_replica_dnhash.c
+++ b/ldap/servers/plugins/replication/repl5_replica_dnhash.c
@@ -30,7 +30,7 @@ int replica_init_dn_hash ()
PL_CompareValues, NULL, NULL);
if (s_hash == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_init_dn_hash:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_init_dn_hash: "
"failed to allocate hash table; NSPR error - %d\n",
PR_GetError ());
return -1;
@@ -40,7 +40,7 @@ int replica_init_dn_hash ()
s_lock = slapi_new_rwlock();
if (s_lock == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_init_dn_hash:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_init_dn_hash: "
"failed to create lock; NSPR error - %d\n",
PR_GetError ());
replica_destroy_dn_hash ();
@@ -68,13 +68,13 @@ int replica_add_by_dn (const char *dn)
if (dn == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_add_by_dn: NULL
argument\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_add_by_dn: NULL argument\n");
return -1;
}
if (s_hash == NULL || s_lock == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_add_by_dn:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_add_by_dn: "
"replica hash is not initialized\n");
return -1;
}
@@ -84,7 +84,7 @@ int replica_add_by_dn (const char *dn)
/* make sure that the dn is unique */
if (PL_HashTableLookup(s_hash, dn) != NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_add_by_dn:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_add_by_dn: "
"replica with dn (%s) already in the hash\n", dn);
slapi_rwlock_unlock (s_lock);
return -1 ;
@@ -94,7 +94,7 @@ int replica_add_by_dn (const char *dn)
dn_copy = slapi_ch_strdup(dn);
if (PL_HashTableAdd(s_hash, dn_copy, dn_copy) == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_add_by_dn:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_add_by_dn: "
"failed to add dn (%s); NSPR error - %d\n",
dn_copy, PR_GetError ());
slapi_ch_free((void **)&dn_copy);
@@ -102,7 +102,7 @@ int replica_add_by_dn (const char *dn)
return -1;
}
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "replica_add_by_dn: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "replica_add_by_dn:
"
"added dn (%s)\n",
dn_copy);
slapi_rwlock_unlock (s_lock);
@@ -115,14 +115,14 @@ int replica_delete_by_dn (const char *dn)
if (dn == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_delete_by_dn:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_delete_by_dn: "
"NULL argument\n");
return -1;
}
if (s_hash == NULL || s_lock == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_delete_by_dn:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_delete_by_dn: "
"replica hash is not initialized\n");
return -1;
}
@@ -132,7 +132,7 @@ int replica_delete_by_dn (const char *dn)
/* locate object */
if (NULL == (dn_copy = (char *)PL_HashTableLookup(s_hash, dn)))
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_delete_by_dn:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_delete_by_dn: "
"dn (%s) is not in the hash.\n", dn);
slapi_rwlock_unlock (s_lock);
return -1;
@@ -142,7 +142,7 @@ int replica_delete_by_dn (const char *dn)
PL_HashTableRemove(s_hash, dn);
slapi_ch_free((void **)&dn_copy);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "replica_delete_by_dn: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "replica_delete_by_dn:
"
"removed dn (%s)\n",
dn);
slapi_rwlock_unlock (s_lock);
@@ -154,14 +154,14 @@ int replica_is_being_configured (const char *dn)
{
if (dn == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_is_dn_in_hash:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_is_dn_in_hash: "
"NULL argument\n");
return 0;
}
if (s_hash == NULL || s_lock == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_is_dn_in_hash:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_is_dn_in_hash: "
"dn hash is not initialized\n");
return 0;
}
diff --git a/ldap/servers/plugins/replication/repl5_replica_hash.c
b/ldap/servers/plugins/replication/repl5_replica_hash.c
index b01b1d2..8d31209 100644
--- a/ldap/servers/plugins/replication/repl5_replica_hash.c
+++ b/ldap/servers/plugins/replication/repl5_replica_hash.c
@@ -39,7 +39,7 @@ int replica_init_name_hash ()
PL_CompareValues, NULL, NULL);
if (s_hash == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_init_name_hash:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_init_name_hash: "
"failed to allocate hash table; NSPR error - %d\n",
PR_GetError ());
return -1;
@@ -49,7 +49,7 @@ int replica_init_name_hash ()
s_lock = slapi_new_rwlock();
if (s_lock == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_init_name_hash:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_init_name_hash: "
"failed to create lock; NSPR error - %d\n",
PR_GetError ());
replica_destroy_name_hash ();
@@ -75,13 +75,13 @@ int replica_add_by_name (const char *name, Object *replica)
{
if (name == NULL || replica == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_add_by_name:
NULL argument\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_add_by_name: NULL argument\n");
return -1;
}
if (s_hash == NULL || s_lock == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_add_by_name:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_add_by_name: "
"replica hash is not initialized\n");
return -1;
}
@@ -91,7 +91,7 @@ int replica_add_by_name (const char *name, Object *replica)
/* make sure that the name is unique */
if (PL_HashTableLookup(s_hash, name) != NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_add_by_name:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_add_by_name: "
"replica with name (%s) already in the hash\n", name);
slapi_rwlock_unlock (s_lock);
return -1 ;
@@ -103,7 +103,7 @@ int replica_add_by_name (const char *name, Object *replica)
/* add replica */
if (PL_HashTableAdd(s_hash, name, replica) == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_add_by_name:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_add_by_name: "
"failed to add replica with name (%s); NSPR error -
%d\n",
name, PR_GetError ());
object_release (replica);
@@ -121,14 +121,14 @@ int replica_delete_by_name (const char *name)
if (name == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_delete_by_name:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_delete_by_name: "
"NULL argument\n");
return -1;
}
if (s_hash == NULL || s_lock == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_delete_by_name:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_delete_by_name: "
"replica hash is not initialized\n");
return -1;
}
@@ -139,7 +139,7 @@ int replica_delete_by_name (const char *name)
replica = (Object*)PL_HashTableLookup(s_hash, name);
if (replica == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_delete_by_name:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_delete_by_name: "
"replica with name (%s) is not in the hash.\n", name);
slapi_rwlock_unlock (s_lock);
return -1;
@@ -162,14 +162,14 @@ Object* replica_get_by_name (const char *name)
if (name == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_get_by_name:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_get_by_name: "
"NULL argument\n");
return NULL;
}
if (s_hash == NULL || s_lock == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_get_by_name:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_get_by_name: "
"replica hash is not initialized\n");
return NULL;
}
diff --git a/ldap/servers/plugins/replication/repl5_ruv.c
b/ldap/servers/plugins/replication/repl5_ruv.c
index 5d6e1c3..9fd155c 100644
--- a/ldap/servers/plugins/replication/repl5_ruv.c
+++ b/ldap/servers/plugins/replication/repl5_ruv.c
@@ -92,7 +92,7 @@ ruv_init_new(const char *replGen, ReplicaId rid, const char *purl, RUV
**ruv)
if (ruv == NULL || replGen == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "ruv_init_new: NULL
argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "ruv_init_new: NULL
argument\n");
return RUV_BAD_DATA;
}
@@ -160,7 +160,7 @@ ruv_init_from_slapi_attr_and_check_purl(Slapi_Attr *attr, RUV **ruv,
ReplicaId *
if (NULL == ruv || NULL == attr)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruv_init_from_slapi_attr: NULL argument\n");
return_value = RUV_BAD_DATA;
}
@@ -200,7 +200,7 @@ ruv_init_from_slapi_attr_and_check_purl(Slapi_Attr *attr, RUV **ruv,
ReplicaId *
(*ruv)->replGen = get_replgen_from_berval(bval);
} else {
/* Twice replicageneration is wrong, just log and ignore */
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruv_init_from_slapi_attr: %s is present more than once\n",
prefix_replicageneration);
}
@@ -255,7 +255,7 @@ ruv_init_from_bervals(struct berval **vals, RUV **ruv)
if (NULL == ruv || NULL == vals)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruv_init_from_slapi_value: NULL argument\n");
return_value = RUV_BAD_DATA;
}
@@ -284,7 +284,7 @@ ruv_init_from_bervals(struct berval **vals, RUV **ruv)
(*ruv)->replGen = get_replgen_from_berval(vals[i]);
} else {
/* Twice replicageneration is wrong, just log and ignore */
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruv_init_from_slapi_value: %s is present more than once\n",
prefix_replicageneration);
}
@@ -427,7 +427,7 @@ ruv_delete_replica (RUV *ruv, ReplicaId rid)
int return_value;
if (ruv == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "ruv_delete_replica: NULL
argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "ruv_delete_replica:
NULL argument\n");
return_value = RUV_BAD_DATA;
}
else
@@ -552,7 +552,7 @@ get_csn_internal(const RUV *ruv, ReplicaId rid, CSN **csn, int
whichone)
if (ruv == NULL || csn == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"ruv_get_largest_csn_for_replica: NULL argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruv_get_largest_csn_for_replica: NULL argument\n");
return_value = RUV_BAD_DATA;
}
else
@@ -669,7 +669,7 @@ set_max_csn_nolock_ext(RUV *ruv, const CSN *max_csn, const char
*replica_purl, P
} else {
char csn1[CSN_STRSIZE+1];
char csn2[CSN_STRSIZE+1];
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"set_max_csn_nolock_ext: new CSN [%s] for replica ID [%d] "
"is less than the existing max CSN [%s] - ignoring\n",
csn_as_string(max_csn, PR_FALSE, csn1), rid,
@@ -716,7 +716,7 @@ ruv_set_csns(RUV *ruv, const CSN *csn, const char *replica_purl)
if (ruv == NULL || csn == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "ruv_set_csns: NULL
argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "ruv_set_csns: NULL
argument\n");
return_value = RUV_BAD_DATA;
}
else
@@ -783,7 +783,7 @@ ruv_set_csns_keep_smallest(RUV *ruv, const CSN *csn)
if (ruv == NULL || csn == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruv_set_csns_keep_smallest: NULL argument\n");
return_value = RUV_BAD_DATA;
}
@@ -869,7 +869,7 @@ ruv_covers_csn_internal(const RUV *ruv, const CSN *csn, PRBool
strict)
if (ruv == NULL || csn == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "ruv_covers_csn: NULL
argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "ruv_covers_csn: NULL
argument\n");
return_value = PR_FALSE;
}
else
@@ -887,10 +887,10 @@ ruv_covers_csn_internal(const RUV *ruv, const CSN *csn, PRBool
strict)
* if strict is set.
*/
if(strict){
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "ruv_covers_csn: replica for
id %d not found.\n", rid);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "ruv_covers_csn:
replica for id %d not found.\n", rid);
return_value = PR_TRUE;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "ruv_covers_csn: replica for
id %d not found.\n", rid);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "ruv_covers_csn:
replica for id %d not found.\n", rid);
return_value = PR_FALSE;
}
}
@@ -947,7 +947,7 @@ ruv_covers_csn_cleanallruv(const RUV *ruv, const CSN *csn)
PRBool return_value;
if (ruv == NULL || csn == NULL){
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "ruv_covers_csn_cleanallruv:
NULL argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruv_covers_csn_cleanallruv: NULL argument\n");
return_value = PR_FALSE;
} else {
rid = csn_get_replicaid(csn);
@@ -974,7 +974,7 @@ ruv_get_min_or_max_csn(const RUV *ruv, CSN **csn, int get_the_max,
ReplicaId rid
if (ruv == NULL || csn == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "ruv_get_min_or_max_csn: NULL
argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruv_get_min_or_max_csn: NULL argument\n");
return_value = RUV_BAD_DATA;
}
else
@@ -1140,7 +1140,7 @@ ruv_to_bervals(const RUV *ruv, struct berval ***bvals)
int return_value;
if (ruv == NULL || bvals == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "ruv_to_bervals: NULL
argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "ruv_to_bervals: NULL
argument\n");
return_value = RUV_BAD_DATA;
}
else
@@ -1269,7 +1269,7 @@ ruv_to_smod(const RUV *ruv, Slapi_Mod *smod)
if (ruv == NULL || smod == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "ruv_to_smod: NULL
argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "ruv_to_smod: NULL
argument\n");
return_value = RUV_BAD_DATA;
}
else
@@ -1309,7 +1309,7 @@ ruv_last_modified_to_smod(const RUV *ruv, Slapi_Mod *smod)
if (ruv == NULL || smod == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "ruv_last_modified_to_smod: NULL
argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruv_last_modified_to_smod: NULL argument\n");
return_value = RUV_BAD_DATA;
}
else
@@ -1400,14 +1400,16 @@ ruv_compare_ruv(const RUV *ruv1, const char *ruv1name, const RUV
*ruv2, const ch
/* compare replica generations first */
if (ruv1->replGen == NULL || ruv2->replGen == NULL) {
- slapi_log_error(loglevel, repl_plugin_name,
+ slapi_log_error(loglevel, loglevel==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
+ repl_plugin_name,
"ruv_compare_ruv: RUV [%s] is missing the replica
generation\n",
ruv1->replGen ? ruv2name : ruv1name);
return RUV_COMP_NO_GENERATION;
}
if (strcasecmp (ruv1->replGen, ruv2->replGen)) {
- slapi_log_error(loglevel, repl_plugin_name,
+ slapi_log_error(loglevel, loglevel==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
+ repl_plugin_name,
"ruv_compare_ruv: RUV [%s] replica generation [%s] does not
match RUV [%s] [%s]\n",
ruv1name, ruv1->replGen, ruv2name, ruv2->replGen);
return RUV_COMP_GENERATION_DIFFERS;
@@ -1436,33 +1438,33 @@ ruv_compare_ruv(const RUV *ruv1, const char *ruv1name, const RUV
*ruv2, const ch
csn_as_string(replicab->csn, PR_FALSE, csnstrb);
if (replicaa == NULL) {
(*missing)++;
- slapi_log_error(loglevel, repl_plugin_name,
+ slapi_log_error(loglevel, loglevel==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
repl_plugin_name,
"ruv_compare_ruv: RUV [%s] does not contain
element [%s] "
"which is present in RUV [%s]\n",
ruvaname, ruvelem, ruvbname);
} else if (strict && (csn_compare (replicab->csn,
replicaa->csn) >= 0)) {
csn_as_string(replicaa->csn, PR_FALSE, csnstra);
- slapi_log_error(loglevel, repl_plugin_name,
+ slapi_log_error(loglevel,
loglevel==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,repl_plugin_name,
"ruv_compare_ruv: the max CSN [%s] from RUV [%s]
is larger "
"than or equal to the max CSN [%s] from RUV [%s]
for element [%s]\n",
csnstrb, ruvbname, csnstra, ruvaname, ruvelem);
rc = RUV_COMP_CSN_DIFFERS;
} else if (csn_compare (replicab->csn, replicaa->csn) > 0) {
csn_as_string(replicaa->csn, PR_FALSE, csnstra);
- slapi_log_error(loglevel, repl_plugin_name,
+ slapi_log_error(loglevel,
loglevel==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,repl_plugin_name,
"ruv_compare_ruv: the max CSN [%s] from RUV [%s]
is larger "
"than the max CSN [%s] from RUV [%s] for element
[%s]\n",
csnstrb, ruvbname, csnstra, ruvaname, ruvelem);
rc = RUV_COMP_CSN_DIFFERS;
} else {
csn_as_string(replicaa->csn, PR_FALSE, csnstra);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruv_compare_ruv: the max CSN [%s] from RUV [%s]
is less than "
"or equal to the max CSN [%s] from RUV [%s] for
element [%s]\n",
csnstrb, ruvbname, csnstra, ruvaname, ruvelem);
}
} else {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruv_compare_ruv: RUV [%s] has an empty
CSN\n",
ruvbname);
}
@@ -1562,7 +1564,7 @@ ruv_dump(const RUV *ruv, char *ruv_name, PRFileDesc *prFile)
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "%s", buff);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "%s", buff);
}
for (replica = dl_get_first (ruv->elements, &cookie); replica;
replica = dl_get_next (ruv->elements, &cookie))
@@ -1587,7 +1589,7 @@ ruv_dump(const RUV *ruv, char *ruv_name, PRFileDesc *prFile)
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "%s", buff);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "%s", buff);
}
}
@@ -1620,7 +1622,7 @@ int ruv_add_csn_inprogress (RUV *ruv, const CSN *csn)
if (replica == NULL)
{
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"ruv_add_csn_inprogress: failed to add replica"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruv_add_csn_inprogress: failed to add replica"
" that created csn %s\n", csn_as_string (csn, PR_FALSE,
csn_str));
}
rc = RUV_MEMORY_ERROR;
@@ -1632,7 +1634,7 @@ int ruv_add_csn_inprogress (RUV *ruv, const CSN *csn)
if (ruv_covers_csn_internal(ruv, csn, PR_FALSE))
{
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"ruv_add_csn_inprogress: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruv_add_csn_inprogress: "
"the csn %s has already be seen - ignoring\n",
csn_as_string (csn, PR_FALSE, csn_str));
}
@@ -1644,7 +1646,7 @@ int ruv_add_csn_inprogress (RUV *ruv, const CSN *csn)
if (rc == 1) /* we already seen this csn */
{
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"ruv_add_csn_inprogress: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruv_add_csn_inprogress: "
"the csn %s has already be seen - ignoring\n",
csn_as_string (csn, PR_FALSE, csn_str));
}
@@ -1653,7 +1655,7 @@ int ruv_add_csn_inprogress (RUV *ruv, const CSN *csn)
else if(rc != 0)
{
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"ruv_add_csn_inprogress: failed to insert csn %s"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruv_add_csn_inprogress: failed to insert csn %s"
" into pending list\n", csn_as_string (csn,
PR_FALSE, csn_str));
}
rc = RUV_UNKNOWN_ERROR;
@@ -1661,7 +1663,7 @@ int ruv_add_csn_inprogress (RUV *ruv, const CSN *csn)
else
{
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"ruv_add_csn_inprogress: successfully inserted csn %s"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruv_add_csn_inprogress: successfully inserted csn %s"
" into pending list\n", csn_as_string (csn,
PR_FALSE, csn_str));
}
rc = RUV_SUCCESS;
@@ -1717,14 +1719,14 @@ int ruv_update_ruv (RUV *ruv, const CSN *csn, const char
*replica_purl, PRBool i
{
/* we should have a ruv element at this point because it would have
been added by ruv_add_inprogress function */
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "ruv_update_ruv: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruv_update_ruv: "
"can't locate RUV element for replica %d\n",
csn_get_replicaid (csn));
goto done;
}
if (csnplCommit(replica->csnpl, csn) != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "ruv_update_ruv: cannot commit
csn %s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "ruv_update_ruv:
cannot commit csn %s\n",
csn_as_string(csn, PR_FALSE, csn_str));
rc = RUV_CSNPL_ERROR;
goto done;
@@ -1732,7 +1734,7 @@ int ruv_update_ruv (RUV *ruv, const CSN *csn, const char
*replica_purl, PRBool i
else
{
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "ruv_update_ruv:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruv_update_ruv: "
"successfully committed csn %s\n",
csn_as_string(csn, PR_FALSE, csn_str));
}
}
@@ -1740,7 +1742,7 @@ int ruv_update_ruv (RUV *ruv, const CSN *csn, const char
*replica_purl, PRBool i
if ((max_csn = csnplRollUp(replica->csnpl, &first_csn)) != NULL)
{
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "ruv_update_ruv: rolled up to
csn %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "ruv_update_ruv:
rolled up to csn %s\n",
csn_as_string(max_csn, PR_FALSE, csn_str)); /* XXXggood remove debugging
*/
#endif
/* replica object sets min csn for local replica */
@@ -1791,7 +1793,7 @@ ruvInit (RUV **ruv, int initCount)
(*ruv)->lock = slapi_new_rwlock();
if ((*ruv)->lock == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruvInit: failed to create lock\n");
dl_free(&(*ruv)->elements);
slapi_ch_free((void**)ruv);
@@ -1838,7 +1840,7 @@ ruvAddReplica (RUV *ruv, const CSN *csn, const char *replica_purl)
replica = (RUVElement *)slapi_ch_calloc (1, sizeof (RUVElement));
if (replica == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruvAddReplica: memory allocation failed\n");
return NULL;
}
@@ -1869,7 +1871,7 @@ ruvAddReplicaNoCSN (RUV *ruv, ReplicaId rid, const char
*replica_purl)
replica = (RUVElement *)slapi_ch_calloc (1, sizeof (RUVElement));
if (replica == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruvAddReplicaNoCSN: memory allocation failed\n");
return NULL;
}
@@ -1894,7 +1896,7 @@ ruvAddIndexReplicaNoCSN (RUV *ruv, ReplicaId rid, const char
*replica_purl, int
replica = (RUVElement *)slapi_ch_calloc (1, sizeof (RUVElement));
if (replica == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"ruvAddIndexReplicaNoCSN: memory allocation failed\n");
return NULL;
}
@@ -1988,7 +1990,7 @@ get_ruvelement_from_berval(const struct berval *bval)
bval->bv_len <= strlen(prefix_ruvcsn) ||
strncasecmp(bval->bv_val, prefix_ruvcsn, strlen(prefix_ruvcsn)) != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"get_ruvelement_from_berval: invalid berval\n");
goto loser;
}
@@ -2080,7 +2082,7 @@ get_ruvelement_from_berval(const struct berval *bval)
ret_ruve->csnpl = csnplNew ();
if (ret_ruve->csnpl == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"get_ruvelement_from_berval: failed to create csn pending list\n");
goto loser;
}
@@ -2240,7 +2242,7 @@ ruv_is_newer (Object *sruvobj, Object *cruvobj)
if ( cruv->elements == NULL )
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"ruv_is_newer, consumer RUV has no elements\n");
is_newer=PR_FALSE;
break;
@@ -2288,7 +2290,8 @@ ruv_force_csn_update_from_ruv(RUV *src_ruv, RUV *tgt_ruv, char *msg,
int logLeve
ruv_force_csn_update(tgt_ruv, replica->csn);
csn_as_string(replica->csn, PR_FALSE, csnStr);
- slapi_log_error(logLevel, repl_plugin_name, "%s %s\n",
+ slapi_log_error(logLevel, logLevel==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
+ repl_plugin_name, "%s %s\n",
msg, csnStr);
}
}
diff --git a/ldap/servers/plugins/replication/repl5_schedule.c
b/ldap/servers/plugins/replication/repl5_schedule.c
index f400c13..7193038 100644
--- a/ldap/servers/plugins/replication/repl5_schedule.c
+++ b/ldap/servers/plugins/replication/repl5_schedule.c
@@ -593,7 +593,7 @@ schedule_window_state_change_event (Schedule *sch)
sch->pending_event = slapi_eq_once(window_state_changed, sch, wakeup_time);
timestr = get_timestring(&wakeup_time);
- slapi_log_error (SLAPI_LOG_REPL, repl_plugin_name, "%s: Update window will
%s at %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "%s: Update
window will %s at %s\n",
sch->session_id,
window_opened ? "close" : "open", timestr);
free_timestring(timestr);
@@ -615,7 +615,7 @@ window_state_changed (time_t when, void *arg)
open = schedule_in_window_now_nolock(sch);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "%s: Update window is now
%s\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "%s: Update window
is now %s\n",
sch->session_id,
open ? "open" : "closed");
diff --git a/ldap/servers/plugins/replication/repl5_tot_protocol.c
b/ldap/servers/plugins/replication/repl5_tot_protocol.c
index bd43a96..6276e57 100644
--- a/ldap/servers/plugins/replication/repl5_tot_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_tot_protocol.c
@@ -92,7 +92,7 @@ static void repl5_tot_delete(Private_Repl_Protocol **prp);
static void
repl5_tot_log_operation_failure(int ldap_error, char* ldap_error_string, const char
*agreement_name)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Received error %d (%s): %s for total update operation\n",
agreement_name,
ldap_error, ldap_err2string(ldap_error), ldap_error_string ? ldap_error_string :
"");
@@ -203,7 +203,7 @@ static int repl5_tot_create_async_result_thread(callback_data
*cb_data)
SLAPD_DEFAULT_THREAD_STACKSIZE);
if (NULL == tid)
{
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"repl5_tot_create_async_result_thread failed. "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
PR_GetError(), slapd_pr_strerror( PR_GetError() ));
@@ -262,7 +262,7 @@ repl5_tot_waitfor_async_results(callback_data *cb_data)
/* Lock the structure to force memory barrier */
PR_Lock(cb_data->lock);
/* Are we caught up ? */
- slapi_log_error(SLAPI_LOG_REPL, NULL,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL,
"repl5_tot_waitfor_async_results: %d %d\n",
cb_data->last_message_id_received, cb_data->last_message_id_sent);
if (cb_data->last_message_id_received >= cb_data->last_message_id_sent)
@@ -290,7 +290,7 @@ repl5_tot_waitfor_async_results(callback_data *cb_data)
if (!done && (loops > 30))
{
/* Log a warning */
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"repl5_tot_waitfor_async_results timed out waiting for responses: %d
%d\n",
cb_data->last_message_id_received, cb_data->last_message_id_sent);
done = 1;
@@ -338,7 +338,7 @@ repl5_tot_run(Private_Repl_Protocol *prp)
area_sdn = agmt_get_replarea(prp->agmt);
if (!area_sdn) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Warning: unable to "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Warning: unable to
"
"get repl area. Please check agreement.\n");
goto done;
}
@@ -362,7 +362,7 @@ retry:
conn_get_error(prp->conn, &optype, &ldaprc);
if (rc == ACQUIRE_TRANSIENT_ERROR && INIT_RETRY_MAX > init_retry++) {
wait_retry = init_retry * INIT_RETRY_INT;
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Warning: unable to
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Warning:
unable to "
"acquire replica for total update, error: %d,"
" retrying in %d seconds.\n",
ldaprc, wait_retry);
@@ -393,7 +393,7 @@ retry:
if (CONN_SCHEMA_UPDATED != rc && CONN_SCHEMA_NO_UPDATE_NEEDED != rc)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Warning: unable to "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Warning: unable to
"
"replicate schema to host %s, port %d. Continuing with "
"total update session.\n",
hostname, portnum);
@@ -413,7 +413,7 @@ retry:
agmt_set_last_init_status(prp->agmt, 0, 0, 0, "Total update in
progress");
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Beginning total update of
replica "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Beginning total
update of replica "
"\"%s\".\n", agmt_get_long_name(prp->agmt));
/* RMREPL - need to send schema here */
@@ -427,13 +427,13 @@ retry:
*/
rc = slapi_lookup_instance_name_by_suffix((char *)slapi_sdn_get_dn(area_sdn), NULL,
&instances, 1);
if (rc || !instances) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Warning: unable to
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Warning: unable
to "
"get the instance name for the suffix
\"%s\".\n", slapi_sdn_get_dn(area_sdn));
goto done;
}
be = slapi_be_select_by_instance_name(instances[0]);
if (!be) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Warning: unable to
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Warning: unable
to "
"get the instance for the suffix \"%s\".\n",
slapi_sdn_get_dn(area_sdn));
goto done;
}
@@ -446,7 +446,7 @@ retry:
/* Get suffix */
rc = slapi_search_internal_get_entry(area_sdn, NULL, &suffix,
repl_get_plugin_identity(PLUGIN_MULTIMASTER_REPLICATION));
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Warning: unable to
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Warning:
unable to "
"get the suffix entry \"%s\".\n",
slapi_sdn_get_dn(area_sdn));
goto done;
}
@@ -467,7 +467,7 @@ retry:
/* Send suffix first. */
rc = send_entry(suffix, (void *)&cb_data);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Warning: unable to
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Warning:
unable to "
"send the suffix entry \"%s\" to the
consumer.\n", slapi_sdn_get_dn(area_sdn));
goto done;
}
@@ -533,7 +533,7 @@ retry:
{
rc = repl5_tot_create_async_result_thread(&cb_data);
if (rc) {
- slapi_log_error (SLAPI_LOG_FATAL, repl_plugin_name, "%s: repl5_tot_run: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "%s: repl5_tot_run:
"
"repl5_tot_create_async_result_thread failed; error - %d\n",
agmt_get_long_name(prp->agmt), rc);
goto done;
@@ -563,7 +563,7 @@ retry:
}
rc = repl5_tot_destroy_async_result_thread(&cb_data);
if (rc) {
- slapi_log_error (SLAPI_LOG_FATAL, repl_plugin_name, "%s: repl5_tot_run: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "%s: repl5_tot_run:
"
"repl5_tot_destroy_async_result_thread failed; error - %d\n",
agmt_get_long_name(prp->agmt), rc);
}
@@ -583,11 +583,11 @@ retry:
if (rc != CONN_OPERATION_SUCCESS)
{
- slapi_log_error (SLAPI_LOG_FATAL, repl_plugin_name, "Total update failed for
replica \"%s\", "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Total update failed
for replica \"%s\", "
"error (%d)\n", agmt_get_long_name(prp->agmt), rc);
agmt_set_last_init_status(prp->agmt, 0, 0, rc, "Total update aborted");
} else {
- slapi_log_error (SLAPI_LOG_FATAL, repl_plugin_name, "Finished total update of
replica "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Finished total update
of replica "
"\"%s\". Sent %lu entries.\n",
agmt_get_long_name(prp->agmt), cb_data.num_entries);
agmt_set_last_init_status(prp->agmt, 0, 0, 0, "Total update succeeded");
@@ -599,7 +599,7 @@ done:
slapi_ch_free_string(&hostname);
if (cb_data.flowcontrol_detection > 1)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Total update flow control triggered %d times\n"
"You may increase %s and/or decrease %s in the replica agreement
configuration\n",
agmt_get_long_name(prp->agmt),
@@ -645,7 +645,7 @@ repl5_tot_stop(Private_Repl_Protocol *prp)
if (!prp->stopped)
{
/* Isn't listening. Disconnect from the replica. */
- slapi_log_error (SLAPI_LOG_REPL, repl_plugin_name, "repl5_tot_run: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "repl5_tot_run:
"
"protocol not stopped after waiting for %d seconds "
"for agreement %s\n", PR_IntervalToSeconds(now-start),
agmt_get_long_name(prp->agmt));
@@ -843,7 +843,7 @@ int send_entry (Slapi_Entry *e, void *cb_data)
if (bere == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "%s: send_entry: Encoding
Error\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "%s: send_entry:
Encoding Error\n",
agmt_get_long_name(prp->agmt));
((callback_data*)cb_data)->rc = -1;
retval = -1;
@@ -890,7 +890,7 @@ int send_entry (Slapi_Entry *e, void *cb_data)
}
*last_busyp = now;
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Replica \"%s\" is busy. Waiting %lds while"
" it finishes processing its current import queue\n",
agmt_get_long_name(prp->agmt), *sleep_on_busyp);
diff --git a/ldap/servers/plugins/replication/repl5_total.c
b/ldap/servers/plugins/replication/repl5_total.c
index e326a9a..efe5a91 100644
--- a/ldap/servers/plugins/replication/repl5_total.c
+++ b/ldap/servers/plugins/replication/repl5_total.c
@@ -245,7 +245,7 @@ my_ber_printf_csn(BerElement *ber, const CSN *csn, const CSNType t)
case CSN_TYPE_ATTRIBUTE_DELETED:
break;
default:
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "my_ber_printf_csn:
unknown "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"my_ber_printf_csn: unknown "
"csn type %d encountered.\n", (int)t);
return -1;
}
@@ -454,7 +454,7 @@ my_ber_scanf_value(BerElement *ber, Slapi_Value **value, PRBool
*deleted)
if (NULL == ber && NULL == value)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "my_ber_scanf_value BAD
1\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "my_ber_scanf_value
BAD 1\n");
goto loser;
}
@@ -463,13 +463,13 @@ my_ber_scanf_value(BerElement *ber, Slapi_Value **value, PRBool
*deleted)
/* Each value is a sequence */
if (ber_scanf(ber, "{O", &attrval) == LBER_ERROR)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "my_ber_scanf_value BAD
2\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "my_ber_scanf_value
BAD 2\n");
goto loser;
}
/* Allocate and fill in the attribute value */
if ((*value = slapi_value_new_berval(attrval)) == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "my_ber_scanf_value BAD
3\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "my_ber_scanf_value
BAD 3\n");
goto loser;
}
@@ -478,7 +478,7 @@ my_ber_scanf_value(BerElement *ber, Slapi_Value **value, PRBool
*deleted)
{
if (ber_scanf(ber, "b", deleted) == LBER_ERROR)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "my_ber_scanf_value BAD
4\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "my_ber_scanf_value
BAD 4\n");
goto loser;
}
}
@@ -498,7 +498,7 @@ my_ber_scanf_value(BerElement *ber, Slapi_Value **value, PRBool
*deleted)
len = CSN_STRSIZE;
if (ber_scanf(ber, "{es}", &csntype_tmp, csnstring, &len) ==
LBER_ERROR)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "my_ber_scanf_value BAD 7 -
bval is %s\n", attrval->bv_val);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "my_ber_scanf_value
BAD 7 - bval is %s\n", attrval->bv_val);
goto loser;
}
switch (csntype_tmp)
@@ -513,14 +513,14 @@ my_ber_scanf_value(BerElement *ber, Slapi_Value **value, PRBool
*deleted)
csntype = CSN_TYPE_VALUE_DISTINGUISHED;
break;
default:
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Error: preposterous CSN type
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Error: preposterous
CSN type "
"%d received during total update.\n", csntype_tmp);
goto loser;
}
csn = csn_new_by_string(csnstring);
if (csn == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "my_ber_scanf_value BAD
8\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "my_ber_scanf_value
BAD 8\n");
goto loser;
}
value_add_csn(*value, csntype, csn);
@@ -529,7 +529,7 @@ my_ber_scanf_value(BerElement *ber, Slapi_Value **value, PRBool
*deleted)
if (ber_scanf(ber, "}") == LBER_ERROR) /* End of annotated attribute value seq
*/
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "my_ber_scanf_value BAD
10\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "my_ber_scanf_value
BAD 10\n");
goto loser;
}
@@ -799,7 +799,7 @@ loser:
slapi_entry_free (e);
}
*ep = NULL;
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Error: could not decode
extended "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Error: could not
decode extended "
"operation containing entry for total update.\n");
free_and_return:
@@ -851,7 +851,7 @@ multimaster_extop_NSDS50ReplicationEntry(Slapi_PBlock *pb)
if (rc != LDAP_SUCCESS)
{
const char *dn = slapi_entry_get_dn_const(e);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"Error %d: could not import entry dn %s "
"for total update operation conn=%" NSPRIu64 " op=%d\n",
rc, dn, connid, opid);
@@ -861,7 +861,7 @@ multimaster_extop_NSDS50ReplicationEntry(Slapi_PBlock *pb)
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"Error %d: could not decode the total update extop "
"for total update operation conn=%" NSPRIu64 " op=%d\n",
rc, connid, opid);
diff --git a/ldap/servers/plugins/replication/repl5_updatedn_list.c
b/ldap/servers/plugins/replication/repl5_updatedn_list.c
index c04a53f..16fc6d2 100644
--- a/ldap/servers/plugins/replication/repl5_updatedn_list.c
+++ b/ldap/servers/plugins/replication/repl5_updatedn_list.c
@@ -52,7 +52,7 @@ replica_updatedn_list_new(const Slapi_Entry *entry)
PLHashTable *hash = PL_NewHashTable(4, PL_HashString, PL_CompareStrings,
updatedn_compare_dns, NULL, NULL);
if (hash == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"replica_new_updatedn_list: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_new_updatedn_list: "
"failed to allocate hash table; NSPR error - %d\n",
PR_GetError ());
return NULL;
@@ -96,7 +96,7 @@ replica_groupdn_list_new(const Slapi_ValueSet *vs)
hash = PL_NewHashTable(4, PL_HashString, PL_CompareStrings,
updatedn_compare_dns, NULL, NULL);
if (hash == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"replica_new_updatedn_list: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"replica_new_updatedn_list: "
"failed to allocate hash table; NSPR error - %d\n",
PR_GetError ());
return NULL;
@@ -150,7 +150,7 @@ replica_updatedn_list_delete(ReplicaUpdateDNList list, const
Slapi_ValueSet *vs)
Slapi_DN *deldn = (Slapi_DN *)PL_HashTableLookup(hash, slapi_sdn_get_ndn(dn));
if (deldn == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "replica_updatedn_list_delete:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"replica_updatedn_list_delete: "
"update DN with value (%s) is not in the update DN list.\n",
slapi_sdn_get_ndn(dn));
} else {
@@ -245,7 +245,7 @@ replica_updatedn_list_add_ext(ReplicaUpdateDNList list, const
Slapi_ValueSet *vs
/* make sure that the name is unique */
if (PL_HashTableLookup(hash, ndn) != NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "replica_updatedn_list_add:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"replica_updatedn_list_add: "
"update DN with value (%s) already in the update DN list\n",
ndn);
slapi_sdn_free(&dn);
diff --git a/ldap/servers/plugins/replication/repl_bind.c
b/ldap/servers/plugins/replication/repl_bind.c
index 06bc361..9f04af3 100644
--- a/ldap/servers/plugins/replication/repl_bind.c
+++ b/ldap/servers/plugins/replication/repl_bind.c
@@ -40,7 +40,7 @@ legacy_preop_bind( Slapi_PBlock *pb )
void *conn = NULL;
consumer_connection_extension *connext = NULL;
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_REPL, REPLICATION_SUBSYSTEM, "legacy_preop_bind:
begin\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, REPLICATION_SUBSYSTEM,
"legacy_preop_bind: begin\n");
#endif
slapi_pblock_get( pb, SLAPI_CONNECTION, &conn );
/* TEL 20120529 - Is there any reason we must protect this connext access? */
diff --git a/ldap/servers/plugins/replication/repl_connext.c
b/ldap/servers/plugins/replication/repl_connext.c
index 164ff51..1e76c80 100644
--- a/ldap/servers/plugins/replication/repl_connext.c
+++ b/ldap/servers/plugins/replication/repl_connext.c
@@ -31,7 +31,7 @@ void* consumer_connection_extension_constructor (void *object, void
*parent)
consumer_connection_extension *ext = (consumer_connection_extension*) slapi_ch_malloc
(sizeof (consumer_connection_extension));
if (ext == NULL)
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name, "unable to create replication
consumer connection extension - out of memory\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name, "unable to create
replication consumer connection extension - out of memory\n" );
}
else
{
@@ -45,7 +45,7 @@ void* consumer_connection_extension_constructor (void *object, void
*parent)
ext->lock = PR_NewLock();
if (NULL == ext->lock)
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name, "unable to create
replication consumer connection extension lock - out of memory\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name, "unable to create
replication consumer connection extension lock - out of memory\n" );
/* no need to go through the full destructor, but still need to free up this memory
*/
slapi_ch_free((void **)&ext);
ext = NULL;
@@ -79,7 +79,7 @@ void consumer_connection_extension_destructor (void *ext, void *object,
void *pa
slapi_pblock_set(pb, SLAPI_CONNECTION, connext->connection);
slapi_pblock_set(pb, SLAPI_TARGET_SDN, (void*)repl_root_sdn);
slapi_pblock_get(pb, SLAPI_CONN_ID, &connid);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"Aborting total update in progress for replicated "
"area %s connid=%" NSPRIu64 "\n",
slapi_sdn_get_dn(repl_root_sdn),
connid);
@@ -87,7 +87,7 @@ void consumer_connection_extension_destructor (void *ext, void *object,
void *pa
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"consumer_connection_extension_destructor: can't determine root "
"of replicated area.\n");
}
@@ -152,20 +152,20 @@ consumer_connection_extension_acquire_exclusive_access(void* conn,
PRUint64 conn
/* step 4, take it! */
connext->in_use_opid = opid;
ret = connext;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d Acquired consumer connection
extension\n",
connid, opid);
}
else if (opid == connext->in_use_opid)
{
ret = connext;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d Reacquired consumer
connection extension\n",
connid, opid);
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d Could not acquire consumer
connection extension; it is in use by op=%d\n",
connid, opid, connext->in_use_opid);
}
@@ -175,7 +175,7 @@ consumer_connection_extension_acquire_exclusive_access(void* conn,
PRUint64 conn
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d Could not acquire consumer
extension, it is NULL!\n",
connid, opid);
}
@@ -213,7 +213,7 @@ consumer_connection_extension_relinquish_exclusive_access(void* conn,
PRUint64 c
/* step 3, see if it is in use */
if (0 > connext->in_use_opid)
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d Consumer connection
extension is not in use\n",
connid, opid);
ret = 2;
@@ -221,7 +221,7 @@ consumer_connection_extension_relinquish_exclusive_access(void* conn,
PRUint64 c
else if (opid == connext->in_use_opid)
{
/* step 4, relinquish it (normal) */
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d Relinquishing consumer
connection extension\n",
connid, opid);
connext->in_use_opid = -1;
@@ -230,7 +230,7 @@ consumer_connection_extension_relinquish_exclusive_access(void* conn,
PRUint64 c
else if (force)
{
/* step 4, relinquish it (forced) */
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d Forced to relinquish
consumer connection extension held by op=%d\n",
connid, opid, connext->in_use_opid);
connext->in_use_opid = -1;
@@ -238,7 +238,7 @@ consumer_connection_extension_relinquish_exclusive_access(void* conn,
PRUint64 c
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d Not relinquishing consumer
connection extension, it is held by op=%d!\n",
connid, opid, connext->in_use_opid);
}
@@ -248,7 +248,7 @@ consumer_connection_extension_relinquish_exclusive_access(void* conn,
PRUint64 c
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d Could not relinquish consumer
extension, it is NULL!\n",
connid, opid);
}
diff --git a/ldap/servers/plugins/replication/repl_extop.c
b/ldap/servers/plugins/replication/repl_extop.c
index d2ed59c..f3bcebd 100644
--- a/ldap/servers/plugins/replication/repl_extop.c
+++ b/ldap/servers/plugins/replication/repl_extop.c
@@ -666,7 +666,7 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
/* Stash info that this is an incremental update session */
connext->repl_protocol_version = REPL_PROTOCOL_50_INCREMENTAL;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d repl=\"%s\": Begin incremental
protocol\n",
connid, opid, repl_root);
isInc = PR_TRUE;
@@ -692,7 +692,7 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
{
connext->repl_protocol_version = REPL_PROTOCOL_50_TOTALUPDATE;
}
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d repl=\"%s\": Begin total
protocol\n",
connid, opid, repl_root);
isInc = PR_FALSE;
@@ -701,7 +701,7 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
{
/* Stash info that this is an incremental update session */
connext->repl_protocol_version = REPL_PROTOCOL_50_INCREMENTAL;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d repl=\"%s\": Begin 7.1 incremental
protocol\n",
connid, opid, repl_root);
isInc = PR_TRUE;
@@ -713,7 +713,7 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
{
connext->repl_protocol_version = REPL_PROTOCOL_50_TOTALUPDATE;
}
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d repl=\"%s\": Begin 7.1 total
protocol\n",
connid, opid, repl_root);
isInc = PR_FALSE;
@@ -735,7 +735,7 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
/* see if this replica is being configured and wait for it */
if (replica_is_being_configured(repl_root))
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d replica=\"%s\": "
"Replica is being configured: try again later\n",
connid, opid, repl_root);
@@ -762,7 +762,7 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
if (replica_is_state_flag_set(replica,
REPLICA_TOTAL_EXCL_SEND|REPLICA_TOTAL_EXCL_RECV))
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: total update on is initiated on the replica. Cannot execute the total
update from other master.\n", repl_root);
response = NSDS50_REPL_REPLICA_BUSY;
goto send_response;
@@ -806,7 +806,7 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
rc = replica_update_csngen_state_ext (replica, supplier_ruv, replicacsn); /* too much
skew */
if (rc == CSN_LIMIT_EXCEEDED)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d repl=\"%s\": "
"Excessive clock skew from supplier RUV\n",
connid, opid, repl_root);
@@ -843,7 +843,7 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
}
if (check_replica_id_uniqueness(replica, supplier_ruv) != 0){
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d repl=\"%s\": "
"Replica has same replicaID %d as supplier\n",
connid, opid, repl_root, replica_get_rid(replica));
@@ -882,7 +882,7 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
if (getenv("SLAPD_TEST_TICKET_374") && (opid > 20)) {
int i = 0;
int max = 480 * 5;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d repl=\"%s\": "
"374 - Starting sleep: connext->repl_protocol_version == %d\n",
connid, opid, repl_root, connext->repl_protocol_version);
@@ -891,7 +891,7 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
usleep(200000);
}
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d repl=\"%s\": "
"374 - Finished sleep: connext->repl_protocol_version == %d\n",
connid, opid, repl_root, connext->repl_protocol_version);
@@ -985,7 +985,7 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
* than assuming a total update was requested.
*
https://fedorahosted.org/389/ticket/374 */
response = NSDS50_REPL_INTERNAL_ERROR;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d repl=\"%s\": "
"Unexpected update protocol received: %d. "
"Expected incremental or total.\n",
@@ -1025,7 +1025,8 @@ send_response:
resp_log_level = SLAPI_LOG_REPL;
}
- slapi_log_error (resp_log_level, repl_plugin_name,
+ slapi_log_error (resp_log_level, resp_log_level==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
+ repl_plugin_name,
"conn=%" NSPRIu64 " op=%d replica=\"%s\": "
"Unable to acquire replica: error: %s%s\n",
connid, opid,
@@ -1077,7 +1078,7 @@ send_response:
}
slapi_pblock_set(pb, SLAPI_EXT_OP_RET_VALUE, resp_bval);
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d repl=\"%s\": "
"%s: response=%d rc=%d\n",
connid, opid, repl_root,
@@ -1449,7 +1450,7 @@ multimaster_extop_abort_cleanruv(Slapi_PBlock *pb)
* Decode the payload, and grab our settings
*/
if(decode_cleanruv_payload(extop_payload, &payload)){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Abort CleanAllRUV Task: failed
to decode payload. Aborting ext op\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Abort CleanAllRUV
Task: failed to decode payload. Aborting ext op\n");
return LDAP_OPERATIONS_ERROR;
}
rid = atoi(ldap_utf8strtok_r(payload, ":", &iter));
@@ -1460,13 +1461,13 @@ multimaster_extop_abort_cleanruv(Slapi_PBlock *pb)
/* This replica has already been aborted, or was never cleaned, or already finished
cleaning */
goto out;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Abort CleanAllRUV Task:
aborting cleanallruv task for rid(%d)\n", rid);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Abort CleanAllRUV
Task: aborting cleanallruv task for rid(%d)\n", rid);
}
/*
* Get the node, so we can get the replica and its agreements
*/
if((mtnode_ext = replica_config_get_mtnode_by_dn(repl_root)) == NULL){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Abort CleanAllRUV Task: failed
to get replication node "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Abort CleanAllRUV
Task: failed to get replication node "
"from (%s), aborting operation\n", repl_root);
rc = LDAP_OPERATIONS_ERROR;
goto out;
@@ -1475,14 +1476,14 @@ multimaster_extop_abort_cleanruv(Slapi_PBlock *pb)
object_acquire (mtnode_ext->replica);
release_it = 1;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Abort CleanAllRUV Task:
replica is missing from (%s), "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Abort CleanAllRUV
Task: replica is missing from (%s), "
"aborting operation\n",repl_root);
rc = LDAP_OPERATIONS_ERROR;
goto out;
}
r = (Replica*)object_get_data (mtnode_ext->replica);
if(r == NULL){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Abort CleanAllRUV Task:
replica is NULL, aborting task\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Abort CleanAllRUV
Task: replica is NULL, aborting task\n");
rc = LDAP_OPERATIONS_ERROR;
goto out;
}
@@ -1491,7 +1492,7 @@ multimaster_extop_abort_cleanruv(Slapi_PBlock *pb)
*/
data = (cleanruv_data*)slapi_ch_calloc(1, sizeof(cleanruv_data));
if (data == NULL) {
- slapi_log_error( SLAPI_LOG_REPL, repl_plugin_name, "Abort CleanAllRUV Task: failed
to allocate "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "Abort CleanAllRUV
Task: failed to allocate "
"abort_cleanruv_data. Aborting task.\n");
rc = LDAP_OPERATIONS_ERROR;
goto out;
@@ -1516,7 +1517,7 @@ multimaster_extop_abort_cleanruv(Slapi_PBlock *pb)
(void *)data, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL) {
- slapi_log_error( SLAPI_LOG_REPL, repl_plugin_name, "Abort CleanAllRUV Task: unable
to create abort "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "Abort CleanAllRUV
Task: unable to create abort "
"thread. Aborting task.\n");
release_it = 1; /* have to release mtnode_ext->replica now */
slapi_ch_free_string(&data->repl_root);
@@ -1579,7 +1580,7 @@ multimaster_extop_cleanruv(Slapi_PBlock *pb)
* Decode the payload
*/
if(decode_cleanruv_payload(extop_payload, &payload)){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "CleanAllRUV Task: failed to
decode payload. Aborting ext op\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Task:
failed to decode payload. Aborting ext op\n");
goto free_and_return;
}
rid = atoi(ldap_utf8strtok_r(payload, ":", &iter));
@@ -1603,7 +1604,7 @@ multimaster_extop_cleanruv(Slapi_PBlock *pb)
* Get the node, so we can get the replica and its agreements
*/
if((mtnode_ext = replica_config_get_mtnode_by_dn(repl_root)) == NULL){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "CleanAllRUV Task: failed to
get replication node "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Task:
failed to get replication node "
"from (%s), aborting operation\n", repl_root);
goto free_and_return;
}
@@ -1612,14 +1613,14 @@ multimaster_extop_cleanruv(Slapi_PBlock *pb)
object_acquire (mtnode_ext->replica);
release_it = 1;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "CleanAllRUV Task: replica is
missing from (%s), "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Task:
replica is missing from (%s), "
"aborting operation\n",repl_root);
goto free_and_return;
}
r = (Replica*)object_get_data (mtnode_ext->replica);
if(r == NULL){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "CleanAllRUV Task: replica is
NULL, aborting task\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Task:
replica is NULL, aborting task\n");
goto free_and_return;
}
@@ -1629,10 +1630,10 @@ multimaster_extop_cleanruv(Slapi_PBlock *pb)
*
* This will also release mtnode_ext->replica
*/
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "CleanAllRUV Task: launching
cleanAllRUV thread...\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Task:
launching cleanAllRUV thread...\n");
data = (cleanruv_data*)slapi_ch_calloc(1, sizeof(cleanruv_data));
if (data == NULL) {
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name, "CleanAllRUV Task: failed to
allocate "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Task:
failed to allocate "
"cleanruv_Data\n");
goto free_and_return;
}
@@ -1649,7 +1650,7 @@ multimaster_extop_cleanruv(Slapi_PBlock *pb)
(void *)data, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL) {
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name, "CleanAllRUV Task: unable to
create cleanAllRUV "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Task:
unable to create cleanAllRUV "
"monitoring thread. Aborting task.\n");
ber_bvfree(data->payload);
data->payload = NULL;
@@ -1676,18 +1677,18 @@ multimaster_extop_cleanruv(Slapi_PBlock *pb)
/* we've already been cleaned */
break;
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "CleanAllRUV Task: checking if
we're caught up...\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Task:
checking if we're caught up...\n");
if(ruv_covers_csn_cleanallruv(ruv,maxcsn) || csn_get_replicaid(maxcsn) == 0||
strcmp(force,"yes") == 0){
/* We are caught up */
break;
} else {
char csnstr[CSN_STRSIZE];
csn_as_string(maxcsn, PR_FALSE, csnstr);
- slapi_log_error( SLAPI_LOG_FATAL, repl_plugin_name, "CleanAllRUV Task: not ruv
caught up maxcsn(%s)\n", csnstr);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Task:
not ruv caught up maxcsn(%s)\n", csnstr);
}
DS_Sleep(PR_SecondsToInterval(5));
}
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "CleanAllRUV Task: we're
caught up...\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Task:
we're caught up...\n");
/*
* Set cleaned rid in memory only - does not survive a server restart
*/
@@ -1703,8 +1704,8 @@ multimaster_extop_cleanruv(Slapi_PBlock *pb)
* This read-only replica has no easy way to tell when it's safe to release the
rid.
* So we won't release it, not until a server restart.
*/
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "CleanAllRUV Task: You must
restart the server if you want to reuse rid(%d).\n", rid);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "CleanAllRUV Task: Successfully
cleaned rid(%d).\n", rid);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Task: You
must restart the server if you want to reuse rid(%d).\n", rid);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Task:
Successfully cleaned rid(%d).\n", rid);
rc = LDAP_SUCCESS;
}
@@ -1771,7 +1772,7 @@ multimaster_extop_cleanruv_get_maxcsn(Slapi_PBlock *pb)
* Decode the payload
*/
if(decode_cleanruv_payload(extop_payload, &payload)){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "CleanAllRUV Get MaxCSN
Task: failed to decode payload. Aborting ext op\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Get
MaxCSN Task: failed to decode payload. Aborting ext op\n");
goto free_and_return;
}
rid = atoi(ldap_utf8strtok_r(payload, ":", &iter));
@@ -1840,7 +1841,7 @@ multimaster_extop_cleanruv_check_status(Slapi_PBlock *pb)
* Decode the payload - which should just be a filter
*/
if(decode_cleanruv_payload(extop_payload, &filter)){
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "CleanAllRUV Check Status Task:
failed to decode payload. Aborting ext op\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Check
Status Task: failed to decode payload. Aborting ext op\n");
goto free_and_return;
}
diff --git a/ldap/servers/plugins/replication/repl_init.c
b/ldap/servers/plugins/replication/repl_init.c
index 53dbb45..09fa2b1 100644
--- a/ldap/servers/plugins/replication/repl_init.c
+++ b/ldap/servers/plugins/replication/repl_init.c
@@ -72,7 +72,7 @@ legacy_preop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_PRE_COMPARE_FN, (void *) legacy_preop_compare )
!= 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_PRE_ENTRY_FN, (void *) legacy_pre_entry ))
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name, "legacy_preop_init
failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name, "legacy_preop_init
failed\n" );
rc= -1;
}
return rc;
@@ -93,7 +93,7 @@ legacy_postop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_POST_MODIFY_FN, (void *) legacy_postop_modify ) != 0
||
slapi_pblock_set( pb, SLAPI_PLUGIN_POST_MODRDN_FN, (void *) legacy_postop_modrdn )
!= 0 )
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name, "legacy_postop_init
failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name, "legacy_postop_init
failed\n" );
rc= -1;
}
@@ -115,7 +115,7 @@ legacy_internalpreop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_INTERNAL_PRE_MODIFY_FN, (void *) legacy_preop_modify
) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_INTERNAL_PRE_MODRDN_FN, (void *)
legacy_preop_modrdn ) != 0 )
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name, "legacy_internalpreop_init
failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"legacy_internalpreop_init failed\n" );
rc= -1;
}
return rc;
@@ -136,7 +136,7 @@ legacy_internalpostop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_INTERNAL_POST_MODIFY_FN, (void *)
legacy_postop_modify ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_INTERNAL_POST_MODRDN_FN, (void *)
legacy_postop_modrdn ) != 0 )
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name, "legacy_internalpostop_init
failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
"legacy_internalpostop_init failed\n" );
rc= -1;
}
@@ -155,7 +155,7 @@ legacy_entry_init( Slapi_PBlock *pb )
if( slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION, SLAPI_PLUGIN_VERSION_01 ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION, (void *)&legacyentrydesc ) != 0
)
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name, "legacy_entry_init
failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name, "legacy_entry_init
failed\n" );
rc= -1;
}
return rc;
@@ -217,7 +217,7 @@ legacy_start( Slapi_PBlock *pb )
ctrc = create_config_top();
if (ctrc != LDAP_SUCCESS && ctrc != LDAP_ALREADY_EXISTS)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Warning: unable to "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Warning: unable to
"
"create configuration entry %s: %s\n", REPL_CONFIG_TOP,
ldap_err2string(ctrc));
}
diff --git a/ldap/servers/plugins/replication/repl_opext.c
b/ldap/servers/plugins/replication/repl_opext.c
index 7f09507..f0289a7 100644
--- a/ldap/servers/plugins/replication/repl_opext.c
+++ b/ldap/servers/plugins/replication/repl_opext.c
@@ -26,7 +26,7 @@ void* supplier_operation_extension_constructor (void *object, void
*parent)
supplier_operation_extension *ext = (supplier_operation_extension*) slapi_ch_calloc (1,
sizeof (supplier_operation_extension));
if (ext == NULL)
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name, "unable to create replication
supplier operation extension - out of memory\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name, "unable to create
replication supplier operation extension - out of memory\n" );
}
else
{
@@ -57,7 +57,7 @@ void* consumer_operation_extension_constructor (void *object, void
*parent)
consumer_operation_extension *ext = (consumer_operation_extension*) slapi_ch_calloc (1,
sizeof (consumer_operation_extension));
if (ext == NULL)
{
- slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name, "unable to create replication
consumer operation extension - out of memory\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name, "unable to create
replication consumer operation extension - out of memory\n" );
}
if(object!=NULL && parent!=NULL)
{
diff --git a/ldap/servers/plugins/replication/repl_ops.c
b/ldap/servers/plugins/replication/repl_ops.c
index 7a8c5d6..f2d7d4d 100644
--- a/ldap/servers/plugins/replication/repl_ops.c
+++ b/ldap/servers/plugins/replication/repl_ops.c
@@ -78,7 +78,7 @@ legacy_preop(Slapi_PBlock *pb, const char *caller, int operation_type)
if (NULL == operation) {
slapi_send_ldap_result(pb, LDAP_UNWILLING_TO_PERFORM, NULL,
"Null replication operation is given", 0, NULL);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Null replication operation is given\n");
return -1;
}
@@ -91,7 +91,7 @@ legacy_preop(Slapi_PBlock *pb, const char *caller, int operation_type)
Just refuse it */
slapi_send_ldap_result(pb, LDAP_UNWILLING_TO_PERFORM, NULL,
"Replication operation refused because the consumer is not defined as a
replica", 0, NULL);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Incoming replication operation was refused because "
"there's no replica defined for this operation\n");
return -1;
@@ -116,7 +116,7 @@ legacy_preop(Slapi_PBlock *pb, const char *caller, int
operation_type)
slapi_send_ldap_result(pb, LDAP_UNWILLING_TO_PERFORM, NULL,
"Replication operation refused because "
"the consumer is not defined as a legacy replica", 0, NULL);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"Incoming replication operation was refused because "
"there's no legacy replica defined for this operation\n");
return -1;
diff --git a/ldap/servers/plugins/replication/repl_session_plugin.c
b/ldap/servers/plugins/replication/repl_session_plugin.c
index 2fa993d..2663f23 100644
--- a/ldap/servers/plugins/replication/repl_session_plugin.c
+++ b/ldap/servers/plugins/replication/repl_session_plugin.c
@@ -25,7 +25,7 @@ repl_session_plugin_init()
if((NULL == _ReplSessionAPI) &&
(slapi_apib_get_interface(REPL_SESSION_v1_0_GUID, &_ReplSessionAPI) ||
(NULL == _ReplSessionAPI))) {
- LDAPDebug1Arg( LDAP_DEBUG_PLUGIN,
+ LDAPDebug1Arg( LDAP_DEBUG_PLUGIN, LOG_DEBUG,
"<-- repl_session_plugin_init -- no replication session"
" plugin API registered for GUID [%s] -- end\n",
REPL_SESSION_v1_0_GUID);
@@ -41,7 +41,7 @@ repl_session_plugin_call_agmt_init_cb(Repl_Agmt *ra)
Slapi_DN *replarea = NULL;
repl_session_plugin_agmt_init_cb initfunc = NULL;
- LDAPDebug0Args( LDAP_DEBUG_PLUGIN, "--> repl_session_plugin_call_agmt_init_cb
-- begin\n");
+ LDAPDebug0Args( LDAP_DEBUG_PLUGIN, LOG_DEBUG, "-->
repl_session_plugin_call_agmt_init_cb -- begin\n");
if (_ReplSessionAPI) {
initfunc =
(repl_session_plugin_agmt_init_cb)_ReplSessionAPI[REPL_SESSION_PLUGIN_AGMT_INIT_CB];
@@ -49,7 +49,7 @@ repl_session_plugin_call_agmt_init_cb(Repl_Agmt *ra)
if (initfunc) {
replarea = agmt_get_replarea(ra);
if (!replarea) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "repl_session_plugin_call_agmt_init_cb --
Aborted -- No replication area\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"repl_session_plugin_call_agmt_init_cb -- Aborted -- No replication area\n");
return;
}
cookie = (*initfunc)(replarea);
@@ -58,7 +58,7 @@ repl_session_plugin_call_agmt_init_cb(Repl_Agmt *ra)
agmt_set_priv(ra, cookie);
- LDAPDebug0Args( LDAP_DEBUG_PLUGIN, "<-- repl_session_plugin_call_agmt_init_cb
-- end\n");
+ LDAPDebug0Args( LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<--
repl_session_plugin_call_agmt_init_cb -- end\n");
return;
}
@@ -78,7 +78,7 @@ repl_session_plugin_call_pre_acquire_cb(const Repl_Agmt *ra, int
is_total,
if (thefunc) {
replarea = agmt_get_replarea(ra);
if (!replarea) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "repl_session_plugin_call_pre_acquire_cb
-- Aborted -- No replication area\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"repl_session_plugin_call_pre_acquire_cb -- Aborted -- No replication area\n");
return 1;
}
rc = (*thefunc)(agmt_get_priv(ra), replarea, is_total, data_guid, data);
@@ -103,7 +103,7 @@ repl_session_plugin_call_post_acquire_cb(const Repl_Agmt *ra, int
is_total,
if (thefunc) {
replarea = agmt_get_replarea(ra);
if (!replarea) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "repl_session_plugin_call_post_acquire_cb
-- Aborted -- No replication area\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"repl_session_plugin_call_post_acquire_cb -- Aborted -- No replication
area\n");
return 1;
}
rc = (*thefunc)(agmt_get_priv(ra), replarea, is_total, data_guid, data);
@@ -162,7 +162,7 @@ repl_session_plugin_call_destroy_agmt_cb(const Repl_Agmt *ra)
if (thefunc) {
replarea = agmt_get_replarea(ra);
if (!replarea) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "repl_session_plugin_call_destroy_agmt_cb
-- Aborted -- No replication area\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"repl_session_plugin_call_destroy_agmt_cb -- Aborted -- No replication
area\n");
return;
}
(*thefunc)(agmt_get_priv(ra), replarea);
diff --git a/ldap/servers/plugins/replication/replutil.c
b/ldap/servers/plugins/replication/replutil.c
index 88e6721..6ad46c6 100644
--- a/ldap/servers/plugins/replication/replutil.c
+++ b/ldap/servers/plugins/replication/replutil.c
@@ -168,14 +168,14 @@ int copyfile(char* source, char * destination, int overwrite, int
mode)
buffer = slapi_ch_malloc(64*1024);
if (NULL == buffer)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "copy file: memory allocation
failed\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "copy file: memory
allocation failed\n");
goto error;
}
/* Open source file */
source_fd = OPEN_FUNCTION(source,O_RDONLY,0);
if (-1 == source_fd)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"copyfile: failed to open source file %s\n", source);
goto error;
}
@@ -183,7 +183,7 @@ int copyfile(char* source, char * destination, int overwrite, int
mode)
dest_fd = OPEN_FUNCTION(destination,O_CREAT | O_WRONLY, mode);
if (-1 == dest_fd)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"copyfile: failed to open destination file %s\n", destination);
goto error;
}
@@ -201,7 +201,7 @@ int copyfile(char* source, char * destination, int overwrite, int
mode)
if (return_value != bytes_to_write)
{
/* means error */
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"copyfile: failed to write to destination file %s\n", destination);
return_value = -1;
break;
@@ -365,7 +365,7 @@ parse_changes_string(char *str)
if (rc != 0)
{
/* ONREPL - log warning */
- slapi_log_error( SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"Failed to parse the ldif line.\n");
continue;
}
@@ -425,28 +425,28 @@ IsValidOperation (const slapi_operation_parameters *op)
{
if (op == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"IsValidOperation: NULL operation\n");
return PR_FALSE;
}
if (op->csn == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"IsValidOperation: NULL operation CSN\n");
return PR_FALSE;
}
if (op->target_address.uniqueid == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"IsValidOperation: NULL entry uniqueid\n");
return PR_FALSE;
}
if (op->target_address.sdn == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"IsValidOperation: NULL entry DN\n");
return PR_FALSE;
}
@@ -455,7 +455,7 @@ IsValidOperation (const slapi_operation_parameters *op)
{
case SLAPI_OPERATION_ADD: if (op->p.p_add.target_entry == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL,
repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
repl_plugin_name,
"IsValidOperation: NULL entry for add operation\n");
return PR_FALSE;
}
@@ -465,7 +465,7 @@ IsValidOperation (const slapi_operation_parameters *op)
case SLAPI_OPERATION_MODIFY: if (op->p.p_modify.modify_mods == NULL ||
op->p.p_modify.modify_mods[0] == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL,
repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
repl_plugin_name,
"IsValidOperation: NULL mods for modify
operation\n");
return PR_FALSE;
}
@@ -475,13 +475,13 @@ IsValidOperation (const slapi_operation_parameters *op)
case SLAPI_OPERATION_MODRDN: if (op->p.p_modrdn.modrdn_mods == NULL ||
op->p.p_modrdn.modrdn_mods[0] == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL,
repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
repl_plugin_name,
"IsValidOperation: NULL mods for modrdn
operation\n");
return PR_FALSE;
}
if (op->p.p_modrdn.modrdn_newrdn == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL,
repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
repl_plugin_name,
"IsValidOperation: NULL new rdn for modrdn
operation\n");
return PR_FALSE;
}
@@ -633,7 +633,7 @@ repl_set_mtn_state_and_referrals(
char **referrals_to_set = NULL;
PRBool chain_on_update = is_chain_on_update_setup(repl_root_sdn);
if (NULL == mtn_state) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"repl_set_mtn_referrals: cannot set NULL state.\n");
return;
}
@@ -710,7 +710,7 @@ repl_set_mtn_state_and_referrals(
}
if (rc != LDAP_SUCCESS && rc != LDAP_TYPE_OR_VALUE_EXISTS) {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "repl_set_mtn_referrals: could
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"repl_set_mtn_referrals: could "
"not set referrals for replica %s: %d\n", slapi_sdn_get_dn(repl_root_sdn),
rc);
}
@@ -785,12 +785,12 @@ repl_chain_on_update(Slapi_PBlock *pb, Slapi_DN * target_dn,
}
#ifdef DEBUG_CHAIN_ON_UPDATE
if (is_internal) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=-1
op=%d be "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"repl_chain_on_update: conn=-1 op=%d be "
"%s is the %s backend and is %s\n", opid,
mtn_be_names[ii], (chaining_backend == ii) ? "chaining" :
"local",
(mtn_be_states[ii] == SLAPI_BE_STATE_ON) ? "online" :
"offline");
} else {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update:
conn=%" PRIu64 " op=%d be "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"repl_chain_on_update: conn=%" PRIu64 " op=%d be "
"%s is the %s backend and is %s\n", connid, opid,
mtn_be_names[ii], (chaining_backend == ii) ? "chaining" :
"local",
(mtn_be_states[ii] == SLAPI_BE_STATE_ON) ? "online" :
"offline");
@@ -803,11 +803,11 @@ repl_chain_on_update(Slapi_PBlock *pb, Slapi_DN * target_dn,
* offline replication initialization. */
#ifdef DEBUG_CHAIN_ON_UPDATE
if (is_internal) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=-1
op=%d be "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"repl_chain_on_update: conn=-1 op=%d be "
"%s not found. Assuming it is the chaining backend and we are doing an
import.\n",
opid, mtn_be_names[ii]);
} else {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update:
conn=%" PRIu64 " op=%d be "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"repl_chain_on_update: conn=%" PRIu64 " op=%d be "
"%s not found. Assuming it is the chaining backend and we are doing an
import.\n",
connid, opid, mtn_be_names[ii]);
}
@@ -835,10 +835,10 @@ repl_chain_on_update(Slapi_PBlock *pb, Slapi_DN * target_dn,
(op_type == SLAPI_OPERATION_COMPARE))) {
#ifdef DEBUG_CHAIN_ON_UPDATE
if (is_internal) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=-1
op=%d op is "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"repl_chain_on_update: conn=-1 op=%d op is "
"%d: using local backend\n", opid, op_type);
} else {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update:
conn=%" PRIu64 " op=%d op is "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"repl_chain_on_update: conn=%" PRIu64 " op=%d op is "
"%d: using local backend\n", connid, opid, op_type);
}
#endif
@@ -858,10 +858,10 @@ repl_chain_on_update(Slapi_PBlock *pb, Slapi_DN * target_dn,
if (slapi_dn_isroot(requestor_dn)) {
#ifdef DEBUG_CHAIN_ON_UPDATE
if (is_internal) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=-1
op=%d requestor "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"repl_chain_on_update: conn=-1 op=%d requestor "
"is root: using local backend\n", opid);
} else {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update:
conn=%" PRIu64 " op=%d requestor "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"repl_chain_on_update: conn=%" PRIu64 " op=%d requestor "
"is root: using local backend\n", connid, opid);
}
#endif
@@ -880,10 +880,10 @@ repl_chain_on_update(Slapi_PBlock *pb, Slapi_DN * target_dn,
if (repl_op) {
#ifdef DEBUG_CHAIN_ON_UPDATE
if (is_internal) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=-1
op=%d op is "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"repl_chain_on_update: conn=-1 op=%d op is "
"replicated: using local backend\n", opid);
} else {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update:
conn=%" PRIu64 " op=%d op is "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"repl_chain_on_update: conn=%" PRIu64 " op=%d op is "
"replicated: using local backend\n", connid, opid);
}
#endif
@@ -897,10 +897,10 @@ repl_chain_on_update(Slapi_PBlock *pb, Slapi_DN * target_dn,
if (!config_get_pw_is_global_policy()) {
#ifdef DEBUG_CHAIN_ON_UPDATE
if (is_internal) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"repl_chain_on_update: conn=-1 op=%d using "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"repl_chain_on_update: conn=-1 op=%d using "
"local backend for local password policy\n",
opid);
} else {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"repl_chain_on_update: conn=%" PRIu64 " op=%d using "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"repl_chain_on_update: conn=%" PRIu64 " op=%d using "
"local backend for local password policy\n",
connid, opid);
}
#endif
@@ -914,10 +914,10 @@ repl_chain_on_update(Slapi_PBlock *pb, Slapi_DN * target_dn,
*/
#ifdef DEBUG_CHAIN_ON_UPDATE
if (is_internal) {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=-1
op=%d using "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"repl_chain_on_update: conn=-1 op=%d using "
"chaining backend\n", opid);
} else {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update:
conn=%" PRIu64 " op=%d using "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"repl_chain_on_update: conn=%" PRIu64 " op=%d using "
"chaining backend\n", connid, opid);
}
#endif
diff --git a/ldap/servers/plugins/replication/test_repl_session_plugin.c
b/ldap/servers/plugins/replication/test_repl_session_plugin.c
index b17617f..3d79b08 100644
--- a/ldap/servers/plugins/replication/test_repl_session_plugin.c
+++ b/ldap/servers/plugins/replication/test_repl_session_plugin.c
@@ -40,14 +40,14 @@ test_repl_session_plugin_agmt_init_cb(const Slapi_DN *repl_subtree)
{
char *cookie = NULL;
- slapi_log_error(SLAPI_LOG_FATAL, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, test_repl_session_plugin_name,
"test_repl_session_plugin_init_cb() called for suffix
\"%s\".\n",
slapi_sdn_get_ndn(repl_subtree));
/* allocate a string and set as the cookie */
cookie = slapi_ch_smprintf("cookie test");
- slapi_log_error(SLAPI_LOG_FATAL, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, test_repl_session_plugin_name,
"test_repl_session_plugin_init_cb(): Setting cookie:
\"%s\".\n",
cookie);
@@ -72,7 +72,7 @@ test_repl_session_plugin_pre_acquire_cb(void *cookie, const Slapi_DN
*repl_subtr
{
int rc = 0;
- slapi_log_error(SLAPI_LOG_FATAL, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, test_repl_session_plugin_name,
"test_repl_session_plugin_pre_acquire_cb() called for suffix
\"%s\", "
"is_total: \"%s\", cookie: \"%s\".\n",
slapi_sdn_get_ndn(repl_subtree),
is_total ? "TRUE" : "FALSE", cookie ? (char *)cookie :
"NULL");
@@ -83,7 +83,7 @@ test_repl_session_plugin_pre_acquire_cb(void *cookie, const Slapi_DN
*repl_subtr
(*data)->bv_val = slapi_ch_smprintf("test-data");
(*data)->bv_len = strlen((*data)->bv_val) + 1;
- slapi_log_error(SLAPI_LOG_FATAL, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, test_repl_session_plugin_name,
"test_repl_session_plugin_pre_acquire_cb() sending data: guid:
\"%s\" data: \"%s\".\n",
*data_guid, (*data)->bv_val);
@@ -108,7 +108,7 @@ test_repl_session_plugin_reply_acquire_cb(const char *repl_subtree,
int is_total
{
int rc = 0;
- slapi_log_error(SLAPI_LOG_FATAL, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, test_repl_session_plugin_name,
"test_repl_session_plugin_reply_acquire_cb() called for suffix
\"%s\", is_total: \"%s\".\n",
repl_subtree, is_total ? "TRUE" : "FALSE");
@@ -118,7 +118,7 @@ test_repl_session_plugin_reply_acquire_cb(const char *repl_subtree,
int is_total
(*data)->bv_val = slapi_ch_smprintf("test-reply-data");
(*data)->bv_len = strlen((*data)->bv_val) + 1;
- slapi_log_error(SLAPI_LOG_FATAL, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, test_repl_session_plugin_name,
"test_repl_session_plugin_reply_acquire_cb() sending data: guid:
\"%s\" data: \"%s\".\n",
*data_guid, (*data)->bv_val);
@@ -145,14 +145,14 @@ test_repl_session_plugin_post_acquire_cb(void *cookie, const
Slapi_DN *repl_subt
{
int rc = 0;
- slapi_log_error(SLAPI_LOG_FATAL, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, test_repl_session_plugin_name,
"test_repl_session_plugin_post_acquire_cb() called for suffix
\"%s\", "
"is_total: \"%s\" cookie: \"%s\".\n",
slapi_sdn_get_ndn(repl_subtree),
is_total ? "TRUE" : "FALSE", cookie ? (char *)cookie :
"NULL");
/* log any extra data that was sent from the replica */
if (data_guid && data) {
- slapi_log_error(SLAPI_LOG_FATAL, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, test_repl_session_plugin_name,
"test_repl_session_plugin_post_acquire_cb() received data: guid:
\"%s\" data: \"%s\".\n",
data_guid, data->bv_val);
}
@@ -179,13 +179,13 @@ test_repl_session_plugin_recv_acquire_cb(const char *repl_subtree,
int is_total,
{
int rc = 0;
- slapi_log_error(SLAPI_LOG_FATAL, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, test_repl_session_plugin_name,
"test_repl_session_plugin_recv_acquire_cb() called for suffix
\"%s\", is_total: \"%s\".\n",
repl_subtree, is_total ? "TRUE" : "FALSE");
/* log any extra data that was sent from the master */
if (data_guid && data) {
- slapi_log_error(SLAPI_LOG_FATAL, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, test_repl_session_plugin_name,
"test_repl_session_plugin_recv_acquire_cb() received data: guid:
\"%s\" data: \"%s\".\n",
data_guid, data->bv_val);
}
@@ -201,7 +201,7 @@ test_repl_session_plugin_recv_acquire_cb(const char *repl_subtree, int
is_total,
static void
test_repl_session_plugin_destroy_cb(void *cookie, const Slapi_DN *repl_subtree)
{
- slapi_log_error(SLAPI_LOG_FATAL, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, test_repl_session_plugin_name,
"test_repl_session_plugin_destroy_cb() called for suffix
\"%s\".\n",
slapi_sdn_get_ndn(repl_subtree));
@@ -230,10 +230,10 @@ static void *test_repl_session_api[] = {
static int
test_repl_session_plugin_start(Slapi_PBlock *pb)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_repl_session_plugin_name,
"--> test_repl_session_plugin_start -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_repl_session_plugin_name,
"<-- test_repl_session_plugin_start -- end\n");
return 0;
}
@@ -241,19 +241,19 @@ test_repl_session_plugin_start(Slapi_PBlock *pb)
static int
test_repl_session_plugin_close(Slapi_PBlock *pb)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_repl_session_plugin_name,
"--> test_repl_session_plugin_close -- begin\n");
slapi_apib_unregister(REPL_SESSION_v1_0_GUID);
- slapi_log_error(SLAPI_LOG_PLUGIN, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_repl_session_plugin_name,
"<-- test_repl_session_plugin_close -- end\n");
return 0;
}
int test_repl_session_plugin_init(Slapi_PBlock *pb)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_repl_session_plugin_name,
"--> test_repl_session_plugin_init -- begin\n");
if ( slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
@@ -265,13 +265,13 @@ int test_repl_session_plugin_init(Slapi_PBlock *pb)
slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION,
(void *)&test_repl_session_pdesc ) != 0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, test_repl_session_plugin_name,
"<-- test_repl_session_plugin_init -- failed to register
plugin -- end\n");
return -1;
}
if( slapi_apib_register(REPL_SESSION_v1_0_GUID, test_repl_session_api) ) {
- slapi_log_error( SLAPI_LOG_FATAL, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, test_repl_session_plugin_name,
"<-- test_repl_session_plugin_start -- failed to
register repl_session api -- end\n");
return -1;
}
@@ -280,12 +280,12 @@ int test_repl_session_plugin_init(Slapi_PBlock *pb)
/* Retrieve and save the plugin identity to later pass to
internal operations */
if (slapi_pblock_get(pb, SLAPI_PLUGIN_IDENTITY, &test_repl_session_plugin_id) !=
0) {
- slapi_log_error(SLAPI_LOG_FATAL, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, test_repl_session_plugin_name,
"<-- test_repl_session_plugin_init -- failed to retrieve
plugin identity -- end\n");
return -1;
}
- slapi_log_error( SLAPI_LOG_PLUGIN, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_repl_session_plugin_name,
"<-- test_repl_session_plugin_init -- end\n");
return 0;
}
diff --git a/ldap/servers/plugins/replication/urp.c
b/ldap/servers/plugins/replication/urp.c
index 8d0d735..3d04972 100644
--- a/ldap/servers/plugins/replication/urp.c
+++ b/ldap/servers/plugins/replication/urp.c
@@ -68,7 +68,7 @@ urp_modify_operation( Slapi_PBlock *pb )
op_result= LDAP_NO_SUCH_OBJECT;
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &op_result);
rc = SLAPI_PLUGIN_NOOP; /* Must discard this Modification */
- slapi_log_error (slapi_log_urp, sessionid,
+ slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
sessionid,
"urp_modify: No such entry\n");
PROFILE_POINT; /* Modify Conflict; Entry Does Not Exist; Discard Modification */
}
@@ -119,7 +119,7 @@ urp_add_operation( Slapi_PBlock *pb )
* setting an error to op_result
*/
/* op_result = LDAP_SUCCESS; */
- slapi_log_error(slapi_log_urp, sessionid,
+ slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
sessionid,
"urp_add (%s): an entry with this uniqueid already exists.\n",
slapi_entry_get_dn_const(existing_uniqueid_entry));
op_result= LDAP_ALREADY_EXISTS;
@@ -160,7 +160,7 @@ urp_add_operation( Slapi_PBlock *pb )
op_result= LDAP_OPERATIONS_ERROR;
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &op_result);
rc = SLAPI_PLUGIN_NOOP; /* Abort this Operation */
- slapi_log_error(slapi_log_urp, sessionid,
+ slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
sessionid,
"urp_add (%s): Add conflict; Unique ID (%s) already in RDN\n",
basedn, adduniqueid);
PROFILE_POINT; /* Add Conflict; Entry Exists; Unique ID already in RDN - Abort this
update. */
@@ -181,7 +181,7 @@ urp_add_operation( Slapi_PBlock *pb )
if (slapi_entry_attr_find (addentry, ATTR_NSDS5_REPLCONFLICT, &attr) == 0)
{
/* ATTR_NSDS5_REPLCONFLICT exists */
- slapi_log_error(SLAPI_LOG_FATAL, sessionid,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, sessionid,
"urp_add: New entry has nsds5ReplConflict already\n");
vals = attr_get_present_values (attr); /* this returns a pointer to the contents */
}
@@ -208,7 +208,7 @@ urp_add_operation( Slapi_PBlock *pb )
slapi_pblock_set(pb, SLAPI_ADD_TARGET_SDN, sdn);
rdn = slapi_rdn_new_sdn ( slapi_entry_get_sdn_const(addentry) );
- slapi_log_error (slapi_log_urp, sessionid,
+ slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
sessionid,
"urp_add: Naming conflict ADD. Add %s instead\n",
slapi_rdn_get_rdn(rdn));
slapi_rdn_free(&rdn);
@@ -224,7 +224,7 @@ urp_add_operation( Slapi_PBlock *pb )
{
op_result= LDAP_OPERATIONS_ERROR;
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &op_result);
- slapi_log_error(slapi_log_urp, sessionid,
+ slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
sessionid,
"urp_add (%s): Entry to be added is a loser; "
"urp_annotate_dn failed.\n", basedn);
rc = SLAPI_PLUGIN_NOOP; /* Ignore this Operation */
@@ -252,7 +252,7 @@ urp_add_operation( Slapi_PBlock *pb )
* setting an error to op_result
*/
/* op_result = LDAP_SUCCESS; */
- slapi_log_error(slapi_log_urp, sessionid,
+ slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
sessionid,
"urp_add (%s): The CSN of the Operation and the Entry DN are the same.",
slapi_entry_get_dn_const(existing_dn_entry));
op_result= LDAP_UNWILLING_TO_PERFORM;
@@ -324,7 +324,7 @@ urp_modrdn_operation( Slapi_PBlock *pb )
* error is set to op_result. Just to get rid of this CSN from RUV,
* setting an error to op_result
*/
- slapi_log_error(slapi_log_urp, sessionid,
+ slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
sessionid,
"urp_modrdn (%s): operation CSN is newer than the DN CSN.\n",
slapi_entry_get_dn_const(target_entry));
op_result= LDAP_UNWILLING_TO_PERFORM;
@@ -358,7 +358,7 @@ urp_modrdn_operation( Slapi_PBlock *pb )
slapi_entry_get_sdn (target_entry), "renameTombstone", opcsn);
*/
op_result = LDAP_NO_SUCH_OBJECT;
- slapi_log_error(SLAPI_LOG_REPL, sessionid,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, sessionid,
"urp_modrdn: target_entry %s is a tombstone; returning
LDAP_NO_SUCH_OBJECT.\n",
slapi_entry_get_dn((Slapi_Entry *)target_entry));
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &op_result);
@@ -374,7 +374,7 @@ urp_modrdn_operation( Slapi_PBlock *pb )
}
else
{
- slapi_log_error(slapi_log_urp, sessionid,
+ slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
sessionid,
"urp_modrdn (%s): target entry is a tombstone.\n",
slapi_entry_get_dn_const(target_entry));
rc = SLAPI_PLUGIN_NOOP; /* Ignore the modrdn */
@@ -418,7 +418,7 @@ urp_modrdn_operation( Slapi_PBlock *pb )
* but the uniqueids are not.
* There might be two replicas with the same ReplicaID.
*/
- slapi_log_error(slapi_log_urp, sessionid,
+ slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
sessionid,
"urp_modrdn: Duplicated CSN for different uniqueids [%s][%s]",
existing_uniqueid, op_uniqueid);
op_result= LDAP_OPERATIONS_ERROR;
@@ -445,7 +445,7 @@ urp_modrdn_operation( Slapi_PBlock *pb )
}
mod_namingconflict_attr (op_uniqueid, target_sdn, existing_sdn, opcsn,
"MODRDN");
slapi_pblock_set(pb, SLAPI_MODRDN_NEWRDN, newrdn_with_uniqueid);
- slapi_log_error(slapi_log_urp, sessionid,
+ slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
sessionid,
"urp_modrdn: Naming conflict MODRDN. Rename target entry from %s
to %s\n",
newrdn, newrdn_with_uniqueid );
rc= slapi_setbit_int(rc, SLAPI_RTN_BIT_FETCH_EXISTING_DN_ENTRY);
@@ -549,7 +549,7 @@ urp_modrdn_operation( Slapi_PBlock *pb )
* this will cause replication divergence requiring
* admin intercession
*/
- slapi_log_error( SLAPI_LOG_FATAL, sessionid,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, sessionid,
"urp_modrdn: Parent %s couldn't be found, nor recreated as a glue
entry\n",
slapi_sdn_get_dn(newsuperior) );
op_result= LDAP_OPERATIONS_ERROR;
@@ -600,7 +600,7 @@ urp_delete_operation( Slapi_PBlock *pb )
op_result= LDAP_NO_SUCH_OBJECT;
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &op_result);
rc = SLAPI_PLUGIN_FAILURE; /* Don't apply the Delete */
- slapi_log_error(slapi_log_urp, sessionid,
+ slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
sessionid,
"Entry %s does not exist; returning NO_SUCH_OBJECT.\n",
slapi_entry_get_dn((Slapi_Entry *)deleteentry));
PROFILE_POINT; /* Delete Operation; Entry not exist. */
@@ -611,7 +611,7 @@ urp_delete_operation( Slapi_PBlock *pb )
op_result= LDAP_ALREADY_EXISTS;
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &op_result);
rc = SLAPI_PLUGIN_NOOP; /* Don't apply the Delete */
- slapi_log_error(slapi_log_urp, sessionid,
+ slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
sessionid,
"urp_delete: Entry \"%s\" is already a
Tombstone.\n",
slapi_entry_get_dn_const(deleteentry));
PROFILE_POINT; /* Delete Operation; Already a Tombstone. */
@@ -637,7 +637,7 @@ urp_delete_operation( Slapi_PBlock *pb )
op_result= LDAP_SUCCESS;
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &op_result);
rc = SLAPI_PLUGIN_NOOP; /* Don't apply the Delete */
- slapi_log_error(slapi_log_urp, sessionid,
+ slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
sessionid,
"urp_delete: Turn entry \"%s\" into a glue_absent_parent
entry.\n",
slapi_entry_get_dn_const(deleteentry));
PROFILE_POINT; /* Delete Operation; Entry has children. */
@@ -728,7 +728,7 @@ urp_post_delete_operation( Slapi_PBlock *pb )
op_result = entry_to_tombstone ( pb, entry );
if ( op_result == LDAP_SUCCESS )
{
- slapi_log_error ( slapi_log_urp, sessionid,
+ slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
sessionid,
"Tombstoned glue entry %s since it has no more children\n",
slapi_entry_get_dn_const (entry) );
}
@@ -982,7 +982,7 @@ urp_add_resolve_parententry (Slapi_PBlock *pb, char *sessionid,
Slapi_Entry *ent
sdn = slapi_sdn_dup(slapi_entry_get_sdn_const(entry));
slapi_pblock_set(pb, SLAPI_ADD_TARGET_SDN, sdn);
- slapi_log_error ( slapi_log_urp, sessionid,
+ slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
sessionid,
"Parent was renamed. Renamed the child to %s\n", newdn );
rc= slapi_setbit_int(rc,SLAPI_RTN_BIT_FETCH_EXISTING_DN_ENTRY);
PROFILE_POINT; /* Add Conflict; Parent Renamed; Rename Operation Entry */
@@ -1018,13 +1018,13 @@ urp_annotate_dn (char *sessionid, const Slapi_Entry *entry, CSN
*opcsn, const ch
newrdn = get_rdn_plus_uniqueid ( sessionid, basedn, uniqueid );
if(newrdn) {
mod_namingconflict_attr (uniqueid, basesdn, basesdn, opcsn, optype);
- slapi_log_error(slapi_log_urp, sessionid,
+ slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
sessionid,
"urp_annotate_dn: %s --> %s\n", basedn, newrdn);
op_result = urp_fixup_rename_entry ( entry, newrdn, NULL, 0 );
switch(op_result)
{
case LDAP_SUCCESS:
- slapi_log_error(slapi_log_urp, sessionid,
+ slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
sessionid,
"Naming conflict %s. Renamed existing entry to %s\n",
optype, newrdn);
rc = 1;
@@ -1046,19 +1046,19 @@ urp_annotate_dn (char *sessionid, const Slapi_Entry *entry, CSN
*opcsn, const ch
* for a conflict!! After fix for 558293, this
* state can't be reproduced anymore (5-Oct-01)
*/
- slapi_log_error(SLAPI_LOG_FATAL, sessionid,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, sessionid,
"Entry %s exists in cache but not in DB\n",
basedn);
rc = LDAP_NO_SUCH_OBJECT;
break;
default:
- slapi_log_error(slapi_log_urp, sessionid,
+ slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
sessionid,
"Failed to annotate %s, err=%d\n",
newrdn, op_result);
}
slapi_ch_free ( (void**)&newrdn );
} else {
- slapi_log_error(SLAPI_LOG_FATAL, sessionid,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, sessionid,
"Failed to create conflict DN from basedn: %s and uniqueid:
%s\n",
basedn, uniqueid );
}
@@ -1092,7 +1092,7 @@ urp_get_min_naming_conflict_entry ( Slapi_PBlock *pb, char
*sessionid, CSN *opcs
if (NULL == basedn || strncmp (basedn, SLAPI_ATTR_UNIQUEID, strlen(SLAPI_ATTR_UNIQUEID))
== 0)
return NULL;
- slapi_log_error ( SLAPI_LOG_REPL, sessionid,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, sessionid,
"Enter urp_get_min_naming_conflict_entry for %s\n", basedn);
filter = slapi_filter_sprintf("(%s=%s %s%s)", ATTR_NSDS5_REPLCONFLICT,
REASON_ANNOTATE_DN,
@@ -1162,7 +1162,7 @@ done:
slapi_pblock_destroy(newpb);
newpb = NULL;
- slapi_log_error ( SLAPI_LOG_REPL, sessionid,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, sessionid,
"Leave urp_get_min_naming_conflict_entry (found %d entries)\n", i);
return min_naming_conflict_entry;
@@ -1208,11 +1208,11 @@ urp_naming_conflict_removal ( Slapi_PBlock *pb, char *sessionid,
CSN *opcsn, con
op_result = urp_fixup_rename_entry((const Slapi_Entry *)min_naming_conflict_entry,
newrdnstr, NULL, OP_FLAG_ACTION_INVOKE_FOR_REPLOP);
if ( op_result != LDAP_SUCCESS )
{
- slapi_log_error (slapi_log_urp, sessionid,
+ slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
sessionid,
"Failed to restore RDN of %s, err=%d\n", oldrdnstr, op_result);
goto bailout;
}
- slapi_log_error (slapi_log_urp, sessionid,
+ slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
sessionid,
"Naming conflict removed by %s. RDN of %s was restored\n", optype,
oldrdnstr);
/* Step2: Remove ATTR_NSDS5_REPLCONFLICT from the winning entry */
@@ -1222,7 +1222,7 @@ urp_naming_conflict_removal ( Slapi_PBlock *pb, char *sessionid, CSN
*opcsn, con
*/
op_result = del_replconflict_attr (min_naming_conflict_entry, opcsn,
OP_FLAG_ACTION_INVOKE_FOR_REPLOP);
if (op_result != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_REPL, sessionid,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, sessionid,
"Failed to remove nsds5ReplConflict for %s, err=%d\n",
newrdnstr, op_result);
}
@@ -1242,7 +1242,7 @@ get_dn_plus_uniqueid(char *sessionid, const Slapi_DN *oldsdn, const
char *unique
char *newdn = NULL;
int rc = slapi_rdn_init_all_sdn_ext(rdn, oldsdn, 1);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, sessionid,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, sessionid,
"Failed to convert %s to RDN\n", slapi_sdn_get_dn(oldsdn));
goto bail;
}
@@ -1257,7 +1257,7 @@ get_dn_plus_uniqueid(char *sessionid, const Slapi_DN *oldsdn, const
char *unique
* This will cause replication divergence and will
* require admin intercession
*/
- slapi_log_error(SLAPI_LOG_FATAL, sessionid,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, sessionid,
"Annotated DN %s has naming conflict\n", slapi_sdn_get_dn(oldsdn) );
}
else
@@ -1286,7 +1286,7 @@ get_rdn_plus_uniqueid(char *sessionid, const char *olddn, const char
*uniqueid)
Slapi_RDN *rdn = slapi_rdn_new();
int rc = slapi_rdn_init_all_sdn_ext(rdn, sdn, 1);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, sessionid,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, sessionid,
"Failed to convert %s to RDN\n", olddn);
goto bail;
}
@@ -1299,7 +1299,7 @@ get_rdn_plus_uniqueid(char *sessionid, const char *olddn, const char
*uniqueid)
* This will cause replication divergence and will
* require admin intercession
*/
- slapi_log_error(SLAPI_LOG_FATAL, sessionid,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, sessionid,
"Annotated RDN %s has naming conflict\n", olddn);
}
else
diff --git a/ldap/servers/plugins/replication/urp_glue.c
b/ldap/servers/plugins/replication/urp_glue.c
index 16bf278..10c0e07 100644
--- a/ldap/servers/plugins/replication/urp_glue.c
+++ b/ldap/servers/plugins/replication/urp_glue.c
@@ -89,7 +89,7 @@ entry_to_glue(char *sessionid, const Slapi_Entry* entry, const char
*reason, CSN
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
"%s: Target entry %s is already a glue entry reason %s\n",
sessionid, dn, reason);
}
@@ -108,7 +108,8 @@ entry_to_glue(char *sessionid, const Slapi_Entry* entry, const char
*reason, CSN
op_result = urp_fixup_modify_entry (NULL, sdn, opcsn, &smods, 0);
if (op_result == LDAP_SUCCESS)
{
- slapi_log_error (slapi_log_urp, repl_plugin_name,
+ slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
+ repl_plugin_name,
"%s: Turned the entry %s to glue, reason %s\n",
sessionid, dn, reason);
}
@@ -189,7 +190,7 @@ create_glue_entry ( Slapi_PBlock *pb, char *sessionid, Slapi_DN *dn,
const char
if ( NULL == uniqueid )
{
op_result = LDAP_OPERATIONS_ERROR;
- slapi_log_error (SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Can't create glue %s, uniqueid=NULL\n", sessionid, dnstr);
}
else
@@ -209,7 +210,7 @@ create_glue_entry ( Slapi_PBlock *pb, char *sessionid, Slapi_DN *dn,
const char
switch(op_result)
{
case LDAP_SUCCESS:
- slapi_log_error ( SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Created glue entry %s uniqueid=%s reason missingEntry\n",
sessionid, dnstr, uniqueid);
done= 1;
@@ -218,7 +219,7 @@ create_glue_entry ( Slapi_PBlock *pb, char *sessionid, Slapi_DN *dn,
const char
{
struct slapi_operation_parameters *op_params;
/* This is okay. While creating a glue, a real entry was added. */
- slapi_log_error ( SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Skipped creating glue entry %s uniqueid=%s reason Entry Already
Exists\n",
sessionid, dnstr, uniqueid);
op_result = LDAP_SUCCESS;
@@ -233,7 +234,7 @@ create_glue_entry ( Slapi_PBlock *pb, char *sessionid, Slapi_DN *dn,
const char
/* The parent is missing */
{
/* JCMREPL - Create the parent ... recursion?... but what's the uniqueid? */
- slapi_log_error (SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Can't created glue entry %s uniqueid=%s, error %d; "
"Possibly, parent entry is a conflict entry.\n",
sessionid, dnstr, uniqueid, op_result);
@@ -241,7 +242,7 @@ create_glue_entry ( Slapi_PBlock *pb, char *sessionid, Slapi_DN *dn,
const char
break;
}
default:
- slapi_log_error ( SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Can't created glue entry %s uniqueid=%s, error %d\n",
sessionid, dnstr, uniqueid, op_result);
break;
diff --git a/ldap/servers/plugins/replication/urp_tombstone.c
b/ldap/servers/plugins/replication/urp_tombstone.c
index 99e88b9..0a781b4 100644
--- a/ldap/servers/plugins/replication/urp_tombstone.c
+++ b/ldap/servers/plugins/replication/urp_tombstone.c
@@ -201,7 +201,7 @@ tombstone_to_glue (
/* Add the reason of turning it to glue - The backend code will use it*/
slapi_entry_add_string(addingentry, ATTR_NSDS5_REPLCONFLICT, reason);
}
- slapi_log_error (SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Can't resurrect tombstone to glue reason '%s'.
"
"Try with conflict dn %s, error=%d\n",
sessionid, reason, addingdn, op_result);
@@ -216,19 +216,19 @@ tombstone_to_glue (
slapi_ch_free_string(&parentuniqueid);
if (op_result == LDAP_SUCCESS)
{
- slapi_log_error (/*slapi_log_urp*/SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error (/*slapi_log_urp*/SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Resurrected tombstone %s to glue reason '%s'\n", sessionid,
addingdn, reason);
}
else if (LDAP_ALREADY_EXISTS == op_result)
{
- slapi_log_error(/*slapi_log_urp*/SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(/*slapi_log_urp*/SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: No need to turn tombstone %s to glue; it was already
resurrected.\n",
sessionid, addingdn);
op_result = LDAP_SUCCESS;
}
else
{
- slapi_log_error (SLAPI_LOG_FATAL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
"%s: Can't resurrect tombstone %s to glue reason '%s',
error=%d\n",
sessionid, addingdn, reason, op_result);
}
diff --git a/ldap/servers/plugins/replication/windows_connection.c
b/ldap/servers/plugins/replication/windows_connection.c
index 1af6267..8fc4c01 100644
--- a/ldap/servers/plugins/replication/windows_connection.c
+++ b/ldap/servers/plugins/replication/windows_connection.c
@@ -347,7 +347,7 @@ windows_perform_operation(Repl_Connection *conn, int optype, const
char *dn,
char *s = NULL;
rc = slapi_ldap_get_lderrno(conn->ld, NULL, &s);
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Received error %d: %s for %s operation\n",
agmt_get_long_name(conn->agmt),
rc, s ? s : "NULL", op_string);
@@ -433,7 +433,7 @@ windows_perform_operation(Repl_Connection *conn, int optype, const
char *dn,
* enough information to allow them to fix the problem
* and retry - bug 170350 */
if (conn->last_ldap_error == LDAP_CONSTRAINT_VIOLATION) {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Received error [%s] when attempting to %s"
" entry [%s]: Please correct the attribute specified "
"in the error message. Refer to the Windows Active "
@@ -441,7 +441,7 @@ windows_perform_operation(Repl_Connection *conn, int optype, const
char *dn,
agmt_get_long_name(conn->agmt),
errmsg, op_string, dn);
} else {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: Received result code %d (%s) for %s operation %s%s\n",
agmt_get_long_name(conn->agmt),
conn->last_ldap_error, errmsg,
@@ -465,7 +465,7 @@ windows_perform_operation(Repl_Connection *conn, int optype, const
char *dn,
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Failed to send %s operation: LDAP error %d (%s)\n",
agmt_get_long_name(conn->agmt),
op_string ? op_string : "NULL", rc, ldap_err2string(rc));
@@ -728,7 +728,7 @@ next:
&conn->timeout, 0 /* sizelimit */, &res);
if ((LDAP_SUCCESS != ldap_rc) && !IS_DISCONNECT_ERROR(ldap_rc)) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"Could not retrieve entry from Windows using search "
"base [%s] scope [%d] filter [%s]: error %d:%s\n",
searchbase_copy, scope, filter_copy, ldap_rc,
@@ -857,7 +857,7 @@ send_dirsync_search(Repl_Connection *conn)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Failed to get %s operation: LDAP error %d (%s)\n",
agmt_get_long_name(conn->agmt),
op_string, rc, ldap_err2string(rc));
@@ -980,7 +980,7 @@ Slapi_Entry * windows_conn_get_search_result(Repl_Connection *conn)
case 0:
case -1:
case LDAP_RES_SEARCH_REFERENCE:
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name, "error in
windows_conn_get_search_result, rc=%d\n", rc);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name, "error in
windows_conn_get_search_result, rc=%d\n", rc);
break;
case LDAP_RES_SEARCH_RESULT:
{
@@ -988,7 +988,7 @@ Slapi_Entry * windows_conn_get_search_result(Repl_Connection *conn)
int code = 0;
/* Purify says this is a leak : */
if (LDAP_SUCCESS != (rc = ldap_parse_result( conn->ld, res, &code, NULL,
NULL, NULL, &returned_controls, 0 ))) {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"error reading search result in windows_conn_get_search_result,
rc=%d:%s\n", rc, ldap_err2string(rc));
}
if (returned_controls)
@@ -997,7 +997,7 @@ Slapi_Entry * windows_conn_get_search_result(Repl_Connection *conn)
ldap_controls_free(returned_controls);
}
if (windows_private_dirsync_has_more(conn->agmt)) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,"received hasmore from
dirsync\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,"received
hasmore from dirsync\n");
}
}
break;
@@ -1005,7 +1005,7 @@ Slapi_Entry * windows_conn_get_search_result(Repl_Connection *conn)
{
if (( dn = ldap_get_dn( conn->ld, res )) != NULL )
{
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,"received entry from
dirsync: %s\n", dn);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,"received
entry from dirsync: %s\n", dn);
lm = ldap_first_entry( conn->ld, res );
/*
* we don't have to retrieve all the members here.
@@ -1140,7 +1140,7 @@ windows_conn_cancel_linger(Repl_Connection *conn)
PR_Lock(conn->lock);
if (conn->linger_active)
{
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: Cancelling linger on the connection\n",
agmt_get_long_name(conn->agmt));
conn->linger_active = PR_FALSE;
@@ -1153,7 +1153,7 @@ windows_conn_cancel_linger(Repl_Connection *conn)
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: No linger to cancel on the connection\n",
agmt_get_long_name(conn->agmt));
}
@@ -1177,7 +1177,7 @@ linger_timeout(time_t event_time, void *arg)
LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> linger_timeout\n", 0, 0, 0 );
PR_ASSERT(NULL != conn);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: Linger timeout has expired on the connection\n",
agmt_get_long_name(conn->agmt));
PR_Lock(conn->lock);
@@ -1209,12 +1209,12 @@ windows_conn_start_linger(Repl_Connection *conn)
LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_start_linger\n", 0,
0, 0 );
PR_ASSERT(NULL != conn);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: Beginning linger on the connection\n",
agmt_get_long_name(conn->agmt));
if (!windows_conn_connected(conn))
{
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: No linger on the closed conn\n",
agmt_get_long_name(conn->agmt));
return;
@@ -1223,7 +1223,7 @@ windows_conn_start_linger(Repl_Connection *conn)
PR_Lock(conn->lock);
if (conn->linger_active)
{
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: Linger already active on the connection\n",
agmt_get_long_name(conn->agmt));
}
@@ -1293,7 +1293,7 @@ windows_conn_connect(Repl_Connection *conn)
/* Pb occured in decryption: stop now, binding will fail */
if ( pw_ret == -1 )
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Decoding of the credentials failed.\n",
agmt_get_long_name(conn->agmt));
@@ -1320,7 +1320,7 @@ windows_conn_connect(Repl_Connection *conn)
if (secure > 0) {
if (!NSS_IsInitialized()) {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: SSL Not Initialized, Replication over SSL FAILED\n",
agmt_get_long_name(conn->agmt));
return_value = CONN_SSL_NOT_ENABLED;
@@ -1336,7 +1336,7 @@ windows_conn_connect(Repl_Connection *conn)
#endif
/* Now we initialize the LDAP Structure and set options */
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: Trying %s%s slapi_ldap_init_ext\n",
agmt_get_long_name(conn->agmt),
secure ? "secure" : "non-secure",
@@ -1349,7 +1349,7 @@ windows_conn_connect(Repl_Connection *conn)
conn->state = STATE_DISCONNECTED;
conn->last_operation = CONN_INIT;
conn->last_ldap_error = LDAP_LOCAL_ERROR;
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Failed to establish %s%sconnection to the consumer\n",
agmt_get_long_name(conn->agmt),
secure ? "secure " : "",
@@ -1360,7 +1360,7 @@ windows_conn_connect(Repl_Connection *conn)
/* slapi_ch_strdup is OK with NULL strings */
binddn = slapi_ch_strdup(conn->binddn);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: binddn = %s, passwd = %s\n",
agmt_get_long_name(conn->agmt),
binddn?binddn:"NULL", creds->bv_val?creds->bv_val:"NULL");
@@ -1462,7 +1462,7 @@ close_connection_internal(Repl_Connection *conn)
conn->state = STATE_DISCONNECTED;
conn->status = STATUS_DISCONNECTED;
conn->supports_ds50_repl = -1;
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: Disconnected from the consumer\n", agmt_get_long_name(conn->agmt));
LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= close_connection_internal\n", 0,
0, 0 );
}
@@ -1843,7 +1843,7 @@ bind_and_check_pwp(Repl_Connection *conn, char * binddn, char
*password)
if (conn->last_ldap_error != rc)
{
conn->last_ldap_error = rc;
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Replication bind with %s auth resumed\n",
agmt_get_long_name(conn->agmt),
mech ? mech : "SIMPLE");
@@ -1857,7 +1857,7 @@ bind_and_check_pwp(Repl_Connection *conn, char * binddn, char
*password)
if ( !(strcmp( ctrls[ i ]->ldctl_oid, LDAP_CONTROL_PWEXPIRED)) )
{
/* Bind is successfull but password has expired */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Successfully bound %s to consumer, "
"but password has expired on consumer.\n",
agmt_get_long_name(conn->agmt), binddn);
@@ -1869,7 +1869,7 @@ bind_and_check_pwp(Repl_Connection *conn, char * binddn, char
*password)
(ctrls[ i ]->ldctl_value.bv_len > 0) )
{
int password_expiring = atoi( ctrls[ i ]->ldctl_value.bv_val );
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Successfully bound %s to consumer, "
"but password is expiring on consumer in %d seconds.\n",
agmt_get_long_name(conn->agmt), binddn, password_expiring);
@@ -1894,7 +1894,7 @@ bind_and_check_pwp(Repl_Connection *conn, char * binddn, char
*password)
conn->last_ldap_error = rc;
/* errmsg is a pointer directly into the ld structure - do not free */
rc = slapi_ldap_get_lderrno( ld, NULL, &errmsg );
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Replication bind with %s auth failed: LDAP error %d (%s) (%s)\n",
agmt_get_long_name(conn->agmt),
mech ? mech : "SIMPLE", rc,
@@ -1903,7 +1903,7 @@ bind_and_check_pwp(Repl_Connection *conn, char * binddn, char
*password)
char *errmsg = NULL;
/* errmsg is a pointer directly into the ld structure - do not free */
rc = slapi_ldap_get_lderrno( ld, NULL, &errmsg );
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: Replication bind with %s auth failed: LDAP error %d (%s) (%s)\n",
agmt_get_long_name(conn->agmt),
mech ? mech : "SIMPLE", rc,
@@ -1939,13 +1939,13 @@ windows_check_user_password(Repl_Connection *conn, Slapi_DN *sdn,
char *password
rc = ldap_result(conn->ld, msgid, LDAP_MSG_ALL, NULL, &res);
if (0 > rc) { /* error */
rc = slapi_ldap_get_lderrno(conn->ld, NULL, NULL);
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"Error reading bind response for id "
"[%s]: error %d (%s)\n",
binddn ? binddn : "(anon)",
rc, ldap_err2string(rc));
} else if (rc == 0) { /* timeout */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"Error: timeout reading "
"bind response for [%s]\n",
binddn ? binddn : "(anon)");
@@ -1953,7 +1953,7 @@ windows_check_user_password(Repl_Connection *conn, Slapi_DN *sdn,
char *password
} else {
parse_rc = ldap_parse_result( conn->ld, res, &rc, NULL, NULL, NULL, NULL, 1 /*
Free res */);
if (parse_rc != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"Error: unable to parse "
"bind result for [%s]: "
"error %d\n",
@@ -1987,7 +1987,7 @@ do_simple_bind (Repl_Connection *conn, LDAP *ld, char * binddn, char
*password)
if (conn->last_ldap_error != ldaperr)
{
conn->last_ldap_error = ldaperr;
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Simple bind failed, "
SLAPI_COMPONENT_NAME_LDAPSDK " error %d (%s) (%s), "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
@@ -2000,7 +2000,7 @@ do_simple_bind (Repl_Connection *conn, LDAP *ld, char * binddn, char
*password)
else if (conn->last_ldap_error != LDAP_SUCCESS)
{
conn->last_ldap_error = LDAP_SUCCESS;
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Simple bind resumed\n",
agmt_get_long_name(conn->agmt));
}
@@ -2058,7 +2058,7 @@ repl5_debug_timeout_callback(time_t when, void *arg)
sprintf(buf, "%d", s_debug_level);
config_set_errorlog_level("nsslapd-errorlog-level", buf, NULL, 1);
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"repl5_debug_timeout_callback: set debug level to %d at %ld\n",
s_debug_level, when);
diff --git a/ldap/servers/plugins/replication/windows_inc_protocol.c
b/ldap/servers/plugins/replication/windows_inc_protocol.c
index 7bb922b..4b37832 100644
--- a/ldap/servers/plugins/replication/windows_inc_protocol.c
+++ b/ldap/servers/plugins/replication/windows_inc_protocol.c
@@ -130,11 +130,11 @@ windows_inc_delete(Private_Repl_Protocol **prpp)
{
int rc;
windows_inc_private *prp_priv = (windows_inc_private *)(*prpp)->private;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_inc_delete\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_inc_delete\n"
);
/* First, stop the protocol if it isn't already stopped */
/* Then, delete all resources used by the protocol */
rc = slapi_eq_cancel(dirsync);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"windows_inc_delete: dirsync: %p, rval: %d\n", dirsync,
rc);
/* if backoff is set, delete it (from EQ, as well) */
if (prp_priv->backoff) {
@@ -155,14 +155,14 @@ windows_inc_delete(Private_Repl_Protocol **prpp)
slapi_ch_free((void **)&(*prpp)->private);
slapi_ch_free((void **)prpp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_inc_delete\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_inc_delete\n"
);
}
/* helper function */
void
w_set_pause_and_busy_time(Private_Repl_Protocol *prp, long *pausetime, long
*busywaittime)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> w_set_pause_and_busy_time\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
w_set_pause_and_busy_time\n" );
/* If neither are set, set busy time to its default */
if (!*pausetime && !*busywaittime)
{
@@ -199,7 +199,7 @@ w_set_pause_and_busy_time(Private_Repl_Protocol *prp, long *pausetime,
long *bus
*/
*pausetime = *busywaittime + 1;
}
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= w_set_pause_and_busy_time\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
w_set_pause_and_busy_time\n" );
}
/*
@@ -276,7 +276,7 @@ windows_inc_run(Private_Repl_Protocol *prp)
PRBool run_dirsync = PR_FALSE;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_inc_run\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_inc_run\n" );
prp->stopped = 0;
prp->terminate = 0;
@@ -340,12 +340,12 @@ windows_inc_run(Private_Repl_Protocol *prp)
current_interval = interval;
if(dirsync){
int rc = slapi_eq_cancel(dirsync);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"windows_inc_runs: cancelled dirsync: %p, rval: %d\n",
dirsync, rc);
}
dirsync = slapi_eq_repeat(periodic_dirsync, (void*) prp, (time_t)0 , interval);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"windows_inc_runs: new dirsync: %p\n", dirsync);
}
@@ -387,7 +387,7 @@ windows_inc_run(Private_Repl_Protocol *prp)
event_occurred(prp, EVENT_BACKOFF_EXPIRED))
{
/* this events - should not occur - log a warning and go to sleep */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Incremental protocol: "
"event %s should not occur in state %s; going to sleep\n",
agmt_get_long_name(prp->agmt),
@@ -403,7 +403,7 @@ windows_inc_run(Private_Repl_Protocol *prp)
else
{
/* wait until window opens or an event occurs */
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: Incremental protocol: "
"waiting for update window to open\n",
agmt_get_long_name(prp->agmt));
protocol_sleep(prp, PR_INTERVAL_NO_TIMEOUT);
@@ -467,7 +467,7 @@ windows_inc_run(Private_Repl_Protocol *prp)
event_occurred(prp, EVENT_BACKOFF_EXPIRED))
{
/* this events - should not occur - log a warning and clear the event */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name, "%s: Incremental
protocol: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name, "%s:
Incremental protocol: "
"event %s should not occur in state %s\n",
agmt_get_long_name(prp->agmt),
e1 ? event2name(EVENT_WINDOW_OPENED) : event2name(EVENT_BACKOFF_EXPIRED),
@@ -510,7 +510,7 @@ windows_inc_run(Private_Repl_Protocol *prp)
rc = windows_acquire_replica(prp, &ruv , (run_dirsync == 0) /* yes, check the
consumer RUV for incremental, but not if we're going to dirsync afterwards */);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"windows_acquire_replica returned %s (%d)\n",
acquire2name(rc),
rc);
@@ -579,7 +579,7 @@ windows_inc_run(Private_Repl_Protocol *prp)
{
/* This should never happen */
/* this events - should not occur - log a warning and go to sleep */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Incremental protocol: event %s should not occur in state %s\n",
agmt_get_long_name(prp->agmt),
e1 ? event2name(EVENT_WINDOW_OPENED) : event2name(EVENT_BACKOFF_EXPIRED),
@@ -691,7 +691,7 @@ windows_inc_run(Private_Repl_Protocol *prp)
time(&now);
next_fire_time = backoff_step(prp_priv->backoff);
/* And go back to sleep */
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: Replication session backing off for %ld seconds\n",
agmt_get_long_name(prp->agmt),
next_fire_time - now);
@@ -728,7 +728,7 @@ windows_inc_run(Private_Repl_Protocol *prp)
else if (event_occurred(prp, EVENT_WINDOW_OPENED))
{
/* this should never happen - log an error and go to sleep */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name, "%s: Incremental
protocol: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name, "%s:
Incremental protocol: "
"event %s should not occur in state %s; going to sleep\n",
agmt_get_long_name(prp->agmt),
event2name(EVENT_WINDOW_OPENED), state2name(current_state));
@@ -777,20 +777,20 @@ windows_inc_run(Private_Repl_Protocol *prp)
next_state = STATE_STOP_FATAL_ERROR;
break;
case EXAMINE_RUV_PRISTINE_REPLICA:
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Replica has no update vector. It has never been initialized.\n",
agmt_get_long_name(prp->agmt));
next_state = STATE_BACKOFF_START;
break;
case EXAMINE_RUV_GENERATION_MISMATCH:
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: The remote replica has a different database generation ID than "
"the local database. You may have to reinitialize the remote replica, "
"or the local replica.\n", agmt_get_long_name(prp->agmt));
next_state = STATE_BACKOFF_START;
break;
case EXAMINE_RUV_REPLICA_TOO_OLD:
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Replica update vector is too out of date to bring "
"into sync using the incremental protocol. The replica "
"must be reinitialized.\n", agmt_get_long_name(prp->agmt));
@@ -806,14 +806,14 @@ windows_inc_run(Private_Repl_Protocol *prp)
replica = NULL;
if (rc == CSN_LIMIT_EXCEEDED) /* too much skew */
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Incremental protocol: fatal error - too much time skew between
replicas!\n",
agmt_get_long_name(prp->agmt));
next_state = STATE_STOP_FATAL_ERROR;
}
else if (rc != 0) /* internal error */
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Incremental protocol: fatal internal error updating the CSN
generator!\n",
agmt_get_long_name(prp->agmt));
next_state = STATE_STOP_FATAL_ERROR;
@@ -920,7 +920,7 @@ windows_inc_run(Private_Repl_Protocol *prp)
long loops = pausetime;
/* the while loop is so that we don't just sleep and sleep if an
event comes in that we should handle immediately (like shutdown) */
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: Pausing updates for %ld seconds to allow other suppliers to update
consumer\n",
agmt_get_long_name(prp->agmt), pausetime);
while (loops-- && !(PROTOCOL_IS_SHUTDOWN(prp)))
@@ -944,7 +944,7 @@ windows_inc_run(Private_Repl_Protocol *prp)
/* XXXggood update state in replica */
agmt_set_last_update_status(prp->agmt, -1, 0, "Incremental update has failed and
requires administrator action");
dev_debug("windows_inc_run(STATE_STOP_FATAL_ERROR)");
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Incremental update failed and requires administrator action\n",
agmt_get_long_name(prp->agmt));
next_state = STATE_STOP_FATAL_ERROR_PART2;
@@ -997,7 +997,7 @@ windows_inc_run(Private_Repl_Protocol *prp)
break;
}
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: State: %s -> %s\n",
agmt_get_long_name(prp->agmt),
state2name(current_state), state2name(next_state));
@@ -1012,7 +1012,7 @@ windows_inc_run(Private_Repl_Protocol *prp)
/* ... and disconnect, if currently connected */
windows_conn_disconnect(prp->conn);
ruv_destroy ( &ruv );
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_inc_run\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_inc_run\n" );
}
@@ -1023,7 +1023,7 @@ windows_inc_run(Private_Repl_Protocol *prp)
static void
protocol_sleep(Private_Repl_Protocol *prp, PRIntervalTime duration)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> protocol_sleep\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> protocol_sleep\n" );
PR_ASSERT(NULL != prp);
PR_Lock(prp->lock);
/* we should not go to sleep if there are events available to be processed.
@@ -1032,12 +1032,12 @@ protocol_sleep(Private_Repl_Protocol *prp, PRIntervalTime
duration)
PR_WaitCondVar(prp->cvar, duration);
else
{
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: Incremental protocol: can't go to sleep: event bits - %x\n",
agmt_get_long_name(prp->agmt), prp->eventbits);
}
PR_Unlock(prp->lock);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= protocol_sleep\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= protocol_sleep\n" );
}
@@ -1050,13 +1050,13 @@ protocol_sleep(Private_Repl_Protocol *prp, PRIntervalTime
duration)
static void
event_notify(Private_Repl_Protocol *prp, PRUint32 event)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> event_notify\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> event_notify\n" );
PR_ASSERT(NULL != prp);
PR_Lock(prp->lock);
prp->eventbits |= event;
PR_NotifyCondVar(prp->cvar);
PR_Unlock(prp->lock);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= event_notify\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= event_notify\n" );
}
@@ -1069,26 +1069,26 @@ event_occurred(Private_Repl_Protocol *prp, PRUint32 event)
{
PRUint32 return_value;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> event_occurred\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> event_occurred\n" );
PR_ASSERT(NULL != prp);
PR_Lock(prp->lock);
return_value = (prp->eventbits & event);
prp->eventbits &= ~event; /* Clear event */
PR_Unlock(prp->lock);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= event_occurred\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= event_occurred\n" );
return return_value;
}
static void
reset_events (Private_Repl_Protocol *prp)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> reset_events\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> reset_events\n" );
PR_ASSERT(NULL != prp);
PR_Lock(prp->lock);
prp->eventbits = 0;
PR_Unlock(prp->lock);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= reset_events\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= reset_events\n" );
}
@@ -1096,8 +1096,8 @@ reset_events (Private_Repl_Protocol *prp)
static PRBool
is_dummy_operation (const slapi_operation_parameters *op)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> is_dummy_operation\n" );
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= is_dummy_operation\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> is_dummy_operation\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= is_dummy_operation\n" );
return (strcmp (op->target_address.uniqueid, START_ITERATION_ENTRY_UNIQUEID) ==
0);
}
@@ -1106,7 +1106,7 @@ is_dummy_operation (const slapi_operation_parameters *op)
void
w_cl5_operation_parameters_done (struct slapi_operation_parameters *sop)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> w_cl5_operation_parameters_done\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
w_cl5_operation_parameters_done\n" );
if(sop!=NULL) {
switch(sop->operation_type)
{
@@ -1141,7 +1141,7 @@ w_cl5_operation_parameters_done (struct slapi_operation_parameters
*sop)
}
}
operation_parameters_done(sop);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= w_cl5_operation_parameters_done\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
w_cl5_operation_parameters_done\n" );
}
@@ -1168,7 +1168,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
RUV *current_ruv = ruv_dup(remote_update_vector);
CSN *mincsn = NULL;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> send_updates\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> send_updates\n" );
*num_changes_sent = 0;
@@ -1193,92 +1193,92 @@ send_updates(Private_Repl_Protocol *prp, RUV
*remote_update_vector, PRUint32 *nu
switch (rc)
{
case CL5_BAD_DATA: /* invalid parameter passed to the function */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Invalid parameter passed to cl5CreateReplayIterator\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_FATAL_ERROR;
break;
case CL5_BAD_FORMAT: /* db data has unexpected format */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Unexpected format encountered in changelog database\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_FATAL_ERROR;
break;
case CL5_BAD_STATE: /* changelog is in an incorrect state for attempted operation */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Changelog database was in an incorrect state\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_FATAL_ERROR;
break;
case CL5_BAD_DBVERSION: /* changelog has invalid dbversion */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Incorrect dbversion found in changelog database\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_FATAL_ERROR;
break;
case CL5_DB_ERROR: /* database error */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: A changelog database error was encountered\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_FATAL_ERROR;
break;
case CL5_NOTFOUND: /* we have no changes to send */
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: No changes to send\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_NO_MORE_UPDATES;
break;
case CL5_MEMORY_ERROR: /* memory allocation failed */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Memory allocation error occurred\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_FATAL_ERROR;
break;
case CL5_SYSTEM_ERROR: /* NSPR error occurred: use PR_GetError for furhter info */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: An NSPR error (%d) occurred\n",
agmt_get_long_name(prp->agmt), PR_GetError());
return_value = UPDATE_TRANSIENT_ERROR;
break;
case CL5_CSN_ERROR: /* CSN API failed */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: A CSN API failure was encountered\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_TRANSIENT_ERROR;
break;
case CL5_RUV_ERROR: /* RUV API failed */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: An RUV API failure occurred\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_TRANSIENT_ERROR;
break;
case CL5_OBJSET_ERROR: /* namedobjset api failed */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: A namedobject API failure occurred\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_TRANSIENT_ERROR;
break;
case CL5_PURGED_DATA: /* requested data has been purged */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Data required to update replica has been purged. "
"The replica must be reinitialized.\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_FATAL_ERROR;
break;
case CL5_MISSING_DATA: /* data should be in the changelog, but is missing */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Missing data encountered\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_FATAL_ERROR;
break;
case CL5_UNKNOWN_ERROR: /* unclassified error */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: An unknown error was ecountered\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_TRANSIENT_ERROR;
break;
default:
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: An unknown error (%d) occurred "
"(cl5CreateReplayIterator)\n",
agmt_get_long_name(prp->agmt), rc);
@@ -1304,7 +1304,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
/* check that we don't return dummy entries */
if (is_dummy_operation (entry.op))
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: changelog iteration code returned a dummy entry with
csn %s, "
"skipping ...\n",
agmt_get_long_name(prp->agmt), csn_as_string(entry.op->csn, PR_FALSE,
csn_str));
@@ -1336,7 +1336,9 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
agmt_inc_last_update_changecount (prp->agmt,
csn_get_replicaid(entry.op->csn), 1 /*skipped*/);
mark_record_done = 1;
}
- slapi_log_error(finished ? SLAPI_LOG_FATAL : slapi_log_urp,
windows_repl_plugin_name,
+ slapi_log_error(finished ? SLAPI_LOG_FATAL : slapi_log_urp,
+ finished || slapi_log_urp==SLAPI_LOG_FATAL ? LOG_ERR : LOG_DEBUG,
+ windows_repl_plugin_name,
"%s: Consumer failed to replay change (uniqueid %s, CSN %s): %s.
%s.\n",
agmt_get_long_name(prp->agmt),
entry.op->target_address.uniqueid, csn_str,
@@ -1349,7 +1351,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
return_value = UPDATE_TRANSIENT_ERROR;
finished = 1;
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Consumer failed to replay change (uniqueid %s, CSN %s): "
"%s. Will retry later.\n",
agmt_get_long_name(prp->agmt),
@@ -1360,7 +1362,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
{
return_value = UPDATE_TIMEOUT;
finished = 1;
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Consumer timed out to replay change (uniqueid %s, CSN %s): "
"%s.\n",
agmt_get_long_name(prp->agmt),
@@ -1375,7 +1377,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
*/
return_value = UPDATE_TRANSIENT_ERROR;
finished = 1;
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Failed to replay change (uniqueid %s, CSN %s): "
"Local error. Will retry later.\n",
agmt_get_long_name(prp->agmt),
@@ -1412,39 +1414,39 @@ send_updates(Private_Repl_Protocol *prp, RUV
*remote_update_vector, PRUint32 *nu
}
break;
case CL5_BAD_DATA:
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Invalid parameter passed to cl5GetNextOperationToReplay\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_FATAL_ERROR;
finished = 1;
break;
case CL5_NOTFOUND:
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: No more updates to send (cl5GetNextOperationToReplay)\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_NO_MORE_UPDATES;
finished = 1;
break;
case CL5_DB_ERROR:
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: A database error occurred (cl5GetNextOperationToReplay)\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_FATAL_ERROR;
finished = 1;
break;
case CL5_BAD_FORMAT:
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: A malformed changelog entry was encountered
(cl5GetNextOperationToReplay)\n",
agmt_get_long_name(prp->agmt));
break;
case CL5_MEMORY_ERROR:
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: A memory allocation error occurred (cl5GetNextOperationToRepla)\n",
agmt_get_long_name(prp->agmt));
return_value = UPDATE_FATAL_ERROR;
break;
default:
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Unknown error code (%d) returned from
cl5GetNextOperationToReplay\n",
agmt_get_long_name(prp->agmt), rc);
return_value = UPDATE_TRANSIENT_ERROR;
@@ -1471,7 +1473,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector,
PRUint32 *nu
agmt_set_consumer_ruv(prp->agmt,current_ruv);
ruv_destroy(¤t_ruv);
}
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= send_updates\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= send_updates\n" );
return return_value;
}
@@ -1488,7 +1490,7 @@ windows_inc_stop(Private_Repl_Protocol *prp)
PRIntervalTime start, maxwait, now;
int seconds = 1200;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_inc_stop\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_inc_stop\n" );
maxwait = PR_SecondsToInterval(seconds);
prp->terminate = 1;
@@ -1504,19 +1506,19 @@ windows_inc_stop(Private_Repl_Protocol *prp)
{
/* Isn't listening. Do something drastic. */
return_value = -1;
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_inc_stop: protocol does not stop after %d seconds\n",
agmt_get_long_name(prp->agmt), seconds);
}
else
{
return_value = 0;
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_inc_stop: protocol stopped after %d seconds\n",
agmt_get_long_name(prp->agmt),
PR_IntervalToSeconds(now-start));
}
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_inc_stop\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_inc_stop\n" );
return return_value;
}
@@ -1527,9 +1529,9 @@ windows_inc_status(Private_Repl_Protocol *prp)
{
int return_value = 0;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_inc_status\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_inc_status\n" );
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_inc_status\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_inc_status\n" );
return return_value;
}
@@ -1539,43 +1541,43 @@ windows_inc_status(Private_Repl_Protocol *prp)
static void
windows_inc_notify_update(Private_Repl_Protocol *prp)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_inc_notify_update\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
windows_inc_notify_update\n" );
event_notify(prp, EVENT_TRIGGERING_CRITERIA_MET);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_inc_notify_update\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
windows_inc_notify_update\n" );
}
static void
windows_inc_update_now(Private_Repl_Protocol *prp)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_inc_update_now\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_inc_update_now\n"
);
event_notify(prp, EVENT_REPLICATE_NOW);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_inc_update_now\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_inc_update_now\n"
);
}
static void
windows_inc_notify_agmt_changed(Private_Repl_Protocol *prp)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_inc_notify_agmt_changed\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
windows_inc_notify_agmt_changed\n" );
event_notify(prp, EVENT_AGMT_CHANGED);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_inc_notify_agmt_changed\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
windows_inc_notify_agmt_changed\n" );
}
static void
windows_inc_notify_window_opened (Private_Repl_Protocol *prp)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_inc_notify_window_opened\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
windows_inc_notify_window_opened\n" );
event_notify(prp, EVENT_WINDOW_OPENED);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_inc_notify_window_opened\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
windows_inc_notify_window_opened\n" );
}
static void
windows_inc_notify_window_closed (Private_Repl_Protocol *prp)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_inc_notify_window_closed\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
windows_inc_notify_window_closed\n" );
event_notify(prp, EVENT_WINDOW_CLOSED);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_inc_notify_window_closed\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
windows_inc_notify_window_closed\n" );
}
@@ -1585,7 +1587,7 @@ Windows_Inc_Protocol_new(Repl_Protocol *rp)
windows_inc_private *rip = NULL;
Private_Repl_Protocol *prp = (Private_Repl_Protocol *)slapi_ch_calloc(1,
sizeof(Private_Repl_Protocol));
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> Windows_Inc_Protocol_new\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
Windows_Inc_Protocol_new\n" );
prp->delete = windows_inc_delete;
prp->run = windows_inc_run;
@@ -1618,13 +1620,13 @@ Windows_Inc_Protocol_new(Repl_Protocol *rp)
prp->private = (void *)rip;
prp->replica_acquired = PR_FALSE;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= Windows_Inc_Protocol_new\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
Windows_Inc_Protocol_new\n" );
return prp;
loser:
windows_inc_delete(&prp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= Windows_Inc_Protocol_new (loser)\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= Windows_Inc_Protocol_new
(loser)\n" );
return NULL;
}
@@ -1636,12 +1638,12 @@ windows_inc_backoff_expired(time_t timer_fire_time, void *arg)
{
Private_Repl_Protocol *prp = (Private_Repl_Protocol *)arg;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_inc_backoff_expired\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
windows_inc_backoff_expired\n" );
PR_ASSERT(NULL != prp);
event_notify(prp, EVENT_BACKOFF_EXPIRED);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_inc_backoff_expired\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
windows_inc_backoff_expired\n" );
}
@@ -1667,7 +1669,7 @@ windows_examine_update_vector(Private_Repl_Protocol *prp, RUV
*remote_ruv)
{
int return_value;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_examine_update_vector\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
windows_examine_update_vector\n" );
PR_ASSERT(NULL != prp);
if (NULL == prp)
@@ -1708,7 +1710,7 @@ windows_examine_update_vector(Private_Repl_Protocol *prp, RUV
*remote_ruv)
slapi_ch_free((void**)&remote_gen);
slapi_ch_free((void**)&local_gen);
}
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_examine_update_vector\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
windows_examine_update_vector\n" );
return return_value;
}
@@ -1733,8 +1735,8 @@ acquire2name (int code)
static const char*
state2name (int state)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> state2name\n" );
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= state2name\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> state2name\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= state2name\n" );
switch (state)
{
case STATE_START: return "start";
@@ -1755,8 +1757,8 @@ state2name (int state)
static const char*
event2name (int event)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> event2name\n" );
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= event2name\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> event2name\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= event2name\n" );
switch (event)
{
case EVENT_WINDOW_OPENED: return "update_window_opened";
@@ -1775,11 +1777,11 @@ event2name (int event)
static void
periodic_dirsync(time_t when, void *arg)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> periodic_dirsync\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> periodic_dirsync\n" );
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"Running Dirsync \n");
event_notify( (Private_Repl_Protocol*) arg, EVENT_RUN_DIRSYNC);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= periodic_dirsync\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= periodic_dirsync\n" );
}
diff --git a/ldap/servers/plugins/replication/windows_private.c
b/ldap/servers/plugins/replication/windows_private.c
index f8f433a..1dab015 100644
--- a/ldap/servers/plugins/replication/windows_private.c
+++ b/ldap/servers/plugins/replication/windows_private.c
@@ -111,7 +111,7 @@ check_update_allowed(Repl_Agmt *ra, const char *type, Slapi_Entry *e,
int *retva
while (get_next_disallow_attr_type(&ii, &distype)) {
if (slapi_attr_types_equivalent(type, distype)) {
char *tmpstr = slapi_entry_attr_get_charptr(e, type);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"windows_parse_config_entry: setting %s to %s will be "
"deferred until current update is completed\n",
type, tmpstr);
@@ -232,7 +232,7 @@ windows_parse_config_entry(Repl_Agmt *ra, const char *type,
Slapi_Entry *e)
} else if (strcasecmp(tmpstr, "toWindows") == 0) {
windows_private_set_one_way(ra, ONE_WAY_SYNC_TO_AD);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"Ignoring illegal setting for %s attribute in replication "
"agreement \"%s\". Valid values are \"toWindows\" or
"
"\"fromWindows\".\n", type_oneWaySync, slapi_entry_get_dn(e));
@@ -263,7 +263,7 @@ windows_parse_config_entry(Repl_Agmt *ra, const char *type,
Slapi_Entry *e)
} else if (strcasecmp(tmpstr, "none") == 0) {
windows_private_set_move_action(ra, MOVE_DOES_NOTHING);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"Ignoring illegal setting for %s attribute in replication "
"agreement \"%s\". Valid values are \"delete\" or "
"\"unsync\".\n", type_winsyncMoveAction,
slapi_entry_get_dn(e));
@@ -374,7 +374,7 @@ Dirsync_Private* windows_private_new()
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_new\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=> windows_private_new\n" );
dp = (Dirsync_Private *)slapi_ch_calloc(sizeof(Dirsync_Private),1);
@@ -389,7 +389,7 @@ Dirsync_Private* windows_private_new()
dp->windows_treetop = NULL;
dp->directory_treetop = NULL;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_new\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<= windows_private_new\n" );
return dp;
}
@@ -399,7 +399,7 @@ void windows_agreement_delete(Repl_Agmt *ra)
const subtreePair *sp;
Dirsync_Private *dp = (Dirsync_Private *) agmt_get_priv(ra);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_delete\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=> windows_private_delete\n"
);
PR_ASSERT(dp != NULL);
@@ -431,7 +431,7 @@ void windows_agreement_delete(Repl_Agmt *ra)
slapi_ch_free((void **)&dp->subtree_pairs);
slapi_ch_free((void **)&dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_delete\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<= windows_private_delete\n"
);
}
@@ -439,14 +439,14 @@ int windows_private_get_isnt4(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_get_isnt4\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_get_isnt4\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_get_isnt4\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_get_isnt4\n" );
return dp->isnt4;
}
@@ -455,7 +455,7 @@ void windows_private_set_isnt4(const Repl_Agmt *ra, int isit)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_set_isnt4\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_set_isnt4\n" );
PR_ASSERT(ra);
@@ -464,21 +464,21 @@ void windows_private_set_isnt4(const Repl_Agmt *ra, int isit)
dp->isnt4 = isit;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_set_isnt4\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_set_isnt4\n" );
}
int windows_private_get_iswin2k3(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_get_iswin2k3\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_get_iswin2k3\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_get_iswin2k3\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_get_iswin2k3\n" );
return dp->iswin2k3;
}
@@ -487,7 +487,7 @@ void windows_private_set_iswin2k3(const Repl_Agmt *ra, int isit)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_set_iswin2k3\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_set_iswin2k3\n" );
PR_ASSERT(ra);
@@ -496,7 +496,7 @@ void windows_private_set_iswin2k3(const Repl_Agmt *ra, int isit)
dp->iswin2k3 = isit;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_set_iswin2k3\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_set_iswin2k3\n" );
}
/* Returns a copy of the Slapi_Filter pointer. The caller should not free it */
@@ -504,7 +504,7 @@ Slapi_Filter* windows_private_get_directory_filter(const Repl_Agmt
*ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=>
windows_private_get_directory_filter\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_get_directory_filter\n" );
PR_ASSERT(ra);
@@ -530,7 +530,7 @@ Slapi_Filter* windows_private_get_directory_filter(const Repl_Agmt
*ra)
slapi_ch_free_string(&string_filter);
}
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<=
windows_private_get_directory_filter\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_get_directory_filter\n" );
return dp->directory_filter;
}
@@ -541,7 +541,7 @@ windows_private_get_windows_filter(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_get_windows_filter\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_get_windows_filter\n" );
PR_ASSERT(ra);
@@ -563,7 +563,7 @@ windows_private_get_windows_filter(const Repl_Agmt *ra)
}
}
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_get_windows_filter\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_get_windows_filter\n" );
return dp->windows_filter;
}
@@ -573,7 +573,7 @@ Slapi_Filter* windows_private_get_deleted_filter(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_get_deleted_filter\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_get_deleted_filter\n" );
PR_ASSERT(ra);
@@ -587,7 +587,7 @@ Slapi_Filter* windows_private_get_deleted_filter(const Repl_Agmt *ra)
slapi_ch_free_string(&string_filter);
}
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_get_deleted_filter\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_get_deleted_filter\n" );
return dp->deleted_filter;
}
@@ -597,14 +597,14 @@ const Slapi_DN* windows_private_get_windows_subtree (const Repl_Agmt
*ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=>
windows_private_get_windows_subtree\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_get_windows_subtree\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<=
windows_private_get_windows_subtree\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_get_windows_subtree\n" );
return dp->windows_subtree;
}
@@ -614,14 +614,14 @@ windows_private_get_windows_domain(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_get_windows_domain\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_get_windows_domain\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_get_windows_domain\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_get_windows_domain\n" );
return dp->windows_domain;
}
@@ -631,7 +631,7 @@ windows_private_set_windows_domain(const Repl_Agmt *ra, char *domain)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_set_windows_domain\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_set_windows_domain\n" );
PR_ASSERT(ra);
@@ -641,7 +641,7 @@ windows_private_set_windows_domain(const Repl_Agmt *ra, char *domain)
slapi_ch_free_string(&dp->windows_domain);
dp->windows_domain = domain;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_set_windows_domain\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_set_windows_domain\n" );
}
/* Returns a copy of the Slapi_DN pointer, no need to free it */
@@ -649,14 +649,14 @@ const Slapi_DN* windows_private_get_directory_subtree (const
Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=>
windows_private_get_directory_replarea\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_get_directory_replarea\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<=
windows_private_get_directory_replarea\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_get_directory_replarea\n" );
return dp->directory_subtree;
}
@@ -667,7 +667,7 @@ void windows_private_set_windows_subtree (const Repl_Agmt
*ra,Slapi_DN* sdn )
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=>
windows_private_set_windows_replarea\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_set_windows_replarea\n" );
PR_ASSERT(ra);
PR_ASSERT(sdn);
@@ -678,7 +678,7 @@ void windows_private_set_windows_subtree (const Repl_Agmt
*ra,Slapi_DN* sdn )
slapi_sdn_free(&dp->windows_subtree);
dp->windows_subtree = sdn;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<=
windows_private_set_windows_replarea\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_set_windows_replarea\n" );
}
/* Takes a copy of the sdn passed in */
@@ -687,7 +687,7 @@ void windows_private_set_directory_subtree (const Repl_Agmt
*ra,Slapi_DN* sdn )
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=>
windows_private_set_directory_replarea\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_set_directory_replarea\n" );
PR_ASSERT(ra);
PR_ASSERT(sdn);
@@ -698,20 +698,20 @@ void windows_private_set_directory_subtree (const Repl_Agmt
*ra,Slapi_DN* sdn )
slapi_sdn_free(&dp->directory_subtree);
dp->directory_subtree = sdn;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<=
windows_private_set_directory_replarea\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_set_directory_replarea\n" );
}
PRBool windows_private_create_users(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_create_users\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_create_users\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_create_users\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_create_users\n" );
return dp->create_users_from_dirsync;
@@ -722,7 +722,7 @@ void windows_private_set_create_users(const Repl_Agmt *ra, PRBool
value)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_set_create_users\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_set_create_users\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
@@ -730,7 +730,7 @@ void windows_private_set_create_users(const Repl_Agmt *ra, PRBool
value)
dp->create_users_from_dirsync = value;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_set_create_users\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_set_create_users\n" );
}
@@ -738,13 +738,13 @@ PRBool windows_private_create_groups(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_create_groups\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_create_groups\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_create_groups\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_create_groups\n" );
return dp->create_groups_from_dirsync;
@@ -755,7 +755,7 @@ void windows_private_set_create_groups(const Repl_Agmt *ra, PRBool
value)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_set_create_groups\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_set_create_groups\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
@@ -763,7 +763,7 @@ void windows_private_set_create_groups(const Repl_Agmt *ra, PRBool
value)
dp->create_groups_from_dirsync = value;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_set_create_groups\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_set_create_groups\n" );
}
@@ -772,13 +772,13 @@ int windows_private_get_one_way(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_get_one_way\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_get_one_way\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_get_one_way\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_get_one_way\n" );
return dp->one_way;
}
@@ -788,7 +788,7 @@ void windows_private_set_one_way(const Repl_Agmt *ra, int value)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_set_one_way\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_set_one_way\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
@@ -796,7 +796,7 @@ void windows_private_set_one_way(const Repl_Agmt *ra, int value)
dp->one_way = value;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_set_one_way\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_set_one_way\n" );
}
const char*
@@ -804,13 +804,13 @@ windows_private_get_windows_userfilter(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=>
windows_private_get_windows_userfilter\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_get_windows_userfilter\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<=
windows_private_get_windows_userfilter\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_get_windows_userfilter\n" );
return dp->windows_userfilter;
}
@@ -821,7 +821,7 @@ windows_private_set_windows_userfilter(const Repl_Agmt *ra, char
*filter)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=>
windows_private_set_windows_userfilter\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_set_windows_userfilter\n" );
PR_ASSERT(ra);
@@ -831,7 +831,7 @@ windows_private_set_windows_userfilter(const Repl_Agmt *ra, char
*filter)
slapi_ch_free_string(&dp->windows_userfilter);
dp->windows_userfilter = filter;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<=
windows_private_set_windows_userfilter\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_set_windows_userfilter\n" );
}
const char*
@@ -839,13 +839,13 @@ windows_private_get_directory_userfilter(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=>
windows_private_get_directory_userfilter\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_get_directory_userfilter\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<=
windows_private_get_directory_userfilter\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_get_directory_userfilter\n" );
return dp->directory_userfilter;
}
@@ -856,7 +856,7 @@ windows_private_set_directory_userfilter(const Repl_Agmt *ra, char
*filter)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=>
windows_private_set_directory_userfilter\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_set_directory_userfilter\n" );
PR_ASSERT(ra);
@@ -866,7 +866,7 @@ windows_private_set_directory_userfilter(const Repl_Agmt *ra, char
*filter)
slapi_ch_free_string(&dp->directory_userfilter);
dp->directory_userfilter = filter;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<=
windows_private_set_directory_userfilter\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_set_directory_userfilter\n" );
}
const subtreePair*
@@ -874,13 +874,13 @@ windows_private_get_subtreepairs(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_get_subtreepairs\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_get_subtreepairs\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_get_subtreepairs\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_get_subtreepairs\n" );
return dp->subtree_pairs;
}
@@ -891,7 +891,7 @@ windows_private_set_subtreepairs(const Repl_Agmt *ra, char **parray)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_set_subtreepairs\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_set_subtreepairs\n" );
PR_ASSERT(ra);
@@ -901,7 +901,7 @@ windows_private_set_subtreepairs(const Repl_Agmt *ra, char **parray)
free_subtree_pairs(&(dp->subtree_pairs));
dp->subtree_pairs = create_subtree_pairs(parray);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_set_subtreepairs\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_set_subtreepairs\n" );
}
/*
@@ -931,14 +931,14 @@ create_subtree_pairs(char **pairs)
p0 = ldap_utf8strtok_r(*ptr, ":", &saveptr);
p1 = ldap_utf8strtok_r(NULL, ":", &saveptr);
if ((NULL == p0) || (NULL == p1)) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"create_subtree_pairs: "
"Ignoring invalid subtree pairs \"%s\".\n", *ptr);
continue;
}
spp->DSsubtree = slapi_sdn_new_dn_byval(p0);
if (NULL == spp->DSsubtree) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"create_subtree_pairs: "
"Ignoring invalid DS subtree \"%s\".\n",
p0);
@@ -946,7 +946,7 @@ create_subtree_pairs(char **pairs)
}
spp->ADsubtree = slapi_sdn_new_dn_byval(p1);
if (NULL == spp->ADsubtree) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"create_subtree_pairs: "
"Ignoring invalid AD subtree \"%s\".\n",
p1);
@@ -982,13 +982,13 @@ windows_private_get_windows_treetop(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=>
windows_private_get_windows_treetop\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_get_windows_treetop\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<=
windows_private_get_windows_treetop\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_get_windows_treetop\n" );
return dp->windows_treetop;
}
@@ -999,7 +999,7 @@ windows_private_set_windows_treetop(const Repl_Agmt *ra, char
*treetop)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=>
windows_private_set_windows_treetop\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_set_windows_treetop\n" );
PR_ASSERT(ra);
@@ -1026,7 +1026,7 @@ windows_private_set_windows_treetop(const Repl_Agmt *ra, char
*treetop)
if (treetop_sdn) {
dp->windows_treetop = treetop_sdn;
} else {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"windows_private_set_windows_treetop: "
"winSyncSubtreePair contains inconsistent Windows
subtrees.\n");
dp->windows_treetop = NULL;
@@ -1037,7 +1037,7 @@ windows_private_set_windows_treetop(const Repl_Agmt *ra, char
*treetop)
}
}
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<=
windows_private_set_windows_treetop\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_set_windows_treetop\n" );
}
const Slapi_DN*
@@ -1045,13 +1045,13 @@ windows_private_get_directory_treetop(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=>
windows_private_get_directory_treetop\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_get_directory_treetop\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<=
windows_private_get_directory_treetop\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_get_directory_treetop\n" );
return dp->directory_treetop;
}
@@ -1062,7 +1062,7 @@ windows_private_set_directory_treetop(const Repl_Agmt *ra, char
*treetop)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=>
windows_private_set_directory_treetop\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_set_directory_treetop\n" );
PR_ASSERT(ra);
@@ -1089,7 +1089,7 @@ windows_private_set_directory_treetop(const Repl_Agmt *ra, char
*treetop)
if (treetop_sdn) {
dp->directory_treetop = treetop_sdn;
} else {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"windows_private_set_directory_treetop: "
"winSyncSubtreePair contains inconsistent Windows
subtrees.\n");
dp->directory_treetop = NULL;
@@ -1100,7 +1100,7 @@ windows_private_set_directory_treetop(const Repl_Agmt *ra, char
*treetop)
}
}
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<=
windows_private_set_directory_treetop\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_set_directory_treetop\n" );
}
/*
@@ -1116,7 +1116,7 @@ LDAPControl* windows_private_dirsync_control(const Repl_Agmt *ra)
Dirsync_Private *dp;
char iscritical = PR_TRUE;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_dirsync_control\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
windows_private_dirsync_control\n" );
PR_ASSERT(ra);
@@ -1134,7 +1134,7 @@ LDAPControl* windows_private_dirsync_control(const Repl_Agmt *ra)
ber_free(ber,1);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_dirsync_control\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
windows_private_dirsync_control\n" );
return control;
@@ -1161,7 +1161,7 @@ void windows_private_update_dirsync_control(const Repl_Agmt
*ra,LDAPControl **co
int return_value = LDAP_SUCCESS;
#endif
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=>
windows_private_update_dirsync_control\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_update_dirsync_control\n" );
PR_ASSERT(ra);
@@ -1234,7 +1234,7 @@ choke:
#ifdef FOR_DEBUGGING
LDAPDebug1Arg( LDAP_DEBUG_TRACE, "<= windows_private_update_dirsync_control:
rc=%d\n", return_value);
#else
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<=
windows_private_update_dirsync_control\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_update_dirsync_control\n" );
#endif
}
@@ -1242,14 +1242,14 @@ PRBool windows_private_dirsync_has_more(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_dirsync_has_more\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_dirsync_has_more\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_dirsync_has_more\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_dirsync_has_more\n" );
return dp->dirsync_cookie_has_more;
@@ -1259,7 +1259,7 @@ void windows_private_null_dirsync_cookie(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=>
windows_private_null_dirsync_control\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_null_dirsync_control\n" );
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
@@ -1268,7 +1268,7 @@ void windows_private_null_dirsync_cookie(const Repl_Agmt *ra)
slapi_ch_free_string(&dp->dirsync_cookie);
dp->dirsync_cookie = NULL;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<=
windows_private_null_dirsync_control\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_null_dirsync_control\n" );
}
static
@@ -1298,7 +1298,7 @@ windows_private_save_dirsync_cookie(const Repl_Agmt *ra)
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=>
windows_private_save_dirsync_cookie\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_save_dirsync_cookie\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
@@ -1333,7 +1333,7 @@ windows_private_save_dirsync_cookie(const Repl_Agmt *ra)
slapi_mods_free(&mods);
slapi_sdn_free(&sdn);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<=
windows_private_save_dirsync_cookie\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_save_dirsync_cookie\n" );
return rc;
}
@@ -1350,7 +1350,7 @@ int windows_private_load_dirsync_cookie(const Repl_Agmt *ra)
Slapi_Entry *entry = NULL;
Slapi_Attr *attr = NULL;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=>
windows_private_load_dirsync_cookie\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_load_dirsync_cookie\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
@@ -1400,7 +1400,7 @@ int windows_private_load_dirsync_cookie(const Repl_Agmt *ra)
slapi_sdn_free( &sdn);
slapi_pblock_destroy (pb);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<=
windows_private_load_dirsync_cookie\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_load_dirsync_cookie\n" );
return rc;
}
@@ -1410,12 +1410,12 @@ Slapi_Entry *windows_private_get_raw_entry(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_get_raw_entry\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_get_raw_entry\n" );
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_get_raw_entry\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_get_raw_entry\n" );
return dp->raw_entry;
}
@@ -1425,7 +1425,7 @@ void windows_private_set_raw_entry(const Repl_Agmt *ra, Slapi_Entry
*e)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_set_raw_entry\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_set_raw_entry\n" );
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
@@ -1439,7 +1439,7 @@ void windows_private_set_raw_entry(const Repl_Agmt *ra, Slapi_Entry
*e)
dp->raw_entry = e;
}
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_set_raw_entry\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_set_raw_entry\n" );
}
/* Setting keep to 1 will cause the current raw entry to remain, even if
@@ -1449,26 +1449,26 @@ void windows_private_set_keep_raw_entry(const Repl_Agmt *ra, int
keep)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_set_keep_raw_entry\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_set_keep_raw_entry\n" );
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
dp->keep_raw_entry = keep;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_set_keep_raw_entry\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_set_keep_raw_entry\n" );
}
int windows_private_get_keep_raw_entry(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_get_keep_raw_entry\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_get_keep_raw_entry\n" );
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_get_keep_raw_entry\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_get_keep_raw_entry\n" );
return dp->keep_raw_entry;
}
@@ -1477,12 +1477,12 @@ void *windows_private_get_api_cookie(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_get_api_cookie\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_get_api_cookie\n" );
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_get_api_cookie\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_get_api_cookie\n" );
return dp->api_cookie;
}
@@ -1491,13 +1491,13 @@ void windows_private_set_api_cookie(Repl_Agmt *ra, void
*api_cookie)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_set_api_cookie\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_set_api_cookie\n" );
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
dp->api_cookie = api_cookie;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_set_api_cookie\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_set_api_cookie\n" );
}
time_t
@@ -1505,14 +1505,14 @@ windows_private_get_sync_interval(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_get_sync_interval\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_get_sync_interval\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_get_sync_interval\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_get_sync_interval\n" );
return dp->sync_interval;
}
@@ -1523,7 +1523,7 @@ windows_private_set_sync_interval(Repl_Agmt *ra, char *str)
Dirsync_Private *dp;
time_t tmpval = 0;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_set_sync_interval\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_set_sync_interval\n" );
PR_ASSERT(ra);
@@ -1534,7 +1534,7 @@ windows_private_set_sync_interval(Repl_Agmt *ra, char *str)
dp->sync_interval = tmpval;
}
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_set_sync_interval\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_set_sync_interval\n" );
}
int
@@ -1542,14 +1542,14 @@ windows_private_get_move_action(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_get_move_action\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_get_move_action\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_get_move_action\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_get_move_action\n" );
return dp->move_action;
}
@@ -1559,7 +1559,7 @@ windows_private_set_move_action(const Repl_Agmt *ra, int value)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_set_move_action\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=>
windows_private_set_move_action\n" );
PR_ASSERT(ra);
@@ -1567,7 +1567,7 @@ windows_private_set_move_action(const Repl_Agmt *ra, int value)
PR_ASSERT (dp);
dp->move_action = value;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_private_set_move_action\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<=
windows_private_set_move_action\n" );
}
static PRCallOnceType winsync_callOnce = {0,0,0};
@@ -1690,7 +1690,7 @@ windows_plugin_callonce(void)
void ***theapis = NULL;
if (slapi_apib_get_interface_all(guid, &theapis) || (NULL == theapis)) {
- LDAPDebug1Arg(LDAP_DEBUG_PLUGIN,
+ LDAPDebug1Arg(LDAP_DEBUG_PLUGIN, LOG_DEBUG,
"<-- windows_plugin_callonce -- no more windows plugin
APIs registered "
"for GUID [%s] -- end\n",
guid);
@@ -1756,11 +1756,11 @@ windows_plugin_init(Repl_Agmt *ra)
struct winsync_plugin_cookie *list = NULL;
void *cookie = NULL;
- LDAPDebug0Args( LDAP_DEBUG_PLUGIN, "--> windows_plugin_init_start --
begin\n");
+ LDAPDebug0Args( LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> windows_plugin_init_start
-- begin\n");
if (PR_CallOnce(&winsync_callOnce, windows_plugin_callonce)) {
PRErrorCode prerr = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, "windows_plugin_init",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "windows_plugin_init",
"cannot initialize plugin: %d:%s\n", prerr,
slapi_pr_strerror(prerr));
return;
@@ -1780,7 +1780,7 @@ windows_plugin_init(Repl_Agmt *ra)
windows_private_set_api_cookie(ra, list);
- LDAPDebug0Args( LDAP_DEBUG_PLUGIN, "<-- windows_plugin_init_start --
end\n");
+ LDAPDebug0Args( LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- windows_plugin_init_start
-- end\n");
return;
}
@@ -2176,12 +2176,12 @@ static char *test_winsync_plugin_name =
"test_winsync_api";
static void *
test_winsync_api_init(const Slapi_DN *ds_subtree, const Slapi_DN *ad_subtree)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_init [%s] [%s] -- begin\n",
slapi_sdn_get_dn(ds_subtree),
slapi_sdn_get_dn(ad_subtree));
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_init -- end\n");
return NULL;
@@ -2192,10 +2192,10 @@ test_winsync_dirsync_search_params_cb(void *cbdata, const char
*agmt_dn,
char **base, int *scope, char **filter,
char ***attrs, LDAPControl ***serverctrls)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_dirsync_search_params_cb --
begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_dirsync_search_params_cb -- end\n");
return;
@@ -2207,10 +2207,10 @@ test_winsync_pre_ad_search_cb(void *cbdata, const char *agmt_dn,
char **base, int *scope, char **filter,
char ***attrs, LDAPControl ***serverctrls)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_pre_ad_search_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_pre_ad_search_cb -- end\n");
return;
@@ -2222,10 +2222,10 @@ test_winsync_pre_ds_search_entry_cb(void *cbdata, const char
*agmt_dn,
char **base, int *scope, char **filter,
char ***attrs, LDAPControl ***serverctrls)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_pre_ds_search_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_pre_ds_search_cb -- end\n");
return;
@@ -2237,7 +2237,7 @@ test_winsync_pre_ds_search_all_cb(void *cbdata, const char
*agmt_dn,
char **base, int *scope, char **filter,
char ***attrs, LDAPControl ***serverctrls)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_pre_ds_search_all_cb -- orig filter [%s] --
begin\n",
((filter && *filter) ? *filter : "NULL"));
@@ -2249,13 +2249,13 @@ test_winsync_pre_ds_search_all_cb(void *cbdata, const char
*agmt_dn,
synced with AD already - ntUniqueId and ntUserDomainId are
indexed for equality only - need to add presence? */
*filter =
slapi_ch_strdup("(&(objectclass=ntuser)(ntUserDomainId=*))");
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_pre_ds_search_all_cb -- new filter
[%s]\n",
*filter ? *filter : "NULL"));
}
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_pre_ds_search_all_cb -- end\n");
return;
@@ -2266,10 +2266,10 @@ test_winsync_pre_ad_mod_user_cb(void *cbdata, const Slapi_Entry
*rawentry,
Slapi_Entry *ad_entry, Slapi_Entry *ds_entry,
Slapi_Mods *smods, int *do_modify)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_pre_ad_mod_user_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_pre_ad_mod_user_cb -- end\n");
return;
@@ -2280,10 +2280,10 @@ test_winsync_pre_ad_mod_group_cb(void *cbdata, const Slapi_Entry
*rawentry,
Slapi_Entry *ad_entry, Slapi_Entry *ds_entry,
Slapi_Mods *smods, int *do_modify)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_pre_ad_mod_group_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_pre_ad_mod_group_cb -- end\n");
return;
@@ -2294,10 +2294,10 @@ test_winsync_pre_ds_mod_user_cb(void *cbdata, const Slapi_Entry
*rawentry,
Slapi_Entry *ad_entry, Slapi_Entry *ds_entry,
Slapi_Mods *smods, int *do_modify)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_pre_ds_mod_user_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_pre_ds_mod_user_cb -- end\n");
return;
@@ -2308,10 +2308,10 @@ test_winsync_pre_ds_mod_group_cb(void *cbdata, const Slapi_Entry
*rawentry,
Slapi_Entry *ad_entry, Slapi_Entry *ds_entry,
Slapi_Mods *smods, int *do_modify)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_pre_ds_mod_group_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_pre_ds_mod_group_cb -- end\n");
return;
@@ -2321,10 +2321,10 @@ static void
test_winsync_pre_ds_add_user_cb(void *cbdata, const Slapi_Entry *rawentry,
Slapi_Entry *ad_entry, Slapi_Entry *ds_entry)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_pre_ds_add_user_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_pre_ds_add_user_cb -- end\n");
return;
@@ -2334,10 +2334,10 @@ static void
test_winsync_pre_ds_add_group_cb(void *cbdata, const Slapi_Entry *rawentry,
Slapi_Entry *ad_entry, Slapi_Entry *ds_entry)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_pre_ds_add_group_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_pre_ds_add_group_cb -- end\n");
return;
@@ -2348,7 +2348,7 @@ test_winsync_get_new_ds_user_dn_cb(void *cbdata, const Slapi_Entry
*rawentry,
Slapi_Entry *ad_entry, char **new_dn_string,
const Slapi_DN *ds_suffix, const Slapi_DN *ad_suffix)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_get_new_ds_user_dn_cb -- old dn [%s] --
begin\n",
*new_dn_string);
@@ -2364,7 +2364,7 @@ test_winsync_get_new_ds_user_dn_cb(void *cbdata, const Slapi_Entry
*rawentry,
slapi_ldap_value_free(rdns);
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_get_new_ds_user_dn_cb -- new dn [%s] --
end\n",
*new_dn_string);
@@ -2376,10 +2376,10 @@ test_winsync_get_new_ds_group_dn_cb(void *cbdata, const
Slapi_Entry *rawentry,
Slapi_Entry *ad_entry, char **new_dn_string,
const Slapi_DN *ds_suffix, const Slapi_DN *ad_suffix)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_get_new_ds_group_dn_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_get_new_ds_group_dn_cb -- end\n");
return;
@@ -2391,10 +2391,10 @@ test_winsync_pre_ad_mod_user_mods_cb(void *cbdata, const
Slapi_Entry *rawentry,
const Slapi_DN *local_dn, LDAPMod * const
*origmods,
Slapi_DN *remote_dn, LDAPMod ***modstosend)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_pre_ad_mod_user_mods_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_pre_ad_mod_user_mods_cb -- end\n");
return;
@@ -2406,10 +2406,10 @@ test_winsync_pre_ad_mod_group_mods_cb(void *cbdata, const
Slapi_Entry *rawentry,
const Slapi_DN *local_dn, LDAPMod * const
*origmods,
Slapi_DN *remote_dn, LDAPMod ***modstosend)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_pre_ad_mod_group_mods_cb --
begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_pre_ad_mod_group_mods_cb -- end\n");
return;
@@ -2419,10 +2419,10 @@ static int
test_winsync_can_add_entry_to_ad_cb(void *cbdata, const Slapi_Entry *local_entry,
const Slapi_DN *remote_dn)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_can_add_entry_to_ad_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_can_add_entry_to_ad_cb -- end\n");
/* return 0;*/ /* false - do not allow entries to be added to ad */
@@ -2433,10 +2433,10 @@ static void
test_winsync_begin_update_cb(void *cbdata, const Slapi_DN *ds_subtree,
const Slapi_DN *ad_subtree, int is_total)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_begin_update_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_begin_update_cb -- end\n");
return;
@@ -2446,10 +2446,10 @@ static void
test_winsync_end_update_cb(void *cbdata, const Slapi_DN *ds_subtree,
const Slapi_DN *ad_subtree, int is_total)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_end_update_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_end_update_cb -- end\n");
return;
@@ -2459,12 +2459,12 @@ static void
test_winsync_destroy_agmt_cb(void *cbdata, const Slapi_DN *ds_subtree,
const Slapi_DN *ad_subtree)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_destroy_agmt_cb -- begin\n");
/* free(cbdata); */
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_destroy_agmt_cb -- end\n");
return;
@@ -2473,16 +2473,16 @@ test_winsync_destroy_agmt_cb(void *cbdata, const Slapi_DN
*ds_subtree,
static void
test_winsync_post_ad_mod_user_cb(void *cookie, const Slapi_Entry *rawentry, Slapi_Entry
*ad_entry, Slapi_Entry *ds_entry, Slapi_Mods *smods, int *result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_post_ad_mod_user_cb -- begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"Result of modifying AD entry [%s] was [%d:%s]\n",
slapi_entry_get_dn(ad_entry), *result, ldap_err2string(*result));
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_post_ad_mod_user_cb -- end\n");
return;
@@ -2491,16 +2491,16 @@ test_winsync_post_ad_mod_user_cb(void *cookie, const Slapi_Entry
*rawentry, Slap
static void
test_winsync_post_ad_mod_group_cb(void *cookie, const Slapi_Entry *rawentry, Slapi_Entry
*ad_entry, Slapi_Entry *ds_entry, Slapi_Mods *smods, int *result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_post_ad_mod_group_cb -- begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"Result of modifying AD entry [%s] was [%d:%s]\n",
slapi_entry_get_dn(ad_entry), *result, ldap_err2string(*result));
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_post_ad_mod_group_cb -- end\n");
return;
@@ -2509,16 +2509,16 @@ test_winsync_post_ad_mod_group_cb(void *cookie, const Slapi_Entry
*rawentry, Sla
static void
test_winsync_post_ds_mod_user_cb(void *cookie, const Slapi_Entry *rawentry, Slapi_Entry
*ad_entry, Slapi_Entry *ds_entry, Slapi_Mods *smods, int *result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_post_ds_mod_user_cb -- begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"Result of modifying DS entry [%s] was [%d:%s]\n",
slapi_entry_get_dn(ds_entry), *result, ldap_err2string(*result));
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_post_ds_mod_user_cb -- end\n");
return;
@@ -2527,16 +2527,16 @@ test_winsync_post_ds_mod_user_cb(void *cookie, const Slapi_Entry
*rawentry, Slap
static void
test_winsync_post_ds_mod_group_cb(void *cookie, const Slapi_Entry *rawentry, Slapi_Entry
*ad_entry, Slapi_Entry *ds_entry, Slapi_Mods *smods, int *result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_post_ds_mod_group_cb -- begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"Result of modifying DS entry [%s] was [%d:%s]\n",
slapi_entry_get_dn(ds_entry), *result, ldap_err2string(*result));
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_post_ds_mod_group_cb -- end\n");
return;
@@ -2545,16 +2545,16 @@ test_winsync_post_ds_mod_group_cb(void *cookie, const Slapi_Entry
*rawentry, Sla
static void
test_winsync_post_ds_add_user_cb(void *cookie, const Slapi_Entry *rawentry, Slapi_Entry
*ad_entry, Slapi_Entry *ds_entry, int *result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_post_ds_add_user_cb -- begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"Result of adding DS entry [%s] was [%d:%s]\n",
slapi_entry_get_dn(ds_entry), *result, ldap_err2string(*result));
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_post_ds_add_user_cb -- end\n");
return;
@@ -2563,16 +2563,16 @@ test_winsync_post_ds_add_user_cb(void *cookie, const Slapi_Entry
*rawentry, Slap
static void
test_winsync_post_ds_add_group_cb(void *cookie, const Slapi_Entry *rawentry, Slapi_Entry
*ad_entry, Slapi_Entry *ds_entry, int *result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_post_ds_add_group_cb -- begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"Result of adding DS entry [%s] was [%d:%s]\n",
slapi_entry_get_dn(ds_entry), *result, ldap_err2string(*result));
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_post_ds_add_group_cb -- end\n");
return;
@@ -2581,17 +2581,17 @@ test_winsync_post_ds_add_group_cb(void *cookie, const Slapi_Entry
*rawentry, Sla
static void
test_winsync_pre_ad_add_user_cb(void *cookie, Slapi_Entry *ds_entry, Slapi_Entry
*ad_entry)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_pre_ad_add_user_cb -- begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"Adding AD entry [%s] from add of DS entry [%s]\n",
slapi_entry_get_dn(ad_entry), slapi_entry_get_dn(ds_entry));
/* make modifications to ad_entry here */
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_pre_ad_add_user_cb -- end\n");
return;
@@ -2600,17 +2600,17 @@ test_winsync_pre_ad_add_user_cb(void *cookie, Slapi_Entry
*ds_entry, Slapi_Entry
static void
test_winsync_pre_ad_add_group_cb(void *cookie, Slapi_Entry *ds_entry, Slapi_Entry
*ad_entry)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_pre_ad_add_group_cb -- begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"Adding AD entry [%s] from add of DS entry [%s]\n",
slapi_entry_get_dn(ad_entry), slapi_entry_get_dn(ds_entry));
/* make modifications to ad_entry here */
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_pre_ad_add_group_cb -- end\n");
return;
@@ -2619,16 +2619,16 @@ test_winsync_pre_ad_add_group_cb(void *cookie, Slapi_Entry
*ds_entry, Slapi_Entr
static void
test_winsync_post_ad_add_user_cb(void *cookie, Slapi_Entry *ds_entry, Slapi_Entry
*ad_entry, int *result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_post_ad_add_user_cb -- begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"Result of adding AD entry [%s] was [%d:%s]\n",
slapi_entry_get_dn(ad_entry), *result, ldap_err2string(*result));
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_post_ad_add_user_cb -- end\n");
return;
@@ -2637,16 +2637,16 @@ test_winsync_post_ad_add_user_cb(void *cookie, Slapi_Entry
*ds_entry, Slapi_Entr
static void
test_winsync_post_ad_add_group_cb(void *cookie, Slapi_Entry *ds_entry, Slapi_Entry
*ad_entry, int *result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_post_ad_add_group_cb -- begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"Result of adding AD entry [%s] was [%d:%s]\n",
slapi_entry_get_dn(ad_entry), *result, ldap_err2string(*result));
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_post_ad_add_group_cb -- end\n");
return;
@@ -2655,16 +2655,16 @@ test_winsync_post_ad_add_group_cb(void *cookie, Slapi_Entry
*ds_entry, Slapi_Ent
static void
test_winsync_post_ad_mod_user_mods_cb(void *cookie, const Slapi_Entry *rawentry, const
Slapi_DN *local_dn, const Slapi_Entry *ds_entry, LDAPMod * const *origmods, Slapi_DN
*remote_dn, LDAPMod ***modstosend, int *result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_post_ad_mod_user_mods_cb --
begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"Result of modifying AD entry [%s] was [%d:%s]\n",
slapi_sdn_get_dn(remote_dn), *result, ldap_err2string(*result));
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_post_ad_mod_user_mods_cb -- end\n");
return;
@@ -2673,16 +2673,16 @@ test_winsync_post_ad_mod_user_mods_cb(void *cookie, const
Slapi_Entry *rawentry,
static void
test_winsync_post_ad_mod_group_mods_cb(void *cookie, const Slapi_Entry *rawentry, const
Slapi_DN *local_dn, const Slapi_Entry *ds_entry, LDAPMod * const *origmods, Slapi_DN
*remote_dn, LDAPMod ***modstosend, int *result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_post_ad_mod_group_mods_cb --
begin\n");
#ifdef THIS_IS_JUST_AN_EXAMPLE
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"Result of modifying AD entry [%s] was [%d:%s]\n",
slapi_sdn_get_dn(remote_dn), *result, ldap_err2string(*result));
#endif
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_post_ad_mod_group_mods_cb -- end\n");
return;
@@ -2807,16 +2807,16 @@ static void *test_winsync_api_v3[] = {
static int
test_winsync_plugin_start(Slapi_PBlock *pb)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_plugin_start -- begin\n");
if( slapi_apib_register(WINSYNC_v3_0_GUID, test_winsync_api_v3) ) {
- slapi_log_error( SLAPI_LOG_FATAL, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, test_winsync_plugin_name,
"<-- test_winsync_plugin_start -- failed to register
winsync api -- end\n");
return -1;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_plugin_start -- end\n");
return 0;
}
@@ -2824,12 +2824,12 @@ test_winsync_plugin_start(Slapi_PBlock *pb)
static int
test_winsync_plugin_close(Slapi_PBlock *pb)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_plugin_close -- begin\n");
slapi_apib_unregister(WINSYNC_v3_0_GUID);
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_plugin_close -- end\n");
return 0;
}
@@ -2839,7 +2839,7 @@ test_winsync_plugin_close(Slapi_PBlock *pb)
*/
int test_winsync_plugin_init(Slapi_PBlock *pb)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"--> test_winsync_plugin_init -- begin\n");
if ( slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
@@ -2851,7 +2851,7 @@ int test_winsync_plugin_init(Slapi_PBlock *pb)
slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION,
(void *)&test_winsync_pdesc ) != 0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, test_winsync_plugin_name,
"<-- test_winsync_plugin_init -- failed to register
plugin -- end\n");
return -1;
}
@@ -2859,12 +2859,12 @@ int test_winsync_plugin_init(Slapi_PBlock *pb)
/* Retrieve and save the plugin identity to later pass to
internal operations */
if (slapi_pblock_get(pb, SLAPI_PLUGIN_IDENTITY, &test_winsync_plugin_id) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, test_winsync_plugin_name,
"<-- test_winsync_plugin_init -- failed to retrieve
plugin identity -- end\n");
return -1;
}
- slapi_log_error( SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
"<-- test_winsync_plugin_init -- end\n");
return 0;
}
diff --git a/ldap/servers/plugins/replication/windows_protocol_util.c
b/ldap/servers/plugins/replication/windows_protocol_util.c
index 2f8c2e7..b386074 100644
--- a/ldap/servers/plugins/replication/windows_protocol_util.c
+++ b/ldap/servers/plugins/replication/windows_protocol_util.c
@@ -364,7 +364,7 @@ windows_dump_entry(const char *string, Slapi_Entry *e)
if (slapi_is_loglevel_set(SLAPI_LOG_REPL))
{
buffer = slapi_entry2str(e,&length);
- slapi_log_error(SLAPI_LOG_REPL, NULL, "Windows sync entry: %s %s\n", string,
buffer);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "Windows sync entry: %s
%s\n", string, buffer);
if (buffer)
{
slapi_ch_free_string(&buffer);
@@ -381,7 +381,7 @@ map_dn_values(Private_Repl_Protocol *prp,Slapi_ValueSet
*original_values, Slapi_
int i = 0;
if (NULL == mapped_values) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_dn_values: arg mapped_values is NULL.\n",
agmt_get_long_name(prp->agmt));
return;
@@ -404,12 +404,12 @@ map_dn_values(Private_Repl_Protocol *prp,Slapi_ValueSet
*original_values, Slapi_
/* Sanity check the data was a valid string */
original_dn_string_length = slapi_value_get_length(original_value);
if (0 == original_dn_string_length) {
- slapi_log_error(SLAPI_LOG_REPL, NULL, "map_dn_values: length of dn is
0\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "map_dn_values: length of dn is
0\n");
}
/* Make a sdn from the string */
original_dn = slapi_sdn_new_dn_byref(original_dn_string);
if (!original_dn) {
- slapi_log_error(SLAPI_LOG_REPL, NULL, "map_dn_values: unable to create Slapi_DN
from %s.\n", original_dn_string);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "map_dn_values: unable to create
Slapi_DN from %s.\n", original_dn_string);
return;
}
@@ -443,14 +443,14 @@ map_dn_values(Private_Repl_Protocol *prp,Slapi_ValueSet
*original_values, Slapi_
slapi_sdn_free(&remote_dn);
} else
{
- slapi_log_error(SLAPI_LOG_REPL, NULL, "map_dn_values: no remote dn found for
%s\n", original_dn_string);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "map_dn_values: no remote dn
found for %s\n", original_dn_string);
}
} else
{
- slapi_log_error(SLAPI_LOG_REPL, NULL, "map_dn_values: this entry is not ours
%s\n", original_dn_string);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "map_dn_values: this entry is
not ours %s\n", original_dn_string);
}
} else {
- slapi_log_error(SLAPI_LOG_REPL, NULL, "map_dn_values: no local entry found for
%s\n", original_dn_string);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "map_dn_values: no local entry
found for %s\n", original_dn_string);
}
if (local_entry)
{
@@ -481,15 +481,15 @@ map_dn_values(Private_Repl_Protocol *prp,Slapi_ValueSet
*original_values, Slapi_
slapi_sdn_free(&local_dn);
} else
{
- slapi_log_error(SLAPI_LOG_REPL, NULL, "map_dn_values: no local dn found for
%s\n", original_dn_string);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "map_dn_values: no local dn
found for %s\n", original_dn_string);
}
} else
{
- slapi_log_error(SLAPI_LOG_REPL, NULL, "map_dn_values: this entry is not ours
%s\n", original_dn_string);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "map_dn_values: this entry is
not ours %s\n", original_dn_string);
}
} else
{
- slapi_log_error(SLAPI_LOG_REPL, NULL, "map_dn_values: no remote entry found for
%s\n", original_dn_string);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "map_dn_values: no remote entry
found for %s\n", original_dn_string);
}
if (remote_entry)
{
@@ -527,7 +527,7 @@ windows_dump_ruvs(Object *supl_ruv_obj, Object *cons_ruv_obj)
{
if (slapi_is_loglevel_set(SLAPI_LOG_REPL))
{
- slapi_log_error(SLAPI_LOG_REPL, NULL, "acquire_replica, supplier RUV:\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "acquire_replica, supplier
RUV:\n");
if (supl_ruv_obj) {
RUV* sup = NULL;
object_acquire(supl_ruv_obj);
@@ -536,9 +536,9 @@ windows_dump_ruvs(Object *supl_ruv_obj, Object *cons_ruv_obj)
object_release(supl_ruv_obj);
} else
{
- slapi_log_error(SLAPI_LOG_REPL, NULL, "acquire_replica, supplier RUV =
null\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "acquire_replica, supplier RUV =
null\n");
}
- slapi_log_error(SLAPI_LOG_REPL, NULL, "acquire_replica, consumer RUV:\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "acquire_replica, consumer
RUV:\n");
if (cons_ruv_obj)
{
@@ -548,7 +548,7 @@ windows_dump_ruvs(Object *supl_ruv_obj, Object *cons_ruv_obj)
ruv_dump (con,"consumer", NULL);
object_release( cons_ruv_obj );
} else {
- slapi_log_error(SLAPI_LOG_REPL, NULL, "acquire_replica, consumer RUV =
null\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "acquire_replica, consumer RUV =
null\n");
}
}
}
@@ -585,7 +585,7 @@ windows_acquire_replica(Private_Repl_Protocol *prp, RUV **ruv, int
check_ruv)
if (NULL == ruv)
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name, "NULL
ruv\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name, "NULL
ruv\n");
return_value = ACQUIRE_FATAL_ERROR;
goto done;
}
@@ -594,7 +594,7 @@ windows_acquire_replica(Private_Repl_Protocol *prp, RUV **ruv, int
check_ruv)
if (prp->replica_acquired) /* we already acquire replica */
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Remote replica already acquired\n",
agmt_get_long_name(prp->agmt));
LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_acquire_replica\n", 0,
0, 0 );
@@ -615,7 +615,7 @@ windows_acquire_replica(Private_Repl_Protocol *prp, RUV **ruv, int
check_ruv)
is_newer = ruv_is_newer ( supl_ruv_obj, cons_ruv_obj );
if (is_newer)
{
- slapi_log_error(SLAPI_LOG_REPL, NULL, "acquire_replica, supplier RUV is
newer\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "acquire_replica, supplier RUV is
newer\n");
}
/* Handle the pristine case */
@@ -682,7 +682,7 @@ windows_acquire_replica(Private_Repl_Protocol *prp, RUV **ruv, int
check_ruv)
else
{
/* Couldn't get a current CSN */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: Unable to obtain current CSN. "
"Replication is aborting.\n",
agmt_get_long_name(prp->agmt));
@@ -799,7 +799,7 @@ send_password_modify(Slapi_DN *sdn,
continue;
}
if (0 == strcmp(s, "0")) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: AD entry %s set \"user must change password at next
logon\". ",
agmt_get_long_name(prp->agmt),
slapi_entry_get_dn(remote_entry));
force_reset_pw = 1;
@@ -873,7 +873,7 @@ send_password_modify(Slapi_DN *sdn,
PR_smprintf_free(quoted_password);
}
} else {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: AD already has the current password for %s. "
"Not sending password modify to AD.\n",
agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(sdn));
@@ -906,7 +906,7 @@ send_accountcontrol_modify(Slapi_DN *sdn, Private_Repl_Protocol *prp,
int missin
/* if we are adding a new entry, we need to set the entry to be
enabled to allow AD login */
if (missing_entry) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: New Windows entry %s will be enabled.\n",
agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(sdn));
acctval &= ~0x2; /* unset the disabled bit, if set */
@@ -1075,7 +1075,7 @@ windows_log_add_entry_remote(const Slapi_DN *local_dn,const Slapi_DN
*remote_dn)
{
const char* local_dn_string = slapi_sdn_get_dn(local_dn);
const char* remote_dn_string = slapi_sdn_get_dn(remote_dn);
- slapi_log_error(SLAPI_LOG_REPL, NULL, "Attempting to add entry %s to AD for local
entry %s\n",remote_dn_string,local_dn_string);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "Attempting to add entry %s to AD
for local entry %s\n",remote_dn_string,local_dn_string);
}
/*
@@ -1132,7 +1132,7 @@ process_replay_add(Private_Repl_Protocol *prp, Slapi_Entry
*add_entry, Slapi_Ent
ConnResult return_value = 0;
int rc = 0;
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_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");
@@ -1147,7 +1147,7 @@ process_replay_add(Private_Repl_Protocol *prp, Slapi_Entry
*add_entry, Slapi_Ent
char *cn_string = NULL;
Slapi_DN *tombstone_dn = NULL;
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_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));
@@ -1198,13 +1198,13 @@ process_replay_add(Private_Repl_Protocol *prp, Slapi_Entry
*add_entry, Slapi_Ent
* 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, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_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, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_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),
@@ -1259,7 +1259,7 @@ process_replay_add(Private_Repl_Protocol *prp, Slapi_Entry
*add_entry, Slapi_Ent
mapped_entry = NULL;
if (NULL == entryattrs)
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: windows_replay_add: Cannot convert entry to LDAPMods.\n",
agmt_get_long_name(prp->agmt));
return_value = CONN_LOCAL_ERROR;
@@ -1299,7 +1299,7 @@ process_replay_add(Private_Repl_Protocol *prp, Slapi_Entry
*add_entry, Slapi_Ent
* 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,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: windows_replay_add: Cannot replay add operation.\n",
agmt_get_long_name(prp->agmt));
}
@@ -1308,7 +1308,7 @@ process_replay_add(Private_Repl_Protocol *prp, Slapi_Entry
*add_entry, Slapi_Ent
}
} else
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_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));
}
@@ -1366,7 +1366,7 @@ process_replay_rename(Private_Repl_Protocol *prp,
const subtreePair* sp = NULL;
if (NULL == local_origsdn || NULL == local_newentry) {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"process_replay_rename: %s is empty\n",
(NULL==local_origsdn)?"local sdn":"local entry");
goto bail;
@@ -1383,7 +1383,7 @@ process_replay_rename(Private_Repl_Protocol *prp,
if ((NULL == remote_subtree || NULL == local_subtree ||
'\0' == *remote_subtree || '\0' == *local_subtree) &&
(NULL == subtree_pairs)) {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"process_replay_rename: local subtree \"%s\" or "
"remote subtree \"%s\" and "
"subtree_pairs are empty\n",
@@ -1412,7 +1412,7 @@ process_replay_rename(Private_Repl_Protocol *prp,
p = strstr(norm_newparent, local_subtree);
}
if (NULL == p) {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"process_replay_rename: new superior \"%s\" is not "
"in the local subtree \"%s\"\n",
norm_newparent, local_subtree);
@@ -1440,7 +1440,7 @@ process_replay_rename(Private_Repl_Protocol *prp,
* is taken care in modify not in modrdn locally. */
remote_rdn_val = slapi_entry_attr_get_charptr(local_newentry, "cn");
if (NULL == remote_rdn_val) {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"process_replay_rename: local entry \"%s\" has no "
"ntUserDomainId\n",
slapi_entry_get_dn_const(local_newentry));
@@ -1499,7 +1499,7 @@ process_replay_rename(Private_Repl_Protocol *prp,
* additional info: 00000057: LdapErr: DSID-0C090AAB,
* comment: Old RDN must be deleted, data 0, v1db1
*/
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_replay_rename: renaming %s to %s,%s; "
"set deleteoldrdn to 1 "
"since AD does not allow old RDN left\n",
@@ -1569,7 +1569,7 @@ windows_replay_update(Private_Repl_Protocol *prp,
slapi_operation_parameters *op
rc = windows_get_local_entry_by_uniqueid(prp,
op->target_address.uniqueid, &local_entry, 1 /* is_global */);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: windows_replay_update: failed to fetch local entry "
"for %s operation dn=\"%s\"\n",
agmt_get_long_name(prp->agmt),
@@ -1583,13 +1583,13 @@ windows_replay_update(Private_Repl_Protocol *prp,
slapi_operation_parameters *op
/* We only searched within the subtree in the agreement, so we should not print
* an error if we didn't find the entry and the DN is outside of the agreement
scope. */
if (is_dn_subject_of_agreement_local(local_dn, prp->agmt)) {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: windows_replay_update: failed to fetch local entry for %s operation
dn=\"%s\"\n",
agmt_get_long_name(prp->agmt),
op2string(op->operation_type),
REPL_GET_DN(&op->target_address));
} else {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_replay_update: Looking at %s operation local dn=\"%s\"
(%s)\n",
agmt_get_long_name(prp->agmt),
op2string(op->operation_type),
@@ -1608,7 +1608,7 @@ windows_replay_update(Private_Repl_Protocol *prp,
slapi_operation_parameters *op
}
windows_is_local_entry_user_or_group(local_entry,&is_user,&is_group);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_replay_update: Looking at %s operation local dn=\"%s\"
(%s,%s,%s)\n",
agmt_get_long_name(prp->agmt),
op2string(op->operation_type),
@@ -1621,7 +1621,7 @@ windows_replay_update(Private_Repl_Protocol *prp,
slapi_operation_parameters *op
rc = map_entry_dn_outbound(local_entry,&remote_dn,prp,&missing_entry, 1,
&remote_entry);
if (rc || NULL == remote_dn)
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: windows_replay_update: failed map dn for %s operation dn=\"%s\"
"
"rc=%d remote_dn = [%s]\n",
agmt_get_long_name(prp->agmt),
@@ -1630,7 +1630,7 @@ windows_replay_update(Private_Repl_Protocol *prp,
slapi_operation_parameters *op
rc, remote_dn ? slapi_sdn_get_dn(remote_dn) : "(null)");
goto error;
}
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_replay_update: Processing %s operation local dn=\"%s\"
remote dn=\"%s\"\n",
agmt_get_long_name(prp->agmt),
op2string(op->operation_type),
@@ -1655,7 +1655,7 @@ windows_replay_update(Private_Repl_Protocol *prp,
slapi_operation_parameters *op
Slapi_Entry *ad_entry = NULL;
return_value =
process_replay_add(prp,local_entry,local_entry,local_dn,remote_dn,is_user,missing_entry,&password);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_replay_update: "
"The modify operation added the sync objectclass and attribute,
so "
"the entry was added to windows - result [%d]\n",
@@ -1698,7 +1698,7 @@ windows_replay_update(Private_Repl_Protocol *prp,
slapi_operation_parameters *op
* remote_dn is in GUID format. Thus, this MODRDN does not change the remote_dn but
the DN on AD only.
* Thus, no need to "rename" remote_dn for the following
windows_conn_send_modify.
*/
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "%s: renaming remote
entry \"%s\" with new RDN of \"%s\"\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name, "%s:
renaming remote entry \"%s\" with new RDN of \"%s\"\n",
agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(remote_dn),
newrdn);
return_value = windows_conn_send_rename(prp->conn, slapi_sdn_get_dn(remote_dn),
newrdn, NULL, 1 /* delete old RDN */,
@@ -1723,7 +1723,7 @@ windows_replay_update(Private_Repl_Protocol *prp,
slapi_operation_parameters *op
if (slapi_is_loglevel_set(SLAPI_LOG_REPL))
{
int i = 0;
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"dump mods for replay update:\n");
for(i=0;mapped_mods[i];i++)
{
@@ -1770,19 +1770,19 @@ bail_modify:
if (delete_remote_entry_allowed(local_entry))
{
if (missing_entry) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_replay_update: remote entry doesn't exist. "
"Skipping operation, dn=\"%s\"\n",
agmt_get_long_name(prp->agmt),
slapi_sdn_get_dn(remote_dn));
} else {
return_value = windows_conn_send_delete(prp->conn, slapi_sdn_get_dn(remote_dn),
NULL, NULL /* returned controls */);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_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);
}
} else
{
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_replay_update: delete not allowed on remote entry,
dn=\"%s\"\n",
agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(remote_dn));
}
@@ -1811,7 +1811,7 @@ bail_modify:
break;
}
default:
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name, "%s: replay_update:
Unknown "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name, "%s:
replay_update: Unknown "
"operation type %lu found in changelog - skipping change.\n",
agmt_get_long_name(prp->agmt), op->operation_type);
}
@@ -1838,7 +1838,7 @@ bail_modify:
if (return_value)
{
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_replay_update: update password returned %d\n",
agmt_get_long_name(prp->agmt), return_value );
}
@@ -2128,7 +2128,7 @@ windows_create_remote_entry(Private_Repl_Protocol *prp,Slapi_Entry
*original_ent
char *new_initials = PL_strndup(initials_value, AD_INITIALS_LENGTH);
/* the below hands off memory */
slapi_value_set_string_passin(value, new_initials);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_create_remote_entry: "
"Trimming initials attribute to %d characters.\n",
agmt_get_long_name(prp->agmt), AD_INITIALS_LENGTH);
@@ -2211,7 +2211,7 @@ windows_create_remote_entry(Private_Repl_Protocol *prp,Slapi_Entry
*original_ent
if (LDAP_INVALID_CREDENTIALS == rc) {
/* This password is stored in a non-cleartext format.
* We can only sync cleartext passwords. */
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_create_remote_entry: "
"Password is already hashed. Not syncing.\n",
agmt_get_long_name(prp->agmt));
@@ -2219,7 +2219,7 @@ windows_create_remote_entry(Private_Repl_Protocol *prp,Slapi_Entry
*original_ent
}
if ((rc && (LDAP_INVALID_CREDENTIALS != rc)) ||
(NULL == password_value)) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_create_remote_entry: "
"Failed to retrieve clear text password. "
"Not syncing.\n",
@@ -2245,7 +2245,7 @@ windows_create_remote_entry(Private_Repl_Protocol *prp,Slapi_Entry
*original_ent
if (LDAP_INVALID_CREDENTIALS == rc) {
/* This password is stored in a non-cleartext format.
* We can only sync cleartext passwords. */
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_create_remote_entry: "
"Password is already hashed. Not syncing.\n",
agmt_get_long_name(prp->agmt));
@@ -2253,7 +2253,7 @@ windows_create_remote_entry(Private_Repl_Protocol *prp,Slapi_Entry
*original_ent
slapi_ch_free_string(&password_value);
}
if ((rc && (LDAP_INVALID_CREDENTIALS != rc)) || (NULL == *password)) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_create_remote_entry: "
"Failed to retrieve clear text password. "
"Not syncing.\n",
@@ -2335,7 +2335,7 @@ windows_delete_local_entry(Slapi_DN *sdn){
slapi_pblock_destroy(pb);
if (return_value) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"delete operation on local entry %s returned: %d\n", slapi_sdn_get_dn(sdn),
return_value);
}
LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_delete_local_entry:
%d\n", return_value, 0, 0 );
@@ -2363,7 +2363,7 @@ mod_already_made(Private_Repl_Protocol *prp, Slapi_Mod *smod,
Slapi_Entry *ad_en
const char *type = NULL;
if (!slapi_mod_isvalid(smod)) { /* bogus */
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: mod_already_made: "
"modify operation is null - skipping.\n",
agmt_get_long_name(prp->agmt));
@@ -2371,7 +2371,7 @@ mod_already_made(Private_Repl_Protocol *prp, Slapi_Mod *smod,
Slapi_Entry *ad_en
}
if (!ad_entry) { /* mods cannot already have been made */
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: mod_already_made: "
"AD entry not found\n",
agmt_get_long_name(prp->agmt));
@@ -2387,7 +2387,7 @@ mod_already_made(Private_Repl_Protocol *prp, Slapi_Mod *smod,
Slapi_Entry *ad_en
Slapi_Value *sv = slapi_value_new();
slapi_value_init_berval(sv, bv); /* copies bv_val */
if (slapi_entry_attr_has_syntax_value(ad_entry, type, sv)) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: mod_already_made: "
"remote entry attr [%s] already has value [%s] - will not send.\n",
agmt_get_long_name(prp->agmt), type,
@@ -2398,7 +2398,7 @@ mod_already_made(Private_Repl_Protocol *prp, Slapi_Mod *smod,
Slapi_Entry *ad_en
}
/* if all values were removed, no need to send the mod */
if (slapi_mod_get_num_values(smod) == 0) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: mod_already_made: "
"remote entry attr [%s] had all mod values removed - will not send.\n",
agmt_get_long_name(prp->agmt), type);
@@ -2409,7 +2409,7 @@ mod_already_made(Private_Repl_Protocol *prp, Slapi_Mod *smod,
Slapi_Entry *ad_en
/* if attribute does not exist, no need to send the delete */
if (slapi_entry_attr_find(ad_entry, type, &attr) || !attr) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: mod_already_made: "
"remote entry attr [%s] already deleted - will not send.\n",
agmt_get_long_name(prp->agmt), type);
@@ -2422,7 +2422,7 @@ mod_already_made(Private_Repl_Protocol *prp, Slapi_Mod *smod,
Slapi_Entry *ad_en
Slapi_Value *sv = slapi_value_new();
slapi_value_init_berval(sv, bv); /* copies bv_val */
if (!slapi_entry_attr_has_syntax_value(ad_entry, type, sv)) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: mod_already_made: "
"remote entry attr [%s] already deleted value [%s] - will not
send.\n",
agmt_get_long_name(prp->agmt), type,
@@ -2433,7 +2433,7 @@ mod_already_made(Private_Repl_Protocol *prp, Slapi_Mod *smod,
Slapi_Entry *ad_en
}
/* if all values were removed, no need to send the mod */
if (slapi_mod_get_num_values(smod) == 0) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: mod_already_made: "
"remote entry attr [%s] had all mod values removed - will not
send.\n",
agmt_get_long_name(prp->agmt), type);
@@ -2441,7 +2441,7 @@ mod_already_made(Private_Repl_Protocol *prp, Slapi_Mod *smod,
Slapi_Entry *ad_en
}
} /* else if no values specified, this means delete the attribute */
} else { /* allow this mod */
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: mod_already_made: "
"skipping mod op [%d]\n",
agmt_get_long_name(prp->agmt), op);
@@ -2489,7 +2489,7 @@ windows_get_superior_change(Private_Repl_Protocol *prp,
const subtreePair* lsp = NULL;
if (NULL == newsuperior) {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"windows_get_superior_change: newsuperior is NULL\n");
goto bail;
}
@@ -2508,7 +2508,7 @@ windows_get_superior_change(Private_Repl_Protocol *prp,
if ((NULL == remote_subtree || NULL == local_subtree ||
'\0' == *remote_subtree || '\0' == *local_subtree) &&
(NULL == subtree_pairs)) {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"windows_get_superior_change: local subtree \"%s\" or "
"remote subtree \"%s\" and "
"subtree_pairs are empty\n",
@@ -2520,7 +2520,7 @@ windows_get_superior_change(Private_Repl_Protocol *prp,
local_ndn = slapi_sdn_get_ndn(local_dn);
if (NULL == mapped_ndn || NULL == local_ndn ||
'\0' == *mapped_ndn || '\0' == *local_ndn) {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"windows_get_superior_change: local dn \"%s\" or "
"mapped dn \"%s\" is empty\n",
local_ndn?local_ndn:"empty", mapped_ndn?mapped_ndn:"empty");
@@ -2530,7 +2530,7 @@ windows_get_superior_change(Private_Repl_Protocol *prp,
local_pndn = slapi_dn_parent((const char *)local_ndn); /* strdup'ed */
if (NULL == mapped_pndn || NULL == local_pndn ||
'\0' == *mapped_pndn || '\0' == *local_pndn) {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"windows_get_superior_change: local parent dn \"%s\" or "
"remote parent dn \"%s\" is empty\n",
local_pndn?local_pndn:"empty",
@@ -2604,12 +2604,12 @@ windows_get_superior_change(Private_Repl_Protocol *prp,
rc = 0;
}
} else {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"windows_get_superior_change: local parent \"%s\" is not in "
"DirectoryReplicaSubtree \"%s\"\n", local_pndn, local_subtree);
}
} else {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"windows_get_superior_change: mapped parent \"%s\" is not in "
"DirectoryReplicaSubtree \"%s\"\n", mapped_pndn, local_subtree);
}
@@ -2873,7 +2873,7 @@ windows_map_mods_for_replay(Private_Repl_Protocol *prp,
if (mod->mod_bvalues[i]->bv_len > AD_INITIALS_LENGTH) {
mod->mod_bvalues[i]->bv_val[AD_INITIALS_LENGTH] = '\0';
mod->mod_bvalues[i]->bv_len = AD_INITIALS_LENGTH;
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_map_mods_for_replay: "
"Trimming initials attribute to %d characters.\n",
agmt_get_long_name(prp->agmt), AD_INITIALS_LENGTH);
@@ -3034,7 +3034,7 @@ windows_map_mods_for_replay(Private_Repl_Protocol *prp,
} else {
/* This password is stored in a non-cleartext format.
* We can only sync cleartext passwords. */
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_map_mods_for_replay: "
"Password is already hashed. Not syncing.\n",
agmt_get_long_name(prp->agmt));
@@ -3544,7 +3544,7 @@ map_windows_tombstone_dn(Slapi_Entry *e, Slapi_DN **dn,
Private_Repl_Protocol *p
/* Initialize the output values */
if ((NULL == dn) || (NULL == exists)) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_windows_tombstone_dn: arg dn or exists is NULL.\n",
agmt_get_long_name(prp->agmt));
return 1;
@@ -3586,7 +3586,7 @@ map_windows_tombstone_dn(Slapi_Entry *e, Slapi_DN **dn,
Private_Repl_Protocol *p
slapi_entry_free(tombstone);
}
} else {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_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));
@@ -3755,7 +3755,7 @@ map_entry_dn_outbound(Slapi_Entry *e,
Slapi_Entry *remote_entry = NULL;
if (NULL == e) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_outbound: NULL entry.\n",
agmt_get_long_name(prp->agmt));
return -1;
@@ -3771,7 +3771,7 @@ map_entry_dn_outbound(Slapi_Entry *e,
* check here. Note: for NT4 we always use ntUserDomainId for the samaccountname rdn,
never cn.
*/
if ((NULL == dn) || (NULL == missing_entry)) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_outbound: arg dn or missing_entry is
NULL.\n",
agmt_get_long_name(prp->agmt));
return -1;
@@ -3792,14 +3792,14 @@ map_entry_dn_outbound(Slapi_Entry *e,
suffix = slapi_sdn_get_dn(windows_private_get_windows_subtree(prp->agmt));
}
if (NULL == suffix) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_outbound: Failed to get the AD suffix of
%s.\n",
agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(local_sdn));
return -1;
}
guid = slapi_entry_attr_get_charptr(e,"ntUniqueId");
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_outbound: looking for AD entry for DS "
"dn=\"%s\" guid=\"%s\"\n",
agmt_get_long_name(prp->agmt),
@@ -3810,7 +3810,7 @@ map_entry_dn_outbound(Slapi_Entry *e,
int rc = 0;
new_dn = make_dn_from_guid(guid, is_nt4, suffix);
if (!new_dn) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_outbound: unable to make dn from guid %s.\n",
agmt_get_long_name(prp->agmt), guid);
retval = -1;
@@ -3821,7 +3821,7 @@ map_entry_dn_outbound(Slapi_Entry *e,
* 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);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_outbound: return code %d from search "
"for AD entry dn=\"%s\" or dn=\"%s\"\n",
agmt_get_long_name(prp->agmt), rc,
@@ -3836,7 +3836,7 @@ map_entry_dn_outbound(Slapi_Entry *e,
retval = -1;
}
} else {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_outbound: entry not found - rc %d\n",
agmt_get_long_name(prp->agmt), rc);
/* We need to re-write the DN to a non-GUID DN if we're syncing to a
@@ -3879,7 +3879,7 @@ map_entry_dn_outbound(Slapi_Entry *e,
} else {
/* No GUID found, try ntUserDomainId */
char *username = slapi_entry_attr_get_charptr(e,"ntUserDomainId");
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_outbound: looking for AD entry for DS "
"dn=\"%s\" username=\"%s\"\n",
agmt_get_long_name(prp->agmt),
@@ -3892,12 +3892,12 @@ map_entry_dn_outbound(Slapi_Entry *e,
/* Get the entry's DN */
new_dn = slapi_sdn_new();
slapi_sdn_copy(slapi_entry_get_sdn_const(remote_entry), new_dn);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_outbound: found AD entry dn=\"%s\"\n",
agmt_get_long_name(prp->agmt),
slapi_sdn_get_dn(new_dn));
} else {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_outbound: entry not found - rc %d\n",
agmt_get_long_name(prp->agmt), retval);
if (0 == retval)
@@ -3949,7 +3949,7 @@ map_entry_dn_outbound(Slapi_Entry *e,
} else
{
/* This means that we failed to talk to the AD for some reason, the operation should
be re-tried */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: map_entry_dn_outbound: failed to fetch entry from AD: dn=\"%s\",
err=%d\n",
agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(slapi_entry_get_sdn_const(e)),
retval);
@@ -3995,7 +3995,7 @@ map_tombstone_dn_inbound(Slapi_Entry *e, Slapi_DN **dn, const
Repl_Agmt *ra)
DEL:d4ca4e16-e35b-400d-834a-f02db600f3fa,CN=Deleted Objects,DC=magpie,DC=com
*/
if (NULL == dn) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_tombstone_dn_inbound: arg dn is NULL.\n",
agmt_get_long_name(ra));
return -1;
@@ -4071,7 +4071,7 @@ map_entry_dn_inbound_ext(Slapi_Entry *e, Slapi_DN **dn, const
Repl_Agmt *ra, int
char *container_str = NULL;
if (NULL == e) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_inbound: entry is NULL.\n",
agmt_get_long_name(ra));
return -1;
@@ -4081,7 +4081,7 @@ map_entry_dn_inbound_ext(Slapi_Entry *e, Slapi_DN **dn, const
Repl_Agmt *ra, int
* If we do not find it, then we need to generate the DN that it would have if added as
a new entry.
*/
if (NULL == dn) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_inbound: arg dn is NULL.\n",
agmt_get_long_name(ra));
return -1;
@@ -4090,7 +4090,7 @@ map_entry_dn_inbound_ext(Slapi_Entry *e, Slapi_DN **dn, const
Repl_Agmt *ra, int
windows_is_remote_entry_user_or_group(e,&is_user,&is_group);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_inbound: looking for local entry "
"matching AD entry [%s]\n",
agmt_get_long_name(ra),
@@ -4099,7 +4099,7 @@ map_entry_dn_inbound_ext(Slapi_Entry *e, Slapi_DN **dn, const
Repl_Agmt *ra, int
guid = extract_guid_from_entry(e, is_nt4);
if (guid)
{
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_inbound: looking for local entry "
"by guid [%s]\n",
agmt_get_long_name(ra),
@@ -4107,7 +4107,7 @@ map_entry_dn_inbound_ext(Slapi_Entry *e, Slapi_DN **dn, const
Repl_Agmt *ra, int
retval = find_entry_by_guid(guid,&matching_entry,ra);
if (retval)
{
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_inbound: problem looking for guid: %d\n",
agmt_get_long_name(ra), retval);
if (ENTRY_NOTFOUND == retval)
@@ -4126,7 +4126,7 @@ map_entry_dn_inbound_ext(Slapi_Entry *e, Slapi_DN **dn, const
Repl_Agmt *ra, int
{
/* We found the matching entry : get its DN */
new_dn = slapi_sdn_dup(slapi_entry_get_sdn_const(matching_entry));
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_inbound: found local entry [%s]\n",
agmt_get_long_name(ra),
slapi_sdn_get_dn(new_dn));
@@ -4134,7 +4134,7 @@ map_entry_dn_inbound_ext(Slapi_Entry *e, Slapi_DN **dn, const
Repl_Agmt *ra, int
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_inbound: AD entry has no guid!\n",
agmt_get_long_name(ra));
}
@@ -4146,7 +4146,7 @@ map_entry_dn_inbound_ext(Slapi_Entry *e, Slapi_DN **dn, const
Repl_Agmt *ra, int
username = extract_username_from_entry(e);
if (use_username) {
if (username) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_inbound: looking for local entry "
"by uid [%s]\n",
agmt_get_long_name(ra),
@@ -4154,7 +4154,7 @@ map_entry_dn_inbound_ext(Slapi_Entry *e, Slapi_DN **dn, const
Repl_Agmt *ra, int
retval = find_entry_by_username(username,&matching_entry,ra);
if (retval)
{
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_inbound: problem looking for username: %d\n",
agmt_get_long_name(ra), retval);
if (ENTRY_NOTFOUND == retval)
@@ -4173,7 +4173,7 @@ map_entry_dn_inbound_ext(Slapi_Entry *e, Slapi_DN **dn, const
Repl_Agmt *ra, int
{
/* We found the matching entry : get its DN */
new_dn = slapi_sdn_dup(slapi_entry_get_sdn_const(matching_entry));
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_inbound: found local entry by name [%s]\n",
agmt_get_long_name(ra),
slapi_sdn_get_dn(new_dn));
@@ -4181,7 +4181,7 @@ map_entry_dn_inbound_ext(Slapi_Entry *e, Slapi_DN **dn, const
Repl_Agmt *ra, int
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_inbound: AD entry has no username!\n",
agmt_get_long_name(ra));
}
@@ -4216,7 +4216,7 @@ map_entry_dn_inbound_ext(Slapi_Entry *e, Slapi_DN **dn, const
Repl_Agmt *ra, int
suffix = slapi_sdn_get_dn(windows_private_get_directory_subtree(ra));
}
if (NULL == suffix) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: map_entry_dn_inbound: Failed to retrieve local suffix from %s\n",
agmt_get_long_name(ra), slapi_sdn_get_dn(remote_sdn));
goto error;
@@ -4295,7 +4295,7 @@ is_subject_of_agreement_local(const Slapi_Entry *local_entry, const
Repl_Agmt *r
if (!local_entry) {
/* Error: couldn't find the entry */
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"failed to find entry in is_subject_of_agreement_local\n");
goto error;
}
@@ -4549,7 +4549,7 @@ windows_create_local_entry(Private_Repl_Protocol *prp,Slapi_Entry
*remote_entry,
slapi_entry_add_string(local_entry,"ntUniqueId",guid_str);
} else
{
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"extract_guid_from_entry entry %s failed to extract the guid\n",
slapi_sdn_get_dn(local_sdn));
/* Fatal error : need the guid */
goto error;
@@ -4592,7 +4592,7 @@ windows_create_local_entry(Private_Repl_Protocol *prp,Slapi_Entry
*remote_entry,
slapi_entry_free(post_entry);
if (retval) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"add operation of entry %s returned: %d\n", slapi_sdn_get_dn(local_sdn),
retval);
}
error:
@@ -4681,7 +4681,7 @@ windows_generate_update_mods(Private_Repl_Protocol *prp,
*do_modify = 0;
if (!remote_entry || !local_entry) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_generate_update_mods: remote_entry is [%s]
local_entry is [%s] "
"cannot generate update mods\n",
agmt_get_long_name(prp->agmt),
remote_entry ? slapi_entry_get_dn_const(remote_entry) :
"NULL",
@@ -4781,7 +4781,7 @@ windows_generate_update_mods(Private_Repl_Protocol *prp,
/* If it is then we need to replace the local values with the remote values if they
are different */
if (!values_equal)
{
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"windows_generate_update_mods: %s, %s : values are
different\n",
slapi_entry_get_dn_const(local_entry), local_type);
@@ -4823,7 +4823,7 @@ windows_generate_update_mods(Private_Repl_Protocol *prp,
char *new_initials = PL_strndup(initials_value, AD_INITIALS_LENGTH);
/* the below hands off memory */
slapi_value_set_string_passin(value, new_initials);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_generate_update_mods: "
"Trimming initials attribute to %d characters.\n",
agmt_get_long_name(prp->agmt), AD_INITIALS_LENGTH);
@@ -4838,7 +4838,7 @@ windows_generate_update_mods(Private_Repl_Protocol *prp,
*do_modify = 1;
} else
{
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"windows_generate_update_mods: %s, %s : values are
equal\n",
slapi_entry_get_dn_const(local_entry), local_type);
}
@@ -4870,7 +4870,7 @@ windows_generate_update_mods(Private_Repl_Protocol *prp,
windows_generate_dn_value_mods(local_type, local_attr, smods,
mapped_remote_values,
local_values,do_modify);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"windows_generate_update_mods: no restricted local values found for
"
"local attribute %s in local entry %s for remote attribute "
"%s in remote entry %s\n",
@@ -4882,7 +4882,7 @@ windows_generate_update_mods(Private_Repl_Protocol *prp,
} else {
windows_generate_dn_value_mods(local_type, local_attr, smods,
mapped_remote_values, NULL, do_modify);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"windows_generate_update_mods: no local values found for "
"local attribute %s in local entry %s for remote attribute "
"%s in remote entry %s\n",
@@ -4898,7 +4898,7 @@ windows_generate_update_mods(Private_Repl_Protocol *prp,
windows_generate_dn_value_mods(local_type, local_attr, smods,
NULL, local_values, do_modify);
} else {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"windows_generate_update_mods: could not map the values in
"
"local attribute %s in local entry %s for remote attribute
"
"%s in remote entry %s\n",
@@ -4915,7 +4915,7 @@ windows_generate_update_mods(Private_Repl_Protocol *prp,
{ /* !is_present_local || is_guid */
if (!is_present_local)
{
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"windows_generate_update_mods: %s, %s : values not present on peer
entry\n", slapi_sdn_get_dn(slapi_entry_get_sdn_const(local_entry)), local_type);
/* If it is currently absent, then we add the value from the remote entry */
if (is_guid)
@@ -4980,7 +4980,7 @@ windows_generate_update_mods(Private_Repl_Protocol *prp,
char *new_initials = PL_strndup(initials_value, AD_INITIALS_LENGTH);
/* the below hands off memory */
slapi_value_set_string_passin(value, new_initials);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_generate_update_mods: "
"Trimming initials attribute to %d characters.\n",
agmt_get_long_name(prp->agmt), AD_INITIALS_LENGTH);
@@ -5046,7 +5046,7 @@ windows_generate_update_mods(Private_Repl_Protocol *prp,
slapi_entry_attr_find(local_entry, local_type, &local_attr);
if (local_attr) {
Slapi_Mod *mysmod = NULL;
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"windows_generate_update_mods: deleting %s attribute from local entry\n",
local_type);
/* Delete this attr from the local entry */
/* if type is dn and the dn is out of winsync scope, keep them.
@@ -5168,7 +5168,7 @@ windows_update_remote_entry(Private_Repl_Protocol *prp,Slapi_Entry
*remote_entry
if (0 == retval && do_modify)
{
const char *dn = slapi_sdn_get_dn(slapi_entry_get_sdn_const(remote_entry));
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"windows_update_remote_entry: modifying entry %s\n", dn);
retval = windows_conn_send_modify(prp->conn,
slapi_sdn_get_dn(slapi_entry_get_sdn_const(remote_entry)),slapi_mods_get_ldapmods_byref(&smods),
NULL,NULL);
@@ -5202,7 +5202,7 @@ windows_update_remote_entry(Private_Repl_Protocol *prp,Slapi_Entry
*remote_entry
} else
{
const char *dn = slapi_sdn_get_dn(slapi_entry_get_sdn_const(remote_entry));
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"no mods generated for remote entry: %s\n", dn);
}
@@ -5243,7 +5243,7 @@ windows_update_local_entry(Private_Repl_Protocol *prp,Slapi_Entry
*remote_entry,
* if we were creating a new entry. */
retval = map_entry_dn_inbound_ext(remote_entry, &mapped_sdn, prp->agmt, 0 /*
use_guid */, 0 /* use_username */);
if (retval || (NULL == mapped_sdn)) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"unable to map remote entry to local DN\n");
return retval;
}
@@ -5276,7 +5276,7 @@ windows_update_local_entry(Private_Repl_Protocol *prp,Slapi_Entry
*remote_entry,
}
/* rename entry */
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "renaming entry
\"%s\" - "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name, "renaming
entry \"%s\" - "
"(newrdn: \"%s\", newsuperior: \"%s\"\n", newdn,
newrdn ? newrdn:"NULL", newsuperior ? newsuperior:"NULL");
slapi_sdn_init_ndn_byref(&newsuperior_sdn, newsuperior);
@@ -5290,7 +5290,7 @@ windows_update_local_entry(Private_Repl_Protocol *prp,Slapi_Entry
*remote_entry,
slapi_sdn_done(&newsuperior_sdn);
slapi_pblock_destroy (pb);
if (LDAP_SUCCESS != retval) {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"failed to rename entry (\"%s\"); LDAP error - %d "
"(newrdn: \"%s\", newsuperior: \"%s\"\n", newdn,
retval,
newrdn ? newrdn:"NULL", newsuperior ? newsuperior:"NULL");
@@ -5307,7 +5307,7 @@ windows_update_local_entry(Private_Repl_Protocol *prp,Slapi_Entry
*remote_entry,
orig_local_entry = local_entry;
retval = windows_get_local_entry(mapped_sdn, &local_entry);
if (retval != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"failed to get local entry \"%s\" after rename\n",
slapi_sdn_get_ndn(mapped_sdn));
local_entry = orig_local_entry;
@@ -5320,7 +5320,7 @@ windows_update_local_entry(Private_Repl_Protocol *prp,Slapi_Entry
*remote_entry,
* We need to update the local groups manually... */
local_subtree = agmt_get_replarea(prp->agmt);
if (!local_subtree) {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"failed to get local subtree from agreement\n");
local_entry = orig_local_entry;
orig_local_entry = NULL;
@@ -5404,7 +5404,7 @@ windows_update_local_entry(Private_Repl_Protocol *prp,Slapi_Entry
*remote_entry,
slapi_modify_internal_pb(mod_pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &retval);
if (retval) {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"windows_update_local_entry: "
"failed to modify entry %s replacing %s with %s "
"- error %d:%s\n",
@@ -5433,7 +5433,7 @@ windows_update_local_entry(Private_Repl_Protocol *prp,Slapi_Entry
*remote_entry,
if (pb)
{
const char *dn = slapi_entry_get_dn_const(local_entry);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"modifying entry: %s\n", dn);
slapi_modify_internal_set_pb_ext (pb,
slapi_entry_get_sdn(local_entry),
@@ -5456,21 +5456,21 @@ windows_update_local_entry(Private_Repl_Protocol *prp,Slapi_Entry
*remote_entry,
}
if (rc)
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"windows_update_local_entry: failed to modify entry %s - error %d:%s\n",
dn, rc, ldap_err2string(rc));
}
slapi_pblock_destroy(pb);
} else
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"failed to make pb in windows_update_local_entry\n");
}
} else
{
const char *dn = slapi_entry_get_dn_const(local_entry);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"no mods generated for local entry: %s\n", dn);
}
@@ -5518,7 +5518,7 @@ windows_process_total_add(Private_Repl_Protocol *prp,Slapi_Entry *e,
Slapi_DN* r
(void)slapi_entry2mods (mapped_entry , NULL /* &entrydn : We don't need it */,
&entryattrs);
if (NULL == entryattrs)
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,"%s:
windows_process_total_add: Cannot convert entry to
LDAPMods.\n",agmt_get_long_name(prp->agmt));
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,"%s:
windows_process_total_add: Cannot convert entry to
LDAPMods.\n",agmt_get_long_name(prp->agmt));
retval = CONN_LOCAL_ERROR;
}
else
@@ -5554,7 +5554,7 @@ windows_process_total_add(Private_Repl_Protocol *prp,Slapi_Entry *e,
Slapi_DN* r
/* It's possible that the entry already exists in AD, in which case we fall back
to modify it */
if (retval)
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,"%s:
windows_process_total_add: Cannot replay add
operation.\n",agmt_get_long_name(prp->agmt));
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,"%s:
windows_process_total_add: Cannot replay add
operation.\n",agmt_get_long_name(prp->agmt));
}
ldap_mods_free(entryattrs, 1);
entryattrs = NULL;
@@ -5563,7 +5563,7 @@ windows_process_total_add(Private_Repl_Protocol *prp,Slapi_Entry *e,
Slapi_DN* r
/* set the account control bits only for users */
retval = send_accountcontrol_modify(remote_dn, prp, missing_entry);
if (alreadyexists) {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: windows_process_total_add: "
"Creating AD entry \"%s\" from DS entry
\"%s\" failed. "
"AD reserves the account name. Ignoring the
error...\n",
@@ -5616,7 +5616,7 @@ int windows_process_total_entry(Private_Repl_Protocol
*prp,Slapi_Entry *e)
const Slapi_DN *local_dn = slapi_entry_get_sdn_const(e);
/* First check if the entry is for us */
is_ours = is_subject_of_agreement_local(e, prp->agmt);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_process_total_entry: Looking dn=\"%s\" (%s)\n",
agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(slapi_entry_get_sdn_const(e)),
is_ours ? "ours" : "not ours");
if (is_ours)
@@ -5624,7 +5624,7 @@ int windows_process_total_entry(Private_Repl_Protocol
*prp,Slapi_Entry *e)
retval = map_entry_dn_outbound(e,&remote_dn,prp,&missing_entry,0 /* we
don't want the GUID */, NULL);
if (retval || NULL == remote_dn)
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: windows_process_total_entry: failed map dn for total update
dn=\"%s\"\n",
agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(local_dn));
goto error;
@@ -5659,7 +5659,7 @@ windows_search_local_entry_by_uniqueid(Private_Repl_Protocol *prp,
if (is_global) { /* Search from the suffix (rename case) */
local_subtree = agmt_get_replarea(prp->agmt);
if (!local_subtree) {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"failed to get local subtree from agreement\n");
return LDAP_PARAM_ERROR;
}
@@ -5782,7 +5782,7 @@ windows_unsync_entry(Private_Repl_Protocol *prp, Slapi_Entry *e)
goto done; /* nothing to see here, move along */
}
slapi_mods_add_mod_values(smods, LDAP_MOD_DELETE, "objectclass", va);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_unsync_entry: removing objectclass %s from %s\n",
agmt_get_long_name(prp->agmt), slapi_value_get_string(va[0]),
slapi_entry_get_dn_const(e));
@@ -5794,7 +5794,7 @@ windows_unsync_entry(Private_Repl_Protocol *prp, Slapi_Entry *e)
if (!slapi_entry_attr_find(e, type, &attr) && attr) {
if (!PL_strncasecmp(type, "nt", 2)) { /* begins with "nt" */
slapi_mods_add_mod_values(smods, LDAP_MOD_DELETE, type, NULL);
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_unsync_entry: removing attribute %s from %s\n",
agmt_get_long_name(prp->agmt), type,
slapi_entry_get_dn_const(e));
@@ -5806,7 +5806,7 @@ windows_unsync_entry(Private_Repl_Protocol *prp, Slapi_Entry *e)
if (!pb) {
goto done;
}
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_unsync_entry: modifying entry %s\n",
agmt_get_long_name(prp->agmt), slapi_entry_get_dn_const(e));
slapi_modify_internal_set_pb_ext(pb, slapi_entry_get_sdn(e),
@@ -5815,7 +5815,7 @@ windows_unsync_entry(Private_Repl_Protocol *prp, Slapi_Entry *e)
slapi_modify_internal_pb(pb);
slapi_pblock_get (pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: windows_unsync_entry: failed to modify entry %s - error %d:%s\n",
agmt_get_long_name(prp->agmt), slapi_entry_get_dn_const(e),
rc, ldap_err2string(rc));
@@ -5852,7 +5852,7 @@ windows_process_dirsync_entry(Private_Repl_Protocol *prp,Slapi_Entry
*e, int is_
slapi_sdn_free(&local_sdn);
} else
{
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,"%s:
windows_process_dirsync_entry: failed to map tombstone
dn.\n",agmt_get_long_name(prp->agmt));
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,"%s:
windows_process_dirsync_entry: failed to map tombstone
dn.\n",agmt_get_long_name(prp->agmt));
}
} else
{
@@ -5901,14 +5901,14 @@ retry:
remote_entry = NULL;
} else
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"%s: windows_process_dirsync_entry: failed to fetch inbound
entry %s.\n",
agmt_get_long_name(prp->agmt),
slapi_sdn_get_dn(slapi_entry_get_sdn_const(e)));
}
slapi_entry_free(local_entry);
if (rc) {
/* Something bad happened */
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_process_dirsync_entry: failed to update inbound
entry for %s.\n",
agmt_get_long_name(prp->agmt),
slapi_sdn_get_dn(slapi_entry_get_sdn_const(e)));
}
@@ -5932,7 +5932,7 @@ retry:
windows_create_local_entry(prp, e, local_sdn);
} else
{
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,"%s:
windows_process_dirsync_entry: not allowed to add entry
%s.\n",agmt_get_long_name(prp->agmt)
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,"%s:
windows_process_dirsync_entry: not allowed to add entry
%s.\n",agmt_get_long_name(prp->agmt)
, slapi_sdn_get_dn(slapi_entry_get_sdn_const(e)));
}
}
@@ -5960,7 +5960,7 @@ retry:
}
} else {
/* We should have been able to map the DN, so this is an error */
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_process_dirsync_entry: failed to map "
"inbound entry %s - rc is %d dn is [%s].\n",
agmt_get_long_name(prp->agmt),
@@ -5984,7 +5984,7 @@ retry:
* part is now moved out of scope of the agreement. */
/* Since map_Entry_dn_oubound returned local_sdn,
* the entry is either user or group. */
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_process_dirsync_entry: deleting out of "
"scope entry %s\n", agmt_get_long_name(prp->agmt),
slapi_sdn_get_dn(local_sdn));
@@ -5992,7 +5992,7 @@ retry:
} else if (windows_private_get_move_action(prp->agmt) == MOVE_DOES_UNSYNC) {
rc = windows_unsync_entry(prp, local_entry);
} else {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"%s: windows_process_dirsync_entry: windows "
"inbound entry %s has the same name as local "
"entry %s but the windows entry is out of the "
@@ -6030,7 +6030,7 @@ windows_dirsync_inc_run(Private_Repl_Protocol *prp)
rc = send_dirsync_search(prp->conn);
if (rc != CONN_OPERATION_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
"failed to send dirsync search request: %d\n", rc);
goto error;
}
diff --git a/ldap/servers/plugins/replication/windows_tot_protocol.c
b/ldap/servers/plugins/replication/windows_tot_protocol.c
index a533b0d..7194bc6 100644
--- a/ldap/servers/plugins/replication/windows_tot_protocol.c
+++ b/ldap/servers/plugins/replication/windows_tot_protocol.c
@@ -126,7 +126,7 @@ windows_tot_run(Private_Repl_Protocol *prp)
Object *local_ruv_obj = NULL;
int one_way;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_tot_run\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_tot_run\n" );
PR_ASSERT(NULL != prp);
@@ -169,7 +169,7 @@ windows_tot_run(Private_Repl_Protocol *prp)
agmt_set_update_in_progress(prp->agmt, PR_TRUE);
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name, "Beginning total update
of replica "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name, "Beginning
total update of replica "
"\"%s\".\n", agmt_get_long_name(prp->agmt));
windows_private_null_dirsync_cookie(prp->agmt);
@@ -225,12 +225,12 @@ windows_tot_run(Private_Repl_Protocol *prp)
windows_release_replica(prp);
if (rc != CONN_OPERATION_SUCCESS) {
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "%s: windows_tot_run:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name, "%s:
windows_tot_run: "
"failed to obtain data to send to the consumer; LDAP error -
%d\n",
agmt_get_long_name(prp->agmt), rc);
agmt_set_last_init_status(prp->agmt, 0, 0, rc, "Total update aborted");
} else {
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name, "Finished total update
of replica "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name, "Finished
total update of replica "
"\"%s\". Sent %lu entries.\n",
agmt_get_long_name(prp->agmt), cb_data.num_entries);
agmt_set_last_init_status(prp->agmt, 0, 0, 0, "Total update succeeded");
/* Now update our consumer RUV for this agreement.
@@ -238,7 +238,7 @@ windows_tot_run(Private_Repl_Protocol *prp)
*/
if (slapi_is_loglevel_set(SLAPI_LOG_REPL))
{
- slapi_log_error(SLAPI_LOG_REPL, NULL, "total update setting consumer
RUV:\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "total update setting consumer
RUV:\n");
ruv_dump (starting_ruv, "consumer", NULL);
}
agmt_set_consumer_ruv(prp->agmt, starting_ruv );
@@ -270,7 +270,7 @@ done:
prp->stopped = 1;
ruv_destroy(&ruv);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_tot_run\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_tot_run\n" );
}
static int
@@ -280,7 +280,7 @@ windows_tot_stop(Private_Repl_Protocol *prp)
int seconds = 600;
PRIntervalTime start, maxwait, now;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_tot_stop\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_tot_stop\n" );
prp->terminate = 1;
maxwait = PR_SecondsToInterval(seconds);
@@ -294,7 +294,7 @@ windows_tot_stop(Private_Repl_Protocol *prp)
if (!prp->stopped)
{
/* Isn't listening. Disconnect from the replica. */
- slapi_log_error (SLAPI_LOG_REPL, windows_repl_plugin_name, "windows_tot_run:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
"windows_tot_run: "
"protocol not stopped after waiting for %d seconds "
"for agreement %s\n", PR_IntervalToSeconds(now-start),
agmt_get_long_name(prp->agmt));
@@ -306,7 +306,7 @@ windows_tot_stop(Private_Repl_Protocol *prp)
return_value = 0;
}
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_tot_stop\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_tot_stop\n" );
return return_value;
}
@@ -317,8 +317,8 @@ static int
windows_tot_status(Private_Repl_Protocol *prp)
{
int return_value = 0;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_tot_status\n" );
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_tot_status\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_tot_status\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_tot_status\n" );
return return_value;
}
@@ -327,8 +327,8 @@ windows_tot_status(Private_Repl_Protocol *prp)
static void
windows_tot_noop(Private_Repl_Protocol *prp)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_tot_noop\n" );
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_tot_noop\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_tot_noop\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_tot_noop\n" );
/* noop */
}
@@ -339,7 +339,7 @@ Windows_Tot_Protocol_new(Repl_Protocol *rp)
windows_tot_private *rip = NULL;
Private_Repl_Protocol *prp = (Private_Repl_Protocol *)slapi_ch_calloc(1,
sizeof(Private_Repl_Protocol));
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> Windows_Tot_Protocol_new\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
Windows_Tot_Protocol_new\n" );
prp->delete = windows_tot_delete;
prp->run = windows_tot_run;
@@ -368,18 +368,18 @@ Windows_Tot_Protocol_new(Repl_Protocol *rp)
rip->rp = rp;
prp->private = (void *)rip;
prp->replica_acquired = PR_FALSE;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= Windows_Tot_Protocol_new\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
Windows_Tot_Protocol_new\n" );
return prp;
loser:
windows_tot_delete(&prp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= Windows_Tot_Protocol_new - loser\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= Windows_Tot_Protocol_new -
loser\n" );
return NULL;
}
static void
windows_tot_delete(Private_Repl_Protocol **prpp)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_tot_delete\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_tot_delete\n" );
/* First, stop the protocol if it isn't already stopped */
if (!(*prpp)->stopped) {
@@ -398,16 +398,16 @@ windows_tot_delete(Private_Repl_Protocol **prpp)
slapi_ch_free((void **)&(*prpp)->private);
slapi_ch_free((void **)prpp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_tot_delete\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_tot_delete\n" );
}
static
void get_result (int rc, void *cb_data)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> get_result\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> get_result\n" );
PR_ASSERT (cb_data);
((callback_data*)cb_data)->rc = rc;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= get_result\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= get_result\n" );
}
static
@@ -417,7 +417,7 @@ int send_entry (Slapi_Entry *e, void *cb_data)
Private_Repl_Protocol *prp;
unsigned long *num_entriesp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> send_entry\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> send_entry\n" );
PR_ASSERT (cb_data);
@@ -430,13 +430,13 @@ int send_entry (Slapi_Entry *e, void *cb_data)
windows_conn_disconnect(prp->conn);
prp->stopped = 1;
((callback_data*)cb_data)->rc = -1;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= send_entry\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= send_entry\n" );
return -1;
}
/* skip ruv tombstone - not relvant to Active Directory */
if (is_ruv_tombstone_entry (e)) {
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= send_entry\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= send_entry\n" );
return 0;
}
@@ -445,7 +445,7 @@ int send_entry (Slapi_Entry *e, void *cb_data)
(*num_entriesp)++;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= send_entry\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= send_entry\n" );
if (CONN_OPERATION_SUCCESS == rc) {
return 0;
diff --git a/ldap/servers/plugins/retrocl/retrocl.c
b/ldap/servers/plugins/retrocl/retrocl.c
index 0b336d5..79dcc22 100644
--- a/ldap/servers/plugins/retrocl/retrocl.c
+++ b/ldap/servers/plugins/retrocl/retrocl.c
@@ -111,7 +111,7 @@ retrocl_postop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, postmod, (void *) retrocl_postop_modify ) != 0 ||
slapi_pblock_set( pb, postmdn, (void *) retrocl_postop_modrdn ) != 0 )
{
- slapi_log_error( SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME, "retrocl_postop_init
failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"retrocl_postop_init failed\n" );
rc= -1;
}
@@ -141,7 +141,7 @@ retrocl_internalpostop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_INTERNAL_POST_MODIFY_FN, (void *)
retrocl_postop_modify ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_INTERNAL_POST_MODRDN_FN, (void *)
retrocl_postop_modrdn ) != 0 )
{
- slapi_log_error( SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
"retrocl_internalpostop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"retrocl_internalpostop_init failed\n" );
rc= -1;
}
@@ -207,7 +207,7 @@ static int retrocl_select_backend(void)
slapi_entry_free(referral);
if (err != LDAP_SUCCESS || be == NULL || be == defbackend_get_backend()) {
- slapi_log_error(SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
"Mapping tree select failed (%d) %s.\n", err, errbuf);
/* could not find the backend for cn=changelog, either because
@@ -315,13 +315,13 @@ retrocl_remove_legacy_default_aci(void)
slapi_modify_internal_pb(mod_pb);
slapi_pblock_get(mod_pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if(rc == LDAP_SUCCESS){
- slapi_log_error( SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
"Successfully removed vulnerable legacy default aci
\"%s\". "
"If the aci removal was not desired please use a
different \"acl "
"name\" so it is not removed at the next plugin
startup.\n",
RETROCL_ACL);
} else {
- slapi_log_error( SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
"Failed to removed vulnerable legacy default aci
(%s) error %d\n",
RETROCL_ACL, rc);
}
@@ -360,7 +360,7 @@ static int retrocl_start (Slapi_PBlock *pb)
rc = retrocl_select_backend();
if (rc != 0) {
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,"Couldnt find backend, not trimming retro
changelog (%d).\n",rc);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "Couldnt find backend, not trimming
retro changelog (%d).\n",rc);
return rc;
}
@@ -370,7 +370,7 @@ static int retrocl_start (Slapi_PBlock *pb)
retrocl_init_trimming();
if (slapi_pblock_get(pb, SLAPI_ADD_ENTRY, &e) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME, "Missing config
entry.\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME, "Missing
config entry.\n");
return -1;
}
@@ -381,7 +381,7 @@ static int retrocl_start (Slapi_PBlock *pb)
for (i = 0;i < num_vals; i++){
if(slapi_dn_syntax_check(pb, values[i], 1)){
/* invalid dn syntax */
- slapi_log_error(SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
"Invalid DN (%s) for exclude suffix.\n", values[i] );
slapi_ch_array_free(values);
return -1;
@@ -401,7 +401,7 @@ static int retrocl_start (Slapi_PBlock *pb)
/* Validate the syntax before we create our DN array */
if(slapi_dn_syntax_check(pb, values[i], 1)){
/* invalid dn syntax */
- slapi_log_error(SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
"Invalid DN (%s) for include suffix.\n", values[i] );
slapi_ch_array_free(values);
return -1;
@@ -426,7 +426,7 @@ static int retrocl_start (Slapi_PBlock *pb)
while(retrocl_excludes[x]){
if(slapi_sdn_compare(retrocl_includes[i], retrocl_excludes[x] ) == 0){
/* we have a conflict */
- slapi_log_error(SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
"include suffix (%s) is also listed in exclude suffix
list\n",
slapi_sdn_get_dn(retrocl_includes[i]));
return -1;
@@ -443,7 +443,7 @@ static int retrocl_start (Slapi_PBlock *pb)
while(retrocl_excludes[x]){
if(slapi_sdn_issuffix(retrocl_includes[i], retrocl_excludes[x])){
/* we have a conflict */
- slapi_log_error(SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
"include suffix (%s) is a child of the exclude
suffix(%s)\n",
slapi_sdn_get_dn(retrocl_includes[i]),
slapi_sdn_get_dn(retrocl_excludes[i]));
@@ -460,10 +460,10 @@ static int retrocl_start (Slapi_PBlock *pb)
int n = 0;
int i = 0;
- slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
"nsslapd-attribute:\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"nsslapd-attribute:\n");
for (n=0; values && values[n]; n++) {
- slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME, " - %s\n",
values[n]);
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME, " -
%s\n", values[n]);
}
retrocl_nattributes = n;
@@ -471,7 +471,7 @@ static int retrocl_start (Slapi_PBlock *pb)
retrocl_attributes = (char **)slapi_ch_calloc(n, sizeof(char *));
retrocl_aliases = (char **)slapi_ch_calloc(n, sizeof(char *));
- slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
"Attributes:\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"Attributes:\n");
for (i=0; i<n; i++) {
char *value = values[i];
@@ -482,7 +482,7 @@ static int retrocl_start (Slapi_PBlock *pb)
retrocl_attributes[i] = slapi_ch_strdup(value);
retrocl_aliases[i] = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME, " -
%s\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME, "
- %s\n",
retrocl_attributes[i]);
} else {
@@ -493,7 +493,7 @@ static int retrocl_start (Slapi_PBlock *pb)
retrocl_aliases[i] = slapi_ch_malloc(value+length-pos);
strcpy(retrocl_aliases[i], pos+1);
- slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME, " - %s
[%s]\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME, "
- %s [%s]\n",
retrocl_attributes[i], retrocl_aliases[i]);
}
}
@@ -505,12 +505,12 @@ static int retrocl_start (Slapi_PBlock *pb)
values = slapi_entry_attr_get_charray(e, "nsslapd-log-deleted");
if (values != NULL) {
if (values[1] != NULL) {
- slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"Multiple values specified for attribute: nsslapd-log-deleted\n");
} else if ( 0 == strcasecmp(values[0], "on")) {
retrocl_log_deleted = 1;
} else if (strcasecmp(values[0], "off")) {
- slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"Invalid value (%s) specified for attribute: nsslapd-log-deleted\n",
values[0]);
}
slapi_ch_array_free(values);
diff --git a/ldap/servers/plugins/retrocl/retrocl_cn.c
b/ldap/servers/plugins/retrocl/retrocl_cn.c
index e6a8849..8d29165 100644
--- a/ldap/servers/plugins/retrocl/retrocl_cn.c
+++ b/ldap/servers/plugins/retrocl/retrocl_cn.c
@@ -147,7 +147,7 @@ int retrocl_get_changenumbers(void)
retrocl_internal_cn = cr.cr_cnum;
- slapi_log_error(SLAPI_LOG_PLUGIN,"retrocl","Got changenumbers %lu and
%lu\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,"retrocl","Got
changenumbers %lu and %lu\n",
retrocl_first_cn,
retrocl_internal_cn);
@@ -348,7 +348,7 @@ int retrocl_update_lastchangenumber(void)
slapi_rwlock_wrlock(retrocl_cn_lock);
retrocl_internal_cn = cr.cr_cnum;
- slapi_log_error(SLAPI_LOG_PLUGIN,"retrocl","Refetched last
changenumber = %lu \n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,"retrocl","Refetched last
changenumber = %lu \n",
retrocl_internal_cn);
slapi_ch_free(( void **) &cr.cr_time );
diff --git a/ldap/servers/plugins/retrocl/retrocl_create.c
b/ldap/servers/plugins/retrocl/retrocl_create.c
index b046d61..740a2df 100644
--- a/ldap/servers/plugins/retrocl/retrocl_create.c
+++ b/ldap/servers/plugins/retrocl/retrocl_create.c
@@ -101,13 +101,13 @@ static int retrocl_create_be(const char *bedir)
slapi_pblock_destroy(pb);
if (rc == 0) {
- slapi_log_error (SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"created changelog database node\n");
} else if (rc == LDAP_ALREADY_EXISTS) {
- slapi_log_error (SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"changelog database node already existed\n");
} else {
- slapi_log_error( SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME, "Changelog LDBM
backend could not be created (%d)\n", rc);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME, "Changelog
LDBM backend could not be created (%d)\n", rc);
return rc;
}
@@ -152,13 +152,13 @@ static int retrocl_create_be(const char *bedir)
slapi_pblock_destroy(pb);
if (rc == 0) {
- slapi_log_error (SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"created changenumber index node\n");
} else if (rc == LDAP_ALREADY_EXISTS) {
- slapi_log_error (SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"changelog index node already existed\n");
} else {
- slapi_log_error( SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME, "Changelog LDBM
backend changenumber index could not be created (%d)\n", rc);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME, "Changelog
LDBM backend changenumber index could not be created (%d)\n", rc);
return rc;
}
@@ -196,7 +196,7 @@ int retrocl_create_config(void)
/* This function converts the old DN style to the new one. */
mappingtree_dn = slapi_create_dn_string("%s", RETROCL_MAPPINGTREE_DN);
if (NULL == mappingtree_dn) {
- slapi_log_error (SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"retrocl_create_config: failed to normalize "
"mappingtree dn %s\n", RETROCL_MAPPINGTREE_DN);
return LDAP_PARAM_ERROR;
@@ -240,13 +240,13 @@ int retrocl_create_config(void)
slapi_pblock_destroy(pb);
if (rc == 0) {
- slapi_log_error (SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"created changelog mapping tree node\n");
} else if (rc == LDAP_ALREADY_EXISTS) {
- slapi_log_error (SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"changelog mapping tree node already existed\n");
} else {
- slapi_log_error( SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME,
"cn=\"cn=changelog\",cn=mapping tree,cn=config could not be created
(%d)\n", rc);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
"cn=\"cn=changelog\",cn=mapping tree,cn=config could not be created
(%d)\n", rc);
return rc;
}
@@ -324,13 +324,13 @@ void retrocl_create_cle (void)
slapi_pblock_destroy(pb);
if (rc == 0) {
- slapi_log_error (SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"created cn=changelog\n");
} else if (rc == LDAP_ALREADY_EXISTS) {
- slapi_log_error (SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"cn=changelog already existed\n");
} else {
- slapi_log_error( SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME, "cn=changelog could
not be created (%d)\n", rc);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME, "cn=changelog
could not be created (%d)\n", rc);
}
}
diff --git a/ldap/servers/plugins/retrocl/retrocl_po.c
b/ldap/servers/plugins/retrocl/retrocl_po.c
index d9f4e6d..f62574a 100644
--- a/ldap/servers/plugins/retrocl/retrocl_po.c
+++ b/ldap/servers/plugins/retrocl/retrocl_po.c
@@ -159,7 +159,7 @@ write_replog_db(
int i;
if (!dn) {
- slapi_log_error( SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME, "write_replog_db:
NULL dn\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"write_replog_db: NULL dn\n");
return ret;
}
@@ -179,7 +179,7 @@ write_replog_db(
changenum = retrocl_assign_changenumber();
PR_ASSERT( changenum > 0UL );
- slapi_log_error( SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"write_replog_db: write change record %lu for dn: \"%s\"\n",
changenum, dn );
@@ -224,7 +224,7 @@ write_replog_db(
if ( entry == NULL ) continue;
uniqueId = slapi_entry_get_uniqueid( entry );
- slapi_log_error( SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"write_replog_db: add %s: \"%s\"\n", attributeAlias,
uniqueId );
val.bv_val = (char *)uniqueId;
@@ -241,7 +241,7 @@ write_replog_db(
slapi_pblock_get( pb, SLAPI_IS_REPLICATED_OPERATION, &isReplicated );
attributeValue = isReplicated ? "TRUE" : "FALSE";
- slapi_log_error( SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"write_replog_db: add %s: \"%s\"\n", attributeAlias,
attributeValue );
val.bv_val = attributeValue;
@@ -275,7 +275,7 @@ write_replog_db(
if ( valueSet == NULL ) continue;
- slapi_log_error( SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"write_replog_db: add %s\n", attributeAlias );
slapi_entry_add_valueset( e, attributeAlias, valueSet );
@@ -346,7 +346,7 @@ write_replog_db(
break;
default:
- slapi_log_error( SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
"replog: Unknown LDAP operation type %d.\n", optype );
err = SLAPI_PLUGIN_FAILURE;
}
@@ -362,7 +362,7 @@ write_replog_db(
slapi_pblock_get( newPb, SLAPI_PLUGIN_INTOP_RESULT, &ret );
slapi_pblock_destroy(newPb);
if ( 0 != ret ) {
- slapi_log_error( SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
"replog: an error occured while adding change "
"number %lu, dn = %s: %s. \n",
changenum, edn, ldap_err2string( ret ));
@@ -373,7 +373,7 @@ write_replog_db(
retrocl_commit_changenumber();
}
} else {
- slapi_log_error( SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
"An error occurred while constructing "
"change record number %ld.\n", changenum );
retrocl_release_changenumber();
@@ -589,24 +589,24 @@ int retrocl_postob (Slapi_PBlock *pb, int optype)
(void)slapi_pblock_get( pb, SLAPI_BACKEND, &be );
if (be == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "retrocl_postob: backend is not
set\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "retrocl_postob: backend is not
set\n");
return SLAPI_PLUGIN_FAILURE;
}
if (slapi_be_logchanges(be) == 0) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE,"not applying change if not
logging\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "not applying change if not
logging\n");
return SLAPI_PLUGIN_SUCCESS;
}
if (retrocl_be_changelog == NULL || be == retrocl_be_changelog) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE,"not applying change if no/cl be\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "not applying change if no/cl
be\n");
return SLAPI_PLUGIN_SUCCESS;
}
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &rc);
if (rc != LDAP_SUCCESS) {
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,"not applying change if op failed
%d\n",rc);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,"not applying change if op failed
%d\n",rc);
/* this could also mean that the changenumber is no longer correct
* set a flag to check at next assignment
*/
@@ -615,7 +615,7 @@ int retrocl_postob (Slapi_PBlock *pb, int optype)
}
if (slapi_op_abandoned(pb)) {
- LDAPDebug0Args(LDAP_DEBUG_PLUGIN,"not applying change if op
abandoned\n");
+ LDAPDebug0Args(LDAP_DEBUG_PLUGIN, LOG_DEBUG,"not applying change if op
abandoned\n");
return SLAPI_PLUGIN_SUCCESS;
}
@@ -630,12 +630,12 @@ int retrocl_postob (Slapi_PBlock *pb, int optype)
slapi_pblock_get( pb, SLAPI_OPERATION, &op );
if (op == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE,"not applying change if no op\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,"not applying change if no
op\n");
return SLAPI_PLUGIN_SUCCESS;
}
if (operation_is_flag_set(op, OP_FLAG_TOMBSTONE_ENTRY)){
- LDAPDebug0Args(LDAP_DEBUG_TRACE,"not applying change for nsTombstone
entries\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,"not applying change for
nsTombstone entries\n");
return SLAPI_PLUGIN_SUCCESS;
}
/*
@@ -677,7 +677,7 @@ int retrocl_postob (Slapi_PBlock *pb, int optype)
if((rc = write_replog_db( pb, optype, dn, log_m, flag, curtime, entry,
post_entry, newrdn, modrdn_mods, slapi_sdn_get_dn(newsuperior) )))
{
- slapi_log_error(SLAPI_LOG_FATAL, "retrocl-plugin",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "retrocl-plugin",
"retrocl_postob: operation failure [%d]\n", rc);
if(rc < 0){
rc = LDAP_OPERATIONS_ERROR;
diff --git a/ldap/servers/plugins/retrocl/retrocl_trim.c
b/ldap/servers/plugins/retrocl/retrocl_trim.c
index 5e9b59f..1148649 100644
--- a/ldap/servers/plugins/retrocl/retrocl_trim.c
+++ b/ldap/servers/plugins/retrocl/retrocl_trim.c
@@ -90,11 +90,11 @@ delete_changerecord( changeNumber cnum )
slapi_pblock_destroy( pb );
if ( delrc != LDAP_SUCCESS ) {
- slapi_log_error( SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
"delete_changerecord: could not delete change record %lu
(rc: %d)\n",
cnum, delrc );
} else {
- slapi_log_error( SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"delete_changerecord: deleted changelog entry
\"%s\"\n", dnbuf);
}
slapi_ch_free((void **) &dnbuf );
@@ -116,7 +116,7 @@ handle_getchangetime_result( int err, void *callback_data )
cnum_result_t *crt = callback_data;
if ( crt == NULL ) {
- slapi_log_error( SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
"handle_getchangetime_result: callback_data NULL\n" );
} else {
crt->crt_err = err;
@@ -140,11 +140,11 @@ handle_getchangetime_search( Slapi_Entry *e, void *callback_data)
Slapi_Attr *attr;
if (crt == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
"handle_getchangetime_search: op->o_handler_data NULL\n");
} else if (crt->crt_nentries > 0) {
/* only return the first entry, I guess */
- slapi_log_error(SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
"handle_getchangetime_search: multiple entries returned\n");
} else {
crt->crt_nentries++;
@@ -260,7 +260,7 @@ static int trim_changelog(void)
did_delete = 0;
first_in_log = retrocl_get_first_changenumber();
if ( 0UL == first_in_log ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"trim_changelog: no changelog records "
"to trim\n" );
/* Bail out - we can't do any useful work */
@@ -302,7 +302,7 @@ static int trim_changelog(void)
ts.ts_s_last_trim = now;
PR_Unlock( ts.ts_s_trim_mutex );
if ( num_deleted > 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
"trim_changelog: removed %d change records\n",
num_deleted );
}
@@ -348,12 +348,12 @@ void retrocl_housekeeping ( time_t cur_time, void *noarg )
int ldrc;
if (retrocl_be_changelog == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE,"not housekeeping if no cl be\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "not housekeeping if no cl
be\n");
return;
}
if ( !ts.ts_s_initialized ) {
- slapi_log_error( SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME, "changelog_housekeeping
called before "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
"changelog_housekeeping called before "
"trimming constraints set\n" );
return;
}
@@ -381,17 +381,17 @@ void retrocl_housekeeping ( time_t cur_time, void *noarg )
}
}
if ( must_trim ) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE,"changelog about to create thread\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "changelog about to create
thread\n");
/* Start a thread to trim the changelog */
ts.ts_s_trimming = 1;
if ( PR_CreateThread( PR_USER_THREAD,
changelog_trim_thread_fn, NULL,
PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_UNJOINABLE_THREAD,
RETROCL_DLL_DEFAULT_THREAD_STACKSIZE ) == NULL ) {
- slapi_log_error( SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME, "unable to create changelog
trimming thread\n" );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME, "unable to create
changelog trimming thread\n" );
}
} else {
- LDAPDebug0Args(LDAP_DEBUG_PLUGIN,
+ LDAPDebug0Args(LDAP_DEBUG_PLUGIN, LOG_DEBUG,
"changelog does not need to be trimmed\n");
}
}
@@ -421,7 +421,7 @@ void retrocl_init_trimming (void)
ageval = slapi_parse_duration(cl_maxage);
slapi_ch_free_string((char **)&cl_maxage);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
"retrocl_init_trimming: ignoring invalid %s value %s;
"
"not trimming retro changelog.\n",
CONFIG_CHANGELOG_MAXAGE_ATTRIBUTE, cl_maxage);
@@ -434,7 +434,7 @@ void retrocl_init_trimming (void)
if (cl_trim_interval) {
trim_interval = strtol(cl_trim_interval, (char **)NULL, 10);
if (0 == trim_interval) {
- slapi_log_error(SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
"retrocl_init_trimming: ignoring invalid %s value %s;
"
"resetting the default %d\n",
CONFIG_CHANGELOG_TRIM_INTERVAL, cl_trim_interval,
@@ -448,7 +448,7 @@ void retrocl_init_trimming (void)
ts.ts_s_last_trim = (time_t) 0L;
ts.ts_s_trimming = 0;
if (( ts.ts_s_trim_mutex = PR_NewLock()) == NULL ) {
- slapi_log_error( SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME,
"set_changelog_trim_constraints: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
"set_changelog_trim_constraints: "
"cannot create new lock.\n" );
exit( 1 );
}
diff --git a/ldap/servers/plugins/rever/rever.c b/ldap/servers/plugins/rever/rever.c
index 719cbde..de5f0df 100644
--- a/ldap/servers/plugins/rever/rever.c
+++ b/ldap/servers/plugins/rever/rever.c
@@ -70,7 +70,7 @@ aes_init( Slapi_PBlock *pb)
{
int rc;
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "=> aes_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "=>
aes_init\n" );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION, (void *) SLAPI_PLUGIN_VERSION_01
);
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION, (void *)&pdesc_aes );
@@ -81,7 +81,7 @@ aes_init( Slapi_PBlock *pb)
init_pbe_plugin();
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "<= aes_init %d\n",
rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "<= aes_init
%d\n", rc );
return( rc );
}
@@ -131,7 +131,7 @@ des_init( Slapi_PBlock *pb )
{
int rc;
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "=> des_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "=> des_init\n"
);
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION, (void *) SLAPI_PLUGIN_VERSION_01 );
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION, (void *)&pdesc_des );
@@ -142,7 +142,7 @@ des_init( Slapi_PBlock *pb )
init_pbe_plugin();
- slapi_log_error( SLAPI_LOG_PLUGIN, plugin_name, "<= des_init %d\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "<= des_init
%d\n", rc );
return( rc );
}
diff --git a/ldap/servers/plugins/roles/roles_cache.c
b/ldap/servers/plugins/roles/roles_cache.c
index e5b3ff2..28949ef 100644
--- a/ldap/servers/plugins/roles/roles_cache.c
+++ b/ldap/servers/plugins/roles/roles_cache.c
@@ -182,7 +182,7 @@ int roles_cache_init()
Slapi_DN *sdn = NULL;
roles_cache_def *new_suffix = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_init\n");
if ( global_lock == NULL )
@@ -231,7 +231,7 @@ int roles_cache_init()
roles_sp_compare_value,
roles_sp_list_types) )
{
- slapi_log_error( SLAPI_LOG_FATAL, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
"roles_cache_init: slapi_vattrspi_register failed\n");
slapi_destroy_rwlock(global_lock);
@@ -240,7 +240,7 @@ int roles_cache_init()
}
else if ( slapi_vattrspi_regattr(vattr_handle,NSROLEATTR,"", NULL) )
{
- slapi_log_error( SLAPI_LOG_FATAL, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
"roles_cache_init: slapi_vattrspi_regattr failed\n");
slapi_ch_free((void **)&vattr_handle);
slapi_destroy_rwlock(global_lock);
@@ -248,7 +248,7 @@ int roles_cache_init()
return(-1);
}
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_init\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_init\n");
return rc;
}
@@ -263,13 +263,13 @@ static roles_cache_def *roles_cache_create_suffix(Slapi_DN *sdn)
roles_cache_def *current_suffix = NULL;
roles_cache_def *new_suffix = NULL;
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "-->
roles_cache_create_suffix\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "-->
roles_cache_create_suffix\n");
/* Allocate a new suffix block */
new_suffix = (roles_cache_def*)slapi_ch_calloc(1, sizeof(roles_cache_def));
if ( new_suffix == NULL )
{
- slapi_log_error(SLAPI_LOG_FATAL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
ROLES_PLUGIN_SUBSYSTEM,
"roles_cache_create_suffix: Unable to allocate memory, cannot create role
cache\n");
return(NULL);
@@ -284,7 +284,7 @@ static roles_cache_def *roles_cache_create_suffix(Slapi_DN *sdn)
new_suffix->cache_lock == NULL ||
new_suffix->create_lock == NULL )
{
- slapi_log_error( SLAPI_LOG_FATAL, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
"roles_cache_create_suffix: Lock creation failed\n");
roles_cache_role_def_free(new_suffix);
return(NULL);
@@ -293,7 +293,7 @@ static roles_cache_def *roles_cache_create_suffix(Slapi_DN *sdn)
new_suffix->something_changed = slapi_new_condvar(new_suffix->change_lock);
if ( new_suffix->something_changed == NULL)
{
- slapi_log_error( SLAPI_LOG_FATAL, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
"roles_cache_create_suffix: Lock creation failed\n");
roles_cache_role_def_free(new_suffix);
return(NULL);
@@ -302,7 +302,7 @@ static roles_cache_def *roles_cache_create_suffix(Slapi_DN *sdn)
new_suffix->suffix_created = slapi_new_condvar(new_suffix->create_lock);
if ( new_suffix->suffix_created == NULL)
{
- slapi_log_error( SLAPI_LOG_FATAL, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
"roles_cache_create_suffix: Lock creation failed\n");
roles_cache_role_def_free(new_suffix);
return(NULL);
@@ -350,7 +350,7 @@ static roles_cache_def *roles_cache_create_suffix(Slapi_DN *sdn)
PR_UNJOINABLE_THREAD,
SLAPD_DEFAULT_THREAD_STACKSIZE)) == NULL )
{
- slapi_log_error( SLAPI_LOG_FATAL, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
"roles_cache_create_suffix: PR_CreateThread failed\n");
roles_cache_role_def_delete(new_suffix);
return(NULL);
@@ -363,7 +363,7 @@ static roles_cache_def *roles_cache_create_suffix(Slapi_DN *sdn)
}
slapi_unlock_mutex(new_suffix->create_lock);
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_create_suffix\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_create_suffix\n");
return(new_suffix);
}
@@ -376,7 +376,7 @@ static void roles_cache_wait_on_change(void * arg)
{
roles_cache_def *roles_def = (roles_cache_def*)arg;
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "-->
roles_cache_wait_on_change\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "-->
roles_cache_wait_on_change\n");
slapi_lock_mutex(roles_def->stop_lock);
slapi_lock_mutex(roles_def->change_lock);
@@ -403,7 +403,7 @@ static void roles_cache_wait_on_change(void * arg)
*/
slapi_wait_condvar(roles_def->something_changed, NULL);
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
"roles_cache_wait_on_change \n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
"roles_cache_wait_on_change \n");
if ( roles_def->keeprunning )
{
@@ -417,7 +417,7 @@ static void roles_cache_wait_on_change(void * arg)
roles_cache_role_def_free(roles_def);
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_wait_on_change thread exit\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_wait_on_change thread exit\n");
}
/* roles_cache_trigger_update_suffix
@@ -528,7 +528,7 @@ static void roles_cache_trigger_update_role(char *dn, Slapi_Entry
*roles_entry,
current_role = roles_list;
- slapi_log_error( SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_trigger_update_role: %p \n",
roles_list);
/* Go through all the roles list and trigger the associated structure */
@@ -563,7 +563,7 @@ static void roles_cache_trigger_update_role(char *dn, Slapi_Entry
*roles_entry,
slapi_rwlock_unlock(global_lock);
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_trigger_update_role: %p \n", roles_list);
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_trigger_update_role: %p \n", roles_list);
}
/* roles_cache_update
@@ -580,7 +580,7 @@ static int roles_cache_update(roles_cache_def *suffix_to_update)
Slapi_DN *dn = NULL;
role_object *to_delete = NULL;
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "-->
roles_cache_update \n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "-->
roles_cache_update \n");
slapi_rwlock_wrlock(suffix_to_update->cache_lock);
@@ -589,7 +589,7 @@ static int roles_cache_update(roles_cache_def *suffix_to_update)
dn = slapi_sdn_new();
if (!dn) {
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "Out of memory
\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "Out of
memory \n");
rc = -1;
goto done;
}
@@ -630,7 +630,7 @@ done:
slapi_sdn_free(&dn);
}
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_update \n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_update \n");
return(rc);
}
@@ -646,7 +646,7 @@ void roles_cache_stop()
roles_cache_def *current_role = NULL;
roles_cache_def *next_role = NULL;
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "-->
roles_cache_stop\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "-->
roles_cache_stop\n");
/* Go through all the roles list and trigger the associated structure */
slapi_rwlock_wrlock(global_lock);
@@ -665,7 +665,7 @@ void roles_cache_stop()
slapi_ch_free((void **)&vattr_handle);
roles_list = NULL;
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_stop\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_stop\n");
}
/* roles_cache_is_role_entry
@@ -693,7 +693,7 @@ static int roles_cache_is_role_entry(struct slapi_entry *entry)
if ( slapi_entry_attr_find(entry, "objectclass", &pObjclasses) )
{
- slapi_log_error( SLAPI_LOG_FATAL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
ROLES_PLUGIN_SUBSYSTEM,
"roles_cache_is_role_entry: failed to get objectclass from
%s\n",slapi_entry_get_dn_const(entry));
return(-1);
@@ -773,7 +773,7 @@ void roles_cache_change_notify(Slapi_PBlock *pb)
return ;
}
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM,
"--> roles_cache_change_notify\n");
@@ -837,7 +837,7 @@ void roles_cache_change_notify(Slapi_PBlock *pb)
}
break;
default:
- slapi_log_error( SLAPI_LOG_FATAL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
ROLES_PLUGIN_SUBSYSTEM,
"roles_cache_change_notify: unknown operation %d\n",operation);
return;
@@ -847,7 +847,7 @@ void roles_cache_change_notify(Slapi_PBlock *pb)
{
if ( roles_cache_is_role_entry(e) != 1 )
{
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_change_notify: not a role entry\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_change_notify: not a role entry\n");
return;
}
entry = slapi_entry_dup(e);
@@ -875,7 +875,7 @@ void roles_cache_change_notify(Slapi_PBlock *pb)
}
else
{
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_change_notify: not a role entry\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_change_notify: not a role entry\n");
return;
}
}
@@ -901,7 +901,7 @@ if ( e != NULL )
for ( i = 0; va[i] != NULL; i++ )
{
string = (char*)slapi_value_get_string(va[i]);
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
"roles_cache_change_notify:%s\n",string);
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
"roles_cache_change_notify:%s\n",string);
}
}
}
@@ -919,7 +919,7 @@ if ( e != NULL )
}
}
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_change_notify\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_change_notify\n");
}
@@ -932,7 +932,7 @@ static Slapi_DN* roles_cache_get_top_suffix(Slapi_DN *suffix)
Slapi_DN *current_suffix = NULL;
Slapi_DN parent_suffix;
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "-->
roles_cache_get_top_suffix\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "-->
roles_cache_get_top_suffix\n");
if ( suffix == NULL )
{
@@ -957,7 +957,7 @@ static Slapi_DN* roles_cache_get_top_suffix(Slapi_DN *suffix)
}
}
/* we should not return that way ... */
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_get_top_suffix\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_get_top_suffix\n");
slapi_sdn_done(&parent_suffix);
slapi_sdn_free(¤t_suffix);
return(NULL);
@@ -976,7 +976,7 @@ static int roles_cache_add_roles_from_suffix(Slapi_DN *suffix_dn,
roles_cache_de
roles_cache_search_roles info;
Slapi_PBlock *int_search_pb = NULL;
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "-->
roles_cache_add_roles_from_suffix\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "-->
roles_cache_add_roles_from_suffix\n");
info.suffix_def = suffix_def;
info.rc = LDAP_NO_SUCH_OBJECT;
@@ -1008,7 +1008,7 @@ static int roles_cache_add_roles_from_suffix(Slapi_DN *suffix_dn,
roles_cache_de
rc = 0;
}
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_add_roles_from_suffix\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_add_roles_from_suffix\n");
return(rc);
}
@@ -1048,13 +1048,13 @@ static int roles_cache_create_role_under(roles_cache_def**
roles_cache_suffix, S
int rc;
role_object *new_role = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_create_role_under:
%s - %p\n",
slapi_sdn_get_dn((*roles_cache_suffix)->suffix_dn),
(*roles_cache_suffix)->avl_tree);
rc = roles_cache_create_object_from_entry(entry,&new_role,0);
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM,
"roles_cache_create_role_under: create node for entry %s - rc: %d SUFFIX:
%p\n",
slapi_entry_get_dn_const(entry), rc, (*roles_cache_suffix)->avl_tree);
@@ -1063,7 +1063,7 @@ static int roles_cache_create_role_under(roles_cache_def**
roles_cache_suffix, S
{
/* Add to the tree where avl_data is a role_object struct */
rc = roles_cache_insert_object(&((*roles_cache_suffix)->avl_tree),new_role);
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "roles_cache_create_role_under:%s in tree %p rc:
%d\n",
(char*)slapi_sdn_get_ndn(new_role->dn),
(*roles_cache_suffix)->avl_tree, rc);
@@ -1088,7 +1088,7 @@ static int roles_cache_create_object_from_entry(Slapi_Entry
*role_entry, role_ob
role_object *this_role = NULL;
char *rolescopeDN = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
"--> roles_cache_create_object_from_entry\n");
*result = NULL;
@@ -1099,12 +1099,10 @@ static int roles_cache_create_object_from_entry(Slapi_Entry
*role_entry, role_ob
char *ndn = NULL;
ndn = slapi_entry_get_ndn( role_entry );
- slapi_log_error(
- SLAPI_LOG_FATAL,
- ROLES_PLUGIN_SUBSYSTEM,
- "Maximum roles nesting exceeded (%d), not retrieving roles from entry
%s--probable circular definition\n",
- MAX_NESTED_ROLES,
- ndn);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
+ "Maximum roles nesting exceeded (%d), not retrieving roles "
+ "from entry %s--probable circular definition\n",
+ MAX_NESTED_ROLES, ndn);
return (0);
}
@@ -1157,7 +1155,7 @@ static int roles_cache_create_object_from_entry(Slapi_Entry
*role_entry, role_ob
/* rolescopeDN belongs to the same suffix as the role, we
can use this scope */
this_role->rolescopedn = rolescopeSDN;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
ROLES_PLUGIN_SUBSYSTEM,
"%s: invalid %s - %s not in the same suffix.
Scope skipped.\n",
(char*) slapi_sdn_get_dn(this_role->dn),
ROLE_SCOPE_DN,
@@ -1168,7 +1166,7 @@ static int roles_cache_create_object_from_entry(Slapi_Entry
*role_entry, role_ob
slapi_sdn_free(&top_this_roleSDN);
} else {
/* this is an invalid DN, just ignore this parameter*/
- slapi_log_error(SLAPI_LOG_FATAL, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
ROLES_PLUGIN_SUBSYSTEM,
"%s: invalid %s - %s not a valid DN. Scope
skipped.\n",
(char*) slapi_sdn_get_dn(this_role->dn),
ROLE_SCOPE_DN,
@@ -1230,7 +1228,7 @@ static int roles_cache_create_object_from_entry(Slapi_Entry
*role_entry, role_ob
if (cosentries && *cosentries) {
slapi_free_search_results_internal(pb);
slapi_pblock_destroy(pb);
- slapi_log_error(SLAPI_LOG_FATAL, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
"%s: not allowed to refer virtual attribute "
"in the value of %s %s. The %s is disabled.\n",
(char*)slapi_sdn_get_ndn(this_role->dn),
@@ -1283,7 +1281,7 @@ static int roles_cache_create_object_from_entry(Slapi_Entry
*role_entry, role_ob
/* Make a DN from the string */
slapi_sdn_init_dn_byref(&nested_role_dn,string);
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "roles_cache_create_object_from_entry: dn %s,
nested %s\n",
(char*)slapi_sdn_get_ndn(this_role->dn),string);
@@ -1304,7 +1302,7 @@ static int roles_cache_create_object_from_entry(Slapi_Entry
*role_entry, role_ob
}
default:
- slapi_log_error(SLAPI_LOG_FATAL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
ROLES_PLUGIN_SUBSYSTEM, "wrong role type\n");
}
@@ -1313,7 +1311,7 @@ static int roles_cache_create_object_from_entry(Slapi_Entry
*role_entry, role_ob
*result = this_role;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
"<-- roles_cache_create_object_from_entry\n");
@@ -1336,7 +1334,7 @@ static int roles_cache_determine_class(Slapi_Entry *role_entry)
int rc = 0;
int type = 0;
- slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
"--> roles_cache_determine_class\n");
rc = slapi_entry_attr_find(role_entry,"objectclass",&attr);
@@ -1382,7 +1380,7 @@ static int roles_cache_determine_class(Slapi_Entry *role_entry)
return 0;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
"<-- roles_cache_determine_class\n");
/* Return the appropriate type ordinal */
@@ -1400,7 +1398,7 @@ static int roles_cache_node_cmp( caddr_t d1, caddr_t d2 )
/* role_to_insert and current_role are never NULL in that context */
- slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
"roles_cache_node_cmp\n");
return (slapi_sdn_compare((Slapi_DN *)role_to_insert->dn, (Slapi_DN
*)current_role->dn));
@@ -1413,7 +1411,7 @@ static int roles_cache_node_cmp( caddr_t d1, caddr_t d2 )
static int roles_cache_insert_object(Avlnode **tree, role_object *object)
{
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "roles_cache_insert_object: %s in tree %p\n",
(char*)slapi_sdn_get_ndn(object->dn),
*tree);
@@ -1431,7 +1429,7 @@ static int roles_cache_node_nested_cmp( caddr_t d1, caddr_t d2 )
/* role_to_insert and current_role are never NULL in that context */
- slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
"roles_cache_node_nested_cmp\n");
return slapi_sdn_compare(role_to_insert->dn, current_role->dn);
@@ -1443,7 +1441,7 @@ static int roles_cache_node_nested_cmp( caddr_t d1, caddr_t d2 )
*/
static int roles_cache_insert_object_nested(Avlnode **tree, role_object_nested *object)
{
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "roles_cache_insert_object_nested: %s in tree %p:
\n",
(char*)slapi_sdn_get_ndn(object->dn), *tree);
@@ -1460,7 +1458,7 @@ static int roles_cache_object_nested_from_dn(Slapi_DN *role_dn,
role_object_nest
{
role_object_nested *nested_role = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
"--> roles_cache_object_nested_from_dn\n");
*result = NULL;
@@ -1476,7 +1474,7 @@ static int roles_cache_object_nested_from_dn(Slapi_DN *role_dn,
role_object_nest
slapi_sdn_copy(role_dn,nested_role->dn);
*result = nested_role;
- slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
"<-- roles_cache_object_nested_from_dn\n");
return 0;
}
@@ -1501,7 +1499,7 @@ int roles_cache_listroles_ext(vattr_context *c, Slapi_Entry *entry,
int return_v
roles_cache_build_result arg;
Slapi_Backend *backend = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_listroles\n");
backend = slapi_mapping_tree_find_backend_for_sdn(slapi_entry_get_sdn(entry));
@@ -1569,7 +1567,7 @@ int roles_cache_listroles_ext(vattr_context *c, Slapi_Entry *entry,
int return_v
/* no roles associated */
rc = -1;
}
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_listroles\n");
return rc;
}
@@ -1592,7 +1590,7 @@ static int roles_cache_build_nsrole( caddr_t data, caddr_t arg )
int rc = 0;
int tmprc = 0;
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_build_nsrole: role
%s\n",
(char*) slapi_sdn_get_ndn(this_role->dn));
@@ -1629,7 +1627,7 @@ static int roles_cache_build_nsrole( caddr_t data, caddr_t arg )
slapi_value_free(&value);
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "<--
roles_cache_build_nsrole\n");
return rc;
@@ -1652,7 +1650,7 @@ int roles_check(Slapi_Entry *entry_to_check, Slapi_DN *role_dn, int
*present)
int rc = 0;
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_check\n");
*present = 0;
@@ -1687,7 +1685,7 @@ int roles_check(Slapi_Entry *entry_to_check, Slapi_DN *role_dn, int
*present)
roles_is_entry_member_of_object((caddr_t)this_role, (caddr_t)&get_nsrole);
*present = get_nsrole.present;
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "<-- roles_check\n");
return rc;
@@ -1704,7 +1702,7 @@ static int roles_cache_find_node( caddr_t d1, caddr_t d2 )
/* role is not NULL in that context */
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "roles_cache_find_node: %s %s\n",
slapi_sdn_get_dn(data), slapi_sdn_get_dn(role->dn));
@@ -1720,7 +1718,7 @@ static int roles_cache_find_roles_in_suffix(Slapi_DN
*target_entry_dn, roles_cac
int rc = -1;
Slapi_Backend *backend = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_find_roles_in_suffix\n");
*list_of_roles = NULL;
@@ -1754,7 +1752,7 @@ static int roles_cache_find_roles_in_suffix(Slapi_DN
*target_entry_dn, roles_cac
return rc;
}
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_find_roles_in_suffix\n");
return rc;
}
@@ -1780,18 +1778,18 @@ static int roles_is_entry_member_of_object_ext(vattr_context *c,
caddr_t data, c
Slapi_Entry *entry_to_check = get_nsrole->is_entry_member_of;
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_is_entry_member_of_object\n");
if (!this_role) {
- slapi_log_error(SLAPI_LOG_FATAL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
ROLES_PLUGIN_SUBSYSTEM, "roles_is_entry_member_of_object-> NULL
role\n");
goto done;
}
if (!roles_is_inscope(entry_to_check, this_role))
{
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "roles_is_entry_member_of_object-> entry not in
scope of role\n");
return rc;
}
@@ -1819,12 +1817,12 @@ static int roles_is_entry_member_of_object_ext(vattr_context *c,
caddr_t data, c
break;
}
default:
- slapi_log_error(SLAPI_LOG_FATAL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
ROLES_PLUGIN_SUBSYSTEM, "roles_is_entry_member_of_object-> invalid role
type\n");
}
}
done:
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "<-- roles_is_entry_member_of_object\n");
return rc;
}
@@ -1842,7 +1840,7 @@ static int roles_check_managed(Slapi_Entry *entry_to_check,
role_object *role, i
int rc = 0;
Slapi_Attr *attr = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_check_managed\n");
/* Get the attribute */
rc = slapi_entry_attr_find(entry_to_check,ROLE_MANAGED_ATTR_NAME,&attr);
@@ -1862,7 +1860,7 @@ static int roles_check_managed(Slapi_Entry *entry_to_check,
role_object *role, i
*present = 1;
}
}
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM,
"<-- roles_check_managed: entry %s role %s present %d\n",
slapi_entry_get_dn_const(entry_to_check),(char*)slapi_sdn_get_ndn(role->dn),*present);
@@ -1881,7 +1879,7 @@ static int roles_check_filtered(vattr_context *c, Slapi_Entry
*entry_to_check, r
{
int rc = 0;
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_check_filtered\n");
rc = slapi_vattr_filter_test_ext(slapi_vattr_get_pblock_from_context(c),
entry_to_check, role->filter, 0, 0);
@@ -1889,7 +1887,7 @@ static int roles_check_filtered(vattr_context *c, Slapi_Entry
*entry_to_check, r
{
*present = 1;
}
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM,
"<-- roles_check_filtered: entry %s role %s present %d\n",
slapi_entry_get_dn_const(entry_to_check),(char*)slapi_sdn_get_ndn(role->dn),*present);
@@ -1917,7 +1915,7 @@ static int roles_check_nested(caddr_t data, caddr_t arg)
char *ndn = NULL;
ndn = slapi_entry_get_ndn( get_nsrole->is_entry_member_of );
- slapi_log_error(SLAPI_LOG_FATAL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
ROLES_PLUGIN_SUBSYSTEM,
"Maximum roles nesting exceeded (max %d current %d), not checking roles in
entry %s--probable circular definition\n",
MAX_NESTED_ROLES,
@@ -1936,7 +1934,7 @@ static int roles_check_nested(caddr_t data, caddr_t arg)
roles_cache_def *roles_cache = NULL;
role_object *this_role = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM,
"-->roles_check_nested: entry %s role %s present %d\n",
slapi_entry_get_dn_const(get_nsrole->is_entry_member_of),
@@ -1961,7 +1959,7 @@ static int roles_check_nested(caddr_t data, caddr_t arg)
if ( this_role == NULL )
{
/* the nested role doesn't exist */
- slapi_log_error(SLAPI_LOG_FATAL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
ROLES_PLUGIN_SUBSYSTEM,
"The nested role %s doesn't exist\n",
(char*)slapi_sdn_get_ndn(current_nested_role->dn));
@@ -1978,7 +1976,7 @@ static int roles_check_nested(caddr_t data, caddr_t arg)
}
}
}
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "<-- roles_check_nested\n");
return rc;
}
@@ -1994,7 +1992,7 @@ static int roles_is_inscope(Slapi_Entry *entry_to_check, role_object
*this_role)
Slapi_DN role_parent;
Slapi_DN *scope_dn = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_is_inscope\n");
if (this_role->rolescopedn) {
@@ -2017,7 +2015,7 @@ static int roles_is_inscope(Slapi_Entry *entry_to_check, role_object
*this_role)
slapi_sdn_done(&role_parent);
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "<-- roles_is_inscope: entry %s role %s result
%d\n",
slapi_entry_get_dn_const(entry_to_check),(char*)slapi_sdn_get_ndn(scope_dn), rc);
@@ -2039,7 +2037,7 @@ static void roles_cache_role_def_delete(roles_cache_def *role_def)
roles_cache_def *current = roles_list;
roles_cache_def *previous = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_role_def_delete\n");
while ( current!= NULL )
@@ -2066,7 +2064,7 @@ static void roles_cache_role_def_delete(roles_cache_def *role_def)
current = current->next;
}
}
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_role_def_delete\n");
}
@@ -2075,7 +2073,7 @@ static void roles_cache_role_def_delete(roles_cache_def *role_def)
*/
static void roles_cache_role_def_free(roles_cache_def *role_def)
{
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_role_def_free\n");
if ( role_def == NULL )
{
@@ -2109,7 +2107,7 @@ static void roles_cache_role_def_free(roles_cache_def *role_def)
slapi_ch_free((void**)&role_def);
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_role_def_free\n");
}
@@ -2118,7 +2116,7 @@ static void roles_cache_role_def_free(roles_cache_def *role_def)
*/
static void roles_cache_role_object_free(role_object *this_role)
{
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_role_object_free\n");
if ( this_role == NULL )
@@ -2153,7 +2151,7 @@ static void roles_cache_role_object_free(role_object *this_role)
/* Free the object */
slapi_ch_free((void**)&this_role);
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_role_object_free\n");
}
@@ -2162,7 +2160,7 @@ static void roles_cache_role_object_free(role_object *this_role)
*/
static int roles_cache_role_object_nested_free(role_object_nested *this_role)
{
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_role_object_nested_free\n");
if ( this_role == NULL )
@@ -2175,7 +2173,7 @@ static int roles_cache_role_object_nested_free(role_object_nested
*this_role)
/* Free the object */
slapi_ch_free((void**)&this_role);
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_role_object_nested_free\n");
return 0;
@@ -2185,7 +2183,7 @@ static int roles_cache_dump( caddr_t data, caddr_t arg )
{
role_object *this_role = (role_object*)data;
- slapi_log_error(SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
ROLES_PLUGIN_SUBSYSTEM, "roles_cache_dump: %p - %s - %p\n",
this_role, (char*)slapi_sdn_get_ndn(this_role->dn), this_role->avl_tree);
diff --git a/ldap/servers/plugins/roles/roles_plugin.c
b/ldap/servers/plugins/roles/roles_plugin.c
index b9f8b7c..a1a54de 100644
--- a/ldap/servers/plugins/roles/roles_plugin.c
+++ b/ldap/servers/plugins/roles/roles_plugin.c
@@ -69,7 +69,7 @@ roles_postop_init ( Slapi_PBlock *pb )
slapi_pblock_set(pb, postadd, (void *) roles_post_op ) != 0 ||
slapi_pblock_set(pb, postdel, (void *) roles_post_op ) != 0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
"roles_postop_init: failed to register plugin\n" );
rc = -1;
}
@@ -92,7 +92,7 @@ roles_internalpostop_init ( Slapi_PBlock *pb )
slapi_pblock_set(pb, SLAPI_PLUGIN_INTERNAL_POST_DELETE_FN,
(void *) roles_post_op ) != 0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
"roles_internalpostop_init: failed to register plugin\n" );
rc = -1;
}
@@ -111,7 +111,7 @@ int roles_init( Slapi_PBlock *pb )
int is_betxn = 0;
const char *plugin_type = "postoperation";
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
"=> roles_init\n" );
slapi_pblock_get (pb, SLAPI_PLUGIN_IDENTITY, &plugin_identity);
@@ -132,7 +132,7 @@ int roles_init( Slapi_PBlock *pb )
slapi_pblock_set(pb, SLAPI_PLUGIN_CLOSE_FN,
(void *) roles_close ) != 0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
"roles_init failed\n" );
rc = -1;
goto bailout;
@@ -156,7 +156,7 @@ int roles_init( Slapi_PBlock *pb )
plugin_identity);
}
bailout:
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
"<= roles_init %d\n", rc );
return rc;
}
@@ -170,7 +170,7 @@ static int roles_start( Slapi_PBlock *pb )
int rc = 0;
void **statechange_api;
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
"=> roles_start\n" );
roles_cache_init();
@@ -193,7 +193,7 @@ static int roles_start( Slapi_PBlock *pb )
(notify_callback)
statechange_vattr_cache_invalidator_callback(statechange_api));
}
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
"<= roles_start %d\n", rc );
return rc;
}
@@ -207,7 +207,7 @@ static int roles_close( Slapi_PBlock *pb )
void **statechange_api;
int rc = 0;
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
"=> roles_close\n" );
roles_cache_stop();
@@ -220,7 +220,7 @@ static int roles_close( Slapi_PBlock *pb )
(notify_callback)
statechange_vattr_cache_invalidator_callback(statechange_api));
}
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
"<= roles_close %d\n", rc );
return rc;
}
@@ -327,11 +327,11 @@ int roles_sp_cleanup(void)
*/
static int roles_post_op( Slapi_PBlock *pb )
{
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "-->
roles_post_op\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "-->
roles_post_op\n");
roles_cache_change_notify(pb);
- slapi_log_error( SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_post_op\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<--
roles_post_op\n");
return SLAPI_PLUGIN_SUCCESS; /* always succeed */
}
diff --git a/ldap/servers/plugins/rootdn_access/rootdn_access.c
b/ldap/servers/plugins/rootdn_access/rootdn_access.c
index ddcad50..5ff03fd 100644
--- a/ldap/servers/plugins/rootdn_access/rootdn_access.c
+++ b/ldap/servers/plugins/rootdn_access/rootdn_access.c
@@ -109,7 +109,7 @@ rootdn_init(Slapi_PBlock *pb){
int status = 0;
char *plugin_identity = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, ROOTDN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ROOTDN_PLUGIN_SUBSYSTEM,
"--> rootdn_init\n");
/* Store the plugin identity for later use. Used for internal operations. */
@@ -123,7 +123,7 @@ rootdn_init(Slapi_PBlock *pb){
slapi_pblock_set(pb, SLAPI_PLUGIN_CLOSE_FN, (void *) rootdn_close) != 0 ||
slapi_pblock_set(pb, SLAPI_PLUGIN_DESCRIPTION, (void *) &pdesc) != 0 )
{
- slapi_log_error(SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_init:
failed to register plugin\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_init: failed to register plugin\n");
status = -1;
}
@@ -139,7 +139,7 @@ rootdn_init(Slapi_PBlock *pb){
NULL, /* ? */
plugin_identity /* access control */
)) {
- slapi_log_error(SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_init: failed to register rootdn preoperation
plugin\n");
status = -1;
}
@@ -148,12 +148,12 @@ rootdn_init(Slapi_PBlock *pb){
* Load the config
*/
if(rootdn_load_config(pb) != 0){
- slapi_log_error(SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_start: unable to load plug-in configuration\n");
return -1;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, ROOTDN_PLUGIN_SUBSYSTEM,"<--
rootdn_init\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROOTDN_PLUGIN_SUBSYSTEM,"<--
rootdn_init\n");
return status;
}
@@ -161,7 +161,7 @@ static int
rootdn_preop_bind_init(Slapi_PBlock *pb)
{
if(slapi_pblock_set(pb, SLAPI_PLUGIN_INTERNAL_PRE_BIND_FN, (void *)
rootdn_check_access) != 0){
- slapi_log_error(SLAPI_LOG_FATAL,
ROOTDN_PLUGIN_SUBSYSTEM,"rootdn_preop_bind_init: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
ROOTDN_PLUGIN_SUBSYSTEM,"rootdn_preop_bind_init: "
"failed to register function\n");
return -1;
}
@@ -172,11 +172,11 @@ rootdn_preop_bind_init(Slapi_PBlock *pb)
static int
rootdn_start(Slapi_PBlock *pb)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, ROOTDN_PLUGIN_SUBSYSTEM, "-->
rootdn_start\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROOTDN_PLUGIN_SUBSYSTEM, "-->
rootdn_start\n");
rootdn_set_plugin_dn(ROOTDN_PLUGIN_DN);
- slapi_log_error(SLAPI_LOG_PLUGIN, ROOTDN_PLUGIN_SUBSYSTEM, "<--
rootdn_start\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROOTDN_PLUGIN_SUBSYSTEM, "<--
rootdn_start\n");
return 0;
}
@@ -221,7 +221,7 @@ rootdn_load_config(Slapi_PBlock *pb)
int time;
int i;
- slapi_log_error(SLAPI_LOG_PLUGIN, ROOTDN_PLUGIN_SUBSYSTEM, "-->
rootdn_load_config\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROOTDN_PLUGIN_SUBSYSTEM, "-->
rootdn_load_config\n");
if ((slapi_pblock_get(pb, SLAPI_PLUGIN_CONFIG_ENTRY, &e) == 0) && e){
/*
@@ -241,7 +241,7 @@ rootdn_load_config(Slapi_PBlock *pb)
daysAllowed_tmp = strToLower(daysAllowed_tmp);
end = strspn(daysAllowed_tmp, "abcdefghijklmnopqrstuvwxyz ,");
if(!end || daysAllowed_tmp[end] != '\0'){
- slapi_log_error(SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
"invalid rootdn-days-allowed value (%s), must be all letters,
and comma separators\n", daysAllowed_tmp);
slapi_ch_free_string(&daysAllowed_tmp);
result = -1;
@@ -252,7 +252,7 @@ rootdn_load_config(Slapi_PBlock *pb)
token = ldap_utf8strtok_r(copy, ", ", &iter);
while(token){
if(strstr("mon tue wed thu fri sat sun",token) == 0){
- slapi_log_error(SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
"invalid rootdn-days-allowed day value(%s), must be
\"Mon, Tue, Wed, Thu, Fri, Sat, or Sun\".\n", token);
slapi_ch_free_string(&daysAllowed_tmp);
slapi_ch_free_string(©);
@@ -266,20 +266,20 @@ rootdn_load_config(Slapi_PBlock *pb)
if(openTime){
end = strspn(openTime, "0123456789");
if (!end || openTime[end] != '\0'){
- slapi_log_error(SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
"invalid rootdn-open-time value (%s), must be all
digits\n", openTime);
result = -1;
goto free_and_return;
}
time = atoi(openTime);
if(time > 2359 || time < 0){
- slapi_log_error(SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
"invalid value for rootdn-open-time value (%s), value must be
between 0000-2359\n", openTime);
result = -1;
goto free_and_return;
}
if(strlen(openTime) != 4){
- slapi_log_error(SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
"invalid format for rootdn-open-time value (%s). Should be
HHMM\n", openTime);
result = -1;
goto free_and_return;
@@ -294,20 +294,20 @@ rootdn_load_config(Slapi_PBlock *pb)
if(closeTime){
end = strspn(closeTime, "0123456789");
if (!end || closeTime[end] != '\0'){
- slapi_log_error(SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
"invalid rootdn-close-time value (%s), must be all digits, and
should be HHMM\n",closeTime);
result = -1;
goto free_and_return;
}
time = atoi(closeTime);
if(time > 2359 || time < 0){
- slapi_log_error(SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
"invalid value for rootdn-close-time value (%s), value must be
between 0000-2359\n", closeTime);
result = -1;
goto free_and_return;
}
if(strlen(closeTime) != 4){
- slapi_log_error(SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
"invalid format for rootdn-close-time value (%s), should be
HHMM\n", closeTime);
result = -1;
goto free_and_return;
@@ -321,7 +321,7 @@ rootdn_load_config(Slapi_PBlock *pb)
}
if((openTime && closeTime == NULL) || (openTime == NULL &&
closeTime)){
/* If you are using TOD access control, you must have a open and close time
*/
- slapi_log_error(SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
"there must be a open and a close time. Ignoring time based
settings.\n");
slapi_ch_free_string(&closeTime);
slapi_ch_free_string(&openTime);
@@ -332,7 +332,7 @@ rootdn_load_config(Slapi_PBlock *pb)
}
if(close_time && open_time && close_time <= open_time){
/* Make sure the closing time is greater than the open time */
- slapi_log_error(SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
"the close time must be greater than the open time\n");
result = -1;
goto free_and_return;
@@ -341,7 +341,7 @@ rootdn_load_config(Slapi_PBlock *pb)
for(i = 0; hosts_tmp[i] != NULL; i++){
end = strspn(hosts_tmp[i],
"0123456789.*-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz");
if(!end || hosts_tmp[i][end] != '\0'){
- slapi_log_error(SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
"hostname (%s) contains invalid characters,
skipping\n",hosts_tmp[i]);
slapi_ch_array_free(hosts_tmp);
result = -1;
@@ -353,7 +353,7 @@ rootdn_load_config(Slapi_PBlock *pb)
for(i = 0; hosts_to_deny_tmp[i] != NULL; i++){
end = strspn(hosts_to_deny_tmp[i],
"0123456789.*-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz");
if(!end || hosts_to_deny_tmp[i][end] != '\0'){
- slapi_log_error(SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
"hostname (%s) contains invalid characters,
skipping\n",hosts_to_deny_tmp[i]);
slapi_ch_array_free(hosts_to_deny_tmp);
result = -1;
@@ -365,7 +365,7 @@ rootdn_load_config(Slapi_PBlock *pb)
for(i = 0; ips_tmp[i] != NULL; i++){
end = strspn(ips_tmp[i], "0123456789:ABCDEFabcdef.");
if(!end || ips_tmp[i][end] != '\0'){
- slapi_log_error(SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
"IP address contains invalid characters (%s),
skipping\n", ips_tmp[i]);
slapi_ch_array_free(ips_tmp);
result = -1;
@@ -377,7 +377,7 @@ rootdn_load_config(Slapi_PBlock *pb)
*/
end = strspn(ips_tmp[i], "0123456789.*");
if(!end || ips_tmp[i][end] != '\0'){
- slapi_log_error(SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_load_config: "
"IPv4 address contains invalid characters (%s),
skipping\n", ips_tmp[i]);
slapi_ch_array_free(ips_tmp);
result = -1;
@@ -390,7 +390,7 @@ rootdn_load_config(Slapi_PBlock *pb)
for(i = 0; ips_to_deny_tmp[i] != NULL; i++){
end = strspn(ips_to_deny_tmp[i], "0123456789:ABCDEFabcdef.*");
if(!end || ips_to_deny_tmp[i][end] != '\0'){
- slapi_log_error(SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
"IP address contains invalid characters (%s),
skipping\n", ips_to_deny_tmp[i]);
slapi_ch_array_free(ips_to_deny_tmp);
result = -1;
@@ -402,7 +402,7 @@ rootdn_load_config(Slapi_PBlock *pb)
*/
end = strspn(ips_to_deny_tmp[i], "0123456789.*");
if(!end || ips_to_deny_tmp[i][end] != '\0'){
- slapi_log_error(SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_load_config: "
"IPv4 address contains invalid characters (%s),
skipping\n", ips_to_deny_tmp[i]);
slapi_ch_array_free(ips_to_deny_tmp);
result = -1;
@@ -413,7 +413,7 @@ rootdn_load_config(Slapi_PBlock *pb)
}
} else {
/* failed to get the plugin entry */
- slapi_log_error(SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_load_config: "
"Failed to get plugin entry\n");
result = -1;
}
@@ -433,7 +433,7 @@ free_and_return:
slapi_ch_free_string(&openTime);
slapi_ch_free_string(&closeTime);
- slapi_log_error(SLAPI_LOG_PLUGIN, ROOTDN_PLUGIN_SUBSYSTEM, "<--
rootdn_load_config (%d)\n", result);
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROOTDN_PLUGIN_SUBSYSTEM, "<--
rootdn_load_config (%d)\n", result);
return result;
}
@@ -473,7 +473,7 @@ rootdn_check_access(Slapi_PBlock *pb){
curr_total = (timeinfo->tm_hour * 3600) + (timeinfo->tm_min * 60);
if((curr_total < open_time) || (curr_total >= close_time)){
- slapi_log_error(SLAPI_LOG_PLUGIN, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_check_access: bind not in the "
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_check_access: bind not in the "
"allowed time window\n");
return -1;
}
@@ -493,7 +493,7 @@ rootdn_check_access(Slapi_PBlock *pb){
daysAllowed = strToLower(daysAllowed);
if(!strstr(daysAllowed, today)){
- slapi_log_error(SLAPI_LOG_PLUGIN, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_check_access: bind not allowed for today(%s), "
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_check_access: bind not allowed for today(%s), "
"only allowed on days: %s\n", today, daysAllowed);
return -1;
}
@@ -510,7 +510,7 @@ rootdn_check_access(Slapi_PBlock *pb){
*/
client_addr = (PRNetAddr *)slapi_ch_malloc(sizeof(PRNetAddr));
if ( slapi_pblock_get( pb, SLAPI_CONN_CLIENTNETADDR, client_addr ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_check_access: Could not get client address for hosts.\n" );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_check_access: Could not get client address for hosts.\n" );
rc = -1;
goto free_and_return;
}
@@ -524,12 +524,12 @@ rootdn_check_access(Slapi_PBlock *pb){
dnsName = slapi_ch_strdup( host_entry->h_name );
} else {
/* no hostname */
- slapi_log_error( SLAPI_LOG_PLUGIN, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_check_access: client address missing hostname\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_check_access: client address missing hostname\n");
rc = -1;
goto free_and_return;
}
} else {
- slapi_log_error( SLAPI_LOG_PLUGIN, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_check_access: client IP address could not be resolved\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_check_access: client IP address could not be resolved\n");
rc = -1;
goto free_and_return;
}
@@ -588,7 +588,7 @@ rootdn_check_access(Slapi_PBlock *pb){
if(client_addr == NULL){
client_addr = (PRNetAddr *)slapi_ch_malloc(sizeof(PRNetAddr));
if ( slapi_pblock_get( pb, SLAPI_CONN_CLIENTNETADDR, client_addr ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_check_access: Could not get client address for IP.\n" );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_check_access: Could not get client address for IP.\n" );
rc = -1;
goto free_and_return;
}
@@ -602,13 +602,13 @@ rootdn_check_access(Slapi_PBlock *pb){
v4addr.inet.family = PR_AF_INET;
v4addr.inet.ip = client_addr->ipv6.ip.pr_s6_addr32[3];
if( PR_NetAddrToString( &v4addr, ip_str, sizeof( ip_str )) !=
PR_SUCCESS){
- slapi_log_error( SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_check_access: Could not get IPv4 from client address.\n" );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_check_access: Could not get IPv4 from client address.\n" );
rc = -1;
goto free_and_return;
}
} else {
if( PR_NetAddrToString(client_addr, ip_str, sizeof(ip_str)) != PR_SUCCESS){
- slapi_log_error( SLAPI_LOG_FATAL, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_check_access: Could not get IPv6 from client address.\n" );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_check_access: Could not get IPv6 from client address.\n" );
rc = -1;
goto free_and_return;
}
diff --git a/ldap/servers/plugins/schema_reload/schema_reload.c
b/ldap/servers/plugins/schema_reload/schema_reload.c
index 6af76e2..593f2af 100644
--- a/ldap/servers/plugins/schema_reload/schema_reload.c
+++ b/ldap/servers/plugins/schema_reload/schema_reload.c
@@ -90,7 +90,7 @@ schemareload_start(Slapi_PBlock *pb)
int rc = 0;
if ((schemareload_lock = PR_NewLock()) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, "schemareload", "Failed to create
global schema reload lock.");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schemareload", "Failed
to create global schema reload lock.");
return -1;
}
rc = slapi_plugin_task_register_handler("schema reload task",
schemareload_add, pb);
@@ -136,7 +136,7 @@ schemareload_thread(void *arg)
return; /* no task */
}
slapi_task_inc_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, "schemareload",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "schemareload",
"schemareload_thread --> refcount incremented.\n" );
/* Fetch our task data from the task */
td = (task_data *)slapi_task_get_data(task);
@@ -148,7 +148,7 @@ schemareload_thread(void *arg)
slapi_task_begin(task, total_work);
PR_Lock(schemareload_lock); /* make schema reload serialized */
slapi_task_log_notice(task, "Schema reload task starts (schema dir: %s)
...\n", td->schemadir?td->schemadir:"default");
- slapi_log_error(SLAPI_LOG_FATAL, "schemareload", "Schema reload task
starts (schema dir: %s) ...\n",
td->schemadir?td->schemadir:"default");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schemareload", "Schema
reload task starts (schema dir: %s) ...\n",
td->schemadir?td->schemadir:"default");
rv = slapi_validate_schema_files(td->schemadir);
slapi_task_inc_progress(task);
@@ -156,11 +156,11 @@ schemareload_thread(void *arg)
if (slapi_is_shutting_down()) {
slapi_task_log_notice(task, "Server is shuttoing down; Schema validation
aborted.");
slapi_task_log_status(task, "Server is shuttoing down; Schema validation
aborted.");
- slapi_log_error(SLAPI_LOG_FATAL, "schemareload", "Server is
shuttoing down; Schema validation aborted.");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schemareload", "Server
is shuttoing down; Schema validation aborted.");
} else if (LDAP_SUCCESS == rv) {
slapi_task_log_notice(task, "Schema validation passed.");
slapi_task_log_status(task, "Schema validation passed.");
- slapi_log_error(SLAPI_LOG_FATAL, "schemareload", "Schema
validation passed.\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schemareload", "Schema
validation passed.\n");
rv = slapi_reload_schema_files(td->schemadir);
slapi_task_inc_progress(task);
@@ -169,23 +169,23 @@ schemareload_thread(void *arg)
if (LDAP_SUCCESS == rv) {
slapi_task_log_notice(task, "Schema reload task finished.");
slapi_task_log_status(task, "Schema reload task finished.");
- slapi_log_error(SLAPI_LOG_FATAL, "schemareload", "Schema
reload task finished.\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schemareload",
"Schema reload task finished.\n");
} else {
slapi_task_log_notice(task, "Schema reload task failed.");
slapi_task_log_status(task, "Schema reload task failed.");
- slapi_log_error(SLAPI_LOG_FATAL, "schemareload", "Schema
reload task failed.\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schemareload",
"Schema reload task failed.\n");
}
} else {
slapi_task_log_notice(task, "Schema validation failed.");
slapi_task_log_status(task, "Schema validation failed.");
- slapi_log_error(SLAPI_LOG_FATAL, "schemareload", "Schema
validation failed.\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schemareload", "Schema
validation failed.\n");
}
PR_Unlock(schemareload_lock);
/* this will queue the destruction of the task */
slapi_task_finish(task, rv);
slapi_task_dec_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, "schemareload",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "schemareload",
"schemareload_thread <-- refcount decremented.\n");
}
@@ -257,7 +257,7 @@ schemareload_add(Slapi_PBlock *pb, Slapi_Entry *e,
/* allocate new task now */
task = slapi_plugin_new_task(slapi_entry_get_ndn(e), arg);
if (task == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, "schemareload", "unable to
allocate new task!\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schemareload", "unable
to allocate new task!\n");
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -285,7 +285,7 @@ schemareload_add(Slapi_PBlock *pb, Slapi_Entry *e,
(void *)task, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, "schemareload",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schemareload",
"unable to create schema reload task thread!\n");
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
diff --git a/ldap/servers/plugins/statechange/statechange.c
b/ldap/servers/plugins/statechange/statechange.c
index 7521039..242efca 100644
--- a/ldap/servers/plugins/statechange/statechange.c
+++ b/ldap/servers/plugins/statechange/statechange.c
@@ -83,7 +83,7 @@ int statechange_init( Slapi_PBlock *pb )
int postmdn = SLAPI_PLUGIN_POST_MODRDN_FN;
int postdel = SLAPI_PLUGIN_POST_DELETE_FN;
- slapi_log_error( SLAPI_LOG_TRACE, SCN_PLUGIN_SUBSYSTEM, "-->
statechange_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, SCN_PLUGIN_SUBSYSTEM, "-->
statechange_init\n");
if ((slapi_pblock_get(pb, SLAPI_PLUGIN_CONFIG_ENTRY, &plugin_entry) == 0)
&&
plugin_entry &&
@@ -111,12 +111,12 @@ int statechange_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION,
(void *)&pdesc ) != 0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, SCN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SCN_PLUGIN_SUBSYSTEM,
"statechange_init: failed to register plugin\n" );
ret = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error( SLAPI_LOG_TRACE, SCN_PLUGIN_SUBSYSTEM, "<--
statechange_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, SCN_PLUGIN_SUBSYSTEM, "<--
statechange_init\n");
return ret;
}
@@ -130,7 +130,7 @@ static int statechange_start( Slapi_PBlock *pb )
{
int ret = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error( SLAPI_LOG_TRACE, SCN_PLUGIN_SUBSYSTEM, "-->
statechange_start\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, SCN_PLUGIN_SUBSYSTEM, "-->
statechange_start\n");
api[0] = 0; /* reserved for api broker use, must be zero */
api[1] = (void *)_statechange_register;
@@ -141,14 +141,14 @@ static int statechange_start( Slapi_PBlock *pb )
if(0 == (buffer_lock = slapi_new_mutex())) /* we never free this mutex */
{
/* badness */
- slapi_log_error( SLAPI_LOG_FATAL, SCN_PLUGIN_SUBSYSTEM, "statechange: failed to
create lock\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SCN_PLUGIN_SUBSYSTEM, "statechange:
failed to create lock\n");
ret = SLAPI_PLUGIN_FAILURE;
}
else
{
if( slapi_apib_register(StateChange_v1_0_GUID, api) )
{
- slapi_log_error( SLAPI_LOG_FATAL, SCN_PLUGIN_SUBSYSTEM, "statechange: failed to
publish state change interface\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SCN_PLUGIN_SUBSYSTEM, "statechange:
failed to publish state change interface\n");
ret = SLAPI_PLUGIN_FAILURE;
}
}
@@ -159,7 +159,7 @@ static int statechange_start( Slapi_PBlock *pb )
g_plugin_started = 1;
}
- slapi_log_error( SLAPI_LOG_TRACE, SCN_PLUGIN_SUBSYSTEM, "<--
statechange_start\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, SCN_PLUGIN_SUBSYSTEM, "<--
statechange_start\n");
return ret;
}
@@ -170,7 +170,7 @@ static int statechange_start( Slapi_PBlock *pb )
*/
static int statechange_close( Slapi_PBlock *pb )
{
- slapi_log_error( SLAPI_LOG_TRACE, SCN_PLUGIN_SUBSYSTEM, "-->
statechange_close\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, SCN_PLUGIN_SUBSYSTEM, "-->
statechange_close\n");
g_plugin_started = 0;
@@ -183,7 +183,7 @@ static int statechange_close( Slapi_PBlock *pb )
slapi_destroy_mutex(buffer_lock);
buffer_lock = NULL;
- slapi_log_error( SLAPI_LOG_TRACE, SCN_PLUGIN_SUBSYSTEM, "<--
statechange_close\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, SCN_PLUGIN_SUBSYSTEM, "<--
statechange_close\n");
return SLAPI_PLUGIN_SUCCESS;
}
@@ -232,7 +232,7 @@ static int statechange_post_op( Slapi_PBlock *pb, int modtype )
return SLAPI_PLUGIN_SUCCESS;
}
- slapi_log_error( SLAPI_LOG_TRACE, SCN_PLUGIN_SUBSYSTEM, "-->
statechange_post_op\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, SCN_PLUGIN_SUBSYSTEM, "-->
statechange_post_op\n");
/* evaluate this operation against the notification entries */
slapi_lock_mutex(buffer_lock);
@@ -240,7 +240,7 @@ static int statechange_post_op( Slapi_PBlock *pb, int modtype )
{
slapi_pblock_get( pb, SLAPI_TARGET_SDN, &sdn );
if (NULL == sdn) {
- slapi_log_error( SLAPI_LOG_FATAL, SCN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SCN_PLUGIN_SUBSYSTEM,
"statechange_post_op: failed to get dn of changed entry" );
goto bail;
}
@@ -293,7 +293,7 @@ static int statechange_post_op( Slapi_PBlock *pb, int modtype )
}
bail:
slapi_unlock_mutex(buffer_lock);
- slapi_log_error( SLAPI_LOG_TRACE, SCN_PLUGIN_SUBSYSTEM, "<--
statechange_post_op\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, SCN_PLUGIN_SUBSYSTEM, "<--
statechange_post_op\n");
return SLAPI_PLUGIN_SUCCESS; /* always succeed */
}
@@ -327,7 +327,7 @@ static int _statechange_register(char *caller_id, char *dn, char
*filter, void *
item->caller_data = caller_data;
if (writable_filter &&
(NULL == (item->realfilter = slapi_str2filter(writable_filter)))) {
- slapi_log_error(SLAPI_LOG_FATAL, SCN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SCN_PLUGIN_SUBSYSTEM,
"Error: invalid filter in statechange entry [%s]: [%s]\n",
dn, filter);
slapi_ch_free_string(&item->caller_id);
diff --git a/ldap/servers/plugins/sync/sync_init.c
b/ldap/servers/plugins/sync/sync_init.c
index b7e1b0e..111338b 100644
--- a/ldap/servers/plugins/sync/sync_init.c
+++ b/ldap/servers/plugins/sync/sync_init.c
@@ -20,7 +20,7 @@ int sync_init( Slapi_PBlock *pb )
char *plugin_identity = NULL;
int rc = 0;
- slapi_log_error(SLAPI_LOG_TRACE, SYNC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, SYNC_PLUGIN_SUBSYSTEM,
"--> sync_init\n");
/**
@@ -39,7 +39,7 @@ int sync_init( Slapi_PBlock *pb )
(void *) sync_close) != 0 ||
slapi_pblock_set(pb, SLAPI_PLUGIN_DESCRIPTION,
(void *) &pdesc) != 0 ) {
- slapi_log_error(SLAPI_LOG_FATAL, SYNC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
"sync_init: failed to register plugin\n");
rc = 1;
}
@@ -55,7 +55,7 @@ int sync_init( Slapi_PBlock *pb )
SYNC_PREOP_DESC,/* plugin desc */
NULL,
plugin_identity)) {
- slapi_log_error(SLAPI_LOG_FATAL, SYNC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
"sync_init: failed to register preop
plugin\n");
rc = 1;
}
@@ -71,7 +71,7 @@ int sync_init( Slapi_PBlock *pb )
SYNC_POSTOP_DESC, /* plugin desc */
NULL,
plugin_identity )) {
- slapi_log_error(SLAPI_LOG_FATAL, SYNC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
"sync_init: failed to register postop
plugin\n");
rc = 1;
}
@@ -119,12 +119,12 @@ sync_start(Slapi_PBlock * pb)
slapi_register_supported_control( LDAP_CONTROL_SYNC,
SLAPI_OPERATION_SEARCH );
- slapi_log_error(SLAPI_LOG_TRACE, SYNC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, SYNC_PLUGIN_SUBSYSTEM,
"--> sync_start\n");
if ( slapi_pblock_get( pb, SLAPI_PLUGIN_ARGC, &argc ) != 0 ||
slapi_pblock_get( pb, SLAPI_PLUGIN_ARGV, &argv ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, SYNC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
"unable to get arguments\n" );
return( -1 );
}
diff --git a/ldap/servers/plugins/sync/sync_persist.c
b/ldap/servers/plugins/sync/sync_persist.c
index 2f3397c..deb2bfe 100644
--- a/ldap/servers/plugins/sync/sync_persist.c
+++ b/ldap/servers/plugins/sync/sync_persist.c
@@ -202,10 +202,10 @@ sync_queue_change( Slapi_Entry *e, Slapi_Entry *eprev, ber_int_t
chgtype )
if ( matched ) {
/* Notify update threads */
sync_request_wakeup_all();
- slapi_log_error (SLAPI_LOG_TRACE, SYNC_PLUGIN_SUBSYSTEM, "sync search: enqueued
entry "
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, SYNC_PLUGIN_SUBSYSTEM, "sync search:
enqueued entry "
"\"%s\" on %d request listeners\n", slapi_entry_get_dn_const(e),
matched );
} else {
- slapi_log_error (SLAPI_LOG_TRACE, SYNC_PLUGIN_SUBSYSTEM, "sync search: entry
"
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, SYNC_PLUGIN_SUBSYSTEM, "sync search:
entry "
"\"%s\" not enqueued on any request search listeners\n",
slapi_entry_get_dn_const(e) );
}
@@ -220,15 +220,15 @@ sync_persist_initialize (int argc, char **argv)
if ( !SYNC_IS_INITIALIZED()) {
sync_request_list = (SyncRequestList *) slapi_ch_calloc( 1, sizeof( SyncRequestList
));
if (( sync_request_list->sync_req_rwlock = slapi_new_rwlock()) == NULL ) {
- slapi_log_error (SLAPI_LOG_FATAL, SYNC_PLUGIN_SUBSYSTEM,
"sync_persist_initialize: cannot initialize lock structure(1). ");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
"sync_persist_initialize: cannot initialize lock structure(1). ");
return( -1 );
}
if (( sync_request_list->sync_req_cvarlock = PR_NewLock()) == NULL ) {
- slapi_log_error (SLAPI_LOG_FATAL, SYNC_PLUGIN_SUBSYSTEM,
"sync_persist_initialize: cannot initialize lock structure(2). ");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
"sync_persist_initialize: cannot initialize lock structure(2). ");
return( -1 );
}
if (( sync_request_list->sync_req_cvar = PR_NewCondVar(
sync_request_list->sync_req_cvarlock )) == NULL ) {
- slapi_log_error (SLAPI_LOG_FATAL, SYNC_PLUGIN_SUBSYSTEM,
"sync_persist_initialize: cannot initialize condition variable. ");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
"sync_persist_initialize: cannot initialize condition variable. ");
return( -1 );
}
sync_request_list->sync_req_head = NULL;
@@ -284,7 +284,7 @@ sync_persist_add (Slapi_PBlock *pb)
if(NULL == (req->req_tid)){
int prerr;
prerr = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, "Content Synchronization Search",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Content Synchronization
Search",
"sync_persist_add function: failed to create persitent thread, error %d
(%s)\n",
prerr, slapi_pr_strerror(prerr));
/* Now remove the ps from the list so call the function ps_remove */
@@ -391,7 +391,7 @@ sync_request_alloc(void)
req->req_pblock = NULL;
if (( req->req_lock = PR_NewLock()) == NULL ) {
- slapi_log_error (SLAPI_LOG_FATAL, SYNC_PLUGIN_SUBSYSTEM, "sync_request_alloc:
cannot initialize lock structure. ");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
"sync_request_alloc: cannot initialize lock structure. ");
slapi_ch_free((void **)&req);
return( NULL );
}
@@ -460,7 +460,7 @@ sync_remove_request( SyncRequest *req )
}
SYNC_UNLOCK_WRITE();
if (!removed) {
- slapi_log_error (SLAPI_LOG_PLUGIN, SYNC_PLUGIN_SUBSYSTEM, "attempt to remove
nonexistent req");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, SYNC_PLUGIN_SUBSYSTEM, "attempt to
remove nonexistent req");
}
}
}
@@ -546,14 +546,14 @@ sync_send_results( void *arg )
slapi_pblock_get(req->req_pblock, SLAPI_OPERATION_ID, &opid);
slapi_pblock_get(req->req_pblock, SLAPI_CONNECTION, &conn);
if (NULL == conn) {
- slapi_log_error(SLAPI_LOG_FATAL, "Content Synchronization Search",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Content Synchronization Search",
"conn=%" NSPRIu64 " op=%d Null connection - aborted\n",
connid, opid);
return;
}
conn_acq_flag = sync_acquire_connection (conn);
if (conn_acq_flag) {
- slapi_log_error(SLAPI_LOG_FATAL, "Content Synchronization Search",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Content Synchronization Search",
"conn=%" NSPRIu64 " op=%d Could not acquire the connection -
aborted\n",
connid, opid);
return;
@@ -564,7 +564,7 @@ sync_send_results( void *arg )
while ( (conn_acq_flag == 0) && !req->req_complete &&
!plugin_closing) {
/* Check for an abandoned operation */
if ( op == NULL || slapi_is_operation_abandoned( op ) ) {
- slapi_log_error(SLAPI_LOG_PLUGIN, "Content Synchronization Search",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "Content Synchronization
Search",
"conn=%" NSPRIu64 " op=%d Operation no longer active -
terminating\n",
connid, opid);
break;
@@ -642,7 +642,7 @@ sync_send_results( void *arg )
ec, ectrls,
noattrs?noattrs:attrs, attrsonly );
if (rc) {
- slapi_log_error(SLAPI_LOG_CONNS, SYNC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONNS, LOG_DEBUG, SYNC_PLUGIN_SUBSYSTEM,
"Error %d sending entry %s\n",
rc, slapi_entry_get_dn_const(ec));
}
diff --git a/ldap/servers/plugins/sync/sync_refresh.c
b/ldap/servers/plugins/sync/sync_refresh.c
index beb87ab..091098f 100644
--- a/ldap/servers/plugins/sync/sync_refresh.c
+++ b/ldap/servers/plugins/sync/sync_refresh.c
@@ -441,7 +441,7 @@ sync_read_entry_from_changelog( Slapi_Entry *cl_entry, void *cb_data)
uniqueid = sync_get_attr_value_from_entry (cl_entry, CL_ATTR_UNIQUEID);
if (uniqueid == NULL) {
- slapi_log_error (SLAPI_LOG_FATAL, SYNC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
"Retro Changelog does not provied nsuniquedid."
"Check RCL plugin configuration.\n" );
return(1);
@@ -449,14 +449,14 @@ sync_read_entry_from_changelog( Slapi_Entry *cl_entry, void
*cb_data)
chgnr = sync_get_attr_value_from_entry (cl_entry, CL_ATTR_CHANGENUMBER);
chgnum = sync_number2ulong(chgnr);
if (SYNC_INVALID_CHANGENUM == chgnum) {
- slapi_log_error (SLAPI_LOG_FATAL, SYNC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
"Change number provided by Retro Changelog is invalid: %s\n", chgnr);
slapi_ch_free_string(&chgnr);
slapi_ch_free_string(&uniqueid);
return(1);
}
if (chgnum < cb->change_start) {
- slapi_log_error (SLAPI_LOG_FATAL, SYNC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
"Change number provided by Retro Changelog %s is less than the initial number
%lu\n",
chgnr, cb->change_start);
slapi_ch_free_string(&chgnr);
diff --git a/ldap/servers/plugins/sync/sync_util.c
b/ldap/servers/plugins/sync/sync_util.c
index 1dcff91..8c26774 100644
--- a/ldap/servers/plugins/sync/sync_util.c
+++ b/ldap/servers/plugins/sync/sync_util.c
@@ -384,7 +384,7 @@ sync_cookie_get_server_info(Slapi_PBlock *pb)
slapi_pblock_get(srch_pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, SYNC_PLUGIN_SUBSYSTEM,
"sync_cookie_get_server_info: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
"sync_cookie_get_server_info: "
"unable to read server configuration: error %d\n", rc);
}
else
@@ -392,7 +392,7 @@ sync_cookie_get_server_info(Slapi_PBlock *pb)
slapi_pblock_get(srch_pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries);
if (NULL == entries || NULL == entries[0])
{
- slapi_log_error(SLAPI_LOG_FATAL, SYNC_PLUGIN_SUBSYSTEM,
"sync_cookie_get_server_info: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
"sync_cookie_get_server_info: "
"server configuration missing\n");
rc = -1;
}
diff --git a/ldap/servers/plugins/syntaxes/syntax_common.c
b/ldap/servers/plugins/syntaxes/syntax_common.c
index c8aa80d..abaac10 100644
--- a/ldap/servers/plugins/syntaxes/syntax_common.c
+++ b/ldap/servers/plugins/syntaxes/syntax_common.c
@@ -51,7 +51,7 @@ syntax_matching_rule_plugin_init(
slapi_pblock_get(pb, SLAPI_PLUGIN_ARGV, &argv);
if (!argv || !argv[0]) {
- slapi_log_error(SLAPI_LOG_FATAL, "syntax_matching_rule_plugin_init",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"syntax_matching_rule_plugin_init",
"Error: matching rule plugin name not specified\n");
return rc;
}
@@ -77,7 +77,7 @@ syntax_matching_rule_plugin_init(
}
if (!mrpd) {
- slapi_log_error(SLAPI_LOG_FATAL, "syntax_matching_rule_plugin_init",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"syntax_matching_rule_plugin_init",
"Error: matching rule plugin name [%s] not found\n",
argv[0]);
} else {
diff --git a/ldap/servers/plugins/syntaxes/validate_task.c
b/ldap/servers/plugins/syntaxes/validate_task.c
index 4eb3c1e..abf99b5 100644
--- a/ldap/servers/plugins/syntaxes/validate_task.c
+++ b/ldap/servers/plugins/syntaxes/validate_task.c
@@ -132,7 +132,7 @@ syntax_validate_task_add(Slapi_PBlock *pb, Slapi_Entry *e,
(void *)task, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL) {
- slapi_log_error( SLAPI_LOG_FATAL, SYNTAX_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNTAX_PLUGIN_SUBSYSTEM,
"unable to create task thread!\n");
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -176,7 +176,7 @@ syntax_validate_task_thread(void *arg)
return; /* no task */
}
slapi_task_inc_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, SYNTAX_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, SYNTAX_PLUGIN_SUBSYSTEM,
"syntax_validate_task_thread --> refcount incremented.\n"
);
/* Fetch our task data from the task */
td = (task_data *)slapi_task_get_data(task);
@@ -185,7 +185,7 @@ syntax_validate_task_thread(void *arg)
slapi_task_begin(task, 1);
slapi_task_log_notice(task, "Syntax validation task starting (arg: %s)
...\n",
td->filter_str);
- slapi_log_error(SLAPI_LOG_FATAL, SYNTAX_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNTAX_PLUGIN_SUBSYSTEM,
"Syntax validate task starting (base: \"%s\", filter:
\"%s\") ...\n",
td->dn, td->filter_str);
@@ -205,7 +205,7 @@ syntax_validate_task_thread(void *arg)
" invalid entries.\n",
slapi_counter_get_value(td->invalid_entries));
slapi_task_log_status(task, "Syntax validate task complete. Found %"
NSPRIu64
" invalid entries.\n",
slapi_counter_get_value(td->invalid_entries));
- slapi_log_error(SLAPI_LOG_FATAL, SYNTAX_PLUGIN_SUBSYSTEM, "Syntax validate task
complete."
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNTAX_PLUGIN_SUBSYSTEM, "Syntax validate
task complete."
" Found %" NSPRIu64 " invalid entries.\n",
slapi_counter_get_value(td->invalid_entries));
slapi_task_inc_progress(task);
@@ -213,7 +213,7 @@ syntax_validate_task_thread(void *arg)
/* this will queue the destruction of the task */
slapi_task_finish(task, rc);
slapi_task_dec_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, SYNTAX_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, SYNTAX_PLUGIN_SUBSYSTEM,
"syntax_validate_task_thread <-- refcount decremented.\n");
}
@@ -244,7 +244,7 @@ syntax_validate_task_callback(Slapi_Entry *e, void *callback_data)
pb = slapi_pblock_new();
slapi_entry_syntax_check(pb, e, 1);
slapi_pblock_get(pb, SLAPI_PB_RESULT_TEXT, &error_text);
- slapi_log_error(SLAPI_LOG_FATAL, SYNTAX_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNTAX_PLUGIN_SUBSYSTEM,
"Entry \"%s\" violates syntax.\n%s",
dn, error_text);
slapi_pblock_destroy(pb);
diff --git a/ldap/servers/plugins/uiduniq/7bit.c b/ldap/servers/plugins/uiduniq/7bit.c
index fe43f98..1c0dcbb 100644
--- a/ldap/servers/plugins/uiduniq/7bit.c
+++ b/ldap/servers/plugins/uiduniq/7bit.c
@@ -67,7 +67,7 @@ static char *moreInfo =
static int
op_error(int internal_error)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"Internal error: %d\n", internal_error);
return LDAP_OPERATIONS_ERROR;
@@ -78,7 +78,7 @@ issue_error(Slapi_PBlock *pb, int result, char *type, char *value)
{
char *moreinfop;
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"%s result %d\n", type, result);
if (value == NULL) {
@@ -105,7 +105,7 @@ bit_check_one_berval(const struct berval *value, char **violated)
int i;
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "7-bit checking begin\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "7-bit checking
begin\n");
#endif
result = LDAP_SUCCESS;
@@ -166,7 +166,7 @@ bit_check(Slapi_Attr *attr, struct berval **values, char **violated)
}
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"7 bit check result = %d\n", result);
#endif
@@ -186,7 +186,7 @@ preop_add(Slapi_PBlock *pb)
char *pwd = NULL;
char *origpwd = NULL;
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "ADD begin\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "ADD begin\n");
#endif
result = LDAP_SUCCESS;
@@ -238,7 +238,7 @@ preop_add(Slapi_PBlock *pb)
dn = slapi_sdn_get_dn(sdn);
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "ADD target=%s\n", dn);
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "ADD
target=%s\n", dn);
#endif
/*
@@ -290,7 +290,7 @@ preop_add(Slapi_PBlock *pb)
if (slapi_dn_issuffix(dn, *subtreeDN))
{
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"ADD subtree=%s\n", *subtreeDN);
#endif
@@ -348,7 +348,7 @@ preop_modify(Slapi_PBlock *pb)
int checkmodsCapacity = 0; /* max capacity of checkmods */
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"MODIFY begin\n");
#endif
@@ -472,7 +472,7 @@ preop_modify(Slapi_PBlock *pb)
if (slapi_dn_issuffix(target, *subtreeDN))
{
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"MODIFY subtree=%s\n", *subtreeDN);
#endif
/*
@@ -511,7 +511,7 @@ preop_modrdn(Slapi_PBlock *pb)
char *violated = NULL;
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"MODRDN begin\n");
#endif
@@ -572,7 +572,7 @@ preop_modrdn(Slapi_PBlock *pb)
if (err) { result = op_error(33); break; }
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"MODRDN newrdn=%s\n", rdn);
#endif
@@ -593,7 +593,7 @@ preop_modrdn(Slapi_PBlock *pb)
err = slapi_entry_add_rdn_values(e);
if (err)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"MODRDN bad rdn value=%s\n", rdn);
break; /* Bad DN */
}
@@ -638,7 +638,7 @@ preop_modrdn(Slapi_PBlock *pb)
if (slapi_dn_issuffix(slapi_sdn_get_dn(superior), *subtreeDN))
{
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"MODRDN subtree=%s\n", *subtreeDN);
#endif
@@ -713,7 +713,7 @@ NS7bitAttr_Init(Slapi_PBlock *pb)
if (err) break;
for (attr_count = 0; argv && argv[attr_count]; attr_count++) {
- slapi_log_error(SLAPI_LOG_PLUGIN, "NS7bitAttr_Init", "%d:
%s\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "NS7bitAttr_Init",
"%d: %s\n",
attr_count, argv[attr_count]);
}
/*
@@ -730,7 +730,7 @@ NS7bitAttr_Init(Slapi_PBlock *pb)
for(;argc > 0;argc--, argv++) {
err = slapi_dn_syntax_check(pb, *argv, 1);
if (err) {
- slapi_log_error(SLAPI_LOG_FATAL, "NS7bitAttr_Init",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "NS7bitAttr_Init",
"Invalid suffix: %s\n", *argv);
continue;
}
@@ -761,28 +761,28 @@ NS7bitAttr_Init(Slapi_PBlock *pb)
if (err) {
if(err == -1){
- slapi_log_error(SLAPI_LOG_PLUGIN, "NS7bitAttr_Init","Error:
%d\n", err);
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
"NS7bitAttr_Init","Error: %d\n", err);
} else if(err == -2){
- slapi_log_error(SLAPI_LOG_FATAL, "NS7bitAttr_Init",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "NS7bitAttr_Init",
"Invalid plugin arguments - missing arguments\n");
} else if(err == -3){
- slapi_log_error(SLAPI_LOG_FATAL, "NS7bitAttr_Init",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "NS7bitAttr_Init",
"Invalid plugin arguments - missing \",\" separator
argument\n");
} else if(err == -4){
- slapi_log_error(SLAPI_LOG_FATAL, "NS7bitAttr_Init",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "NS7bitAttr_Init",
"Invalid plugin arguments - missing attributes\n");
} else if(err == -5){
- slapi_log_error(SLAPI_LOG_FATAL, "NS7bitAttr_Init",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "NS7bitAttr_Init",
"Invalid plugin arguments - missing suffix\n");
} else if(err == -6){
- slapi_log_error(SLAPI_LOG_FATAL, "NS7bitAttr_Init",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "NS7bitAttr_Init",
"Invalid plugin arguments - Invalid suffix list\n");
}
err = -1;
}
else
- slapi_log_error(SLAPI_LOG_PLUGIN, "NS7bitAttr_Init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "NS7bitAttr_Init",
"plugin loaded\n");
return err;
diff --git a/ldap/servers/plugins/uiduniq/uid.c b/ldap/servers/plugins/uiduniq/uid.c
index f842654..5542ae4 100644
--- a/ldap/servers/plugins/uiduniq/uid.c
+++ b/ldap/servers/plugins/uiduniq/uid.c
@@ -178,7 +178,7 @@ uniqueness_entry_to_config(Slapi_PBlock *pb, Slapi_Entry
*config_entry)
/* We are going to fill tmp_config in a first phase */
if ((tmp_config = (attr_uniqueness_config_t *) slapi_ch_calloc(1, sizeof
(attr_uniqueness_config_t))) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name, "load_config failed to
allocate configuration\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "load_config
failed to allocate configuration\n");
rc = SLAPI_PLUGIN_FAILURE;
goto done;
} else {
@@ -209,7 +209,7 @@ uniqueness_entry_to_config(Slapi_PBlock *pb, Slapi_Entry
*config_entry)
tmp_config->attrs = (const char **) slapi_ch_calloc(i + 1,
sizeof(char *));
for (i = 0; values && values[i]; i++) {
tmp_config->attrs[i] = slapi_ch_strdup(values[i]);
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
"Adding attribute %s to uniqueness set\n", tmp_config->attrs[i]);
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"Adding attribute %s to uniqueness set\n", tmp_config->attrs[i]);
}
slapi_ch_array_free(values);
values = NULL;
@@ -224,7 +224,7 @@ uniqueness_entry_to_config(Slapi_PBlock *pb, Slapi_Entry
*config_entry)
/* copy the valid subtree DN into the config */
for (i = 0, nb_subtrees = 0; values && values[i]; i++) {
if (slapi_dn_syntax_check(pb, values[i], 1)) { /* syntax
check failed */
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
"Config info: Invalid DN (skipped): %s\n", values[i]);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
plugin_name, "Config info: Invalid DN (skipped): %s\n", values[i]);
continue;
}
tmp_config->subtrees[nb_subtrees] =
slapi_sdn_new_dn_byval(values[i]);
@@ -245,7 +245,7 @@ uniqueness_entry_to_config(Slapi_PBlock *pb, Slapi_Entry
*config_entry)
/* copy the valid subtree DN into the config */
for (i = 0, nb_subtrees = 0; values && values[i]; i++) {
if (slapi_dn_syntax_check(pb, values[i], 1)) { /* syntax
check failed */
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
"Config info: Invalid DN (skipped): %s\n", values[i]);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
plugin_name, "Config info: Invalid DN (skipped): %s\n", values[i]);
continue;
}
tmp_config->exclude_subtrees[nb_subtrees] =
slapi_sdn_new_dn_byval(values[i]);
@@ -275,7 +275,7 @@ uniqueness_entry_to_config(Slapi_PBlock *pb, Slapi_Entry
*config_entry)
/* using the old style of configuration */
result = getArguments(pb, &attrName, &markerObjectClass,
&requiredObjectClass);
if (LDAP_OPERATIONS_ERROR == result) {
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "Config fail:
unable to parse old style\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"Config fail: unable to parse old style\n");
rc = SLAPI_PLUGIN_FAILURE;
goto done;
@@ -293,7 +293,7 @@ uniqueness_entry_to_config(Slapi_PBlock *pb, Slapi_Entry
*config_entry)
*/
if (slapi_pblock_get(pb, SLAPI_PLUGIN_ARGC, &argc) ||
slapi_pblock_get(pb, SLAPI_PLUGIN_ARGV, &argv)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
"Config fail: Only attribute name is valid\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"Config fail: Only attribute name is valid\n");
rc = SLAPI_PLUGIN_FAILURE;
goto done;
}
@@ -307,7 +307,7 @@ uniqueness_entry_to_config(Slapi_PBlock *pb, Slapi_Entry
*config_entry)
/* Store the subtrees */
nb_subtrees = 0;
if ((tmp_config->subtrees = (Slapi_DN **) slapi_ch_calloc(argc
+ 1, sizeof (Slapi_DN *))) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
"Config info: Fail to allocate subtree array\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Config info: Fail to allocate subtree array\n");
rc = SLAPI_PLUGIN_FAILURE;
goto done;
}
@@ -315,7 +315,7 @@ uniqueness_entry_to_config(Slapi_PBlock *pb, Slapi_Entry
*config_entry)
for (; argc > 0; argc--, argv++) {
if (slapi_dn_syntax_check(pb, *argv, 1)) { /* syntax
check failed */
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
"Config info: Invalid DN (skipped): %s\n", *argv);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
plugin_name, "Config info: Invalid DN (skipped): %s\n", *argv);
continue;
}
tmp_config->subtrees[nb_subtrees] =
slapi_sdn_new_dn_byval(*argv);
@@ -360,7 +360,7 @@ uniqueness_entry_to_config(Slapi_PBlock *pb, Slapi_Entry
*config_entry)
/* Time to check that the new configuration is valid */
/* Check that we have 1 or more value */
if (tmp_config->attrs == NULL) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name, "Config info:
attribute name not defined \n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "Config info:
attribute name not defined \n");
rc = SLAPI_PLUGIN_FAILURE;
goto done;
}
@@ -381,13 +381,13 @@ uniqueness_entry_to_config(Slapi_PBlock *pb, Slapi_Entry
*config_entry)
if (tmp_config->subtrees == NULL) {
/* Uniqueness is enforced on entries matching objectclass */
if (tmp_config->subtree_entries_oc == NULL) {
- slapi_log_error( SLAPI_LOG_FATAL, plugin_name, "Config info:
objectclass for subtree entries is not defined\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
"Config info: objectclass for subtree entries is not defined\n");
rc = SLAPI_PLUGIN_FAILURE;
goto done;
}
} else if (tmp_config->subtrees[0] == NULL) {
/* Uniqueness is enforced on subtrees but none are defined */
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name, "Config info: No valid
subtree is defined \n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "Config info:
No valid subtree is defined \n");
rc = SLAPI_PLUGIN_FAILURE;
goto done;
}
@@ -424,9 +424,10 @@ static int
uid_op_error(int internal_error)
{
slapi_log_error(
- SLAPI_LOG_PLUGIN,
- plugin_name,
- "Internal error: %d\n",
+ SLAPI_LOG_PLUGIN,
+ LOG_DEBUG,
+ plugin_name,
+ "Internal error: %d\n",
internal_error);
return LDAP_OPERATIONS_ERROR;
@@ -577,7 +578,7 @@ search(Slapi_DN *baseDN, const char **attrNames, Slapi_Attr *attr,
#ifdef DEBUG
/* Fix this later to print all the attr names */
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"SEARCH baseDN=%s attr=%s target=%s\n",
slapi_sdn_get_dn(baseDN), attrNames[0],
target?slapi_sdn_get_dn(target):"None");
#endif
@@ -619,7 +620,7 @@ search(Slapi_DN *baseDN, const char **attrNames, Slapi_Attr *attr,
}
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"SEARCH result = %d\n", result);
#endif
@@ -655,7 +656,7 @@ search_one_berval(Slapi_DN *baseDN, const char **attrNames,
filter = create_filter(attrNames, value, requiredObjectClass);
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"SEARCH filter=%s\n", filter);
#endif
@@ -687,7 +688,7 @@ search_one_berval(Slapi_DN *baseDN, const char **attrNames,
for(;*entries;entries++)
{
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"SEARCH entry dn=%s\n", slapi_entry_get_dn(*entries));
#endif
@@ -723,7 +724,7 @@ search_one_berval(Slapi_DN *baseDN, const char **attrNames,
}
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"SEARCH complete result=%d\n", result);
#endif
END
@@ -947,7 +948,7 @@ preop_add(Slapi_PBlock *pb)
char * attr_friendly = NULL;
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "ADD begin\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "ADD begin\n");
#endif
result = LDAP_SUCCESS;
@@ -978,7 +979,7 @@ preop_add(Slapi_PBlock *pb)
}
slapi_pblock_get(pb, SLAPI_PLUGIN_PRIVATE, &config);
if (config == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name, "preop_modrdn fail to
retrieve the config\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "preop_modrdn
fail to retrieve the config\n");
result = LDAP_OPERATIONS_ERROR;
break;
}
@@ -998,7 +999,7 @@ preop_add(Slapi_PBlock *pb)
if (err) { result = uid_op_error(51); break; }
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "ADD target=%s\n",
slapi_sdn_get_dn(sdn));
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "ADD
target=%s\n", slapi_sdn_get_dn(sdn));
#endif
/*
@@ -1049,7 +1050,7 @@ preop_add(Slapi_PBlock *pb)
if (result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"ADD result %d\n", result);
if (result == LDAP_CONSTRAINT_VIOLATION) {
@@ -1100,7 +1101,7 @@ preop_modify(Slapi_PBlock *pb)
char *attr_friendly = NULL;
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"MODIFY begin\n");
#endif
@@ -1128,7 +1129,7 @@ preop_modify(Slapi_PBlock *pb)
slapi_pblock_get(pb, SLAPI_PLUGIN_PRIVATE, &config);
if (config == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name, "preop_modrdn fail to
retrieve the config\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "preop_modrdn
fail to retrieve the config\n");
result = LDAP_OPERATIONS_ERROR;
break;
}
@@ -1216,7 +1217,7 @@ preop_modify(Slapi_PBlock *pb)
freePblock(spb);
if (result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"MODIFY result %d\n", result);
if (result == LDAP_CONSTRAINT_VIOLATION) {
@@ -1252,7 +1253,7 @@ preop_modrdn(Slapi_PBlock *pb)
struct attr_uniqueness_config *config = NULL;
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"MODRDN begin\n");
#endif
@@ -1280,7 +1281,7 @@ preop_modrdn(Slapi_PBlock *pb)
slapi_pblock_get(pb, SLAPI_PLUGIN_PRIVATE, &config);
if (config == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name, "preop_modrdn fail to
retrieve the config\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "preop_modrdn
fail to retrieve the config\n");
result = LDAP_OPERATIONS_ERROR;
break;
}
@@ -1316,7 +1317,7 @@ preop_modrdn(Slapi_PBlock *pb)
err = slapi_pblock_get(pb, SLAPI_MODRDN_NEWRDN, &rdn);
if (err) { result = uid_op_error(33); break; }
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"MODRDN newrdn=%s\n", rdn);
#endif
@@ -1383,7 +1384,7 @@ preop_modrdn(Slapi_PBlock *pb)
if (result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"MODRDN result %d\n", result);
if (result == LDAP_CONSTRAINT_VIOLATION) {
@@ -1498,11 +1499,11 @@ NSUniqueAttr_Init(Slapi_PBlock *pb)
END
if (err) {
- slapi_log_error(SLAPI_LOG_PLUGIN, "NSUniqueAttr_Init", "Error:
%d\n", err);
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "NSUniqueAttr_Init",
"Error: %d\n", err);
err = -1;
}
else
- slapi_log_error(SLAPI_LOG_PLUGIN, "NSUniqueAttr_Init", "plugin
loaded\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "NSUniqueAttr_Init",
"plugin loaded\n");
return err;
}
diff --git a/ldap/servers/plugins/uiduniq/utils.c b/ldap/servers/plugins/uiduniq/utils.c
index 61b1a86..d2a791e 100644
--- a/ldap/servers/plugins/uiduniq/utils.c
+++ b/ldap/servers/plugins/uiduniq/utils.c
@@ -39,7 +39,7 @@ static char *plugin_name = "utils";
*/
int
op_error(int internal_error) {
- slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
"Internal error: %d\n", internal_error);
return LDAP_OPERATIONS_ERROR;
diff --git a/ldap/servers/plugins/usn/usn.c b/ldap/servers/plugins/usn/usn.c
index 9b866ed..a5ab18b 100644
--- a/ldap/servers/plugins/usn/usn.c
+++ b/ldap/servers/plugins/usn/usn.c
@@ -52,7 +52,7 @@ usn_init(Slapi_PBlock *pb)
int is_betxn = 0;
const char *plugintype;
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"--> usn_init\n");
slapi_pblock_get(pb, SLAPI_PLUGIN_IDENTITY, &identity);
@@ -68,7 +68,7 @@ usn_init(Slapi_PBlock *pb)
SLAPI_PLUGIN_VERSION_01) != 0 ||
slapi_pblock_set(pb, SLAPI_PLUGIN_DESCRIPTION,
(void *)&pdesc) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"usn_init: failed to register version &
description\n");
rc = -1;
goto bail;
@@ -77,7 +77,7 @@ usn_init(Slapi_PBlock *pb)
(void *)usn_start) != 0 ||
slapi_pblock_set(pb, SLAPI_PLUGIN_CLOSE_FN,
(void *)usn_close) != 0 ) {
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"usn_init: failed to register close callback &
task\n");
rc = -1;
goto bail;
@@ -109,7 +109,7 @@ usn_init(Slapi_PBlock *pb)
"USN bepostoperation plugin", NULL, identity);
usn_set_identity(identity);
bail:
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"<-- usn_init\n");
return rc;
}
@@ -122,7 +122,7 @@ usn_preop_init(Slapi_PBlock *pb)
int predel = SLAPI_PLUGIN_PRE_DELETE_FN;
if (slapi_pblock_set(pb, predel, (void *)usn_preop_delete) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"usn_preop_init: failed to register preop plugin\n");
rc = SLAPI_PLUGIN_FAILURE;
}
@@ -143,7 +143,7 @@ usn_bepreop_init(Slapi_PBlock *pb)
* transaction start */
if ((slapi_pblock_set(pb, premod, (void *)usn_bepreop_modify) != 0) ||
(slapi_pblock_set(pb, premdn, (void *)usn_bepreop_modify) != 0)) {
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"usn_bepreop_init: failed to register bepreop
plugin\n");
rc = SLAPI_PLUGIN_FAILURE;
}
@@ -160,7 +160,7 @@ usn_betxnpreop_init(Slapi_PBlock *pb)
if ((slapi_pblock_set(pb, preadd, (void *)usn_betxnpreop_add) != 0) ||
(slapi_pblock_set(pb, predel, (void *)usn_betxnpreop_delete) != 0)) {
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"usn_betxnpreop_init: failed to register betxnpreop
plugin\n");
rc = SLAPI_PLUGIN_FAILURE;
}
@@ -195,7 +195,7 @@ usn_bepostop_init(Slapi_PBlock *pb)
(slapi_pblock_set(pb, postdel, (void *)usn_bepostop_delete) != 0) ||
(slapi_pblock_set(pb, postmod, (void *)usn_bepostop_modify) != 0) ||
(slapi_pblock_set(pb, postmdn, (void *)usn_bepostop) != 0)) {
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"usn_bepostop_init: failed to register bepostop
plugin\n");
rc = SLAPI_PLUGIN_FAILURE;
}
@@ -227,7 +227,7 @@ usn_start(Slapi_PBlock *pb)
int rc = SLAPI_PLUGIN_SUCCESS;
Slapi_Value *value;
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM, "-->
usn_start\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM, "-->
usn_start\n");
rc = usn_rootdse_init(pb);
rc |= usn_cleanup_start(pb);
@@ -245,7 +245,7 @@ usn_start(Slapi_PBlock *pb)
for (i = slapi_valueset_first_value(vs, &v);
i != -1;
i = slapi_valueset_next_value(vs, i, &v)) {
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"nsds5ReplicatedAttributeList: %s\n",
slapi_value_get_string(v));
}
@@ -261,7 +261,7 @@ usn_start(Slapi_PBlock *pb)
slapi_value_free(&value);
bail:
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"<-- usn_start (rc: %d)\n", rc);
return rc;
}
@@ -269,13 +269,13 @@ bail:
static int
usn_close(Slapi_PBlock *pb)
{
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM, "-->
usn_close\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM, "-->
usn_close\n");
usn_cleanup_close();
slapi_config_remove_callback(SLAPI_OPERATION_SEARCH, DSE_FLAG_PREOP,
"", LDAP_SCOPE_BASE, "(objectclass=*)",
usn_rootdse_search);
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM, "<--
usn_close\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM, "<--
usn_close\n");
return SLAPI_PLUGIN_SUCCESS;
}
@@ -288,18 +288,18 @@ usn_preop_delete(Slapi_PBlock *pb)
{
Slapi_Operation *op = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"--> usn_preop_delete\n");
slapi_pblock_get(pb, SLAPI_OPERATION, &op);
if (NULL == op) {
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"<-- usn_preop_delete failed; no operation.\n");
return SLAPI_PLUGIN_FAILURE;
}
slapi_operation_set_replica_attr_handler(op, (void *)usn_get_attr);
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"<-- usn_preop_delete\n");
return SLAPI_PLUGIN_SUCCESS;
@@ -316,7 +316,7 @@ _usn_add_next_usn(Slapi_Entry *e, Slapi_Backend *be)
return;
}
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"--> _usn_add_next_usn\n");
/* add next USN to the entry; "be" contains the usn counter */
@@ -336,7 +336,7 @@ _usn_add_next_usn(Slapi_Entry *e, Slapi_Backend *be)
}
slapi_ch_free_string(&usn_berval.bv_val);
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"<-- _usn_add_next_usn\n");
return;
@@ -355,7 +355,7 @@ _usn_mod_next_usn(LDAPMod ***mods, Slapi_Backend *be)
return LDAP_UNWILLING_TO_PERFORM;
}
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"--> _usn_mod_next_usn\n");
/* add next USN to the mods; "be" contains the usn counter */
@@ -373,7 +373,7 @@ _usn_mod_next_usn(LDAPMod ***mods, Slapi_Backend *be)
*mods = slapi_mods_get_ldapmods_passout(&smods);
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"<-- _usn_mod_next_usn\n");
return LDAP_SUCCESS;
}
@@ -388,7 +388,7 @@ usn_betxnpreop_add(Slapi_PBlock *pb)
Slapi_Backend *be = NULL;
int rc = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"--> usn_betxnpreop_add\n");
/* add next USN to the entry; "be" contains the usn counter */
@@ -408,7 +408,7 @@ usn_betxnpreop_add(Slapi_PBlock *pb)
}
_usn_add_next_usn(e, be);
bail:
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"<-- usn_betxnpreop_add\n");
return rc;
@@ -425,7 +425,7 @@ usn_betxnpreop_delete(Slapi_PBlock *pb)
Slapi_Backend *be = NULL;
int rc = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"--> usn_betxnpreop_delete\n");
/* add next USN to the entry; "be" contains the usn counter */
@@ -445,7 +445,7 @@ usn_betxnpreop_delete(Slapi_PBlock *pb)
}
_usn_add_next_usn(e, be);
bail:
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"<-- usn_betxnpreop_delete\n");
return rc;
@@ -463,14 +463,14 @@ usn_bepreop_modify (Slapi_PBlock *pb)
Slapi_Backend *be = NULL;
int rc = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"--> usn_bepreop_modify\n");
/* add/replace next USN to the mods; "be" contains the usn counter */
slapi_pblock_get(pb, SLAPI_MODIFY_MODS, &mods);
slapi_pblock_get(pb, SLAPI_BACKEND, &be);
if (NULL == be) {
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"usn_bepreop_modify: no backend.\n");
rc = LDAP_PARAM_ERROR;
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &rc);
@@ -481,7 +481,7 @@ usn_bepreop_modify (Slapi_PBlock *pb)
slapi_pblock_set(pb, SLAPI_MODIFY_MODS, mods);
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"<-- usn_bepreop_modify\n");
return rc;
}
@@ -493,7 +493,7 @@ usn_bepostop (Slapi_PBlock *pb)
int rc = SLAPI_PLUGIN_FAILURE;
Slapi_Backend *be = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"--> usn_bepostop\n");
/* if op is not successful, don't increment the counter */
@@ -516,7 +516,7 @@ usn_bepostop (Slapi_PBlock *pb)
slapi_counter_increment(be->be_usn_counter);
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"<-- usn_bepostop\n");
return rc;
@@ -531,7 +531,7 @@ usn_bepostop_modify (Slapi_PBlock *pb)
LDAPMod **mods = NULL;
int i;
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"--> usn_bepostop_mod\n");
/* if op is not successful, don't increment the counter */
@@ -546,7 +546,7 @@ usn_bepostop_modify (Slapi_PBlock *pb)
for (i = 0; mods && mods[i]; i++) {
if (0 == strcasecmp(mods[i]->mod_type, SLAPI_ATTR_ENTRYUSN)) {
if (mods[i]->mod_op & LDAP_MOD_IGNORE) {
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"usn_bepostop_mod: MOD_IGNORE detected\n");
goto bail; /* conflict occurred.
skip incrementing the counter. */
@@ -568,7 +568,7 @@ usn_bepostop_modify (Slapi_PBlock *pb)
slapi_counter_increment(be->be_usn_counter);
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"<-- usn_bepostop_mod\n");
return rc;
@@ -582,7 +582,7 @@ usn_bepostop_delete (Slapi_PBlock *pb)
int rc = SLAPI_PLUGIN_FAILURE;
Slapi_Backend *be = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"--> usn_bepostop\n");
/* if op is not successful, don't increment the counter */
@@ -605,7 +605,7 @@ usn_bepostop_delete (Slapi_PBlock *pb)
slapi_counter_increment(be->be_usn_counter);
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"<-- usn_bepostop\n");
return rc;
@@ -662,7 +662,7 @@ usn_rootdse_search(Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry*
entryAfter,
char *attr_subp = NULL;
int isglobal = config_get_entryusn_global();
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"--> usn_rootdse_search\n");
usn_berval.bv_val = counter_buf;
@@ -725,7 +725,7 @@ usn_rootdse_search(Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry*
entryAfter,
slapi_ch_free_string(&cookie);
slapi_ch_free_string(&attr);
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"<-- usn_rootdse_search\n");
return SLAPI_DSE_CALLBACK_OK;
}
diff --git a/ldap/servers/plugins/usn/usn_cleanup.c
b/ldap/servers/plugins/usn/usn_cleanup.c
index 024c1c9..ca50e79 100644
--- a/ldap/servers/plugins/usn/usn_cleanup.c
+++ b/ldap/servers/plugins/usn/usn_cleanup.c
@@ -59,15 +59,15 @@ usn_cleanup_thread(void *arg)
if (!task) {
return; /* no task */
}
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"--> usn_cleanup_thread\n");
slapi_task_inc_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"usn_cleanup_thread --> refcount incremented.\n" );
if (NULL == usn_get_identity()) { /* plugin is not initialized */
slapi_task_log_notice(task, "USN plugin is not initialized\n");
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"USN tombstone cleanup: USN plugin is not
initialized\n");
rv = -1;
filter = NULL; /* so we don't try to free it */
@@ -102,7 +102,7 @@ usn_cleanup_thread(void *arg)
slapi_task_log_status(task,
"USN tombstone cleanup: no such suffix %s.\n",
cleanup_data->suffix);
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"USN tombstone cleanup: no such suffix %s.\n",
cleanup_data->suffix);
goto bail;
@@ -113,7 +113,7 @@ usn_cleanup_thread(void *arg)
slapi_task_log_status(task,
"USN tombstone cleanup: searching tombstone entries in "
"%s failed; (%d).\n", cleanup_data->suffix, rv);
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"USN tombstone cleanup: searching tombstone entries in "
"%s failed; (%d).\n", cleanup_data->suffix, rv);
goto bail;
@@ -122,7 +122,7 @@ usn_cleanup_thread(void *arg)
slapi_task_log_notice(task,
"USN tombstone cleanup task starts (suffix: %s) ...\n",
cleanup_data->suffix);
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"USN tombstone cleanup task starts (suffix: %s) ...\n",
cleanup_data->suffix);
@@ -138,7 +138,7 @@ usn_cleanup_thread(void *arg)
if(slapi_is_shutting_down()){
slapi_task_log_notice(task, "USN tombstone cleanup task aborted due to
shutdown.");
slapi_task_log_status(task, "USN tombstone cleanup task aborted due to
shutdown.");
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"USN tombstone cleanup task aborted due to
shutdown.\n");
goto bail;
}
@@ -154,7 +154,7 @@ usn_cleanup_thread(void *arg)
slapi_task_log_status(task,
"USN tombstone cleanup: deleting %s failed; (%d).\n",
slapi_sdn_get_dn(sdn), delrv);
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"USN tombstone cleanup: deleting %s failed; (%d).\n",
slapi_sdn_get_dn(sdn), delrv);
rv = delrv;
@@ -165,7 +165,7 @@ usn_cleanup_thread(void *arg)
}
slapi_task_log_notice(task, "USN tombstone cleanup task finished.");
slapi_task_log_status(task, "USN tombstone cleanup task finished.");
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"USN tombstone cleanup task finished.\n");
bail:
slapi_free_search_results_internal(search_pb);
@@ -178,9 +178,9 @@ bail:
/* this will queue the destruction of the task */
slapi_task_finish(task, rv);
slapi_task_dec_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"usn_cleanup_thread <-- refcount decremented.\n");
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"<-- usn_cleanup_thread\n");
}
@@ -198,7 +198,7 @@ _usn_cleanup_is_mmr_enabled(const char *suffix)
base_dn = slapi_create_dn_string("cn=replica,cn=\"%s\",%s",
suffix, MAPPING_TREE_BASE_DN);
if (NULL == base_dn) {
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"_usn_cleanup_is_mmr_enabled: failed to normalize "
"mappingtree dn for %s\n", suffix);
return 1;
@@ -240,7 +240,7 @@ usn_cleanup_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry
*eAfter,
Slapi_Backend *be = NULL;
const Slapi_DN *be_suffix = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"--> usn_cleanup_add\n");
*returncode = LDAP_SUCCESS;
@@ -261,7 +261,7 @@ usn_cleanup_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry
*eAfter,
maxusn = slapi_entry_attr_get_charptr(e, "maxusn_to_delete");
if (!suffix && !backend) {
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"USN tombstone cleanup: Both suffix and backend are missing.\n");
*returncode = LDAP_PARAM_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -275,7 +275,7 @@ usn_cleanup_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry
*eAfter,
if (be_suffix) {
suffix = slapi_ch_strdup(slapi_sdn_get_ndn(be_suffix));
} else {
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"USN tombstone cleanup: Backend %s is invalid.\n", backend);
*returncode = LDAP_PARAM_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -286,7 +286,7 @@ usn_cleanup_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry
*eAfter,
/* The suffix is the target of replication,
* we don't want to clean up tombstones used by MMR */
if (_usn_cleanup_is_mmr_enabled(suffix)) {
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"USN tombstone cleanup: Suffix %s is replicated. Unwilling to "
"perform cleaning up tombstones.\n", suffix);
*returncode = LDAP_UNWILLING_TO_PERFORM;
@@ -297,7 +297,7 @@ usn_cleanup_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry
*eAfter,
/* allocate new task now */
task = slapi_plugin_new_task(slapi_entry_get_ndn(e), arg);
if (task == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"USN tombstone cleanup: unable to allocate new task.\n");
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -323,7 +323,7 @@ usn_cleanup_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry
*eAfter,
(void *)task, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
"USN tombstone cleanup: unable to create task thread.\n");
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -337,7 +337,7 @@ bail:
slapi_ch_free_string(&suffix);
slapi_ch_free_string(&backend);
slapi_ch_free_string(&maxusn);
- slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"<-- usn_cleanup_add\n");
return rv;
}
@@ -345,7 +345,7 @@ bail:
static void
usn_cleanup_task_destructor(Slapi_Task *task)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, USN_PLUGIN_SUBSYSTEM,
"usn_cleanup_task_destructor -->\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"usn_cleanup_task_destructor -->\n");
if (task) {
struct usn_cleanup_data *mydata = (struct usn_cleanup_data
*)slapi_task_get_data(task);
while (slapi_task_get_refcount(task) > 0) {
@@ -360,5 +360,5 @@ usn_cleanup_task_destructor(Slapi_Task *task)
slapi_ch_free((void **)&mydata);
}
}
- slapi_log_error(SLAPI_LOG_PLUGIN, USN_PLUGIN_SUBSYSTEM,
"usn_cleanup_task_destructor <--\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
"usn_cleanup_task_destructor <--\n");
}
diff --git a/ldap/servers/plugins/vattrsp_template/vattrsp.c
b/ldap/servers/plugins/vattrsp_template/vattrsp.c
index e791e7b..b8b905f 100644
--- a/ldap/servers/plugins/vattrsp_template/vattrsp.c
+++ b/ldap/servers/plugins/vattrsp_template/vattrsp.c
@@ -103,7 +103,7 @@ int vattrsp_init( Slapi_PBlock *pb )
int ret = 0;
void * plugin_identity=NULL;
- slapi_log_error( SLAPI_LOG_TRACE, VATTRSP_PLUGIN_SUBSYSTEM,"-->
vattrsp_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"-->
vattrsp_init\n");
/*
* Store the plugin identity for later use.
@@ -123,12 +123,12 @@ int vattrsp_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION,
(void *)&pdesc ) != 0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, VATTRSP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, VATTRSP_PLUGIN_SUBSYSTEM,
"vattrsp_init: failed to register plugin\n" );
ret = -1;
}
- slapi_log_error( SLAPI_LOG_TRACE, VATTRSP_PLUGIN_SUBSYSTEM,"<--
vattrsp_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"<--
vattrsp_init\n");
return ret;
}
@@ -158,7 +158,7 @@ int vattrsp_start( Slapi_PBlock *pb )
{
int ret = 0;
- slapi_log_error( SLAPI_LOG_TRACE, VATTRSP_PLUGIN_SUBSYSTEM,"-->
vattrsp_start\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"-->
vattrsp_start\n");
/* register this vattr service provider with vattr subsystem */
if (slapi_vattrspi_register((vattr_sp_handle **)&vattr_handle,
@@ -166,7 +166,7 @@ int vattrsp_start( Slapi_PBlock *pb )
vattrsp_vattr_compare,
vattrsp_vattr_types) != 0)
{
- slapi_log_error( SLAPI_LOG_FATAL, VATTRSP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, VATTRSP_PLUGIN_SUBSYSTEM,
"vattrsp_start: cannot register as service provider\n" );
ret = -1;
goto out;
@@ -180,7 +180,7 @@ int vattrsp_start( Slapi_PBlock *pb )
slapi_vattrspi_regattr((vattr_sp_handle *)vattr_handle, "dummyAttr", NULL,
NULL);
out:
- slapi_log_error( SLAPI_LOG_TRACE, VATTRSP_PLUGIN_SUBSYSTEM,"<--
vattrsp_start\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"<--
vattrsp_start\n");
return ret;
}
@@ -196,11 +196,11 @@ out:
*/
int vattrsp_close( Slapi_PBlock *pb )
{
- slapi_log_error( SLAPI_LOG_TRACE, VATTRSP_PLUGIN_SUBSYSTEM,"-->
vattrsp_close\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"-->
vattrsp_close\n");
/* clean up stuff here */
- slapi_log_error( SLAPI_LOG_TRACE, VATTRSP_PLUGIN_SUBSYSTEM,"<--
vattrsp_close\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"<--
vattrsp_close\n");
return 0;
}
@@ -233,7 +233,7 @@ int vattrsp_vattr_get(
{
int ret = SLAPI_VIRTUALATTRS_NOT_FOUND;
- slapi_log_error( SLAPI_LOG_TRACE, VATTRSP_PLUGIN_SUBSYSTEM,"-->
vattrsp_vattr_get\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"-->
vattrsp_vattr_get\n");
/* usual to schema check an attribute
* there may be sanity checks which can
@@ -290,7 +290,7 @@ int vattrsp_vattr_get(
*type_name_disposition = SLAPI_VIRTUALATTRS_TYPE_NAME_MATCHED_EXACTLY_OR_ALIAS;
}
- slapi_log_error( SLAPI_LOG_TRACE, VATTRSP_PLUGIN_SUBSYSTEM,"<--
vattrsp_cache_vattr_get\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"<--
vattrsp_cache_vattr_get\n");
return ret;
}
@@ -320,11 +320,11 @@ int vattrsp_vattr_compare(
{
int ret = SLAPI_VIRTUALATTRS_NOT_FOUND; /* assume failure */
- slapi_log_error( SLAPI_LOG_TRACE, VATTRSP_PLUGIN_SUBSYSTEM,"-->
vattrsp_vattr_compare\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"-->
vattrsp_vattr_compare\n");
/* TODO: do your thing, compare the attribute */
- slapi_log_error( SLAPI_LOG_TRACE, VATTRSP_PLUGIN_SUBSYSTEM,"<--
vattrsp_vattr_compare\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"<--
vattrsp_vattr_compare\n");
return ret;
}
@@ -363,7 +363,7 @@ int vattrsp_vattr_types(
char *attr = "dummyAttr"; /* an attribute type that we will deliver */
int props = 0; /* properties of the attribute, make this SLAPI_ATTR_FLAG_OPATTR for
operational attributes */
- slapi_log_error( SLAPI_LOG_TRACE, VATTRSP_PLUGIN_SUBSYSTEM,"-->
vattrsp_vattr_types\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"-->
vattrsp_vattr_types\n");
/* TODO: for each type you will supply... */
if(ret)
@@ -380,7 +380,7 @@ int vattrsp_vattr_types(
slapi_vattrspi_add_type(type_context,&thang,0);
}
- slapi_log_error( SLAPI_LOG_TRACE, VATTRSP_PLUGIN_SUBSYSTEM,"<--
vattrsp_vattr_types\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"<--
vattrsp_vattr_types\n");
return ret;
}
diff --git a/ldap/servers/plugins/views/views.c b/ldap/servers/plugins/views/views.c
index 8c2b89f..97b07bd 100644
--- a/ldap/servers/plugins/views/views.c
+++ b/ldap/servers/plugins/views/views.c
@@ -151,7 +151,7 @@ int views_init( Slapi_PBlock *pb )
int ret = SLAPI_PLUGIN_SUCCESS;
void * plugin_identity=NULL;
- slapi_log_error( SLAPI_LOG_TRACE, VIEWS_PLUGIN_SUBSYSTEM, "-->
views_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "-->
views_init\n");
/*
** Store the plugin identity for later use.
@@ -170,12 +170,12 @@ int views_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION,
(void *)&pdesc ) != 0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, VIEWS_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, VIEWS_PLUGIN_SUBSYSTEM,
"views_init: failed to register plugin\n" );
ret = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error( SLAPI_LOG_TRACE, VIEWS_PLUGIN_SUBSYSTEM, "<--
views_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "<--
views_init\n");
return ret;
}
@@ -204,7 +204,7 @@ static int views_start( Slapi_PBlock *pb )
int ret = SLAPI_PLUGIN_SUCCESS;
void **statechange_api;
- slapi_log_error( SLAPI_LOG_TRACE, VIEWS_PLUGIN_SUBSYSTEM, "-->
views_start\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "-->
views_start\n");
theCache.cache_built = 0;
g_views_cache_lock = slapi_new_rwlock();
@@ -237,7 +237,7 @@ static int views_start( Slapi_PBlock *pb )
if( slapi_apib_register(Views_v1_0_GUID, api) )
{
- slapi_log_error( SLAPI_LOG_FATAL, VIEWS_PLUGIN_SUBSYSTEM, "views: failed to
publish views interface\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, VIEWS_PLUGIN_SUBSYSTEM, "views: failed
to publish views interface\n");
if(statechange_api){
statechange_unregister(statechange_api,
NULL,
@@ -253,7 +253,7 @@ static int views_start( Slapi_PBlock *pb )
op_counter = slapi_counter_new();
}
- slapi_log_error( SLAPI_LOG_TRACE, VIEWS_PLUGIN_SUBSYSTEM, "<--
views_start\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "<--
views_start\n");
return ret;
}
@@ -351,7 +351,7 @@ bail:
static int views_close( Slapi_PBlock *pb )
{
void **statechange_api;
- slapi_log_error( SLAPI_LOG_TRACE, VIEWS_PLUGIN_SUBSYSTEM, "-->
views_close\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "-->
views_close\n");
g_plugin_started = 0;
@@ -374,7 +374,7 @@ static int views_close( Slapi_PBlock *pb )
slapi_destroy_rwlock(g_views_cache_lock);
g_views_cache_lock = NULL;
- slapi_log_error( SLAPI_LOG_TRACE, VIEWS_PLUGIN_SUBSYSTEM, "<--
views_close\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "<--
views_close\n");
return SLAPI_PLUGIN_SUCCESS;
}
@@ -384,7 +384,7 @@ static void views_cache_free(void)
viewEntry *head = theCache.pCacheViews;
viewEntry *current;
- slapi_log_error( SLAPI_LOG_TRACE, VIEWS_PLUGIN_SUBSYSTEM, "-->
views_cache_free\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "-->
views_cache_free\n");
/* free the cache */
current = head;
@@ -413,7 +413,7 @@ static void views_cache_free(void)
theCache.view_count = 0;
- slapi_log_error( SLAPI_LOG_TRACE, VIEWS_PLUGIN_SUBSYSTEM, "<--
views_cache_free\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "<--
views_cache_free\n");
}
/*
@@ -431,7 +431,7 @@ static int views_cache_create(void)
return SLAPI_PLUGIN_SUCCESS;
}
- slapi_log_error( SLAPI_LOG_TRACE, VIEWS_PLUGIN_SUBSYSTEM, "-->
views_cache_create\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "-->
views_cache_create\n");
/* lock cache */
views_write_lock();
@@ -474,7 +474,7 @@ static int views_cache_create(void)
if(ret != 0)
{
/* currently we cannot go on without the indexes */
- slapi_log_error(SLAPI_LOG_FATAL, VIEWS_PLUGIN_SUBSYSTEM, "views_cache_create:
failed to index cache\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, VIEWS_PLUGIN_SUBSYSTEM,
"views_cache_create: failed to index cache\n");
}
else
theCache.cache_built = 1;
@@ -491,7 +491,7 @@ static int views_cache_create(void)
/* unlock cache */
views_unlock();
slapi_counter_decrement(op_counter);
- slapi_log_error( SLAPI_LOG_TRACE, VIEWS_PLUGIN_SUBSYSTEM, "<--
views_cache_create\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "<--
views_cache_create\n");
return ret;
}
@@ -797,7 +797,7 @@ static void views_cache_create_applied_filter(viewEntry *pView)
pCurrentFilter = slapi_str2filter( buf );
if (!pCurrentFilter) {
- slapi_log_error(SLAPI_LOG_FATAL, VIEWS_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, VIEWS_PLUGIN_SUBSYSTEM,
"Error: the view filter [%s] in entry [%s] is not valid\n",
buf, current->pDn);
}
@@ -973,7 +973,7 @@ Slapi_Filter *views_cache_create_descendent_filter(viewEntry
*ancestor, PRBool u
{
pCurrentFilter = slapi_str2filter( buf );
if (!pCurrentFilter) {
- slapi_log_error(SLAPI_LOG_FATAL, VIEWS_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, VIEWS_PLUGIN_SUBSYSTEM,
"Error: the view filter [%s] in entry [%s] is not valid\n",
buf, currentChild->pDn);
}
@@ -1037,7 +1037,7 @@ static void views_cache_create_inclusion_filter(viewEntry *pView)
sprintf(buf, "(%s)", viewRDNstr );
viewSubFilter = slapi_str2filter( buf );
if (!viewSubFilter) {
- slapi_log_error(SLAPI_LOG_FATAL, VIEWS_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, VIEWS_PLUGIN_SUBSYSTEM,
"Error: the view filter [%s] in entry [%s] is not valid\n",
buf, current->pDn);
}
@@ -1139,7 +1139,7 @@ static int views_cache_build_view_list(viewEntry **pViews)
int suffixIndex = 0;
int valIndex = 0;
- slapi_log_error(SLAPI_LOG_TRACE, VIEWS_PLUGIN_SUBSYSTEM, "-->
views_cache_build_view_list\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "-->
views_cache_build_view_list\n");
/*
the views may be anywhere in the DIT,
@@ -1149,7 +1149,7 @@ static int views_cache_build_view_list(viewEntry **pViews)
attrs[0] = "namingcontexts";
attrs[1] = 0;
- slapi_log_error(SLAPI_LOG_PLUGIN, VIEWS_PLUGIN_SUBSYSTEM, "views: Building view
cache.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "views:
Building view cache.\n");
pSuffixSearch =
slapi_search_internal("",LDAP_SCOPE_BASE,"(objectclass=*)",NULL,attrs,0);
if(pSuffixSearch)
@@ -1201,7 +1201,7 @@ static int views_cache_build_view_list(viewEntry **pViews)
}
else
{
- slapi_log_error(SLAPI_LOG_PLUGIN, VIEWS_PLUGIN_SUBSYSTEM,
"views_cache_build_view_list: failed to find suffixes\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM,
"views_cache_build_view_list: failed to find suffixes\n");
ret = SLAPI_PLUGIN_FAILURE;
}
@@ -1213,7 +1213,7 @@ static int views_cache_build_view_list(viewEntry **pViews)
}
- slapi_log_error(SLAPI_LOG_TRACE, VIEWS_PLUGIN_SUBSYSTEM, "<--
views_cache_build_view_list\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "<--
views_cache_build_view_list\n");
return ret;
}
@@ -1335,7 +1335,7 @@ static int views_cache_add_dn_views(char *dn, viewEntry **pViews)
*/
static void views_cache_add_ll_entry(void** attrval, void *theVal)
{
- slapi_log_error(SLAPI_LOG_TRACE, VIEWS_PLUGIN_SUBSYSTEM, "-->
views_cache_add_ll_entry\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "-->
views_cache_add_ll_entry\n");
if(*attrval)
{
@@ -1352,7 +1352,7 @@ static void views_cache_add_ll_entry(void** attrval, void *theVal)
*attrval = theVal;
}
- slapi_log_error(SLAPI_LOG_TRACE, VIEWS_PLUGIN_SUBSYSTEM, "<--
views_cache_add_ll_entry\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "<--
views_cache_add_ll_entry\n");
}
@@ -1377,7 +1377,7 @@ static void views_update_views_cache( Slapi_Entry *e, char *dn, int
modtype, Sla
return;
}
- slapi_log_error( SLAPI_LOG_TRACE, VIEWS_PLUGIN_SUBSYSTEM, "-->
views_update_views_cache\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "-->
views_update_views_cache\n");
views_write_lock();
@@ -1667,7 +1667,7 @@ unlock_cache:
}
slapi_counter_decrement(op_counter);
- slapi_log_error( SLAPI_LOG_TRACE, VIEWS_PLUGIN_SUBSYSTEM, "<--
views_update_views_cache\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "<--
views_update_views_cache\n");
}
@@ -1876,7 +1876,7 @@ static void views_cache_backend_state_change(void *handle, char
*be_name,
PR_UNJOINABLE_THREAD,
SLAPD_DEFAULT_THREAD_STACKSIZE)) == NULL )
{
- slapi_log_error( SLAPI_LOG_FATAL, VIEWS_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, VIEWS_PLUGIN_SUBSYSTEM,
"views_cache_backend_state_change: PR_CreateThread failed\n" );
}
}
diff --git a/ldap/servers/plugins/whoami/whoami.c b/ldap/servers/plugins/whoami/whoami.c
index e0ca555..493fff9 100644
--- a/ldap/servers/plugins/whoami/whoami.c
+++ b/ldap/servers/plugins/whoami/whoami.c
@@ -43,14 +43,14 @@ int whoami_exop( Slapi_PBlock *pb )
if ( slapi_pblock_get( pb, SLAPI_EXT_OP_REQ_OID, &oid ) != 0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, PLUGIN_NAME, "Could not get OID from
request\n" );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PLUGIN_NAME, "Could not get OID from
request\n" );
slapi_send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL, "Could not get OID from
request\n", 0, NULL );
return( SLAPI_PLUGIN_EXTENDED_SENT_RESULT );
}
if ( slapi_pblock_get( pb, SLAPI_EXT_OP_REQ_VALUE, &bval ) != 0 || bval->bv_val
!= NULL )
{
- slapi_log_error( SLAPI_LOG_FATAL, PLUGIN_NAME, "Could not get
correct request value from request\n" );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PLUGIN_NAME, "Could not
get correct request value from request\n" );
slapi_send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL, "Could not
get correct request value from request\n", 0, NULL );
return( SLAPI_PLUGIN_EXTENDED_SENT_RESULT );
}
@@ -59,7 +59,7 @@ int whoami_exop( Slapi_PBlock *pb )
if( slapi_pblock_get( pb, SLAPI_CONN_DN, &client_dn ) !=0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, PLUGIN_NAME, "Could not get client_dn" );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PLUGIN_NAME, "Could not get
client_dn" );
slapi_send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL, "Could not get
client_dn\n", 0, NULL );
return( SLAPI_PLUGIN_EXTENDED_SENT_RESULT );
}
@@ -80,7 +80,7 @@ int whoami_exop( Slapi_PBlock *pb )
if ( slapi_pblock_set( pb, SLAPI_EXT_OP_RET_OID, NULL ) != 0 || slapi_pblock_set( pb,
SLAPI_EXT_OP_RET_VALUE, &retbval ) != 0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, PLUGIN_NAME, "Could not set return values"
);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PLUGIN_NAME, "Could not set return
values" );
slapi_send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL, "Could not
set return values", 0, NULL );
slapi_ch_free_string( &client_dn );
slapi_ch_free_string( &fdn );
@@ -110,7 +110,7 @@ int whoami_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_FN, ( void * )whoami_exop ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_OIDLIST, ( void * )whoami_exop_oid_list )
!=0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, PLUGIN_NAME, "whoami_init: Failed to register
plug-in.\n" );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PLUGIN_NAME, "whoami_init: Failed to
register plug-in.\n" );
return( -1 );
}
diff --git a/ldap/servers/slapd/abandon.c b/ldap/servers/slapd/abandon.c
index 72680d7..8c3fd30 100644
--- a/ldap/servers/slapd/abandon.c
+++ b/ldap/servers/slapd/abandon.c
@@ -116,7 +116,7 @@ do_abandon( Slapi_PBlock *pb )
suppressed_by_plugin = 1;
}
} else {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "do_abandon: op not found\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "do_abandon: op not found\n");
}
if ( 0 == pagedresults_free_one_msgid_nolock(pb->pb_conn, id) ) {
diff --git a/ldap/servers/slapd/add.c b/ldap/servers/slapd/add.c
index bfe5054..121e72c 100644
--- a/ldap/servers/slapd/add.c
+++ b/ldap/servers/slapd/add.c
@@ -339,7 +339,7 @@ int slapi_add_internal_set_pb (Slapi_PBlock *pb, const char *dn,
LDAPMod **attrs
if (pb == NULL || dn == NULL || attrs == NULL)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, NULL, "slapi_add_internal_set_pb: invalid
argument\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, NULL, "slapi_add_internal_set_pb:
invalid argument\n");
return LDAP_PARAM_ERROR;
}
@@ -361,7 +361,7 @@ void slapi_add_entry_internal_set_pb (Slapi_PBlock *pb, Slapi_Entry
*e, LDAPCont
PR_ASSERT (pb != NULL);
if (pb == NULL || e == NULL)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, NULL, "slapi_add_entry_internal_set_pb: invalid
argument\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, NULL,
"slapi_add_entry_internal_set_pb: invalid argument\n");
return;
}
diff --git a/ldap/servers/slapd/attr.c b/ldap/servers/slapd/attr.c
index 7da1bab..6f816c8 100644
--- a/ldap/servers/slapd/attr.c
+++ b/ldap/servers/slapd/attr.c
@@ -916,7 +916,7 @@ attr_add_valuearray(Slapi_Attr *a, Slapi_Value **vals, const char
*dn)
}
}
- slapi_log_error( SLAPI_LOG_TRACE, NULL, "add value \"%s\" to
"
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, NULL, "add value
\"%s\" to "
"attribute type \"%s\" in entry \"%s\" failed:
%s\n",
duplicate_string,
a->a_type,
@@ -986,13 +986,13 @@ attr_get_value_cmp_fn(const Slapi_Attr *attr, value_compare_fn_type
*compare_fn)
{
int rc = LDAP_PROTOCOL_ERROR;
- LDAPDebug0Args(LDAP_DEBUG_TRACE,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"=> slapi_attr_get_value_cmp_fn\n");
*compare_fn = NULL;
if (attr == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= slapi_attr_get_value_cmp_fn no attribute given\n");
rc = LDAP_PARAM_ERROR; /* unkonwn */
goto done;
@@ -1005,21 +1005,21 @@ attr_get_value_cmp_fn(const Slapi_Attr *attr,
value_compare_fn_type *compare_fn)
}
if ((attr->a_plugin->plg_syntax_flags & SLAPI_PLUGIN_SYNTAX_FLAG_ORDERING) ==
0) {
- LDAPDebug2Args(LDAP_DEBUG_TRACE,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= slapi_attr_get_value_cmp_fn syntax [%s] for attribute [%s] does not
support ordering\n",
attr->a_plugin->plg_syntax_oid, attr->a_type);
goto done;
}
if (attr->a_plugin->plg_syntax_filter_ava == NULL) {
- LDAPDebug2Args(LDAP_DEBUG_TRACE,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= slapi_attr_get_value_cmp_fn syntax [%s] for attribute [%s] does not
support equality matching\n",
attr->a_plugin->plg_syntax_oid, attr->a_type);
goto done;
}
if (attr->a_plugin->plg_syntax_compare == NULL) {
- LDAPDebug2Args(LDAP_DEBUG_TRACE,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= slapi_attr_get_value_cmp_fn syntax [%s] for attribute [%s] does not
have a compare function\n",
attr->a_plugin->plg_syntax_oid, attr->a_type);
goto done;
@@ -1029,7 +1029,7 @@ attr_get_value_cmp_fn(const Slapi_Attr *attr, value_compare_fn_type
*compare_fn)
rc = LDAP_SUCCESS;
done:
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "<= slapi_attr_get_value_cmp_fn \n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= slapi_attr_get_value_cmp_fn
\n");
return rc;
}
diff --git a/ldap/servers/slapd/attrlist.c b/ldap/servers/slapd/attrlist.c
index fc23048..384d5fe 100644
--- a/ldap/servers/slapd/attrlist.c
+++ b/ldap/servers/slapd/attrlist.c
@@ -284,7 +284,7 @@ int attrlist_replace(Slapi_Attr **alist, const char *type, struct
berval **vals)
}
rc = attr_replace(*a, values); /* values is consumed */
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "attrlist_replace",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "attrlist_replace",
"attr_replace (%s, %s) failed.\n",
type, vals[0]->bv_val);
if (created) {
@@ -319,7 +319,7 @@ int attrlist_replace_with_flags(Slapi_Attr **alist, const char *type,
struct ber
}
rc = attr_replace(*a, values);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "attrlist_replace",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "attrlist_replace",
"attr_replace (%s, %s) failed.\n",
type, vals[0]->bv_val);
if (created) {
diff --git a/ldap/servers/slapd/attrsyntax.c b/ldap/servers/slapd/attrsyntax.c
index b34216a..6932047 100644
--- a/ldap/servers/slapd/attrsyntax.c
+++ b/ldap/servers/slapd/attrsyntax.c
@@ -1038,7 +1038,7 @@ attr_syntax_create(
now, just log an error, and address each case
*/
if (mr_equality && !slapi_matchingrule_is_compat(mr_equality, attr_syntax)) {
- slapi_log_error(SLAPI_LOG_FATAL, "attr_syntax_create",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "attr_syntax_create",
"Error: the EQUALITY matching rule [%s] is not compatible "
"with the syntax [%s] for the attribute [%s]\n",
mr_equality, attr_syntax, attr_names[0]);
@@ -1049,7 +1049,7 @@ attr_syntax_create(
}
a.asi_mr_eq_plugin = plugin_mr_find( mr_equality );
if (mr_ordering && !slapi_matchingrule_is_compat(mr_ordering, attr_syntax)) {
- slapi_log_error(SLAPI_LOG_FATAL, "attr_syntax_create",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "attr_syntax_create",
"Error: the ORDERING matching rule [%s] is not compatible "
"with the syntax [%s] for the attribute [%s]\n",
mr_ordering, attr_syntax, attr_names[0]);
@@ -1060,7 +1060,7 @@ attr_syntax_create(
}
a.asi_mr_ord_plugin = plugin_mr_find( mr_ordering );
if (mr_substring && !slapi_matchingrule_is_compat(mr_substring, attr_syntax)) {
- slapi_log_error(SLAPI_LOG_FATAL, "attr_syntax_create",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "attr_syntax_create",
"Error: the SUBSTR matching rule [%s] is not compatible "
"with the syntax [%s] for the attribute [%s]\n",
mr_substring, attr_syntax, attr_names[0]);
@@ -1473,7 +1473,7 @@ attr_syntax_init(void)
if(oid2asi) PL_HashTableDestroy(oid2asi);
oid2asi = NULL;
- slapi_log_error( SLAPI_LOG_FATAL, "attr_syntax_init",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "attr_syntax_init",
"slapi_new_rwlock() for oid2asi lock failed\n" );
return 1;
}
@@ -1496,7 +1496,7 @@ attr_syntax_init(void)
if(name2asi) PL_HashTableDestroy(name2asi);
name2asi = NULL;
- slapi_log_error( SLAPI_LOG_FATAL, "attr_syntax_init",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "attr_syntax_init",
"slapi_new_rwlock() for oid2asi lock failed\n" );
return 1;
}
@@ -1537,14 +1537,14 @@ attr_syntax_internal_asi_add_ht(struct asyntaxinfo *asip)
PL_CompareValues, 0, 0);
}
if (!internalasi) {
- slapi_log_error(SLAPI_LOG_FATAL, "attr_syntax_internal_asi_add_ht",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "attr_syntax_internal_asi_add_ht",
"Failed to create HashTable.\n");
return 1;
}
if (!PL_HashTableLookup(internalasi, asip->asi_oid)) {
struct asyntaxinfo *asip_copy = attr_syntax_dup(asip);
if (!asip_copy) {
- slapi_log_error(SLAPI_LOG_FATAL, "attr_syntax_internal_asi_add_ht",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"attr_syntax_internal_asi_add_ht",
"Failed to duplicate asyntaxinfo: %s.\n",
asip->asi_name);
return 1;
@@ -1583,7 +1583,7 @@ slapi_add_internal_attr_syntax( const char *name, const char *oid,
rc = attr_syntax_add( asip, 0 );
if ( rc == LDAP_SUCCESS ) {
if (attr_syntax_internal_asi_add_ht(asip)) {
- slapi_log_error(SLAPI_LOG_FATAL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"slapi_add_internal_attr_syntax",
"Failed to stash internal asyntaxinfo: %s.\n",
asip->asi_name);
@@ -1622,7 +1622,7 @@ slapi_reload_internal_attr_syntax()
{
int rc = LDAP_SUCCESS;
if (!internalasi) {
- slapi_log_error(SLAPI_LOG_TRACE, "attr_reload_internal_attr_syntax",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG,
"attr_reload_internal_attr_syntax",
"No internal attribute syntax to reload.\n");
return rc;
}
diff --git a/ldap/servers/slapd/auditlog.c b/ldap/servers/slapd/auditlog.c
index 74d1b46..62851ef 100644
--- a/ldap/servers/slapd/auditlog.c
+++ b/ldap/servers/slapd/auditlog.c
@@ -372,7 +372,7 @@ write_audit_file(
break;
default:
/* Unsupported log type, we should make some noise */
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "write_audit_log: Invalid log type specified.
logtype %d\n", logtype);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "write_audit_log: Invalid log type
specified. logtype %d\n", logtype);
break;
}
diff --git a/ldap/servers/slapd/back-ldbm/ancestorid.c
b/ldap/servers/slapd/back-ldbm/ancestorid.c
index fa0be74..3bb3555 100644
--- a/ldap/servers/slapd/back-ldbm/ancestorid.c
+++ b/ldap/servers/slapd/back-ldbm/ancestorid.c
@@ -482,7 +482,7 @@ static int ldbm_ancestorid_new_idl_create_index(backend *be, ImportJob
*job)
while (1) {
ret = ldbm_parentid(be, txn, id, &parentid);
if (ret != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, sourcefile,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, sourcefile,
"Error: ldbm_parentid on node index [" ID_FMT
"] of [" ID_FMT "]\n",
nids, nodes->b_nids);
idl_free(&children);
@@ -578,7 +578,7 @@ static int ldbm_parentid(backend *be, DB_TXN *txn, ID id, ID *ppid)
ret = db->get(db, txn, &key, &data, 0);
if (ret != 0) {
ldbm_nasty(sourcefile,13110,ret);
- slapi_log_error(SLAPI_LOG_FATAL, sourcefile,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, sourcefile,
"Error: unable to find entry id [" ID_FMT "]
(original [" ID_FMT "])"
" in id2entry\n", stored_id, id);
goto out;
@@ -788,7 +788,7 @@ static int ldbm_ancestorid_index_update(
if (err) {
if (DB_NOTFOUND != err) {
ldbm_nasty(sourcefile,13141,err);
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "entryrdn_index_read(%s)\n",
slapi_sdn_get_dn(&sdn));
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"entryrdn_index_read(%s)\n", slapi_sdn_get_dn(&sdn));
ret = err;
}
break;
diff --git a/ldap/servers/slapd/back-ldbm/archive.c
b/ldap/servers/slapd/back-ldbm/archive.c
index 19d2192..899e61b 100644
--- a/ldap/servers/slapd/back-ldbm/archive.c
+++ b/ldap/servers/slapd/back-ldbm/archive.c
@@ -39,7 +39,7 @@ int ldbm_back_archive2ldbm( Slapi_PBlock *pb )
li->li_flags = run_from_cmdline = (task_flags &
SLAPI_TASK_RUNNING_FROM_COMMANDLINE);
if ( !rawdirectory || !*rawdirectory ) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "archive2db: no archive name\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "archive2db: no archive
name\n");
return -1;
}
@@ -47,11 +47,11 @@ int ldbm_back_archive2ldbm( Slapi_PBlock *pb )
return_value = dbversion_read(li, directory, &dbversion, &dataversion);
if (return_value) {
if (ENOENT == return_value) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "archive2db: no back up \"%s\"
exists.\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "archive2db: no back up
\"%s\" exists.\n",
directory);
return -1;
}
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "Warning: Unable to read dbversion file in
%s\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "Warning: Unable to read dbversion
file in %s\n",
directory);
}
@@ -72,14 +72,14 @@ int ldbm_back_archive2ldbm( Slapi_PBlock *pb )
/* initialize a restore file to be able to detect a startup after restore */
if (dblayer_restore_file_init(li)) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "archive2db: failed to write restore
file.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "archive2db: failed to write
restore file.\n");
return -1;
}
}
if (backendname) {
inst = ldbm_instance_find_by_name(li, backendname);
if (NULL == inst) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "archive2db: backend \"%s\" does
not exist.\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "archive2db: backend
\"%s\" does not exist.\n",
backendname);
return -1;
}
@@ -225,7 +225,7 @@ int ldbm_back_archive2ldbm( Slapi_PBlock *pb )
/* error case (607331)
* just to go back to the previous state if possible */
if ((return_value = dblayer_start(li, DBLAYER_NORMAL_MODE))) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"archive2db: Unable to to start database in [%s]\n",
li->li_directory);
if (task) {
slapi_task_log_notice(task, "Failed to start the database in
"
@@ -417,10 +417,10 @@ int ldbm_back_ldbm2archive( Slapi_PBlock *pb )
return_value = plugin_call_plugins (pb, SLAPI_PLUGIN_BE_PRE_BACKUP_FN);
if (return_value) {
- LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM,
+ LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"db2archive: pre-backup-plugin failed (%d).\n", return_value);
if (is_slapd_running() && run_from_cmdline) {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: Standalone db2bak is not supported when a "
"multimaster replication enabled server is "
"coexisting.\nPlease use db2bak.pl, instead.\n");
@@ -433,7 +433,7 @@ int ldbm_back_ldbm2archive( Slapi_PBlock *pb )
return_value = plugin_call_plugins (pb, SLAPI_PLUGIN_BE_POST_BACKUP_FN);
if (return_value) {
- LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM,
+ LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"db2archive: post-backup-plugin failed (%d).\n",
return_value);
}
@@ -451,7 +451,7 @@ int ldbm_back_ldbm2archive( Slapi_PBlock *pb )
err:
if (return_value) {
if (dir_bak) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"db2archive failed: renaming %s back to %s\n",
dir_bak, directory);
if (task) {
@@ -460,7 +460,7 @@ err:
dir_bak, directory);
}
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"db2archive failed: removing %s\n", directory);
if (task) {
slapi_task_log_notice(task, "db2archive failed: removing %s",
@@ -470,10 +470,10 @@ err:
ldbm_delete_dirs(directory);
if (dir_bak && (PR_SUCCESS != PR_Rename(dir_bak, directory))) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"db2archive: Failed to rename \"%s\" to
\"%s\".\n",
dir_bak, directory);
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr));
if (task) {
diff --git a/ldap/servers/slapd/back-ldbm/cache.c b/ldap/servers/slapd/back-ldbm/cache.c
index 4280cd1..5c7108d 100644
--- a/ldap/servers/slapd/back-ldbm/cache.c
+++ b/ldap/servers/slapd/back-ldbm/cache.c
@@ -270,7 +270,7 @@ dump_hash(Hashtable *ht)
PR_snprintf(ep_id, 16, "%u-%u", ((struct backcommon *)e)->ep_id,
((struct backcommon *)e)->ep_refcnt);
len = strlen(ep_id);
if (ids_size < len + 1) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "%s\n", ep_ids);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "%s\n", ep_ids);
p = ep_ids; ids_size = 80;
}
PR_snprintf(p, ids_size, "%s:", ep_id);
@@ -278,7 +278,7 @@ dump_hash(Hashtable *ht)
} while ((e = HASH_NEXT(ht, e)));
}
if (p != ep_ids) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "%s\n", ep_ids);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "%s\n", ep_ids);
}
}
#endif
@@ -507,7 +507,7 @@ int cache_init(struct cache *cache, size_t maxsize, long maxentries,
int type)
}
cache->c_tries = slapi_counter_new();
} else {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"cache_init: slapi counter is not available.\n");
cache->c_cursize = NULL;
cache->c_hits = NULL;
@@ -518,7 +518,7 @@ int cache_init(struct cache *cache, size_t maxsize, long maxentries,
int type)
if (((cache->c_mutex = PR_NewMonitor()) == NULL) ||
((cache->c_emutexalloc_mutex = PR_NewLock()) == NULL)) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "ldbm: cache_init: PR_NewMonitor
failed\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "ldbm: cache_init: PR_NewMonitor
failed\n");
return 0;
}
LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= cache_init\n", 0, 0, 0);
@@ -593,11 +593,11 @@ static void entrycache_clear_int(struct cache *cache)
}
cache->c_maxsize = size;
if (cache->c_curentries > 0) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"entrycache_clear_int: there are still %ld entries "
"in the entry cache.\n", cache->c_curentries);
#ifdef LDAP_CACHE_DEBUG
- LDAPDebug0Args(LDAP_DEBUG_ANY, "ID(s) in entry cache:\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "ID(s) in entry cache:\n");
dump_hash(cache->c_idtable);
#endif
}
@@ -1120,7 +1120,7 @@ entrycache_return(struct cache *cache, struct backentry **bep)
e = *bep;
if (!e) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "entrycache_return e is NULL\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "entrycache_return e is
NULL\n");
return;
}
LOG("=> entrycache_return (%s) entry count: %d, entry in cache:%ld\n",
@@ -1521,7 +1521,7 @@ int cache_lock_entry(struct cache *cache, struct backentry *e)
if (!e->ep_mutexp) {
PR_Unlock(cache->c_emutexalloc_mutex);
LOG("<= cache_lock_entry (DELETED)\n", 0, 0, 0);
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"cache_lock_entry: failed to create a lock for
%s\n",
backentry_get_ndn(e));
LOG("<= cache_lock_entry (FAILED)\n", 0, 0, 0);
@@ -1580,7 +1580,7 @@ dncache_clear_int(struct cache *cache)
}
cache->c_maxsize = size;
if (cache->c_curentries > 0) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"dncache_clear_int: there are still %ld dn's "
"in the dn cache. :/\n", cache->c_curentries);
}
@@ -1633,7 +1633,7 @@ dncache_set_max_size(struct cache *cache, size_t bytes)
* ldbm_instance_config
*/
if (! util_is_cachesize_sane(&bytes)) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"WARNING -- Possible CONFIGURATION ERROR -- cachesize "
"(%lu) may be configured to use more than the available "
"physical memory.\n", bytes);
@@ -2031,13 +2031,13 @@ check_entry_cache(struct cache *cache, struct backentry *e)
if (debug_e) { /* e is in cache */
CACHE_RETURN(cache, &debug_e);
if ((e != debug_e) && !(e->ep_state & ENTRY_STATE_DELETED)) {
- slapi_log_error(SLAPI_LOG_FATAL, "check_entry_cache",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "check_entry_cache",
"entry 0x%p is not in dn cache but 0x%p having the same dn %s is
"
"although in_cache flag is set!!!\n",
e, debug_e, slapi_sdn_get_dn(sdn));
}
} else if (!(e->ep_state & ENTRY_STATE_DELETED)) {
- slapi_log_error(SLAPI_LOG_FATAL, "check_entry_cache",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "check_entry_cache",
"%s (id %d) is not in dn cache although in_cache flag is
set!!!\n",
slapi_sdn_get_dn(sdn), e->ep_id);
}
@@ -2045,13 +2045,13 @@ check_entry_cache(struct cache *cache, struct backentry *e)
if (debug_e) { /* e is in cache */
CACHE_RETURN(cache, &debug_e);
if ((e != debug_e) && !(e->ep_state & ENTRY_STATE_DELETED)) {
- slapi_log_error(SLAPI_LOG_FATAL, "check_entry_cache",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "check_entry_cache",
"entry 0x%p is not in id cache but 0x%p having the same id %d is
"
"although in_cache flag is set!!!\n",
e, debug_e, e->ep_id);
}
} else {
- slapi_log_error(SLAPI_LOG_CACHE, "check_entry_cache",
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG, "check_entry_cache",
"%s (id %d) is not in id cache although in_cache flag is
set!!!\n",
slapi_sdn_get_dn(sdn), e->ep_id);
}
@@ -2059,7 +2059,7 @@ check_entry_cache(struct cache *cache, struct backentry *e)
if (debug_e) { /* e is in cache */
CACHE_RETURN(cache, &debug_e);
if (e == debug_e) {
- slapi_log_error(SLAPI_LOG_FATAL, "check_entry_cache",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "check_entry_cache",
"%s (id %d) is in dn cache although in_cache flag is not
set!!!\n",
slapi_sdn_get_dn(sdn), e->ep_id);
}
@@ -2068,7 +2068,7 @@ check_entry_cache(struct cache *cache, struct backentry *e)
if (debug_e) { /* e is in cache: bad */
CACHE_RETURN(cache, &debug_e);
if (e == debug_e) {
- slapi_log_error(SLAPI_LOG_CACHE, "check_entry_cache",
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG, "check_entry_cache",
"%s (id %d) is in id cache although in_cache flag is not
set!!!\n",
slapi_sdn_get_dn(sdn), e->ep_id);
}
diff --git a/ldap/servers/slapd/back-ldbm/dbhelp.c
b/ldap/servers/slapd/back-ldbm/dbhelp.c
index c40a9fa..30986ad 100644
--- a/ldap/servers/slapd/back-ldbm/dbhelp.c
+++ b/ldap/servers/slapd/back-ldbm/dbhelp.c
@@ -111,7 +111,7 @@ dblayer_copy_file_keybykey(DB_ENV *env,
/* entryrdn.db */
struct attrinfo *ai = NULL;
if (NULL == inst) {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"dblayer_copy_file_keybykey(entryrdn), "
"dup_cmp_fn cannot be retrieved since inst is NULL.\n");
goto error;
@@ -121,7 +121,7 @@ dblayer_copy_file_keybykey(DB_ENV *env,
/* If set, use the special dup compare callback */
retval = destination_file->set_dup_compare(destination_file,
ai->ai_dup_cmp_fn);
if (retval) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"dblayer_copy_file_keybykey(entryrdn), set_dup_compare error %d:
%s\n",
retval, db_strerror(retval));
goto error;
@@ -130,7 +130,7 @@ dblayer_copy_file_keybykey(DB_ENV *env,
} else if (idl_get_idl_new() && (dbflags & DB_DUP) && (dbflags &
DB_DUPSORT)) {
retval = destination_file->set_dup_compare(destination_file, idl_new_compare_dups);
if (retval) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"dblayer_copy_file_keybykey, set_dup_compare error %d:
%s\n",
retval, db_strerror(retval));
goto error;
diff --git a/ldap/servers/slapd/back-ldbm/dblayer.c
b/ldap/servers/slapd/back-ldbm/dblayer.c
index dafd093..3c07316 100644
--- a/ldap/servers/slapd/back-ldbm/dblayer.c
+++ b/ldap/servers/slapd/back-ldbm/dblayer.c
@@ -1486,7 +1486,7 @@ dblayer_start(struct ldbminfo *li, int dbmode)
* We don't allow lower value than that.
*/
if (priv->dblayer_lock_config <= 10000) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "New max db lock count is too small.
"
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "New max db lock count is
too small. "
"Resetting it to the default value 10000.\n");
priv->dblayer_lock_config = 10000;
}
@@ -1708,7 +1708,7 @@ check_and_set_import_cache(struct ldbminfo *li)
char s[64]; /* big enough to hold %ld */
if (util_info_sys_pages(&pagesize, &pages, &procpages, &availpages)
!= 0 || 0 == pagesize || 0 == pages) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, "check_and_set_import_cache: "
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "check_and_set_import_cache: "
"Failed to get pagesize: %ld or pages: %ld\n",
pagesize, pages);
return ENOENT;
@@ -1732,7 +1732,7 @@ check_and_set_import_cache(struct ldbminfo *li)
/* sanity check */
if (li->li_import_cache_autosize >= 100) {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"check_and_set_import_cache: "
"import cache autosizing value "
"(nsslapd-import-cache-autosize) should not be "
@@ -1777,7 +1777,7 @@ check_and_set_import_cache(struct ldbminfo *li)
soft_limit*(pagesize/1024));
}
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "Import allocates %ldKB import cache.\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "Import allocates %ldKB import
cache.\n",
import_pages*(pagesize/1024));
if (li->li_import_cache_autosize > 0) { /* import cache autosizing */
/* set the calculated import cache size to the config */
@@ -1914,7 +1914,7 @@ int dblayer_instance_start(backend *be, int mode)
}
else if (rval & DBVERSION_NEED_DN2RDN)
{
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"%s is on, while the instance %s is in the DN format.
"
"Please run dn2rdn to convert the database format.\n",
CONFIG_ENTRYRDN_SWITCH, inst->inst_name);
@@ -1924,7 +1924,7 @@ int dblayer_instance_start(backend *be, int mode)
}
else if (rval & DBVERSION_NEED_RDN2DN)
{
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"%s is off, while the instance %s is in the RDN "
"format. Please change the value to on in
dse.ldif.\n",
CONFIG_ENTRYRDN_SWITCH, inst->inst_name);
@@ -2093,7 +2093,7 @@ int dblayer_instance_start(backend *be, int mode)
#if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR < 3300
return_value = dbp->set_malloc(dbp, (void *)slapi_ch_malloc);
if (0 != return_value) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "dbp->set_malloc failed %d\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "dbp->set_malloc failed
%d\n",
return_value);
goto out;
@@ -2131,7 +2131,7 @@ int dblayer_instance_start(backend *be, int mode)
#if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR < 3300
return_value = dbp->set_malloc(dbp, (void *)slapi_ch_malloc);
if (0 != return_value) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "dbp->set_malloc failed
%d\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "dbp->set_malloc failed
%d\n",
return_value);
goto out;
@@ -2292,7 +2292,7 @@ dblayer_get_aux_id2entry_ext(backend *be, DB **ppDB, DB_ENV
**ppEnv,
PR_ASSERT(NULL != be);
if ((NULL == ppEnv) || (NULL == ppDB)) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "No memory for DB_ENV or DB handle\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "No memory for DB_ENV or DB
handle\n");
goto done;
}
*ppDB = NULL;
@@ -2353,7 +2353,7 @@ dblayer_get_aux_id2entry_ext(backend *be, DB **ppDB, DB_ENV
**ppEnv,
rval = mkdir_p(priv->dblayer_home_directory, 0700);
if (rval)
{
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"can't create env dir: persistent id2entry is not
available\n");
goto done;
}
@@ -2362,7 +2362,7 @@ dblayer_get_aux_id2entry_ext(backend *be, DB **ppDB, DB_ENV
**ppEnv,
if (!*ppEnv) {
rval = dblayer_make_env(&mypEnv, li);
if (rval) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"Unable to create new DB_ENV for import/export! %d\n",
rval);
goto err;
}
@@ -2384,7 +2384,7 @@ dblayer_get_aux_id2entry_ext(backend *be, DB **ppDB, DB_ENV
**ppEnv,
rval = (mypEnv->dblayer_DB_ENV->open)(mypEnv->dblayer_DB_ENV,
priv->dblayer_home_directory, envflags, priv->dblayer_file_mode);
if (rval) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"Unable to open new DB_ENV for upgradedb/reindex %d\n",
rval);
goto err;
}
@@ -2392,7 +2392,7 @@ dblayer_get_aux_id2entry_ext(backend *be, DB **ppDB, DB_ENV
**ppEnv,
}
rval = db_create(&dbp, *ppEnv, 0);
if (rval) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"Unable to create id2entry db handler! %d\n", rval);
goto err;
}
@@ -2423,7 +2423,7 @@ dblayer_get_aux_id2entry_ext(backend *be, DB **ppDB, DB_ENV
**ppEnv,
"dbp->open(\"%s\") failed: %s (%d)\n",
id2entry_file, dblayer_strerror(rval), rval);
if (strstr(dblayer_strerror(rval), "Permission denied")) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"Instance directory %s may not be writable\n", inst_dirp);
}
goto err;
@@ -2544,10 +2544,10 @@ int dblayer_instance_close(backend *be)
* when running a memory leak checking tool (e.g., valgrind),
* it reduces the noise by enabling this code.
*/
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "%s: Cleaning up entry cache\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "%s: Cleaning up entry
cache\n",
inst->inst_name);
cache_clear(&inst->inst_cache, CACHE_TYPE_ENTRY);
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "%s: Cleaning up dn cache\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "%s: Cleaning up dn cache\n",
inst->inst_name);
cache_clear(&inst->inst_dncache, CACHE_TYPE_DN);
}
@@ -2778,12 +2778,12 @@ dblayer_remove_env(struct ldbminfo *li)
char *home_dir = NULL;
int rc = db_env_create(&env, 0);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR -- Failed to create DB_ENV (returned: %d)\n",
rc);
return rc;
}
if (NULL == li) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "ERROR -- No ldbm info is given\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "ERROR -- No ldbm info is
given\n");
return -1;
}
@@ -2791,7 +2791,7 @@ dblayer_remove_env(struct ldbminfo *li)
if (home_dir) {
rc = env->remove(env, home_dir, 0);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR -- Failed to remove DB environment files. "
"Please remove %s/__db.00# (# is 1 through 6)\n",
home_dir);
@@ -3930,7 +3930,7 @@ print_ttilist(txn_test_iter **ttilist, size_t tticnt)
{
while (tticnt > 0) {
tticnt--;
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"txn_test_threadmain: attr [%s] cnt [%lu]\n",
ttilist[tticnt]->attr, ttilist[tticnt]->cnt);
}
@@ -3957,7 +3957,7 @@ txn_test_init_cfg(txn_test_cfg *cfg)
slapi_ch_free_string(&indexlist_copy);
cfg->verbose = getenv(TXN_TEST_VERBOSE) ? 1 : 0;
- slapi_log_error(SLAPI_LOG_FATAL, "txn_test_threadmain",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "txn_test_threadmain",
"Config hold_msec [%d] loop_msec [%d] rmw [%d] txn [%d] indexes
[%s]\n",
cfg->hold_msec, cfg->loop_msec, cfg->flags,
cfg->use_txn,
getenv(TXN_TEST_INDEXES) ? getenv(TXN_TEST_INDEXES) : indexlist);
@@ -4007,7 +4007,7 @@ wait_for_init:
backend *be = inst->inst_be;
if (be->be_state != BE_STATE_STARTED) {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"txn_test_threadmain: backend not started,
retrying\n");
object_release(inst_obj);
goto wait_for_init;
@@ -4016,7 +4016,7 @@ wait_for_init:
for (idx = cfg.indexes; idx && *idx; ++idx) {
DB *db = NULL;
if (be->be_state != BE_STATE_STARTED) {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"txn_test_threadmain: backend not started,
retrying\n");
object_release(inst_obj);
goto wait_for_init;
@@ -4025,7 +4025,7 @@ wait_for_init:
if (!strcmp(*idx, "id2entry")) {
dblayer_get_id2entry(be, &db);
if (db == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"txn_test_threadmain: id2entry database not found
or not ready yet, retrying\n");
object_release(inst_obj);
goto wait_for_init;
@@ -4035,12 +4035,12 @@ wait_for_init:
ainfo_get(be, *idx, &ai);
if (NULL == ai) {
if (dbattempts >= dbmaxretries) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"txn_test_threadmain: index [%s] not found or
not ready yet, skipping\n",
*idx);
continue;
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"txn_test_threadmain: index [%s] not found or
not ready yet, retrying\n",
*idx);
object_release(inst_obj);
@@ -4050,12 +4050,12 @@ wait_for_init:
if (dblayer_get_index_file(be, ai, &db, 0) || (NULL == db)) {
if ((NULL == db) && strcasecmp(*idx,
TXN_TEST_IDX_OK_IF_NULL)) {
if (dbattempts >= dbmaxretries) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"txn_test_threadmain: database file for
index [%s] not found or not ready yet, skipping\n",
*idx);
continue;
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"txn_test_threadmain: database file for
index [%s] not found or not ready yet, retrying\n",
*idx);
object_release(inst_obj);
@@ -4071,7 +4071,7 @@ wait_for_init:
}
}
- LDAPDebug0Args(LDAP_DEBUG_ANY, "txn_test_threadmain: starting main txn stress
loop\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "txn_test_threadmain: starting main txn
stress loop\n");
print_ttilist(ttilist, tticnt);
while (!priv->dblayer_stop_threads) {
@@ -4084,7 +4084,7 @@ retry_txn:
if (cfg.use_txn) {
rc = TXN_BEGIN(priv->dblayer_env->dblayer_DB_ENV, NULL, &txn, 0);
if (rc || !txn) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"txn_test_threadmain failed to create a new
transaction, err=%d (%s)\n",
rc, dblayer_strerror(rc));
}
@@ -4100,7 +4100,7 @@ retry_txn:
/* phase 1 - open a cursor to each db */
if (cfg.verbose) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"txn_test_threadmain: starting [%lu] indexes\n",
tticnt);
}
for (ii = 0; ii < tticnt; ++ii) {
@@ -4127,7 +4127,7 @@ retry_cursor:
rc = tti->db->cursor(tti->db, txn, &tti->cur, 0);
if (DB_LOCK_DEADLOCK == rc) {
if (cfg.verbose) {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"txn_test_threadmain cursor create deadlock -
retry\n");
}
if (cfg.use_txn) {
@@ -4136,7 +4136,7 @@ retry_cursor:
goto retry_cursor;
}
} else if (rc) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"txn_test_threadmain failed to create a new
cursor, err=%d (%s)\n",
rc, dblayer_strerror(rc));
}
@@ -4180,7 +4180,7 @@ retry_get:
rc = tti->cur->c_get(tti->cur, &key, &data,
tti->flags);
if (DB_LOCK_DEADLOCK == rc) {
if (cfg.verbose) {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"txn_test_threadmain cursor get
deadlock - retry\n");
}
if (cfg.use_txn) {
@@ -4193,7 +4193,7 @@ retry_get:
tti->flags = DB_FIRST|cfg.flags; /* start over until all
indexes are done */
} else if (rc) {
if ((DB_BUFFER_SMALL != rc) || cfg.verbose) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"txn_test_threadmain failed to read a
cursor, err=%d (%s)\n",
rc, dblayer_strerror(rc));
}
@@ -4212,7 +4212,7 @@ retry_get:
/*print_ttilist(ttilist, tticnt);*/
init_ttilist(ttilist, tticnt);
if (cfg.verbose) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"txn_test_threadmain: finished [%lu] indexes [%lu]
records\n", tticnt, cnt);
}
TXN_TEST_LOOP_WAIT(cfg.loop_msec);
@@ -4293,7 +4293,7 @@ static int deadlock_threadmain(void *param)
"Serious Error---Failed in deadlock detect (aborted at
0x%x), err=%d (%s)\n",
rejected, rval, dblayer_strerror(rval));
} else if (rejected) {
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, "deadlock_threadmain: found and
rejected %d lock requests\n", rejected);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "deadlock_threadmain:
found and rejected %d lock requests\n", rejected);
}
}
@@ -4602,11 +4602,11 @@ static int checkpoint_threadmain(void *param)
if (!db || rc ) {
continue;
}
- LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM, "compactdb: Compacting DB start:
%s\n",
+ LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "compactdb: Compacting
DB start: %s\n",
inst->inst_name);
rc = dblayer_txn_begin(inst->inst_be, NULL, &txn);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "compactdb: transaction begin
failed: %d\n", rc);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "compactdb: transaction
begin failed: %d\n", rc);
break;
}
rc = db->compact(db, txn.back_txn_txn, NULL/*start*/, NULL/*stop*/,
@@ -4621,7 +4621,7 @@ static int checkpoint_threadmain(void *param)
break;
}
} else {
- LDAPDebug2Args(LDAP_DEBUG_BACKLDBM,
+ LDAPDebug2Args(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"compactdb: compact %s - %d pages freed\n",
inst->inst_name, c_data.compact_pages_free);
if((rc = dblayer_txn_commit(inst->inst_be, &txn))){
@@ -4640,7 +4640,7 @@ static int checkpoint_threadmain(void *param)
DB_ARCH_ABS, (void *)slapi_ch_malloc);
DB_CHECKPOINT_UNLOCK(PR_TRUE, penv->dblayer_env_lock);
if (rval) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, "checkpoint_threadmain: "
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "checkpoint_threadmain: "
"log archive failed - %s (%d)\n",
dblayer_strerror(rval), rval);
} else {
@@ -4668,12 +4668,12 @@ static int checkpoint_threadmain(void *param)
* individually freed. */
}
}
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "Check point before leaving\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "Check point before
leaving\n");
rval = dblayer_force_checkpoint(li);
error_return:
DECR_THREAD_COUNT(priv);
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "Leaving checkpoint_threadmain\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "Leaving
checkpoint_threadmain\n");
return rval;
}
@@ -5197,7 +5197,7 @@ _dblayer_delete_aux_dir(struct ldbminfo *li, char *path)
int rc = -1;
if (NULL == li || NULL == path) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"_dblayer_delete_aux_dir: Invalid LDBM info (0x%x) "
"or path (0x%x)\n", li, path);
return rc;
@@ -5248,7 +5248,7 @@ static int _dblayer_delete_instance_dir(ldbm_instance *inst, int
startdb)
if (NULL == li)
{
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"_dblayer_delete_instance_dir: NULL LDBM info\n");
rval = -1;
goto done;
@@ -5418,7 +5418,7 @@ dblayer_delete_database_ex(struct ldbminfo *li, char *instance, char
*cldir)
if (cldir) {
ret = _dblayer_delete_aux_dir(li, cldir);
if (ret) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"dblayer_delete_database: failed to deelete
\"%s\"\n",
chdir);
return ret;
@@ -5648,7 +5648,7 @@ dblayer_copyfile(char *source, char *destination, int overwrite, int
mode)
source_fd = OPEN_FUNCTION(source,O_RDONLY,0);
if (-1 == source_fd)
{
- LDAPDebug2Args(LDAP_DEBUG_ANY, "dblayer_copyfile: failed to open source file
%s by \"%s\"\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copyfile: failed to open
source file %s by \"%s\"\n",
source, strerror(errno));
goto error;
}
@@ -5656,11 +5656,11 @@ dblayer_copyfile(char *source, char *destination, int overwrite,
int mode)
dest_fd = OPEN_FUNCTION(destination,O_CREAT | O_WRONLY, mode);
if (-1 == dest_fd)
{
- LDAPDebug2Args(LDAP_DEBUG_ANY, "dblayer_copyfile: failed to open dest file
%s by \"%s\"\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copyfile: failed to open
dest file %s by \"%s\"\n",
destination, strerror(errno));
goto error;
}
- LDAPDebug2Args(LDAP_DEBUG_BACKLDBM,
+ LDAPDebug2Args(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"Copying %s to %s\n", source, destination);
/* Loop round reading data and writing it */
while (1)
@@ -5671,7 +5671,7 @@ dblayer_copyfile(char *source, char *destination, int overwrite, int
mode)
if (return_value <= 0) {
/* means error or EOF */
if (return_value < 0) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, "dblayer_copyfile: failed to read by
\"%s\": rval = %d\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copyfile: failed to
read by \"%s\": rval = %d\n",
strerror(errno), return_value);
}
break;
@@ -5690,7 +5690,7 @@ dblayer_copyfile(char *source, char *destination, int overwrite, int
mode)
if (return_value > 0) {
bytes_to_write -= return_value;
ptr += return_value;
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "dblayer_copyfile: retrying to
write %d bytes\n", bytes_to_write);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copyfile:
retrying to write %d bytes\n", bytes_to_write);
} else {
break;
}
@@ -5760,13 +5760,13 @@ dblayer_copy_directory(struct ldbminfo *li,
if (!src_dir || '\0' == *src_dir)
{
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"dblayer_copy_directory: src_dir is empty\n");
return return_value;
}
if (!dest_dir || '\0' == *dest_dir)
{
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"dblayer_copy_directory: dest_dir is empty\n");
return return_value;
}
@@ -5785,7 +5785,7 @@ dblayer_copy_directory(struct ldbminfo *li,
}
if (is_changelog) {
if (!src_is_fullpath) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "Changelogdir \"%s\" is not full
path; "
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "Changelogdir \"%s\" is
not full path; "
"Skipping it.\n", src_dir);
return 0;
}
@@ -5821,7 +5821,7 @@ dblayer_copy_directory(struct ldbminfo *li,
dirhandle = PR_OpenDir(new_src_dir);
if (NULL == dirhandle)
{
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"dblayer_copy_directory: failed to open dir %s\n",
new_src_dir);
@@ -5924,7 +5924,7 @@ dblayer_copy_directory(struct ldbminfo *li,
0, priv->dblayer_file_mode);
}
if (return_value < 0) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, "dblayer_copy_directory: Failed to
copy file %s to %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_directory:
Failed to copy file %s to %s\n",
filename1, filename2);
slapi_ch_free((void**)&filename1);
slapi_ch_free((void**)&filename2);
@@ -5963,7 +5963,7 @@ _dblayer_get_changelogdir(struct ldbminfo *li, char **changelogdir)
int rc = -1;
if (NULL == li || NULL == changelogdir) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: _dblayer_get_changelogdir: Invalid arg: "
"li: 0x%x, changelogdir: 0x%x\n", li, changelogdir);
return rc;
@@ -5985,7 +5985,7 @@ _dblayer_get_changelogdir(struct ldbminfo *li, char **changelogdir)
goto bail;
}
if (LDAP_SUCCESS != rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: Failed to search \"%s\"\n",
CHANGELOGENTRY);
goto bail;
}
@@ -6046,7 +6046,7 @@ dblayer_backup(struct ldbminfo *li, char *dest_dir, Slapi_Task
*task)
home_dir = dblayer_get_home_dir(li, NULL);
if (NULL == home_dir || '\0' == *home_dir)
{
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"Backup: missing db home directory info\n");
return return_value;
}
@@ -6084,13 +6084,13 @@ dblayer_backup(struct ldbminfo *li, char *dest_dir, Slapi_Task
*task)
dblayer_txn_init(li,&txn);
return_value = dblayer_txn_begin_all(li, NULL, &txn);
if (return_value) {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"Backup: transaction error\n");
return return_value;
}
if ( g_get_shutdown() || c_get_shutdown() ) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "Backup aborted\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "Backup aborted\n");
return_value = -1;
goto bail;
}
@@ -6102,7 +6102,7 @@ dblayer_backup(struct ldbminfo *li, char *dest_dir, Slapi_Task
*task)
return_value = LOG_ARCHIVE(priv->dblayer_env->dblayer_DB_ENV,
&listA, DB_ARCH_LOG, (void *)slapi_ch_malloc);
if (return_value || (listA == NULL)) {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"Backup: log archive error\n");
if (task) {
slapi_task_log_notice(task, "Backup: log archive
error\n");
@@ -6114,7 +6114,7 @@ dblayer_backup(struct ldbminfo *li, char *dest_dir, Slapi_Task
*task)
ok=1;
}
if ( g_get_shutdown() || c_get_shutdown() ) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "Backup aborted\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "Backup aborted\n");
return_value = -1;
goto bail;
}
@@ -6126,7 +6126,7 @@ dblayer_backup(struct ldbminfo *li, char *dest_dir, Slapi_Task
*task)
inst_dirp = dblayer_get_full_inst_dir(inst->inst_li, inst,
inst_dir, MAXPATHLEN);
if ((NULL == inst_dirp) || ('\0' == *inst_dirp)) {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"Backup: Instance dir is empty\n");
if (task) {
slapi_task_log_notice(task,
@@ -6190,7 +6190,7 @@ dblayer_backup(struct ldbminfo *li, char *dest_dir, Slapi_Task
*task)
slapi_ch_free_string(&pathname2);
slapi_ch_free_string(&changelog_destdir);
if (0 > return_value) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "Backup: Failed to copy file
%s\n", pathname1);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "Backup: Failed to copy file
%s\n", pathname1);
slapi_ch_free_string(&pathname1);
goto bail;
}
@@ -6201,7 +6201,7 @@ dblayer_backup(struct ldbminfo *li, char *dest_dir, Slapi_Task
*task)
return_value = LOG_ARCHIVE(priv->dblayer_env->dblayer_DB_ENV,
&listB, DB_ARCH_LOG, (void *)slapi_ch_malloc);
if (return_value || (listB == NULL)) {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"Backup: can't get list of logs\n");
goto bail;
}
@@ -6218,7 +6218,7 @@ dblayer_backup(struct ldbminfo *li, char *dest_dir, Slapi_Task
*task)
}
if (! found) {
ok = 0; /* missing log: start over */
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"WARNING: Log %s has been swiped "
"out from under me! (retrying)\n", *listi);
if (task) {
@@ -6230,7 +6230,7 @@ dblayer_backup(struct ldbminfo *li, char *dest_dir, Slapi_Task
*task)
}
if ( g_get_shutdown() || c_get_shutdown() ) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "Backup aborted\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "Backup aborted\n");
return_value = -1;
goto bail;
}
@@ -6255,7 +6255,7 @@ dblayer_backup(struct ldbminfo *li, char *dest_dir, Slapi_Task
*task)
for (listptr = listB; listptr && *listptr && ok;
++listptr) {
PR_snprintf(pathname1, p1len, "%s/%s", prefix, *listptr);
PR_snprintf(pathname2, p2len, "%s/%s", dest_dir,
*listptr);
- LDAPDebug2Args(LDAP_DEBUG_ANY, "Backing up file %d
(%s)\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "Backing up file %d
(%s)\n",
cnt, pathname2);
if (task)
{
@@ -6267,7 +6267,7 @@ dblayer_backup(struct ldbminfo *li, char *dest_dir, Slapi_Task
*task)
return_value = dblayer_copyfile(pathname1, pathname2,
0, priv->dblayer_file_mode);
if (0 > return_value) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, "Backup: error in copying
file '%s' (err=%d)\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "Backup: error in
copying file '%s' (err=%d)\n",
pathname1, return_value);
if (task) {
slapi_task_log_notice(task, "Error copying file
'%s' (err=%d)",
@@ -6278,7 +6278,7 @@ dblayer_backup(struct ldbminfo *li, char *dest_dir, Slapi_Task
*task)
goto bail;
}
if ( g_get_shutdown() || c_get_shutdown() ) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "Backup aborted\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "Backup
aborted\n");
return_value = -1;
slapi_ch_free((void **)&pathname1);
slapi_ch_free((void **)&pathname2);
@@ -6298,7 +6298,7 @@ dblayer_backup(struct ldbminfo *li, char *dest_dir, Slapi_Task
*task)
/* now copy the version file */
pathname1 = slapi_ch_smprintf("%s/%s", home_dir, DBVERSION_FILENAME);
pathname2 = slapi_ch_smprintf("%s/%s", dest_dir, DBVERSION_FILENAME);
- LDAPDebug2Args(LDAP_DEBUG_ANY, "Backing up file %d (%s)\n", cnt,
pathname2);
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "Backing up file %d (%s)\n", cnt,
pathname2);
if (task) {
slapi_task_log_notice(task, "Backing up file %d (%s)", cnt,
pathname2);
slapi_task_log_status(task, "Backing up file %d (%s)", cnt,
pathname2);
@@ -6487,7 +6487,7 @@ static int dblayer_copy_dirand_contents(char* src_dir, char*
dst_dir, int mode,
return_value = dblayer_copyfile(filename1, filename2, 0, mode);
}
if (0 > return_value) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "dblayer_copy_dirand_contents: failed to copy
file %s\n", filename1);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_dirand_contents:
failed to copy file %s\n", filename1);
break;
}
}
@@ -6666,7 +6666,7 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task
*task, char *
if (NULL == home_dir || '\0' == *home_dir)
{
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"Restore: missing db home directory info\n");
return -1;
}
@@ -6676,7 +6676,7 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task
*task, char *
/* We check on the source staging area, no point in going further if it
* isn't there */
if (stat(src_dir, &sbuf) < 0) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "Restore: backup directory %s does not "
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "Restore: backup directory %s does
not "
"exist.\n", src_dir);
if (task) {
slapi_task_log_notice(task, "Restore: backup directory %s does not
"
@@ -6684,7 +6684,7 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task
*task, char *
}
return LDAP_UNWILLING_TO_PERFORM;
} else if (!S_ISDIR(sbuf.st_mode)) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "Restore: backup directory %s is not "
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "Restore: backup directory %s is not
"
"a directory.\n", src_dir);
if (task) {
slapi_task_log_notice(task, "Restore: backup directory %s is not "
@@ -6693,7 +6693,7 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task
*task, char *
return LDAP_UNWILLING_TO_PERFORM;
}
if (!dbversion_exists(li, src_dir)) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "Restore: backup directory %s does not "
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "Restore: backup directory %s does
not "
"contain a complete backup\n", src_dir);
if (task) {
slapi_task_log_notice(task, "Restore: backup directory %s does not
"
@@ -6733,7 +6733,7 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task
*task, char *
inst = ldbm_instance_find_by_name(li, (char *)direntry->name);
if ( inst == NULL)
{
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"Restore: target server has no %s
configured\n",
direntry->name);
if (task) {
@@ -6748,7 +6748,7 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task
*task, char *
if (slapd_comp_path(src_dir, inst->inst_parent_dir_name)
== 0) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"Restore: backup dir %s and target dir %s "
"are identical\n",
src_dir, inst->inst_parent_dir_name);
@@ -6796,7 +6796,7 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task
*task, char *
* rather than to the db dirctory */
dirhandle = PR_OpenDir(real_src_dir);
if (NULL == dirhandle) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"Restore: failed to open the directory \"%s\"\n",
real_src_dir);
if (task) {
slapi_task_log_notice(task,
@@ -6828,7 +6828,7 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task
*task, char *
char *cldirname = PL_strrchr(changelogdir, '/');
char *p = filename1 + strlen(filename1);
if (NULL == cldirname) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"Restore: broken changelog dir path %s\n",
changelogdir);
if (task) {
@@ -6847,7 +6847,7 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task
*task, char *
&cnt, 0, 0, 1);
*cldirname = '/';
if (return_value) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"Restore: failed to copy directory %s\n",
filename1);
if (task) {
@@ -6866,7 +6866,7 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task
*task, char *
return_value = dblayer_copyfile(filename1, filename2,
0, priv->dblayer_file_mode);
if (0 > return_value) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "Restore: failed to copy file
%s\n", filename1);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "Restore: failed to
copy file %s\n", filename1);
goto error_out;
}
}
@@ -6884,7 +6884,7 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task
*task, char *
continue;
else
{
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"Restore: failed to copy directory %s\n",
filename1);
if (task) {
@@ -6917,7 +6917,7 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task
*task, char *
real_src_dir, direntry->name);
PR_snprintf(filename2, sizeof(filename2), "%s/%s",
prefix, direntry->name);
- LDAPDebug2Args(LDAP_DEBUG_ANY, "Restoring file %d (%s)\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "Restoring file %d (%s)\n",
cnt, filename2);
if (task) {
slapi_task_log_notice(task, "Restoring file %d (%s)",
@@ -6928,7 +6928,7 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task
*task, char *
return_value = dblayer_copyfile(filename1, filename2, 0,
priv->dblayer_file_mode);
if (0 > return_value) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "Restore: failed to copy file %s\n",
filename1);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "Restore: failed to copy file
%s\n", filename1);
goto error_out;
}
cnt++;
@@ -6945,7 +6945,7 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task
*task, char *
if (dbversion_read(li, home_dir, &ldbmversion, &dataversion) != 0)
{
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "Warning: Unable to read dbversion "
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "Warning: Unable to read
dbversion "
"file in %s\n", home_dir);
}
else
@@ -6968,7 +6968,7 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task
*task, char *
}
else if (action & DBVERSION_NEED_DN2RDN)
{
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"%s is on, while the instance %s is in the DN format. "
"Please run dn2rdn to convert the database format.\n",
CONFIG_ENTRYRDN_SWITCH, inst->inst_name);
@@ -6977,7 +6977,7 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task
*task, char *
}
else if (action & DBVERSION_NEED_RDN2DN)
{
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"%s is off, while the instance %s is in the RDN format. "
"Please change the value to on in dse.ldif.\n",
CONFIG_ENTRYRDN_SWITCH, inst->inst_name);
@@ -7006,7 +7006,7 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task
*task, char *
tmp_rval = dblayer_start(li, dbmode);
if (0 != tmp_rval) {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"Restore: failed to init database\n");
if (task) {
slapi_task_log_notice(task, "Restore: failed to init database");
@@ -7019,7 +7019,7 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task
*task, char *
/* check the DSE_* files, if any */
tmp_rval = dse_conf_verify(li, real_src_dir, bename);
if (0 != tmp_rval)
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: Unable to verify the index
configuration\n");
}
@@ -7027,7 +7027,7 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task
*task, char *
/* command line: close the database down again */
tmp_rval = dblayer_close(li, dbmode);
if (0 != tmp_rval) {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"Restore: Failed to close database\n");
}
} else {
@@ -7043,12 +7043,12 @@ error_out:
if (frirestore && PR_Access(real_src_dir, PR_ACCESS_EXISTS) ==
PR_SUCCESS)
{
int ret1 = 0;
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"Restore: Removing staging area %s.\n",
real_src_dir);
ret1 = ldbm_delete_dirs(real_src_dir);
if (ret1)
{
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"Restore: Removal of staging area %s failed!\n",
real_src_dir);
}
@@ -7153,7 +7153,7 @@ dblayer_file_check(char *fname, int mode)
err = PR_GetOpenFileInfo64(prfd, &prfinfo);
if (err == PR_SUCCESS && 0 == prfinfo.size) {
/* it is empty restore or import has failed */
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"Previous import or restore failed, file: %s is
empty\n", fname);
}
PR_Close(prfd);
diff --git a/ldap/servers/slapd/back-ldbm/dbverify.c
b/ldap/servers/slapd/back-ldbm/dbverify.c
index 42d2210..192ba52 100644
--- a/ldap/servers/slapd/back-ldbm/dbverify.c
+++ b/ldap/servers/slapd/back-ldbm/dbverify.c
@@ -36,7 +36,7 @@ dbverify_ext( ldbm_instance *inst, int verbose )
inst->inst_dir_name);
if ('\0' != dbdir[sizeof(dbdir)-1]) /* overflown */
{
- slapi_log_error(SLAPI_LOG_FATAL, "DB verify",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "DB verify",
"db path too long: %s/%s\n",
inst->inst_parent_dir_name, inst->inst_dir_name);
return 1;
@@ -49,7 +49,7 @@ dbverify_ext( ldbm_instance *inst, int verbose )
dirhandle = PR_OpenDir(dbdir);
if (! dirhandle)
{
- slapi_log_error(SLAPI_LOG_FATAL, "DB verify",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "DB verify",
"PR_OpenDir (%s) failed (%d): %s\n",
dbdir, PR_GetError(),slapd_pr_strerror(PR_GetError()));
return 1;
@@ -70,7 +70,7 @@ dbverify_ext( ldbm_instance *inst, int verbose )
}
if (sizeof(direntry->name) + 2 > filelen)
{
- slapi_log_error(SLAPI_LOG_FATAL, "DB verify",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "DB verify",
"db path too long: %s/%s\n",
dbdir, direntry->name);
continue;
@@ -79,7 +79,7 @@ dbverify_ext( ldbm_instance *inst, int verbose )
rval = db_create(&dbp, pEnv->dblayer_DB_ENV, 0);
if (0 != rval)
{
- slapi_log_error(SLAPI_LOG_FATAL, "DB verify",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "DB verify",
"Unable to create id2entry db file %d\n", rval);
return rval;
}
@@ -114,7 +114,7 @@ dbverify_ext( ldbm_instance *inst, int verbose )
}
if (0 != rval)
{
- slapi_log_error(SLAPI_LOG_FATAL, "DB verify",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "DB verify",
"Unable to set pagesize flags to db (%d)\n", rval);
return rval;
}
@@ -123,7 +123,7 @@ dbverify_ext( ldbm_instance *inst, int verbose )
rval = dbp->set_flags(dbp, DB_RECNUM);
if (0 != rval)
{
- slapi_log_error(SLAPI_LOG_FATAL, "DB verify",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "DB verify",
"Unable to set RECNUM flag to vlv index (%d)\n",
rval);
return rval;
}
@@ -133,7 +133,7 @@ dbverify_ext( ldbm_instance *inst, int verbose )
rval = dbp->set_flags(dbp, DB_DUP | DB_DUPSORT);
if (0 != rval)
{
- slapi_log_error(SLAPI_LOG_FATAL, "DB verify",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "DB verify",
"Unable to set DUP flags to db (%d)\n", rval);
return rval;
}
@@ -147,7 +147,7 @@ dbverify_ext( ldbm_instance *inst, int verbose )
if (0 != rval)
{
- slapi_log_error(SLAPI_LOG_FATAL, "DB verify",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "DB verify",
"Unable to set dup_compare to db (%d)\n", rval);
return rval;
}
@@ -159,13 +159,13 @@ dbverify_ext( ldbm_instance *inst, int verbose )
{
if (verbose)
{
- slapi_log_error(SLAPI_LOG_FATAL, "DB verify",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "DB verify",
"%s: ok\n", dbdir);
}
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, "DB verify",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "DB verify",
"verify failed(%d): %s\n", rval, dbdir);
}
rval_main |= rval;
@@ -188,7 +188,7 @@ ldbm_back_dbverify( Slapi_PBlock *pb )
char **instance_names = NULL;
char *dbdir = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, "verify DB", "Verifying db
files...\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "verify DB", "Verifying db
files...\n");
slapi_pblock_get(pb, SLAPI_BACKEND_INSTANCE_NAME, &instance_names);
slapi_pblock_get(pb, SLAPI_SEQ_TYPE, &verbose);
slapi_pblock_get(pb, SLAPI_PLUGIN_PRIVATE, &li);
@@ -199,13 +199,13 @@ ldbm_back_dbverify( Slapi_PBlock *pb )
/* no write needed; choose EXPORT MODE */
if (0 != dblayer_start(li, DBLAYER_EXPORT_MODE))
{
- slapi_log_error(SLAPI_LOG_FATAL, "verify DB",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "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");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "verify DB", "server is
up\n");
if (instance_names) /* instance is specified */
{
char **inp = NULL;
@@ -237,7 +237,7 @@ ldbm_back_dbverify( Slapi_PBlock *pb )
if (instance_set_busy(inst) != 0)
{
/* standalone, only. never happens */
- slapi_log_error(SLAPI_LOG_FATAL, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
"ldbm: '%s' is already in the middle of "
"another task and cannot be disturbed.\n",
inst->inst_name);
@@ -256,7 +256,7 @@ ldbm_back_dbverify( Slapi_PBlock *pb )
rval = dblayer_post_close(li, DBLAYER_EXPORT_MODE);
if (0 != rval)
{
- slapi_log_error(SLAPI_LOG_FATAL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"verify DB", "Failed to close database\n");
}
diff --git a/ldap/servers/slapd/back-ldbm/dn2entry.c
b/ldap/servers/slapd/back-ldbm/dn2entry.c
index 3db2b3f..fb5ed90 100644
--- a/ldap/servers/slapd/back-ldbm/dn2entry.c
+++ b/ldap/servers/slapd/back-ldbm/dn2entry.c
@@ -66,7 +66,7 @@ dn2entry_ext(
{
if (DB_NOTFOUND != *err)
{
- LDAPDebug2Args( LDAP_DEBUG_ANY,
+ LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR,
"dn2entry_ext: Failed to get id for %s "
"from entryrdn index (%d)\n",
slapi_sdn_get_dn(sdn), *err);
diff --git a/ldap/servers/slapd/back-ldbm/findentry.c
b/ldap/servers/slapd/back-ldbm/findentry.c
index 4942ada..5a60892 100644
--- a/ldap/servers/slapd/back-ldbm/findentry.c
+++ b/ldap/servers/slapd/back-ldbm/findentry.c
@@ -335,10 +335,10 @@ find_entry_internal(
if (addr->sdn) {
entry = find_entry_internal_dn (pb, be, addr->sdn, lock, txn, flags, rc);
} else {
- LDAPDebug0Args( LDAP_DEBUG_ANY, "find_entry_internal: Null target dn\n" );
+ LDAPDebug0Args( LDAP_DEBUG_ANY, LOG_ERR, "find_entry_internal: Null target
dn\n" );
}
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= find_entry_internal\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_ERR, "<= find_entry_internal\n" );
return entry;
}
}
diff --git a/ldap/servers/slapd/back-ldbm/id2entry.c
b/ldap/servers/slapd/back-ldbm/id2entry.c
index e6521d9..e0ea621 100644
--- a/ldap/servers/slapd/back-ldbm/id2entry.c
+++ b/ldap/servers/slapd/back-ldbm/id2entry.c
@@ -90,7 +90,7 @@ id2entry_add_ext(backend *be, struct backentry *e, back_txn *txn,
}
CACHE_RETURN(&inst->inst_dncache, &bdn);
- LDAPDebug2Args( LDAP_DEBUG_TRACE,
+ LDAPDebug2Args( LDAP_DEBUG_TRACE, LOG_DEBUG,
"=> id2entry_add (dncache) ( %lu, \"%s\" )\n",
(u_long)e->ep_id, slapi_entry_get_dn_const(entry_to_use) );
}
@@ -234,7 +234,7 @@ id2entry_delete( backend *be, struct backentry *e, back_txn *txn )
ldbm_instance *inst = (ldbm_instance *)be->be_instance_info;
struct backdn *bdn = dncache_find_id(&inst->inst_dncache, e->ep_id);
if (bdn) {
- slapi_log_error(SLAPI_LOG_CACHE, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG, ID2ENTRY,
"dncache_find_id returned: %s\n",
slapi_sdn_get_dn(bdn->dn_sdn));
CACHE_REMOVE(&inst->inst_dncache, bdn);
@@ -261,11 +261,11 @@ id2entry( backend *be, ID id, back_txn *txn, int *err )
Slapi_Entry *ee;
char temp_id[sizeof(ID)];
- slapi_log_error(SLAPI_LOG_TRACE, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ID2ENTRY,
"=> id2entry(%lu)\n", (u_long)id);
if ( (e = cache_find_id( &inst->inst_cache, id )) != NULL ) {
- slapi_log_error(SLAPI_LOG_TRACE, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ID2ENTRY,
"<= id2entry %p, dn \"%s\" (cache)\n",
e, backentry_get_ndn(e));
goto bail;
@@ -273,7 +273,7 @@ id2entry( backend *be, ID id, back_txn *txn, int *err )
*err = dblayer_get_id2entry( be, &db );
if ( (*err != 0) || (NULL == db) ) {
- slapi_log_error(SLAPI_LOG_FATAL, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ID2ENTRY,
"Could not open id2entry err %d\n", *err);
return( NULL );
}
@@ -295,7 +295,7 @@ id2entry( backend *be, ID id, back_txn *txn, int *err )
if ( (0 != *err) &&
(DB_NOTFOUND != *err) && (DB_LOCK_DEADLOCK != *err) )
{
- slapi_log_error(SLAPI_LOG_FATAL, ID2ENTRY, "db error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ID2ENTRY, "db error %d
(%s)\n",
*err, dblayer_strerror( *err ));
}
}
@@ -310,7 +310,7 @@ id2entry( backend *be, ID id, back_txn *txn, int *err )
* by ENV->set_alloc in dblayer.c. As long as the functions are
* used by libdb, it won't reach here.
*/
- slapi_log_error(SLAPI_LOG_FATAL, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ID2ENTRY,
"malloc failed in libdb; "
"terminating the server; OS error %d (%s)\n",
*err, slapd_system_strerror( *err ));
@@ -321,7 +321,7 @@ id2entry( backend *be, ID id, back_txn *txn, int *err )
}
if ( data.dptr == NULL ) {
- slapi_log_error(SLAPI_LOG_TRACE, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ID2ENTRY,
"<= id2entry( %lu ) not found\n", (u_long)id);
goto bail;
}
@@ -344,20 +344,20 @@ id2entry( backend *be, ID id, back_txn *txn, int *err )
struct backdn *bdn = dncache_find_id(&inst->inst_dncache, id);
if (bdn) {
normdn = slapi_ch_strdup(slapi_sdn_get_dn(bdn->dn_sdn));
- slapi_log_error(SLAPI_LOG_CACHE, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG, ID2ENTRY,
"dncache_find_id returned: %s\n", normdn);
CACHE_RETURN(&inst->inst_dncache, &bdn);
} else {
Slapi_DN *sdn = NULL;
rc = entryrdn_lookup_dn(be, rdn, id, &normdn, &srdn, txn);
if (rc) {
- slapi_log_error(SLAPI_LOG_TRACE, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ID2ENTRY,
"id2entry: entryrdn look up failed "
"(rdn=%s, ID=%d)\n", rdn, id);
/* Try rdn as dn. Could be RUV. */
normdn = slapi_ch_strdup(rdn);
} else if (NULL == normdn) {
- slapi_log_error(SLAPI_LOG_FATAL, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ID2ENTRY,
"<= id2entry( %lu ) entryrdn_lookup_dn returned NULL.
"
"Index file may be deleted or corrupted.\n",
(u_long)id);
@@ -367,11 +367,11 @@ id2entry( backend *be, ID id, back_txn *txn, int *err )
bdn = backdn_init(sdn, id, 0);
if (CACHE_ADD( &inst->inst_dncache, bdn, NULL )) {
backdn_free(&bdn);
- slapi_log_error(SLAPI_LOG_CACHE, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG, ID2ENTRY,
"%s is already in the dn cache\n",
normdn);
} else {
CACHE_RETURN(&inst->inst_dncache, &bdn);
- slapi_log_error(SLAPI_LOG_CACHE, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG, ID2ENTRY,
"entryrdn_lookup_dn returned: %s, "
"and set to dn cache (id %d)\n", normdn,
id);
}
@@ -395,7 +395,7 @@ id2entry( backend *be, ID id, back_txn *txn, int *err )
/* ownership of the entry is passed into the backentry */
e = backentry_init( ee );
e->ep_id = id;
- slapi_log_error(SLAPI_LOG_TRACE, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ID2ENTRY,
"id2entry id: %d, dn \"%s\" -- adding it to
cache\n",
id, backentry_get_ndn(e));
@@ -403,7 +403,7 @@ id2entry( backend *be, ID id, back_txn *txn, int *err )
* before adding it to the cache */
retval = attrcrypt_decrypt_entry(be, e);
if (retval) {
- slapi_log_error(SLAPI_LOG_FATAL, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ID2ENTRY,
"attrcrypt_decrypt_entry failed in id2entry\n");
}
@@ -444,13 +444,13 @@ id2entry( backend *be, ID id, back_txn *txn, int *err )
} else if (-1 == retval) {
/* the entry is in idtable but not in dntable, i.e., the entry
* could have been renamed */
- slapi_log_error(SLAPI_LOG_TRACE, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ID2ENTRY,
"id2entry: failed to put entry (id %lu, dn %s) "
"into entry cache\n", (u_long)id,
backentry_get_ndn(e));
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ID2ENTRY,
"str2entry returned NULL for id %lu,
string=\"%s\"\n",
(u_long)id, (char*)data.data);
e = NULL;
@@ -461,7 +461,7 @@ bail:
dblayer_release_id2entry( be, db );
- slapi_log_error(SLAPI_LOG_TRACE, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ID2ENTRY,
"<= id2entry( %lu ) %p (disk)\n", (u_long)id, e);
return( e );
}
diff --git a/ldap/servers/slapd/back-ldbm/idl.c b/ldap/servers/slapd/back-ldbm/idl.c
index 7ecdc81..9263b87 100644
--- a/ldap/servers/slapd/back-ldbm/idl.c
+++ b/ldap/servers/slapd/back-ldbm/idl.c
@@ -398,6 +398,7 @@ idl_store(
operation_out_of_disk_space();
}
LDAPDebug( ((DB_LOCK_DEADLOCK == rc) ? LDAP_DEBUG_TRACE : LDAP_DEBUG_ANY),
+ ((DB_LOCK_DEADLOCK == rc) ? LOG_DEBUG : LOG_ERR),
"idl_store(%s) returns %d %s\n",
((char*)key->dptr)[ key->dsize - 1 ] ? "" :
(char*)key->dptr,
rc, (msg = dblayer_strerror( rc )) ? msg : "" );
diff --git a/ldap/servers/slapd/back-ldbm/idl_new.c
b/ldap/servers/slapd/back-ldbm/idl_new.c
index a20587e..e48953d 100644
--- a/ldap/servers/slapd/back-ldbm/idl_new.c
+++ b/ldap/servers/slapd/back-ldbm/idl_new.c
@@ -231,7 +231,7 @@ idl_new_fetch(
if (ptr == NULL) break;
if (*(int32_t *)ptr < -1) {
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, "DB_MULTIPLE buffer is corrupt;
"
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "DB_MULTIPLE buffer is
corrupt; "
"next offset [%d] is less than zero\n",
*(int32_t *)ptr);
/* retry the read */
@@ -245,7 +245,7 @@ idl_new_fetch(
}
memcpy(&id, dataret.data, sizeof(ID));
if (id == lastid) { /* dup */
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, "Detected duplicate id "
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "Detected duplicate id
"
"%d due to DB_MULTIPLE error - skipping\n",
id);
continue; /* get next one */
@@ -292,7 +292,7 @@ idl_new_fetch(
/* we got another ID, add it to our IDL */
idl_rc = idl_append_extend(&idl, id);
if (idl_rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"unable to extend id list (err=%d)\n", idl_rc);
idl_free(&idl);
goto error;
@@ -494,13 +494,13 @@ idl_new_range_fetch(
(idl->b_nids > (ID)lookthrough_limit)) {
idl_free(&idl);
idl = idl_allids( be );
- LDAPDebug0Args(LDAP_DEBUG_TRACE,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"idl_new_range_fetch - lookthrough_limit
exceeded\n");
*flag_err = LDAP_ADMINLIMIT_EXCEEDED;
goto error;
}
if ((sizelimit > 0) && (idl->b_nids > (ID)sizelimit)) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"idl_new_range_fetch - sizelimit exceeded\n");
*flag_err = LDAP_SIZELIMIT_EXCEEDED;
goto error;
@@ -510,7 +510,7 @@ idl_new_range_fetch(
if (stoptime > 0) { /* timelimit is set */
curtime = current_time();
if (curtime >= stoptime) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"idl_new_range_fetch - timelimit exceeded\n");
*flag_err = LDAP_TIMELIMIT_EXCEEDED;
goto error;
@@ -525,7 +525,7 @@ idl_new_range_fetch(
if (ptr == NULL) break;
if (*(int32_t *)ptr < -1) {
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, "DB_MULTIPLE buffer is corrupt;
"
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "DB_MULTIPLE buffer is
corrupt; "
"next offset [%d] is less than zero\n",
*(int32_t *)ptr);
/* retry the read */
@@ -539,7 +539,7 @@ idl_new_range_fetch(
}
memcpy(&id, dataret.data, sizeof(ID));
if (id == lastid) { /* dup */
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, "Detedted duplicate id "
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "Detedted duplicate id
"
"%d due to DB_MULTIPLE error - skipping\n",
id);
continue; /* get next one */
@@ -571,7 +571,7 @@ idl_new_range_fetch(
idl_rc = idl_append_extend(&idl, id);
}
if (idl_rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"unable to extend id list (err=%d)\n", idl_rc);
idl_free(&idl);
goto error;
@@ -636,13 +636,13 @@ idl_new_range_fetch(
(idl->b_nids > (ID)lookthrough_limit)) {
idl_free(&idl);
idl = idl_allids( be );
- LDAPDebug0Args(LDAP_DEBUG_TRACE,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"idl_new_range_fetch - lookthrough_limit
exceeded\n");
*flag_err = LDAP_ADMINLIMIT_EXCEEDED;
goto error;
}
if ((sizelimit > 0) && (idl->b_nids > (ID)sizelimit)) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"idl_new_range_fetch - sizelimit exceeded\n");
*flag_err = LDAP_SIZELIMIT_EXCEEDED;
goto error;
@@ -652,7 +652,7 @@ idl_new_range_fetch(
if (stoptime > 0) { /* timelimit is set */
curtime = current_time();
if (curtime >= stoptime) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"idl_new_range_fetch - timelimit exceeded\n");
*flag_err = LDAP_TIMELIMIT_EXCEEDED;
goto error;
@@ -683,7 +683,7 @@ idl_new_range_fetch(
/* we got another ID, add it to our IDL */
idl_rc = idl_append_extend(&idl, id);
if (idl_rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"unable to extend id list (err=%d)\n", idl_rc);
idl_free(&idl);
goto error;
@@ -714,10 +714,10 @@ idl_new_range_fetch(
if (idl && (idl->b_nids == 1) && (idl->b_ids[0] == ALLID)) {
idl_free(&idl);
idl = idl_allids(be);
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, "idl_new_fetch %s returns allids\n",
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "idl_new_fetch %s returns
allids\n",
cur_key.data);
} else {
- LDAPDebug2Args(LDAP_DEBUG_TRACE, "idl_new_fetch %s returns nids=%lu\n",
+ LDAPDebug2Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "idl_new_fetch %s returns
nids=%lu\n",
cur_key.data, (u_long)IDL_NIDS(idl));
}
@@ -754,7 +754,7 @@ error:
if (leftover[i].key && idl_id_is_in_idlist(idl, leftover[i].key))
{
idl_rc = idl_append_extend(&idl, leftover[i].id);
if (idl_rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "unable to extend id list
(err=%d)\n", idl_rc);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "unable to extend id
list (err=%d)\n", idl_rc);
idl_free(&idl);
return NULL;
}
diff --git a/ldap/servers/slapd/back-ldbm/import-threads.c
b/ldap/servers/slapd/back-ldbm/import-threads.c
index 62daa7c..d47c9ba 100644
--- a/ldap/servers/slapd/back-ldbm/import-threads.c
+++ b/ldap/servers/slapd/back-ldbm/import-threads.c
@@ -914,7 +914,7 @@ index_producer(void *param)
/* open id2entry with dedicated db env and db handler */
if ( dblayer_get_aux_id2entry( be, &db, &env, &id2entry ) != 0 ||
db == NULL || env == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "Could not open id2entry\n" );
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "Could not open id2entry\n" );
goto error;
}
if (job->flags & FLAG_DN2RDN) {
@@ -922,7 +922,7 @@ index_producer(void *param)
if ( dblayer_get_aux_id2entry_ext( be, &tmp_db, &env, &tmpid2entry,
DBLAYER_AUX_ID2ENTRY_TMP ) != 0 ||
tmp_db == NULL || env == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "Could not open new id2entry\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "Could not open new
id2entry\n");
goto error;
}
}
@@ -1002,7 +1002,7 @@ index_producer(void *param)
/* store it in the new id2entry db file */
rc = tmp_db->put( tmp_db, NULL, &key, &data, 0);
if (rc) {
- LDAPDebug2Args( LDAP_DEBUG_TRACE,
+ LDAPDebug2Args( LDAP_DEBUG_TRACE, LOG_DEBUG,
"index_producer: converting an entry "
"from dn format to rdn format failed "
"(dn: %s, ID: %d)\n",
@@ -1029,7 +1029,7 @@ index_producer(void *param)
char *pid_str = NULL;
char *pdn = NULL;
- LDAPDebug2Args( LDAP_DEBUG_TRACE,
+ LDAPDebug2Args( LDAP_DEBUG_TRACE, LOG_DEBUG,
"index_producer: entryrdn is not available;
"
"composing dn (rdn: %s, ID: %d)\n",
rdn, temp_id);
@@ -1045,7 +1045,7 @@ index_producer(void *param)
rc = import_get_and_add_parent_rdns(info, inst, db,
pid, &id, &psrdn,
&curr_entry);
if (rc) {
- LDAPDebug2Args( LDAP_DEBUG_ANY,
+ LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR,
"ldbm2index: Failed to compose dn for "
"(rdn: %s, ID: %d)\n", rdn, temp_id);
slapi_ch_free_string(&rdn);
@@ -1056,7 +1056,7 @@ index_producer(void *param)
rc = slapi_rdn_get_dn(&psrdn, &pdn);
slapi_rdn_done(&psrdn);
if (rc) {
- LDAPDebug2Args( LDAP_DEBUG_ANY,
+ LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR,
"ldbm2index: Failed to compose dn for "
"(rdn: %s, ID: %d) from Slapi_RDN\n",
rdn, temp_id);
@@ -1074,7 +1074,7 @@ index_producer(void *param)
bdn = backdn_init(sdn, temp_id, 0);
CACHE_ADD( &inst->inst_dncache, bdn, NULL );
CACHE_RETURN(&inst->inst_dncache, &bdn);
- slapi_log_error(SLAPI_LOG_CACHE, "ldbm2index",
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG, "ldbm2index",
"entryrdn_lookup_dn returned: %s, "
"and set to dn cache\n", normdn);
}
@@ -1118,25 +1118,25 @@ index_producer(void *param)
tmp_db->close(tmp_db, 0);
rc = db_create(&db, env, 0);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"Creating db handle to remove %s failed.\n",
id2entry);
goto bail;
}
rc = db->remove(db, id2entry, NULL, 0);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "Removing %s failed.\n", id2entry);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "Removing %s failed.\n",
id2entry);
goto bail;
}
rc = db_create(&db, env, 0);
if (rc) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"Creating db handle to rename %s to %s failed.\n",
tmpid2entry, id2entry);
goto bail;
}
rc = db->rename(db, tmpid2entry, NULL, id2entry, 0);
if (rc) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, "Renaming %s to %s failed.\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "Renaming %s to %s
failed.\n",
tmpid2entry, id2entry);
goto bail;
}
@@ -1156,7 +1156,7 @@ error:
tmp_db->close(tmp_db, 0);
rc = db_create(&tmp_db, env, 0);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"Creating db handle to remove %s s failed.\n",
tmpid2entry);
goto bail;
@@ -1164,7 +1164,7 @@ error:
/* remove tmp */
rc = tmp_db->remove(tmp_db, tmpid2entry, NULL, 0);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "Removing %s failed.\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "Removing %s
failed.\n",
tmpid2entry);
goto bail;
}
@@ -1260,14 +1260,14 @@ add_IDs_to_IDarray(ID ***dn_norm_sp_conflict, int *max, int i,
char *strids)
}
p = PL_strchr(strids, ':');
if (NULL == p) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"Format error: no ':' in %s\n", strids);
return 1;
}
*p = '\0';
my_id = (ID)strtol(strids, (char **)NULL, 10);
if (!my_id) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "Invalid ID in %s\n", strids);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "Invalid ID in %s\n", strids);
return 1;
}
@@ -1463,7 +1463,7 @@ upgradedn_producer(void *param)
if (!chk_dn_norm && !chk_dn_norm_sp) {
/* Nothing to do... */
- LDAPDebug0Args(LDAP_DEBUG_ANY, "UpgradeDnFormat is not required.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "UpgradeDnFormat is not
required.\n");
info->state = FINISHED;
goto done;
}
@@ -1480,14 +1480,14 @@ upgradedn_producer(void *param)
/* open id2entry with dedicated db env and db handler */
if ( dblayer_get_aux_id2entry( be, &db, &env, NULL ) != 0 || db == NULL ||
env == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "Could not open id2entry\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "Could not open id2entry\n");
goto error;
}
/* get a cursor to we can walk over the table */
db_rval = db->cursor(db, NULL, &dbc, 0);
if ( db_rval || !dbc ) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "Failed to get cursor for
reindexing\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "Failed to get cursor for
reindexing\n");
dblayer_release_id2entry(be, db);
goto error;
}
@@ -1521,7 +1521,7 @@ upgradedn_producer(void *param)
if (0 != db_rval) {
if (DB_NOTFOUND == db_rval) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "%s: Finished to read
database\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "%s: Finished to read
database\n",
inst->inst_name);
if (job->task) {
slapi_task_log_notice(job->task,
@@ -1583,7 +1583,7 @@ upgradedn_producer(void *param)
char *pid_str = NULL;
char *pdn = NULL;
- LDAPDebug2Args( LDAP_DEBUG_TRACE,
+ LDAPDebug2Args( LDAP_DEBUG_TRACE, LOG_DEBUG,
"index_producer: entryrdn is not available;
"
"composing dn (rdn: %s, ID: %d)\n",
rdn, temp_id);
@@ -1599,7 +1599,7 @@ upgradedn_producer(void *param)
rc = import_get_and_add_parent_rdns(info, inst, db,
pid, &id, &psrdn,
&curr_entry);
if (rc) {
- LDAPDebug2Args( LDAP_DEBUG_ANY,
+ LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR,
"uptradedn: Failed to compose dn for "
"(rdn: %s, ID: %d)\n", rdn, temp_id);
slapi_ch_free_string(&rdn);
@@ -1610,7 +1610,7 @@ upgradedn_producer(void *param)
rc = slapi_rdn_get_dn(&psrdn, &pdn);
slapi_rdn_done(&psrdn);
if (rc) {
- LDAPDebug2Args( LDAP_DEBUG_ANY,
+ LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR,
"uptradedn: Failed to compose dn for "
"(rdn: %s, ID: %d) from Slapi_RDN\n",
rdn, temp_id);
@@ -1636,7 +1636,7 @@ upgradedn_producer(void *param)
CACHE_RETURN(&inst->inst_dncache, &bdn);
/* don't free this normdn */
normdn = (char *)slapi_sdn_get_dn(sdn);
- slapi_log_error(SLAPI_LOG_CACHE, "uptradedn",
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG,
"uptradedn",
"entryrdn_lookup_dn returned: %s, "
"and set to dn cache\n", normdn);
dn_in_cache = 1;
@@ -1707,7 +1707,7 @@ upgradedn_producer(void *param)
slapi_task_log_notice(job->task,
"%s: No DNs to fix.\n",
inst->inst_name);
}
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"%s: No DNs to fix.\n",
inst->inst_name);
slapi_ch_free_string(&path);
goto bail;
@@ -1720,7 +1720,7 @@ upgradedn_producer(void *param)
"%s: Error: failed to open a file
\"%s\"",
inst->inst_name, path);
}
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"%s: Error: failed to open a file
\"%s\"\n",
inst->inst_name, path);
slapi_ch_free_string(&path);
@@ -1740,7 +1740,7 @@ upgradedn_producer(void *param)
"%s: Error: failed to write a line
\"%s\"",
inst->inst_name, dn_id);
}
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"%s: Error: failed to write a line
\"%s\"",
inst->inst_name, dn_id);
slapi_ch_free_string(&dn_id);
@@ -1768,7 +1768,7 @@ upgradedn_producer(void *param)
}
if (add_IDs_to_IDarray(&dn_norm_sp_conflicts, &my_max,
my_idx, buf)) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"Failed to set IDs %s to conflict
list\n",
buf);
goto error;
@@ -1785,7 +1785,7 @@ upgradedn_producer(void *param)
LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Entry %s (%lu) is a conflict of (%lu)\n",
normdn, temp_id, alt_id);
- LDAPDebug2Args(LDAP_DEBUG_ANY, "Renaming \"%s\" to
\"%s\"\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "Renaming
\"%s\" to \"%s\"\n",
rdn, newrdn);
if (!dn_in_cache) {
/* If not in dn cache, normdn needs to be freed. */
@@ -1822,7 +1822,7 @@ upgradedn_producer(void *param)
bdn = backdn_init(sdn, temp_id, 0);
CACHE_ADD(&inst->inst_dncache, bdn, NULL);
CACHE_RETURN(&inst->inst_dncache, &bdn);
- slapi_log_error(SLAPI_LOG_CACHE, "uptradedn",
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG, "uptradedn",
"set dn %s to dn cache\n", normdn);
}
/* Check DN syntax attr values if it contains '\\' or not */
@@ -1856,7 +1856,7 @@ upgradedn_producer(void *param)
upgradedn_add_to_list(&ud_list,
slapi_ch_strdup(LDBM_ENTRYRDN_STR),
slapi_ch_strdup(rdn), 0);
- LDAPDebug2Args(LDAP_DEBUG_TRACE,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"%s: Found upgradedn candidate: (id %lu)\n",
inst->inst_name, (u_long)temp_id);
/*
@@ -3070,7 +3070,7 @@ static int bulk_import_start(Slapi_PBlock *pb)
slapi_pblock_get(pb, SLAPI_BACKEND, &be);
if (be == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "bulk_import_start: backend is not
set\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "bulk_import_start: backend is not
set\n");
return -1;
}
job = CALLOC(ImportJob);
@@ -3301,7 +3301,7 @@ static int bulk_import_queue(ImportJob *job, Slapi_Entry *entry)
if (sepp) {
Slapi_RDN mysrdn = {0};
if (slapi_rdn_init_all_dn(&mysrdn, sepp + 1)) {
- slapi_log_error(SLAPI_LOG_FATAL, "bulk_import_queue",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"bulk_import_queue",
"Failed to convert DN %s to RDN\n", sepp + 1);
slapi_ch_free_string(&tombstone_rdn);
/* entry is released in the frontend on failure*/
@@ -3407,7 +3407,7 @@ int ldbm_back_wire_import(Slapi_PBlock *pb)
slapi_pblock_get(pb, SLAPI_BACKEND, &be);
if (be == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "ldbm_back_wire_import: backend is not
set\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_back_wire_import: backend is
not set\n");
return -1;
}
li = (struct ldbminfo *)(be->be_database->plg_private);
@@ -3824,7 +3824,7 @@ import_get_and_add_parent_rdns(ImportWorkerInfo *info,
return rc;
}
if (NULL == inst || NULL == srdn) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"import_get_and_add_parent_rdns: Empty %s\n",
NULL==inst?"inst":"srdn");
return rc;
@@ -3838,7 +3838,7 @@ import_get_and_add_parent_rdns(ImportWorkerInfo *info,
if (slapi_rdn_get_rdn(srdn)) { /* srdn is already in use */
rc = slapi_rdn_init_all_dn(&mysrdn, slapi_sdn_get_dn(bdn->dn_sdn));
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"import_get_and_add_parent_rdns: "
"Failed to convert DN %s to RDN\n",
slapi_sdn_get_dn(bdn->dn_sdn));
@@ -3848,7 +3848,7 @@ import_get_and_add_parent_rdns(ImportWorkerInfo *info,
}
rc = slapi_rdn_add_srdn_to_all_rdns(srdn, &mysrdn);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"import_get_and_add_parent_rdns: "
"Failed to merge Slapi_RDN %s to RDN\n",
slapi_sdn_get_dn(bdn->dn_sdn));
@@ -3857,7 +3857,7 @@ import_get_and_add_parent_rdns(ImportWorkerInfo *info,
} else { /* srdn is empty */
rc = slapi_rdn_init_all_dn(srdn, slapi_sdn_get_dn(bdn->dn_sdn));
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"import_get_and_add_parent_rdns: "
"Failed to convert DN %s to RDN\n",
slapi_sdn_get_dn(bdn->dn_sdn));
@@ -3876,7 +3876,7 @@ import_get_and_add_parent_rdns(ImportWorkerInfo *info,
/* not in the dn cache; read id2entry */
if (NULL == db) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"import_get_and_add_parent_rdns: Empty db\n");
return rc;
}
@@ -3889,7 +3889,7 @@ import_get_and_add_parent_rdns(ImportWorkerInfo *info,
data.flags = DB_DBT_MALLOC;
rc = db->get(db, NULL, &key, &data, 0);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"import_get_and_add_parent_rdns: Failed to "
"position at ID " ID_FMT "\n", id);
return rc;
@@ -3897,7 +3897,7 @@ import_get_and_add_parent_rdns(ImportWorkerInfo *info,
/* rdn is allocated in get_value_from_string */
rc = get_value_from_string((const char *)data.dptr, "rdn", &rdn);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"import_get_and_add_parent_rdns: "
"Failed to get rdn of entry " ID_FMT
"\n", id);
goto bail;
@@ -3905,7 +3905,7 @@ import_get_and_add_parent_rdns(ImportWorkerInfo *info,
/* rdn is set to srdn */
rc = slapi_rdn_init_all_dn(&mysrdn, rdn);
if (rc < 0) { /* expect rc == 1 since we are setting "rdn" not
"dn" */
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"import_get_and_add_parent_rdns: "
"Failed to add rdn %s of entry " ID_FMT
"\n", rdn, id);
goto bail;
@@ -3928,7 +3928,7 @@ import_get_and_add_parent_rdns(ImportWorkerInfo *info,
normdn = NULL;
rc = slapi_rdn_get_dn(&mysrdn, &normdn);
if (rc) {
- LDAPDebug2Args( LDAP_DEBUG_ANY,
+ LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR,
"import_get_and_add_parent_rdns: "
"Failed to compose dn for (rdn: %s, ID: %d) "
"from Slapi_RDN\n", rdn, id);
@@ -3942,7 +3942,7 @@ import_get_and_add_parent_rdns(ImportWorkerInfo *info,
}
rc = slapi_rdn_add_srdn_to_all_rdns(srdn, &mysrdn);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"import_get_and_add_parent_rdns: "
"Failed to merge Slapi_RDN %s to RDN\n",
slapi_sdn_get_dn(bdn->dn_sdn));
diff --git a/ldap/servers/slapd/back-ldbm/import.c
b/ldap/servers/slapd/back-ldbm/import.c
index 0853bba..f87ad97 100644
--- a/ldap/servers/slapd/back-ldbm/import.c
+++ b/ldap/servers/slapd/back-ldbm/import.c
@@ -1460,14 +1460,14 @@ error:
/* initialize the entry cache */
if (! cache_init(&(inst->inst_cache), DEFAULT_CACHE_SIZE,
DEFAULT_CACHE_ENTRIES, CACHE_TYPE_ENTRY)) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "import_main_offline: "
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "import_main_offline: "
"cache_init failed. Server should be restarted.\n");
}
/* initialize the dn cache */
if (! cache_init(&(inst->inst_dncache), DEFAULT_DNCACHE_SIZE,
DEFAULT_DNCACHE_MAXCOUNT, CACHE_TYPE_DN)) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "import_main_offline: "
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "import_main_offline: "
"dn cache_init failed. Server should be
restarted.\n");
}
}
@@ -1621,7 +1621,7 @@ int ldbm_back_ldif2ldbm_deluxe(Slapi_PBlock *pb)
slapi_pblock_get(pb, SLAPI_BACKEND, &be);
if (be == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "ldbm_back_ldif2ldbm_deluxe: backend is not
set\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_back_ldif2ldbm_deluxe: backend
is not set\n");
return -1;
}
job = CALLOC(ImportJob);
@@ -1673,7 +1673,7 @@ int ldbm_back_ldif2ldbm_deluxe(Slapi_PBlock *pb)
if (entryrdn_get_switch()) {
job->flags |= FLAG_DN2RDN; /* migrate to the rdn format */
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"DN to RDN option is specified, "
"but %s is not enabled\n",
CONFIG_ENTRYRDN_SWITCH);
diff --git a/ldap/servers/slapd/back-ldbm/index.c b/ldap/servers/slapd/back-ldbm/index.c
index 7b454c5..3af04f2 100644
--- a/ldap/servers/slapd/back-ldbm/index.c
+++ b/ldap/servers/slapd/back-ldbm/index.c
@@ -900,7 +900,7 @@ index_read_ext_allids(
if (unindexed != NULL) *unindexed = 0;
prefix = index_index2prefix( indextype );
if (prefix == NULL) {
- LDAPDebug0Args( LDAP_DEBUG_ANY, "index_read_ext: NULL prefix\n" );
+ LDAPDebug0Args( LDAP_DEBUG_ANY, LOG_DEBUG, "index_read_ext: NULL prefix\n"
);
return NULL;
}
LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> index_read( \"%s\" %s
\"%s\" )\n",
@@ -971,7 +971,7 @@ index_read_ext_allids(
(allidslimit == 0)) {
idl = idl_allids( be );
if (unindexed != NULL) *unindexed = 1;
- LDAPDebug1Arg( LDAP_DEBUG_BACKLDBM, "<= index_read %lu candidates "
+ LDAPDebug1Arg( LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "<= index_read %lu candidates
"
"(do not use index)\n", (u_long)IDL_NIDS(idl) );
LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "<= index_read index attr %s type %s
"
"for value %s does not use index\n", basetype, indextype,
@@ -1244,7 +1244,7 @@ index_range_read_ext(
prefix = index_index2prefix( indextype );
if (prefix == NULL) {
- LDAPDebug0Args( LDAP_DEBUG_ANY, "index_range_read: NULL prefix\n" );
+ LDAPDebug0Args( LDAP_DEBUG_ANY, LOG_ERR, "index_range_read: NULL
prefix\n" );
return( NULL );
}
@@ -1276,7 +1276,7 @@ index_range_read_ext(
}
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, "index_range_read lookthrough_limit=%d\n",
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "index_range_read
lookthrough_limit=%d\n",
lookthrough_limit);
switch( coreop ) {
@@ -1490,13 +1490,13 @@ index_range_read_ext(
(idl->b_nids > (ID)lookthrough_limit)) {
idl_free(&idl);
idl = idl_allids( be );
- LDAPDebug0Args(LDAP_DEBUG_TRACE,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"index_range_read lookthrough_limit
exceeded\n");
*err = LDAP_ADMINLIMIT_EXCEEDED;
break;
}
if ((sizelimit > 0) && (idl->b_nids > (ID)sizelimit)) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"index_range_read sizelimit exceeded\n");
*err = LDAP_SIZELIMIT_EXCEEDED;
break;
@@ -1506,7 +1506,7 @@ index_range_read_ext(
if (timelimit != -1) {
curtime = current_time();
if (curtime >= stoptime) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"index_range_read timelimit exceeded\n");
*err = LDAP_TIMELIMIT_EXCEEDED;
break;
@@ -1520,7 +1520,7 @@ index_range_read_ext(
idl_free(&idl);
idl = NULL;
}
- LDAPDebug0Args(LDAP_DEBUG_TRACE,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"index_range_read - operation abandoned\n");
break; /* clean up happens outside the while() loop */
}
@@ -1549,7 +1549,7 @@ index_range_read_ext(
if (!tmp) {
if (slapi_is_loglevel_set(LDAP_DEBUG_TRACE)) {
char encbuf[BUFSIZ];
- LDAPDebug2Args(LDAP_DEBUG_TRACE,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"index_range_read_ext: cur_key=%s(%li bytes) was
deleted - skipping\n",
encoded(&cur_key, encbuf), (long)cur_key.dsize);
}
@@ -1572,7 +1572,7 @@ index_range_read_ext(
idl_free(&tmp);
}
if (ALLIDS(idl)) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"index_range_read hit an allids value\n");
break;
}
@@ -1597,22 +1597,22 @@ index_range_read_ext(
}
}
if (*err) {
- LDAPDebug1Arg(LDAP_DEBUG_FILTER,
+ LDAPDebug1Arg(LDAP_DEBUG_FILTER, LOG_DEBUG,
" dbc->c_get(...DB_NEXT) == %i\n", *err);
}
#ifdef LDAP_DEBUG
/* this is for debugging only */
if (idl != NULL) {
if (ALLIDS(idl)) {
- LDAPDebug0Args(LDAP_DEBUG_FILTER, " idl=ALLIDS\n");
+ LDAPDebug0Args(LDAP_DEBUG_FILTER, LOG_DEBUG, " idl=ALLIDS\n");
} else {
- LDAPDebug1Arg(LDAP_DEBUG_FILTER,
+ LDAPDebug1Arg(LDAP_DEBUG_FILTER, LOG_DEBUG,
" idl->b_nids=%d\n", idl->b_nids);
- LDAPDebug1Arg(LDAP_DEBUG_FILTER,
+ LDAPDebug1Arg(LDAP_DEBUG_FILTER, LOG_DEBUG,
" idl->b_nmax=%d\n", idl->b_nmax);
for (i = 0; i < idl->b_nids; i++) {
- LDAPDebug2Args(LDAP_DEBUG_FILTER,
+ LDAPDebug2Args(LDAP_DEBUG_FILTER, LOG_DEBUG,
" idl->b_ids[%d]=%d\n", i,
idl->b_ids[i]);
}
}
@@ -1825,7 +1825,7 @@ addordel_values_sv(
prefix = index_index2prefix( indextype );
if (prefix == NULL) {
- LDAPDebug0Args( LDAP_DEBUG_ANY, "addordel_values_sv: NULL prefix\n" );
+ LDAPDebug0Args( LDAP_DEBUG_ANY, LOG_ERR, "addordel_values_sv: NULL
prefix\n" );
return( -1 );
}
diff --git a/ldap/servers/slapd/back-ldbm/instance.c
b/ldap/servers/slapd/back-ldbm/instance.c
index 1f99c3e..fcce4ed 100644
--- a/ldap/servers/slapd/back-ldbm/instance.c
+++ b/ldap/servers/slapd/back-ldbm/instance.c
@@ -50,7 +50,7 @@ int ldbm_instance_create(backend *be, char *name)
*/
if (! cache_init(&(inst->inst_dncache), DEFAULT_DNCACHE_SIZE,
DEFAULT_DNCACHE_MAXCOUNT, CACHE_TYPE_DN)) {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_instance_create: dn cache_init failed\n");
rc = -1;
goto error;
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_add.c
b/ldap/servers/slapd/back-ldbm/ldbm_add.c
index ba15f5a..9eeefec 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_add.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_add.c
@@ -117,7 +117,7 @@ ldbm_back_add( Slapi_PBlock *pb )
if (inst && inst->inst_ref_count) {
slapi_counter_increment(inst->inst_ref_count);
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_add: instance \"%s\" does not exist.\n",
inst ? inst->inst_name : "null instance");
goto error_return;
@@ -205,7 +205,7 @@ ldbm_back_add( Slapi_PBlock *pb )
/* addingentry is in cache. Remove it once. */
retval = CACHE_REMOVE(&inst->inst_cache, addingentry);
if (retval) {
- LDAPDebug1Arg(LDAP_DEBUG_CACHE, "ldbm_add: cache_remove %s failed.\n",
+ LDAPDebug1Arg(LDAP_DEBUG_CACHE, LOG_DEBUG, "ldbm_add: cache_remove %s
failed.\n",
slapi_entry_get_dn_const(addingentry->ep_entry));
}
}
@@ -216,7 +216,7 @@ ldbm_back_add( Slapi_PBlock *pb )
tmpentry = NULL;
/* Adding the resetted addingentry to the cache. */
if (cache_add_tentative(&inst->inst_cache, addingentry, NULL) < 0) {
- LDAPDebug1Arg(LDAP_DEBUG_CACHE, "cache_add_tentative concurrency detected:
%s\n",
+ LDAPDebug1Arg(LDAP_DEBUG_CACHE, LOG_DEBUG, "cache_add_tentative concurrency
detected: %s\n",
slapi_entry_get_dn_const(addingentry->ep_entry));
ldap_result_code = LDAP_ALREADY_EXISTS;
goto error_return;
@@ -228,7 +228,7 @@ ldbm_back_add( Slapi_PBlock *pb )
}
/* We're re-trying */
- LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, "Add Retrying Transaction\n");
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "Add Retrying
Transaction\n");
#ifndef LDBM_NO_BACKOFF_DELAY
{
PRIntervalTime interval;
@@ -272,7 +272,7 @@ ldbm_back_add( Slapi_PBlock *pb )
slapi_pblock_get( pb, SLAPI_ADD_TARGET_SDN, &sdn );
if (NULL == sdn)
{
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_back_add: Null target dn\n");
goto error_return;
}
@@ -333,7 +333,7 @@ ldbm_back_add( Slapi_PBlock *pb )
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
}
if (!ldap_result_code) {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_back_add: SLAPI_PLUGIN_BE_PRE_ADD_FN returned error but did not
set SLAPI_RESULT_CODE\n");
ldap_result_code = LDAP_OPERATIONS_ERROR;
}
@@ -525,7 +525,7 @@ ldbm_back_add( Slapi_PBlock *pb )
* magic objectclass.
*/
if (NULL == sdn) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "ldbm_back_add: Null target dn\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_back_add: Null target
dn\n");
ldap_result_code = LDAP_OPERATIONS_ERROR;
goto error_return;
}
@@ -656,7 +656,7 @@ ldbm_back_add( Slapi_PBlock *pb )
Slapi_RDN srdn = {0};
rc = slapi_rdn_init_all_dn(&srdn, tombstoned_dn);
if (rc) {
- LDAPDebug1Arg( LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg( LDAP_DEBUG_TRACE, LOG_DEBUG,
"ldbm_back_add (tombstone_operation): failed to "
"decompose %s to Slapi_RDN\n", tombstoned_dn);
} else {
@@ -718,7 +718,7 @@ ldbm_back_add( Slapi_PBlock *pb )
Slapi_DN ancestorsdn;
struct backentry *ancestorentry;
- LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM, "ldbm_add: Parent \"%s\" does not
exist. "
+ LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "ldbm_add: Parent
\"%s\" does not exist. "
"It might be a conflict entry.\n",
slapi_sdn_get_dn(&parentsdn));
slapi_sdn_init(&ancestorsdn);
ancestorentry = dn2ancestor(be, &parentsdn, &ancestorsdn, &txn,
&err, 1);
@@ -734,7 +734,7 @@ ldbm_back_add( Slapi_PBlock *pb )
ACLPLUGIN_ACCESS_DEFAULT, &errbuf);
if ( ldap_result_code != LDAP_SUCCESS )
{
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, "no access to parent, pdn = %s\n",
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "no access to parent, pdn =
%s\n",
slapi_sdn_get_dn(&parentsdn));
ldap_result_message= errbuf;
goto error_return;
@@ -748,7 +748,7 @@ ldbm_back_add( Slapi_PBlock *pb )
char *adjusteddn = slapi_ch_smprintf("%s,%s",
slapi_entry_get_rdn_const(addingentry->ep_entry),
slapi_entry_get_dn_const(parententry->ep_entry));
- LDAPDebug2Args(LDAP_DEBUG_BACKLDBM, "ldbm_add: adjusting dn: %s -->
%s\n",
+ LDAPDebug2Args(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "ldbm_add: adjusting dn: %s
--> %s\n",
slapi_entry_get_dn(addingentry->ep_entry), adjusteddn);
slapi_sdn_set_normdn_passin(&adjustedsdn, adjusteddn);
slapi_entry_set_sdn(addingentry->ep_entry, &adjustedsdn);
@@ -760,7 +760,7 @@ ldbm_back_add( Slapi_PBlock *pb )
else
{ /* no parent */
if (!isroot && !is_replicated_operation) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "no parent & not root\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "no parent & not
root\n");
ldap_result_code= LDAP_INSUFFICIENT_ACCESS;
goto error_return;
}
@@ -789,7 +789,7 @@ ldbm_back_add( Slapi_PBlock *pb )
* operational attributes to ensure that the cache is sized correctly. */
if ( cache_add_tentative( &inst->inst_cache, addingentry, NULL ) < 0 )
{
- LDAPDebug1Arg(LDAP_DEBUG_CACHE, "cache_add_tentative concurrency detected:
%s\n",
+ LDAPDebug1Arg(LDAP_DEBUG_CACHE, LOG_DEBUG, "cache_add_tentative concurrency
detected: %s\n",
slapi_entry_get_dn_const(addingentry->ep_entry));
ldap_result_code= LDAP_ALREADY_EXISTS;
goto error_return;
@@ -801,7 +801,7 @@ ldbm_back_add( Slapi_PBlock *pb )
* the entry if the syntax is incorrect.
*/
if ( plugin_call_acl_verify_syntax (pb, addingentry->ep_entry, &errbuf) != 0 )
{
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, "ACL syntax error: %s\n",
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "ACL syntax error: %s\n",
slapi_entry_get_dn_const(addingentry->ep_entry));
ldap_result_code= LDAP_INVALID_SYNTAX;
ldap_result_message= errbuf;
@@ -815,12 +815,12 @@ ldbm_back_add( Slapi_PBlock *pb )
retval = parent_update_on_childchange(&parent_modify_c,
is_resurect_operation?PARENTUPDATE_RESURECT:PARENTUPDATE_ADD,
NULL);
- slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_back_add",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_add",
"conn=%lu op=%d parent_update_on_childchange: old_entry=0x%p,
new_entry=0x%p, rc=%d\n",
conn_id, op_id, parent_modify_c.old_entry, parent_modify_c.new_entry,
retval);
/* The modify context now contains info needed later */
if (retval) {
- LDAPDebug2Args(LDAP_DEBUG_BACKLDBM, "parent_update_on_childchange: %s,
rc=%d\n",
+ LDAPDebug2Args(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "parent_update_on_childchange:
%s, rc=%d\n",
slapi_entry_get_dn_const(addingentry->ep_entry), retval);
ldap_result_code= LDAP_OPERATIONS_ERROR;
goto error_return;
@@ -843,7 +843,7 @@ ldbm_back_add( Slapi_PBlock *pb )
not_an_error = 1;
rc = retval = LDAP_SUCCESS;
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, "SLAPI_PLUGIN_BE_TXN_PRE_ADD_FN plugin "
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "SLAPI_PLUGIN_BE_TXN_PRE_ADD_FN plugin
"
"returned error code %d\n", retval );
if (!ldap_result_code) {
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
@@ -857,7 +857,7 @@ ldbm_back_add( Slapi_PBlock *pb )
slapi_pblock_set(pb, SLAPI_PLUGIN_OPRETURN, ldap_result_code ? &ldap_result_code
: &retval);
}
slapi_pblock_get(pb, SLAPI_PB_RESULT_TEXT, &ldap_result_message);
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "SLAPI_PLUGIN_BE_TXN_PRE_ADD_FN plugin failed:
%d\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_DEBUG, "SLAPI_PLUGIN_BE_TXN_PRE_ADD_FN plugin
failed: %d\n",
ldap_result_code ? ldap_result_code : retval);
goto error_return;
}
@@ -992,7 +992,7 @@ ldbm_back_add( Slapi_PBlock *pb )
continue;
}
if (retval) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, "add: attempt to index %lu failed; rc=%d\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_DEBUG, "add: attempt to index %lu failed;
rc=%d\n",
(u_long)addingentry->ep_id, retval);
ADD_SET_ERROR(ldap_result_code, LDAP_OPERATIONS_ERROR, retry_count);
if (LDBM_OS_ERR_IS_DISKFULL(retval)) {
@@ -1004,7 +1004,7 @@ ldbm_back_add( Slapi_PBlock *pb )
if (parent_found) {
/* Push out the db modifications from the parent entry */
retval = modify_update_all(be,pb,&parent_modify_c,&txn);
- slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_back_add",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_add",
"conn=%lu op=%d modify_update_all: old_entry=0x%p,
new_entry=0x%p, rc=%d\n",
conn_id, op_id, parent_modify_c.old_entry, parent_modify_c.new_entry,
retval);
if (DB_LOCK_DEADLOCK == retval)
@@ -1037,7 +1037,7 @@ ldbm_back_add( Slapi_PBlock *pb )
continue;
}
if (retval) {
- LDAPDebug2Args(LDAP_DEBUG_TRACE,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"vlv_update_index failed, err=%d %s\n",
retval, (msg = dblayer_strerror( retval )) ? msg : "");
ADD_SET_ERROR(ldap_result_code, LDAP_OPERATIONS_ERROR, retry_count);
@@ -1105,7 +1105,7 @@ ldbm_back_add( Slapi_PBlock *pb )
if (retval) {
/* This happens if the dn of addingentry already exists */
ADD_SET_ERROR(ldap_result_code, LDAP_ALREADY_EXISTS, retry_count);
- LDAPDebug2Args(LDAP_DEBUG_CACHE, "ldap_add: cache_replace concurrency detected:
%s (rc: %d)\n",
+ LDAPDebug2Args(LDAP_DEBUG_CACHE, LOG_DEBUG, "ldap_add: cache_replace concurrency
detected: %s (rc: %d)\n",
slapi_entry_get_dn_const(addingentry->ep_entry), retval);
retval = -1;
goto error_return;
@@ -1129,7 +1129,7 @@ ldbm_back_add( Slapi_PBlock *pb )
{
/* switch the parent entry copy into play */
myrc = modify_switch_entries(&parent_modify_c,be);
- slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_back_add",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_add",
"conn=%lu op=%d modify_switch_entries: old_entry=0x%p,
new_entry=0x%p, rc=%d\n",
conn_id, op_id, parent_modify_c.old_entry, parent_modify_c.new_entry,
myrc);
if (0 == myrc) {
@@ -1140,7 +1140,7 @@ ldbm_back_add( Slapi_PBlock *pb )
if (ruv_c_init) {
if (modify_switch_entries(&ruv_c, be) != 0 ) {
ldap_result_code= LDAP_OPERATIONS_ERROR;
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_back_add: modify_switch_entries failed\n");
goto error_return;
}
@@ -1149,7 +1149,7 @@ ldbm_back_add( Slapi_PBlock *pb )
/* call the transaction post add plugins just before the commit */
if ((retval = plugin_call_plugins(pb, SLAPI_PLUGIN_BE_TXN_POST_ADD_FN))) {
int opreturn = 0;
- LDAPDebug1Arg( LDAP_DEBUG_TRACE, "SLAPI_PLUGIN_BE_TXN_POST_ADD_FN plugin "
+ LDAPDebug1Arg( LDAP_DEBUG_TRACE, LOG_DEBUG, "SLAPI_PLUGIN_BE_TXN_POST_ADD_FN
plugin "
"returned error code %d\n", retval );
if (!ldap_result_code) {
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
@@ -1203,7 +1203,7 @@ error_return:
* be written to disk.
*/
myrc = modify_unswitch_entries(&parent_modify_c, be);
- slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_back_add",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_add",
"conn=%lu op=%d modify_unswitch_entries: old_entry=0x%p,
new_entry=0x%p, rc=%d\n",
conn_id, op_id, parent_modify_c.old_entry, parent_modify_c.new_entry,
myrc);
}
@@ -1244,7 +1244,7 @@ diskfull_return:
/* call the transaction post add plugins just before the abort */
if ((retval = plugin_call_plugins(pb, SLAPI_PLUGIN_BE_TXN_POST_ADD_FN))) {
int opreturn = 0;
- LDAPDebug1Arg( LDAP_DEBUG_TRACE, "SLAPI_PLUGIN_BE_TXN_POST_ADD_FN plugin "
+ LDAPDebug1Arg( LDAP_DEBUG_TRACE, LOG_DEBUG, "SLAPI_PLUGIN_BE_TXN_POST_ADD_FN
plugin "
"returned error code %d\n", retval );
if (!ldap_result_code) {
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
@@ -1319,7 +1319,7 @@ common_return:
if (bdn) {
CACHE_ADD( &inst->inst_dncache, bdn, NULL );
CACHE_RETURN(&inst->inst_dncache, &bdn);
- slapi_log_error(SLAPI_LOG_CACHE, "ldbm_back_add",
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG, "ldbm_back_add",
"set %s to dn cache\n", dn);
}
}
@@ -1341,7 +1341,7 @@ common_return:
if (ruv_c_init) {
modify_term(&ruv_c, be);
}
- slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_back_add",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_add",
"conn=%lu op=%d modify_term: old_entry=0x%p,
new_entry=0x%p\n",
conn_id, op_id, parent_modify_c.old_entry, parent_modify_c.new_entry);
myrc = modify_term(&parent_modify_c,be);
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_attr.c
b/ldap/servers/slapd/back-ldbm/ldbm_attr.c
index 57898c6..2b192d2 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_attr.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_attr.c
@@ -707,7 +707,7 @@ attr_index_config(
}
a->ai_indexmask = INDEX_OFFLINE; /* note that the index isn't available */
} else {
- slapi_log_error(SLAPI_LOG_FATAL, "attr_index_config",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "attr_index_config",
"%s: line %d: unknown index type \"%s\" (ignored) in entry (%s),
"
"valid index types are \"pres\", \"eq\",
\"approx\", or \"sub\"\n",
fname, lineno, attrValue->bv_val, slapi_entry_get_dn(e));
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c
b/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c
index fa94d1d..0dec545 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c
@@ -256,7 +256,7 @@ attrcrypt_unwrap_key(attrcrypt_cipher_state *acs, SECKEYPrivateKey
*private_key,
CK_MECHANISM_TYPE wrap_mechanism = acs->ace->wrap_mechanism;
SECKEYPrivateKey *unwrapping_key = private_key;
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT, "-> attrcrypt_unwrap_key\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT, "->
attrcrypt_unwrap_key\n");
/*
* NOTE: we are unwrapping one symmetric key with attribute both ENCRYPT
* and DECRYPT set. Some hardware token might have a problem with
@@ -274,12 +274,12 @@ attrcrypt_unwrap_key(attrcrypt_cipher_state *acs, SECKEYPrivateKey
*private_key,
PR_FALSE);
if (NULL == *unwrapped_symmetric_key) {
ret = -1;
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"attrcrypt_unwrap_key: "
"failed to unwrap key for cipher %s\n",
acs->ace->cipher_display_name);
}
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT, "<- attrcrypt_unwrap_key\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT, "<-
attrcrypt_unwrap_key\n");
return ret;
}
@@ -289,15 +289,15 @@ attrcrypt_generate_key(attrcrypt_cipher_state *acs,PK11SymKey
**symmetric_key)
{
int ret = 1;
PK11SymKey *new_symmetric_key = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT, "->
attrcrypt_generate_key\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT, "->
attrcrypt_generate_key\n");
if (NULL == symmetric_key) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "NULL symmetric_key\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "NULL symmetric_key\n");
goto bail;
}
*symmetric_key = NULL;
if (!slapd_pk11_DoesMechanism(acs->slot, acs->ace->cipher_mechanism)) {
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT, "%s is not supported.\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT, "%s is not
supported.\n",
acs->ace->cipher_display_name);
ret = -1;
goto bail;
@@ -323,7 +323,7 @@ attrcrypt_generate_key(attrcrypt_cipher_state *acs,PK11SymKey
**symmetric_key)
ret = 0;
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
"<- attrcrypt_generate_key (%d)\n", ret);
return ret;
}
@@ -429,18 +429,18 @@ attrcrypt_cipher_init(ldbm_instance *li, attrcrypt_cipher_entry
*ace, SECKEYPriv
{
int ret = 0;
PK11SymKey *symmetric_key = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT, "-> attrcrypt_cipher_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT, "->
attrcrypt_cipher_init\n");
acs->cipher_lock = PR_NewLock();
/* Fill in some basic stuff */
acs->ace = ace;
acs->cipher_display_name = ace->cipher_display_name;
if (NULL == acs->cipher_lock) {
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"Failed to create cipher lock in attrcrypt_cipher_init\n");
}
acs->slot = slapd_pk11_GetInternalKeySlot();
if (NULL == acs->slot) {
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"Failed to create a slot for cipher %s in attrcrypt_cipher_entry\n",
acs->cipher_display_name);
goto error;
@@ -448,17 +448,17 @@ attrcrypt_cipher_init(ldbm_instance *li, attrcrypt_cipher_entry
*ace, SECKEYPriv
/* Try to get the symmetric key for this cipher */
ret = attrcrypt_keymgmt_get_key(li,acs,private_key,&symmetric_key);
if (KEYMGMT_ERR_NO_ENTRY == ret) {
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"No symmetric key found for cipher %s in backend %s, "
"attempting to create one...\n",
acs->cipher_display_name, li->inst_name);
ret = attrcrypt_generate_key(acs, &symmetric_key);
if (ret) {
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT, "Warning: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT, "Warning: "
"Failed to generate key for %s in attrcrypt_cipher_init\n",
acs->cipher_display_name);
if ((ret < 0) && li->attrcrypt_configured) {
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"Cipher %s is not supported on the security device. "
"Do not configure attrcrypt with the cipher.\n",
ace->cipher_display_name);
@@ -467,23 +467,23 @@ attrcrypt_cipher_init(ldbm_instance *li, attrcrypt_cipher_entry
*ace, SECKEYPriv
if (symmetric_key) {
ret = attrcrypt_keymgmt_store_key(li,acs,public_key,symmetric_key);
if (ret) {
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"Failed to store key for cipher %s in "
"attrcrypt_cipher_init\n", acs->cipher_display_name);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"Key for cipher %s successfully generated and stored\n",
acs->cipher_display_name);
}
}
} else if (KEYMGMT_ERR_CANT_UNWRAP == ret) {
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"attrcrypt_cipher_init: symmetric key failed to unwrap "
"with the private key; Cert might have been renewed since "
"the key is wrapped. To recover the encrypted contents, "
"keep the wrapped symmetric key value.\n");
} else if (ret) {
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"Failed to retrieve key for cipher %s in attrcrypt_cipher_init "
"(%d)\n", acs->cipher_display_name, ret);
}
@@ -492,7 +492,7 @@ attrcrypt_cipher_init(ldbm_instance *li, attrcrypt_cipher_entry *ace,
SECKEYPriv
acs->key = symmetric_key;
}
error:
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT, "<- attrcrypt_cipher_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT, "<-
attrcrypt_cipher_init\n");
return ret;
}
@@ -542,14 +542,14 @@ attrcrypt_init(ldbm_instance *li)
} else {
/* Since we succeeded, add the acs to the backend instance list */
attrcrypt_acs_list_add(li,acs);
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
"Initialized cipher %s in attrcrypt_init\n",
ace->cipher_display_name);
cipher_is_available = 1; /* at least one is available */
}
}
if (!cipher_is_available) {
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"All prepared ciphers are not available. "
"Please disable attribute encryption.\n");
}
@@ -1008,13 +1008,13 @@ attrcrypt_decrypt_index_key(backend *be,
Slapi_Value *value = NULL;
rc = -1;
if (NULL == in || NULL == out) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"attrcrypt_decrypt_index_key: Empty %s\n",
NULL==in?"in":NULL==out?"out":"unknown");
return rc;
}
value = slapi_value_new_berval(in);
- LDAPDebug0Args(LDAP_DEBUG_TRACE,"-> attrcrypt_decrypt_index_key\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "->
attrcrypt_decrypt_index_key\n");
/* Decrypt the input values in place on the original entry */
rc = attrcrypt_crypto_op_value_replace(ai->ai_attrcrypt, be, ai,
value, 0 /* decrypt */);
@@ -1031,7 +1031,7 @@ attrcrypt_decrypt_index_key(backend *be,
}
}
bail:
- LDAPDebug0Args(LDAP_DEBUG_TRACE,"<- attrcrypt_decrypt_index_key\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-
attrcrypt_decrypt_index_key\n");
slapi_value_free(&value);
}
@@ -1053,7 +1053,7 @@ back_crypt_init(Slapi_Backend *be, const char *dn,
SECKEYPublicKey *public_key = NULL;
attrcrypt_state_private **state_priv = (attrcrypt_state_private **)handle;
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT, "-> back_crypt_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT, "->
back_crypt_init\n");
/* Encryption is not specified */
if (!encAlgorithm || !handle) {
goto bail;
@@ -1084,7 +1084,7 @@ back_crypt_init(Slapi_Backend *be, const char *dn,
ret = _back_crypt_cipher_init(be, state_priv, ace,
private_key, public_key, acs, dn);
if (ret) {
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"back_crypt_init: Failed to initialize cipher %s."
"Please choose other cipher or disable changelog "
"encryption.\n",
@@ -1093,7 +1093,7 @@ back_crypt_init(Slapi_Backend *be, const char *dn,
} else {
/* Since we succeeded, set acs to state_priv */
_back_crypt_acs_list_add(state_priv, acs);
- slapi_log_error(SLAPI_LOG_BACKLDBM, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ATTRCRYPT,
"back_crypt_init: Initialized cipher %s\n",
ace->cipher_display_name);
}
@@ -1104,7 +1104,7 @@ back_crypt_init(Slapi_Backend *be, const char *dn,
SECKEY_DestroyPrivateKey(private_key);
private_key = NULL;
bail:
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
"<- back_crypt_init : %d\n", ret);
return ret;
}
@@ -1124,7 +1124,7 @@ back_crypt_encrypt_value(void *handle, struct berval *in, struct
berval **out)
Slapi_Value *outvalue = NULL;
attrcrypt_state_private *state_priv = (attrcrypt_state_private *)handle;
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
"-> back_crypt_encrypt_value\n");
if (NULL == out) {
goto bail;
@@ -1142,7 +1142,7 @@ back_crypt_encrypt_value(void *handle, struct berval *in, struct
berval **out)
bail:
slapi_value_free(&invalue);
slapi_value_free(&outvalue);
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
"<- back_crypt_encrypt_entry (returning %d)\n", ret);
return ret;
}
@@ -1155,7 +1155,7 @@ back_crypt_decrypt_value(void *handle, struct berval *in, struct
berval **out)
Slapi_Value *outvalue = NULL;
attrcrypt_state_private *state_priv = (attrcrypt_state_private *)handle;
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
"-> back_crypt_decrypt_value\n");
if (NULL == out) {
goto bail;
@@ -1173,7 +1173,7 @@ back_crypt_decrypt_value(void *handle, struct berval *in, struct
berval **out)
bail:
slapi_value_free(&invalue);
slapi_value_free(&outvalue);
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
"<- _back_crypt_decrypt_entry (returning %d)\n", ret);
return ret;
}
@@ -1191,7 +1191,7 @@ _back_crypt_crypto_op_value(attrcrypt_state_private *state_priv,
struct berval *bval = NULL;
attrcrypt_cipher_state *acs = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
"-> _back_crypt_crypto_op_value\n");
if (NULL == invalue || NULL == outvalue) {
goto bail;
@@ -1222,7 +1222,7 @@ _back_crypt_crypto_op_value(attrcrypt_state_private *state_priv,
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
"<- _back_crypt_crypto_op_value (returning %d)\n",
ret);
return ret;
}
@@ -1241,18 +1241,18 @@ _back_crypt_cipher_init(Slapi_Backend *be,
int ret = 1; /* fail by default */
PK11SymKey *symmetric_key = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT, "->
_back_crypt_cipher_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT, "->
_back_crypt_cipher_init\n");
acs->cipher_lock = PR_NewLock();
/* Fill in some basic stuff */
acs->ace = ace;
acs->cipher_display_name = ace->cipher_display_name;
if (NULL == acs->cipher_lock) {
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"_back_crypt_cipher_init: Cipher lock not found.\n");
}
acs->slot = slapd_pk11_getInternalKeySlot();
if (NULL == acs->slot) {
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"_back_crypt_cipher_init: Failed to create a slot for cipher
%s\n",
acs->cipher_display_name);
goto error;
@@ -1261,28 +1261,28 @@ _back_crypt_cipher_init(Slapi_Backend *be,
ret = _back_crypt_keymgmt_get_key(acs, private_key,
&symmetric_key, dn_string);
if (KEYMGMT_ERR_NO_ENTRY == ret) {
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"_back_crypt_cipher_init: entry storing key does not
exist.\n");
} else if (KEYMGMT_ERR_OTHER == ret) {
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"_back_crypt_cipher_init: coding error.\n");
} else if (KEYMGMT_ERR_CANT_UNWRAP == ret) {
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"_back_crypt_cipher_init: symmetric key failed to unwrap "
"with the private key; Cert might have been renewed since "
"the key is wrapped. To recover the encrypted contents, "
"keep the wrapped symmetric key value.\n");
} else if (ret) {
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"_back_crypt_cipher_init: No symmetric key found for cipher "
"%s, attempting to create one...\n",
acs->cipher_display_name);
ret = attrcrypt_generate_key(acs, &symmetric_key);
if (ret) {
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"_back_crypt_cipher_init: Failed to generate key for
%s\n",
acs->cipher_display_name);
if (ret < 0) {
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"Cipher %s is not supported on the security device. "
"Do not configure changelog encryption with the
cipher.\n",
ace->cipher_display_name);
@@ -1292,11 +1292,11 @@ _back_crypt_cipher_init(Slapi_Backend *be,
ret = _back_crypt_keymgmt_store_key(be, acs, public_key,
symmetric_key, dn_string);
if (ret) {
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"_back_crypt_cipher_init: Failed to store key for cipher "
"%s\n", acs->cipher_display_name);
} else {
- slapi_log_error(SLAPI_LOG_BACKLDBM, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ATTRCRYPT,
"Key for cipher %s successfully generated and stored\n",
acs->cipher_display_name);
}
@@ -1307,7 +1307,7 @@ _back_crypt_cipher_init(Slapi_Backend *be,
acs->key = symmetric_key;
}
error:
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
"<- _back_crypt_cipher_init (returning %d\n", ret);
return ret;
}
@@ -1320,7 +1320,7 @@ _back_crypt_cleanup_private(attrcrypt_state_private **state_priv)
{
attrcrypt_cipher_state **current = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
"-> _back_crypt_cleanup_private\n");
if (state_priv && *state_priv) {
for (current = &((*state_priv)->acs_array[0]); *current; current++) {
@@ -1329,7 +1329,7 @@ _back_crypt_cleanup_private(attrcrypt_state_private **state_priv)
}
slapi_ch_free((void **)state_priv);
}
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
"<- _back_crypt_cleanup_private\n");
return 0;
}
@@ -1356,7 +1356,7 @@ _back_crypt_keymgmt_get_key(attrcrypt_cipher_state *acs,
if (NULL == key_from_store) {
return ret;
}
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
"-> _back_crypt_keymgmt_get_key\n");
*key_from_store = NULL;
/* Fetch the entry */
@@ -1391,7 +1391,7 @@ _back_crypt_keymgmt_get_key(attrcrypt_cipher_state *acs,
}
bail:
freeConfigEntry(&entry);
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
"<- _back_crypt_keymgmt_get_key (returning %d)\n",
ret);
return ret;
}
@@ -1408,7 +1408,7 @@ _back_crypt_keymgmt_store_key(Slapi_Backend *be,
SECItem wrapped_symmetric_key = {0};
ldbm_instance *li = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
"-> _back_crypt_keymgmt_store_key\n");
if (!be || !be->be_instance_info) {
goto bail;
@@ -1447,7 +1447,7 @@ _back_crypt_keymgmt_store_key(Slapi_Backend *be,
if (rc) {
char *resulttext = NULL;
slapi_pblock_get(pb, SLAPI_PB_RESULT_TEXT, &resulttext);
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"_back_crypt_keymgmt_store_key: failed to add config key
"
"to the DSE: %d: %s: %s\n", rc, ldap_err2string(rc),
resulttext ? resulttext : "unknown");
@@ -1457,7 +1457,7 @@ _back_crypt_keymgmt_store_key(Slapi_Backend *be,
slapi_pblock_destroy(pb);
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
"<- _back_crypt_keymgmt_store_key (returning %d)\n",
ret);
return ret;
}
@@ -1473,7 +1473,7 @@ _back_crypt_acs_list_add(attrcrypt_state_private **state_priv,
if (NULL == state_priv) {
return;
}
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
"-> _back_crypt_acs_list_add\n");
/* Is the list already there ? */
@@ -1494,7 +1494,7 @@ _back_crypt_acs_list_add(attrcrypt_state_private **state_priv,
(*state_priv)->acs_array[list_size + 1] = NULL;
}
(*state_priv)->acs_array[list_size] = acs;
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
"<- _back_crypt_acs_list_add\n");
return;
}
@@ -1517,16 +1517,16 @@ _back_crypt_crypto_op(attrcrypt_private *priv,
unsigned int output_buffer_size2 = 0;
unsigned char *output_buffer = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT, "->
_back_crypt_crypto_op\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT, "->
_back_crypt_crypto_op\n");
if (NULL == acs) {
goto bail;
}
if (encrypt) {
- slapi_log_error(SLAPI_LOG_BACKLDBM, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ATTRCRYPT,
"_back_crypt_crypto_op encrypt '%s' (%lu)\n",
in_data, (long unsigned int)in_size);
} else {
- slapi_log_error(SLAPI_LOG_BACKLDBM, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ATTRCRYPT,
"_back_crypt_crypto_op decrypt (%lu)\n", (long unsigned
int)in_size);
}
/* Allocate the output buffer */
@@ -1540,7 +1540,7 @@ _back_crypt_crypto_op(attrcrypt_private *priv,
&iv_item);
if (NULL == security_parameter) {
int errorCode = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"back_crypt_crypto_op: failed to make IV for cipher %s
"
": %d - %s\n", acs->ace->cipher_display_name,
errorCode,
slapd_pr_strerror(errorCode));
@@ -1551,7 +1551,7 @@ _back_crypt_crypto_op(attrcrypt_private *priv,
acs->key, security_parameter);
if (NULL == sec_context) {
int errorCode = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"_back_crypt_crypto_op: failed on cipher %s : "
"%d - %s\n", acs->ace->cipher_display_name,
errorCode,
slapd_pr_strerror(errorCode));
@@ -1562,7 +1562,7 @@ _back_crypt_crypto_op(attrcrypt_private *priv,
(unsigned char *)in_data, in_size);
if (SECSuccess != secret) {
int errorCode = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"_back_crypt_crypto_op failed on cipher %s : %d - %s\n",
acs->ace->cipher_display_name, errorCode,
slapd_pr_strerror(errorCode));
@@ -1574,7 +1574,7 @@ _back_crypt_crypto_op(attrcrypt_private *priv,
output_buffer_length - output_buffer_size1);
if (SECSuccess != secret) {
int errorCode = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"_back_crypt_crypto_op digest final failed on cipher "
"%s : %d - %s\n", acs->ace->cipher_display_name,
errorCode, slapd_pr_strerror(errorCode));
@@ -1586,7 +1586,7 @@ _back_crypt_crypto_op(attrcrypt_private *priv,
log_bytes("slapd_pk11_DigestFinal '%s' (%d)\n",
output_buffer, output_buffer_size1 + output_buffer_size2);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, "DEBUG_ATTRCRYPT",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "DEBUG_ATTRCRYPT",
"slapd_pk11_DigestFinal '%s', %u\n",
output_buffer, output_buffer_size1 + output_buffer_size2);
}
@@ -1603,14 +1603,14 @@ _back_crypt_crypto_op(attrcrypt_private *priv,
size_t redo_size = -1;
int redo_ret;
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"------> check result of crypto op\n");
if (priv && be && ai) {
redo_ret = attrcrypt_crypto_op(priv, be, ai,
*out_data, *out_size,
&redo_data, &redo_size,
!encrypt);
- slapi_log_error(SLAPI_LOG_FATAL, "DEBUG_ATTRCRYPT",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "DEBUG_ATTRCRYPT",
"attrcrypt_crypto_op returned (%d) "
"orig length %u redone length %u\n",
redo_ret, in_size, redo_size);
@@ -1619,7 +1619,7 @@ _back_crypt_crypto_op(attrcrypt_private *priv,
*out_data, *out_size,
&redo_data, &redo_size,
!encrypt, NULL, NULL);
- slapi_log_error(SLAPI_LOG_FATAL, "DEBUG_ATTRCRYPT",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "DEBUG_ATTRCRYPT",
"_back_crypt_crypto_op returned (%d) "
"orig length %u redone length %u\n",
redo_ret, in_size, redo_size);
@@ -1629,7 +1629,7 @@ _back_crypt_crypto_op(attrcrypt_private *priv,
log_bytes("DEBUG_ATTRCRYPT redo bytes '%s' (%d)\n",
(unsigned char *)redo_data, redo_size);
- slapi_log_error(SLAPI_LOG_FATAL, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
"<------ check result of crypto op\n");
}
#endif
@@ -1645,7 +1645,7 @@ error:
slapi_ch_free_string((char **)&output_buffer);
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
"<- _back_crypt_crypto_op (returning %d)\n", rc);
return rc;
}
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_bind.c
b/ldap/servers/slapd/back-ldbm/ldbm_bind.c
index 99a0818..8fa2092 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_bind.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_bind.c
@@ -48,7 +48,7 @@ ldbm_back_bind( Slapi_PBlock *pb )
if (inst->inst_ref_count) {
slapi_counter_increment(inst->inst_ref_count);
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_bind: instance %s does not exist.\n",
inst->inst_name);
return( SLAPI_BIND_FAIL );
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_compare.c
b/ldap/servers/slapd/back-ldbm/ldbm_compare.c
index e9973a9..0e7be35 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_compare.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_compare.c
@@ -48,7 +48,7 @@ ldbm_back_compare( Slapi_PBlock *pb )
if (inst && inst->inst_ref_count) {
slapi_counter_increment(inst->inst_ref_count);
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_compare: instance \"%s\" does not exist.\n",
inst ? inst->inst_name : "null instance");
return -1;
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_config.c
b/ldap/servers/slapd/back-ldbm/ldbm_config.c
index 181c2f5..351dcce 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_config.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_config.c
@@ -73,9 +73,9 @@ int ldbm_config_add_dse_entries(struct ldbminfo *li, char **entries,
char *strin
rc = slapi_add_internal_pb(util_pb);
slapi_pblock_get(util_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
if (!rc && (result == LDAP_SUCCESS)) {
- LDAPDebug1Arg(LDAP_DEBUG_CONFIG, "Added database config entry
[%s]\n", ebuf);
+ LDAPDebug1Arg(LDAP_DEBUG_CONFIG, LOG_DEBUG, "Added database config entry
[%s]\n", ebuf);
} else if (result == LDAP_ALREADY_EXISTS) {
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, "Database config entry [%s] already
exists - skipping\n", ebuf);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "Database config entry [%s]
already exists - skipping\n", ebuf);
} else {
LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Unable to add config entry [%s] to
the DSE: %d %d\n",
ebuf, result, rc);
@@ -426,7 +426,7 @@ static int ldbm_config_dbcachesize_set(void *arg, void *value, char
*errorbuf, i
delta = val - li->li_dbcachesize;
if (!util_is_cachesize_sane(&delta)){
slapi_create_errormsg(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "Error:
nsslapd-dbcachesize value is too large.");
- LDAPDebug0Args(LDAP_DEBUG_ANY,"Error: nsslapd-dbcachesize value is
too large.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "Error: nsslapd-dbcachesize
value is too large.\n");
return LDAP_UNWILLING_TO_PERFORM;
}
}
@@ -827,7 +827,7 @@ static int ldbm_config_db_trickle_percentage_set(void *arg, void
*value, char *e
if (val < 0 || val > 100) {
slapi_create_errormsg(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: Invalid
value for %s (%d). Must be between 0 and 100\n",
CONFIG_DB_TRICKLE_PERCENTAGE, val);
- LDAPDebug2Args(LDAP_DEBUG_ANY, "Error: Invalid value for %s (%d). Must be
between 0 and 100\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "Error: Invalid value for %s (%d).
Must be between 0 and 100\n",
CONFIG_DB_TRICKLE_PERCENTAGE, val);
return LDAP_UNWILLING_TO_PERFORM;
}
@@ -1060,7 +1060,7 @@ static int ldbm_config_db_cache_set(void *arg, void *value, char
*errorbuf, int
delta = val - li->li_dblayer_private->dblayer_cache_config;
if (!util_is_cachesize_sane(&delta)){
slapi_create_errormsg(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "Error:
db cachesize value is too large");
- LDAPDebug0Args(LDAP_DEBUG_ANY,"Error: db cachesize value is too
large.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,"Error: db cachesize value is
too large.\n");
return LDAP_UNWILLING_TO_PERFORM;
}
}
@@ -1191,7 +1191,7 @@ static int ldbm_config_import_cachesize_set(void *arg, void *value,
char *errorb
delta = val - li->li_import_cachesize;
if (!util_is_cachesize_sane(&delta)){
slapi_create_errormsg(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "Error:
import cachesize value is too large.");
- LDAPDebug0Args(LDAP_DEBUG_ANY,"Error: import cachesize value is too
large.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,"Error: import cachesize
value is too large.\n");
return LDAP_UNWILLING_TO_PERFORM;
}
}
@@ -1463,7 +1463,7 @@ static int ldbm_config_db_deadlock_policy_set(void *arg, void
*value, char *erro
slapi_create_errormsg(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE,
"Warning: Setting value for %s to (%d) will disable deadlock
detection",
CONFIG_DB_DEADLOCK_POLICY, val);
- LDAPDebug2Args(LDAP_DEBUG_ANY, "Warning: Setting value for %s to (%d) will
disable deadlock detection",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "Warning: Setting value for %s to (%d)
will disable deadlock detection",
CONFIG_DB_DEADLOCK_POLICY, val);
}
@@ -1564,7 +1564,7 @@ ldbm_config_read_instance_entries(struct ldbminfo *li, const char
*backend_type)
/* Construct the base dn of the subtree that holds the instance entries. */
basedn = slapi_create_dn_string("cn=%s,cn=plugins,cn=config",
backend_type);
if (NULL == basedn) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_config_read_instance_entries: "
"failed to create backend dn for %s\n", backend_type);
return 1;
@@ -1581,7 +1581,7 @@ ldbm_config_read_instance_entries(struct ldbminfo *li, const char
*backend_type)
rc = ldbm_instance_add_instance_entry_callback(NULL,
entries[i], NULL, NULL, NULL, li);
if (SLAPI_DSE_CALLBACK_ERROR == rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_config_read_instance_entries: "
"failed to add instance entry %s\n",
slapi_entry_get_dn_const(entries[i]));
@@ -1617,7 +1617,7 @@ int ldbm_config_load_dse_info(struct ldbminfo *li)
dn = slapi_create_dn_string("cn=config,cn=%s,cn=plugins,cn=config",
li->li_plugin->plg_name);
if (NULL == dn) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_config_load_dse_info: "
"failed create config dn for %s\n",
li->li_plugin->plg_name);
@@ -1676,7 +1676,7 @@ int ldbm_config_load_dse_info(struct ldbminfo *li)
* ldbm_instance for each */
rval = ldbm_config_read_instance_entries(li, li->li_plugin->plg_name);
if (rval) {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_config_load_dse_info: "
"failed to read instance entries\n");
goto bail;
@@ -1698,7 +1698,7 @@ int ldbm_config_load_dse_info(struct ldbminfo *li)
dn = slapi_create_dn_string("cn=monitor,cn=%s,cn=plugins,cn=config",
li->li_plugin->plg_name);
if (NULL == dn) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_config_load_dse_info: "
"failed to create monitor dn for %s\n",
li->li_plugin->plg_name);
@@ -1714,7 +1714,7 @@ int ldbm_config_load_dse_info(struct ldbminfo *li)
dn =
slapi_create_dn_string("cn=database,cn=monitor,cn=%s,cn=plugins,cn=config",
li->li_plugin->plg_name);
if (NULL == dn) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_config_load_dse_info: "
"failed create monitor database dn for %s\n",
li->li_plugin->plg_name);
@@ -1731,7 +1731,7 @@ int ldbm_config_load_dse_info(struct ldbminfo *li)
dn = slapi_create_dn_string("cn=%s,cn=plugins,cn=config",
li->li_plugin->plg_name);
if (NULL == dn) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_config_load_dse_info: "
"failed create plugin dn for %s\n",
li->li_plugin->plg_name);
@@ -1890,7 +1890,7 @@ int ldbm_config_set(void *arg, char *attr_name, config_info
*config_array, struc
/* Some config attrs can't be changed while the server is running. */
if (phase == CONFIG_PHASE_RUNNING &&
!(config->config_flags & CONFIG_FLAG_ALLOW_RUNNING_CHANGE)) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "%s can't be modified while the server is
running.\n", attr_name);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "%s can't be modified while the
server is running.\n", attr_name);
slapi_create_errormsg(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "%s can't be
modified while the server is running.\n", attr_name);
return LDAP_UNWILLING_TO_PERFORM;
}
@@ -1938,7 +1938,7 @@ int ldbm_config_set(void *arg, char *attr_name, config_info
*config_array, struc
/* check for parsing error (e.g. not a number) */
if (err) {
slapi_create_errormsg(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: value
%s for attr %s is not a number\n", str_val, attr_name);
- LDAPDebug2Args(LDAP_DEBUG_ANY, "Error: value %s for attr %s is not a
number\n", str_val, attr_name);
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "Error: value %s for attr %s is
not a number\n", str_val, attr_name);
return LDAP_UNWILLING_TO_PERFORM;
/* check for overflow */
} else if (LL_CMP(llval, >, llmaxint)) {
@@ -1979,7 +1979,7 @@ int ldbm_config_set(void *arg, char *attr_name, config_info
*config_array, struc
if (err) {
slapi_create_errormsg(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: value
%s for attr %s is not a number\n",
str_val, attr_name);
- LDAPDebug2Args(LDAP_DEBUG_ANY, "Error: value %s for attr %s is not a
number\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "Error: value %s for attr %s is
not a number\n",
str_val, attr_name);
return LDAP_UNWILLING_TO_PERFORM;
/* check for overflow */
@@ -2015,14 +2015,14 @@ int ldbm_config_set(void *arg, char *attr_name, config_info
*config_array, struc
if (err == EINVAL) {
slapi_create_errormsg(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: value
%s for attr %s is not a number\n",
str_val, attr_name);
- LDAPDebug2Args(LDAP_DEBUG_ANY, "Error: value %s for attr %s is not a
number\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "Error: value %s for attr %s is
not a number\n",
str_val, attr_name);
return LDAP_UNWILLING_TO_PERFORM;
/* check for overflow */
} else if (err == ERANGE) {
slapi_create_errormsg(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: value
%s for attr %s is outside the range of representable values\n",
str_val, attr_name);
- LDAPDebug2Args(LDAP_DEBUG_ANY, "Error: value %s for attr %s is outside
the range of representable values\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "Error: value %s for attr %s is
outside the range of representable values\n",
str_val, attr_name);
return LDAP_UNWILLING_TO_PERFORM;
}
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_delete.c
b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
index 4350ae6..ef81317 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_delete.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
@@ -107,14 +107,14 @@ ldbm_back_delete( Slapi_PBlock *pb )
if (pb->pb_conn)
{
- slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_delete", "enter
conn=%" NSPRIu64 " op=%d\n",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "ldbm_back_delete", "enter
conn=%" NSPRIu64 " op=%d\n",
pb->pb_conn->c_connid, operation->o_opid);
}
if ((NULL == addr) || (NULL == sdnp))
{
/* retval is -1 */
- slapi_log_error(SLAPI_LOG_FATAL, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldbm_back_delete",
"Either of DELETE_TARGET_SDN or TARGET_ADDRESS is NULL.\n");
goto error_return;
}
@@ -136,7 +136,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
if (inst && inst->inst_ref_count) {
slapi_counter_increment(inst->inst_ref_count);
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_delete: instance \"%s\" does not exist.\n",
inst ? inst->inst_name : "null instance");
goto error_return;
@@ -211,7 +211,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
}
CACHE_RETURN(&inst->inst_cache, &tombstone);
if (tombstone) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldbm_back_delete",
"conn=%lu op=%d [retry: %d] tombstone %s is not freed!!!
refcnt %d, state %d\n",
conn_id, op_id, retry_count,
slapi_entry_get_dn(tombstone->ep_entry),
tombstone->ep_refcnt, tombstone->ep_state);
@@ -220,7 +220,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
original_tombstone = tmptombstone;
tmptombstone = NULL;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldbm_back_delete",
"conn=%lu op=%d [retry: %d] No original_tombstone for
%s!!\n",
conn_id, op_id, retry_count, slapi_entry_get_dn(e->ep_entry));
}
@@ -232,7 +232,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
}
/* We're re-trying */
- LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, "Delete Retrying Transaction\n");
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "Delete Retrying
Transaction\n");
#ifndef LDBM_NO_BACKOFF_DELAY
{
PRIntervalTime interval;
@@ -271,14 +271,14 @@ ldbm_back_delete( Slapi_PBlock *pb )
{
ldap_result_code= LDAP_NO_SUCH_OBJECT;
retval = -1;
- LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, "ldbm_back_delete: Deleting entry is already
deleted.\n");
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "ldbm_back_delete: Deleting entry
is already deleted.\n");
goto error_return; /* error result sent by find_entry2modify() */
}
ep_id = e->ep_id;
retval = slapi_entry_has_children(e->ep_entry);
if (retval) {
ldap_result_code= LDAP_NOT_ALLOWED_ON_NONLEAF;
- slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_delete",
"conn=%lu op=%d Deleting entry %s has %d children.\n",
conn_id, op_id, slapi_entry_get_dn(e->ep_entry), retval);
retval = -1;
@@ -350,7 +350,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
if (!delete_tombstone_entry) {
retval = plugin_call_plugins(pb, SLAPI_PLUGIN_BE_TXN_PRE_DELETE_FN);
if (retval) {
- LDAPDebug1Arg( LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg( LDAP_DEBUG_TRACE, LOG_DEBUG,
"SLAPI_PLUGIN_BE_TXN_PRE_DELETE_FN plugin "
"returned error code %d\n", retval );
if (!ldap_result_code) {
@@ -376,13 +376,13 @@ ldbm_back_delete( Slapi_PBlock *pb )
is_tombstone_entry = slapi_entry_flag_is_set(e->ep_entry,
SLAPI_ENTRY_FLAG_TOMBSTONE);
if (delete_tombstone_entry) {
if (!is_tombstone_entry) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldbm_back_delete",
"Attempt to delete a non-tombstone entry %s\n", dn);
delete_tombstone_entry = 0;
}
} else {
if (is_tombstone_entry) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldbm_back_delete",
"Attempt to Tombstone again a tombstone entry %s\n", dn);
delete_tombstone_entry = 1;
}
@@ -422,7 +422,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
}
}
if (create_tombstone_entry && is_tombstone_entry) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldbm_back_delete",
"Attempt to convert a tombstone entry %s to tombstone\n", dn);
retval = -1;
ldap_result_code = LDAP_UNWILLING_TO_PERFORM;
@@ -430,7 +430,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
}
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_REPL, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "ldbm_back_delete",
"entry: %s - flags: delete %d is_tombstone_entry %d create %d \n",
dn, delete_tombstone_entry, is_tombstone_entry, create_tombstone_entry);
#endif
@@ -530,7 +530,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
retval = parent_update_on_childchange(&parent_modify_c, op, &haschildren);
/* The modify context now contains info needed later */
if (0 != retval) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldbm_back_delete",
"conn=%lu op=%d parent_update_on_childchange: old_entry=0x%p,
new_entry=0x%p, rc=%d\n",
conn_id, op_id, parent_modify_c.old_entry,
parent_modify_c.new_entry, retval);
ldap_result_code= LDAP_OPERATIONS_ERROR;
@@ -570,7 +570,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
if (slapi_entry_attr_hasvalue(e->ep_entry, SLAPI_ATTR_OBJECTCLASS,
SLAPI_ATTR_VALUE_TOMBSTONE) &&
slapi_is_special_rdn(edn, RDN_IS_TOMBSTONE)) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldbm_back_delete",
"conn=%lu op=%d Turning a tombstone into a tombstone!
\"%s\"; e: 0x%p, cache_state: 0x%x, refcnt: %d\n",
conn_id, op_id, edn, e, e->ep_state, e->ep_refcnt);
ldap_result_code= LDAP_OPERATIONS_ERROR;
@@ -578,7 +578,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
goto error_return;
}
if (!childuniqueid) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldbm_back_delete",
"conn=%lu op=%d No nsUniqueId in the entry \"%s\"; e:
0x%p, cache_state: 0x%x, refcnt: %d\n",
conn_id, op_id, edn, e, e->ep_state, e->ep_refcnt);
ldap_result_code= LDAP_OPERATIONS_ERROR;
@@ -656,7 +656,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
not_an_error = 1;
rc = LDAP_SUCCESS;
}
- LDAPDebug1Arg( LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg( LDAP_DEBUG_TRACE, LOG_DEBUG,
"SLAPI_PLUGIN_BE_TXN_PRE_DELETE_FN plugin "
"returned error code %d\n", retval );
if (!ldap_result_code) {
@@ -719,7 +719,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
*/
retval = cache_add_tentative(&inst->inst_cache, tombstone, NULL);
if (0 > retval) {
- slapi_log_error(SLAPI_LOG_CACHE, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG, "ldbm_back_delete",
"conn=%lu op=%d tombstone entry %s failed to add to the cache:
%d\n",
conn_id, op_id, slapi_entry_get_dn(tombstone->ep_entry), retval);
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
@@ -747,7 +747,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
retval = id2entry_delete( be, e, &txn );
if (DB_LOCK_DEADLOCK == retval)
{
- LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, "delete 2 DEADLOCK\n");
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "delete 2 DEADLOCK\n");
/* Retry txn */
continue;
}
@@ -769,7 +769,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
retval = index_addordel_entry( be, e, addordel_flags, &txn );
if (DB_LOCK_DEADLOCK == retval)
{
- LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, "delete 1 DEADLOCK\n");
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "delete 1 DEADLOCK\n");
/* Retry txn */
continue;
}
@@ -915,7 +915,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
svals, NULL, e->ep_id,
BE_INDEX_ADD, &txn);
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug0Args( LDAP_DEBUG_BACKLDBM,
+ LDAPDebug0Args( LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"delete (updating " LDBM_PARENTID_STR ")
DB_LOCK_DEADLOCK\n");
/* Retry txn */
continue;
@@ -934,13 +934,13 @@ ldbm_back_delete( Slapi_PBlock *pb )
#if 0 /* The entryrdn element is already deleted in the index_addordel_entry */
retval = entryrdn_index_entry(be, e, BE_INDEX_DEL, &txn);
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug0Args( LDAP_DEBUG_BACKLDBM,
+ LDAPDebug0Args( LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"delete (deleting entryrdn) DB_LOCK_DEADLOCK\n");
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug2Args( LDAP_DEBUG_ANY,
+ LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR,
"delete (deleting entryrdn) failed, err=%d %s\n",
retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
@@ -952,7 +952,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
#endif
retval = entryrdn_index_entry(be, tombstone, BE_INDEX_ADD, &txn);
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug0Args( LDAP_DEBUG_BACKLDBM,
+ LDAPDebug0Args( LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"adding (adding tombstone entryrdn) DB_LOCK_DEADLOCK\n");
/* Retry txn */
continue;
@@ -1099,13 +1099,13 @@ ldbm_back_delete( Slapi_PBlock *pb )
{
retval = entryrdn_index_entry(be, e, BE_INDEX_DEL, &txn);
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug0Args( LDAP_DEBUG_BACKLDBM,
+ LDAPDebug0Args( LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"delete (deleting entryrdn) DB_LOCK_DEADLOCK\n");
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug2Args( LDAP_DEBUG_ANY,
+ LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR,
"delete (deleting entryrdn) failed, err=%d %s\n",
retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
@@ -1120,7 +1120,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
if (parent_found) {
/* Push out the db modifications from the parent entry */
retval = modify_update_all(be,pb,&parent_modify_c,&txn);
- slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_delete",
"conn=%lu op=%d modify_update_all: old_entry=0x%p,
new_entry=0x%p, rc=%d\n",
conn_id, op_id, parent_modify_c.old_entry, parent_modify_c.new_entry,
retval);
if (DB_LOCK_DEADLOCK == retval)
@@ -1214,13 +1214,13 @@ ldbm_back_delete( Slapi_PBlock *pb )
/* call the transaction post delete plugins just before the commit */
if (!delete_tombstone_entry &&
plugin_call_plugins(pb, SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN)) {
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN plugin
"
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN
plugin "
"returned error code\n" );
if (!ldap_result_code) {
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
}
if (!ldap_result_code) {
- LDAPDebug0Args( LDAP_DEBUG_ANY, "SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN plugin
"
+ LDAPDebug0Args( LDAP_DEBUG_ANY, LOG_ERR, "SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN
plugin "
"returned error code but did not set SLAPI_RESULT_CODE\n" );
ldap_result_code = LDAP_OPERATIONS_ERROR;
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &ldap_result_code);
@@ -1304,7 +1304,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
{
/* Replace the old parent entry with the newly modified one */
myrc = modify_switch_entries( &parent_modify_c,be);
- slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_delete",
"conn=%lu op=%d modify_switch_entries: old_entry=0x%p,
new_entry=0x%p, rc=%d\n",
conn_id, op_id, parent_modify_c.old_entry, parent_modify_c.new_entry,
myrc);
if (myrc == 0) {
@@ -1367,7 +1367,7 @@ error_return:
/* call the transaction post delete plugins just before the abort */
if (!delete_tombstone_entry &&
plugin_call_plugins(pb, SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN)) {
- LDAPDebug1Arg( LDAP_DEBUG_TRACE, "SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN plugin
"
+ LDAPDebug1Arg( LDAP_DEBUG_TRACE, LOG_DEBUG, "SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN
plugin "
"returned error code %d\n", retval );
if (!ldap_result_code) {
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
@@ -1393,7 +1393,7 @@ error_return:
* be written to disk.
*/
myrc = modify_unswitch_entries(&parent_modify_c, be);
- slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_delete",
"conn=%lu op=%d modify_unswitch_entries: old_entry=0x%p,
new_entry=0x%p, rc=%d\n",
conn_id, op_id, parent_modify_c.old_entry, parent_modify_c.new_entry,
myrc);
}
@@ -1417,7 +1417,7 @@ common_return:
bdn = backdn_init(tombstonesdn, tombstone->ep_id, 0);
if (bdn) {
CACHE_ADD( &inst->inst_dncache, bdn, NULL );
- slapi_log_error(SLAPI_LOG_CACHE, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG, "ldbm_back_delete",
"set %s to dn cache\n", slapi_sdn_get_dn(tombstonesdn));
CACHE_RETURN(&inst->inst_dncache, &bdn);
}
@@ -1471,7 +1471,7 @@ diskfull_return:
slapi_send_ldap_result( pb, ldap_result_code, NULL, ldap_result_message, 0, NULL );
}
}
- slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_delete",
"conn=%lu op=%d modify_term: old_entry=0x%p, new_entry=0x%p,
in_cache=%d\n",
conn_id, op_id, parent_modify_c.old_entry, parent_modify_c.new_entry,
cache_is_in_cache(&inst->inst_cache,
parent_modify_c.new_entry));
@@ -1499,7 +1499,7 @@ diskfull_return:
slapi_sdn_done(&parentsdn);
if (pb->pb_conn)
{
- slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_delete", "leave
conn=%" NSPRIu64 " op=%d\n",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "ldbm_back_delete", "leave
conn=%" NSPRIu64 " op=%d\n",
pb->pb_conn->c_connid, operation->o_opid);
}
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c
b/ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c
index ea49556..6dcdc20 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c
@@ -37,6 +37,9 @@ static int entryrdn_noancestorid = 0;
#define ENTRYRDN_LOGLEVEL(rc) \
(((rc)==DB_LOCK_DEADLOCK)?SLAPI_LOG_BACKLDBM:SLAPI_LOG_FATAL)
+#define ENTRYRDN_SEVLEVEL(rc) \
+ (((rc)==DB_LOCK_DEADLOCK)?LOG_DEBUG:LOG_ERR)
+
#define ENTRYRDN_DELAY \
{ \
PRIntervalTime interval; \
@@ -205,10 +208,10 @@ entryrdn_index_entry(backend *be,
Slapi_RDN *srdn = NULL;
int db_retry = 0;
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"--> entryrdn_index_entry\n");
if (NULL == be || NULL == e) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_index_entry: Param error: Empty %s\n",
NULL==be?"backend":NULL==e?"entry":"unknown");
return rc;
@@ -216,7 +219,7 @@ entryrdn_index_entry(backend *be,
/* Open the entryrdn index */
rc = _entryrdn_open_index(be, &ai, &db);
if (rc || (NULL == db)) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_index_entry: Opening the index failed: "
"%s(%d)\n",
rc<0?dblayer_strerror(rc):"Invalid parameter", rc);
@@ -227,19 +230,19 @@ entryrdn_index_entry(backend *be,
if (NULL == slapi_rdn_get_rdn(srdn)) {
sdn = slapi_entry_get_sdn_const(e->ep_entry);
if (NULL == sdn) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_index_entry: Empty dn\n");
goto bail;
}
rc = slapi_rdn_init_all_sdn(srdn, sdn);
if (rc < 0) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_index_entry: Failed to convert "
"%s to Slapi_RDN\n", slapi_sdn_get_dn(sdn));
rc = LDAP_INVALID_DN_SYNTAX;
goto bail;
} else if (rc > 0) {
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"entryrdn_index_entry: %s does not belong to "
"the db\n", slapi_sdn_get_dn(sdn));
rc = DB_NOTFOUND;
@@ -251,7 +254,7 @@ entryrdn_index_entry(backend *be,
for (db_retry = 0; db_retry < RETRY_TIMES; db_retry++) {
rc = db->cursor(db, db_txn, &cursor, 0);
if (rc) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
"entryrdn_index_entry: Failed to make a cursor: %s(%d)\n",
dblayer_strerror(rc), rc);
if ((DB_LOCK_DEADLOCK == rc) && !db_txn) {
@@ -265,7 +268,7 @@ entryrdn_index_entry(backend *be,
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_index_entry: cursor open failed after [%d]
retries\n", db_retry);
rc = DB_LOCK_DEADLOCK;
goto bail;
@@ -286,7 +289,7 @@ bail:
for (db_retry = 0; db_retry < RETRY_TIMES; db_retry++) {
int myrc = cursor->c_close(cursor);
if (0 != myrc) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(myrc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(myrc), ENTRYRDN_SEVLEVEL(myrc),
ENTRYRDN_TAG,
"entryrdn_index_entry: Failed to close cursor:
%s(%d)\n",
dblayer_strerror(myrc), myrc);
if ((DB_LOCK_DEADLOCK == myrc) && !db_txn) {
@@ -304,7 +307,7 @@ bail:
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_index_entry: cursor close failed after [%d]
retries\n", db_retry);
rc = DB_LOCK_DEADLOCK;
}
@@ -313,7 +316,7 @@ bail:
dblayer_release_index_file(be, ai, db);
}
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"<-- entryrdn_index_entry\n");
return rc;
}
@@ -352,11 +355,11 @@ entryrdn_index_read_ext(backend *be,
rdn_elem *elem = NULL;
int db_retry = 0;
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"--> entryrdn_index_read\n");
if (NULL == be || NULL == sdn || NULL == id) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_index_read: Param error: Empty %s\n",
NULL==be?"backend":NULL==sdn?"DN":
NULL==id?"id container":"unknown");
@@ -367,13 +370,13 @@ entryrdn_index_read_ext(backend *be,
rc = slapi_rdn_init_all_sdn(&srdn, sdn);
if (rc < 0) {
- slapi_log_error(SLAPI_LOG_BACKLDBM, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ENTRYRDN_TAG,
"entryrdn_index_read: Param error: Failed to convert "
"%s to Slapi_RDN\n", slapi_sdn_get_dn(sdn));
rc = LDAP_INVALID_DN_SYNTAX;
goto bail;
} else if (rc > 0) {
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"entryrdn_index_read: %s does not belong to the db\n",
slapi_sdn_get_dn(sdn));
rc = DB_NOTFOUND;
@@ -383,7 +386,7 @@ entryrdn_index_read_ext(backend *be,
/* Open the entryrdn index */
rc = _entryrdn_open_index(be, &ai, &db);
if (rc || (NULL == db)) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_index_read: Opening the index failed: "
"%s(%d)\n",
rc<0?dblayer_strerror(rc):"Invalid parameter", rc);
@@ -395,7 +398,7 @@ entryrdn_index_read_ext(backend *be,
for (db_retry = 0; db_retry < RETRY_TIMES; db_retry++) {
rc = db->cursor(db, db_txn, &cursor, 0);
if (rc) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
"entryrdn_index_read: Failed to make a cursor: %s(%d)\n",
dblayer_strerror(rc), rc);
if ((DB_LOCK_DEADLOCK == rc) && !db_txn) {
@@ -409,7 +412,7 @@ entryrdn_index_read_ext(backend *be,
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_index_read: Failed to make a cursor after [%d]
retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
@@ -429,7 +432,7 @@ bail:
for (db_retry = 0; db_retry < RETRY_TIMES; db_retry++) {
int myrc = cursor->c_close(cursor);
if (0 != myrc) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(myrc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(myrc), ENTRYRDN_SEVLEVEL(myrc),
ENTRYRDN_TAG,
"entryrdn_index_read: Failed to close cursor:
%s(%d)\n",
dblayer_strerror(myrc), myrc);
if ((DB_LOCK_DEADLOCK == myrc) && !db_txn) {
@@ -447,7 +450,7 @@ bail:
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_index_read: Failed to close cursor after [%d]
retries\n",
db_retry);
rc = rc ? rc : DB_LOCK_DEADLOCK;
@@ -458,7 +461,7 @@ bail:
}
slapi_rdn_done(&srdn);
slapi_ch_free((void **)&elem);
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"<-- entryrdn_index_read\n");
return rc;
}
@@ -512,11 +515,11 @@ entryrdn_rename_subtree(backend *be,
ID targetid = 0;
int db_retry = 0;
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"--> entryrdn_rename_subtree\n");
if (NULL == be || NULL == oldsdn || 0 == id) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_rename_subtree: Param error: Empty %s\n",
NULL==be?"backend":NULL==oldsdn?"old dn":
(NULL==newsrdn&&NULL==newsupsdn)?"new dn and new
superior":
@@ -526,13 +529,13 @@ entryrdn_rename_subtree(backend *be,
rc = slapi_rdn_init_all_sdn_ext(&oldsrdn, oldsdn, flags);
if (rc < 0) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_rename_subtree: Failed to convert olddn "
"\"%s\" to Slapi_RDN\n",
slapi_sdn_get_dn(oldsdn));
rc = LDAP_INVALID_DN_SYNTAX;
goto bail;
} else if (rc > 0) {
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"entryrdn_rename_subtree: %s does not belong to "
"the db\n", slapi_sdn_get_dn(oldsdn));
rc = DB_NOTFOUND;
@@ -555,7 +558,7 @@ entryrdn_rename_subtree(backend *be,
}
if (NULL == mynewsrdn && NULL == mynewsupsdn) {
/* E.g., rename dn: cn=ABC DEF,... --> cn=ABC DEF,... */
- slapi_log_error(SLAPI_LOG_BACKLDBM, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ENTRYRDN_TAG,
"entryrdn_rename_subtree: No new superior is given "
"and new rdn %s is identical to the original\n",
slapi_rdn_get_rdn(&oldsrdn));
@@ -565,18 +568,18 @@ entryrdn_rename_subtree(backend *be,
/* Checking the contents of oldsrdn */
rdnidx = slapi_rdn_get_last_ext(&oldsrdn, &nrdn, FLAG_ALL_NRDNS);
if (rdnidx < 0 || NULL == nrdn) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_rename_subtree: Empty RDN\n");
goto bail;
} else if (0 == rdnidx) {
if (mynewsupsdn) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_move_subtree: Moving suffix \"%s\"
is "
"not alloweds\n", nrdn);
goto bail;
} else {
/* newsupsdn == NULL, so newsrdn is not */
- slapi_log_error(SLAPI_LOG_BACKLDBM, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ENTRYRDN_TAG,
"entryrdn_rename_subtree: Renaming suffix %s to %s\n",
nrdn, slapi_rdn_get_nrdn((Slapi_RDN *)mynewsrdn));
}
@@ -585,7 +588,7 @@ entryrdn_rename_subtree(backend *be,
/* Open the entryrdn index */
rc = _entryrdn_open_index(be, &ai, &db);
if (rc || (NULL == db)) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_rename_subtree: Opening the index failed: "
"%s(%d)\n",
rc<0?dblayer_strerror(rc):"Invalid parameter", rc);
@@ -597,7 +600,7 @@ entryrdn_rename_subtree(backend *be,
for (db_retry = 0; db_retry < RETRY_TIMES; db_retry++) {
rc = db->cursor(db, db_txn, &cursor, 0);
if (rc) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
"entryrdn_rename_subtree: Failed to make a cursor:
%s(%d)\n",
dblayer_strerror(rc), rc);
if ((DB_LOCK_DEADLOCK == rc) && !db_txn) {
@@ -611,7 +614,7 @@ entryrdn_rename_subtree(backend *be,
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_rename_subtree: create cursor failed after [%d]
retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
@@ -622,7 +625,7 @@ entryrdn_rename_subtree(backend *be,
if (mynewsrdn) {
newelem = _entryrdn_new_rdn_elem(be, id, mynewsrdn, &newelemlen);
if (NULL == newelem) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_rename_subtree: Failed to generate "
"a new elem: id: %d, rdn: %s\n",
id, slapi_rdn_get_rdn(mynewsrdn));
@@ -634,14 +637,14 @@ entryrdn_rename_subtree(backend *be,
if (mynewsupsdn) {
rc = slapi_rdn_init_all_sdn(&newsupsrdn, mynewsupsdn);
if (rc < 0) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_rename_subtree: Failed to convert "
"new superior \"%s\" to Slapi_RDN\n",
slapi_sdn_get_dn(mynewsupsdn));
rc = LDAP_INVALID_DN_SYNTAX;
goto bail;
} else if (rc > 0) {
- slapi_log_error(SLAPI_LOG_BACKLDBM, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ENTRYRDN_TAG,
"entryrdn_rename_subtree: %s does not belong "
"to the db\n", slapi_sdn_get_dn(mynewsupsdn));
rc = DB_NOTFOUND;
@@ -651,7 +654,7 @@ entryrdn_rename_subtree(backend *be,
rc = _entryrdn_index_read(be, cursor, &newsupsrdn, &newsupelem,
NULL, NULL, 0/*flags*/, db_txn);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_rename_subtree: Failed to read "
"the element of new superior \"%s\"
(%d)\n",
slapi_sdn_get_dn(mynewsupsdn), rc);
@@ -668,7 +671,7 @@ entryrdn_rename_subtree(backend *be,
&oldsupelem, NULL, 0/*flags*/, db_txn);
}
if (rc || NULL == targetelem) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_rename_subtree: Failed to read "
"the target element \"%s\" (%d)\n",
slapi_sdn_get_dn(oldsdn), rc);
@@ -730,7 +733,7 @@ entryrdn_rename_subtree(backend *be,
renamedata.flags = DB_DBT_USERMEM;
rc = _entryrdn_put_data(cursor, &key, &renamedata, RDN_INDEX_SELF,
db_txn);
if (rc && (DB_KEYEXIST != rc)) { /* failed && ignore already
exists */
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
"entryrdn_rename_subtree: Adding %s failed; "
"%s(%d)\n", keybuf, dblayer_strerror(rc), rc);
goto bail;
@@ -796,7 +799,7 @@ entryrdn_rename_subtree(backend *be,
}
rc = _entryrdn_put_data(cursor, &key, &renamedata, RDN_INDEX_PARENT,
db_txn);
if (rc && (DB_KEYEXIST != rc)) { /* failed && ignore already
exists */
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
"entryrdn_rename_subtree: Adding
"
"%s failed; %s(%d)\n",
keybuf, dblayer_strerror(rc), rc);
@@ -831,7 +834,7 @@ entryrdn_rename_subtree(backend *be,
renamedata.flags = DB_DBT_USERMEM;
rc = _entryrdn_put_data(cursor, &key, &renamedata, RDN_INDEX_SELF,
db_txn);
if (rc && (DB_KEYEXIST != rc)) { /* failed && ignore already
exists */
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"entryrdn_rename_subtree: Adding %s failed;
"
"%s(%d)\n", keybuf, dblayer_strerror(rc),
rc);
goto bail;
@@ -909,7 +912,7 @@ bail:
for (db_retry = 0; db_retry < RETRY_TIMES; db_retry++) {
int myrc = cursor->c_close(cursor);
if (0 != myrc) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(myrc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(myrc), ENTRYRDN_SEVLEVEL(myrc),
ENTRYRDN_TAG,
"entryrdn_rename_subtree: Failed to close cursor:
%s(%d)\n",
dblayer_strerror(myrc), myrc);
if ((DB_LOCK_DEADLOCK == myrc) && !db_txn) {
@@ -927,7 +930,7 @@ bail:
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_rename_subtree: Failed to close cursor after
[%d] retries.\n",
db_retry);
rc = rc ? rc : DB_LOCK_DEADLOCK;
@@ -936,7 +939,7 @@ bail:
if (db) {
dblayer_release_index_file(be, ai, db);
}
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"<-- entryrdn_rename_subtree\n");
return rc;
}
@@ -967,11 +970,11 @@ entryrdn_get_subordinates(backend *be,
rdn_elem **cep = NULL;
int db_retry = 0;
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"--> entryrdn_get_subordinates\n");
if (NULL == be || NULL == sdn || 0 == id) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_get_subordinates: Param error: Empty %s\n",
NULL==be?"backend":NULL==sdn?"dn":0==id?"id":"unknown");
goto bail;
@@ -986,12 +989,12 @@ entryrdn_get_subordinates(backend *be,
rc = slapi_rdn_init_all_sdn_ext(&srdn, sdn, flags);
if (rc) {
if (rc < 0) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_get_subordinates: Failed to convert "
"\"%s\" to Slapi_RDN\n",
slapi_sdn_get_dn(sdn));
rc = LDAP_INVALID_DN_SYNTAX;
} else if (rc > 0) {
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"entryrdn_get_subordinates: %s does not belong to
"
"the db\n", slapi_sdn_get_dn(sdn));
rc = DB_NOTFOUND;
@@ -1002,7 +1005,7 @@ entryrdn_get_subordinates(backend *be,
/* check the given dn/srdn */
rdnidx = slapi_rdn_get_last_ext(&srdn, &nrdn, FLAG_ALL_NRDNS);
if (rdnidx < 0 || NULL == nrdn) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_get_subordinates: Empty RDN\n");
goto bail;
}
@@ -1010,7 +1013,7 @@ entryrdn_get_subordinates(backend *be,
/* Open the entryrdn index */
rc = _entryrdn_open_index(be, &ai, &db);
if (rc || (NULL == db)) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_get_subordinates: Opening the index failed:
"
"%s(%d)\n",
rc<0?dblayer_strerror(rc):"Invalid parameter", rc);
@@ -1022,7 +1025,7 @@ entryrdn_get_subordinates(backend *be,
for (db_retry = 0; db_retry < RETRY_TIMES; db_retry++) {
rc = db->cursor(db, db_txn, &cursor, 0);
if (rc) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
"entryrdn_get_subordinates: Failed to make a cursor:
%s(%d)\n",
dblayer_strerror(rc), rc);
if ((DB_LOCK_DEADLOCK == rc) && !db_txn) {
@@ -1036,7 +1039,7 @@ entryrdn_get_subordinates(backend *be,
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_get_subordinates: Failed to make a cursor after
[%d] retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
@@ -1054,7 +1057,7 @@ entryrdn_get_subordinates(backend *be,
/* set direct children to the idlist */
rc = idl_append_extend(subordinates, childid);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_get_subordinates: Appending %d to idl "
"for direct children failed (%d)\n", childid, rc);
goto bail;
@@ -1064,7 +1067,7 @@ entryrdn_get_subordinates(backend *be,
rc = _entryrdn_append_childidl(cursor, (*cep)->rdn_elem_nrdn_rdn,
childid, subordinates, db_txn);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_get_subordinates: Appending %d to idl "
"for indirect children failed (%d)\n",
childid, rc);
@@ -1091,7 +1094,7 @@ bail:
for (db_retry = 0; db_retry < RETRY_TIMES; db_retry++) {
int myrc = cursor->c_close(cursor);
if (0 != myrc) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(myrc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(myrc), ENTRYRDN_SEVLEVEL(myrc),
ENTRYRDN_TAG,
"entryrdn_get_subordinates: Failed to close cursor:
%s(%d)\n",
dblayer_strerror(myrc), myrc);
if ((DB_LOCK_DEADLOCK == myrc) && !db_txn) {
@@ -1109,7 +1112,7 @@ bail:
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_get_subordinates: Failed to close cursor after
[%d] retries\n",
db_retry);
rc = rc ? rc : DB_LOCK_DEADLOCK;
@@ -1120,7 +1123,7 @@ bail:
if (db) {
dblayer_release_index_file(be, ai, db);
}
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"<-- entryrdn_get_subordinates\n");
return rc;
}
@@ -1155,11 +1158,11 @@ entryrdn_lookup_dn(backend *be,
int maybesuffix = 0;
int db_retry = 0;
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"--> entryrdn_lookup_dn\n");
if (NULL == be || NULL == rdn || 0 == id || NULL == dn) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_lookup_dn: Param error: Empty %s\n",
NULL==be?"backend":NULL==rdn?"rdn":0==id?"id":
NULL==dn?"dn container":"unknown");
@@ -1171,7 +1174,7 @@ entryrdn_lookup_dn(backend *be,
/* Open the entryrdn index */
rc = _entryrdn_open_index(be, &ai, &db);
if (rc || (NULL == db)) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_lookup_dn: Opening the index failed: "
"%s(%d)\n",
rc<0?dblayer_strerror(rc):"Invalid parameter", rc);
@@ -1183,7 +1186,7 @@ entryrdn_lookup_dn(backend *be,
for (db_retry = 0; db_retry < RETRY_TIMES; db_retry++) {
rc = db->cursor(db, db_txn, &cursor, 0);
if (rc) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
"entryrdn_lookup_dn: Failed to make a cursor: %s(%d)\n",
dblayer_strerror(rc), rc);
if (DB_LOCK_DEADLOCK == rc) {
@@ -1203,7 +1206,7 @@ entryrdn_lookup_dn(backend *be,
orignrdn = slapi_ch_strdup(rdn);
rc = slapi_dn_normalize_case_ext(orignrdn, 0, &nrdn, &nrdn_len);
if (rc < 0) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_get_parent: Failed to normalize %s\n", rdn);
goto bail;
}
@@ -1230,12 +1233,12 @@ retry_get0:
if (rc) {
if (DB_LOCK_DEADLOCK == rc) {
if (db_txn) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"entryrdn_get_parent: cursor get deadlock while under
txn -> failure\n");
goto bail;
} else {
/* try again */
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"entryrdn_get_parent: cursor get deadlock\n");
goto retry_get0;
}
@@ -1251,11 +1254,11 @@ retry_get1:
if (rc) {
if (DB_LOCK_DEADLOCK == rc) {
if (db_txn) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"entryrdn_get_parent: cursor get deadlock while
under txn -> failure\n");
} else {
/* try again */
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"entryrdn_get_parent: retry cursor get
deadlock\n");
goto retry_get1;
}
@@ -1306,7 +1309,7 @@ bail:
for (db_retry = 0; db_retry < RETRY_TIMES; db_retry++) {
int myrc = cursor->c_close(cursor);
if (0 != myrc) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(myrc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(myrc), ENTRYRDN_SEVLEVEL(myrc),
ENTRYRDN_TAG,
"entryrdn_lookup_dn: Failed to close cursor: %s(%d)\n",
dblayer_strerror(myrc), myrc);
if (DB_LOCK_DEADLOCK == myrc) {
@@ -1336,7 +1339,7 @@ bail:
}
slapi_ch_free_string(&nrdn);
slapi_ch_free_string(&keybuf);
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"<-- entryrdn_lookup_dn\n");
return rc;
}
@@ -1370,14 +1373,14 @@ entryrdn_get_parent(backend *be,
rdn_elem *elem = NULL;
int db_retry = 0;
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"--> entryrdn_get_parent\n");
/* Initialize data */
memset(&data, 0, sizeof(data));
if (NULL == be || NULL == rdn || 0 == id || NULL == prdn || NULL == pid) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_get_parent: Param error: Empty %s\n",
NULL==be?"backend":NULL==rdn?"rdn":0==id?"id":
NULL==rdn?"rdn container":
@@ -1390,7 +1393,7 @@ entryrdn_get_parent(backend *be,
/* Open the entryrdn index */
rc = _entryrdn_open_index(be, &ai, &db);
if (rc || (NULL == db)) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_get_parent: Opening the index failed: "
"%s(%d)\n",
rc<0?dblayer_strerror(rc):"Invalid parameter", rc);
@@ -1401,7 +1404,7 @@ entryrdn_get_parent(backend *be,
for (db_retry = 0; db_retry < RETRY_TIMES; db_retry++) {
rc = db->cursor(db, db_txn, &cursor, 0);
if (rc) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
"entryrdn_get_parent: Failed to make a cursor: %s(%d)\n",
dblayer_strerror(rc), rc);
if (DB_LOCK_DEADLOCK == rc) {
@@ -1420,7 +1423,7 @@ entryrdn_get_parent(backend *be,
orignrdn = slapi_ch_strdup(rdn);
rc = slapi_dn_normalize_case_ext(orignrdn, 0, &nrdn, &nrdn_len);
if (rc < 0) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"entryrdn_get_parent: Failed to normalize %s\n", rdn);
goto bail;
}
@@ -1445,10 +1448,10 @@ retry_get0:
if (rc) {
if (DB_LOCK_DEADLOCK == rc) {
if (db_txn) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"entryrdn_get_parent: cursor get deadlock while under txn
-> failure\n");
} else {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"entryrdn_get_parent: cursor get deadlock\n");
/* try again */
goto retry_get0;
@@ -1465,11 +1468,11 @@ retry_get1:
if (rc) {
if (DB_LOCK_DEADLOCK == rc) {
if (db_txn) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"entryrdn_get_parent: cursor get deadlock while
under txn -> failure\n");
} else {
/* try again */
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"entryrdn_get_parent: retry cursor get
deadlock\n");
goto retry_get1;
}
@@ -1500,7 +1503,7 @@ bail:
for (db_retry = 0; db_retry < RETRY_TIMES; db_retry++) {
int myrc = cursor->c_close(cursor);
if (0 != myrc) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(myrc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(myrc), ENTRYRDN_SEVLEVEL(myrc),
ENTRYRDN_TAG,
"entryrdn_get_parent: Failed to close cursor:
%s(%d)\n",
dblayer_strerror(myrc), myrc);
if (DB_LOCK_DEADLOCK == myrc) {
@@ -1523,7 +1526,7 @@ bail:
}
/* it is guaranteed that db is not NULL. */
dblayer_release_index_file(be, ai, db);
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"<-- entryrdn_get_parent\n");
return rc;
}
@@ -1549,10 +1552,10 @@ _entryrdn_new_rdn_elem(backend *be,
size_t nrdn_len = 0;
rdn_elem *re = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"--> _entryrdn_new_rdn_elem\n");
if (NULL == srdn || NULL == be) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_new_rdn_elem: Empty %s\n",
NULL==srdn?"RDN":NULL==be?"backend":"unknown");
*length = 0;
@@ -1563,7 +1566,7 @@ _entryrdn_new_rdn_elem(backend *be,
nrdn = slapi_rdn_get_nrdn(srdn);
if (NULL == rdn || NULL == nrdn) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_new_rdn_elem: Empty rdn (%s) or "
"normalized rdn (%s)\n", rdn?rdn:"",
nrdn?nrdn:"");
@@ -1581,7 +1584,7 @@ _entryrdn_new_rdn_elem(backend *be,
PL_strncpyz(re->rdn_elem_nrdn_rdn, nrdn, nrdn_len);
PL_strncpyz(RDN_ADDR(re), rdn, rdn_len);
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"<-- _entryrdn_new_rdn_elem\n");
return re;
}
@@ -1609,19 +1612,19 @@ static void
_entryrdn_dump_rdn_elem(rdn_elem *elem)
{
if (NULL == elem) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG, "RDN ELEMENT:
empty\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG, "RDN ELEMENT:
empty\n");
return;
}
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG, "RDN ELEMENT:\n");
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG, " ID: %u\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG, "RDN ELEMENT:\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG, " ID: %u\n",
id_stored_to_internal(elem->rdn_elem_id));
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG, " RDN:
\"%s\"\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG, " RDN:
\"%s\"\n",
RDN_ADDR(elem));
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG, " RDN length: %u\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG, " RDN length:
%u\n",
sizeushort_stored_to_internal(elem->rdn_elem_rdn_len));
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG, " Normalized RDN:
\"%s\"\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG, " Normalized RDN:
\"%s\"\n",
elem->rdn_elem_nrdn_rdn);
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG, " Normalized RDN length:
%u\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG, " Normalized RDN
length: %u\n",
sizeushort_stored_to_internal(elem->rdn_elem_nrdn_len));
return;
}
@@ -1634,7 +1637,7 @@ _entryrdn_open_index(backend *be, struct attrinfo **ai, DB **dbp)
ldbm_instance *inst = NULL;
if (NULL == be || NULL == ai || NULL == dbp) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_open_index: Param error: Empty %s\n",
NULL==be?"be":NULL==ai?"attrinfo container":
NULL==dbp?"db container":"unknown");
@@ -1650,7 +1653,7 @@ _entryrdn_open_index(backend *be, struct attrinfo **ai, DB **dbp)
}
inst = (ldbm_instance *)be->be_instance_info;
if ((*ai)->ai_attrcrypt && entryrdn_warning_on_encryption) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"Encrypting entryrdn is not supported. "
"Ignoring the configuration entry \"dn: "
"cn=entryrdn, cn=encrypted attributes, cn=<backend>,
"
@@ -1678,15 +1681,15 @@ _entryrdn_encrypt_key(backend *be, const char *key, struct
attrinfo *ai)
struct berval *encrypted_val = NULL;
char *encrypted = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"--> _entryrdn_encrypt_key\n");
if (NULL == key) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG, "Empty key\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG, "Empty
key\n");
goto bail;
}
if (NULL == be || NULL == key || NULL == ai) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_encrypt_key: Param error: Empty %s\n",
NULL==be?"be":NULL==key?"key":
NULL==ai?"attrinfo":"unknown");
@@ -1696,11 +1699,11 @@ _entryrdn_encrypt_key(backend *be, const char *key, struct
attrinfo *ai)
val.bv_len = strlen(key);
rc = attrcrypt_encrypt_index_key(be, ai, &val, &encrypted_val);
if (NULL == encrypted_val) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"Failed to encrypt index key for %s\n", key);
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"<-- _entryrdn_encrypt_key\n");
return encrypted_val;
}
@@ -1713,15 +1716,15 @@ _entryrdn_decrypt_key(backend *be, const char *key, struct
attrinfo *ai)
struct berval *decrypted_val = NULL;
char *decrypted = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"--> _entryrdn_decrypt_key\n");
if (NULL == key) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG, "Empty key\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG, "Empty
key\n");
goto bail;
}
if (NULL == be || NULL == key || NULL == ai) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_encrypt_key: Param error: Empty %s\n",
NULL==be?"be":NULL==key?"key":
NULL==ai?"attrinfo":"unknown");
@@ -1736,11 +1739,11 @@ _entryrdn_decrypt_key(backend *be, const char *key, struct
attrinfo *ai)
ber_bvfree(decrypted_val);
goto bail;
}
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"Failed to decrypt index key for %s\n", key);
bail:
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"<-- _detryrdn_encrypt_key\n");
return decrypted;
}
@@ -1762,10 +1765,10 @@ _entryrdn_get_elem(DBC *cursor,
int rc = 0;
void *ptr = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG, "-->
_entryrdn_get_elem\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG, "-->
_entryrdn_get_elem\n");
if (NULL == cursor || NULL == key || NULL == data || NULL == elem ||
NULL == comp_key) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_get_elem: Param error: Empty %s\n",
NULL==cursor?"cursor":NULL==key?"key":
NULL==data?"data":NULL==elem?"elem container":
@@ -1780,10 +1783,10 @@ retry_get:
if (rc) {
if (DB_LOCK_DEADLOCK == rc) {
if (db_txn) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_get_elem: cursor get deadlock while under txn
-> failure\n");
} else {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_get_elem: cursor get deadlock\n");
/* try again */
goto retry_get;
@@ -1814,7 +1817,7 @@ retry_get:
slapi_ch_free(&ptr);
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG, "<--
_entryrdn_get_elem\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG, "<--
_entryrdn_get_elem\n");
return rc;
}
@@ -1831,11 +1834,11 @@ _entryrdn_get_tombstone_elem(DBC *cursor,
rdn_elem *childelem = NULL;
char buffer[RDN_BULK_FETCH_BUFFER_SIZE];
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"--> _entryrdn_get_tombstone_elem\n");
if (NULL == cursor || NULL == srdn || NULL == key || NULL == elem ||
NULL == comp_key) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_get_tombstone_elem: Param error: Empty %s\n",
NULL==cursor?"cursor":NULL==key?"key":
NULL==srdn?"srdn":NULL==elem?"elem container":
@@ -1856,12 +1859,12 @@ retry_get0:
rc = cursor->c_get(cursor, key, &data, DB_SET|DB_MULTIPLE);
if (DB_LOCK_DEADLOCK == rc) {
if (db_txn) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
"_entryrdn_get_tombstone_elem: cursor get deadlock while under
txn -> failure\n");
goto bail;
} else {
/* try again */
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
"_entryrdn_get_tombstone_elem: cursor get deadlock\n");
goto retry_get0;
}
@@ -1915,12 +1918,12 @@ retry_get1:
rc = cursor->c_get(cursor, key, &data, DB_NEXT_DUP|DB_MULTIPLE);
if (DB_LOCK_DEADLOCK == rc) {
if (db_txn) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_get_tombstone_elem: cursor get deadlock while
under txn -> failure\n");
goto bail;
} else {
/* try again */
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_get_tombstone_elem: retry cursor get
deadlock\n");
goto retry_get1;
}
@@ -1935,7 +1938,7 @@ retry_get1:
} while (0 == rc);
bail:
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"<-- _entryrdn_get_tombstone_elem\n");
return rc;
}
@@ -1946,10 +1949,10 @@ _entryrdn_put_data(DBC *cursor, DBT *key, DBT *data, char type,
DB_TXN *db_txn)
int rc = -1;
int db_retry = 0;
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"--> _entryrdn_put_data\n");
if (NULL == cursor || NULL == key || NULL == data) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_put_data: Param error: Empty %s\n",
NULL==cursor?"cursor":NULL==key?"key":
NULL==data?"data":"unknown");
@@ -1961,7 +1964,7 @@ _entryrdn_put_data(DBC *cursor, DBT *key, DBT *data, char type,
DB_TXN *db_txn)
if (rc) {
if (DB_KEYEXIST == rc) {
/* this is okay, but need to return DB_KEYEXIST to caller */
- slapi_log_error(SLAPI_LOG_BACKLDBM, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ENTRYRDN_TAG,
"_entryrdn_put_data: The same key (%s) and the
"
"data exists in index\n",
(char *)key->data);
@@ -1975,7 +1978,7 @@ _entryrdn_put_data(DBC *cursor, DBT *key, DBT *data, char type,
DB_TXN *db_txn)
} else {
keyword = "self";
}
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_put_data: Adding the %s link (%s) "
"failed: %s (%d)\n", keyword, (char
*)key->data,
dblayer_strerror(rc), rc);
@@ -1990,13 +1993,13 @@ _entryrdn_put_data(DBC *cursor, DBT *key, DBT *data, char type,
DB_TXN *db_txn)
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_put_data: cursor put operation failed after [%d]
retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG, "<--
_entryrdn_put_data\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG, "<--
_entryrdn_put_data\n");
return rc;
}
@@ -2006,10 +2009,10 @@ _entryrdn_del_data(DBC *cursor, DBT *key, DBT *data, DB_TXN
*db_txn)
int rc = -1;
int db_retry = 0;
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"--> _entryrdn_del_data\n");
if (NULL == cursor || NULL == key || NULL == data) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_del_data: Param error: Empty %s\n",
NULL==cursor?"cursor":NULL==key?"key":
NULL==data?"data":"unknown");
@@ -2020,7 +2023,7 @@ _entryrdn_del_data(DBC *cursor, DBT *key, DBT *data, DB_TXN
*db_txn)
rc = cursor->c_get(cursor, key, data, DB_GET_BOTH);
if (rc) {
if ((DB_LOCK_DEADLOCK == rc) && !db_txn) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_del_data: cursor get deadlock\n");
/* try again */
} else if (DB_NOTFOUND == rc) {
@@ -2036,7 +2039,7 @@ _entryrdn_del_data(DBC *cursor, DBT *key, DBT *data, DB_TXN
*db_txn)
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_del_data: cursor get failed after [%d]
retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
@@ -2047,7 +2050,7 @@ _entryrdn_del_data(DBC *cursor, DBT *key, DBT *data, DB_TXN
*db_txn)
for (db_retry = 0; db_retry < RETRY_TIMES; db_retry++) {
rc = cursor->c_del(cursor, 0);
if (rc) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
"_entryrdn_del_data: Deleting %s failed; "
"%s(%d)\n", (char *)key->data,
dblayer_strerror(rc), rc);
@@ -2061,13 +2064,13 @@ _entryrdn_del_data(DBC *cursor, DBT *key, DBT *data, DB_TXN
*db_txn)
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_del_data: cursor del failed after [%d]
retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"<-- _entryrdn_del_data\n");
return rc;
}
@@ -2090,12 +2093,12 @@ _entryrdn_insert_key_elems(backend *be,
int rc = 0;
ID myid = 0;
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"--> _entryrdn_insert_key_elems\n");
if (NULL == be || NULL == cursor || NULL == srdn ||
NULL == key || NULL == parentelem || NULL == elem) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_insert_key_elem: Param error: Empty %s\n",
NULL==be?"backend":NULL==cursor?"cursor":NULL==srdn?"RDN":
NULL==key?"key":NULL==parentelem?"parent
element":
@@ -2155,7 +2158,7 @@ _entryrdn_insert_key_elems(backend *be,
/* Succeeded or failed, it's done. */
bail:
slapi_ch_free_string(&keybuf);
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"<-- _entryrdn_insert_key_elems\n");
return rc;
}
@@ -2188,7 +2191,7 @@ _entryrdn_replace_suffix_id(DBC *cursor, DBT *key, DBT *adddata,
for (db_retry = 0; db_retry < RETRY_TIMES; db_retry++) {
rc = cursor->c_put(cursor, key, adddata, DB_CURRENT);
if (rc) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
"_entryrdn_replace_suffix_id: Adding suffix %s failed:
"
"%s (%d)\n", normsuffix, dblayer_strerror(rc), rc);
if ((DB_LOCK_DEADLOCK == rc) && !db_txn) {
@@ -2201,7 +2204,7 @@ _entryrdn_replace_suffix_id(DBC *cursor, DBT *key, DBT *adddata,
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_replace_suffix_id: cursor put failed after [%d]
retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
@@ -2234,7 +2237,7 @@ _entryrdn_replace_suffix_id(DBC *cursor, DBT *key, DBT *adddata,
for (db_retry = 0; db_retry < RETRY_TIMES; db_retry++) {
rc = cursor->c_get(cursor, key, &data, DB_SET|DB_MULTIPLE);
if ((DB_LOCK_DEADLOCK == rc) && !db_txn) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
"_entryrdn_replace_suffix_id: cursor get
deadlock\n");
/* try again */
ENTRYRDN_DELAY;
@@ -2247,7 +2250,7 @@ _entryrdn_replace_suffix_id(DBC *cursor, DBT *key, DBT *adddata,
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_replace_suffix_id: cursor get1 failed after [%d]
retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
@@ -2293,7 +2296,7 @@ _entryrdn_replace_suffix_id(DBC *cursor, DBT *key, DBT *adddata,
for (db_retry = 0; db_retry < RETRY_TIMES; db_retry++) {
rc = cursor->c_get(cursor, key, &data, DB_NEXT_DUP|DB_MULTIPLE);
if ((DB_LOCK_DEADLOCK == rc) && !db_txn) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_replace_suffix_id: retry cursor get
deadlock\n");
/* try again */
ENTRYRDN_DELAY;
@@ -2306,7 +2309,7 @@ _entryrdn_replace_suffix_id(DBC *cursor, DBT *key, DBT *adddata,
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_replace_suffix_id: cursor get2 failed after
[%d] retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
@@ -2341,7 +2344,7 @@ _entryrdn_replace_suffix_id(DBC *cursor, DBT *key, DBT *adddata,
rc = cursor->c_get(cursor, key, &moddata, DB_SET);
if (rc) {
if ((DB_LOCK_DEADLOCK == rc) && !db_txn) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_replace_suffix_id: retry2 cursor get
deadlock\n");
ENTRYRDN_DELAY;
} else {
@@ -2354,7 +2357,7 @@ _entryrdn_replace_suffix_id(DBC *cursor, DBT *key, DBT *adddata,
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_replace_suffix_id: cursor get3 failed after
[%d] retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
@@ -2368,7 +2371,7 @@ _entryrdn_replace_suffix_id(DBC *cursor, DBT *key, DBT *adddata,
for (db_retry = 0; db_retry < RETRY_TIMES; db_retry++) {
rc = cursor->c_put(cursor, key, &moddata, DB_CURRENT);
if (rc) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_replace_suffix_id: "
"Fixing the parent link (%s) failed: %s
(%d)\n",
keybuf, dblayer_strerror(rc), rc);
@@ -2382,7 +2385,7 @@ _entryrdn_replace_suffix_id(DBC *cursor, DBT *key, DBT *adddata,
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_replace_suffix_id: cursor put failed
after [%d] retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
@@ -2432,11 +2435,11 @@ _entryrdn_insert_key(backend *be,
Slapi_RDN *tmpsrdn = NULL;
int db_retry = 0;
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"--> _entryrdn_insert_key\n");
if (NULL == be || NULL == cursor || NULL == srdn || 0 == id) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_insert_key: Param error: Empty %s\n",
NULL==be?"backend":NULL==cursor?"cursor":NULL==srdn?"RDN":
0==id?"id":"unknown");
@@ -2446,7 +2449,7 @@ _entryrdn_insert_key(backend *be,
/* get the top normalized rdn */
rdnidx = slapi_rdn_get_last_ext(srdn, &nrdn, FLAG_ALL_NRDNS);
if (rdnidx < 0 || NULL == nrdn) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_insert_key: Empty RDN\n");
goto bail;
}
@@ -2461,7 +2464,7 @@ _entryrdn_insert_key(backend *be,
DBT adddata;
elem = _entryrdn_new_rdn_elem(be, id, srdn, &len);
if (NULL == elem) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_insert_key: Failed to generate an elem:
"
"id: %d, rdn: %s\n",
id, slapi_rdn_get_rdn(srdn));
@@ -2486,7 +2489,7 @@ _entryrdn_insert_key(backend *be,
for (db_retry = 0; db_retry < RETRY_TIMES; db_retry++) {
rc = cursor->c_get(cursor, &key, &existdata, DB_SET);
if (rc) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_insert_key: Get existing suffix %s
"
"failed: %s (%d)\n",
nrdn, dblayer_strerror(rc), rc);
@@ -2500,7 +2503,7 @@ _entryrdn_insert_key(backend *be,
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_insert_key: cursor get failed after [%d]
retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
@@ -2518,7 +2521,7 @@ _entryrdn_insert_key(backend *be,
} /* if (TMPID == tmpid) */
rc = 0;
} /* if (DB_KEYEXIST == rc) */
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"_entryrdn_insert_key: Suffix %s added: %d\n",
nrdn, rc);
goto bail; /* succeeded or failed, it's done */
@@ -2532,7 +2535,7 @@ _entryrdn_insert_key(backend *be,
if (rc) {
char *dn = NULL;
slapi_rdn_get_dn(srdn, &dn);
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_insert_key: partial dup of %s (idx %d) "
"failed (%d)\n", dn, rdnidx, rc);
slapi_ch_free_string(&dn);
@@ -2542,7 +2545,7 @@ _entryrdn_insert_key(backend *be,
if (NULL == elem) {
char *dn = NULL;
slapi_rdn_get_dn(tmpsrdn, &dn);
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_insert_key: Failed to generate a new elem:
"
"dn: %s\n", dn);
slapi_ch_free_string(&dn);
@@ -2562,7 +2565,7 @@ _entryrdn_insert_key(backend *be,
int isexception = 0;
if ((rc == DB_LOCK_DEADLOCK) && db_txn) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
"_entryrdn_insert_key: Suffix \"%s\" cursor get fails:
"
"%s(%d)\n", nrdn, dblayer_strerror(rc), rc);
goto bail;
@@ -2584,7 +2587,7 @@ _entryrdn_insert_key(backend *be,
slapi_ch_free((void **)&elem);
elem = _entryrdn_new_rdn_elem(be, suffixid, tmpsrdn, &len);
if (NULL == elem) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_insert_key: Failed to generate an elem:
"
"id: %d, rdn: %s\n",
suffixid, slapi_rdn_get_rdn(tmpsrdn));
@@ -2599,14 +2602,14 @@ _entryrdn_insert_key(backend *be,
adddata.flags = DB_DBT_USERMEM;
rc = _entryrdn_put_data(cursor, &key, &adddata, RDN_INDEX_SELF,
db_txn);
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"_entryrdn_insert_key: Suffix %s added: %d\n",
slapi_rdn_get_rdn(tmpsrdn), rc);
#ifdef FIX_TXN_DEADLOCKS
#error no checking for rc here? - what if rc is deadlock? should bail?
#endif
} else {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
"_entryrdn_insert_key: Suffix \"%s\" not
found: "
"%s(%d)\n", nrdn, dblayer_strerror(rc), rc);
goto bail;
@@ -2626,7 +2629,7 @@ _entryrdn_insert_key(backend *be,
rdnidx = slapi_rdn_get_prev_ext(srdn, rdnidx,
&childnrdn, FLAG_ALL_NRDNS);
if ((rdnidx < 0) || (NULL == childnrdn)) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_insert_key: RDN list \"%s\" is
broken: "
"idx(%d)\n", slapi_rdn_get_rdn(srdn), rdnidx);
goto bail;
@@ -2644,7 +2647,7 @@ _entryrdn_insert_key(backend *be,
if (rc) {
char *dn = NULL;
slapi_rdn_get_dn(srdn, &dn);
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_insert_key: partial dup of %s "
"(idx %d) failed (%d)\n", dn, rdnidx, rc);
slapi_ch_free_string(&dn);
@@ -2655,7 +2658,7 @@ _entryrdn_insert_key(backend *be,
if (NULL == elem) {
char *dn = NULL;
slapi_rdn_get_dn(tmpsrdn, &dn);
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_insert_key: Failed to generate a new elem:
"
"dn: %s\n", dn);
slapi_ch_free_string(&dn);
@@ -2673,7 +2676,7 @@ _entryrdn_insert_key(backend *be,
if (rc) {
slapi_ch_free((void **)&tmpelem);
if ((rc == DB_LOCK_DEADLOCK) && db_txn) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_insert_key: Suffix \"%s\" cursor get
fails: "
"%s(%d)\n", childnrdn, dblayer_strerror(rc), rc);
goto bail;
@@ -2707,11 +2710,11 @@ _entryrdn_insert_key(backend *be,
char *dn = NULL;
slapi_rdn_get_dn(tmpsrdn, &dn);
if (DB_NOTFOUND == rc) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_insert_key: Node \"%s\" not
found: "
"%s(%d)\n", dn, dblayer_strerror(rc), rc);
} else {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_insert_key: Getting \"%s\"
failed: "
"%s(%d)\n", dn, dblayer_strerror(rc), rc);
}
@@ -2731,7 +2734,7 @@ _entryrdn_insert_key(backend *be,
} else {
char *dn = NULL;
slapi_rdn_get_dn(tmpsrdn, &dn);
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_insert_key: Suffix \"%s\" not
found: "
"%s(%d)\n", nrdn, dblayer_strerror(rc), rc);
slapi_ch_free_string(&dn);
@@ -2747,13 +2750,13 @@ _entryrdn_insert_key(backend *be,
/* already in the file */
/* do nothing and return. */
rc = 0;
- slapi_log_error(SLAPI_LOG_BACKLDBM, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ENTRYRDN_TAG,
"_entryrdn_insert_key: ID %d is already "
"in the index. NOOP.\n", currid);
} else { /* different id, error return */
char *dn = NULL;
int tmprc = slapi_rdn_get_dn(srdn, &dn);
- slapi_log_error(SLAPI_LOG_FATAL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
ENTRYRDN_TAG,
"_entryrdn_insert_key: Same DN (%s: %s) "
"is already in the %s file with different ID "
@@ -2785,7 +2788,7 @@ bail:
slapi_ch_free((void **)&elem);
slapi_ch_free((void **)&parentelem);
slapi_ch_free((void **)&childelem);
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"<-- _entryrdn_insert_key\n");
return rc;
}
@@ -2820,11 +2823,11 @@ _entryrdn_delete_key(backend *be,
int done = 0;
char buffer[RDN_BULK_FETCH_BUFFER_SIZE];
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"--> _entryrdn_delete_key\n");
if (NULL == be || NULL == cursor || NULL == srdn || 0 == id) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_delete_key: Param error: Empty %s\n",
NULL==be?"backend":NULL==cursor?"cursor":NULL==srdn?"RDN":
0==id?"ID":"unknown");
@@ -2835,7 +2838,7 @@ _entryrdn_delete_key(backend *be,
rdnidx = slapi_rdn_get_first_ext(srdn, &nrdn, FLAG_ALL_NRDNS);
/* rdnidx is supposed to be 0 */
if (rdnidx < 0 || NULL == nrdn) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_delete_key: Empty RDN\n");
goto bail;
}
@@ -2844,7 +2847,7 @@ _entryrdn_delete_key(backend *be,
issuffix = 1;
selfnrdn = suffix;
} else if (lastidx < 0 || NULL == suffix) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_delete_key: Empty suffix\n");
goto bail;
}
@@ -2867,11 +2870,11 @@ _entryrdn_delete_key(backend *be,
rc = cursor->c_get(cursor, &key, &data, DB_SET|DB_MULTIPLE);
if (DB_LOCK_DEADLOCK == rc) {
if (db_txn) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_delete_key: cursor get deadlock while under txn
-> failure\n");
goto bail;
} else {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_delete_key: cursor get deadlock\n");
/* try again */
continue;
@@ -2900,7 +2903,7 @@ _entryrdn_delete_key(backend *be,
childelem = (rdn_elem *)dataret.data;
if (!slapi_is_special_rdn(childelem->rdn_elem_nrdn_rdn,
RDN_IS_TOMBSTONE)) {
/* there's at least one live child */
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_delete_key: Failed to remove %s;
"
"has a child %s\n", nrdn,
(char *)childelem->rdn_elem_nrdn_rdn);
@@ -2912,11 +2915,11 @@ retry_get:
rc = cursor->c_get(cursor, &key, &data, DB_NEXT_DUP|DB_MULTIPLE);
if (DB_LOCK_DEADLOCK == rc) {
if (db_txn) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_delete_key: cursor get deadlock while under
txn -> failure\n");
goto bail;
} else {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_delete_key: retry cursor get
deadlock\n");
/* try again */
goto retry_get;
@@ -2947,7 +2950,7 @@ retry_get:
if (rc) {
char *dn = NULL;
slapi_rdn_get_dn(srdn, &dn);
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_delete_key: partial dup of %s (idx %d)
"
"failed (%d)\n", dn, 1, rc);
slapi_ch_free_string(&dn);
@@ -2957,7 +2960,7 @@ retry_get:
if (NULL == elem) {
char *dn = NULL;
slapi_rdn_get_dn(tmpsrdn, &dn);
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_delete_key: Failed to generate a parent "
"elem: dn: %s\n", dn);
slapi_ch_free_string(&dn);
@@ -2971,7 +2974,7 @@ retry_get:
if (NULL == elem) {
char *dn = NULL;
slapi_rdn_get_dn(srdn, &dn);
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_delete_key: Failed to generate a parent's
"
"child elem: dn: %s\n", dn);
slapi_ch_free_string(&dn);
@@ -2988,7 +2991,7 @@ retry_get:
if (NULL == elem) {
char *dn = NULL;
slapi_rdn_get_dn(srdn, &dn);
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_delete_key: Failed to generate a target "
"elem: dn: %s\n", dn);
slapi_ch_free_string(&dn);
@@ -3012,7 +3015,7 @@ retry_get:
}
if (rc) {
if (DB_NOTFOUND == rc) {
- slapi_log_error(SLAPI_LOG_BACKLDBM, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ENTRYRDN_TAG,
"_entryrdn_delete_key: No parent link %s\n",
keybuf);
goto bail;
} else {
@@ -3036,7 +3039,7 @@ retry_get:
for (db_retry = 0; db_retry < RETRY_TIMES; db_retry++) {
rc = cursor->c_del(cursor, 0);
if (rc && (DB_NOTFOUND != rc)) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_delete_key: Deleting %s failed;
"
"%s(%d)\n", (char *)key.data,
dblayer_strerror(rc), rc);
@@ -3050,7 +3053,7 @@ retry_get:
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_delete_key: delete parent link failed
after [%d] retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
@@ -3066,7 +3069,7 @@ retry_get:
for (db_retry = 0; db_retry < RETRY_TIMES; db_retry++) {
rc = cursor->c_del(cursor, 0);
if (rc && (DB_NOTFOUND != rc)) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_delete_key: Deleting %s failed;
"
"%s(%d)\n", (char *)key.data,
dblayer_strerror(rc), rc);
@@ -3080,7 +3083,7 @@ retry_get:
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_delete_key: delete parent's child
link failed after [%d] retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
@@ -3097,7 +3100,7 @@ retry_get:
for (db_retry = 0; db_retry < RETRY_TIMES; db_retry++) {
rc = cursor->c_del(cursor, 0);
if (rc && (DB_NOTFOUND != rc)) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_delete_key: Deleting %s failed;
"
"%s(%d)\n", (char *)key.data,
dblayer_strerror(rc), rc);
@@ -3111,7 +3114,7 @@ retry_get:
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_delete_key: delete self link failed after
[%d] retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
@@ -3124,7 +3127,7 @@ bail:
slapi_ch_free_string(&parentnrdn);
slapi_ch_free_string(&keybuf);
slapi_ch_free((void **)&elem);
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"<-- _entryrdn_delete_key\n");
return rc;
}
@@ -3152,11 +3155,11 @@ _entryrdn_index_read(backend *be,
Slapi_RDN *tmpsrdn = NULL;
rdn_elem *tmpelem = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"--> _entryrdn_index_read\n");
if (NULL == be || NULL == cursor ||
NULL == srdn || NULL == elem) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_index_read: Param error: Empty %s\n",
NULL==be?"backend":NULL==cursor?"cursor":NULL==srdn?"RDN":
NULL==elem?"elem container":"unknown");
@@ -3173,7 +3176,7 @@ _entryrdn_index_read(backend *be,
/* get the top normalized rdn (normalized suffix) */
rdnidx = slapi_rdn_get_last_ext(srdn, &nrdn, FLAG_ALL_NRDNS);
if (rdnidx < 0 || NULL == nrdn) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_index_read: Empty RDN (Suffix)\n");
goto bail;
}
@@ -3190,7 +3193,7 @@ _entryrdn_index_read(backend *be,
if (rc) {
char *dn = NULL;
slapi_rdn_get_dn(srdn, &dn);
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_index_read: partial dup of %s (idx %d) "
"failed (%d)\n", dn, rdnidx, rc);
slapi_ch_free_string(&dn);
@@ -3200,7 +3203,7 @@ _entryrdn_index_read(backend *be,
if (NULL == *elem) {
char *dn = NULL;
slapi_rdn_get_dn(tmpsrdn, &dn);
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_index_read: Failed to generate a new elem:
"
"dn: %s\n", dn);
slapi_ch_free_string(&dn);
@@ -3218,7 +3221,7 @@ _entryrdn_index_read(backend *be,
if (rc || NULL == *elem) {
slapi_ch_free((void **)elem);
if ((rc == DB_LOCK_DEADLOCK) && db_txn) {
- slapi_log_error(SLAPI_LOG_BACKLDBM, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ENTRYRDN_TAG,
"_entryrdn_index_read: Suffix \"%s\" cursor get fails:
"
"%s(%d)\n", nrdn, dblayer_strerror(rc), rc);
slapi_rdn_free(&tmpsrdn);
@@ -3231,7 +3234,7 @@ _entryrdn_index_read(backend *be,
rdnidx--; /* consider nsuniqueid=..,<RDN> one RDN */
}
if (rc || NULL == *elem) {
- slapi_log_error(SLAPI_LOG_BACKLDBM, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ENTRYRDN_TAG,
"_entryrdn_index_read: Suffix \"%s\" not
found: "
"%s(%d)\n", nrdn, dblayer_strerror(rc), rc);
rc = DB_NOTFOUND;
@@ -3259,7 +3262,7 @@ _entryrdn_index_read(backend *be,
#ifdef LDAP_DEBUG_ENTRYRDN
char *dn = NULL;
slapi_rdn_get_dn(srdn, &dn);
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_index_read: done; DN %s => ID
%d\n",
dn, id);
slapi_ch_free_string(&dn);
@@ -3274,7 +3277,7 @@ _entryrdn_index_read(backend *be,
if (rc) {
char *dn = NULL;
slapi_rdn_get_dn(srdn, &dn);
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_delete_key: partial dup of %s "
"(idx %d) failed (%d)\n", dn, rdnidx, rc);
slapi_ch_free_string(&dn);
@@ -3285,7 +3288,7 @@ _entryrdn_index_read(backend *be,
if (NULL == tmpelem) {
char *dn = NULL;
slapi_rdn_get_dn(tmpsrdn, &dn);
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_index_read: Failed to generate a new elem:
"
"dn: %s\n", dn);
slapi_ch_free_string(&dn);
@@ -3312,7 +3315,7 @@ _entryrdn_index_read(backend *be,
if (rc) {
slapi_ch_free((void **)&tmpelem);
if ((rc == DB_LOCK_DEADLOCK) && db_txn) {
- slapi_log_error(SLAPI_LOG_BACKLDBM, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ENTRYRDN_TAG,
"_entryrdn_index_read: Suffix \"%s\" cursor get
fails: "
"%s(%d)\n", nrdn, dblayer_strerror(rc), rc);
if (tmpsrdn != srdn) {
@@ -3333,7 +3336,7 @@ _entryrdn_index_read(backend *be,
if (rc || (NULL == tmpelem)) {
slapi_ch_free((void **)&tmpelem);
if (DB_NOTFOUND != rc) {
- slapi_log_error(SLAPI_LOG_BACKLDBM, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ENTRYRDN_TAG,
"_entryrdn_index_read: Child link \"%s\"
of "
"key \"%s\" not found: %s(%d)\n",
childnrdn, keybuf, dblayer_strerror(rc), rc);
@@ -3348,7 +3351,7 @@ _entryrdn_index_read(backend *be,
} else {
slapi_ch_free((void **)&tmpelem);
if (DB_NOTFOUND != rc) {
- slapi_log_error(SLAPI_LOG_BACKLDBM, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ENTRYRDN_TAG,
"_entryrdn_index_read: Child link \"%s\"
of "
"key \"%s\" not found: %s(%d)\n",
childnrdn, keybuf, dblayer_strerror(rc), rc);
@@ -3374,7 +3377,7 @@ _entryrdn_index_read(backend *be,
}
*elem = tmpelem;
#ifdef LDAP_DEBUG_ENTRYRDN
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_index_read: %s matched normalized child "
"rdn %s\n", (*elem)->rdn_elem_nrdn_rdn, childnrdn);
#endif
@@ -3382,7 +3385,7 @@ _entryrdn_index_read(backend *be,
nrdn = childnrdn;
if (0 == id) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_index_read: Child %s of %s not found\n",
childnrdn, nrdn);
break;
@@ -3409,7 +3412,7 @@ _entryrdn_index_read(backend *be,
retry_get0:
rc = cursor->c_get(cursor, &key, &data, DB_SET|DB_MULTIPLE);
if (DB_LOCK_DEADLOCK == rc) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
"_entryrdn_index_read: cursor get deadlock\n");
if (db_txn) {
goto bail;
@@ -3454,7 +3457,7 @@ retry_get0:
retry_get1:
rc = cursor->c_get(cursor, &key, &data, DB_NEXT_DUP|DB_MULTIPLE);
if (DB_LOCK_DEADLOCK == rc) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_index_read: retry cursor get
deadlock\n");
if (db_txn) {
@@ -3479,7 +3482,7 @@ bail:
slapi_ch_free((void **)childelems);
}
slapi_ch_free_string(&keybuf);
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
"<-- _entryrdn_index_read\n");
return rc;
}
@@ -3513,7 +3516,7 @@ retry_get0:
rc = cursor->c_get(cursor, &key, &data, DB_SET|DB_MULTIPLE);
if (rc) {
if (DB_LOCK_DEADLOCK == rc) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
"_entryrdn_append_childidl: cursor get
deadlock\n");
if (db_txn) {
goto bail;
@@ -3548,7 +3551,7 @@ retry_get0:
myid = id_stored_to_internal(myelem->rdn_elem_id);
rc = idl_append_extend(affectedidl, myid);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"_entryrdn_append_childidl: Appending %d to "
"affectedidl failed (%d)\n", myid, rc);
goto bail;
@@ -3564,7 +3567,7 @@ retry_get1:
rc = cursor->c_get(cursor, &key, &data, DB_NEXT_DUP|DB_MULTIPLE);
if (rc) {
if (DB_LOCK_DEADLOCK == rc) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_TAG,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc),
ENTRYRDN_TAG,
"_entryrdn_append_childidl: retry cursor get
deadlock\n");
if (db_txn) {
goto bail;
@@ -3592,12 +3595,12 @@ _entryrdn_cursor_print_error(char *fn, void *key,
size_t need, size_t actual, int rc)
{
if (DB_BUFFER_SMALL == rc) {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"%s: Entryrdn index is corrupt; data item for key %s "
"is too large for the buffer need=%lu actual=%lu)\n",
fn, (char *)key, (long unsigned int)need, (long unsigned
int)actual);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
"%s: Failed to position cursor at "
"the key: %s: %s(%d)\n",
fn, (char *)key, dblayer_strerror(rc), rc);
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_index_config.c
b/ldap/servers/slapd/back-ldbm/ldbm_index_config.c
index 5d7aa2a..532a190 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_index_config.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_index_config.c
@@ -388,7 +388,7 @@ int ldbm_instance_create_default_user_indexes(ldbm_instance *inst)
basedn = slapi_create_dn_string("cn=default
indexes,cn=config,cn=%s,cn=plugins,cn=config",
li->li_plugin->plg_name);
if (NULL == basedn) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_instance_create_default_user_indexes: "
"failed create default index dn for plugin %s\n",
inst->inst_li->li_plugin->plg_name);
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c
b/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c
index cd7e820..30ae832 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c
@@ -110,7 +110,7 @@ ldbm_instance_config_cachememsize_set(void *arg, void *value, char
*errorbuf, in
delta = val - inst->inst_cache.c_maxsize;
if (!util_is_cachesize_sane(&delta)){
slapi_create_errormsg(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "Error:
cachememsize value is too large.");
- LDAPDebug0Args(LDAP_DEBUG_ANY, "Error: cachememsize value is too
large.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "Error: cachememsize value
is too large.\n");
return LDAP_UNWILLING_TO_PERFORM;
}
}
@@ -152,7 +152,7 @@ ldbm_instance_config_dncachememsize_set(void *arg, void *value, char
*errorbuf,
delta = val - inst->inst_dncache.c_maxsize;
if (!util_is_cachesize_sane(&delta)){
slapi_create_errormsg(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "Error:
dncachememsize value is too large.");
- LDAPDebug0Args(LDAP_DEBUG_ANY,"Error: dncachememsize value is too
large.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,"Error: dncachememsize value
is too large.\n");
return LDAP_UNWILLING_TO_PERFORM;
}
}
@@ -350,7 +350,7 @@ read_instance_index_entries(ldbm_instance *inst)
basedn =
slapi_create_dn_string("cn=index,cn=%s,cn=%s,cn=plugins,cn=config",
inst->inst_name,
inst->inst_li->li_plugin->plg_name);
if (NULL == basedn) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"read_instance_index_entries: "
"failed create index dn for plugin %s, instance %s\n",
inst->inst_li->li_plugin->plg_name, inst->inst_name);
@@ -394,7 +394,7 @@ read_instance_attrcrypt_entries(ldbm_instance *inst)
basedn = slapi_create_dn_string("cn=encrypted
attributes,cn=%s,cn=%s,cn=plugins,cn=config",
inst->inst_name,
inst->inst_li->li_plugin->plg_name);
if (NULL == basedn) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"read_instance_attrcrypt_entries: "
"failed create encrypted attributes dn for plugin %s, "
"instance %s\n",
@@ -511,7 +511,7 @@ ldbm_instance_config_load_dse_info(ldbm_instance *inst)
dn = slapi_create_dn_string("cn=%s,cn=%s,cn=plugins,cn=config",
inst->inst_name, li->li_plugin->plg_name);
if (NULL == dn) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_instance_config_load_dse_info: "
"failed create instance dn %s for plugin %s\n",
inst->inst_name, inst->inst_li->li_plugin->plg_name);
@@ -591,7 +591,7 @@ ldbm_instance_config_load_dse_info(ldbm_instance *inst)
dn = slapi_create_dn_string("cn=monitor,cn=%s,cn=%s,cn=plugins,cn=config",
inst->inst_name, li->li_plugin->plg_name);
if (NULL == dn) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_instance_config_load_dse_info: "
"failed create monitor instance dn for plugin %s, "
"instance %s\n",
@@ -616,7 +616,7 @@ ldbm_instance_config_load_dse_info(ldbm_instance *inst)
dn = slapi_create_dn_string("cn=index,cn=%s,cn=%s,cn=plugins,cn=config",
inst->inst_name, li->li_plugin->plg_name);
if (NULL == dn) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_instance_config_load_dse_info: "
"failed create index instance dn for plugin %s, "
"instance %s\n",
@@ -639,7 +639,7 @@ ldbm_instance_config_load_dse_info(ldbm_instance *inst)
dn = slapi_create_dn_string("cn=encrypted
attributes,cn=%s,cn=%s,cn=plugins,cn=config",
inst->inst_name, li->li_plugin->plg_name);
if (NULL == dn) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_instance_config_load_dse_info: "
"failed create encrypted attribute instance dn "
"for plugin %s, instance %s\n",
@@ -992,7 +992,7 @@ static void ldbm_instance_unregister_callbacks(ldbm_instance *inst)
dn = slapi_create_dn_string("cn=%s,cn=%s,cn=plugins,cn=config",
inst->inst_name, li->li_plugin->plg_name);
if (NULL == dn) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_instance_unregister_callbacks: "
"failed create instance dn for plugin %s, "
"instance %s\n",
@@ -1017,7 +1017,7 @@ static void ldbm_instance_unregister_callbacks(ldbm_instance *inst)
dn = slapi_create_dn_string("cn=monitor,cn=%s,cn=%s,cn=plugins,cn=config",
inst->inst_name, li->li_plugin->plg_name);
if (NULL == dn) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_instance_unregister_callbacks: "
"failed create monitor instance dn for plugin %s, "
"instance %s\n",
@@ -1036,7 +1036,7 @@ static void ldbm_instance_unregister_callbacks(ldbm_instance *inst)
dn = slapi_create_dn_string("cn=index,cn=%s,cn=%s,cn=plugins,cn=config",
inst->inst_name, li->li_plugin->plg_name);
if (NULL == dn) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_instance_unregister_callbacks: "
"failed create index dn for plugin %s, "
"instance %s\n",
@@ -1058,7 +1058,7 @@ static void ldbm_instance_unregister_callbacks(ldbm_instance *inst)
dn = slapi_create_dn_string("cn=encrypted
attributes,cn=%s,cn=%s,cn=plugins,cn=config",
inst->inst_name, li->li_plugin->plg_name);
if (NULL == dn) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_instance_unregister_callbacks: "
"failed create encrypted attributes dn for plugin %s, "
"instance %s\n",
@@ -1156,7 +1156,7 @@ ldbm_instance_post_delete_instance_entry_callback(Slapi_PBlock *pb,
Slapi_Entry*
}
PR_ASSERT(rc == 0);
if (rc != 0) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_instance_post_delete_instance_entry_callback:"
" failed to delete %s\n", dbp);
}
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modify.c
b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
index 1398797..ff8b255 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modify.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
@@ -431,7 +431,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
if (inst && inst->inst_ref_count) {
slapi_counter_increment(inst->inst_ref_count);
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_modify: instance \"%s\" does not exist.\n",
inst ? inst->inst_name : "null instance");
goto error_return;
@@ -519,7 +519,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
ruv_c_init = 0;
}
- LDAPDebug0Args(LDAP_DEBUG_BACKLDBM,
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"Modify Retrying Transaction\n");
#ifndef LDBM_NO_BACKOFF_DELAY
{
@@ -568,7 +568,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
{
ldap_result_code = LDAP_UNWILLING_TO_PERFORM;
ldap_result_message = "Operation not allowed on tombstone
entry.";
- slapi_log_error(SLAPI_LOG_FATAL, "ldbm_back_modify",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldbm_back_modify",
"Attempt to modify a tombstone entry %s\n",
slapi_sdn_get_dn(slapi_entry_get_sdn_const( e->ep_entry )));
goto error_return;
@@ -617,7 +617,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
slapi_pblock_get(pb, SLAPI_PLUGIN_OPRETURN, &opreturn);
if (!ldap_result_code) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "ldbm_back_modify: SLAPI_PLUGIN_BE_PRE_MODIFY_FN
"
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_back_modify:
SLAPI_PLUGIN_BE_PRE_MODIFY_FN "
"returned error but did not set SLAPI_RESULT_CODE\n");
ldap_result_code = LDAP_OPERATIONS_ERROR;
}
@@ -659,7 +659,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
/* call the transaction pre modify plugins just after creating the transaction */
retval = plugin_call_plugins(pb, SLAPI_PLUGIN_BE_TXN_PRE_MODIFY_FN);
if (retval) {
- LDAPDebug1Arg( LDAP_DEBUG_TRACE, "SLAPI_PLUGIN_BE_TXN_PRE_MODIFY_FN plugin
"
+ LDAPDebug1Arg( LDAP_DEBUG_TRACE, LOG_DEBUG, "SLAPI_PLUGIN_BE_TXN_PRE_MODIFY_FN
plugin "
"returned error code %d\n", retval );
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
slapi_pblock_get(pb, SLAPI_PLUGIN_OPRETURN, &opreturn);
@@ -683,7 +683,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
slapi_mods_init_byref(&smods,mods);
new_mod_count = slapi_mods_get_num_mods(&smods);
if (new_mod_count < mod_count) {
- LDAPDebug2Args( LDAP_DEBUG_ANY, "Error: BE_TXN_PRE_MODIFY plugin has removed
"
+ LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR, "Error: BE_TXN_PRE_MODIFY plugin has
removed "
"mods from the original list - mod count was [%d] now [%d] "
"mods will not be applied - mods list changes must be done "
"in the BE_PRE_MODIFY plugin, not the BE_TXN_PRE_MODIFY\n",
@@ -830,7 +830,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
/* call the transaction post modify plugins just before the commit */
if ((retval = plugin_call_plugins(pb, SLAPI_PLUGIN_BE_TXN_POST_MODIFY_FN))) {
- LDAPDebug1Arg( LDAP_DEBUG_TRACE, "SLAPI_PLUGIN_BE_TXN_POST_MODIFY_FN plugin
"
+ LDAPDebug1Arg( LDAP_DEBUG_TRACE, LOG_DEBUG, "SLAPI_PLUGIN_BE_TXN_POST_MODIFY_FN
plugin "
"returned error code %d\n", retval );
if (!ldap_result_code) {
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
@@ -895,7 +895,7 @@ error_return:
keep track of a counter (usn, dna) may want to "rollback" the counter
in this case */
if ((retval = plugin_call_plugins(pb, SLAPI_PLUGIN_BE_TXN_POST_MODIFY_FN))) {
- LDAPDebug1Arg( LDAP_DEBUG_TRACE, "SLAPI_PLUGIN_BE_TXN_POST_MODIFY_FN plugin
"
+ LDAPDebug1Arg( LDAP_DEBUG_TRACE, LOG_DEBUG, "SLAPI_PLUGIN_BE_TXN_POST_MODIFY_FN
plugin "
"returned error code %d\n", retval );
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
slapi_pblock_get(pb, SLAPI_PB_RESULT_TEXT, &ldap_result_message);
@@ -922,7 +922,7 @@ error_return:
/* if ec was in cache, e was not - add back e */
if (e) {
if (CACHE_ADD( &inst->inst_cache, e, NULL ) < 0) {
- LDAPDebug1Arg(LDAP_DEBUG_CACHE, "ldbm_modify: CACHE_ADD %s failed\n",
+ LDAPDebug1Arg(LDAP_DEBUG_CACHE, LOG_DEBUG, "ldbm_modify: CACHE_ADD %s
failed\n",
slapi_entry_get_dn(e->ep_entry));
}
}
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
index 413de52..e7058be 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
@@ -142,7 +142,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
if (pb->pb_conn)
{
- slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_modrdn", "enter
conn=%" NSPRIu64 " op=%d\n",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "ldbm_back_modrdn",
"enter conn=%" NSPRIu64 " op=%d\n",
pb->pb_conn->c_connid, operation->o_opid);
}
@@ -188,7 +188,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
if (inst && inst->inst_ref_count) {
slapi_counter_increment(inst->inst_ref_count);
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_modrdn: instance \"%s\" does not
exist.\n",
inst ? inst->inst_name : "null instance");
return( -1 );
@@ -267,7 +267,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
CACHE_RETURN(&inst->inst_cache, &ec);
if (!cache_is_in_cache(&inst->inst_cache, e)) {
if (CACHE_ADD(&inst->inst_cache, e, NULL) < 0) {
- LDAPDebug1Arg(LDAP_DEBUG_CACHE,
+ LDAPDebug1Arg(LDAP_DEBUG_CACHE, LOG_DEBUG,
"ldbm_back_modrdn: CACHE_ADD %s to cache
failed\n",
slapi_entry_get_dn_const(e->ep_entry));
}
@@ -287,7 +287,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
/* allow modrdn even if the src dn and dest dn are identical */
if ( 0 != slapi_sdn_compare((const Slapi_DN *)&dn_newdn,
(const Slapi_DN *)sdn) ) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_back_modrdn: adding %s to cache
failed\n",
slapi_entry_get_dn_const(ec->ep_entry));
ldap_result_code = LDAP_OPERATIONS_ERROR;
@@ -312,7 +312,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
ruv_c_init = 0;
}
/* We're re-trying */
- LDAPDebug0Args(LDAP_DEBUG_BACKLDBM,
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"Modrdn Retrying Transaction\n");
#ifndef LDBM_NO_BACKOFF_DELAY
{
@@ -485,7 +485,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
!is_resurect_operation) {
ldap_result_code = LDAP_UNWILLING_TO_PERFORM;
ldap_result_message = "Operation not allowed on tombstone
entry.";
- slapi_log_error(SLAPI_LOG_FATAL, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldbm_back_modrdn",
"Attempt to rename a tombstone entry %s\n",
slapi_sdn_get_dn(slapi_entry_get_sdn_const(
e->ep_entry )));
goto error_return;
@@ -680,7 +680,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
}
if(is_resurect_operation) {
- slapi_log_error(SLAPI_LOG_REPL, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "ldbm_back_modrdn",
"Resurrecting an entry %s\n",
slapi_entry_get_dn(ec->ep_entry));
slapi_entry_attr_delete(ec->ep_entry,
SLAPI_ATTR_VALUE_PARENT_UNIQUEID);
slapi_entry_attr_delete(ec->ep_entry, SLAPI_ATTR_TOMBSTONE_CSN);
@@ -740,7 +740,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
/* JCMREPL - Hmm... we can't permit this to happen...? */
ldap_result_code= LDAP_ALREADY_EXISTS;
if (is_resurect_operation) {
- slapi_log_error(SLAPI_LOG_CACHE, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG,
"ldbm_back_modrdn",
"conn=%lu op=%d cache_add_tentative failed:
%s\n",
conn_id, op_id,
slapi_entry_get_dn(ec->ep_entry));
}
@@ -880,7 +880,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
if (parententry) {
retval = parent_update_on_childchange(&parent_modify_context,
PARENTUPDATE_DEL, NULL);
- slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG,
"ldbm_back_modrdn",
"conn=%lu op=%d parent_update_on_childchange:
old_entry=0x%p, new_entry=0x%p, rc=%d\n",
conn_id, op_id, parent_modify_context.old_entry,
parent_modify_context.new_entry, retval);
@@ -892,7 +892,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
if (newparententry) {
retval = parent_update_on_childchange(&newparent_modify_context,
PARENTUPDATE_ADD, NULL);
- slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG,
"ldbm_back_modrdn",
"conn=%lu op=%d parent_update_on_childchange:
old_entry=0x%p, new_entry=0x%p, rc=%d\n",
conn_id, op_id, parent_modify_context.old_entry,
parent_modify_context.new_entry, retval);
/* The newparent modify context now contains info needed later */
@@ -905,7 +905,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
if (is_resurect_operation && parententry) {
retval = parent_update_on_childchange(&parent_modify_context,
PARENTUPDATE_RESURECT, NULL);
if (retval) {
- slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG,
"ldbm_back_modrdn",
"conn=%lu op=%d parent_update_on_childchange
parent %s of %s failed, rc=%d\n",
conn_id, op_id,
slapi_entry_get_dn_const(parent_modify_context.old_entry->ep_entry),
@@ -943,7 +943,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
slapi_entry_get_dn_const(parent_modify_context.old_entry->ep_entry),
slapi_entry_get_dn_const(e->ep_entry), sub_count);
#endif
- slapi_log_error(SLAPI_LOG_BACKLDBM,
"ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG,
"ldbm_back_modrdn",
"%s has children\n",
slapi_entry_get_dn(e->ep_entry));
}
children = moddn_get_children(&txn, pb, be, e, sdn,
@@ -959,7 +959,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
/* JCMREPL - But, the replication client has total rights over its
subtree, so no access check needed. */
/* JCM - A subtree move could break ACIs, static groups, and dynamic
groups. */
} else if (is_resurect_operation) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldbm_back_modrdn",
"%s has NO children\n",
slapi_entry_get_dn(e->ep_entry));
}
@@ -986,7 +986,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
/* call the transaction pre modrdn plugins just after creating the transaction
*/
retval = plugin_call_plugins(pb, SLAPI_PLUGIN_BE_TXN_PRE_MODRDN_FN);
if (retval) {
- LDAPDebug1Arg( LDAP_DEBUG_TRACE, "SLAPI_PLUGIN_BE_TXN_PRE_MODRDN_FN
plugin "
+ LDAPDebug1Arg( LDAP_DEBUG_TRACE, LOG_DEBUG,
"SLAPI_PLUGIN_BE_TXN_PRE_MODRDN_FN plugin "
"returned error code %d\n", retval );
if (SLAPI_PLUGIN_NOOP == retval) {
not_an_error = 1;
@@ -1095,7 +1095,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
else /* retval == 0 */
{
retval = modify_update_all(be, pb, &newparent_modify_context,
&txn);
- slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG,
"ldbm_back_modrdn",
"conn=%lu op=%d modify_update_all: old_entry=0x%p,
new_entry=0x%p, rc=%d\n",
conn_id, op_id, parent_modify_context.old_entry,
parent_modify_context.new_entry, retval);
if (DB_LOCK_DEADLOCK == retval)
@@ -1147,7 +1147,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
if (retval == DB_RUNRECOVERY || LDBM_OS_ERR_IS_DISKFULL(retval))
disk_full = 1;
MOD_SET_ERROR(ldap_result_code, LDAP_OPERATIONS_ERROR, retry_count);
- slapi_log_error(SLAPI_LOG_FATAL, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldbm_back_modrdn",
"entryrdn_rename_subtree failed (%d); dn: %s,
newsrdn: %s, dn_newsuperiordn: %s\n",
retval, slapi_sdn_get_dn(sdn),
slapi_rdn_get_rdn(&newsrdn),
slapi_sdn_get_dn(dn_newsuperiordn));
@@ -1226,7 +1226,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
if(newparententry!=NULL)
{
myrc = modify_switch_entries( &newparent_modify_context,be);
- slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_modrdn",
"conn=%lu op=%d modify_switch_entries: old_entry=0x%p,
new_entry=0x%p, rc=%d\n",
conn_id, op_id, parent_modify_context.old_entry,
parent_modify_context.new_entry, myrc);
}
@@ -1234,13 +1234,13 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_ENTRY_POST_OP, postentry );
/* call the transaction post modrdn plugins just before the commit */
if ((retval = plugin_call_plugins(pb, SLAPI_PLUGIN_BE_TXN_POST_MODRDN_FN))) {
- LDAPDebug1Arg( LDAP_DEBUG_TRACE, "SLAPI_PLUGIN_BE_TXN_POST_MODRDN_FN plugin
"
+ LDAPDebug1Arg( LDAP_DEBUG_TRACE, LOG_DEBUG,
"SLAPI_PLUGIN_BE_TXN_POST_MODRDN_FN plugin "
"returned error code %d\n", retval );
if (!ldap_result_code) {
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
}
if (!ldap_result_code) {
- LDAPDebug0Args( LDAP_DEBUG_ANY, "SLAPI_PLUGIN_BE_TXN_POST_MODRDN_FN
plugin "
+ LDAPDebug0Args( LDAP_DEBUG_ANY, LOG_ERR,
"SLAPI_PLUGIN_BE_TXN_POST_MODRDN_FN plugin "
"returned error but did not set
SLAPI_RESULT_CODE\n" );
ldap_result_code = LDAP_OPERATIONS_ERROR;
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &ldap_result_code);
@@ -1280,7 +1280,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
*/
for (i = 0; child_entries[i] != NULL; i++) {
if (is_resurect_operation) {
- slapi_log_error(SLAPI_LOG_CACHE, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG,
"ldbm_back_modrdn",
"Calling cache remove & return %s
(refcnt: %d)\n",
slapi_entry_get_dn(child_entries[i]->ep_entry),
child_entries[i]->ep_refcnt);
@@ -1391,7 +1391,7 @@ error_return:
}
/* call the transaction post modrdn plugins just before the abort */
if ((retval = plugin_call_plugins(pb, SLAPI_PLUGIN_BE_TXN_POST_MODRDN_FN)))
{
- LDAPDebug1Arg( LDAP_DEBUG_TRACE, "SLAPI_PLUGIN_BE_TXN_POST_MODRDN_FN
plugin "
+ LDAPDebug1Arg( LDAP_DEBUG_TRACE, LOG_DEBUG,
"SLAPI_PLUGIN_BE_TXN_POST_MODRDN_FN plugin "
"returned error code %d\n", retval );
if (!ldap_result_code) {
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
@@ -1427,7 +1427,7 @@ common_return:
/* Free up the resource we don't need any more */
if (ec) {
if (is_resurect_operation) {
- slapi_log_error(SLAPI_LOG_REPL, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "ldbm_back_modrdn",
"Resurrecting an entry %s: result: %d, %d\n",
slapi_entry_get_dn(ec->ep_entry), ldap_result_code,
retval);
}
@@ -1443,7 +1443,7 @@ common_return:
if (bdn) {
CACHE_ADD( &inst->inst_dncache, bdn, NULL );
CACHE_RETURN(&inst->inst_dncache, &bdn);
- slapi_log_error(SLAPI_LOG_CACHE, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG,
"ldbm_back_modrdn",
"set %s to dn cache\n",
slapi_sdn_get_dn(sdn));
}
}
@@ -1503,13 +1503,13 @@ common_return:
slapi_sdn_done(&dn_newdn);
slapi_sdn_done(&dn_newrdn);
slapi_sdn_done(&dn_parentdn);
- slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_modrdn",
"conn=%lu op=%d modify_term: old_entry=0x%p,
new_entry=0x%p\n",
conn_id, op_id, parent_modify_context.old_entry,
parent_modify_context.new_entry);
myrc = modify_term(&parent_modify_context,be);
- slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_modrdn",
"conn=%lu op=%d modify_term: rc=%d\n", conn_id, op_id,
myrc);
- slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_modrdn",
"conn=%lu op=%d modify_term: old_entry=0x%p,
new_entry=0x%p\n",
conn_id, op_id, newparent_modify_context.old_entry,
newparent_modify_context.new_entry);
myrc = modify_term(&newparent_modify_context,be);
@@ -1534,7 +1534,7 @@ common_return:
}
if (pb->pb_conn)
{
- slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_modrdn", "leave
conn=%" NSPRIu64 " op=%d\n",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "ldbm_back_modrdn",
"leave conn=%" NSPRIu64 " op=%d\n",
pb->pb_conn->c_connid, operation->o_opid);
}
return retval;
@@ -1824,7 +1824,7 @@ modrdn_rename_entry_update_indexes(back_txn *ptxn, Slapi_PBlock *pb,
struct ldbm
if (DB_LOCK_DEADLOCK == retval)
{
/* Retry txn */
- LDAPDebug0Args( LDAP_DEBUG_BACKLDBM, "modrdn_rename_entry_update_indexes:
id2entry_add deadlock\n" );
+ LDAPDebug0Args( LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"modrdn_rename_entry_update_indexes: id2entry_add deadlock\n" );
goto error_return;
}
if (retval != 0)
@@ -1841,7 +1841,7 @@ modrdn_rename_entry_update_indexes(back_txn *ptxn, Slapi_PBlock *pb,
struct ldbm
if (DB_LOCK_DEADLOCK == retval)
{
/* Retry txn */
- LDAPDebug0Args( LDAP_DEBUG_BACKLDBM,
"modrdn_rename_entry_update_indexes: index_add_mods1 deadlock\n" );
+ LDAPDebug0Args( LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"modrdn_rename_entry_update_indexes: index_add_mods1 deadlock\n" );
goto error_return;
}
if (retval != 0)
@@ -1865,7 +1865,7 @@ modrdn_rename_entry_update_indexes(back_txn *ptxn, Slapi_PBlock *pb,
struct ldbm
if (DB_LOCK_DEADLOCK == retval)
{
/* Retry txn */
- LDAPDebug0Args( LDAP_DEBUG_BACKLDBM,
"modrdn_rename_entry_update_indexes: index_add_mods2 deadlock\n" );
+ LDAPDebug0Args( LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"modrdn_rename_entry_update_indexes: index_add_mods2 deadlock\n" );
goto error_return;
}
if (retval != 0)
@@ -1883,7 +1883,7 @@ modrdn_rename_entry_update_indexes(back_txn *ptxn, Slapi_PBlock *pb,
struct ldbm
if (DB_LOCK_DEADLOCK == retval)
{
/* Retry txn */
- LDAPDebug0Args( LDAP_DEBUG_BACKLDBM,
"modrdn_rename_entry_update_indexes: index_add_mods3 deadlock\n" );
+ LDAPDebug0Args( LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"modrdn_rename_entry_update_indexes: index_add_mods3 deadlock\n" );
goto error_return;
}
if (retval != 0)
@@ -1903,7 +1903,7 @@ modrdn_rename_entry_update_indexes(back_txn *ptxn, Slapi_PBlock *pb,
struct ldbm
if (DB_LOCK_DEADLOCK == retval)
{
/* Abort and re-try */
- LDAPDebug0Args( LDAP_DEBUG_BACKLDBM,
"modrdn_rename_entry_update_indexes: vlv_update_all_indexes deadlock\n" );
+ LDAPDebug0Args( LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"modrdn_rename_entry_update_indexes: vlv_update_all_indexes deadlock\n" );
goto error_return;
}
if (retval != 0)
@@ -1913,7 +1913,7 @@ modrdn_rename_entry_update_indexes(back_txn *ptxn, Slapi_PBlock *pb,
struct ldbm
}
}
if (cache_replace( &inst->inst_cache, e, *ec ) != 0 ) {
- LDAPDebug2Args(LDAP_DEBUG_CACHE,
+ LDAPDebug2Args(LDAP_DEBUG_CACHE, LOG_DEBUG,
"modrdn_rename_entry_update_indexes cache_replace %s -> %s
failed\n",
slapi_entry_get_dn(e->ep_entry),
slapi_entry_get_dn((*ec)->ep_entry));
retval= -1;
@@ -2155,7 +2155,7 @@ moddn_get_children(back_txn *ptxn,
slapi_entry_get_sdn_const(parententry->ep_entry),
parententry->ep_id, &candidates, ptxn,
is_resurect_operation);
if (err) {
- LDAPDebug1Arg( LDAP_DEBUG_ANY, "moddn_get_children: "
+ LDAPDebug1Arg( LDAP_DEBUG_ANY, LOG_ERR, "moddn_get_children: "
"entryrdn_get_subordinates returned %d\n", err);
goto bail;
}
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_search.c
b/ldap/servers/slapd/back-ldbm/ldbm_search.c
index 3a1eecc..d4c88b3 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_search.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_search.c
@@ -365,7 +365,7 @@ ldbm_back_search( Slapi_PBlock *pb )
if (inst && inst->inst_ref_count) {
slapi_counter_increment(inst->inst_ref_count);
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_search: instance \"%s\" does not
exist.\n",
inst ? inst->inst_name : "null instance");
return( -1 );
@@ -954,7 +954,7 @@ vlv_bail:
rc = slapi_filter_apply(sr->sr_norm_filter, ldbm_search_compile_filter,
NULL, &filt_errs);
if (rc != SLAPI_FILTER_SCAN_NOMORE) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: could not pre-compile the search filter - error
%d %d\n",
rc, filt_errs);
if (rc == SLAPI_FILTER_SCAN_ERROR) {
@@ -1853,13 +1853,13 @@ ldbm_back_prev_search_results( Slapi_PBlock *pb )
slapi_pblock_get( pb, SLAPI_BACKEND, &be );
if (!be) {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_back_prev_search_results: no backend\n");
return;
}
inst = (ldbm_instance *) be->be_instance_info;
if (!inst) {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_back_prev_search_results: no backend
instance\n");
return;
}
@@ -1867,7 +1867,7 @@ ldbm_back_prev_search_results( Slapi_PBlock *pb )
if (sr) {
if (sr->sr_entry) {
/* The last entry should be returned to cache */
- LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM,
+ LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"ldbm_back_prev_search_results: returning: %s\n",
slapi_entry_get_dn_const(sr->sr_entry->ep_entry));
CACHE_RETURN (&inst->inst_cache, &(sr->sr_entry));
@@ -1913,7 +1913,7 @@ delete_search_result_set( Slapi_PBlock *pb, back_search_result_set
**sr )
rc = slapi_filter_apply((*sr)->sr_norm_filter, ldbm_search_free_compiled_filter,
NULL, &filt_errs);
if (rc != SLAPI_FILTER_SCAN_NOMORE) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: could not free the pre-compiled regexes in the search
filter - error %d %d\n",
rc, filt_errs);
}
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_usn.c
b/ldap/servers/slapd/back-ldbm/ldbm_usn.c
index 639990b..eab4ba8 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_usn.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_usn.c
@@ -53,7 +53,7 @@ ldbm_usn_init(struct ldbminfo *li)
be = slapi_mapping_tree_find_backend_for_sdn(sdn);
rc = usn_get_last_usn(be, &last_usn);
if (0 == rc) { /* only when the last usn is available */
- slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_usn_init",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_usn_init",
"backend: %s%s\n", be->be_name,
isglobal?" (global mode)":"");
if (isglobal) {
@@ -114,7 +114,7 @@ usn_get_last_usn(Slapi_Backend *be, PRUint64 *last_usn)
rc = dblayer_get_index_file(be, ai, &db, DBOPEN_CREATE);
if (0 != rc) {
/* entryusn.db# is missing; it would be the first time. */
- slapi_log_error(SLAPI_LOG_FATAL, "usn_get_last_usn",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "usn_get_last_usn",
"WARNING: failed to open the entryusn index: %d; "
"Creating it...\n", rc);
goto bail;
@@ -123,7 +123,7 @@ usn_get_last_usn(Slapi_Backend *be, PRUint64 *last_usn)
/* Get a cursor */
rc = db->cursor(db, NULL, &dbc, 0);
if (0 != rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "usn_get_last_usn",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "usn_get_last_usn",
"failed to create a cursor: %d", rc);
goto bail;
}
@@ -182,7 +182,7 @@ ldbm_set_last_usn(Slapi_Backend *be)
int rc = -1;
if (NULL == be) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldbm_set_last_usn",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldbm_set_last_usn",
"Empty backend\n");
return rc;
}
@@ -193,7 +193,7 @@ ldbm_set_last_usn(Slapi_Backend *be)
slapi_counter_destroy(&(li->li_global_usn_counter));
ldbm_usn_init(li);
} else {
- slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_set_last_usn",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_set_last_usn",
"backend: %s\n", be->be_name);
rc = usn_get_last_usn(be, &last_usn);
if (0 == rc) { /* only when the last usn is available */
diff --git a/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
b/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
index 855277e..109af67 100644
--- a/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
+++ b/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
@@ -250,7 +250,7 @@ add_op_attrs(Slapi_PBlock *pb, struct ldbminfo *li, struct backentry
*ep,
}
if (err) {
if (DB_NOTFOUND != err && 1 != err) {
- LDAPDebug1Arg( LDAP_DEBUG_ANY, "database error %d\n", err
);
+ LDAPDebug1Arg( LDAP_DEBUG_ANY, LOG_ERR, "database error
%d\n", err );
slapi_ch_free_string( &pdn );
return( -1 );
}
@@ -270,7 +270,7 @@ add_op_attrs(Slapi_PBlock *pb, struct ldbminfo *li, struct backentry
*ep,
} else {
/* empty idl */
if ( 0 != err && DB_NOTFOUND != err ) {
- LDAPDebug1Arg( LDAP_DEBUG_ANY, "database error %d\n", err
);
+ LDAPDebug1Arg( LDAP_DEBUG_ANY, LOG_ERR, "database error
%d\n", err );
slapi_ch_free_string( &pdn );
return( -1 );
}
@@ -692,7 +692,7 @@ int ldbm_back_ldif2ldbm( Slapi_PBlock *pb )
if ((task_flags & SLAPI_TASK_RUNNING_FROM_COMMANDLINE)) {
if (dblayer_import_file_init(inst)) {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_back_ldif2ldbm: failed to write import file\n");
return -1;
}
@@ -723,7 +723,7 @@ int ldbm_back_ldif2ldbm( Slapi_PBlock *pb )
ret = dblayer_start(li,
DBLAYER_NORMAL_MODE|DBLAYER_NO_DBTHREADS_MODE);
if (ret) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_back_ldif2ldbm: dblayer_start failed! %s (%d)\n",
dblayer_strerror(ret), ret);
goto fail;
@@ -732,7 +732,7 @@ int ldbm_back_ldif2ldbm( Slapi_PBlock *pb )
ldbm_usn_init(li);
ret = dblayer_close(li, DBLAYER_NORMAL_MODE);
if (ret != 0) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_back_ldif2ldbm: dblayer_close failed! %s (%d)\n",
dblayer_strerror(ret), ret);
}
@@ -872,13 +872,13 @@ static IDList *ldbm_fetch_subtrees(backend *be, char **include, int
*err)
*err = entryrdn_index_read(be, &sdn, &id, NULL);
if (*err) {
if (DB_NOTFOUND == *err) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"info: entryrdn not indexed on '%s'; "
"entry %s may not be added to the database yet.\n",
include[i], include[i]);
*err = 0; /* not a problem */
} else {
- LDAPDebug2Args( LDAP_DEBUG_ANY,
+ LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR,
"Reading %s failed on entryrdn; %d\n",
include[i], *err );
}
@@ -891,13 +891,13 @@ static IDList *ldbm_fetch_subtrees(backend *be, char **include, int
*err)
idl = index_read(be, LDBM_ENTRYDN_STR, indextype_EQUALITY, &bv, txn,
err);
if (idl == NULL) {
if (DB_NOTFOUND == *err) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"info: entrydn not indexed on '%s'; "
"entry %s may not be added to the database yet.\n",
include[i], include[i]);
*err = 0; /* not a problem */
} else {
- LDAPDebug2Args( LDAP_DEBUG_ANY,
+ LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR,
"Reading %s failed on entrydn; %d\n",
include[i], *err );
}
@@ -919,7 +919,7 @@ static IDList *ldbm_fetch_subtrees(backend *be, char **include, int
*err)
slapi_sdn_done(&sdn);
if (idl == NULL) {
if (DB_NOTFOUND == *err) {
- LDAPDebug2Args(LDAP_DEBUG_BACKLDBM,
+ LDAPDebug2Args(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"Info: Entry id %lu has no descendants according to %s. "
"Index file created by this reindex will be empty.\n",
id,
entryrdn_get_noancestorid()?"entryrdn":"ancestorid");
@@ -1016,7 +1016,7 @@ export_one_entry(struct ldbminfo *li,
rc = slapi_entry_attr_replace(expargs->ep->ep_entry,
"userpassword", vals);
if (rc) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"%s: Failed to add clear password storage scheme:
%d\n",
slapi_sdn_get_dn(&expargs->ep->ep_entry->e_sdn),
rc);
}
@@ -1182,13 +1182,13 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
} else {
slapi_pblock_get(pb, SLAPI_BACKEND, &be);
if (!be) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "No backend\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "No backend\n");
return_value = -1;
goto bye;
}
inst = (ldbm_instance *)be->be_instance_info;
if (!inst) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "Unknown ldbm instance\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "Unknown ldbm
instance\n");
return_value = -1;
goto bye;
}
@@ -1311,7 +1311,7 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
/* get a cursor to we can walk over the table */
return_value = db->cursor(db,NULL,&dbc,0);
if (0 != return_value || NULL == dbc) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"Failed to get cursor for db2ldif; %s (%d)\n",
dblayer_strerror(return_value), return_value);
return_value = -1;
@@ -1336,13 +1336,13 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
if (NULL == idl) {
if (err) {
/* most likely, indexes are bad. */
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"Failed to fetch subtree lists (error %d) %s\n",
err, dblayer_strerror(err));
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"Possibly the entrydn/entryrdn or ancestorid index is "
"corrupted or does not exist.\n");
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"Attempting direct unindexed export instead.\n");
}
ok_index = 0;
@@ -1508,7 +1508,7 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
if (rc) {
/* We cannot use the entryrdn index;
* Compose dn from the entries in id2entry */
- LDAPDebug2Args(LDAP_DEBUG_TRACE,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"ldbm2ldif: entryrdn is not available; "
"composing dn (rdn: %s, ID: %d)\n",
rdn, temp_id);
@@ -1520,7 +1520,7 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
&psrdn, NULL, 0,
run_from_cmdline, NULL);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm2ldif: Skip ID %d\n",
pid);
slapi_ch_free_string(&rdn);
slapi_rdn_done(&psrdn);
@@ -1531,7 +1531,7 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
/* Generate DN string from Slapi_RDN */
rc = slapi_rdn_get_dn(&psrdn, &pdn);
if (rc) {
- LDAPDebug2Args( LDAP_DEBUG_ANY,
+ LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR,
"ldbm2ldif: Failed to compose dn for "
"(rdn: %s, ID: %d) from Slapi_RDN\n",
rdn, temp_id);
@@ -1554,12 +1554,12 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
myrc = CACHE_ADD( &inst->inst_dncache, bdn, NULL );
if (myrc) {
backdn_free(&bdn);
- slapi_log_error(SLAPI_LOG_CACHE, "ldbm2ldif",
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG,
"ldbm2ldif",
"%s is already in the dn cache
(%d)\n",
dn, myrc);
} else {
CACHE_RETURN(&inst->inst_dncache, &bdn);
- slapi_log_error(SLAPI_LOG_CACHE, "ldbm2ldif",
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG,
"ldbm2ldif",
"entryrdn_lookup_dn returned: %s, "
"and set to dn cache\n", dn);
}
@@ -1576,7 +1576,7 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
if ( (ep->ep_entry) != NULL ) {
ep->ep_id = temp_id;
} else {
- LDAPDebug1Arg( LDAP_DEBUG_ANY, "ldbm_back_ldbm2ldif: skipping "
+ LDAPDebug1Arg( LDAP_DEBUG_ANY, LOG_ERR, "ldbm_back_ldbm2ldif: skipping
"
"badly formatted entry with id %lu\n",
(u_long)temp_id);
backentry_free( &ep );
continue;
@@ -1625,12 +1625,12 @@ bye:
if (we_start_the_backends && NULL != li) {
if (0 != dblayer_flush(li)) {
- LDAPDebug0Args( LDAP_DEBUG_ANY,
+ LDAPDebug0Args( LDAP_DEBUG_ANY, LOG_ERR,
"db2ldif: Failed to flush database\n" );
}
if (0 != dblayer_close(li,DBLAYER_EXPORT_MODE)) {
- LDAPDebug0Args( LDAP_DEBUG_ANY,
+ LDAPDebug0Args( LDAP_DEBUG_ANY, LOG_ERR,
"db2ldif: Failed to close database\n" );
}
}
@@ -1826,7 +1826,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
slapi_task_log_notice(task, "%s: Indexing %s",
inst->inst_name, LDBM_ANCESTORID_STR);
}
- LDAPDebug2Args(LDAP_DEBUG_ANY, "%s: Indexing %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "%s: Indexing
%s\n",
inst->inst_name, LDBM_ANCESTORID_STR);
index_ext |= DB2INDEX_ANCESTORID;
} else if (strcasecmp(attrs[i]+1, LDBM_ENTRYRDN_STR) == 0) {
@@ -1835,7 +1835,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
slapi_task_log_notice(task, "%s: Indexing %s",
inst->inst_name, LDBM_ENTRYRDN_STR);
}
- LDAPDebug2Args(LDAP_DEBUG_ANY, "%s: Indexing %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "%s: Indexing
%s\n",
inst->inst_name, LDBM_ENTRYRDN_STR);
index_ext |= DB2INDEX_ENTRYRDN;
} else {
@@ -1872,7 +1872,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
"%s: Indexing attribute:
%s",
inst->inst_name, attrs[i]+1);
}
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"%s: Indexing attribute: %s\n",
inst->inst_name, attrs[i] + 1);
}
@@ -1886,7 +1886,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
slapi_task_log_notice(task, "%s: Indexing attribute:
%s",
inst->inst_name, attrs[i]+1);
}
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"%s: Indexing attribute: %s\n",
inst->inst_name, attrs[i]+1);
}
@@ -1913,7 +1913,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
slapi_task_log_notice(task, "%s: Indexing VLV: %s",
inst->inst_name, attrs[i]+1);
}
- LDAPDebug2Args(LDAP_DEBUG_ANY, "%s: Indexing VLV: %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "%s: Indexing VLV:
%s\n",
inst->inst_name, attrs[i]+1);
}
break;
@@ -1944,10 +1944,10 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: WARNING: Failed to fetch subtree lists: (%d) %s\n",
inst->inst_name, err, dblayer_strerror(err));
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"%s: Possibly the entrydn/entryrdn or ancestorid index "
"is corrupted or does not exist.\n",
inst->inst_name);
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"%s: Attempting brute-force method instead.\n",
inst->inst_name);
if (task) {
@@ -2093,7 +2093,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
if (rc) {
/* We cannot use the entryrdn index;
* Compose dn from the entries in id2entry */
- LDAPDebug2Args(LDAP_DEBUG_TRACE,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"ldbm2index: entryrdn is not available; "
"composing dn (rdn: %s, ID: %d)\n",
rdn, temp_id);
@@ -2105,13 +2105,13 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
&psrdn, NULL, 0,
run_from_cmdline, NULL);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm2index: Skip ID %d\n", pid);
LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Parent entry (ID %d) of entry. "
"(ID %d, rdn: %s) does not exist.\n",
pid, temp_id, rdn);
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"We recommend to export the backend "
"instance %s and reimport it.\n",
instance_name);
@@ -2124,7 +2124,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
/* Generate DN string from Slapi_RDN */
rc = slapi_rdn_get_dn(&psrdn, &pdn);
if (rc) {
- LDAPDebug2Args( LDAP_DEBUG_ANY,
+ LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR,
"ldbm2ldif: Failed to compose dn for "
"(rdn: %s, ID: %d) from Slapi_RDN\n",
rdn, temp_id);
@@ -2146,12 +2146,12 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
myrc = CACHE_ADD( &inst->inst_dncache, bdn, NULL );
if (myrc) {
backdn_free(&bdn);
- slapi_log_error(SLAPI_LOG_CACHE, "ldbm2index",
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG,
"ldbm2index",
"%s is already in the dn cache
(%d)\n",
dn, myrc);
} else {
CACHE_RETURN(&inst->inst_dncache, &bdn);
- slapi_log_error(SLAPI_LOG_CACHE, "ldbm2index",
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG,
"ldbm2index",
"entryrdn_lookup_dn returned: %s, "
"and set to dn cache\n", dn);
}
@@ -2197,7 +2197,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
if (!run_from_cmdline) {
rc = dblayer_txn_begin(be, NULL, &txn);
if (0 != rc) {
- slapi_log_error(SLAPI_LOG_FATAL,
"ldbm_back_ldbm2index",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"ldbm_back_ldbm2index",
"%s: ERROR: failed to begin txn for update index
'%s' (err %d: %s)\n",
inst->inst_name, SLAPI_ATTR_TOMBSTONE_CSN, rc,
dblayer_strerror(rc));
if (task) {
@@ -2215,7 +2215,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
rc = index_addordel_string(be, SLAPI_ATTR_TOMBSTONE_CSN,
deletion_csn_str,
ep->ep_id, BE_INDEX_ADD, &txn);
if (rc != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldbm_back_ldbm2index",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"ldbm_back_ldbm2index",
"%s: ERROR: failed to update index '%s' (err %d:
%s)\n",
inst->inst_name, SLAPI_ATTR_TOMBSTONE_CSN, rc,
dblayer_strerror(rc));
if (task) {
@@ -2233,7 +2233,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
if (!run_from_cmdline) {
rc = dblayer_txn_commit(be, &txn);
if (0 != rc) {
- slapi_log_error(SLAPI_LOG_FATAL,
"ldbm_back_ldbm2index",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"ldbm_back_ldbm2index",
"%s: ERROR: failed to commit txn for update index
'%s' (err %d: %s)\n",
inst->inst_name, SLAPI_ATTR_TOMBSTONE_CSN, rc,
dblayer_strerror(rc));
if (task) {
@@ -2441,7 +2441,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
if (!run_from_cmdline) {
rc = dblayer_txn_begin(be, NULL, &txn);
if (0 != rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"%s: ERROR: failed to begin txn for update
"
"index 'entryrdn'\n",
inst->inst_name);
@@ -2480,7 +2480,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
if (!run_from_cmdline) {
rc = dblayer_txn_commit(be, &txn);
if (0 != rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"%s: ERROR: failed to commit txn for "
"update index 'entryrdn'\n",
inst->inst_name);
@@ -2741,7 +2741,7 @@ int ldbm_back_upgradedb(Slapi_PBlock *pb)
PRUint32 dbversion_flags = DBVERSION_ALL;
slapi_pblock_get(pb, SLAPI_SEQ_TYPE, &up_flags);
- slapi_log_error(SLAPI_LOG_TRACE, "upgrade DB", "Reindexing
all...\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "upgrade DB", "Reindexing
all...\n");
slapi_pblock_get(pb, SLAPI_TASK_FLAGS, &task_flags);
slapi_pblock_get(pb, SLAPI_BACKEND_TASK, &task);
slapi_pblock_get(pb, SLAPI_DB2LDIF_SERVER_RUNNING, &server_running);
@@ -2765,7 +2765,7 @@ int ldbm_back_upgradedb(Slapi_PBlock *pb)
ldbm_instance *inst = NULL;
/* server is up -- mark all backends busy */
- slapi_log_error(SLAPI_LOG_TRACE, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "upgrade DB",
"server is up -- marking all LDBM backends busy\n");
for (inst_obj = objset_first_obj(li->li_instance_set); inst_obj;
inst_obj = objset_next_obj(li->li_instance_set, inst_obj))
@@ -2776,7 +2776,7 @@ int ldbm_back_upgradedb(Slapi_PBlock *pb)
it should not cleared in this thread [610347] */
if (instance_set_busy(inst) != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
"ldbm: '%s' is already in the middle of "
"another task and cannot be disturbed.\n",
inst->inst_name);
@@ -2810,7 +2810,7 @@ int ldbm_back_upgradedb(Slapi_PBlock *pb)
* DN2RDN option (-r) is given, but subtree-rename is off.
* Print an error and back off.
*/
- slapi_log_error(SLAPI_LOG_FATAL, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
"DN2RDN option (-r) is given, but %s is off in "
"dse.ldif. Please change the value to on.\n",
CONFIG_ENTRYRDN_SWITCH);
@@ -2838,7 +2838,7 @@ int ldbm_back_upgradedb(Slapi_PBlock *pb)
}
if (!need_upgrade)
{
- slapi_log_error(SLAPI_LOG_FATAL, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
"Index version is up-to-date\n");
return 0;
}
@@ -2846,7 +2846,7 @@ int ldbm_back_upgradedb(Slapi_PBlock *pb)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"upgrade DB", "No instance to be
upgraded\n");
return -1;
}
@@ -2859,7 +2859,7 @@ int ldbm_back_upgradedb(Slapi_PBlock *pb)
slapi_pblock_get( pb, SLAPI_SEQ_VAL, &dest_dir );
if (NULL == dest_dir)
{
- slapi_log_error(SLAPI_LOG_FATAL, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
"Backup directory is not specified.\n");
return -1;
}
@@ -2898,7 +2898,7 @@ int ldbm_back_upgradedb(Slapi_PBlock *pb)
ldbm_back_ldif2ldbm_deluxe */
if (0 != dblayer_start(li, DBLAYER_IMPORT_MODE))
{
- slapi_log_error(SLAPI_LOG_FATAL, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
"upgradedb: Failed to init database\n");
goto fail1;
}
@@ -2918,7 +2918,7 @@ int ldbm_back_upgradedb(Slapi_PBlock *pb)
slapi_ch_free_string(&inst_dirp);
if (backup_rval < 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
"Warning: Failed to backup index files (instance %s).\n",
inst_dirp);
goto fail1;
@@ -2931,7 +2931,7 @@ int ldbm_back_upgradedb(Slapi_PBlock *pb)
if (rval)
{
upgrade_rval += rval;
- slapi_log_error(SLAPI_LOG_FATAL, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
"Can't clean up indices in %s\n",
inst->inst_dir_name);
continue; /* Need to make all backups; continue */
}
@@ -2942,7 +2942,7 @@ int ldbm_back_upgradedb(Slapi_PBlock *pb)
if (rval)
{
upgrade_rval += rval;
- slapi_log_error(SLAPI_LOG_FATAL, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
"Can't clean up indices in %s\n",
inst->inst_dir_name);
continue; /* Need to make all backups; continue */
}
@@ -2952,7 +2952,7 @@ int ldbm_back_upgradedb(Slapi_PBlock *pb)
if (rval)
{
upgrade_rval += rval;
- slapi_log_error(SLAPI_LOG_FATAL, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
"upgradedb: Failed to upgrade database %s\n",
inst->inst_name);
if (run_from_cmdline)
@@ -3005,12 +3005,12 @@ int ldbm_back_upgradedb(Slapi_PBlock *pb)
{
if (0 != dblayer_flush(li))
{
- slapi_log_error(SLAPI_LOG_FATAL, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
"Failed to flush database\n");
}
if (0 != dblayer_close(li,DBLAYER_IMPORT_MODE))
{
- slapi_log_error(SLAPI_LOG_FATAL, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
"Failed to close database\n");
goto fail1;
}
@@ -3030,14 +3030,14 @@ int ldbm_back_upgradedb(Slapi_PBlock *pb)
fail1:
if (0 != dblayer_flush(li))
- slapi_log_error(SLAPI_LOG_FATAL, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
"Failed to flush database\n");
/* we started dblayer with DBLAYER_IMPORT_MODE
* We just want not to generate a guardian file...
*/
if (0 != dblayer_close(li,DBLAYER_ARCHIVE_MODE))
- slapi_log_error(SLAPI_LOG_FATAL, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
"Failed to close database\n");
/* restore from the backup, if possible */
@@ -3092,12 +3092,12 @@ int upgradedb_copy_logfiles(struct ldbminfo *li, char
*destination_dir,
dest = destination_dir;
}
if (NULL == src || '\0' == *src) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "upgradedb_copy_logfiles: "
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "upgradedb_copy_logfiles: "
"NULL src directory\n");
return -1;
}
if (NULL == dest || '\0' == *dest) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "upgradedb_copy_logfiles: "
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "upgradedb_copy_logfiles: "
"NULL dest directory\n");
return -1;
}
@@ -3173,12 +3173,12 @@ int upgradedb_delete_indices_4cmd(ldbm_instance *inst, int flags)
char *inst_dirp = dblayer_get_full_inst_dir(inst->inst_li, inst,
inst_dir, MAXPATHLEN);
- slapi_log_error(SLAPI_LOG_TRACE, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "upgrade DB",
"upgradedb_delete_indices_4cmd: %s\n", inst_dir);
dirhandle = PR_OpenDir(inst_dirp);
if (!dirhandle)
{
- slapi_log_error(SLAPI_LOG_FATAL, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
"upgradedb_delete_indices_4cmd: PR_OpenDir failed\n");
if (inst_dirp != inst_dir)
slapi_ch_free_string(&inst_dirp);
@@ -3207,7 +3207,7 @@ int upgradedb_delete_indices_4cmd(ldbm_instance *inst, int flags)
if (PR_SUCCESS == rval && PR_FILE_DIRECTORY != info.type)
{
PR_Delete(fullpathp);
- slapi_log_error(SLAPI_LOG_TRACE, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "upgrade DB",
"upgradedb_delete_indices_4cmd: %s deleted\n",
fullpath);
}
if (fullpathp != fullpath)
@@ -3233,13 +3233,13 @@ upgradedb_core(Slapi_PBlock *pb, ldbm_instance *inst)
run_from_cmdline = (task_flags & SLAPI_TASK_RUNNING_FROM_COMMANDLINE);
be = inst->inst_be;
- slapi_log_error(SLAPI_LOG_FATAL, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
"%s: Start upgradedb.\n", inst->inst_name);
if (!run_from_cmdline)
{
/* shutdown this instance of the db */
- slapi_log_error(SLAPI_LOG_TRACE, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "upgrade DB",
"Bringing %s offline...\n", inst->inst_name);
slapi_mtn_be_disable(inst->inst_be);
@@ -3253,7 +3253,7 @@ upgradedb_core(Slapi_PBlock *pb, ldbm_instance *inst)
/* dblayer_instance_start will init the id2entry index. */
if (0 != dblayer_instance_start(be, DBLAYER_IMPORT_MODE))
{
- slapi_log_error(SLAPI_LOG_FATAL, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
"upgradedb: Failed to init instance %s\n",
inst->inst_name);
return -1;
}
@@ -3297,7 +3297,7 @@ _get_and_add_parent_rdns(backend *be,
}
if (NULL == be || NULL == srdn) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"_get_and_add_parent_rdns: Empty %s\n",
NULL==be?"be":"srdn");
return rc;
@@ -3314,7 +3314,7 @@ _get_and_add_parent_rdns(backend *be,
if (slapi_rdn_get_rdn(srdn)) { /* srdn is already in use */
rc = slapi_rdn_init_all_dn(&mysrdn, slapi_sdn_get_dn(bdn->dn_sdn));
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"_get_and_add_parent_rdns: "
"Failed to convert DN %s to RDN\n",
slapi_rdn_get_rdn(&mysrdn));
@@ -3324,7 +3324,7 @@ _get_and_add_parent_rdns(backend *be,
}
rc = slapi_rdn_add_srdn_to_all_rdns(srdn, &mysrdn);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"_get_and_add_parent_rdns: "
"Failed to merge Slapi_RDN %s to RDN\n",
slapi_sdn_get_dn(bdn->dn_sdn));
@@ -3333,7 +3333,7 @@ _get_and_add_parent_rdns(backend *be,
} else { /* srdn is empty */
rc = slapi_rdn_init_all_dn(srdn, slapi_sdn_get_dn(bdn->dn_sdn));
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"_get_and_add_parent_rdns: "
"Failed to convert DN %s to RDN\n",
slapi_sdn_get_dn(bdn->dn_sdn));
@@ -3348,7 +3348,7 @@ _get_and_add_parent_rdns(backend *be,
/* not in the dn cache or DB2LDIF or caller is expecting the parent ID;
* read id2entry */
if (NULL == db) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"_get_and_add_parent_rdns: Empty db\n");
goto bail;
}
@@ -3361,7 +3361,7 @@ _get_and_add_parent_rdns(backend *be,
data.flags = DB_DBT_MALLOC;
rc = db->get(db, NULL, &key, &data, 0);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"_get_and_add_parent_rdns: Failed to position "
"cursor at ID " ID_FMT "\n", id);
goto bail;
@@ -3369,7 +3369,7 @@ _get_and_add_parent_rdns(backend *be,
/* rdn is allocated in get_value_from_string */
rc = get_value_from_string((const char *)data.dptr, "rdn", &rdn);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"_get_and_add_parent_rdns: "
"Failed to get rdn of entry " ID_FMT
"\n", id);
goto bail;
@@ -3377,7 +3377,7 @@ _get_and_add_parent_rdns(backend *be,
/* rdn is going to be set to srdn */
rc = slapi_rdn_init_all_dn(&mysrdn, rdn);
if (rc < 0) { /* expect rc == 1 since we are setting "rdn" not
"dn" */
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"_get_and_add_parent_rdns: "
"Failed to add rdn %s of entry " ID_FMT
"\n", rdn, id);
goto bail;
@@ -3406,7 +3406,7 @@ _get_and_add_parent_rdns(backend *be,
}
rc = slapi_rdn_add_srdn_to_all_rdns(srdn, &mysrdn);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"_get_and_add_parent_rdns: "
"Failed to merge Slapi_RDN %s to RDN\n",
slapi_rdn_get_rdn(&mysrdn));
@@ -3419,7 +3419,7 @@ _get_and_add_parent_rdns(backend *be,
ep = backentry_alloc();
rc = slapi_rdn_get_dn(srdn, &dn);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"ldbm2index: Failed to compose dn for "
"(rdn: %s, ID: %d) from Slapi_RDN\n", rdn, id);
goto bail;
@@ -3434,11 +3434,11 @@ _get_and_add_parent_rdns(backend *be,
if (txn && !run_from_cmdline) {
rc = dblayer_txn_begin(be, NULL, txn);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"%s: ERROR: failed to begin txn for update
"
"index 'entryrdn'\n",
inst->inst_name);
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"%s: Error %d: %s\n",
inst->inst_name, rc, dblayer_strerror(rc));
goto bail;
@@ -3446,10 +3446,10 @@ _get_and_add_parent_rdns(backend *be,
}
rc = entryrdn_index_entry(be, ep, BE_INDEX_ADD, txn);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"%s: ERROR: failed to update index
'entryrdn'\n",
inst->inst_name);
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"%s: Error %d: %s\n", inst->inst_name, rc,
dblayer_strerror(rc));
if (txn && !run_from_cmdline) {
@@ -3460,11 +3460,11 @@ _get_and_add_parent_rdns(backend *be,
if (txn && !run_from_cmdline) {
rc = dblayer_txn_commit(be, txn);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"%s: ERROR: failed to commit txn for "
"update index 'entryrdn'\n",
inst->inst_name);
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"%s: Error %d: %s\n",
inst->inst_name, rc, dblayer_strerror(rc));
goto bail;
@@ -3472,7 +3472,7 @@ _get_and_add_parent_rdns(backend *be,
}
} else if (index_ext & DB2LDIF_ENTRYRDN) {
if (NULL == eargs) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"_get_and_add_parent_rdns: Empty export args\n");
rc = -1;
goto bail;
@@ -3480,7 +3480,7 @@ _get_and_add_parent_rdns(backend *be,
eargs->ep = ep;
rc = export_one_entry(li, inst, eargs);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"_get_and_add_parent_rdns: "
"Failed to export an entry %s\n",
slapi_sdn_get_dn(slapi_entry_get_sdn(ep->ep_entry)));
@@ -3488,7 +3488,7 @@ _get_and_add_parent_rdns(backend *be,
}
rc = idl_append_extend(&(eargs->pre_exported_idl), id);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
"_get_and_add_parent_rdns: "
"Failed add %d to exported idl\n", id);
}
@@ -3535,17 +3535,17 @@ _export_or_index_parents(ldbm_instance *inst,
rc = _get_and_add_parent_rdns(be, db, txn, pid, psrdn, &ppid, 0,
run_from_cmdline, NULL);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "_export_or_index_parents: "
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "_export_or_index_parents:
"
"Failed to get the DN of ID %d\n", pid);
goto bail;
}
prdn = slapi_ch_strdup(slapi_rdn_get_rdn(psrdn));
} else { /* we have entryrdn */
if (pid != temp_pid) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, "_export_or_index_parents: "
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "_export_or_index_parents:
"
"parentid conflict found between entryrdn (%d) and
"
"id2entry (%d)\n", temp_pid, pid);
- LDAPDebug0Args(LDAP_DEBUG_ANY, "Ignoring entryrdn\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "Ignoring entryrdn\n");
} else {
struct backdn *bdn = NULL;
char *pdn = NULL;
@@ -3564,13 +3564,13 @@ _export_or_index_parents(ldbm_instance *inst,
myrc = CACHE_ADD(&inst->inst_dncache, bdn, NULL);
if (myrc) {
backdn_free(&bdn);
- slapi_log_error(SLAPI_LOG_CACHE,
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG,
"_export_or_index_parents",
"%s is already in the dn cache
(%d)\n",
pdn, myrc);
} else {
CACHE_RETURN(&inst->inst_dncache, &bdn);
- slapi_log_error(SLAPI_LOG_CACHE,
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG,
"_export_or_index_parents",
"entryrdn_lookup_dn returned: %s, "
"and set to dn cache\n", pdn);
@@ -3585,7 +3585,7 @@ _export_or_index_parents(ldbm_instance *inst,
rc = entryrdn_get_parent(be, prdn, pid, &pprdn, &ppid, NULL);
slapi_ch_free_string(&pprdn);
if (rc) { /* entryrdn is not available */
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "_export_or_index_parents: "
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "_export_or_index_parents:
"
"Failed to get the parent of ID %d\n", pid);
goto bail;
}
@@ -3604,7 +3604,7 @@ _export_or_index_parents(ldbm_instance *inst,
rc = _get_and_add_parent_rdns(be, db, txn, pid, psrdn, NULL,
type, run_from_cmdline, eargs);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"_export_or_index_parents: Failed to get rdn for ID: %d\n",
pid);
slapi_rdn_done(psrdn);
}
@@ -3676,7 +3676,7 @@ int ldbm_back_upgradednformat(Slapi_PBlock *pb)
return -1;
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Upgrade DN Format",
" Online mode is not supported. "
"Shutdown the server and run the tool\n");
goto bail;
@@ -3685,11 +3685,11 @@ int ldbm_back_upgradednformat(Slapi_PBlock *pb)
/* Find the instance that the ldif2db will be done on. */
inst = ldbm_instance_find_by_name(li, instance_name);
if (NULL == inst) {
- slapi_log_error(SLAPI_LOG_FATAL, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Upgrade DN Format",
"Unknown ldbm instance %s\n", instance_name);
goto bail;
}
- slapi_log_error(SLAPI_LOG_FATAL, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Upgrade DN Format",
"%s: Start upgrade dn format.\n", inst->inst_name);
slapi_pblock_set(pb, SLAPI_BACKEND, inst->inst_be);
@@ -3698,7 +3698,7 @@ int ldbm_back_upgradednformat(Slapi_PBlock *pb)
prst = PR_GetFileInfo64(rawworkdbdir, &prfinfo);
if (PR_FAILURE == prst || PR_FILE_DIRECTORY != prfinfo.type) {
- slapi_log_error(SLAPI_LOG_FATAL, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Upgrade DN Format",
"Working DB instance dir %s is not a directory\n",
rawworkdbdir);
goto bail;
@@ -3706,7 +3706,7 @@ int ldbm_back_upgradednformat(Slapi_PBlock *pb)
dirhandle = PR_OpenDir(rawworkdbdir);
if (!dirhandle)
{
- slapi_log_error(SLAPI_LOG_FATAL, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Upgrade DN Format",
"Failed to open working DB instance dir %s\n",
rawworkdbdir);
goto bail;
@@ -3723,7 +3723,7 @@ int ldbm_back_upgradednformat(Slapi_PBlock *pb)
PR_CloseDir(dirhandle);
if (!found) {
- slapi_log_error(SLAPI_LOG_FATAL, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Upgrade DN Format",
"Working DB instance dir %s does not include %s
file\n",
rawworkdbdir, ID2ENTRY);
goto bail;
@@ -3756,7 +3756,7 @@ int ldbm_back_upgradednformat(Slapi_PBlock *pb)
rc = 3; /* 0: need upgrade (dn norm sp, only) */
} else {
/* DN format already takes care of the multiple spaces */
- slapi_log_error(SLAPI_LOG_FATAL, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Upgrade DN Format",
"Instance %s in %s is up-to-date\n",
instance_name, workdbdir);
rc = 0; /* 0: up-to-date */
@@ -3769,7 +3769,7 @@ int ldbm_back_upgradednformat(Slapi_PBlock *pb)
rc = 1; /* 0: need upgrade (both) */
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Upgrade DN Format",
"Failed to get DBVERSION (Instance name: %s, dir
%s)\n",
instance_name, workdbdir);
rc = -1; /* error */
@@ -3778,7 +3778,7 @@ int ldbm_back_upgradednformat(Slapi_PBlock *pb)
sep = PL_strrchr(workdbdir, '/');
if (!sep) {
- slapi_log_error(SLAPI_LOG_FATAL, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Upgrade DN Format",
"Working DB instance dir %s does not include %s
file\n",
workdbdir, ID2ENTRY);
goto bail;
@@ -3790,7 +3790,7 @@ int ldbm_back_upgradednformat(Slapi_PBlock *pb)
if (run_from_cmdline) {
if (0 != dblayer_start(li, DBLAYER_IMPORT_MODE)) {
- slapi_log_error(SLAPI_LOG_FATAL, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Upgrade DN Format",
"Failed to init database\n");
goto bail;
}
@@ -3800,7 +3800,7 @@ int ldbm_back_upgradednformat(Slapi_PBlock *pb)
be = inst->inst_be;
if (0 != dblayer_instance_start(be, DBLAYER_IMPORT_MODE))
{
- slapi_log_error(SLAPI_LOG_FATAL, "Upgrade DB Format",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Upgrade DB Format",
"Failed to init instance %s\n", inst->inst_name);
goto bail;
}
@@ -3814,11 +3814,11 @@ int ldbm_back_upgradednformat(Slapi_PBlock *pb)
/* close the database */
if (run_from_cmdline) {
if (0 != dblayer_flush(li)) {
- slapi_log_error(SLAPI_LOG_FATAL, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Upgrade DN Format",
"Failed to flush database\n");
}
if (0 != dblayer_close(li,DBLAYER_IMPORT_MODE)) {
- slapi_log_error(SLAPI_LOG_FATAL, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Upgrade DN Format",
"Failed to close database\n");
goto bail;
}
diff --git a/ldap/servers/slapd/back-ldbm/misc.c b/ldap/servers/slapd/back-ldbm/misc.c
index d43f411..95be888 100644
--- a/ldap/servers/slapd/back-ldbm/misc.c
+++ b/ldap/servers/slapd/back-ldbm/misc.c
@@ -27,7 +27,7 @@ void ldbm_nasty(const char* str, int c, int err)
LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,"%s, err=%d %s\n",
buffer,err,(msg = dblayer_strerror( err )) ? msg : "");
} else if (err == DB_RUNRECOVERY) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, "FATAL ERROR at %s (%d); "
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "FATAL ERROR at %s (%d); "
"server stopping as database recovery needed.\n", str, c);
exit(1);
} else {
@@ -224,7 +224,7 @@ allinstance_set_busy(struct ldbminfo *li)
inst_obj = objset_next_obj(li->li_instance_set, inst_obj)) {
inst = (ldbm_instance *)object_get_data(inst_obj);
if (instance_set_busy(inst)) {
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, "could not set instance [%s] as busy,
probably already busy\n",
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "could not set instance [%s]
as busy, probably already busy\n",
inst->inst_name);
}
}
@@ -538,7 +538,7 @@ get_value_from_string(const char *string, char *type, char **value)
rc = slapi_ldif_parse_line(copy, &tmptype, &bvvalue, &freeval);
if (0 > rc || NULL == tmptype.bv_val ||
NULL == bvvalue.bv_val || 0 >= bvvalue.bv_len) {
- slapi_log_error(SLAPI_LOG_FATAL, "get_value_from_string",
"parse "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "get_value_from_string",
"parse "
"failed: %d\n", rc);
if (freeval) {
slapi_ch_free_string(&bvvalue.bv_val);
@@ -547,7 +547,7 @@ get_value_from_string(const char *string, char *type, char **value)
goto bail;
}
if (0 != PL_strncasecmp(type, tmptype.bv_val, tmptype.bv_len)) {
- slapi_log_error(SLAPI_LOG_FATAL, "get_value_from_string",
"type "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "get_value_from_string",
"type "
"does not match: %s != %s\n",
type, tmptype.bv_val);
if (freeval) {
@@ -626,7 +626,7 @@ get_values_from_string(const char *string, char *type, char
***valuearray)
char *p = PL_strchr(tmptype.bv_val, ';'); /* subtype ? */
if (p) {
if (0 != strncasecmp(type, tmptype.bv_val, p - tmptype.bv_val)) {
- slapi_log_error(SLAPI_LOG_FATAL, "get_values_from_string",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"get_values_from_string",
"type does not match: %s != %s\n",
type, tmptype.bv_val);
if (freeval) {
@@ -635,7 +635,7 @@ get_values_from_string(const char *string, char *type, char
***valuearray)
goto bail;
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, "get_values_from_string",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"get_values_from_string",
"type does not match: %s != %s\n",
type, tmptype.bv_val);
if (freeval) {
diff --git a/ldap/servers/slapd/back-ldbm/vlv.c b/ldap/servers/slapd/back-ldbm/vlv.c
index 2f5ace4..569ba9e 100644
--- a/ldap/servers/slapd/back-ldbm/vlv.c
+++ b/ldap/servers/slapd/back-ldbm/vlv.c
@@ -81,7 +81,7 @@ int vlv_AddIndexEntry(Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry* e
char *name = slapi_entry_attr_get_charptr(entryBefore, type_vlvName);
if (vlvSearch_findname(parent, name)) {
/* The vlvindex is already in the vlvSearchList. Skip adding it. */
- LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM,
+ LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"vlv_AddIndexEntry: %s is already in
vlvSearchList\n",
slapi_entry_get_dn_const(entryBefore));
} else {
@@ -372,7 +372,7 @@ vlv_init(ldbm_instance *inst)
basedn = slapi_create_dn_string("cn=%s,cn=%s,cn=plugins,cn=config",
inst->inst_name,
inst->inst_li->li_plugin->plg_name);
if (NULL == basedn) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"vlv_init: failed to create vlv dn for plugin %s, instance
%s\n",
inst->inst_name, inst->inst_li->li_plugin->plg_name);
return_value = LDAP_PARAM_ERROR;
@@ -447,7 +447,7 @@ vlv_remove_callbacks(ldbm_instance *inst)
basedn = slapi_create_dn_string("cn=%s,cn=%s,cn=plugins,cn=config",
inst->inst_name,
inst->inst_li->li_plugin->plg_name);
if (NULL == basedn) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"vlv_remove_callbacks: failed to create vlv dn for plugin %s,
"
"instance %s\n",
inst->inst_name, inst->inst_li->li_plugin->plg_name);
@@ -1553,7 +1553,7 @@ vlv_trim_candidates_byvalue(backend *be, const IDList *candidates,
const sort_sp
{
attr_get_value_cmp_fn(&sort_control->sattr, &compare_fn);
if (compare_fn == NULL) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "vlv_trim_candidates_byvalue: "
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "vlv_trim_candidates_byvalue:
"
"attempt to compare an unordered attribute [%s]\n",
sort_control->type);
compare_fn = slapi_berval_cmp;
diff --git a/ldap/servers/slapd/backend.c b/ldap/servers/slapd/backend.c
index 54b9381..a68f255 100644
--- a/ldap/servers/slapd/backend.c
+++ b/ldap/servers/slapd/backend.c
@@ -29,21 +29,21 @@ be_init( Slapi_Backend *be, const char *type, const char *name, int
isprivate, i
be->be_basedn =
slapi_create_dn_string("cn=%s,cn=%s,cn=plugins,cn=config",
name, type);
if (NULL == be->be_basedn) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"be_init: failed create instance dn for plugin %s, "
"instance %s\n", type, name);
}
be->be_configdn =
slapi_create_dn_string("cn=config,cn=%s,cn=%s,cn=plugins,cn=config",
name, type);
if (NULL == be->be_configdn) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"be_init: failed create instance config dn for "
"plugin %s, instance %s\n", type, name);
}
be->be_monitordn =
slapi_create_dn_string("cn=monitor,cn=%s,cn=%s,cn=plugins,cn=config",
name, type);
if (NULL == be->be_configdn) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"be_init: failed create instance monitor dn for "
"plugin %s, instance %s\n", type, name);
}
@@ -465,7 +465,7 @@ slapi_be_getentrypoint(Slapi_Backend *be, int entrypoint, void
**ret_fnptr, Slap
*ret_fnptr = (void*)be->be_cleanup;
break;
default:
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"slapi_be_getentrypoint: unknown entry point %d\n", entrypoint);
return -1;
}
@@ -576,7 +576,7 @@ slapi_be_setentrypoint(Slapi_Backend *be, int entrypoint, void
*ret_fnptr, Slapi
be->be_cleanup=(IFP)ret_fnptr;
break;
default:
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"slapi_be_setentrypoint: unknown entry point %d\n",
entrypoint);
return -1;
}
diff --git a/ldap/servers/slapd/backend_manager.c b/ldap/servers/slapd/backend_manager.c
index e8ea06f..aab7ec3 100644
--- a/ldap/servers/slapd/backend_manager.c
+++ b/ldap/servers/slapd/backend_manager.c
@@ -52,7 +52,7 @@ slapi_be_new( const char *type, const char *name, int isprivate, int
logchanges
backends[i] = be;
nbackends++;
- slapi_log_error(SLAPI_LOG_TRACE, "slapi_be_new",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "slapi_be_new",
"Added new backend name [%s] type [%s] nbackends [%d]\n",
name, type, nbackends);
return( be );
diff --git a/ldap/servers/slapd/bind.c b/ldap/servers/slapd/bind.c
index 5c4a53c..a287cc0 100644
--- a/ldap/servers/slapd/bind.c
+++ b/ldap/servers/slapd/bind.c
@@ -564,13 +564,13 @@ do_bind( Slapi_PBlock *pb )
* or connections using SASL privacy layers */
conn = pb->pb_conn;
if ( slapi_pblock_get(pb, SLAPI_CONN_SASL_SSF, &sasl_ssf) != 0) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "do_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "do_bind",
"Could not get SASL SSF from connection\n" );
sasl_ssf = 0;
}
if ( slapi_pblock_get(pb, SLAPI_CONN_LOCAL_SSF, &local_ssf) != 0) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "do_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "do_bind",
"Could not get local SSF from connection\n"
);
local_ssf = 0;
}
diff --git a/ldap/servers/slapd/bulk_import.c b/ldap/servers/slapd/bulk_import.c
index 35f9855..706d095 100644
--- a/ldap/servers/slapd/bulk_import.c
+++ b/ldap/servers/slapd/bulk_import.c
@@ -78,13 +78,13 @@ process_bulk_import_op (Slapi_PBlock *pb, int state, Slapi_Entry *e)
if (pb == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "process_bulk_import_op: NULL
pblock\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "process_bulk_import_op:
NULL pblock\n");
return LDAP_OPERATIONS_ERROR;
}
if (state == SLAPI_BI_STATE_ADD && e == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "process_bulk_import_op: NULL
entry\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "process_bulk_import_op: NULL
entry\n");
return LDAP_OPERATIONS_ERROR;
}
@@ -100,7 +100,7 @@ process_bulk_import_op (Slapi_PBlock *pb, int state, Slapi_Entry *e)
{
slapi_pblock_get (pb, SLAPI_TARGET_SDN, &target_sdn);
if (NULL == target_sdn) {
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"process_bulk_import_op: NULL target sdn\n");
return LDAP_OPERATIONS_ERROR;
}
@@ -111,7 +111,7 @@ process_bulk_import_op (Slapi_PBlock *pb, int state, Slapi_Entry *e)
{
if (state == SLAPI_BI_STATE_START && (!slapi_be_issuffix(be,
target_sdn)))
{
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"process_bulk_import_op: wrong backend suffix\n");
return LDAP_OPERATIONS_ERROR;
}
@@ -119,14 +119,14 @@ process_bulk_import_op (Slapi_PBlock *pb, int state, Slapi_Entry
*e)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "process_bulk_import_op: NULL
backend\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "process_bulk_import_op:
NULL backend\n");
return LDAP_OPERATIONS_ERROR;
}
}
if (be->be_wire_import == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "slapi_start_bulk_import: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "slapi_start_bulk_import:
"
"bulk import is not supported by this (%s) backend\n",
be->be_type);
return LDAP_NOT_SUPPORTED;
@@ -142,7 +142,7 @@ process_bulk_import_op (Slapi_PBlock *pb, int state, Slapi_Entry *e)
{
/* The caller will free the entry (e), so we just
* leave it alone here. */
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "slapi_start_bulk_import: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "slapi_start_bulk_import:
"
"failed; error = %d\n", rc);
return LDAP_OPERATIONS_ERROR;
}
diff --git a/ldap/servers/slapd/ch_malloc.c b/ldap/servers/slapd/ch_malloc.c
index 2e2756c..b833993 100644
--- a/ldap/servers/slapd/ch_malloc.c
+++ b/ldap/servers/slapd/ch_malloc.c
@@ -90,7 +90,7 @@ void oom_occurred(void)
static void
log_negative_alloc_msg( const char *op, const char *units, unsigned long size )
{
- slapi_log_error( SLAPI_LOG_FATAL, SLAPD_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPD_MODULE,
"cannot %s %lu %s;\n"
"trying to allocate 0 or a negative number of %s is not portable and\n"
"gives different results on different platforms.\n",
@@ -114,7 +114,7 @@ slapi_ch_malloc(
int oserr = errno;
oom_occurred();
- slapi_log_error( SLAPI_LOG_FATAL, SLAPD_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPD_MODULE,
"malloc of %lu bytes failed; OS error %d (%s)%s\n",
size, oserr, slapd_system_strerror( oserr ), oom_advice );
exit( 1 );
@@ -152,7 +152,7 @@ slapi_ch_realloc(
int oserr = errno;
oom_occurred();
- slapi_log_error( SLAPI_LOG_FATAL, SLAPD_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPD_MODULE,
"realloc of %lu bytes failed; OS error %d (%s)%s\n",
size, oserr, slapd_system_strerror( oserr ), oom_advice );
exit( 1 );
@@ -189,7 +189,7 @@ slapi_ch_calloc(
int oserr = errno;
oom_occurred();
- slapi_log_error( SLAPI_LOG_FATAL, SLAPD_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPD_MODULE,
"calloc of %lu elems of %lu bytes failed; OS error %d (%s)%s\n",
nelem, size, oserr, slapd_system_strerror( oserr ), oom_advice );
exit( 1 );
@@ -219,7 +219,7 @@ slapi_ch_strdup ( const char* s1)
int oserr = errno;
oom_occurred();
- slapi_log_error( SLAPI_LOG_FATAL, SLAPD_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPD_MODULE,
"strdup of %lu characters failed; OS error %d (%s)%s\n",
(unsigned long)strlen(s1), oserr, slapd_system_strerror( oserr ),
oom_advice );
@@ -246,7 +246,7 @@ slapi_ch_bvdup (const struct berval* v)
int oserr = errno;
oom_occurred();
- slapi_log_error( SLAPI_LOG_FATAL, SLAPD_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPD_MODULE,
"ber_bvdup of %lu bytes failed; OS error %d (%s)%s\n",
(unsigned long)v->bv_len, oserr, slapd_system_strerror( oserr ),
oom_advice );
diff --git a/ldap/servers/slapd/charray.c b/ldap/servers/slapd/charray.c
index 9aea836..f9d7eed 100644
--- a/ldap/servers/slapd/charray.c
+++ b/ldap/servers/slapd/charray.c
@@ -462,7 +462,7 @@ charray_normdn_add(char ***chararray, char *dn, char *errstr)
char *normdn = NULL;
rc = slapi_dn_normalize_ext(dn, 0, &normdn, &len);
if (rc < 0) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, "Invalid dn: \"%s\" %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "Invalid dn: \"%s\"
%s\n",
dn, errstr?errstr:"");
return rc;
} else if (0 == rc) {
diff --git a/ldap/servers/slapd/config.c b/ldap/servers/slapd/config.c
index 0da897a..eb736d4 100644
--- a/ldap/servers/slapd/config.c
+++ b/ldap/servers/slapd/config.c
@@ -83,7 +83,7 @@ entry_has_attr_and_value(Slapi_Entry *e, const char *attrname,
}
else
{
- slapi_log_error( SLAPI_LOG_FATAL, "bootstrap config",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "bootstrap config",
"Ignoring extremely large value for"
" configuration attribute %s"
" (length=%ld, value=%40.40s...)\n",
@@ -129,7 +129,7 @@ slapd_bootstrap_config(const char *configdir)
char tmpfile[MAXPATHLEN+1];
if (NULL == configdir) {
- slapi_log_error(SLAPI_LOG_FATAL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"startup", "Passed null config directory\n");
return rc; /* Fail */
}
@@ -146,7 +146,7 @@ slapd_bootstrap_config(const char *configdir)
if ( (rc = PR_GetFileInfo64( configfile, &prfinfo )) != PR_SUCCESS )
{
PRErrorCode prerr = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, "config", "The given config file %s
could not be accessed, " SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "config", "The given config
file %s could not be accessed, " SLAPI_COMPONENT_NAME_NSPR " error %d
(%s)\n",
configfile, prerr, slapd_pr_strerror(prerr));
return rc;
}
@@ -154,7 +154,7 @@ slapd_bootstrap_config(const char *configdir)
SLAPD_DEFAULT_FILE_MODE )) == NULL )
{
PRErrorCode prerr = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, "config", "The given config file %s
could not be opened for reading, " SLAPI_COMPONENT_NAME_NSPR " error %d
(%s)\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "config", "The given config
file %s could not be opened for reading, " SLAPI_COMPONENT_NAME_NSPR " error %d
(%s)\n",
configfile, prerr, slapd_pr_strerror(prerr));
return rc; /* Fail */
}
@@ -164,7 +164,7 @@ slapd_bootstrap_config(const char *configdir)
buf = slapi_ch_malloc( prfinfo.size + 1 );
if (( nr = slapi_read_buffer( prfd, buf, prfinfo.size )) < 0 )
{
- slapi_log_error(SLAPI_LOG_FATAL, "config", "Could only read %d of %ld
bytes from config file %s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "config", "Could only read %d
of %ld bytes from config file %s\n",
nr, (long int)prfinfo.size, configfile);
rc = 0; /* Fail */
done= 1;
@@ -587,7 +587,7 @@ slapd_bootstrap_config(const char *configdir)
* if not explicilty set in the config file
*/
if ( config_set_storagescheme() ) { /* default scheme plugin not loaded */
- slapi_log_error(SLAPI_LOG_FATAL, "startup",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "startup",
"The default password storage scheme SSHA could not be read or was not found
in the file %s. It is mandatory.\n",
configfile);
exit (1);
diff --git a/ldap/servers/slapd/configdse.c b/ldap/servers/slapd/configdse.c
index 71ab27a..b6d9951 100644
--- a/ldap/servers/slapd/configdse.c
+++ b/ldap/servers/slapd/configdse.c
@@ -273,7 +273,7 @@ load_config_dse(Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry*
ignored, int *ret
* value to the current process limit when this happens. We want
* to allow the server to still start in this case. */
if (retval == LDAP_UNWILLING_TO_PERFORM) {
- slapi_log_error (SLAPI_LOG_FATAL, NULL, "Config Warning: - %s\n",
returntext);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "Config Warning: - %s\n",
returntext);
retval = LDAP_SUCCESS;
}
} else {
@@ -328,7 +328,7 @@ load_plugin_entry(Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry*
ignored, int *r
*/
if(retval)
{
- slapi_log_error( SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"Unable to load plugin \"%s\"\n",
slapi_entry_get_dn_const( e ));
exit(1);
@@ -367,7 +367,7 @@ modify_config_dse(Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry* e, in
if (SLAPI_IS_MOD_ADD(mods[i]->mod_op)) {
if (apply_mods) { /* log warning once */
- slapi_log_error (SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"Warning: Adding configuration attribute \"%s\"\n",
config_attr);
}
@@ -385,7 +385,7 @@ modify_config_dse(Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry* e, in
rc = config_set(config_attr, mods[i]->mod_bvalues,
returntext, apply_mods);
if (apply_mods) { /* log warning once */
- slapi_log_error (SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"Warning: Deleting configuration attribute \"%s\"\n",
config_attr);
}
@@ -475,7 +475,7 @@ postop_modify_config_dse(Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE,
"The change of %s will not take effect "
"until the server is restarted", mods[i]->mod_type);
- slapi_log_error (SLAPI_LOG_FATAL, NULL, "%s\n", returntext);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "%s\n", returntext);
break;
}
}
diff --git a/ldap/servers/slapd/connection.c b/ldap/servers/slapd/connection.c
index 14bafa3..bf167fc 100644
--- a/ldap/servers/slapd/connection.c
+++ b/ldap/servers/slapd/connection.c
@@ -693,7 +693,7 @@ int connection_release_nolock_ext (Connection *conn, int
release_only)
{
if (conn->c_refcnt <= 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, "connection",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "connection",
"conn=%" NSPRIu64 " fd=%d Attempt to release connection
that is not acquired\n",
conn->c_connid, conn->c_sd);
PR_ASSERT (PR_FALSE);
@@ -725,7 +725,7 @@ int connection_acquire_nolock_ext (Connection *conn, int
allow_when_closing)
if (!allow_when_closing && (conn->c_flags & CONN_FLAG_CLOSING))
{
/* This may happen while other threads are still working on this connection */
- slapi_log_error(SLAPI_LOG_FATAL, "connection",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "connection",
"conn=%" NSPRIu64 " fd=%d Attempt to acquire connection
in the closing state\n",
conn->c_connid, conn->c_sd);
return -1;
@@ -961,11 +961,11 @@ int connection_wait_for_new_work(Slapi_PBlock *pb, PRIntervalTime
interval)
}
if ( op_shutdown ) {
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "connection_wait_for_new_work: shutdown\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "connection_wait_for_new_work:
shutdown\n" );
ret = CONN_SHUTDOWN;
} else if ( NULL == ( wqitem = get_work_q( &op_stack_obj ) ) ) {
/* not sure how this can happen */
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "connection_wait_for_new_work: no work to
do\n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "connection_wait_for_new_work: no
work to do\n" );
ret = CONN_NOWORK;
} else {
/* make new pb */
@@ -1352,7 +1352,7 @@ void connection_make_readable(Connection *conn)
void connection_make_readable_nolock(Connection *conn)
{
conn->c_gettingber = 0;
- LDAPDebug2Args(LDAP_DEBUG_CONNS, "making readable conn %" NSPRIu64 "
fd=%d\n",
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, LOG_DEBUG, "making readable conn %" NSPRIu64
" fd=%d\n",
conn->c_connid, conn->c_sd);
if (!(conn->c_flags & CONN_FLAG_CLOSING)) {
/* if the connection is closing, try the close in connection_release_nolock */
@@ -1573,7 +1573,7 @@ connection_threadmain()
slapi_ch_free_string( &anon_dn );
}
if (connection_call_io_layer_callbacks(pb->pb_conn)) {
- LDAPDebug0Args( LDAP_DEBUG_ANY, "Error: could not add/remove IO layers from
connection\n" );
+ LDAPDebug0Args( LDAP_DEBUG_ANY, LOG_ERR, "Error: could not add/remove IO
layers from connection\n" );
}
default:
break;
@@ -1589,7 +1589,7 @@ connection_threadmain()
/* Make our own pb in turbo mode */
connection_make_new_pb(pb,conn);
if (connection_call_io_layer_callbacks(conn)) {
- LDAPDebug0Args( LDAP_DEBUG_ANY, "Error: could not add/remove IO layers from
connection\n" );
+ LDAPDebug0Args( LDAP_DEBUG_ANY, LOG_ERR, "Error: could not add/remove IO layers
from connection\n" );
}
PR_ExitMonitor(conn->c_mutex);
if (! config_check_referral_mode()) {
@@ -1604,12 +1604,12 @@ connection_threadmain()
more_data = 0;
ret = connection_read_operation(conn, op, &tag, &more_data);
if ((ret == CONN_DONE) || (ret == CONN_TIMEDOUT)) {
- slapi_log_error(SLAPI_LOG_CONNS, "connection_threadmain",
+ slapi_log_error(SLAPI_LOG_CONNS, LOG_DEBUG, "connection_threadmain",
"conn %" NSPRIu64 " read not ready due to %d - thread_turbo_flag %d
more_data %d "
"ops_initiated %d refcnt %d flags %d\n", conn->c_connid, ret,
thread_turbo_flag, more_data,
conn->c_opsinitiated, conn->c_refcnt, conn->c_flags);
} else if (ret == CONN_FOUND_WORK_TO_DO) {
- slapi_log_error(SLAPI_LOG_CONNS, "connection_threadmain",
+ slapi_log_error(SLAPI_LOG_CONNS, LOG_DEBUG, "connection_threadmain",
"conn %" NSPRIu64 " read operation successfully - thread_turbo_flag
%d more_data %d "
"ops_initiated %d refcnt %d flags %d\n", conn->c_connid,
thread_turbo_flag, more_data,
conn->c_opsinitiated, conn->c_refcnt, conn->c_flags);
@@ -1635,7 +1635,7 @@ connection_threadmain()
/* turn off turbo mode immediately if any pb waiting in global queue */
if (thread_turbo_flag && !WORK_Q_EMPTY) {
thread_turbo_flag = 0;
- LDAPDebug2Args(LDAP_DEBUG_CONNS,"conn %" NSPRIu64 " leaving turbo mode
- pb_q is not empty %d\n",
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, LOG_DEBUG,"conn %" NSPRIu64 " leaving
turbo mode - pb_q is not empty %d\n",
conn->c_connid,work_q_size);
}
#endif
@@ -1923,9 +1923,9 @@ get_work_q(struct Slapi_op_stack **op_stack_obj)
struct Slapi_work_q *tmp = NULL;
work_q_item *wqitem;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "get_work_q \n" );
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "get_work_q \n" );
if (head_work_q == NULL) {
- LDAPDebug0Args( LDAP_DEBUG_TRACE, "get_work_q: the work queue is empty.\n"
);
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "get_work_q: the work queue is
empty.\n" );
return NULL;
}
@@ -1993,7 +1993,7 @@ connection_post_shutdown_cleanup()
}
PR_DestroyStack(op_stack);
op_stack = NULL;
- LDAPDebug2Args( LDAP_DEBUG_ANY,
+ LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR,
"slapd shutting down - freed %d work q stack objects - freed %d op stack
objects\n",
work_cnt, stack_cnt);
}
@@ -2173,13 +2173,13 @@ log_ber_too_big_error(const Connection *conn, ber_len_t ber_len,
maxbersize = config_get_maxbersize();
}
if (0 == ber_len) {
- slapi_log_error( SLAPI_LOG_FATAL, "connection",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "connection",
"conn=%" NSPRIu64 " fd=%d Incoming BER Element was too long, max
allowable"
" is %" BERLEN_T " bytes. Change the nsslapd-maxbersize attribute
in"
" cn=config to increase.\n",
conn->c_connid, conn->c_sd, maxbersize );
} else {
- slapi_log_error( SLAPI_LOG_FATAL, "connection",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "connection",
"conn=%" NSPRIu64 " fd=%d Incoming BER Element was %" BERLEN_T
" bytes, max allowable"
" is %" BERLEN_T " bytes. Change the nsslapd-maxbersize attribute
in"
" cn=config to increase.\n",
@@ -2288,7 +2288,7 @@ disconnect_server_nomutex_ext( Connection *conn, PRUint64 opconnid,
int opid, PR
}
} else {
- LDAPDebug2Args(LDAP_DEBUG_CONNS, "not setting conn %d to be disconnected:
%s\n",
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, LOG_DEBUG, "not setting conn %d to be
disconnected: %s\n",
conn->c_sd,
(conn->c_sd == SLAPD_INVALID_SOCKET) ? "socket is invalid" :
((conn->c_connid != opconnid) ? "conn id does not match op conn id"
:
diff --git a/ldap/servers/slapd/conntable.c b/ldap/servers/slapd/conntable.c
index 15ca71c..a170be5 100644
--- a/ldap/servers/slapd/conntable.c
+++ b/ldap/servers/slapd/conntable.c
@@ -208,7 +208,7 @@ int connection_table_iterate_active_connections(Connection_Table *ct,
void* arg,
static void
connection_table_dump_active_connection (Connection *c)
{
- slapi_log_error(SLAPI_LOG_FATAL, "connection", "conn=%p fd=%d
refcnt=%d c_flags=%d\n"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "connection", "conn=%p fd=%d
refcnt=%d c_flags=%d\n"
"mutex=%p next=%p prev=%p\n\n", c, c->c_sd, c->c_refcnt,
c->c_flags,
c->c_mutex, c->c_next, c->c_prev);
}
@@ -219,7 +219,7 @@ connection_table_dump_active_connections (Connection_Table *ct)
Connection* c;
PR_Lock(ct->table_mutex);
- slapi_log_error(SLAPI_LOG_FATAL, "connection", "********** BEGIN DUMP
************\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "connection", "**********
BEGIN DUMP ************\n");
c = connection_table_get_first_active_connection (ct);
while (c)
{
@@ -227,7 +227,7 @@ connection_table_dump_active_connections (Connection_Table *ct)
c = connection_table_get_next_active_connection (ct, c);
}
- slapi_log_error(SLAPI_LOG_FATAL, "connection", "********** END DUMP
************\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "connection", "**********
END DUMP ************\n");
PR_Unlock(ct->table_mutex);
}
#endif
@@ -246,7 +246,7 @@ connection_table_move_connection_out_of_active_list(Connection_Table
*ct,Connect
PR_ASSERT (c->c_prev);
#ifdef FOR_DEBUGGING
- slapi_log_error(SLAPI_LOG_FATAL, "connection", "Moving connection out
of active list\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "connection", "Moving
connection out of active list\n");
connection_table_dump_active_connection (c);
#endif
@@ -256,7 +256,7 @@ connection_table_move_connection_out_of_active_list(Connection_Table
*ct,Connect
* a reference to the connection (that is, its reference count must be 1 or less).
*/
if(c->c_refcnt > 1) {
- LDAPDebug2Args(LDAP_DEBUG_CONNS,
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, LOG_DEBUG,
"not moving conn %d out of active list because refcnt is %d\n",
c_sd, c->c_refcnt);
return 1; /* failed */
@@ -278,7 +278,7 @@ connection_table_move_connection_out_of_active_list(Connection_Table
*ct,Connect
PR_Unlock(ct->table_mutex);
- LDAPDebug1Arg(LDAP_DEBUG_CONNS, "moved conn %d out of active list and
freed\n", c_sd);
+ LDAPDebug1Arg(LDAP_DEBUG_CONNS, LOG_DEBUG, "moved conn %d out of active list and
freed\n", c_sd);
#ifdef FOR_DEBUGGING
connection_table_dump_active_connections (ct);
@@ -305,7 +305,7 @@ connection_table_move_connection_on_to_active_list(Connection_Table
*ct,Connecti
}
#ifdef FOR_DEBUGGING
- slapi_log_error(SLAPI_LOG_FATAL, "connection", "Moving connection into
active list\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "connection", "Moving
connection into active list\n");
connection_table_dump_active_connection (c);
#endif
diff --git a/ldap/servers/slapd/control.c b/ldap/servers/slapd/control.c
index dd435ba..1721d38 100644
--- a/ldap/servers/slapd/control.c
+++ b/ldap/servers/slapd/control.c
@@ -39,7 +39,7 @@ init_controls( void )
supported_controls_lock = slapi_new_rwlock();
if (NULL == supported_controls_lock) {
/* Out of resources */
- slapi_log_error(SLAPI_LOG_FATAL, "startup",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "startup",
"init_controls: failed to create lock.\n");
exit (1);
}
@@ -249,7 +249,7 @@ get_ldapmessage_controls_ext(
*/
if ( pb->pb_conn != NULL
&& pb->pb_conn->c_ldapversion < LDAP_VERSION3 ) {
- slapi_log_error( SLAPI_LOG_FATAL, "connection",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "connection",
"received control(s) on an LDAPv%d connection\n",
pb->pb_conn->c_ldapversion );
return( LDAP_PROTOCOL_ERROR );
@@ -338,7 +338,7 @@ get_ldapmessage_controls_ext(
slapi_pblock_set(pb, SLAPI_REQCONTROLS, NULL);
slapi_pblock_set(pb, SLAPI_MANAGEDSAIT, &ctrl_not_found);
slapi_pblock_set(pb, SLAPI_PWPOLICY, &ctrl_not_found);
- slapi_log_error(SLAPI_LOG_CONNS, "connection", "Warning:
conn=%" NSPRIu64 " op=%d contains an empty list of controls\n",
+ slapi_log_error(SLAPI_LOG_CONNS, LOG_DEBUG, "connection",
"Warning: conn=%" NSPRIu64 " op=%d contains an empty list of
controls\n",
pb->pb_conn->c_connid, pb->pb_op->o_opid);
} else {
/* len, ber_len_t is uint, not int, cannot be != -1, may be better to
remove this check. */
diff --git a/ldap/servers/slapd/csn.c b/ldap/servers/slapd/csn.c
index 203789d..ddf8404 100644
--- a/ldap/servers/slapd/csn.c
+++ b/ldap/servers/slapd/csn.c
@@ -356,7 +356,7 @@ int csn_increment_subsequence (CSN *csn)
}
else if (csn->subseqnum == maxsubseq)
{
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"csn_increment_subsequence: subsequence overflow\n");
return -1;
diff --git a/ldap/servers/slapd/csngen.c b/ldap/servers/slapd/csngen.c
index 9d2a6ca..aba2ff6 100644
--- a/ldap/servers/slapd/csngen.c
+++ b/ldap/servers/slapd/csngen.c
@@ -114,7 +114,7 @@ csngen_new (ReplicaId rid, Slapi_Attr *state)
gen = (CSNGen*)slapi_ch_calloc (1, sizeof (CSNGen));
if (gen == NULL)
{
- slapi_log_error (SLAPI_LOG_FATAL, NULL, "csngen_new: memory allocation
failed\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "csngen_new: memory allocation
failed\n");
return NULL;
}
@@ -122,7 +122,7 @@ csngen_new (ReplicaId rid, Slapi_Attr *state)
gen->lock = slapi_new_rwlock();
if (gen->lock == NULL)
{
- slapi_log_error (SLAPI_LOG_FATAL, NULL, "csngen_new: failed to create
lock\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "csngen_new: failed to create
lock\n");
rc = CSN_NSPR_ERROR;
goto done;
}
@@ -186,14 +186,14 @@ csngen_new_csn (CSNGen *gen, CSN **csn, PRBool notify)
if (gen == NULL || csn == NULL)
{
- slapi_log_error (SLAPI_LOG_FATAL, NULL, "csngen_new_csn: invalid
argument\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "csngen_new_csn: invalid
argument\n");
return CSN_INVALID_PARAMETER;
}
*csn = csn_new ();
if (*csn == NULL)
{
- slapi_log_error (SLAPI_LOG_FATAL, NULL, "csngen_new_csn: memory allocation
failed\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "csngen_new_csn: memory allocation
failed\n");
return CSN_MEMORY_ERROR;
}
@@ -224,7 +224,7 @@ csngen_new_csn (CSNGen *gen, CSN **csn, PRBool notify)
* Beyond 300 secs, we advance gen->state.sampled_time by
* one sec to recycle seqnum.
*/
- slapi_log_error (SLAPI_LOG_FATAL, "csngen_new_csn", "Warning: too
much time skew (%d secs). Current seqnum=%0x\n", delta, gen->state.seq_num );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "csngen_new_csn",
"Warning: too much time skew (%d secs). Current seqnum=%0x\n", delta,
gen->state.seq_num );
rc = _csngen_adjust_local_time (gen, gen->state.sampled_time+1);
if (rc != CSN_SUCCESS)
{
@@ -236,7 +236,7 @@ csngen_new_csn (CSNGen *gen, CSN **csn, PRBool notify)
if (gen->state.seq_num == CSN_MAX_SEQNUM)
{
- slapi_log_error (SLAPI_LOG_FATAL, NULL, "csngen_new_csn: sequence rollover;
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "csngen_new_csn: sequence
rollover; "
"local offset updated.\n");
gen->state.local_offset ++;
gen->state.seq_num = 0;
@@ -303,7 +303,7 @@ int csngen_adjust_time(CSNGen *gen, const CSN* csn)
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
cur_time = CSN_CALC_TSTAMP(gen);
- slapi_log_error (SLAPI_LOG_REPL, NULL, "csngen_adjust_time: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "csngen_adjust_time:
"
"gen state before %08lx%04x:%ld:%ld:%ld\n",
cur_time, gen->state.seq_num,
gen->state.sampled_time,
@@ -352,7 +352,7 @@ int csngen_adjust_time(CSNGen *gen, const CSN* csn)
}
else /* remote_offset > CSN_MAX_TIME_ADJUST */
{
- slapi_log_error (SLAPI_LOG_FATAL, NULL, "csngen_adjust_time: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "csngen_adjust_time: "
"adjustment limit exceeded; value - %ld, limit -
%ld\n",
remote_offset, (long)CSN_MAX_TIME_ADJUST);
slapi_rwlock_unlock (gen->lock);
@@ -378,7 +378,7 @@ int csngen_adjust_time(CSNGen *gen, const CSN* csn)
gen->state.seq_num = remote_seqnum + 1;
}
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error (SLAPI_LOG_REPL, NULL, "csngen_adjust_time: "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "csngen_adjust_time: "
"gen state after %08lx%04x:%ld:%ld:%ld\n",
new_time, gen->state.seq_num,
gen->state.sampled_time,
@@ -473,12 +473,12 @@ void csngen_dump_state (const CSNGen *gen)
if (gen)
{
slapi_rwlock_rdlock (gen->lock);
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "CSN generator's
state:\n");
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "\treplica id: %d\n",
gen->state.rid);
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "\tsampled time: %ld\n",
gen->state.sampled_time);
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "\tlocal offset: %ld\n",
gen->state.local_offset);
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "\tremote offset: %ld\n",
gen->state.remote_offset);
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "\tsequence number: %d\n",
gen->state.seq_num);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "CSN generator's
state:\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "\treplica id: %d\n",
gen->state.rid);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "\tsampled time:
%ld\n", gen->state.sampled_time);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "\tlocal offset:
%ld\n", gen->state.local_offset);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "\tremote offset:
%ld\n", gen->state.remote_offset);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "\tsequence number:
%d\n", gen->state.seq_num);
slapi_rwlock_unlock (gen->lock);
}
}
@@ -491,7 +491,7 @@ void csngen_test ()
int rc;
CSNGen *gen = csngen_new (255, NULL);
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "staring csn generator test ...");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "staring csn generator test
...");
csngen_dump_state (gen);
rc = _csngen_start_test_threads(gen);
@@ -502,7 +502,7 @@ void csngen_test ()
_csngen_stop_test_threads();
csngen_dump_state (gen);
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "csn generator test is
complete...");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "csn generator test is
complete...");
}
/*
@@ -523,7 +523,7 @@ _csngen_parse_state (CSNGen *gen, Slapi_Attr *state)
rc = slapi_attr_first_value(state, &val);
if (rc != 0)
{
- slapi_log_error (SLAPI_LOG_FATAL, NULL, "_csngen_parse_state: invalid state
format\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "_csngen_parse_state: invalid
state format\n");
return CSN_INVALID_FORMAT;
}
@@ -533,7 +533,7 @@ _csngen_parse_state (CSNGen *gen, Slapi_Attr *state)
/* replicaid does not match */
if (rid != gen->state.rid)
{
- slapi_log_error (SLAPI_LOG_FATAL, NULL, "_csngen_parse_state: replica id"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "_csngen_parse_state: replica
id"
" mismatch; current id - %d, replica id in the state -
%d\n",
rid, gen->state.rid);
return CSN_INVALID_FORMAT;
@@ -634,7 +634,7 @@ _csngen_adjust_local_time (CSNGen *gen, time_t cur_time)
time_t ts_after = 0;
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
time_t new_time = CSN_CALC_TSTAMP(gen);
- slapi_log_error (SLAPI_LOG_REPL, NULL, "_csngen_adjust_local_time:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL,
"_csngen_adjust_local_time: "
"gen state before %08lx%04x:%ld:%ld:%ld\n",
new_time, gen->state.seq_num,
gen->state.sampled_time,
@@ -661,7 +661,7 @@ _csngen_adjust_local_time (CSNGen *gen, time_t cur_time)
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
time_t new_time = CSN_CALC_TSTAMP(gen);
- slapi_log_error (SLAPI_LOG_REPL, NULL, "_csngen_adjust_local_time:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL,
"_csngen_adjust_local_time: "
"gen state after %08lx%04x:%ld:%ld:%ld\n",
new_time, gen->state.seq_num,
gen->state.sampled_time,
@@ -674,7 +674,7 @@ _csngen_adjust_local_time (CSNGen *gen, time_t cur_time)
{
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
time_t new_time = CSN_CALC_TSTAMP(gen);
- slapi_log_error (SLAPI_LOG_REPL, NULL, "_csngen_adjust_local_time:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL,
"_csngen_adjust_local_time: "
"gen state back before %08lx%04x:%ld:%ld:%ld\n",
new_time, gen->state.seq_num,
gen->state.sampled_time,
@@ -684,7 +684,7 @@ _csngen_adjust_local_time (CSNGen *gen, time_t cur_time)
if (!ignore_time_skew && (labs (time_diff) > CSN_MAX_TIME_ADJUST))
{
- slapi_log_error (SLAPI_LOG_FATAL, NULL, "_csngen_adjust_local_time:
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"_csngen_adjust_local_time: "
"adjustment limit exceeded; value - %ld, limit -
%d\n",
labs (time_diff), CSN_MAX_TIME_ADJUST);
return CSN_LIMIT_EXCEEDED;
@@ -696,7 +696,7 @@ _csngen_adjust_local_time (CSNGen *gen, time_t cur_time)
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
time_t new_time = CSN_CALC_TSTAMP(gen);
- slapi_log_error (SLAPI_LOG_REPL, NULL, "_csngen_adjust_local_time:
"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL,
"_csngen_adjust_local_time: "
"gen state back after %08lx%04x:%ld:%ld:%ld\n",
new_time, gen->state.seq_num,
gen->state.sampled_time,
@@ -737,7 +737,7 @@ _csngen_start_test_threads(CSNGen *gen)
DEFAULT_THREAD_STACKSIZE) == NULL)
{
PRErrorCode prerr = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"failed to create a CSN generator thread number %d; "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
i, prerr, slapd_pr_strerror(prerr));
return -1;
@@ -752,7 +752,7 @@ _csngen_start_test_threads(CSNGen *gen)
DEFAULT_THREAD_STACKSIZE) == NULL)
{
PRErrorCode prerr = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"failed to create the remote CSN tester thread; "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr));
return -1;
@@ -767,7 +767,7 @@ _csngen_start_test_threads(CSNGen *gen)
{
PRErrorCode prerr = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"failed to create the local CSN tester thread; "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr));
return -1;
@@ -806,12 +806,12 @@ _csngen_gen_tester_main (void *data)
rc = csngen_new_csn (gen, &csn, PR_FALSE);
if (rc != CSN_SUCCESS)
{
- slapi_log_error (SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"failed to generate csn; csn error - %d\n", rc);
}
else
{
- slapi_log_error (SLAPI_LOG_FATAL, NULL, "generate csn %s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "generate csn %s\n",
csn_as_string(csn, PR_FALSE, buff));
}
csn_free(&csn);
@@ -840,7 +840,7 @@ _csngen_remote_tester_main (void *data)
rc = csngen_new_csn (gen, &csn, PR_FALSE);
if (rc != CSN_SUCCESS)
{
- slapi_log_error (SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"failed to generate csn; csn error - %d\n", rc);
}
else
@@ -851,7 +851,7 @@ _csngen_remote_tester_main (void *data)
rc = csngen_adjust_time (gen, csn);
if (rc != CSN_SUCCESS)
{
- slapi_log_error (SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"failed to adjust generator's time; csn error - %d\n", rc);
}
diff --git a/ldap/servers/slapd/daemon.c b/ldap/servers/slapd/daemon.c
index fce22ef..69a0429 100644
--- a/ldap/servers/slapd/daemon.c
+++ b/ldap/servers/slapd/daemon.c
@@ -194,7 +194,7 @@ static PRBool MY_TestAndEnterMonitor(MY_PRMonitor *mon)
PR_ASSERT(mon != NULL);
rv = pthread_mutex_lock(&mon->lock);
if (rv != 0) {
- slapi_log_error(SLAPI_LOG_FATAL ,"TestAndEnterMonitor",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "TestAndEnterMonitor",
"Failed to acquire monitor mutex, error (%d)\n", rv);
return rc;
}
@@ -203,7 +203,7 @@ static PRBool MY_TestAndEnterMonitor(MY_PRMonitor *mon)
goto done;
rv = pthread_mutex_unlock(&mon->lock);
if (rv != 0) {
- slapi_log_error(SLAPI_LOG_FATAL ,"TestAndEnterMonitor",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,"TestAndEnterMonitor",
"Failed to release monitor mutex, error (%d)\n", rv);
}
return PR_FALSE;
@@ -219,7 +219,7 @@ done:
if (rv == PR_SUCCESS) {
rc = PR_TRUE;
} else {
- slapi_log_error(SLAPI_LOG_FATAL ,"TestAndEnterMonitor",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,"TestAndEnterMonitor",
"Failed to release monitor mutex, error (%d)\n", rv);
rc = PR_FALSE;
}
@@ -741,7 +741,7 @@ handle_listeners(Connection_Table *ct)
/* accept() the new connection, put it on the active list for handle_pr_read_ready
*/
int rc = handle_new_connection(ct, SLAPD_INVALID_SOCKET, listenfd, secure, local,
NULL);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_CONNS, "Error accepting new connection
listenfd=%d\n",
+ LDAPDebug1Arg(LDAP_DEBUG_CONNS, LOG_DEBUG, "Error accepting new connection
listenfd=%d\n",
PR_FileDesc2NativeHandle(listenfd));
continue;
}
@@ -806,7 +806,7 @@ convert_pbe_des_to_aes(void)
* Find any entries in cn=config that contain DES passwords and convert
* them to AES
*/
- slapi_log_error(SLAPI_LOG_HOUSE, "convert_pbe_des_to_aes",
+ slapi_log_error(SLAPI_LOG_HOUSE, LOG_DEBUG, "convert_pbe_des_to_aes",
"Converting DES passwords to AES...\n");
for (i = 0; attrs && attrs[i]; i++){
@@ -835,7 +835,7 @@ convert_pbe_des_to_aes(void)
/* decode the DES password */
if(pw_rever_decode(val, &passwd, attrs[i]) == -1){
- slapi_log_error(SLAPI_LOG_FATAL
,"convert_pbe_des_to_aes",
+ slapi_log_error(SLAPI_LOG_FATAL,
LOG_ERR,"convert_pbe_des_to_aes",
"Failed to decode existing DES password for
(%s)\n",
slapi_entry_get_dn(entries[ii]));
rc = -1;
@@ -845,7 +845,7 @@ convert_pbe_des_to_aes(void)
if (rc == 0){
sval = slapi_value_new_string(passwd);
if(pw_rever_encode(&sval, attrs[i]) == -1){
- slapi_log_error(SLAPI_LOG_FATAL,
"convert_pbe_des_to_aes",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"convert_pbe_des_to_aes",
"failed to encode AES password for
(%s)\n",
slapi_entry_get_dn(entries[ii]));
rc = -1;
@@ -869,11 +869,11 @@ convert_pbe_des_to_aes(void)
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT,
&result);
if (LDAP_SUCCESS != result) {
- slapi_log_error(SLAPI_LOG_FATAL,
"convert_pbe_des_to_aes"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"convert_pbe_des_to_aes"
"Failed to convert password for (%s) error
(%d)\n",
slapi_entry_get_dn(entries[ii]), result);
} else {
- slapi_log_error(SLAPI_LOG_HOUSE,
"convert_pbe_des_to_aes",
+ slapi_log_error(SLAPI_LOG_HOUSE, LOG_DEBUG,
"convert_pbe_des_to_aes",
"Successfully converted password for
(%s)\n",
slapi_entry_get_dn(entries[ii]));
converted_des_passwd = 1;
@@ -892,7 +892,7 @@ convert_pbe_des_to_aes(void)
slapi_ch_free_string(&filter);
}
if (!converted_des_passwd){
- slapi_log_error(SLAPI_LOG_HOUSE, "convert_pbe_des_to_aes",
+ slapi_log_error(SLAPI_LOG_HOUSE, LOG_DEBUG,
"convert_pbe_des_to_aes",
"No DES passwords found to convert.\n");
}
}
@@ -914,7 +914,7 @@ ns_disable_listener(listener_info *listener)
/* add the listener to our list of disabled listeners */
PR_StackPush(ns_disabled_listeners, (PRStackElem *)listener);
PR_AtomicIncrement(&num_disabled_listeners);
- LDAPDebug2Args(LDAP_DEBUG_ANY, "ns_disable_listener: "
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "ns_disable_listener: "
"disabling listener for fd [%d]: [%d] now disabled\n",
PR_FileDesc2NativeHandle(listener->listenfd),
num_disabled_listeners);
@@ -937,7 +937,7 @@ ns_enable_listeners()
num_enabled++;
}
if (num_enabled) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "ns_enable_listeners: "
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "ns_enable_listeners: "
"enabled [%d] listeners\n", num_enabled);
}
#endif
@@ -1078,7 +1078,7 @@ void slapd_daemon( daemon_ports_t *ports )
*/
if( config_get_disk_monitoring() ){
if ( ( diskmon_mutex = PR_NewLock() ) == NULL ) {
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"Cannot create new lock for disk space monitoring. "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
PR_GetError(), slapd_pr_strerror( PR_GetError() ));
@@ -1086,7 +1086,7 @@ void slapd_daemon( daemon_ports_t *ports )
}
if ( diskmon_mutex ){
if(( diskmon_cvar = PR_NewCondVar( diskmon_mutex )) == NULL ) {
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"Cannot create new condition variable for disk space monitoring.
"
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
PR_GetError(), slapd_pr_strerror( PR_GetError() ));
@@ -1118,7 +1118,7 @@ void slapd_daemon( daemon_ports_t *ports )
PRErrorCode prerr = PR_GetError();
char addrbuf[ 256 ];
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_daemon",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_daemon",
"PR_Listen() on %s port %d failed: %s error %d (%s)\n",
netaddr2string(*nap, addrbuf, sizeof(addrbuf)),
ports->n_port, SLAPI_COMPONENT_NAME_NSPR, prerr,
@@ -1137,7 +1137,7 @@ void slapd_daemon( daemon_ports_t *ports )
PRErrorCode prerr = PR_GetError();
char addrbuf[ 256 ];
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_daemon",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_daemon",
"PR_Listen() on %s port %d failed: %s error %d (%s)\n",
netaddr2string(*sap, addrbuf, sizeof(addrbuf)),
ports->s_port, SLAPI_COMPONENT_NAME_NSPR, prerr,
@@ -1155,7 +1155,7 @@ void slapd_daemon( daemon_ports_t *ports )
for (fdesp = i_unix; fdesp && *fdesp; fdesp++, iap++) {
if ( PR_Listen(*fdesp, config_get_listen_backlog_size()) == PR_FAILURE) {
PRErrorCode prerr = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_daemon",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_daemon",
"listen() on %s failed: error %d (%s)\n",
(*iap)->local.path,
prerr,
@@ -1848,7 +1848,7 @@ ns_handle_closure(struct ns_job_t *job)
#else
/* This doesn't actually confirm it's in the event loop thread, but it's
a start */
if (NS_JOB_IS_THREAD(ns_job_get_type(job)) != 0) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, "ns_handle_closure: Attempt to close outside of
event loop thread %" NSPRIu64 " for fd=%d\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "ns_handle_closure: Attempt to close
outside of event loop thread %" NSPRIu64 " for fd=%d\n",
c->c_connid, c->c_sd);
return;
}
@@ -1887,7 +1887,7 @@ ns_connection_post_io_or_closing(Connection *conn)
/* there should only ever be 0 or 1 active closure jobs */
PR_ASSERT((conn->c_ns_close_jobs == 0) || (conn->c_ns_close_jobs == 1));
if (conn->c_ns_close_jobs) {
- LDAPDebug2Args(LDAP_DEBUG_CONNS, "already a close job in progress on conn %"
NSPRIu64 " for fd=%d\n",
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, LOG_DEBUG, "already a close job in progress on
conn %" NSPRIu64 " for fd=%d\n",
conn->c_connid, conn->c_sd);
return;
} else {
@@ -1898,7 +1898,7 @@ ns_connection_post_io_or_closing(Connection *conn)
connection_acquire_nolock_ext(conn, 1 /* allow acquire even when closing */); /* event
framework now has a reference */
ns_add_timeout_job(conn->c_tp, &tv, NS_JOB_TIMER,
ns_handle_closure, conn, NULL);
- LDAPDebug2Args(LDAP_DEBUG_CONNS, "post closure job for conn %" NSPRIu64
" for fd=%d\n",
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, LOG_DEBUG, "post closure job for conn %"
NSPRIu64 " for fd=%d\n",
conn->c_connid, conn->c_sd);
}
} else {
@@ -1920,7 +1920,7 @@ ns_connection_post_io_or_closing(Connection *conn)
ns_add_io_timeout_job(conn->c_tp, conn->c_prfd, &tv,
NS_JOB_READ|NS_JOB_PRESERVE_FD,
ns_handle_pr_read_ready, conn, NULL);
- LDAPDebug2Args(LDAP_DEBUG_CONNS, "post I/O job for conn %" NSPRIu64 "
for fd=%d\n",
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, LOG_DEBUG, "post I/O job for conn %"
NSPRIu64 " for fd=%d\n",
conn->c_connid, conn->c_sd);
}
#endif
@@ -1943,14 +1943,14 @@ ns_handle_pr_read_ready(struct ns_job_t *job)
#else
/* This doesn't actually confirm it's in the event loop thread, but it's
a start */
if (NS_JOB_IS_THREAD(ns_job_get_type(job)) != 0) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, "ns_handle_pr_read_ready: Attempt to handle read
ready outside of event loop thread %" NSPRIu64 " for fd=%d\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "ns_handle_pr_read_ready: Attempt to
handle read ready outside of event loop thread %" NSPRIu64 " for fd=%d\n",
c->c_connid, c->c_sd);
return;
}
#endif
PR_EnterMonitor(c->c_mutex);
- LDAPDebug2Args(LDAP_DEBUG_CONNS, "activity on conn %" NSPRIu64 " for
fd=%d\n",
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, LOG_DEBUG, "activity on conn %" NSPRIu64
" for fd=%d\n",
c->c_connid, c->c_sd);
/* if we were called due to some i/o event, see what the state of the socket is */
if (slapi_is_loglevel_set(SLAPI_LOG_CONNS) &&
!NS_JOB_IS_TIMER(ns_job_get_output_type(job)) && c && c->c_sd) {
@@ -1958,13 +1958,13 @@ ns_handle_pr_read_ready(struct ns_job_t *job)
char buf[1];
ssize_t rc = recv(c->c_sd, buf, sizeof(buf), MSG_PEEK);
if (!rc) {
- LDAPDebug2Args(LDAP_DEBUG_CONNS, "socket is closed conn %" NSPRIu64 "
for fd=%d\n",
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, LOG_DEBUG, "socket is closed conn %"
NSPRIu64 " for fd=%d\n",
c->c_connid, c->c_sd);
} else if (rc > 0) {
- LDAPDebug2Args(LDAP_DEBUG_CONNS, "socket read data available for conn %"
NSPRIu64 " for fd=%d\n",
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, LOG_DEBUG, "socket read data available for conn
%" NSPRIu64 " for fd=%d\n",
c->c_connid, c->c_sd);
} else if ((errno == EAGAIN) || (errno == EWOULDBLOCK)) {
- LDAPDebug2Args(LDAP_DEBUG_CONNS, "socket has no data available conn %"
NSPRIu64 " for fd=%d\n",
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, LOG_DEBUG, "socket has no data available conn
%" NSPRIu64 " for fd=%d\n",
c->c_connid, c->c_sd);
} else {
LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG, "socket has error [%d] conn %"
NSPRIu64 " for fd=%d\n",
@@ -1984,7 +1984,7 @@ ns_handle_pr_read_ready(struct ns_job_t *job)
/* This might happen as a result of
* trying to acquire a closing connection
*/
- LDAPDebug2Args(LDAP_DEBUG_ANY, "connection_activity: abandoning conn %"
NSPRIu64
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "connection_activity: abandoning conn
%" NSPRIu64
" as fd=%d is already closing\n", c->c_connid, c->c_sd);
/* The call disconnect_server should do nothing,
* as the connection c should be already set to CLOSING */
@@ -1993,7 +1993,7 @@ ns_handle_pr_read_ready(struct ns_job_t *job)
0 /* do not schedule closure, do it next */);
ns_handle_closure_nomutex(c);
} else {
- LDAPDebug2Args(LDAP_DEBUG_CONNS, "queued conn %" NSPRIu64 " for
fd=%d\n",
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, LOG_DEBUG, "queued conn %" NSPRIu64 "
for fd=%d\n",
c->c_connid, c->c_sd);
}
PR_ExitMonitor(c->c_mutex);
@@ -2932,7 +2932,7 @@ createprlistensockets(PRUint16 port, PRNetAddr **listenaddr,
}
if (0 == sockcnt) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"There is no address to listen\n");
goto failed;
}
@@ -2954,7 +2954,7 @@ createprlistensockets(PRUint16 port, PRNetAddr **listenaddr,
}
if ((sock[i] = PR_OpenTCPSocket(socktype)) == SLAPD_INVALID_SOCKET) {
prerr = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"PR_OpenTCPSocket(%s) failed: %s error %d (%s)\n",
socktype_str,
SLAPI_COMPONENT_NAME_NSPR, prerr, slapd_pr_strerror(prerr));
@@ -2963,7 +2963,7 @@ createprlistensockets(PRUint16 port, PRNetAddr **listenaddr,
if ( PR_SetSocketOption(sock[i], &pr_socketoption ) == PR_FAILURE) {
prerr = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"PR_SetSocketOption(PR_SockOpt_Reuseaddr) failed: %s error %d (%s)\n",
SLAPI_COMPONENT_NAME_NSPR, prerr, slapd_pr_strerror( prerr ));
goto failed;
@@ -2979,7 +2979,7 @@ createprlistensockets(PRUint16 port, PRNetAddr **listenaddr,
prerr = PR_GetError();
if(!local)
{
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"PR_Bind() on %s port %d failed: %s error %d (%s)\n",
netaddr2string(&sa_server, addrbuf, sizeof(addrbuf)), port,
SLAPI_COMPONENT_NAME_NSPR, prerr, slapd_pr_strerror(prerr));
@@ -2987,7 +2987,7 @@ createprlistensockets(PRUint16 port, PRNetAddr **listenaddr,
#if defined(ENABLE_LDAPI)
else
{
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"PR_Bind() on %s file %s failed: %s error %d (%s)\n",
netaddr2string(&sa_server, addrbuf, sizeof(addrbuf)),
sa_server.local.path,
@@ -3003,7 +3003,7 @@ createprlistensockets(PRUint16 port, PRNetAddr **listenaddr,
if(chmod((*listenaddr)->local.path,
S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH))
{
- slapi_log_error(SLAPI_LOG_FATAL, logname, "err: %d", errno);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname, "err: %d", errno);
}
}
#endif /* ENABLE_LDAPI */
@@ -3037,7 +3037,7 @@ slapd_listenhost2addr(const char *listenhost, PRNetAddr ***addr)
/* listen on all interfaces */
if ( PR_SUCCESS != PR_SetNetAddr(PR_IpAddrAny, PR_AF_INET6, 0, netaddr)) {
prerr = PR_GetError();
- slapi_log_error( SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"PR_SetNetAddr(PR_IpAddrAny) failed - %s error %d (%s)\n",
SLAPI_COMPONENT_NAME_NSPR, prerr, slapd_pr_strerror(prerr));
rval = -1;
@@ -3063,7 +3063,7 @@ slapd_listenhost2addr(const char *listenhost, PRNetAddr ***addr)
addrcnt++;
}
if ( 0 == addrcnt ) {
- slapi_log_error( SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"PR_EnumerateAddrInfo for %s failed - %s error %d (%s)\n",
listenhost, SLAPI_COMPONENT_NAME_NSPR, prerr,
slapd_pr_strerror(prerr));
@@ -3096,12 +3096,12 @@ slapd_listenhost2addr(const char *listenhost, PRNetAddr ***addr)
}
}
if (charray_inlist(strnetaddrs, abp)) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"slapd_listenhost2addr: "
"detected duplicated address %s "
"[%s]\n", abuf, abp);
} else {
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"slapd_listenhost2addr: "
"registering address %s\n", abp);
slapi_ch_array_add(&strnetaddrs, slapi_ch_strdup(abp));
@@ -3115,7 +3115,7 @@ slapd_listenhost2addr(const char *listenhost, PRNetAddr ***addr)
}
PR_FreeAddrInfo( infop );
} else {
- slapi_log_error( SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"PR_GetAddrInfoByName(%s) failed - %s error %d (%s)\n",
listenhost, SLAPI_COMPONENT_NAME_NSPR, prerr,
slapd_pr_strerror(prerr));
@@ -3292,7 +3292,7 @@ int configure_pr_socket( PRFileDesc **pr_socket, int secure, int
local )
PRFileDesc *nspr_layer_fd = PR_GetIdentitiesLayer( *pr_socket,
PR_NSPR_IO_LAYER );
if ( NULL == nspr_layer_fd ) {
- slapi_log_error( SLAPI_LOG_FATAL, "configure_pr_socket",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "configure_pr_socket",
"Unable to move socket file descriptor %d above %d:"
" PR_GetIdentitiesLayer( %p, PR_NSPR_IO_LAYER )"
" failed\n", ns, reservedescriptors, *pr_socket );
@@ -3304,7 +3304,7 @@ int configure_pr_socket( PRFileDesc **pr_socket, int secure, int
local )
}
} else {
int oserr = errno;
- slapi_log_error(SLAPI_LOG_FATAL, "configure_pr_socket",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "configure_pr_socket",
"Unable to move socket file descriptor %d above %d:"
" OS error %d (%s)\n", ns, reservedescriptors, oserr,
slapd_system_strerror( oserr ) );
diff --git a/ldap/servers/slapd/delete.c b/ldap/servers/slapd/delete.c
index da236fd..eb7887a 100644
--- a/ldap/servers/slapd/delete.c
+++ b/ldap/servers/slapd/delete.c
@@ -89,7 +89,7 @@ do_delete( Slapi_PBlock *pb )
goto free_and_return;
}
- LDAPDebug1Arg( LDAP_DEBUG_ARGS, "do_delete: dn (%s)\n", rawdn );
+ LDAPDebug1Arg( LDAP_DEBUG_ARGS, LOG_DEBUG, "do_delete: dn (%s)\n", rawdn );
slapi_pblock_set( pb, SLAPI_REQUESTOR_ISROOT, &pb->pb_op->o_isroot );
slapi_pblock_set( pb, SLAPI_ORIGINAL_TARGET, rawdn);
@@ -166,7 +166,7 @@ slapi_delete_internal_set_pb (Slapi_PBlock *pb,
PR_ASSERT (pb != NULL);
if (pb == NULL || rawdn == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"slapi_delete_internal_set_pb: NULL parameter\n");
return;
}
diff --git a/ldap/servers/slapd/detach.c b/ldap/servers/slapd/detach.c
index a6f4ec4..cd27993 100644
--- a/ldap/servers/slapd/detach.c
+++ b/ldap/servers/slapd/detach.c
@@ -61,10 +61,10 @@ set_workingdir(void)
rc = chdir("/");
if (0 == rc) {
if (config_set_workingdir(CONFIG_WORKINGDIR_ATTRIBUTE, "/", errorbuf, 1) ==
LDAP_OPERATIONS_ERROR) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: set workingdir failed with
\"%s\"\n", errorbuf);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "detach: set workingdir failed with
\"%s\"\n", errorbuf);
}
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: failed to chdir to %s\n",
"/");
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "detach: failed to chdir to %s\n",
"/");
}
} else {
ptr = strrchr(errorlog, '/');
@@ -74,25 +74,25 @@ set_workingdir(void)
rc = chdir(errorlog);
if (0 == rc) {
if (config_set_workingdir(CONFIG_WORKINGDIR_ATTRIBUTE, errorlog, errorbuf, 1) ==
LDAP_OPERATIONS_ERROR) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: set workingdir failed with
\"%s\"\n", errorbuf);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "detach: set workingdir failed with
\"%s\"\n", errorbuf);
rc = chdir("/");
if (0 == rc) {
if (config_set_workingdir(CONFIG_WORKINGDIR_ATTRIBUTE, "/", errorbuf, 1)
== LDAP_OPERATIONS_ERROR) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: set workingdir failed with
\"%s\"\n", errorbuf);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "detach: set workingdir failed with
\"%s\"\n", errorbuf);
}
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: failed to chdir to %s\n",
"/");
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "detach: failed to chdir to %s\n",
"/");
}
}
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: failed to chdir to %s\n",
errorlog);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "detach: failed to chdir to %s\n",
errorlog);
rc = chdir("/");
if (0 == rc) {
if (config_set_workingdir(CONFIG_WORKINGDIR_ATTRIBUTE, "/", errorbuf, 1)
== LDAP_OPERATIONS_ERROR) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: set workingdir failed with
\"%s\"\n", errorbuf);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "detach: set workingdir failed with
\"%s\"\n", errorbuf);
}
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: failed to chdir to %s\n",
"/");
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "detach: failed to chdir to %s\n",
"/");
}
}
slapi_ch_free_string(&errorlog);
@@ -100,19 +100,19 @@ set_workingdir(void)
} else {
/* calling config_set_workingdir to check for validity of directory, don't apply
*/
if (config_set_workingdir(CONFIG_WORKINGDIR_ATTRIBUTE, workingdir, errorbuf, 0) ==
LDAP_OPERATIONS_ERROR) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: set workingdir failed with
\"%s\"\n", errorbuf);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "detach: set workingdir failed with
\"%s\"\n", errorbuf);
rc = chdir("/");
if (0 == rc) {
if (config_set_workingdir(CONFIG_WORKINGDIR_ATTRIBUTE, "/", errorbuf, 1) ==
LDAP_OPERATIONS_ERROR) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: set workingdir failed with
\"%s\"\n", errorbuf);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "detach: set workingdir failed with
\"%s\"\n", errorbuf);
}
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: failed to chdir to %s\n",
"/");
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "detach: failed to chdir to %s\n",
"/");
}
} else {
rc = chdir(workingdir);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: failed to chdir to %s\n",
workingdir);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "detach: failed to chdir to %s\n",
workingdir);
}
}
slapi_ch_free_string(&workingdir);
@@ -152,7 +152,7 @@ detach( int slapd_exemode, int importexport_encrypt,
}
if (set_workingdir()) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "detach: set_workingdir failed.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "detach: set_workingdir
failed.\n");
}
if ( (sd = open( "/dev/null", O_RDWR )) == -1 ) {
@@ -179,7 +179,7 @@ detach( int slapd_exemode, int importexport_encrypt,
return 1;
}
if (set_workingdir()) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "detach: set_workingdir failed.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "detach: set_workingdir
failed.\n");
}
}
diff --git a/ldap/servers/slapd/dn.c b/ldap/servers/slapd/dn.c
index 1767073..a5d0e84 100644
--- a/ldap/servers/slapd/dn.c
+++ b/ldap/servers/slapd/dn.c
@@ -2797,7 +2797,7 @@ ndn_cache_init()
ndn_started = 1;
if ( NULL == ( lru_lock = PR_NewLock()) || NULL == ( ndn_cache_lock =
slapi_new_rwlock())) {
ndn_cache_destroy();
- slapi_log_error( SLAPI_LOG_FATAL, "ndn_cache_init", "Failed to
create locks. Disabling cache.\n" );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ndn_cache_init",
"Failed to create locks. Disabling cache.\n" );
}
}
@@ -2951,7 +2951,7 @@ ndn_cache_add(char *dn, size_t dn_len, char *ndn, size_t ndn_len)
*/
new_node = (struct ndn_cache_lru *)slapi_ch_malloc(sizeof(struct ndn_cache_lru));
if(new_node == NULL){
- slapi_log_error( SLAPI_LOG_FATAL, "ndn_cache_add", "Failed to
allocate new lru node.\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ndn_cache_add", "Failed
to allocate new lru node.\n");
return;
}
new_node->prev = NULL;
@@ -2974,7 +2974,7 @@ ndn_cache_add(char *dn, size_t dn_len, char *ndn, size_t ndn_len)
ht_entry = (struct ndn_hash_val *)slapi_ch_malloc(sizeof(struct ndn_hash_val));
if(ht_entry == NULL){
slapi_rwlock_unlock(ndn_cache_lock);
- slapi_log_error( SLAPI_LOG_FATAL, "ndn_cache_add", "Failed to
allocate new hash entry.\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ndn_cache_add", "Failed
to allocate new hash entry.\n");
slapi_ch_free_string(&new_node->key);
slapi_ch_free((void **)&new_node);
return;
@@ -3012,7 +3012,7 @@ ndn_cache_add(char *dn, size_t dn_len, char *ndn, size_t ndn_len)
*/
he = PL_HashTableAdd(ndn_cache_hashtable, new_node->key, (void *)ht_entry);
if(he == NULL){
- slapi_log_error( SLAPI_LOG_FATAL, "ndn_cache_add", "Failed to add
new entry to hash(%s)\n",dn);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ndn_cache_add", "Failed
to add new entry to hash(%s)\n",dn);
} else {
ndn_cache->cache_count++;
ndn_cache->cache_size += size;
@@ -3044,7 +3044,7 @@ ndn_cache_flush(void)
slapi_ch_free((void **)&flush_node);
}
- slapi_log_error( SLAPI_LOG_CACHE, "ndn_cache_flush","Flushed
cache.\n");
+ slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG, "ndn_cache_flush","Flushed
cache.\n");
}
static void
diff --git a/ldap/servers/slapd/dse.c b/ldap/servers/slapd/dse.c
index 9317108..410cd6c 100644
--- a/ldap/servers/slapd/dse.c
+++ b/ldap/servers/slapd/dse.c
@@ -448,8 +448,8 @@ dse_destroy(struct dse *pdse)
slapi_destroy_rwlock(pdse->dse_rwlock);
}
slapi_ch_free((void **)&pdse);
- LDAPDebug( SLAPI_DSE_TRACELEVEL, "Removed [%d] entries from the dse
tree.\n",
- nentries,0,0 );
+ LDAPDebug( SLAPI_DSE_TRACELEVEL, LOG_DEBUG, "Removed [%d] entries from the dse
tree.\n",
+ nentries,0,0 );
return 0; /* no one checks this return value */
}
@@ -555,7 +555,7 @@ dse_updateNumSubordinates(Slapi_Entry *entry, int op)
if (!already_present)
{
/* This means that something is wrong---deleting a child but no subcount present on
parent */
- slapi_log_error( SLAPI_LOG_FATAL, "dse",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "dse",
"numsubordinates assertion failure\n" );
return;
}
@@ -657,11 +657,11 @@ dse_check_file(char *filename, char *backupname)
return (0);
if ( PR_GetFileInfo64( filename, &prfinfo ) == PR_SUCCESS && prfinfo.size
> 0 ) {
- slapi_log_error(SLAPI_LOG_FATAL, "dse",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "dse",
"The configuration file %s was restored from backup %s\n",
filename, backupname);
return (1);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, "dse",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "dse",
"The configuration file %s was not restored from backup %s, error
%d\n",
filename, backupname, rc);
return (0);
@@ -692,14 +692,14 @@ dse_read_one_file(struct dse *pdse, const char *filename,
Slapi_PBlock *pb,
if ( (rc = PR_GetFileInfo64( filename, &prfinfo )) != PR_SUCCESS )
{
- slapi_log_error(SLAPI_LOG_FATAL, "dse",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "dse",
"The configuration file %s could not be accessed, error
%d\n",
filename, rc);
rc = 0; /* Fail */
}
else if (( prfd = PR_Open( filename, PR_RDONLY, SLAPD_DEFAULT_FILE_MODE )) ==
NULL )
{
- slapi_log_error(SLAPI_LOG_FATAL, "dse",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "dse",
"The configuration file %s could not be read. "
SLAPI_COMPONENT_NAME_NSPR " %d (%s)\n",
filename,
@@ -713,7 +713,7 @@ dse_read_one_file(struct dse *pdse, const char *filename, Slapi_PBlock
*pb,
buf = slapi_ch_malloc( prfinfo.size + 1 );
if (( nr = slapi_read_buffer( prfd, buf, prfinfo.size )) < 0 )
{
- slapi_log_error(SLAPI_LOG_FATAL, "dse",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "dse",
"Could only read %d of %ld bytes from config file
%s\n",
nr, (long int)prfinfo.size, filename);
rc = 0; /* Fail */
@@ -765,7 +765,7 @@ dse_read_one_file(struct dse *pdse, const char *filename, Slapi_PBlock
*pb,
int returncode = 0;
char returntext[SLAPI_DSE_RETURNTEXT_SIZE]= {0};
- slapi_log_error(SLAPI_LOG_TRACE, "dse_read_one_file",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG,
"dse_read_one_file",
" processing entry \"%s\" in file %s%s
"
"(lineno: %d)\n",
slapi_entry_get_dn_const(e), filename,
@@ -792,7 +792,7 @@ dse_read_one_file(struct dse *pdse, const char *filename, Slapi_PBlock
*pb,
}
else /* free entry if not used */
{
- slapi_log_error(SLAPI_LOG_FATAL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"dse_read_one_file",
"The entry %s in file %s "
"(lineno: %d) is invalid, "
@@ -805,11 +805,11 @@ dse_read_one_file(struct dse *pdse, const char *filename,
Slapi_PBlock *pb,
rc = 0; /* failure */
}
} else {
- slapi_log_error( SLAPI_LOG_FATAL, "dse_read_one_file",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"dse_read_one_file",
"Parsing entry (lineno: %d) "
"in file %s failed.\n",
lineno, filename );
- slapi_log_error( SLAPI_LOG_FATAL, "dse_read_one_file",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"dse_read_one_file",
"Invalid section [%s%s]\n",
errbuf, cpylen==estrlen?"":"
..." );
rc = 0; /* failure */
@@ -909,8 +909,8 @@ dse_rw_permission_to_one_file(const char *name, int loglevel)
}
if ( prerr != 0 ) {
- slapi_log_error( loglevel, "dse", "Unable to %s \"%s\":
"
- SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
+ slapi_log_error( loglevel, loglevel==SLAPI_LOG_FATAL?LOG_ERR:LOG_DEBUG,
+ "dse", "Unable to %s \"%s\": "SLAPI_COMPONENT_NAME_NSPR
" error %d (%s)\n",
accesstype, name, prerr, slapd_pr_strerror(prerr));
return 0; /* insufficient permission */
} else {
@@ -957,7 +957,7 @@ dse_check_for_readonly_error(Slapi_PBlock *pb, struct dse* pdse)
if ( !pdse->dse_is_updateable ) {
if ( !pdse->dse_readonly_error_reported ) {
if ( NULL != pdse->dse_filename ) {
- slapi_log_error( SLAPI_LOG_FATAL, "dse",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "dse",
"The DSE database stored in \"%s\" is not writeable\n",
pdse->dse_filename );
/* log the details too */
@@ -1000,7 +1000,7 @@ dse_write_file_nolock(struct dse* pdse)
if (( fpw.fpw_prfd = PR_Open( pdse->dse_tmpfile, PR_RDWR | PR_CREATE_FILE |
PR_TRUNCATE, SLAPD_DEFAULT_FILE_MODE )) == NULL )
{
rc = PR_GetOSError();
- slapi_log_error( SLAPI_LOG_FATAL, "dse", "Cannot open "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "dse", "Cannot open "
"temporary DSE file \"%s\" for update: OS error %d (%s)\n",
pdse->dse_tmpfile, rc, slapd_system_strerror( rc ));
}
@@ -1010,7 +1010,7 @@ dse_write_file_nolock(struct dse* pdse)
if ( avl_apply( pdse->dse_tree, dse_write_entry, &fpw, STOP_TRAVERSAL,
AVL_INORDER ) == STOP_TRAVERSAL )
{
rc = fpw.fpw_rc;
- slapi_log_error( SLAPI_LOG_FATAL, "dse", "Cannot write
"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "dse", "Cannot
write "
" temporary DSE file \"%s\": OS error %d (%s)\n",
pdse->dse_tmpfile, rc, slapd_system_strerror( rc ));
(void)PR_Close( fpw.fpw_prfd );
@@ -1025,7 +1025,7 @@ dse_write_file_nolock(struct dse* pdse)
rc = slapi_destructive_rename( pdse->dse_filename, pdse->dse_fileback );
if ( rc != 0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, "dse", "Cannot backup"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "dse", "Cannot
backup"
" DSE file \"%s\" to \"%s\": OS error %d (%s)\n",
pdse->dse_filename, pdse->dse_fileback,
rc, slapd_system_strerror( rc ));
@@ -1034,7 +1034,7 @@ dse_write_file_nolock(struct dse* pdse)
rc = slapi_destructive_rename( pdse->dse_tmpfile, pdse->dse_filename );
if ( rc != 0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, "dse", "Cannot
rename"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "dse",
"Cannot rename"
" temporary DSE file \"%s\" to \"%s\":"
" OS error %d (%s)\n",
pdse->dse_tmpfile, pdse->dse_filename,
@@ -1722,7 +1722,7 @@ dse_search(Slapi_PBlock *pb) /* JCM There should only be one exit
point from thi
if ( baseentry == NULL )
{
slapi_send_ldap_result( pb, LDAP_NO_SUCH_OBJECT, NULL, NULL, 0, NULL );
- slapi_log_error(SLAPI_LOG_PLUGIN,"dse_search", "node %s was not
found\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,"dse_search", "node %s was
not found\n",
slapi_sdn_get_dn(basesdn));
return -1;
}
@@ -1866,12 +1866,12 @@ dse_modify(Slapi_PBlock *pb) /* JCM There should only be one exit
point from thi
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &returncode);
}
if (rc || returncode) {
- LDAPDebug( SLAPI_DSE_TRACELEVEL,
+ LDAPDebug( SLAPI_DSE_TRACELEVEL, LOG_DEBUG,
"dse_modify: SLAPI_PLUGIN_BE_TXN_PRE_MODIFY_FN failed -
rc %d LDAP error %d:%s\n",
rc, returncode, ldap_err2string(returncode));
}
} else {
- LDAPDebug( SLAPI_DSE_TRACELEVEL,
+ LDAPDebug( SLAPI_DSE_TRACELEVEL, LOG_DEBUG,
"dse_modify: SLAPI_PLUGIN_BE_PRE_MODIFY_FN failed - rc %d
LDAP error %d:%s\n",
rc, returncode, ldap_err2string(returncode));
}
@@ -1879,7 +1879,7 @@ dse_modify(Slapi_PBlock *pb) /* JCM There should only be one exit
point from thi
char *ldap_result_message = NULL;
rc = SLAPI_DSE_CALLBACK_ERROR;
if (!returncode) {
- LDAPDebug0Args( SLAPI_DSE_TRACELEVEL,
+ LDAPDebug0Args( SLAPI_DSE_TRACELEVEL, LOG_DEBUG,
"dse_modify: PRE_MODIFY plugin returned non-zero but
did not set an LDAP error\n");
returncode = LDAP_OPERATIONS_ERROR;
}
@@ -2075,7 +2075,7 @@ dse_pre_modify_plugin(Slapi_Entry *entryBefore, Slapi_Entry
*entryAfter, LDAPMod
}
if(restart_plugin){ /* for all other plugin config changes, restart the
plugin */
if(plugin_restart(entryBefore, entryAfter) != LDAP_SUCCESS){
- slapi_log_error(SLAPI_LOG_FATAL,"dse_pre_modify_plugin",
+ slapi_log_error(SLAPI_LOG_FATAL,
LOG_ERR,"dse_pre_modify_plugin",
"The configuration change for plugin (%s) could not be
applied.\n",
slapi_entry_get_dn(entryBefore));
rc = -1;
@@ -2110,7 +2110,7 @@ dse_modify_plugin(Slapi_Entry *pre_entry, Slapi_Entry *post_entry,
char *returnt
rc = -1;
} else {
rc = 2; /* plugin disabled */
- slapi_log_error(SLAPI_LOG_PLUGIN,"dse_modify_plugin",
"Disabled plugin (%s)\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,"dse_modify_plugin",
"Disabled plugin (%s)\n",
slapi_entry_get_dn(post_entry));
}
} else if ( slapi_entry_attr_hasvalue(pre_entry, "nsslapd-pluginEnabled",
"off") &&
@@ -2123,7 +2123,7 @@ dse_modify_plugin(Slapi_Entry *pre_entry, Slapi_Entry *post_entry,
char *returnt
rc = -1;
} else {
rc = 1; /* plugin started */
- slapi_log_error(SLAPI_LOG_PLUGIN,"dse_modify_plugin", "Enabled
plugin (%s)\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,"dse_modify_plugin",
"Enabled plugin (%s)\n",
slapi_entry_get_dn(post_entry));
}
}
@@ -2223,7 +2223,7 @@ dse_add(Slapi_PBlock *pb) /* JCM There should only be one exit point
from this f
*/
if ( slapi_entry_schema_check( pb, e ) != 0 ) {
char *errtext;
- LDAPDebug( SLAPI_DSE_TRACELEVEL,
+ LDAPDebug( SLAPI_DSE_TRACELEVEL, LOG_DEBUG,
"dse_add: entry failed schema check\n", 0, 0, 0 );
slapi_pblock_get(pb, SLAPI_PB_RESULT_TEXT, &errtext);
if (errtext && errtext[0]) {
@@ -2237,7 +2237,7 @@ dse_add(Slapi_PBlock *pb) /* JCM There should only be one exit point
from this f
/* Check if the attribute values in the entry obey the syntaxes */
if ( slapi_entry_syntax_check( pb, e, 0 ) != 0 ) {
char *errtext;
- LDAPDebug( SLAPI_DSE_TRACELEVEL,
+ LDAPDebug( SLAPI_DSE_TRACELEVEL, LOG_DEBUG,
"dse_add: entry failed syntax check\n", 0, 0, 0 );
slapi_pblock_get(pb, SLAPI_PB_RESULT_TEXT, &errtext);
if (errtext && errtext[0]) {
@@ -2277,7 +2277,7 @@ dse_add(Slapi_PBlock *pb) /* JCM There should only be one exit point
from this f
parententry= dse_get_entry_copy( pdse, &parent, DSE_USE_LOCK );
if( parententry==NULL ) {
rc = LDAP_NO_SUCH_OBJECT;
- LDAPDebug( SLAPI_DSE_TRACELEVEL, "dse_add: parent does not
exist\n", 0, 0, 0 );
+ LDAPDebug( SLAPI_DSE_TRACELEVEL, LOG_DEBUG," dse_add: parent does not
exist\n", 0, 0, 0 );
slapi_sdn_done(&parent);
e = NULL; /* caller will free upon error */
goto done;
@@ -2285,7 +2285,7 @@ dse_add(Slapi_PBlock *pb) /* JCM There should only be one exit point
from this f
rc= plugin_call_acl_plugin ( pb, parententry, NULL, NULL, SLAPI_ACL_ADD,
ACLPLUGIN_ACCESS_DEFAULT, &errbuf );
slapi_entry_free(parententry);
if ( rc!=LDAP_SUCCESS ) {
- LDAPDebug( SLAPI_DSE_TRACELEVEL, "dse_add: no access to parent\n",
0, 0, 0 );
+ LDAPDebug( SLAPI_DSE_TRACELEVEL, LOG_DEBUG, "dse_add: no access to
parent\n", 0, 0, 0 );
if (errbuf && errbuf[0]) {
PL_strncpyz(returntext, errbuf, sizeof(returntext));
}
@@ -2299,7 +2299,7 @@ dse_add(Slapi_PBlock *pb) /* JCM There should only be one exit point
from this f
int isroot;
slapi_pblock_get( pb, SLAPI_REQUESTOR_ISROOT, &isroot );
if ( !isroot ) {
- LDAPDebug( SLAPI_DSE_TRACELEVEL, "dse_add: no parent and not
root\n", 0, 0, 0 );
+ LDAPDebug( SLAPI_DSE_TRACELEVEL, LOG_DEBUG, "dse_add: no parent and not
root\n", 0, 0, 0 );
rc = LDAP_INSUFFICIENT_ACCESS;
slapi_sdn_done(&parent);
e = NULL; /* caller will free upon error */
diff --git a/ldap/servers/slapd/entry.c b/ldap/servers/slapd/entry.c
index 8bbf0c4..1b006cb 100644
--- a/ldap/servers/slapd/entry.c
+++ b/ldap/servers/slapd/entry.c
@@ -274,7 +274,7 @@ str2entry_fast( const char *rawdn, const Slapi_RDN *srdn, char *s, int
flags, in
}
if ( slapi_ldif_parse_line( s, &type, &value, &freeval ) < 0 ) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "<= str2entry_fast NULL
(parse_line)\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= str2entry_fast NULL
(parse_line)\n");
continue;
}
@@ -325,7 +325,7 @@ str2entry_fast( const char *rawdn, const Slapi_RDN *srdn, char *s, int
flags, in
} else {
normdn = slapi_create_dn_string("%s", rawdn);
if (NULL == normdn) {
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"str2entry_fast: Invalid DN: %s\n", rawdn);
slapi_entry_free( e );
if (freeval) slapi_ch_free_string(&value.bv_val);
@@ -354,7 +354,7 @@ str2entry_fast( const char *rawdn, const Slapi_RDN *srdn, char *s, int
flags, in
} else {
normdn = slapi_create_dn_string("%s", rawdn);
if (NULL == normdn) {
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"str2entry_fast: Invalid DN: %s\n", rawdn);
slapi_entry_free( e );
if (freeval)
@@ -392,7 +392,7 @@ str2entry_fast( const char *rawdn, const Slapi_RDN *srdn, char *s, int
flags, in
}
if (NULL == normdn) {
char ebuf[ BUFSIZ ];
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"str2entry_fast: Invalid DN: %s\n",
escape_string( value.bv_val, ebuf ));
slapi_entry_free( e );
@@ -490,7 +490,7 @@ str2entry_fast( const char *rawdn, const Slapi_RDN *srdn, char *s, int
flags, in
/* check that the dn is formatted correctly */
rc = slapi_dn_syntax_check(NULL, value.bv_val, 1);
if (rc) { /* syntax check failed */
- LDAPDebug2Args(LDAP_DEBUG_TRACE,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"str2entry_fast: strict: Invalid DN value: %s: %s\n",
type.bv_val, value.bv_val);
slapi_entry_free( e );
@@ -580,7 +580,7 @@ str2entry_fast( const char *rawdn, const Slapi_RDN *srdn, char *s, int
flags, in
if (e->e_flags & SLAPI_ENTRY_FLAG_TOMBSTONE) {
/* tombstone */
if (_entry_set_tombstone_rdn(e, slapi_entry_get_dn_const(e))) {
- LDAPDebug1Arg( LDAP_DEBUG_TRACE, "str2entry_fast: "
+ LDAPDebug1Arg( LDAP_DEBUG_TRACE, LOG_DEBUG, "str2entry_fast: "
"tombstone entry has badly formatted dn: %s\n",
slapi_entry_get_dn_const(e) );
slapi_entry_free( e ); e = NULL;
@@ -798,7 +798,7 @@ str2entry_dupcheck( const char *rawdn, char *s, int flags, int
read_stateinfo )
/* Check if we should be performing strict validation. */
strict = config_get_dn_validate_strict();
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "=> str2entry_dupcheck\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> str2entry_dupcheck\n");
e = slapi_entry_alloc();
slapi_entry_init(e,NULL,NULL);
@@ -864,7 +864,7 @@ str2entry_dupcheck( const char *rawdn, char *s, int flags, int
read_stateinfo )
} else {
normdn = slapi_create_dn_string("%s", rawdn);
if (NULL == normdn) {
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"str2entry_dupcheck: Invalid DN: %s\n", rawdn);
slapi_entry_free( e );
if (freeval) slapi_ch_free_string(&bvvalue.bv_val);
@@ -887,7 +887,7 @@ str2entry_dupcheck( const char *rawdn, char *s, int flags, int
read_stateinfo )
} else {
normdn = slapi_create_dn_string("%s", rawdn);
if (NULL == normdn) {
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"str2entry_dupcheck: Invalid DN: %s\n", rawdn);
slapi_entry_free( e );
if (freeval) slapi_ch_free_string(&bvvalue.bv_val);
@@ -919,7 +919,7 @@ str2entry_dupcheck( const char *rawdn, char *s, int flags, int
read_stateinfo )
}
normdn = slapi_create_dn_string("%s", valuecharptr);
if (NULL == normdn) {
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"str2entry_dupcheck: Invalid DN: %s\n", valuecharptr);
slapi_entry_free( e ); e = NULL;
if (freeval) slapi_ch_free_string(&bvvalue.bv_val);
@@ -1076,7 +1076,7 @@ str2entry_dupcheck( const char *rawdn, char *s, int flags, int
read_stateinfo )
/* check that the dn is formatted correctly */
rc = slapi_dn_syntax_check(NULL, valuecharptr, 1);
if (rc) { /* syntax check failed */
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"str2entry_dupcheck: strict: Invalid DN value: %s: %s\n",
type, valuecharptr);
slapi_entry_free( e ); e = NULL;
@@ -1238,7 +1238,7 @@ str2entry_dupcheck( const char *rawdn, char *s, int flags, int
read_stateinfo )
if (e->e_flags & SLAPI_ENTRY_FLAG_TOMBSTONE) {
/* tombstone */
if (_entry_set_tombstone_rdn(e, slapi_entry_get_dn_const(e))) {
- LDAPDebug1Arg( LDAP_DEBUG_TRACE, "str2entry_dupcheck: "
+ LDAPDebug1Arg( LDAP_DEBUG_TRACE, LOG_DEBUG, "str2entry_dupcheck: "
"tombstone entry has badly formatted dn: %s\n",
slapi_entry_get_dn_const(e) );
slapi_entry_free( e ); e = NULL;
@@ -1766,7 +1766,7 @@ entry2str_internal( Slapi_Entry *e, int *len, int entry2str_ctrl )
*ecur = '\0';
if ( (size_t)(ecur - ebuf + 1) > elen )
{
- slapi_log_error (SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"entry2str_internal: array boundary wrote: bufsize=%ld
wrote=%ld\n",
(long int)elen, (long int)(ecur - ebuf + 1));
}
@@ -1860,7 +1860,7 @@ entry2str_internal_ext( Slapi_Entry *e, int *len, int
entry2str_ctrl)
if ((size_t)(ecur - ebuf + 1) > elen)
{
/* this should not happen */
- slapi_log_error (SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"entry2str_internal_ext: array boundary wrote: "
"bufsize=%ld wrote=%ld\n",
(long int)elen, (long int)(ecur - ebuf + 1));
@@ -2439,7 +2439,7 @@ static Slapi_Vattr *entry_vattr_lookup_nolock(const Slapi_Entry *e,
const char *
} else if (vattr->attr != NULL) {
name = vattr->attr->a_type;
} else {
- slapi_log_error(SLAPI_LOG_FATAL,
"entry_vattr_lookup_nolock", "unable to retrieve attribute name %s\n",
attr_name);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"entry_vattr_lookup_nolock", "unable to retrieve attribute name %s\n",
attr_name);
continue;
}
if (slapi_attr_type_cmp( (const char *) name , attr_name,
SLAPI_TYPE_CMP_EXACT) == 0) {
@@ -2734,7 +2734,7 @@ slapi_entry_vattrcache_merge_sv(Slapi_Entry *e, const char *type,
* returns a non NULL value.
* Possibly watermark should have been updated to clear
the cache
*/
- slapi_log_error(SLAPI_LOG_FATAL,
"slapi_entry_vattrcache_merge_sv",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"slapi_entry_vattrcache_merge_sv",
"Virtual attribute %s already cached with
empty value, unwilling to cache a different value (%s) \n",
type, slapi_entry_get_dn(e));
}
@@ -3342,7 +3342,7 @@ slapi_entry_has_children_ext(const Slapi_Entry *entry, int
include_tombstone)
/* The entry has the attribute, and it's non-zero */
count = strtol(bval->bv_val, (char **)NULL, 10);
if (count > 0) {
- LDAPDebug1Arg( LDAP_DEBUG_TRACE, "<= slapi_has_children %d\n", count);
+ LDAPDebug1Arg( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= slapi_has_children
%d\n", count);
return count;
}
}
@@ -3361,7 +3361,7 @@ slapi_entry_has_children_ext(const Slapi_Entry *entry, int
include_tombstone)
/* The entry has the attribute, and it's non-zero */
count = strtol(bval->bv_val, (char **)NULL, 10);
if (count > 0) {
- LDAPDebug1Arg( LDAP_DEBUG_TRACE, "<= slapi_has_tombstone_children
%d\n", count);
+ LDAPDebug1Arg( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= slapi_has_tombstone_children
%d\n", count);
return count;
}
}
@@ -3548,14 +3548,14 @@ slapi_entry_apply_mod_extension(Slapi_Entry *e, const LDAPMod
*mod, int modcnt)
/* vals is consumed if successful. */
err = aiep->ext_set(e, vals, SLAPI_EXT_SET_ADD);
if (err) {
- slapi_log_error(SLAPI_LOG_FATAL,
"entry_apply_mod",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"entry_apply_mod",
"ADD: Failed to set %s to
extension\n",
aiep->ext_type);
valuearray_free(&vals);
goto bail;
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, "entry_apply_mod",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"entry_apply_mod",
"ADD: %s has no values\n",
aiep->ext_type);
goto bail;
@@ -3566,7 +3566,7 @@ slapi_entry_apply_mod_extension(Slapi_Entry *e, const LDAPMod *mod,
int modcnt)
if (modcnt > 0) {
err = aiep->ext_get(e, &vals);
if (err) {
- slapi_log_error(SLAPI_LOG_FATAL, "entry_apply_mod",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"entry_apply_mod",
"DEL: Failed to get %s from
extension\n",
aiep->ext_type);
goto bail;
@@ -3585,7 +3585,7 @@ slapi_entry_apply_mod_extension(Slapi_Entry *e, const LDAPMod *mod,
int modcnt)
/* myvals is consumed if successful. */
err = aiep->ext_set(e, myvals, SLAPI_EXT_SET_REPLACE);
if (err) {
- slapi_log_error(SLAPI_LOG_FATAL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"entry_apply_mod",
"DEL: Failed to set %s "
"to extension\n",
@@ -3599,7 +3599,7 @@ slapi_entry_apply_mod_extension(Slapi_Entry *e, const LDAPMod *mod,
int modcnt)
/* ext_set replaces the existing value with NULL */
err = aiep->ext_set(e, NULL, SLAPI_EXT_SET_REPLACE);
if (err) {
- slapi_log_error(SLAPI_LOG_FATAL, "entry_apply_mod",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"entry_apply_mod",
"DEL: Failed to set %s to
extension\n",
aiep->ext_type);
goto bail;
@@ -3614,14 +3614,14 @@ slapi_entry_apply_mod_extension(Slapi_Entry *e, const LDAPMod
*mod, int modcnt)
/* vals is consumed if successful. */
err = aiep->ext_set(e, vals, SLAPI_EXT_SET_REPLACE);
if (err) {
- slapi_log_error(SLAPI_LOG_FATAL,
"entry_apply_mod",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"entry_apply_mod",
"REPLACE: Failed to set %s to
extension\n",
aiep->ext_type);
valuearray_free(&vals);
goto bail;
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, "entry_apply_mod",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"entry_apply_mod",
"REPLACE: %s has no values\n",
aiep->ext_type);
goto bail;
@@ -4319,7 +4319,7 @@ _entry_set_tombstone_rdn(Slapi_Entry *e, const char *normdn)
Slapi_RDN mysrdn = {0};
rc = slapi_rdn_init_all_dn(&mysrdn, sepp + 1);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "_entry_set_tombstone_rdn",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"_entry_set_tombstone_rdn",
"Failed to convert DN %s to RDN\n", sepp + 1);
slapi_rdn_done(&mysrdn);
goto bail;
diff --git a/ldap/servers/slapd/entrywsi.c b/ldap/servers/slapd/entrywsi.c
index 3f53521..b6d55b7 100644
--- a/ldap/servers/slapd/entrywsi.c
+++ b/ldap/servers/slapd/entrywsi.c
@@ -646,7 +646,7 @@ entry_delete_present_values_wsi(Slapi_Entry *e, const char *type,
struct berval
retVal = LDAP_SUCCESS;
} else {
if (!urp) {
- LDAPDebug1Arg(LDAP_DEBUG_ARGS, "could not find attribute %s\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ARGS, LOG_DEBUG, "could not find attribute %s\n",
type);
}
retVal = LDAP_NO_SUCH_ATTRIBUTE;
diff --git a/ldap/servers/slapd/eventq.c b/ldap/servers/slapd/eventq.c
index c425c1f..e301254 100644
--- a/ldap/servers/slapd/eventq.c
+++ b/ldap/servers/slapd/eventq.c
@@ -118,7 +118,7 @@ slapi_eq_once(slapi_eq_fn_t fn, void *arg, time_t when)
/* been freed, depending on the thread */
/* scheduling. Too bad */
- slapi_log_error(SLAPI_LOG_HOUSE, NULL,
+ slapi_log_error(SLAPI_LOG_HOUSE, LOG_DEBUG, NULL,
"added one-time event id %p at time %ld\n",
id, when);
return(id);
@@ -150,7 +150,7 @@ slapi_eq_repeat(slapi_eq_fn_t fn, void *arg, time_t when, unsigned
long interval
if (!eq_stopped) {
tmp = eq_new(fn, arg, when, interval);
eq_enqueue(tmp);
- slapi_log_error(SLAPI_LOG_HOUSE, NULL,
+ slapi_log_error(SLAPI_LOG_HOUSE, LOG_DEBUG, NULL,
"added repeating event id %p at time %ld, interval %lu\n",
tmp->ec_id, when, interval);
return(tmp->ec_id);
@@ -187,7 +187,7 @@ slapi_eq_cancel(Slapi_Eq_Context ctx)
}
PR_Unlock(eq->eq_lock);
}
- slapi_log_error(SLAPI_LOG_HOUSE, NULL,
+ slapi_log_error(SLAPI_LOG_HOUSE, LOG_DEBUG, NULL,
"cancellation of event id %p requested: %s\n",
ctx, found ? "cancellation succeeded" : "event not found");
return found;
@@ -281,7 +281,7 @@ eq_call_all(void)
while ((p = eq_dequeue(current_time())) != NULL) {
/* Call the scheduled function */
p->ec_fn(p->ec_when, p->ec_arg);
- slapi_log_error(SLAPI_LOG_HOUSE, NULL,
+ slapi_log_error(SLAPI_LOG_HOUSE, LOG_DEBUG, NULL,
"Event id %p called at %ld (scheduled for %ld)\n",
p->ec_id, current_time(), p->ec_when);
if (0UL != p->ec_interval) {
@@ -346,19 +346,19 @@ eq_create(void)
{
PR_ASSERT(NULL == eq->eq_lock);
if ((eq->eq_lock = PR_NewLock()) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "eq_start PR_NewLock failed\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "eq_start PR_NewLock
failed\n");
exit(1);
}
if ((eq->eq_cv = PR_NewCondVar(eq->eq_lock)) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "eq_start PR_NewCondVar failed\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "eq_start PR_NewCondVar
failed\n");
exit(1);
}
if ((ss_lock = PR_NewLock()) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "eq_start PR_NewLock failed\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "eq_start PR_NewLock
failed\n");
exit(1);
}
if ((ss_cv = PR_NewCondVar(ss_lock)) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "eq_start PR_NewCondVar failed\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "eq_start PR_NewCondVar
failed\n");
exit(1);
}
eq->eq_queue = NULL;
@@ -384,10 +384,10 @@ eq_start()
if ((eq_loop_tid = PR_CreateThread(PR_USER_THREAD, (VFP)eq_loop,
NULL, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_JOINABLE_THREAD,
SLAPD_DEFAULT_THREAD_STACKSIZE)) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "eq_init PR_CreateThread failed\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "eq_init PR_CreateThread
failed\n");
exit(1);
}
- slapi_log_error(SLAPI_LOG_HOUSE, NULL, "event queue services have
started\n");
+ slapi_log_error(SLAPI_LOG_HOUSE, LOG_DEBUG, NULL, "event queue services have
started\n");
}
@@ -407,7 +407,7 @@ eq_init()
{
if (!eq_initialized) {
if (PR_SUCCESS != PR_CallOnce(&init_once, eq_create)) {
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "eq_init - eq_create failed\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "eq_init - eq_create
failed\n");
}
}
}
@@ -463,7 +463,7 @@ eq_stop()
p = q;
}
PR_Unlock(eq->eq_lock);
- slapi_log_error(SLAPI_LOG_HOUSE, NULL, "event queue services have shut
down\n");
+ slapi_log_error(SLAPI_LOG_HOUSE, LOG_DEBUG, NULL, "event queue services have
shut down\n");
}
/*
diff --git a/ldap/servers/slapd/extendop.c b/ldap/servers/slapd/extendop.c
index d67ef2c..19377a6 100644
--- a/ldap/servers/slapd/extendop.c
+++ b/ldap/servers/slapd/extendop.c
@@ -46,7 +46,7 @@ static void extop_handle_import_start(Slapi_PBlock *pb, char *extoid,
/* check that the dn is formatted correctly */
ret = slapi_dn_syntax_check(pb, orig, 1);
if (ret) { /* syntax check failed */
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"extop_handle_import_start: strict: invalid
suffix\n",
orig);
send_ldap_result(pb, LDAP_INVALID_DN_SYNTAX, NULL,
@@ -336,14 +336,14 @@ do_extended( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_REQUESTOR_ISROOT, &pb->pb_op->o_isroot);
rc = plugin_determine_exop_plugins( extoid, &p );
- slapi_log_error(SLAPI_LOG_TRACE, NULL, "exendop.c plugin_determine_exop_plugins
rc %d\n", rc);
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, NULL, "exendop.c
plugin_determine_exop_plugins rc %d\n", rc);
if (plugin_call_plugins(pb, SLAPI_PLUGIN_PRE_EXTOP_FN) != SLAPI_PLUGIN_SUCCESS) {
goto free_and_return;
}
if (rc == SLAPI_PLUGIN_EXTENDEDOP && p != NULL) {
- slapi_log_error(SLAPI_LOG_TRACE, NULL, "extendop.c calling plugin ...
\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, NULL, "extendop.c calling plugin
... \n");
/*
* Return values:
* SLAPI_PLUGIN_EXTENDED_SENT_RESULT: The result is already sent to the client.
@@ -353,16 +353,16 @@ do_extended( Slapi_PBlock *pb )
*/
rc = plugin_call_exop_plugins( pb, p);
- slapi_log_error(SLAPI_LOG_TRACE, NULL, "extendop.c called exop, got %d
\n", rc);
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, NULL, "extendop.c called exop,
got %d \n", rc);
} else if (rc == SLAPI_PLUGIN_BETXNEXTENDEDOP && p != NULL) {
- slapi_log_error(SLAPI_LOG_TRACE, NULL, "extendop.c calling betxn plugin ...
\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, NULL, "extendop.c calling betxn
plugin ... \n");
/* Look up the correct backend to use. */
Slapi_Backend *be = plugin_extended_op_getbackend( pb, p );
if ( be == NULL ) {
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "extendop.c
plugin_extended_op_getbackend was unable to retrieve a backend!!!\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "extendop.c
plugin_extended_op_getbackend was unable to retrieve a backend!!!\n");
rc = LDAP_OPERATIONS_ERROR;
} else {
/* We need to make a new be pb here because when you set SLAPI_BACKEND
@@ -375,7 +375,7 @@ do_extended( Slapi_PBlock *pb )
int txn_rc = slapi_back_transaction_begin(be_pb);
if (txn_rc) {
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "exendop.c Failed to start
be_txn for plugin_call_exop_plugins %d\n", txn_rc);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "exendop.c Failed to
start be_txn for plugin_call_exop_plugins %d\n", txn_rc);
} else {
/*
* Return values:
@@ -385,19 +385,19 @@ do_extended( Slapi_PBlock *pb )
* LDAP codes (e.g., LDAP_SUCCESS): The result is not sent yet. Call
send_ldap_result.
*/
rc = plugin_call_exop_plugins( pb, p );
- slapi_log_error(SLAPI_LOG_TRACE, NULL, "extendop.c called betxn
exop, got %d \n", rc);
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, NULL, "extendop.c called
betxn exop, got %d \n", rc);
if (rc == LDAP_SUCCESS || rc == SLAPI_PLUGIN_EXTENDED_SENT_RESULT) {
/* commit */
txn_rc = slapi_back_transaction_commit(be_pb);
if (txn_rc == 0) {
- slapi_log_error(SLAPI_LOG_TRACE, NULL, "extendop.c commit
with result %d \n", txn_rc);
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, NULL,
"extendop.c commit with result %d \n", txn_rc);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "extendop.c Unable to
commit commit with result %d \n", txn_rc);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "extendop.c
Unable to commit commit with result %d \n", txn_rc);
}
} else {
/* abort */
txn_rc = slapi_back_transaction_abort(be_pb);
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "extendop.c abort with
result %d \n", txn_rc);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "extendop.c
abort with result %d \n", txn_rc);
}
} /* txn_rc */
slapi_pblock_destroy(be_pb); /* Clean up after ourselves */
@@ -414,7 +414,7 @@ do_extended( Slapi_PBlock *pb )
errmsg = "unsupported extended operation";
} else {
if (rc != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "extendop.c failed with
result %d \n", rc);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "extendop.c failed
with result %d \n", rc);
}
errmsg = NULL;
lderr = rc;
diff --git a/ldap/servers/slapd/features.c b/ldap/servers/slapd/features.c
index a4e8872..af6dd4e 100644
--- a/ldap/servers/slapd/features.c
+++ b/ldap/servers/slapd/features.c
@@ -25,7 +25,7 @@ init_features( void )
{
supported_features_lock = slapi_new_rwlock();
if (supported_features_lock == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, "startup",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "startup",
"init_features: failed to create lock.\n");
exit(1);
}
diff --git a/ldap/servers/slapd/fedse.c b/ldap/servers/slapd/fedse.c
index 4db50e7..b579769 100644
--- a/ldap/servers/slapd/fedse.c
+++ b/ldap/servers/slapd/fedse.c
@@ -1580,7 +1580,7 @@ init_dse_file(const char *configdir, Slapi_DN *config)
slapi_pblock_set(&pb, SLAPI_DSE_DONT_WRITE_WHEN_ADDING, (void*)&dont_write);
if(!(rc = dse_read_file(pfedse, &pb)))
{
- slapi_log_error( SLAPI_LOG_FATAL, "dse",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "dse",
"Could not load config file [%s]\n",
DSE_FILENAME );
}
@@ -1864,7 +1864,7 @@ setup_internal_backends(char *configdir)
slapi_sdn_done(&saslmapping);
slapi_sdn_done(&plugins);
} else {
- slapi_log_error( SLAPI_LOG_FATAL, "dse",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "dse",
"Please edit the file to correct the reported problems"
" and then restart the server.\n" );
exit( 1 );
@@ -1914,7 +1914,7 @@ int fedse_create_startOK(char *filename, char *startokfilename,
const char *con
rc = slapi_copy(dse_filename, dse_filestartOK);
if ( rc != 0 )
{
- slapi_log_error( SLAPI_LOG_FATAL, "dse", "Cannot copy"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "dse", "Cannot
copy"
" DSE file \"%s\" to \"%s\" OS error %d
(%s)\n",
dse_filename, dse_filestartOK,
rc, slapd_system_strerror(rc) );
diff --git a/ldap/servers/slapd/filter.c b/ldap/servers/slapd/filter.c
index ca4224e..bf5fb69 100644
--- a/ldap/servers/slapd/filter.c
+++ b/ldap/servers/slapd/filter.c
@@ -78,14 +78,14 @@ get_filter( Connection *conn, BerElement *ber, int scope,
logbufsize = strlen(*fstr) + 1;
logbuf = slapi_ch_malloc(logbufsize);
*logbuf = '\0';
- slapi_log_error( SLAPI_LOG_FATAL, "get_filter", "before optimize:
%s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "get_filter", "before
optimize: %s\n",
slapi_filter_to_string(*filt, logbuf, logbufsize));
}
filter_optimize(*filt);
if (NULL != logbuf) {
- slapi_log_error( SLAPI_LOG_FATAL, "get_filter", " after optimize:
%s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "get_filter", " after
optimize: %s\n",
slapi_filter_to_string(*filt, logbuf, logbufsize));
slapi_ch_free_string( &logbuf );
}
@@ -718,7 +718,7 @@ slapi_filter_dup(Slapi_Filter *f)
out->f_mr_dnAttrs = f->f_mr_dnAttrs;
if (f->f_mr.mrf_match) {
int rc = plugin_mr_filter_create(&out->f_mr);
- LDAPDebug1Arg( LDAP_DEBUG_FILTER, "slapi_filter_dup plugin_mr_filter_create
returned %d\n", rc );
+ LDAPDebug1Arg( LDAP_DEBUG_FILTER, LOG_DEBUG, "slapi_filter_dup
plugin_mr_filter_create returned %d\n", rc );
}
break;
diff --git a/ldap/servers/slapd/house.c b/ldap/servers/slapd/house.c
index 15b97b4..564011e 100644
--- a/ldap/servers/slapd/house.c
+++ b/ldap/servers/slapd/house.c
@@ -60,13 +60,13 @@ housekeeping_start(time_t cur_time, void *arg)
}
if ( ( housekeeping_mutex = PR_NewLock()) == NULL ) {
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"housekeeping cannot create new lock. "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
PR_GetError(), slapd_pr_strerror( PR_GetError() ));
}
else if ( ( housekeeping_cvar = PR_NewCondVar( housekeeping_mutex )) == NULL ) {
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"housekeeping cannot create new condition variable. "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
PR_GetError(), slapd_pr_strerror( PR_GetError() ));
@@ -77,7 +77,7 @@ housekeeping_start(time_t cur_time, void *arg)
(VFP) housecleaning, (void*)&thread_start_time,
PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_JOINABLE_THREAD,
SLAPD_DEFAULT_THREAD_STACKSIZE)) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"housekeeping PR_CreateThread failed. "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
PR_GetError(), slapd_pr_strerror( PR_GetError() ));
diff --git a/ldap/servers/slapd/index_subsystem.c b/ldap/servers/slapd/index_subsystem.c
index 611bbcf..ff6e180 100644
--- a/ldap/servers/slapd/index_subsystem.c
+++ b/ldap/servers/slapd/index_subsystem.c
@@ -195,7 +195,7 @@ int index_subsys_assign_filter_decoders(Slapi_PBlock *pb)
if ( LDAPDebugLevelIsSet( LDAP_DEBUG_FILTER ) && NULL != f ) {
logbuf[0] = '\0';
- slapi_log_error( SLAPI_LOG_FATAL, subsystem, "before: %s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, subsystem, "before: %s\n",
slapi_filter_to_string(f, logbuf, sizeof(logbuf)));
}
@@ -204,7 +204,7 @@ int index_subsys_assign_filter_decoders(Slapi_PBlock *pb)
if ( LDAPDebugLevelIsSet( LDAP_DEBUG_FILTER ) && NULL != f ) {
logbuf[0] = '\0';
- slapi_log_error( SLAPI_LOG_FATAL, subsystem, " after: %s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, subsystem, " after: %s\n",
slapi_filter_to_string(f, logbuf, sizeof(logbuf)));
}
diff --git a/ldap/servers/slapd/ldaputil.c b/ldap/servers/slapd/ldaputil.c
index de94508..efa64f6 100644
--- a/ldap/servers/slapd/ldaputil.c
+++ b/ldap/servers/slapd/ldaputil.c
@@ -81,7 +81,7 @@ internal_ol_init_init(void)
PR_ASSERT(NULL == ol_init_lock);
if ((ol_init_lock = PR_NewLock()) == NULL) {
PRErrorCode errorCode = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, "internal_ol_init_init",
"PR_NewLock failed %d:%s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "internal_ol_init_init",
"PR_NewLock failed %d:%s\n",
errorCode, slapd_pr_strerror(errorCode));
return PR_FAILURE;
}
@@ -163,12 +163,12 @@ convert_to_openldap_uri(const char *hostname_or_uri, int port, const
char *proto
proto = my_copy;
start += 3;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, "convert_to_openldap_uri",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"convert_to_openldap_uri",
"The given LDAP URI [%s] is not valid\n", hostname_or_uri);
goto end;
}
} else if (!proto) {
- slapi_log_error(SLAPI_LOG_FATAL, "convert_to_openldap_uri",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "convert_to_openldap_uri",
"The given LDAP URI [%s] is not valid\n", hostname_or_uri);
goto end;
} else {
@@ -586,7 +586,7 @@ setup_ol_tls_conn(LDAP *ld, int clientauth)
}
if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_REQUIRE_CERT, &ssl_strength))) {
- slapi_log_error(SLAPI_LOG_FATAL, "setup_ol_tls_conn",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "setup_ol_tls_conn",
"failed: unable to set REQUIRE_CERT option to %d\n",
ssl_strength);
}
if (slapi_client_uses_non_nss(ld)) {
@@ -595,7 +595,7 @@ setup_ol_tls_conn(LDAP *ld, int clientauth)
/* CA Cert PEM file exists. Set the path to openldap option. */
rc = ldap_set_option(ld, LDAP_OPT_X_TLS_CACERTFILE, cacert);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "setup_ol_tls_conn",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "setup_ol_tls_conn",
"Could not set CA cert path [%s]: %d:%s\n",
cacert, rc, ldap_err2string(rc));
}
@@ -605,7 +605,7 @@ setup_ol_tls_conn(LDAP *ld, int clientauth)
/* Sets the CRL evaluation strategy. */
rc = ldap_set_option(ld, LDAP_OPT_X_TLS_CRLCHECK, &crlcheck);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "setup_ol_tls_conn",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "setup_ol_tls_conn",
"Could not set CRLCHECK [%d]: %d:%s\n",
crlcheck, rc, ldap_err2string(rc));
}
@@ -613,7 +613,7 @@ setup_ol_tls_conn(LDAP *ld, int clientauth)
}
/* tell it where our cert db/file is */
if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_CACERTDIR, certdir))) {
- slapi_log_error(SLAPI_LOG_FATAL, "setup_ol_tls_conn",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "setup_ol_tls_conn",
"failed: unable to set CACERTDIR option to %s\n",
certdir);
}
slapi_ch_free_string(&certdir);
@@ -622,7 +622,7 @@ setup_ol_tls_conn(LDAP *ld, int clientauth)
if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_PROTOCOL_MIN, &optval))) {
char *minstr = NULL;
(void)getSSLVersionRange(&minstr, NULL);
- slapi_log_error(SLAPI_LOG_FATAL, "setup_ol_tls_conn",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "setup_ol_tls_conn",
"failed: unable to set minimum TLS protocol level to
%s\n", minstr);
slapi_ch_free_string(&minstr);
}
@@ -630,7 +630,7 @@ setup_ol_tls_conn(LDAP *ld, int clientauth)
if (clientauth) {
rc = slapd_SSL_client_auth(ld);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "setup_ol_tls_conn",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "setup_ol_tls_conn",
"failed: unable to setup connection for TLS/SSL EXTERNAL
client cert authentication - %d\n", rc);
}
}
@@ -640,7 +640,7 @@ setup_ol_tls_conn(LDAP *ld, int clientauth)
that optval is zero, meaning create a context for a client */
optval = 0;
if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_NEWCTX, &optval))) {
- slapi_log_error(SLAPI_LOG_FATAL, "setup_ol_tls_conn",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "setup_ol_tls_conn",
"failed: unable to create new TLS context - %d\n",
rc);
}
@@ -693,7 +693,7 @@ slapi_ldap_init_ext(
char *pp = NULL;
if (NULL == pluginpath || (*pluginpath == '\0')) {
- slapi_log_error(SLAPI_LOG_SHELL, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_LOG_SHELL, LOG_DEBUG, "slapi_ldap_init_ext",
"config_get_saslpath returns NULL\n");
pluginpath = ldaputil_get_saslpath();
}
@@ -702,14 +702,14 @@ slapi_ldap_init_ext(
(0 != strcmp(++pp, pluginpath)) /* sasl_path has been updated */ )
{
PR_snprintf(util_sasl_path, sizeof(util_sasl_path), "SASL_PATH=%s",
pluginpath);
- slapi_log_error(SLAPI_LOG_SHELL, "slapi_ldap_init_ext",
"putenv(%s)\n", util_sasl_path);
+ slapi_log_error(SLAPI_LOG_SHELL, LOG_DEBUG, "slapi_ldap_init_ext",
"putenv(%s)\n", util_sasl_path);
putenv(util_sasl_path);
}
slapi_ch_free_string(&configpluginpath);
/* if ldapurl is given, parse it */
if (ldapurl && ((rc = slapi_ldap_url_parse(ldapurl, &ludp, 0,
&secureurl)) || !ludp)) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapi_ldap_init_ext",
"Could not parse given LDAP URL [%s] : error [%s]\n",
ldapurl, /* ldapurl cannot be NULL here */
slapi_urlparse_err2string(rc));
@@ -768,7 +768,7 @@ slapi_ldap_init_ext(
#if defined(USE_OPENLDAP)
if (ldapurl) {
if (PR_SUCCESS != PR_CallOnce(&ol_init_callOnce, internal_ol_init_init)) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapi_ldap_init_ext",
"Could not perform internal ol_init init\n");
rc = -1;
goto done;
@@ -778,7 +778,7 @@ slapi_ldap_init_ext(
rc = ldap_initialize(&ld, ldapurl);
PR_Unlock(ol_init_lock);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapi_ldap_init_ext",
"Could not initialize LDAP connection to [%s]: %d:%s\n",
ldapurl, rc, ldap_err2string(rc));
goto done;
@@ -793,7 +793,7 @@ slapi_ldap_init_ext(
(secure == SLAPI_LDAP_INIT_FLAG_SSL ?
"ldaps" : "ldap"));
}
if (PR_SUCCESS != PR_CallOnce(&ol_init_callOnce, internal_ol_init_init)) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapi_ldap_init_ext",
"Could not perform internal ol_init init\n");
rc = -1;
goto done;
@@ -803,7 +803,7 @@ slapi_ldap_init_ext(
rc = ldap_initialize(&ld, makeurl);
PR_Unlock(ol_init_lock);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapi_ldap_init_ext",
"Could not initialize LDAP connection to [%s]: %d:%s\n",
makeurl, rc, ldap_err2string(rc));
slapi_ch_free_string(&makeurl);
@@ -821,7 +821,7 @@ slapi_ldap_init_ext(
* hostname (such as localhost.localdomain).
*/
if((rc = ldap_set_option(ld, LDAP_OPT_X_SASL_NOCANON, LDAP_OPT_ON))){
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapi_ldap_init_ext",
"Could not set ldap option LDAP_OPT_X_SASL_NOCANON for (%s), error
%d (%s)\n",
ldapurl, rc, ldap_err2string(rc) );
}
@@ -866,7 +866,7 @@ slapi_ldap_init_ext(
tv.tv_sec = io_timeout_ms / 1000;
tv.tv_usec = (io_timeout_ms % 1000) * 1000;
if (LDAP_OPT_SUCCESS != ldap_set_option(ld, LDAP_OPT_NETWORK_TIMEOUT,
&tv)) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"slapi_ldap_init_ext",
"failed: unable to set outbound I/O timeout to %dms\n",
io_timeout_ms);
slapi_ldap_unbind(ld);
ld = NULL;
@@ -874,7 +874,7 @@ slapi_ldap_init_ext(
}
#else /* !USE_OPENLDAP */
if (prldap_set_session_option(ld, NULL, PRLDAP_OPT_IO_MAX_TIMEOUT,
io_timeout_ms) != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"slapi_ldap_init_ext",
"failed: unable to set outbound I/O timeout to %dms\n",
io_timeout_ms);
slapi_ldap_unbind(ld);
ld = NULL;
@@ -889,7 +889,7 @@ slapi_ldap_init_ext(
if (secure > 0) {
#if defined(USE_OPENLDAP)
if (setup_ol_tls_conn(ld, 0)) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"slapi_ldap_init_ext",
"failed: unable to set SSL/TLS options\n");
}
#else
@@ -920,7 +920,7 @@ slapi_ldap_init_ext(
{
int prerr = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"slapi_ldap_init_ext",
"failed: unable to set SSL options ("
SLAPI_COMPONENT_NAME_NSPR " error %d - %s)\n",
prerr, slapd_pr_strerror(prerr));
@@ -960,7 +960,7 @@ slapi_ldap_init_ext(
ldap_controls_free(clientctrls); /* free the copy */
}
- slapi_log_error(SLAPI_LOG_SHELL, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_LOG_SHELL, LOG_DEBUG, "slapi_ldap_init_ext",
"Success: set up conn to [%s:%d]%s\n",
hostname, port,
(secure == SLAPI_LDAP_INIT_FLAG_startTLS) ? " using startTLS" :
@@ -1089,13 +1089,13 @@ slapi_ldap_bind(
rc = slapd_SSL_client_auth(ld);
#endif
if (rc != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_bind",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapi_ldap_bind",
"Error: could not configure the server for cert "
"auth - error %d - make sure the server is "
"correctly configured for SSL/TLS\n", rc);
goto done;
} else {
- slapi_log_error(SLAPI_LOG_SHELL, "slapi_ldap_bind",
+ slapi_log_error(SLAPI_LOG_SHELL, LOG_DEBUG, "slapi_ldap_bind",
"Set up conn to use client auth\n");
}
bvcreds.bv_val = NULL; /* ignore username and passed in creds */
@@ -1109,13 +1109,13 @@ slapi_ldap_bind(
if (secure == SLAPI_LDAP_INIT_FLAG_startTLS) { /* send start tls */
rc = ldap_start_tls_s(ld, NULL /* serverctrls?? */, NULL);
if (LDAP_SUCCESS != rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_bind",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapi_ldap_bind",
"Error: could not send startTLS request: "
"error %d (%s) errno %d (%s)\n",
rc, ldap_err2string(rc), errno, slapd_system_strerror(errno));
goto done;
}
- slapi_log_error(SLAPI_LOG_SHELL, "slapi_ldap_bind",
+ slapi_log_error(SLAPI_LOG_SHELL, LOG_DEBUG, "slapi_ldap_bind",
"startTLS started on connection\n");
}
@@ -1125,7 +1125,7 @@ slapi_ldap_bind(
!strcmp(mech, LDAP_SASL_EXTERNAL)) {
int mymsgid = 0;
- slapi_log_error(SLAPI_LOG_SHELL, "slapi_ldap_bind",
+ slapi_log_error(SLAPI_LOG_SHELL, LOG_DEBUG, "slapi_ldap_bind",
"attempting %s bind with id [%s] creds [%s]\n",
mech ? mech : "SIMPLE",
bindid, creds);
@@ -1154,7 +1154,7 @@ slapi_ldap_bind(
}
}
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_bind",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapi_ldap_bind",
"Error: could not send bind request for id "
"[%s] authentication mechanism [%s]: error %d (%s), system error
%d (%s), "
"network error %d (%s, host \"%s\")\n",
@@ -1188,7 +1188,7 @@ slapi_ldap_bind(
rc = ldap_result(ld, mymsgid, LDAP_MSG_ALL, bind_timeout, &result);
if (-1 == rc) { /* error */
rc = slapi_ldap_get_lderrno(ld, NULL, NULL);
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_bind",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapi_ldap_bind",
"Error reading bind response for id "
"[%s] authentication mechanism [%s]: error %d (%s) errno %d
(%s)\n",
bindid ? bindid : "(anon)",
@@ -1197,7 +1197,7 @@ slapi_ldap_bind(
goto done;
} else if (rc == 0) { /* timeout */
rc = LDAP_TIMEOUT;
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_bind",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapi_ldap_bind",
"Error: timeout after [%ld.%ld] seconds reading "
"bind response for [%s] authentication mechanism
[%s]\n",
bind_timeout->tv_sec, bind_timeout->tv_usec,
@@ -1211,7 +1211,7 @@ slapi_ldap_bind(
*/
if ((rc = ldap_parse_result(ld, result, &err, NULL, NULL,
NULL, returnedctrls, 0)) != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_bind",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapi_ldap_bind",
"Error: could not parse bind result: error %d (%s) errno %d
(%s)\n",
rc, ldap_err2string(rc), errno, slapd_system_strerror(errno));
goto done;
@@ -1220,7 +1220,7 @@ slapi_ldap_bind(
/* check the result code from the bind operation */
if(err){
rc = err;
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_bind",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapi_ldap_bind",
"Error: could not bind id "
"[%s] authentication mechanism [%s]: error %d (%s) errno %d
(%s)\n",
bindid ? bindid : "(anon)",
@@ -1232,7 +1232,7 @@ slapi_ldap_bind(
/* parse the bind result and get the ldap error code */
if ((rc = ldap_parse_sasl_bind_result(ld, result, &servercredp, 0))) {
rc = slapi_ldap_get_lderrno(ld, NULL, NULL);
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_bind",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapi_ldap_bind",
"Error: could not read bind results for id "
"[%s] authentication mechanism [%s]: error %d (%s) errno %d
(%s)\n",
bindid ? bindid : "(anon)",
@@ -1255,7 +1255,7 @@ slapi_ldap_bind(
rc = slapd_ldap_sasl_interactive_bind(ld, bindid, creds, mech,
serverctrls, returnedctrls, msgidp);
if (LDAP_SUCCESS != rc) {
- slapi_log_error(SLAPI_LOG_CONNS, "slapi_ldap_bind",
+ slapi_log_error(SLAPI_LOG_CONNS, LOG_DEBUG, "slapi_ldap_bind",
"Error: could not perform interactive bind for id "
"[%s] authentication mechanism [%s]: error %d (%s)\n",
bindid ? bindid : "(anon)",
@@ -1355,7 +1355,7 @@ slapi_add_auth_response_control( Slapi_PBlock *pb, const char
*binddn )
}
if ( slapi_pblock_set( pb, SLAPI_ADD_RESCONTROL, &arctrl ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, "bind",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "bind",
"unable to add authentication response control" );
}
@@ -1478,25 +1478,25 @@ ldap_sasl_get_val(ldapSaslInteractVals *vals, sasl_interact_t
*interact, unsigne
switch(interact->id) {
case SASL_CB_AUTHNAME:
defvalue = vals->authid;
- slapi_log_error(authtracelevel, "ldap_sasl_get_val",
+ slapi_log_error(authtracelevel, LOG_DEBUG, "ldap_sasl_get_val",
"Using value [%s] for SASL_CB_AUTHNAME\n",
defvalue ? defvalue : "(null)");
break;
case SASL_CB_USER:
defvalue = vals->username;
- slapi_log_error(authtracelevel, "ldap_sasl_get_val",
+ slapi_log_error(authtracelevel, LOG_DEBUG, "ldap_sasl_get_val",
"Using value [%s] for SASL_CB_USER\n",
defvalue ? defvalue : "(null)");
break;
case SASL_CB_PASS:
defvalue = vals->passwd;
- slapi_log_error(authtracelevel, "ldap_sasl_get_val",
+ slapi_log_error(authtracelevel, LOG_DEBUG, "ldap_sasl_get_val",
"Using value [%s] for SASL_CB_PASS\n",
defvalue ? defvalue : "(null)");
break;
case SASL_CB_GETREALM:
defvalue = vals->realm;
- slapi_log_error(authtracelevel, "ldap_sasl_get_val",
+ slapi_log_error(authtracelevel, LOG_DEBUG, "ldap_sasl_get_val",
"Using value [%s] for SASL_CB_GETREALM\n",
defvalue ? defvalue : "(null)");
break;
@@ -1582,7 +1582,7 @@ slapd_ldap_sasl_interactive_bind(
if (LDAP_SUCCESS != rc) {
char *errmsg = NULL;
rc = slapi_ldap_get_lderrno(ld, NULL, &errmsg);
- slapi_log_error(SLAPI_LOG_CONNS,
"slapd_ldap_sasl_interactive_bind",
+ slapi_log_error(SLAPI_LOG_CONNS, LOG_DEBUG,
"slapd_ldap_sasl_interactive_bind",
"Error: could not perform interactive bind for id
"
"[%s] mech [%s]: LDAP error %d (%s) (%s) "
"errno %d (%s)\n",
@@ -1623,13 +1623,13 @@ show_one_credential(int authtracelevel,
char startts[BUFSIZ], endts[BUFSIZ], renewts[BUFSIZ];
if ((rc = krb5_unparse_name(ctx, cred->client, &name))) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Could not get client name from credential: %d
(%s)\n",
rc, error_message(rc));
goto cleanup;
}
if ((rc = krb5_unparse_name(ctx, cred->server, &sname))) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Could not get server name from credential: %d
(%s)\n",
rc, error_message(rc));
goto cleanup;
@@ -1644,7 +1644,7 @@ show_one_credential(int authtracelevel,
krb5_timestamp_to_sfstring((krb5_timestamp)cred->times.renew_till,
renewts, sizeof(renewts), NULL);
- slapi_log_error(authtracelevel, logname,
+ slapi_log_error(authtracelevel, LOG_DEBUG, logname,
"\tKerberos credential: client [%s] server [%s] "
"start time [%s] end time [%s] renew time [%s] "
"flags [0x%x]\n", name, sname, startts, endts,
@@ -1672,19 +1672,19 @@ show_cached_credentials(int authtracelevel,
char *princ_name = NULL;
if ((rc = krb5_unparse_name(ctx, princ, &princ_name))) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Could not get principal name from principal: %d
(%s)\n",
rc, error_message(rc));
goto cleanup;
}
- slapi_log_error(authtracelevel, logname,
+ slapi_log_error(authtracelevel, LOG_DEBUG, logname,
"Ticket cache: %s:%s\nDefault principal: %s\n\n",
krb5_cc_get_type(ctx, cc),
krb5_cc_get_name(ctx, cc), princ_name);
if ((rc = krb5_cc_start_seq_get(ctx, cc, &cur))) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Could not get cursor to iterate cached credentials: "
"%d (%s)\n", rc, error_message(rc));
goto cleanup;
@@ -1696,7 +1696,7 @@ show_cached_credentials(int authtracelevel,
}
if (rc == KRB5_CC_END) {
if ((rc = krb5_cc_end_seq_get(ctx, cc, &cur))) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Could not close cached credentials cursor: "
"%d (%s)\n", rc, error_message(rc));
goto cleanup;
@@ -1758,7 +1758,7 @@ credentials_are_valid(
realm_len, realm_str);
if ((*rc = krb5_parse_name(ctx, tgs_princ_name, &mcreds.server))) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Could parse principal [%s]: %d (%s)\n",
tgs_princ_name, *rc, error_message(*rc));
goto cleanup;
@@ -1775,14 +1775,14 @@ credentials_are_valid(
/* have the creds - now look at the timestamp */
if ((*rc = krb5_timeofday(ctx, ¤ttime))) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Could not get current time: %d (%s)\n",
*rc, error_message(*rc));
goto cleanup;
}
if (currenttime > (creds.times.endtime + time_buffer)) {
- slapi_log_error(authtracelevel, logname,
+ slapi_log_error(authtracelevel, LOG_DEBUG, logname,
"Credentials for [%s] have expired or will soon "
"expire - now [%d] endtime [%d]\n", princ_name,
currenttime, creds.times.endtime);
@@ -1809,7 +1809,7 @@ internal_krb5_init(void)
PR_ASSERT(NULL == krb5_lock);
if ((krb5_lock = PR_NewLock()) == NULL) {
PRErrorCode errorCode = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "internal_krb5_init PR_NewLock failed
%d:%s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "internal_krb5_init
PR_NewLock failed %d:%s\n",
errorCode, slapd_pr_strerror(errorCode));
return PR_FAILURE;
}
@@ -1864,7 +1864,7 @@ set_krb5_creds(
* so we put a lock around all kerberos interactions
*/
if (PR_SUCCESS != PR_CallOnce(&krb5_callOnce, internal_krb5_init)) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Could not perform internal krb5 init\n");
rc = -1;
goto cleanup;
@@ -1874,7 +1874,7 @@ set_krb5_creds(
/* initialize the kerberos context */
if ((rc = krb5_init_context(&ctx))) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Could not init Kerberos context: %d (%s)\n",
rc, error_message(rc));
goto cleanup;
@@ -1884,7 +1884,7 @@ set_krb5_creds(
creds in the ccache */
/* grab the default ccache - note: this does not open the cache */
if ((rc = krb5_cc_default(ctx, &cc))) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Could not get default Kerberos ccache: %d (%s)\n",
rc, error_message(rc));
goto cleanup;
@@ -1898,7 +1898,7 @@ set_krb5_creds(
is no ccache */
if ((rc = krb5_cc_get_principal(ctx, cc, &princ))) {
if (KRB5_FCC_NOFILE == rc) { /* no cache - ok */
- slapi_log_error(authtracelevel, logname,
+ slapi_log_error(authtracelevel, LOG_DEBUG, logname,
"The default credentials cache [%s] not found: "
"will create a new one.\n", cc_name);
/* close the cache - we will create a new one below */
@@ -1907,19 +1907,19 @@ set_krb5_creds(
slapi_ch_free_string(&cc_name);
/* fall through to the keytab auth code below */
} else { /* fatal */
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Could not open default Kerberos ccache [%s]: "
"%d (%s)\n", cc_name, rc, error_message(rc));
goto cleanup;
}
} else { /* have a valid ccache && found principal */
if ((rc = krb5_unparse_name(ctx, princ, &princ_name))) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Unable to get name of principal from ccache [%s]:
"
"%d (%s)\n", cc_name, rc, error_message(rc));
goto cleanup;
}
- slapi_log_error(authtracelevel, logname,
+ slapi_log_error(authtracelevel, LOG_DEBUG, logname,
"Using principal [%s] from ccache [%s]\n",
princ_name, cc_name);
}
@@ -1945,7 +1945,7 @@ set_krb5_creds(
about it. However, if the user knows what he/she is doing,
by using an external ccache file, they probably don't want
to be notified with an error every time. */
- slapi_log_error(loglevel, logname,
+ slapi_log_error(loglevel, loglevel==SLAPI_LOG_FATAL?LOG_ERR:LOG_DEBUG, logname,
"The server will use the external SASL/GSSAPI "
"credentials cache [%s:%s]. If you want the "
"server to automatically authenticate with its "
@@ -1964,7 +1964,7 @@ set_krb5_creds(
*/
if (!princ && looks_like_a_princ_name(username) &&
(rc = krb5_parse_name(ctx, username, &princ))) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Error: could not convert [%s] into a kerberos "
"principal: %d (%s)\n", username,
rc, error_message(rc));
@@ -1973,7 +1973,7 @@ set_krb5_creds(
if (getenv("HACK_PRINCIPAL_NAME") &&
(rc = krb5_parse_name(ctx, getenv("HACK_PRINCIPAL_NAME"), &princ)))
{
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Error: could not convert [%s] into a kerberos "
"principal: %d (%s)\n",
getenv("HACK_PRINCIPAL_NAME"),
rc, error_message(rc));
@@ -1985,7 +1985,7 @@ set_krb5_creds(
char *hostname = config_get_localhost();
if ((rc = krb5_sname_to_principal(ctx, hostname, "ldap",
KRB5_NT_SRV_HST, &princ))) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Error: could not construct ldap service "
"principal from hostname [%s]: %d (%s)\n",
hostname ? hostname : "NULL", rc,
error_message(rc));
@@ -1998,26 +1998,26 @@ set_krb5_creds(
slapi_ch_free_string(&princ_name);
if ((rc = krb5_unparse_name(ctx, princ, &princ_name))) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Unable to get name of principal: "
"%d (%s)\n", rc, error_message(rc));
goto cleanup;
}
- slapi_log_error(authtracelevel, logname,
+ slapi_log_error(authtracelevel, LOG_DEBUG, logname,
"Using principal named [%s]\n", princ_name);
/* grab the credentials from the ccache, if any -
if the credentials are still valid, we do not have
to authenticate again */
if (credentials_are_valid(ctx, cc, princ, princ_name, &rc)) {
- slapi_log_error(authtracelevel, logname,
+ slapi_log_error(authtracelevel, LOG_DEBUG, logname,
"Credentials for principal [%s] are still "
"valid - no auth is necessary.\n",
princ_name);
goto cleanup;
} else if (rc) { /* some error other than "there are no credentials" */
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Unable to verify cached credentials for "
"principal [%s]: %d (%s)\n", princ_name,
rc, error_message(rc));
@@ -2026,7 +2026,7 @@ set_krb5_creds(
/* find our default keytab */
if ((rc = krb5_kt_default(ctx, &kt))) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Unable to get default keytab: %d (%s)\n",
rc, error_message(rc));
goto cleanup;
@@ -2034,13 +2034,13 @@ set_krb5_creds(
/* get name of keytab for debugging purposes */
if ((rc = krb5_kt_get_name(ctx, kt, ktname, sizeof(ktname)))) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Unable to get name of default keytab: %d (%s)\n",
rc, error_message(rc));
goto cleanup;
}
- slapi_log_error(authtracelevel, logname,
+ slapi_log_error(authtracelevel, LOG_DEBUG, logname,
"Using keytab named [%s]\n", ktname);
/* now do the actual kerberos authentication using
@@ -2048,7 +2048,7 @@ set_krb5_creds(
rc = krb5_get_init_creds_keytab(ctx, &creds, princ, kt,
0, NULL, NULL);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Could not get initial credentials for principal [%s]
"
"in keytab [%s]: %d (%s)\n",
princ_name, ktname, rc, error_message(rc));
@@ -2068,7 +2068,7 @@ set_krb5_creds(
generates a new unique name and returns a memory
cache with that name */
if ((rc = krb5_cc_new_unique(ctx, cc_type, NULL, &cc))) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Could not create new unique memory ccache: "
"%d (%s)\n",
rc, error_message(rc));
@@ -2081,18 +2081,18 @@ set_krb5_creds(
to create the ctx, so the address should be unique enough
for our purposes */
if (!(cc_name = slapi_ch_smprintf("%s:%p", cc_type, ctx))) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Could create Kerberos memory ccache: "
"out of memory\n");
rc = 1;
goto cleanup;
}
#endif
- slapi_log_error(authtracelevel, logname,
+ slapi_log_error(authtracelevel, LOG_DEBUG, logname,
"Generated new memory ccache [%s]\n", cc_name);
new_ccache = 1; /* need to set this in env. */
} else {
- slapi_log_error(authtracelevel, logname,
+ slapi_log_error(authtracelevel, LOG_DEBUG, logname,
"Using existing ccache [%s]\n", cc_name);
}
@@ -2104,7 +2104,7 @@ set_krb5_creds(
cc could already have been created by new_unique above
*/
if (!cc && (rc = krb5_cc_resolve(ctx, cc_name, &cc))) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Could not create ccache [%s]: %d (%s)\n",
cc_name, rc, error_message(rc));
goto cleanup;
@@ -2112,7 +2112,7 @@ set_krb5_creds(
/* wipe out previous contents of cache for this principal, if any */
if ((rc = krb5_cc_initialize(ctx, cc, princ))) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Could not initialize ccache [%s] for the new "
"credentials for principal [%s]: %d (%s)\n",
cc_name, princ_name, rc, error_message(rc));
@@ -2121,7 +2121,7 @@ set_krb5_creds(
/* store the credentials in the cache */
if ((rc = krb5_cc_store_cred(ctx, cc, &creds))) {
- slapi_log_error(SLAPI_LOG_FATAL, logname,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
"Could not store the credentials in the "
"ccache [%s] for principal [%s]: %d (%s)\n",
cc_name, princ_name, rc, error_message(rc));
@@ -2140,7 +2140,7 @@ set_krb5_creds(
PR_snprintf(cc_env_name, sizeof(cc_env_name),
"%s=%s", KRB5_ENV_CCNAME, cc_name);
PR_SetEnv(cc_env_name);
- slapi_log_error(authtracelevel, logname,
+ slapi_log_error(authtracelevel, LOG_DEBUG, logname,
"Set new env for ccache: [%s]\n",
cc_env_name);
}
@@ -2182,22 +2182,22 @@ clear_krb5_ccache(void)
/* initialize the kerberos context */
if ((rc = krb5_init_context(&ctx))) {
- slapi_log_error(SLAPI_LOG_FATAL, "clear_krb5_ccache", "Could not
initialize kerberos context: %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "clear_krb5_ccache",
"Could not initialize kerberos context: %d (%s)\n",
rc, error_message(rc));
goto done;
}
/* get the default ccache */
if ((rc = krb5_cc_default(ctx, &cc))) {
- slapi_log_error(SLAPI_LOG_FATAL, "clear_krb5_ccache", "Could not
get default kerberos ccache: %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "clear_krb5_ccache",
"Could not get default kerberos ccache: %d (%s)\n",
rc, error_message(rc));
goto done;
}
/* destroy the ccache */
if((rc = krb5_cc_destroy(ctx, cc))){
- slapi_log_error(SLAPI_LOG_FATAL, "clear_krb5_ccache", "Could not
destroy kerberos ccache: %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "clear_krb5_ccache",
"Could not destroy kerberos ccache: %d (%s)\n",
rc, error_message(rc));
} else {
- slapi_log_error(SLAPI_LOG_TRACE,"clear_krb5_ccache", "Successfully
cleared kerberos ccache\n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG,"clear_krb5_ccache",
"Successfully cleared kerberos ccache\n");
}
done:
diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c
index 9a114a0..5915fbb 100644
--- a/ldap/servers/slapd/libglobs.c
+++ b/ldap/servers/slapd/libglobs.c
@@ -7111,7 +7111,7 @@ config_set_allowed_to_delete_attrs( const char *attrname, char
*value,
cgas = (struct config_get_and_set *)PL_HashTableLookup(confighash,
*s);
if (!cgas && PL_strcasecmp(*s, "aci") /* aci is an
exception */) {
- slapi_log_error(SLAPI_LOG_FATAL, "config",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "config",
"%s: Unknown attribute %s will be ignored\n",
CONFIG_ALLOWED_TO_DELETE_ATTRIBUTE, *s);
charray_remove(allowed, *s, 1);
@@ -7125,7 +7125,7 @@ config_set_allowed_to_delete_attrs( const char *attrname, char
*value,
/* reuse the duplicated string for the new attr value. */
if (allowed && (NULL == *allowed)) {
/* all the values to allow to delete are invalid */
- slapi_log_error(SLAPI_LOG_FATAL, "config",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "config",
"%s: Given attributes are all invalid. No
effects.\n",
CONFIG_ALLOWED_TO_DELETE_ATTRIBUTE);
slapi_ch_array_free(allowed);
@@ -7578,7 +7578,7 @@ config_set(const char *attr, struct berval **values, char *errorbuf,
int apply)
debugHashTable(attr);
#endif
slapi_create_errormsg(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "Unknown attribute %s
will be ignored", attr);
- slapi_log_error(SLAPI_LOG_FATAL, "config_set", "Unknown attribute %s
will be ignored", attr);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "config_set", "Unknown
attribute %s will be ignored", attr);
return LDAP_NO_SUCH_ATTRIBUTE;
}
@@ -7613,7 +7613,7 @@ config_set(const char *attr, struct berval **values, char *errorbuf,
int apply)
} else if (cgas->logsetfunc) {
retval = (cgas->logsetfunc)(cgas->attr_name, initval, cgas->whichlog,
errorbuf, apply);
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"config_set: the attribute %s is read only; "
"ignoring setting NULL value\n", attr);
}
@@ -7954,7 +7954,7 @@ config_set_accesslog_enabled(int value)
}
CFG_ONOFF_UNLOCK_WRITE(slapdFrontendConfig);
if (errorbuf[0] != '\0') {
- slapi_log_error(SLAPI_LOG_FATAL, "config",
"config_set_accesslog_enabled: %s\n", errorbuf);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "config",
"config_set_accesslog_enabled: %s\n", errorbuf);
}
}
@@ -7973,7 +7973,7 @@ config_set_auditlog_enabled(int value){
}
CFG_ONOFF_UNLOCK_WRITE(slapdFrontendConfig);
if (errorbuf[0] != '\0') {
- slapi_log_error(SLAPI_LOG_FATAL, "config",
"config_set_auditlog_enabled: %s\n", errorbuf);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "config",
"config_set_auditlog_enabled: %s\n", errorbuf);
}
}
@@ -7992,7 +7992,7 @@ config_set_auditfaillog_enabled(int value){
}
CFG_ONOFF_UNLOCK_WRITE(slapdFrontendConfig);
if (errorbuf[0] != '\0') {
- slapi_log_error(SLAPI_LOG_FATAL, "config",
"config_set_auditfaillog_enabled: %s\n", errorbuf);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "config",
"config_set_auditfaillog_enabled: %s\n", errorbuf);
}
}
@@ -8083,7 +8083,7 @@ config_set_malloc_mxfast(const char *attrname, char *value, char
*errorbuf, int
if ((mxfast >= 0) && (mxfast <= max)) {
mallopt(M_MXFAST, mxfast);
} else if (DEFAULT_MALLOC_UNSET != mxfast) {
- slapi_log_error(SLAPI_LOG_FATAL, "config",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "config",
"%s: Invalid value %d will be ignored\n",
CONFIG_MALLOC_MXFAST, mxfast);
}
@@ -8125,7 +8125,7 @@ config_set_malloc_trim_threshold(const char *attrname, char *value,
char *errorb
if (trim_threshold >= -1) {
mallopt(M_TRIM_THRESHOLD, trim_threshold);
} else if (DEFAULT_MALLOC_UNSET != trim_threshold) {
- slapi_log_error(SLAPI_LOG_FATAL, "config",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "config",
"%s: Invalid value %d will be ignored\n",
CONFIG_MALLOC_TRIM_THRESHOLD, trim_threshold);
}
@@ -8174,7 +8174,7 @@ config_set_malloc_mmap_threshold(const char *attrname, char *value,
char *errorb
if ((mmap_threshold >= 0) && (mmap_threshold <= max)) {
mallopt(M_MMAP_THRESHOLD, mmap_threshold);
} else if (DEFAULT_MALLOC_UNSET != mmap_threshold) {
- slapi_log_error(SLAPI_LOG_FATAL, "config",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "config",
"%s: Invalid value %d will be ignored\n",
CONFIG_MALLOC_MMAP_THRESHOLD, mmap_threshold);
}
diff --git a/ldap/servers/slapd/localhost.c b/ldap/servers/slapd/localhost.c
index 2e2a75a..c19bf5a 100644
--- a/ldap/servers/slapd/localhost.c
+++ b/ldap/servers/slapd/localhost.c
@@ -120,9 +120,9 @@ find_localhost_DNS(void)
/* No domain found. Try getdomainname. */
line[0] = '\0';
if (getdomainname(line, sizeof(line)) < 0) { /* failure */
- slapi_log_error(SLAPI_LOG_FATAL, "localhost_DNS",
"getdomainname failed\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "localhost_DNS",
"getdomainname failed\n");
} else {
- slapi_log_error(SLAPI_LOG_CONFIG, "localhost_DNS",
"getdomainname(%s)\n", line);
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, "localhost_DNS",
"getdomainname(%s)\n", line);
}
if (line[0] != '\0') {
domain = &line[0];
diff --git a/ldap/servers/slapd/log.c b/ldap/servers/slapd/log.c
index 18884b6..b478e98 100644
--- a/ldap/servers/slapd/log.c
+++ b/ldap/servers/slapd/log.c
@@ -23,6 +23,9 @@
** As of DS 4.0, we support log rotation for the ACCESS/ERROR/AUDIT log.
*/
+/* Use the syslog level names (prioritynames) */
+#define SYSLOG_NAMES 1
+
#include "log.h"
#include "fe.h"
#include <pwd.h> /* getpwnam */
@@ -105,7 +108,7 @@ static void vslapd_log_emergency_error(LOGFD fp, const char *msg, int
locked);
static int
slapd_log_error_proc_internal(
char *subsystem, /* omitted if NULL */
- int *sev_level,
+ int sev_level,
char *fmt,
va_list ap_err,
va_list ap_file);
@@ -2098,7 +2101,7 @@ slapd_log_auditfail_internal (
int
slapd_log_error_proc(
char *subsystem, /* omitted if NULL */
- int *sev_level,
+ int sev_level,
char *fmt,
... )
{
@@ -2142,7 +2145,7 @@ slapd_log_error_proc(
static int
slapd_log_error_proc_internal(
char *subsystem, /* omitted if NULL */
- int *sev_level,
+ int sev_level,
char *fmt,
va_list ap_err,
va_list ap_file)
@@ -2230,16 +2233,41 @@ vslapd_log_emergency_error(LOGFD fp, const char *msg, int locked)
}
}
+static void
+strToUpper(char *str, char *upper)
+{
+ while(*str != '\0'){
+ *upper = toupper(*str);
+ upper++;
+ str++;
+ }
+}
+
+static char*
+get_log_sev_name(int sev_level, char *sev_name)
+{
+ int i;
+ for (i = 0; prioritynames[i].c_val != -1; i++){
+ if ( prioritynames[i].c_val == sev_level ){
+ memset(sev_name, '\0', 10);
+ strToUpper(prioritynames[i].c_name, sev_name);
+ return sev_name;
+ }
+ }
+ return "";
+}
+
static int
vslapd_log_error(
LOGFD fp,
- iont sev_level,
+ int sev_level,
char *subsystem, /* omitted if NULL */
char *fmt,
va_list ap,
int locked )
{
char buffer[SLAPI_LOG_BUFSIZ];
+ char sev_name[10];
int blen = TBUFSIZE;
char *vbuf;
int header_len = 0;
@@ -2295,11 +2323,11 @@ vslapd_log_error(
/* blen = strlen(buffer); */
/* This truncates again .... But we have the nice smprintf above! */
if (subsystem == NULL) {
- PR_snprintf (buffer+blen, sizeof(buffer)-blen, "%s - %s",
- vbuf, toupper(prioritynames[sev_level].c_name));
+ PR_snprintf (buffer+blen, sizeof(buffer)-blen, "- %s - %s",
+ get_log_sev_name(sev_level, sev_name), vbuf);
} else {
PR_snprintf (buffer+blen, sizeof(buffer)-blen, "%s - %s - %s",
- subsystem, toupper(prioritynames[sev_level].c_name), vbuf);
+ subsystem, get_log_sev_name(sev_level, sev_name), vbuf);
}
buffer[sizeof(buffer)-1] = '\0';
@@ -2351,7 +2379,7 @@ slapi_log_error( int loglevel, int severity, char *subsystem, char
*fmt, ... )
int lbackend = loginfo.log_backend; /* We copy this to make these next checks atomic
*/
if ( loglevel < SLAPI_LOG_MIN || loglevel > SLAPI_LOG_MAX ) {
- (void)slapd_log_error_proc( subsystem,
+ (void)slapd_log_error_proc( subsystem, severity,
"slapi_log_error: invalid severity %d (message %s)\n",
loglevel, fmt );
return( -1 );
@@ -2401,14 +2429,14 @@ slapi_log_error_ext(int severity, char *subsystem, char *fmt,
va_list varg1, va_
int rc = 0;
if ( severity < SLAPI_LOG_MIN || severity > SLAPI_LOG_MAX ) {
- (void)slapd_log_error_proc( subsystem, "slapi_log_error: invalid severity %d
(message %s)\n",
+ (void)slapd_log_error_proc( subsystem, severity, "slapi_log_error: invalid
severity %d (message %s)\n",
severity, fmt );
return( -1 );
}
if ( slapd_ldap_debug & slapi_log_map[ severity ] )
{
- rc = slapd_log_error_proc_internal( subsystem, fmt, varg1, varg2 );
+ rc = slapd_log_error_proc_internal( subsystem, severity, fmt, varg1, varg2 );
} else {
rc = 0; /* nothing to be logged --> always return success */
}
@@ -2868,9 +2896,9 @@ log__delete_access_logfile(void)
if (PR_Delete(buffer) != PR_SUCCESS) {
PRErrorCode prerr = PR_GetError();
if (PR_FILE_NOT_FOUND_ERROR == prerr) {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already
removed\n", loginfo.log_access_file);
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "File %s
already removed\n", loginfo.log_access_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Unable to remove file:%s
error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to
remove file:%s error %d (%s)\n",
loginfo.log_access_file, prerr, slapd_pr_strerror(prerr));
}
}
@@ -2880,9 +2908,9 @@ log__delete_access_logfile(void)
if (PR_Delete(buffer) != PR_SUCCESS) {
PRErrorCode prerr = PR_GetError();
if (PR_FILE_NOT_FOUND_ERROR == prerr) {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already
removed\n", loginfo.log_access_file);
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "File %s
already removed\n", loginfo.log_access_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Unable to remove
file:%s.rotationinfo error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to
remove file:%s.rotationinfo error %d (%s)\n",
loginfo.log_access_file, prerr, slapd_pr_strerror(prerr));
}
}
@@ -2988,13 +3016,13 @@ delete_logfile:
if (PR_Delete(buffer) != PR_SUCCESS) {
PRErrorCode prerr = PR_GetError();
if (PR_FILE_NOT_FOUND_ERROR == prerr) {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already
removed\n", loginfo.log_access_file);
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "File %s already
removed\n", loginfo.log_access_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Unable to remove
file:%s.%s error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to
remove file:%s.%s error %d (%s)\n",
loginfo.log_access_file, tbuf, prerr, slapd_pr_strerror(prerr));
}
} else {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Removed file:%s.%s because
of (%s)\n", loginfo.log_access_file, tbuf, logstr);
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Removed
file:%s.%s because of (%s)\n", loginfo.log_access_file, tbuf, logstr);
}
slapi_ch_free((void**)&delete_logp);
loginfo.log_numof_access_logs--;
@@ -3623,9 +3651,9 @@ log__delete_error_logfile(int locked)
/* If locked, we should not call LDAPDebug, which tries to get a lock internally. */
PRErrorCode prerr = PR_GetError();
if (PR_FILE_NOT_FOUND_ERROR == prerr) {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already
removed\n", loginfo.log_error_file);
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "File %s
already removed\n", loginfo.log_error_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Unable to remove file:%s
error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to
remove file:%s error %d (%s)\n",
loginfo.log_error_file, prerr, slapd_pr_strerror(prerr));
}
}
@@ -3638,9 +3666,9 @@ log__delete_error_logfile(int locked)
/* If locked, we should not call LDAPDebug, which tries to get a lock internally. */
PRErrorCode prerr = PR_GetError();
if (PR_FILE_NOT_FOUND_ERROR == prerr) {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already
removed\n", loginfo.log_error_file);
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "File %s
already removed\n", loginfo.log_error_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Unable to remove
file:%s.rotationinfo error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to
remove file:%s.rotationinfo error %d (%s)\n",
loginfo.log_error_file, prerr, slapd_pr_strerror(prerr));
}
}
@@ -3800,9 +3828,9 @@ log__delete_audit_logfile(void)
if (PR_Delete(buffer) != PR_SUCCESS) {
PRErrorCode prerr = PR_GetError();
if (PR_FILE_NOT_FOUND_ERROR == prerr) {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already
removed\n", loginfo.log_audit_file);
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "File %s
already removed\n", loginfo.log_audit_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Unable to remove file:%s
error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to
remove file:%s error %d (%s)\n",
loginfo.log_audit_file, prerr, slapd_pr_strerror(prerr));
}
}
@@ -3812,9 +3840,9 @@ log__delete_audit_logfile(void)
if (PR_Delete(buffer) != PR_SUCCESS) {
PRErrorCode prerr = PR_GetError();
if (PR_FILE_NOT_FOUND_ERROR == prerr) {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already
removed\n", loginfo.log_audit_file);
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "File %s
already removed\n", loginfo.log_audit_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Unable to remove
file:%s.rotatoininfo error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to
remove file:%s.rotatoininfo error %d (%s)\n",
loginfo.log_audit_file, prerr, slapd_pr_strerror(prerr));
}
}
@@ -3919,13 +3947,13 @@ delete_logfile:
if (PR_Delete(buffer) != PR_SUCCESS) {
PRErrorCode prerr = PR_GetError();
if (PR_FILE_NOT_FOUND_ERROR == prerr) {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already
removed\n", loginfo.log_audit_file);
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "File %s already
removed\n", loginfo.log_audit_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Unable to remove
file:%s.%s error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to
remove file:%s.%s error %d (%s)\n",
loginfo.log_audit_file, tbuf, prerr, slapd_pr_strerror(prerr));
}
} else {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Removed file:%s.%s because
of (%s)\n", loginfo.log_audit_file, tbuf, logstr);
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Removed
file:%s.%s because of (%s)\n", loginfo.log_audit_file, tbuf, logstr);
}
slapi_ch_free((void**)&delete_logp);
loginfo.log_numof_audit_logs--;
@@ -3967,9 +3995,9 @@ log__delete_auditfail_logfile(void)
if (PR_Delete(buffer) != PR_SUCCESS) {
PRErrorCode prerr = PR_GetError();
if (PR_FILE_NOT_FOUND_ERROR == prerr) {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already
removed\n", loginfo.log_auditfail_file);
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "File %s
already removed\n", loginfo.log_auditfail_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Unable to remove file:%s
error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to
remove file:%s error %d (%s)\n",
loginfo.log_auditfail_file, prerr, slapd_pr_strerror(prerr));
}
}
@@ -3979,9 +4007,9 @@ log__delete_auditfail_logfile(void)
if (PR_Delete(buffer) != PR_SUCCESS) {
PRErrorCode prerr = PR_GetError();
if (PR_FILE_NOT_FOUND_ERROR == prerr) {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already
removed\n", loginfo.log_auditfail_file);
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "File %s
already removed\n", loginfo.log_auditfail_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Unable to remove
file:%s.rotatoininfo error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to
remove file:%s.rotatoininfo error %d (%s)\n",
loginfo.log_auditfail_file, prerr, slapd_pr_strerror(prerr));
}
}
@@ -4086,13 +4114,13 @@ delete_logfile:
if (PR_Delete(buffer) != PR_SUCCESS) {
PRErrorCode prerr = PR_GetError();
if (PR_FILE_NOT_FOUND_ERROR == prerr) {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already
removed\n", loginfo.log_auditfail_file);
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "File %s already
removed\n", loginfo.log_auditfail_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Unable to remove
file:%s.%s error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to
remove file:%s.%s error %d (%s)\n",
loginfo.log_auditfail_file, tbuf, prerr, slapd_pr_strerror(prerr));
}
} else {
- slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Removed file:%s.%s because
of (%s)\n", loginfo.log_auditfail_file, tbuf, logstr);
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Removed
file:%s.%s because of (%s)\n", loginfo.log_auditfail_file, tbuf, logstr);
}
slapi_ch_free((void**)&delete_logp);
loginfo.log_numof_auditfail_logs--;
diff --git a/ldap/servers/slapd/main.c b/ldap/servers/slapd/main.c
index 4b77fbb..00a5a54 100644
--- a/ldap/servers/slapd/main.c
+++ b/ldap/servers/slapd/main.c
@@ -681,7 +681,7 @@ main( int argc, char **argv)
* Process the config files.
*/
if (0 == slapd_bootstrap_config(slapdFrontendConfig->configdir)) {
- slapi_log_error(SLAPI_LOG_FATAL, "startup",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "startup",
"The configuration files in directory %s could not be read or were not found.
Please refer to the error log or output for more information.\n",
slapdFrontendConfig->configdir);
exit(1);
@@ -742,7 +742,7 @@ main( int argc, char **argv)
* Process the config files.
*/
if (0 == slapd_bootstrap_config(slapdFrontendConfig->configdir)) {
- slapi_log_error(SLAPI_LOG_FATAL, "startup",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "startup",
"The configuration files in directory %s could not be read or were not found.
Please refer to the error log or output for more information.\n",
slapdFrontendConfig->configdir);
exit(1);
@@ -763,7 +763,7 @@ main( int argc, char **argv)
entry_computed_attr_init();
if (0 == setup_internal_backends(slapdFrontendConfig->configdir)) {
- slapi_log_error(SLAPI_LOG_FATAL, "startup",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "startup",
"The configuration files in directory %s could not be read or were not found.
Please refer to the error log or output for more information.\n",
slapdFrontendConfig->configdir);
exit(1);
@@ -2639,7 +2639,7 @@ slapd_exemode_upgradednformat(void)
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
if ( archive_name == NULL ) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "ERROR: Required argument "
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: Required argument "
"\"-a <path to work db instance dir>\" is
missing\n");
usage( myname, extraname );
goto bail;
@@ -2651,7 +2651,7 @@ slapd_exemode_upgradednformat(void)
mapping_tree_init();
if ((backend_plugin = plugin_get_by_name("ldbm database")) == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: Could not find the ldbm backend plugin.\n");
goto bail;
}
@@ -2663,13 +2663,13 @@ slapd_exemode_upgradednformat(void)
*/
if (add_new_slapd_process(slapd_exemode, 0, skip_db_protect_check)
== -1) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "Shutting down due to possible "
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "Shutting down due to possible
"
"conflicts with other slapd
processes\n");
goto bail;
}
/* check for slapi v2 support */
if (! SLAPI_PLUGIN_IS_V2(backend_plugin)) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: %s is too old to upgrade dn format.\n",
backend_plugin->plg_name);
goto bail;
@@ -2885,7 +2885,7 @@ slapd_debug_level_log( int level )
}
}
- slapi_log_error( SLAPI_LOG_FATAL, SLAPD_VERSION_STR,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPD_VERSION_STR,
"%s: %s (%d)\n", "debug level", msg, level );
slapi_ch_free( (void **)&msg );
}
@@ -2928,12 +2928,12 @@ force_to_disable_security(const char *what, int *init_ssl,
daemon_ports_t *ports
char errorbuf[SLAPI_DSE_RETURNTEXT_SIZE];
errorbuf[0] = '\0';
- LDAPDebug2Args(LDAP_DEBUG_ANY, "ERROR: %s Initialization Failed. Disabling
%s.\n", what, what);
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: %s Initialization Failed.
Disabling %s.\n", what, what);
ports_info->s_socket = SLAPD_INVALID_SOCKET;
ports_info->s_port = 0;
*init_ssl = 0;
if (config_set_security(CONFIG_SECURITY_ATTRIBUTE, "off", errorbuf, 1)) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, "ERROR: Failed to disable %s:
\"%s\".\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: Failed to disable %s:
\"%s\".\n",
CONFIG_SECURITY_ATTRIBUTE, errorbuf[0]?errorbuf:"no error
message");
return 1;
}
diff --git a/ldap/servers/slapd/mapping_tree.c b/ldap/servers/slapd/mapping_tree.c
index 8dbf111..ea83129 100644
--- a/ldap/servers/slapd/mapping_tree.c
+++ b/ldap/servers/slapd/mapping_tree.c
@@ -301,7 +301,7 @@ mapping_tree_node_new(Slapi_DN *dn, Slapi_Backend **be, char
**backend_names, in
node->mtn_dstr_plg_rootmode = plg_rootmode;
node->mtn_dstr_plg = plg;
- slapi_log_error(SLAPI_LOG_TRACE, "mapping_tree",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "mapping_tree",
"Created new mapping tree node for suffix [%s] backend [%s]
[%p]\n",
slapi_sdn_get_dn(dn),
backend_names && backend_names[0] ? backend_names[0] :
"null",
@@ -625,7 +625,7 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node
**newnodep )
* a special case (no parent; will replace the internal root
* node (mapping_tree_root) with data from this entry).
*/
- slapi_log_error( SLAPI_LOG_ARGS, "mapping_tree_entry_add", "NULL
suffix\n" );
+ slapi_log_error(SLAPI_LOG_ARGS, LOG_DEBUG, "mapping_tree_entry_add",
"NULL suffix\n" );
parent_node = NULL;
}
@@ -848,7 +848,7 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node
**newnodep )
* node hold pointers to it in their mtn_parent field).
*/
- slapi_log_error( SLAPI_LOG_ARGS, "mapping_tree_entry_add", "fix up
NULL suffix\n" );
+ slapi_log_error(SLAPI_LOG_ARGS, LOG_DEBUG, "mapping_tree_entry_add",
"fix up NULL suffix\n" );
node->mtn_children = mapping_tree_root->mtn_children;
node->mtn_brother = mapping_tree_root->mtn_brother;
@@ -1594,7 +1594,7 @@ done:
CONFIG_DEFAULT_NAMING_CONTEXT,
NULL);
if (rc) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"mapping_tree_entry_delete_callback: "
"deleting config param %s failed: RC=%d\n",
CONFIG_DEFAULT_NAMING_CONTEXT, rc);
@@ -1607,7 +1607,7 @@ done:
if (config_set_default_naming_context(
CONFIG_DEFAULT_NAMING_CONTEXT,
NULL, errorbuf, CONFIG_APPLY)) {
- slapi_log_error(SLAPI_LOG_FATAL, "mapping_tree",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"mapping_tree",
"mapping_tree_entry_delete_callback: setting NULL to %s
failed. %s\n",
CONFIG_DEFAULT_NAMING_CONTEXT, errorbuf);
}
@@ -2268,7 +2268,7 @@ int slapi_mapping_tree_select_all(Slapi_PBlock *pb, Slapi_Backend
**be_list,
/* get the operational parameters */
slapi_pblock_get(pb, SLAPI_SEARCH_TARGET_SDN, &sdn);
if (NULL == sdn) {
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "Error: Null target DN");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "Error: Null target
DN");
return LDAP_OPERATIONS_ERROR;
}
slapi_pblock_get(pb, SLAPI_OPERATION, &op);
@@ -2324,7 +2324,7 @@ int slapi_mapping_tree_select_all(Slapi_PBlock *pb, Slapi_Backend
**be_list,
if (be && !be_isdeleted(be))
{
/* wrong backend or referall, ignore it */
- slapi_log_error(SLAPI_LOG_ARGS, NULL,
+ slapi_log_error(SLAPI_LOG_ARGS, LOG_DEBUG, NULL,
"mapping tree release backend : %s\n",
slapi_be_get_name(be));
slapi_be_Unlock(be);
@@ -2337,7 +2337,7 @@ int slapi_mapping_tree_select_all(Slapi_PBlock *pb, Slapi_Backend
**be_list,
if (be_index == BE_LIST_SIZE) { /* error - too many backends */
slapi_create_errormsg(errorbuf, ebuflen,
"Error: too many backends match search request - cannot
proceed");
- slapi_log_error(SLAPI_LOG_FATAL, "mapping_tree",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "mapping_tree",
"Error: too many backends match search request - cannot
proceed");
ret_code = LDAP_ADMINLIMIT_EXCEEDED;
break;
@@ -2404,7 +2404,7 @@ void slapi_mapping_tree_free_all(Slapi_Backend **be_list,
Slapi_Entry **referral
while ((be = be_list[index++]))
{
- slapi_log_error(SLAPI_LOG_ARGS, NULL, "mapping tree release backend :
%s\n", slapi_be_get_name(be));
+ slapi_log_error(SLAPI_LOG_ARGS, LOG_DEBUG, NULL, "mapping tree release
backend : %s\n", slapi_be_get_name(be));
slapi_be_Unlock(be);
}
}
@@ -2778,12 +2778,12 @@ static int mtn_get_be(mapping_tree_node *target_node, Slapi_PBlock
*pb,
if (result == LDAP_SUCCESS) {
if (*be && !be_isdeleted(*be)) {
- slapi_log_error(SLAPI_LOG_ARGS, NULL,
+ slapi_log_error(SLAPI_LOG_ARGS, LOG_DEBUG, NULL,
"mapping tree selected backend : %s\n",
slapi_be_get_name(*be));
slapi_be_Rlock(*be);
} else if (referral && *referral) {
- slapi_log_error(SLAPI_LOG_ARGS, NULL,
+ slapi_log_error(SLAPI_LOG_ARGS, LOG_DEBUG, NULL,
"mapping tree selected referral at node : %s\n",
slapi_sdn_get_dn(target_node->mtn_subtree));
}
@@ -2979,7 +2979,7 @@ slapi_get_mapping_tree_node_configdn (const Slapi_DN *root)
dn = slapi_create_dn_string("cn=\"%s\",%s",
slapi_sdn_get_udn(root), MAPPING_TREE_BASE_DN);
if (NULL == dn) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"slapi_get_mapping_tree_node_configdn: "
"failed to crate mapping tree dn for %s\n",
slapi_sdn_get_dn(root));
@@ -3006,7 +3006,7 @@ slapi_get_mapping_tree_node_configsdn (const Slapi_DN *root)
dn = slapi_create_dn_string("cn=\"%s\",%s",
slapi_sdn_get_udn(root), MAPPING_TREE_BASE_DN);
if (NULL == dn) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"slapi_get_mapping_tree_node_configsdn: "
"failed to crate mapping tree dn for %s\n",
slapi_sdn_get_dn(root));
@@ -3092,7 +3092,7 @@ slapi_be_select_exact(const Slapi_DN *sdn)
mapping_tree_node *node = NULL;
if (!sdn) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "slapi_be_select_exact: Empty Slapi_DN is
given.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "slapi_be_select_exact: Empty
Slapi_DN is given.\n");
return NULL;
}
node = slapi_get_mapping_tree_node_by_dn(sdn);
@@ -3788,7 +3788,7 @@ void mtn_unlock(void)
#ifdef TEST_FOR_REGISTER_CHANGE
void my_test_fnct1(void *handle, char *be_name, int old_state, int new_state)
{
- slapi_log_error(SLAPI_LOG_ARGS, NULL,
+ slapi_log_error(SLAPI_LOG_ARGS, LOG_DEBUG, NULL,
"my_test_fnct1 : handle %d, be %s, old state %d, new state %d\n",
handle,be_name, old_state, new_state);
@@ -3798,7 +3798,7 @@ void my_test_fnct1(void *handle, char *be_name, int old_state, int
new_state)
void my_test_fnct2(void *handle, char *be_name, int old_state, int new_state)
{
- slapi_log_error(SLAPI_LOG_ARGS, NULL,
+ slapi_log_error(SLAPI_LOG_ARGS, LOG_DEBUG, NULL,
"my_test_fnct2 : handle %d, be %s, old state %d, new state %d\n",
handle, be_name, old_state, new_state);
}
diff --git a/ldap/servers/slapd/mempool.c b/ldap/servers/slapd/mempool.c
index d8f4763..ad50bfa 100644
--- a/ldap/servers/slapd/mempool.c
+++ b/ldap/servers/slapd/mempool.c
@@ -96,7 +96,7 @@ mempool_init(struct mempool **my_mempool)
mempool[i].mempool_mutex = PR_NewLock();
if (NULL == mempool[i].mempool_mutex) {
PRErrorCode ec = PR_GetError();
- slapi_log_error (SLAPI_LOG_FATAL, "mempool", "mempool_init: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "mempool", "mempool_init:
"
"failed to create mutex - (%d - %s); mempool(%s) is disabled",
ec, slapd_pr_strerror(ec), mempool[i].mempool_name);
rc = LDAP_OPERATIONS_ERROR;
@@ -340,7 +340,7 @@ create_counters()
static void
log_negative_alloc_msg( const char *op, const char *units, unsigned long size )
{
- slapi_log_error( SLAPI_LOG_FATAL, SLAPD_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPD_MODULE,
"cannot %s %lu %s;\n"
"trying to allocate 0 or a negative number of %s is not portable and\n"
"gives different results on different platforms.\n",
@@ -356,7 +356,7 @@ slapi_ch_malloc_core( unsigned long lsize )
int oserr = errno;
oom_occurred();
- slapi_log_error( SLAPI_LOG_FATAL, SLAPD_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPD_MODULE,
"malloc of %lu bytes failed; OS error %d (%s)%s\n",
lsize, oserr, slapd_system_strerror( oserr ), oom_advice );
exit( 1 );
@@ -424,7 +424,7 @@ slapi_ch_realloc_core( char *block, unsigned long lsize )
int oserr = errno;
oom_occurred();
- slapi_log_error( SLAPI_LOG_FATAL, SLAPD_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPD_MODULE,
"realloc of %lu bytes failed; OS error %d (%s)%s\n",
lsize, oserr, slapd_system_strerror( oserr ), oom_advice );
exit( 1 );
@@ -505,7 +505,7 @@ slapi_ch_calloc_core( unsigned long lsize )
int oserr = errno;
oom_occurred();
- slapi_log_error( SLAPI_LOG_FATAL, SLAPD_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPD_MODULE,
"calloc of %lu bytes failed; OS error %d (%s)%s\n",
lsize, oserr, slapd_system_strerror( oserr ), oom_advice );
exit( 1 );
@@ -670,7 +670,7 @@ slapi_ch_mmap(unsigned long len)
int oserr = errno;
oom_occurred();
- slapi_log_error( SLAPI_LOG_FATAL, SLAPD_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPD_MODULE,
"mmap of %lu bytes failed; OS error %d (%s)%s\n",
roundup, oserr, slapd_system_strerror( oserr ), oom_advice );
exit( 1 );
@@ -691,7 +691,7 @@ slapi_ch_munmap(void **start, unsigned long len)
if (0 != rc) {
int oserr = errno;
- slapi_log_error( SLAPI_LOG_FATAL, SLAPD_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPD_MODULE,
"munmap of %lu bytes failed; OS error %d (%s)\n",
roundup, oserr, slapd_system_strerror( oserr ) );
/* Leaked. This should not happen */
@@ -712,7 +712,7 @@ slapi_ch_mmap_no_roundup( unsigned long size)
int oserr = errno;
oom_occurred();
- slapi_log_error( SLAPI_LOG_FATAL, SLAPD_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPD_MODULE,
"mmap of %lu bytes failed; OS error %d (%s)%s\n",
size + sizeof(unsigned long), oserr,
slapd_system_strerror( oserr ), oom_advice );
@@ -733,7 +733,7 @@ slapi_ch_munmap_no_roundup(void **start, unsigned long len)
if (0 != rc) {
int oserr = errno;
- slapi_log_error( SLAPI_LOG_FATAL, SLAPD_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPD_MODULE,
"munmap of %lu bytes failed; OS error %d (%s)\n",
len, oserr, slapd_system_strerror( oserr ) );
/* Leaked. This should not happen */
diff --git a/ldap/servers/slapd/modify.c b/ldap/servers/slapd/modify.c
index 60d1f65..75d9333 100644
--- a/ldap/servers/slapd/modify.c
+++ b/ldap/servers/slapd/modify.c
@@ -467,7 +467,7 @@ slapi_modify_internal_set_pb (Slapi_PBlock *pb, const char *dn,
PR_ASSERT (pb != NULL);
if (pb == NULL || dn == NULL || mods == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"slapi_modify_internal_set_pb: NULL parameter\n");
return;
}
@@ -496,7 +496,7 @@ slapi_modify_internal_set_pb_ext(Slapi_PBlock *pb, const Slapi_DN
*sdn,
PR_ASSERT (pb != NULL);
if (pb == NULL || sdn == NULL || mods == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"slapi_modify_internal_set_pb_ext: NULL parameter\n");
return;
}
diff --git a/ldap/servers/slapd/modrdn.c b/ldap/servers/slapd/modrdn.c
index 31cb5d9..ea9d72f 100644
--- a/ldap/servers/slapd/modrdn.c
+++ b/ldap/servers/slapd/modrdn.c
@@ -312,7 +312,7 @@ slapi_rename_internal_set_pb_ext(Slapi_PBlock *pb,
PR_ASSERT (pb != NULL);
if (pb == NULL || olddn == NULL || newrdn == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"slapi_rename_internal_set_pb: NULL parameter\n");
return;
}
@@ -349,7 +349,7 @@ static int rename_internal_pb (Slapi_PBlock *pb)
if (!op) {
opresult = 1;
slapi_pblock_set(pb, SLAPI_PLUGIN_INTOP_RESULT, &opresult);
- slapi_log_error(SLAPI_LOG_FATAL, "rename_internal_pb",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "rename_internal_pb",
"Internal error: pblock was not properly initialized\n");
return -1;
}
@@ -500,13 +500,13 @@ op_shared_rename(Slapi_PBlock *pb, int passin_args)
if ((rdns = slapi_ldap_explode_rdn(newrdn, 0)) == NULL)
{
if ( !internal_op ) {
- slapi_log_error(SLAPI_LOG_ARGS, NULL,
+ slapi_log_error(SLAPI_LOG_ARGS, LOG_DEBUG, NULL,
"conn=%" NSPRIu64 " op=%d MODRDN invalid new RDN
(\"%s\")\n",
pb->pb_conn->c_connid,
pb->pb_op->o_opid,
(NULL == newrdn) ? "(null)" : newrdn);
} else {
- slapi_log_error(SLAPI_LOG_ARGS, NULL,
+ slapi_log_error(SLAPI_LOG_ARGS, LOG_DEBUG, NULL,
"conn=%s op=%d MODRDN invalid new RDN (\"%s\")\n",
LOG_INTERNAL_OP_CON_ID,
LOG_INTERNAL_OP_OP_ID,
@@ -531,15 +531,15 @@ op_shared_rename(Slapi_PBlock *pb, int passin_args)
err = slapi_dn_syntax_check(pb, newsuperior, 1);
if (err)
{
- LDAPDebug0Args(LDAP_DEBUG_ARGS, "Syntax check of newSuperior failed\n");
+ LDAPDebug0Args(LDAP_DEBUG_ARGS, LOG_DEBUG, "Syntax check of newSuperior
failed\n");
if (!internal_op) {
- slapi_log_error(SLAPI_LOG_ARGS, NULL,
+ slapi_log_error(SLAPI_LOG_ARGS, LOG_DEBUG, NULL,
"conn=%" NSPRIu64 " op=%d MODRDN invalid new superior
(\"%s\")",
pb->pb_conn->c_connid,
pb->pb_op->o_opid,
newsuperior ? newsuperior : "(null)");
} else {
- slapi_log_error(SLAPI_LOG_ARGS, NULL,
+ slapi_log_error(SLAPI_LOG_ARGS, LOG_DEBUG, NULL,
"conn=%s op=%d MODRDN invalid new superior (\"%s\")",
LOG_INTERNAL_OP_CON_ID,
LOG_INTERNAL_OP_OP_ID,
diff --git a/ldap/servers/slapd/operation.c b/ldap/servers/slapd/operation.c
index 9866eac..1915c8f 100644
--- a/ldap/servers/slapd/operation.c
+++ b/ldap/servers/slapd/operation.c
@@ -576,7 +576,7 @@ int slapi_connection_acquire(Slapi_Connection *conn)
if (conn->c_flags & CONN_FLAG_CLOSING)
{
/* This may happen while other threads are still working on this connection */
- slapi_log_error(SLAPI_LOG_FATAL, "connection",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "connection",
"conn=%" NSPRIu64 " fd=%d Attempt to acquire connection
in the closing state\n",
conn->c_connid, conn->c_sd);
rc = -1;
@@ -614,7 +614,7 @@ slapi_connection_remove_operation( Slapi_PBlock *pb, Slapi_Connection
*conn, Sla
if (release) {
/* connection_release_nolock(conn); */
if (conn->c_refcnt <= 0) {
- slapi_log_error(SLAPI_LOG_FATAL, "connection",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "connection",
"conn=%" NSPRIu64 " fd=%d Attempt to release connection
that is not acquired\n",
conn->c_connid, conn->c_sd);
rc = -1;
diff --git a/ldap/servers/slapd/opshared.c b/ldap/servers/slapd/opshared.c
index db8c596..652b820 100644
--- a/ldap/servers/slapd/opshared.c
+++ b/ldap/servers/slapd/opshared.c
@@ -1087,7 +1087,7 @@ process_entry(Slapi_PBlock *pb, Slapi_Entry *e, int send_result)
slapi_attr_get_numvalues(a, &numValues );
if (numValues == 0)
{
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "null ref in (%s)\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "null ref in (%s)\n",
slapi_entry_get_dn_const(e));
}
else
diff --git a/ldap/servers/slapd/pagedresults.c b/ldap/servers/slapd/pagedresults.c
index 6fec344..e9a6849 100644
--- a/ldap/servers/slapd/pagedresults.c
+++ b/ldap/servers/slapd/pagedresults.c
@@ -62,9 +62,9 @@ pagedresults_parse_control_value( Slapi_PBlock *pb,
int i;
int maxreqs = config_get_maxsimplepaged_per_conn();
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "-->
pagedresults_parse_control_value\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
pagedresults_parse_control_value\n");
if ( NULL == conn || NULL == op || NULL == pagesize || NULL == index ) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"<-- pagedresults_parse_control_value: %d\n",
LDAP_OPERATIONS_ERROR);
return LDAP_OPERATIONS_ERROR;
@@ -73,26 +73,26 @@ pagedresults_parse_control_value( Slapi_PBlock *pb,
if ( psbvp->bv_len == 0 || psbvp->bv_val == NULL )
{
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"<-- pagedresults_parse_control_value: no control
value\n");
return LDAP_PROTOCOL_ERROR;
}
ber = ber_init( psbvp );
if ( ber == NULL )
{
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"<-- pagedresults_parse_control_value: no control
value\n");
return LDAP_PROTOCOL_ERROR;
}
if ( ber_scanf( ber, "{io}", pagesize, &cookie ) == LBER_ERROR )
{
- LDAPDebug0Args(LDAP_DEBUG_ANY,
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
"<-- pagedresults_parse_control_value: corrupted control
value\n");
return LDAP_PROTOCOL_ERROR;
}
if (!maxreqs)
{
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"pagedresults_parse_control_value: simple paged results
requests per conn exeeded the limit: %d\n",
maxreqs);
return LDAP_UNWILLING_TO_PERFORM;
@@ -140,7 +140,7 @@ pagedresults_parse_control_value( Slapi_PBlock *pb,
}
if ((maxreqs > 0) && (*index >= maxreqs)) {
rc = LDAP_UNWILLING_TO_PERFORM;
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"pagedresults_parse_control_value: simple paged results
requests per conn exeeded the limit: %d\n",
maxreqs);
goto bail;
@@ -161,7 +161,7 @@ pagedresults_parse_control_value( Slapi_PBlock *pb,
slapi_ch_free_string(&ptr);
if ((conn->c_pagedresults.prl_maxlen <= *index) || (*index < 0)){
rc = LDAP_PROTOCOL_ERROR;
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"pagedresults_parse_control_value: invalid cookie:
%d\n", *index);
*index = -1; /* index is invalid. reinitializing it. */
goto bail;
@@ -186,7 +186,7 @@ pagedresults_parse_control_value( Slapi_PBlock *pb,
}
} else {
rc = LDAP_PROTOCOL_ERROR;
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "pagedresults_parse_control_value: invalid
cookie: %d\n", *index);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "pagedresults_parse_control_value:
invalid cookie: %d\n", *index);
}
bail:
slapi_ch_free((void **)&cookie.bv_val);
@@ -207,7 +207,7 @@ bail:
}
PR_ExitMonitor(conn->c_mutex);
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<-- pagedresults_parse_control_value: idx %d\n",
*index);
return rc;
}
@@ -237,7 +237,7 @@ pagedresults_set_response_control( Slapi_PBlock *pb, int iscritical,
int i;
int cookie = 0;
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_set_response_control: idx=%d\n",
index);
if ( (ber = der_alloc()) == NULL )
@@ -291,7 +291,7 @@ bailout:
ber_free ( ber, 1 ); /* ber_free() checks for NULL param */
ber_bvfree ( berval ); /* ber_bvfree() checks for NULL param */
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<-- pagedresults_set_response_control: idx=%d\n",
index);
}
@@ -303,12 +303,12 @@ pagedresults_free_one( Connection *conn, Operation *op, int index )
if (!op_is_pagedresults(op)) {
return 0; /* noop */
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_free_one: idx=%d\n", index);
if (conn && (index > -1)) {
PR_EnterMonitor(conn->c_mutex);
if (conn->c_pagedresults.prl_count <= 0) {
- LDAPDebug2Args(LDAP_DEBUG_TRACE, "pagedresults_free_one: "
+ LDAPDebug2Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "pagedresults_free_one:
"
"conn=%d paged requests list count is %d\n",
conn->c_connid, conn->c_pagedresults.prl_count);
} else if (index < conn->c_pagedresults.prl_maxlen) {
@@ -320,7 +320,7 @@ pagedresults_free_one( Connection *conn, Operation *op, int index )
PR_ExitMonitor(conn->c_mutex);
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, "<-- pagedresults_free_one: %d\n", rc);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- pagedresults_free_one:
%d\n", rc);
return rc;
}
@@ -337,7 +337,7 @@ pagedresults_free_one_msgid_nolock( Connection *conn, ber_int_t msgid
)
if (conn->c_pagedresults.prl_maxlen <= 0) {
; /* Not a paged result. */
} else {
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_free_one_msgid_nolock:
msgid=%d\n", msgid);
for (i = 0; i < conn->c_pagedresults.prl_maxlen; i++) {
if (conn->c_pagedresults.prl_list[i].pr_msgid == msgid) {
@@ -353,7 +353,7 @@ pagedresults_free_one_msgid_nolock( Connection *conn, ber_int_t msgid
)
break;
}
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<-- pagedresults_free_one_msgid_nolock: %d\n",
rc);
}
}
@@ -366,7 +366,7 @@ Slapi_Backend *
pagedresults_get_current_be(Connection *conn, int index)
{
Slapi_Backend *be = NULL;
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_get_current_be: idx=%d\n", index);
if (conn && (index > -1)) {
PR_EnterMonitor(conn->c_mutex);
@@ -375,7 +375,7 @@ pagedresults_get_current_be(Connection *conn, int index)
}
PR_ExitMonitor(conn->c_mutex);
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<-- pagedresults_get_current_be: %p\n", be);
return be;
}
@@ -384,7 +384,7 @@ int
pagedresults_set_current_be(Connection *conn, Slapi_Backend *be, int index, int nolock)
{
int rc = -1;
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_set_current_be: idx=%d\n", index);
if (conn && (index > -1)) {
if (!nolock) PR_EnterMonitor(conn->c_mutex);
@@ -394,7 +394,7 @@ pagedresults_set_current_be(Connection *conn, Slapi_Backend *be, int
index, int
rc = 0;
if (!nolock) PR_ExitMonitor(conn->c_mutex);
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<-- pagedresults_set_current_be: %d\n", rc);
return rc;
}
@@ -406,7 +406,7 @@ pagedresults_get_search_result(Connection *conn, Operation *op, int
locked, int
if (!op_is_pagedresults(op)) {
return sr; /* noop */
}
- LDAPDebug2Args(LDAP_DEBUG_TRACE,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_get_search_result(%s): idx=%d\n",
locked?"locked":"not locked", index);
if (conn && (index > -1)) {
@@ -420,7 +420,7 @@ pagedresults_get_search_result(Connection *conn, Operation *op, int
locked, int
PR_ExitMonitor(conn->c_mutex);
}
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<-- pagedresults_get_search_result: %p\n", sr);
return sr;
}
@@ -432,7 +432,7 @@ pagedresults_set_search_result(Connection *conn, Operation *op, void
*sr, int lo
if (!op_is_pagedresults(op)) {
return 0; /* noop */
}
- LDAPDebug2Args(LDAP_DEBUG_TRACE,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_set_search_result: idx=%d, sr=%p\n",
index, sr);
if (conn && (index > -1)) {
@@ -447,7 +447,7 @@ pagedresults_set_search_result(Connection *conn, Operation *op, void
*sr, int lo
}
if (!locked) PR_ExitMonitor(conn->c_mutex);
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<-- pagedresults_set_search_result: %d\n", rc);
return rc;
}
@@ -459,7 +459,7 @@ pagedresults_get_search_result_count(Connection *conn, Operation *op,
int index)
if (!op_is_pagedresults(op)) {
return count; /* noop */
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_get_search_result_count: idx=%d\n",
index);
if (conn && (index > -1)) {
PR_EnterMonitor(conn->c_mutex);
@@ -468,7 +468,7 @@ pagedresults_get_search_result_count(Connection *conn, Operation *op,
int index)
}
PR_ExitMonitor(conn->c_mutex);
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<-- pagedresults_get_search_result_count: %d\n", count);
return count;
}
@@ -481,7 +481,7 @@ pagedresults_set_search_result_count(Connection *conn, Operation *op,
if (!op_is_pagedresults(op)) {
return rc; /* noop */
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_set_search_result_count: idx=%d\n",
index);
if (conn && (index > -1)) {
PR_EnterMonitor(conn->c_mutex);
@@ -491,7 +491,7 @@ pagedresults_set_search_result_count(Connection *conn, Operation *op,
PR_ExitMonitor(conn->c_mutex);
rc = 0;
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<-- pagedresults_set_search_result_count: %d\n", rc);
return rc;
}
@@ -505,7 +505,7 @@ pagedresults_get_search_result_set_size_estimate(Connection *conn,
if (!op_is_pagedresults(op)) {
return count; /* noop */
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_get_search_result_set_size_estimate: "
"idx=%d\n", index);
if (conn && (index > -1)) {
@@ -515,7 +515,7 @@ pagedresults_get_search_result_set_size_estimate(Connection *conn,
}
PR_ExitMonitor(conn->c_mutex);
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<-- pagedresults_get_search_result_set_size_estimate:
%d\n",
count);
return count;
@@ -530,7 +530,7 @@ pagedresults_set_search_result_set_size_estimate(Connection *conn,
if (!op_is_pagedresults(op)) {
return rc; /* noop */
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_set_search_result_set_size_estimate: "
"idx=%d\n", index);
if (conn && (index > -1)) {
@@ -541,7 +541,7 @@ pagedresults_set_search_result_set_size_estimate(Connection *conn,
PR_ExitMonitor(conn->c_mutex);
rc = 0;
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<-- pagedresults_set_search_result_set_size_estimate:
%d\n",
rc);
return rc;
@@ -554,7 +554,7 @@ pagedresults_get_with_sort(Connection *conn, Operation *op, int
index)
if (!op_is_pagedresults(op)) {
return flags; /* noop */
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_get_with_sort: idx=%d\n", index);
if (conn && (index > -1)) {
PR_EnterMonitor(conn->c_mutex);
@@ -563,7 +563,7 @@ pagedresults_get_with_sort(Connection *conn, Operation *op, int
index)
}
PR_ExitMonitor(conn->c_mutex);
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<-- pagedresults_get_with_sort: %p\n", flags);
return flags;
}
@@ -576,7 +576,7 @@ pagedresults_set_with_sort(Connection *conn, Operation *op,
if (!op_is_pagedresults(op)) {
return rc; /* noop */
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_set_with_sort: idx=%d\n", index);
if (conn && (index > -1)) {
PR_EnterMonitor(conn->c_mutex);
@@ -589,7 +589,7 @@ pagedresults_set_with_sort(Connection *conn, Operation *op,
PR_ExitMonitor(conn->c_mutex);
rc = 0;
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, "<-- pagedresults_set_with_sort: %d\n",
rc);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- pagedresults_set_with_sort:
%d\n", rc);
return rc;
}
@@ -600,7 +600,7 @@ pagedresults_get_unindexed(Connection *conn, Operation *op, int
index)
if (!op_is_pagedresults(op)) {
return flags; /* noop */
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_get_unindexed: idx=%d\n", index);
if (conn && (index > -1)) {
PR_EnterMonitor(conn->c_mutex);
@@ -609,7 +609,7 @@ pagedresults_get_unindexed(Connection *conn, Operation *op, int
index)
}
PR_ExitMonitor(conn->c_mutex);
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<-- pagedresults_get_unindexed: %p\n", flags);
return flags;
}
@@ -621,7 +621,7 @@ pagedresults_set_unindexed(Connection *conn, Operation *op, int
index)
if (!op_is_pagedresults(op)) {
return rc; /* noop */
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_set_unindexed: idx=%d\n", index);
if (conn && (index > -1)) {
PR_EnterMonitor(conn->c_mutex);
@@ -632,7 +632,7 @@ pagedresults_set_unindexed(Connection *conn, Operation *op, int
index)
PR_ExitMonitor(conn->c_mutex);
rc = 0;
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<-- pagedresults_set_unindexed: %d\n", rc);
return rc;
}
@@ -644,7 +644,7 @@ pagedresults_get_sort_result_code(Connection *conn, Operation *op, int
index)
if (!op_is_pagedresults(op)) {
return code; /* noop */
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_get_sort_result_code: idx=%d\n",
index);
if (conn && (index > -1)) {
PR_EnterMonitor(conn->c_mutex);
@@ -653,7 +653,7 @@ pagedresults_get_sort_result_code(Connection *conn, Operation *op, int
index)
}
PR_ExitMonitor(conn->c_mutex);
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<-- pagedresults_get_sort_result_code: %d\n", code);
return code;
}
@@ -666,7 +666,7 @@ pagedresults_set_sort_result_code(Connection *conn, Operation *op,
if (!op_is_pagedresults(op)) {
return rc; /* noop */
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_set_sort_result_code: idx=%d\n",
index);
if (conn && (index > -1)) {
PR_EnterMonitor(conn->c_mutex);
@@ -676,7 +676,7 @@ pagedresults_set_sort_result_code(Connection *conn, Operation *op,
PR_ExitMonitor(conn->c_mutex);
rc = 0;
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<-- pagedresults_set_sort_result_code: %d\n", rc);
return rc;
}
@@ -689,7 +689,7 @@ pagedresults_set_timelimit(Connection *conn, Operation *op,
if (!op_is_pagedresults(op)) {
return rc; /* noop */
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_set_timelimit: idx=%d\n", index);
if (conn && (index > -1)) {
PR_EnterMonitor(conn->c_mutex);
@@ -699,7 +699,7 @@ pagedresults_set_timelimit(Connection *conn, Operation *op,
PR_ExitMonitor(conn->c_mutex);
rc = 0;
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, "<-- pagedresults_set_timelimit: %d\n",
rc);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- pagedresults_set_timelimit:
%d\n", rc);
return rc;
}
@@ -711,10 +711,10 @@ pagedresults_set_sizelimit(Connection *conn, Operation *op,
if (!op_is_pagedresults(op)) {
return rc; /* noop */
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_set_sizelimit: idx=%d\n", index);
op->o_pagedresults_sizelimit = sizelimit;
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, "<-- pagedresults_set_sizelimit: %d\n",
rc);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- pagedresults_set_sizelimit:
%d\n", rc);
return rc;
}
@@ -725,10 +725,10 @@ pagedresults_get_sizelimit(Connection *conn, Operation *op, int
index)
if (!op_is_pagedresults(op)) {
return sizelimit; /* noop */
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_get_sizelimit: idx=%d\n", index);
sizelimit = op->o_pagedresults_sizelimit;
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "<-- pagedresults_get_sizelimit\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
pagedresults_get_sizelimit\n");
return sizelimit;
}
@@ -746,10 +746,10 @@ pagedresults_cleanup(Connection *conn, int needlock)
int i;
PagedResults *prp = NULL;
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "--> pagedresults_cleanup\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
pagedresults_cleanup\n");
if (NULL == conn) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "<-- pagedresults_cleanup: -\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- pagedresults_cleanup:
-\n");
return 0;
}
@@ -774,7 +774,7 @@ pagedresults_cleanup(Connection *conn, int needlock)
if (needlock) {
PR_ExitMonitor(conn->c_mutex);
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, "<-- pagedresults_cleanup: %d\n", rc);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- pagedresults_cleanup:
%d\n", rc);
return rc;
}
@@ -791,10 +791,10 @@ pagedresults_cleanup_all(Connection *conn, int needlock)
int i;
PagedResults *prp = NULL;
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "--> pagedresults_cleanup_all\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
pagedresults_cleanup_all\n");
if (NULL == conn) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "<-- pagedresults_cleanup_all:
-\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
pagedresults_cleanup_all: -\n");
return 0;
}
@@ -820,7 +820,7 @@ pagedresults_cleanup_all(Connection *conn, int needlock)
if (needlock) {
PR_ExitMonitor(conn->c_mutex);
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, "<-- pagedresults_cleanup_all: %d\n",
rc);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- pagedresults_cleanup_all:
%d\n", rc);
return rc;
}
@@ -834,7 +834,7 @@ int
pagedresults_check_or_set_processing(Connection *conn, int index)
{
int ret = 0;
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_check_or_set_processing\n", index);
if (conn && (index > -1)) {
PR_EnterMonitor(conn->c_mutex);
@@ -847,7 +847,7 @@ pagedresults_check_or_set_processing(Connection *conn, int index)
}
PR_ExitMonitor(conn->c_mutex);
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<-- pagedresults_check_or_set_processing: %d\n", ret);
return ret;
}
@@ -861,7 +861,7 @@ int
pagedresults_reset_processing(Connection *conn, int index)
{
int ret = 0;
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_reset_processing: idx=%d\n", index);
if (conn && (index > -1)) {
PR_EnterMonitor(conn->c_mutex);
@@ -874,7 +874,7 @@ pagedresults_reset_processing(Connection *conn, int index)
}
PR_ExitMonitor(conn->c_mutex);
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<-- pagedresults_reset_processing: %d\n", ret);
return ret;
}
@@ -899,10 +899,10 @@ pagedresults_is_timedout_nolock(Connection *conn)
PagedResults *prp = NULL;
time_t ctime;
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "--> pagedresults_is_timedout\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
pagedresults_is_timedout\n");
if (!conn || (0 == conn->c_pagedresults.prl_maxlen)) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "<-- pagedresults_is_timedout:
false\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
pagedresults_is_timedout: false\n");
return 0;
}
@@ -911,12 +911,12 @@ pagedresults_is_timedout_nolock(Connection *conn)
if (prp && (1 == conn->c_pagedresults.prl_maxlen)) {
if (prp->pr_current_be && (prp->pr_timelimit > 0)) {
if (ctime > prp->pr_timelimit) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "<-- pagedresults_is_timedout:
true\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
pagedresults_is_timedout: true\n");
return 1;
}
}
}
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "<-- pagedresults_is_timedout:
false\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- pagedresults_is_timedout:
false\n");
return 0;
}
@@ -933,13 +933,13 @@ pagedresults_reset_timedout_nolock(Connection *conn)
if (NULL == conn) {
return 0;
}
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "--> pagedresults_reset_timedout\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
pagedresults_reset_timedout\n");
for (i = 0; i < conn->c_pagedresults.prl_maxlen; i++) {
prp = conn->c_pagedresults.prl_list + i;
prp->pr_timelimit = 0;
}
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "<-- pagedresults_reset_timedout:
0\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- pagedresults_reset_timedout:
0\n");
return 0;
}
@@ -947,12 +947,12 @@ pagedresults_reset_timedout_nolock(Connection *conn)
int
pagedresults_in_use_nolock(Connection *conn)
{
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "--> pagedresults_in_use\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
pagedresults_in_use\n");
if (NULL == conn) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "<-- pagedresults_in_use: -\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- pagedresults_in_use:
-\n");
return 0;
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, "<-- pagedresults_in_use: %d\n",
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- pagedresults_in_use:
%d\n",
conn->c_pagedresults.prl_count);
return conn->c_pagedresults.prl_count;
}
@@ -1044,7 +1044,7 @@ pagedresults_set_search_result_pb(Slapi_PBlock *pb, void *sr, int
locked)
}
slapi_pblock_get(pb, SLAPI_CONNECTION, &conn);
slapi_pblock_get(pb, SLAPI_PAGED_RESULTS_INDEX, &index);
- LDAPDebug2Args(LDAP_DEBUG_TRACE,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"--> pagedresults_set_search_result_pb: idx=%d, sr=%p\n",
index, sr);
if (conn && (index > -1)) {
if (!locked) PR_EnterMonitor(conn->c_mutex);
@@ -1054,7 +1054,7 @@ pagedresults_set_search_result_pb(Slapi_PBlock *pb, void *sr, int
locked)
}
if (!locked) PR_ExitMonitor(conn->c_mutex);
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<-- pagedresults_set_search_result_pb: %d\n", rc);
return rc;
}
diff --git a/ldap/servers/slapd/passwd_extop.c b/ldap/servers/slapd/passwd_extop.c
index 4726fc5..9f321f6 100644
--- a/ldap/servers/slapd/passwd_extop.c
+++ b/ldap/servers/slapd/passwd_extop.c
@@ -453,11 +453,11 @@ passwd_modify_extop( Slapi_PBlock *pb )
if ( slapi_pblock_get( pb, SLAPI_EXT_OP_REQ_OID, &oid ) != 0 ) {
errMesg = "Could not get OID value from request.\n";
rc = LDAP_OPERATIONS_ERROR;
- slapi_log_error( SLAPI_LOG_PLUGIN, "passwd_modify_extop",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "passwd_modify_extop",
"%s", errMesg );
goto free_and_return;
} else {
- slapi_log_error( SLAPI_LOG_PLUGIN, "passwd_modify_extop",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "passwd_modify_extop",
"Received extended operation request with OID %s\n", oid );
}
@@ -466,7 +466,7 @@ passwd_modify_extop( Slapi_PBlock *pb )
rc = LDAP_OPERATIONS_ERROR;
goto free_and_return;
} else {
- slapi_log_error( SLAPI_LOG_PLUGIN, "passwd_modify_extop",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "passwd_modify_extop",
"Password Modify extended operation request confirmed.\n" );
}
@@ -479,7 +479,7 @@ passwd_modify_extop( Slapi_PBlock *pb )
if ( slapi_pblock_get(pb, SLAPI_CONN_SASL_SSF, &sasl_ssf) != 0) {
errMesg = "Could not get SASL SSF from connection\n";
rc = LDAP_OPERATIONS_ERROR;
- slapi_log_error( SLAPI_LOG_PLUGIN, "passwd_modify_extop",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "passwd_modify_extop",
"%s", errMesg );
goto free_and_return;
}
@@ -487,7 +487,7 @@ passwd_modify_extop( Slapi_PBlock *pb )
if ( slapi_pblock_get(pb, SLAPI_CONN_LOCAL_SSF, &local_ssf) != 0) {
errMesg = "Could not get local SSF from connection\n";
rc = LDAP_OPERATIONS_ERROR;
- slapi_log_error( SLAPI_LOG_PLUGIN, "passwd_modify_extop",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "passwd_modify_extop",
"%s", errMesg );
goto free_and_return;
}
@@ -810,7 +810,7 @@ parse_req_done:
/* Free anything that we allocated above */
free_and_return:
- slapi_log_error( SLAPI_LOG_PLUGIN, "passwd_modify_extop",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "passwd_modify_extop",
"%s", errMesg ? errMesg : "success" );
if ((rc == LDAP_REFERRAL) && (referrals)) {
@@ -880,18 +880,18 @@ int passwd_modify_init( Slapi_PBlock *pb )
*/
if ( slapi_pblock_get( pb, SLAPI_PLUGIN_ARGV, &argv ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "passwd_modify_init", "Could
not get argv\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "passwd_modify_init",
"Could not get argv\n" );
return( -1 );
}
/* Compare the OID specified in the configuration file against the Passwd OID. */
if ( argv == NULL || strcmp( argv[0], EXTOP_PASSWD_OID ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "passwd_modify_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "passwd_modify_init",
"OID is missing or is not %s\n", EXTOP_PASSWD_OID );
return( -1 );
} else {
- slapi_log_error( SLAPI_LOG_PLUGIN, "passwd_modify_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "passwd_modify_init",
"Registering plug-in for Password Modify extended op %s.\n", argv[0] /*
oid */);
}
@@ -905,7 +905,7 @@ int passwd_modify_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_OIDLIST, passwd_oid_list ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_NAMELIST, passwd_name_list ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "passwd_modify_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "passwd_modify_init",
"Failed to set plug-in version, function, and OID.\n" );
return( -1 );
}
diff --git a/ldap/servers/slapd/plugin.c b/ldap/servers/slapd/plugin.c
index a550e90..63cc49d 100644
--- a/ldap/servers/slapd/plugin.c
+++ b/ldap/servers/slapd/plugin.c
@@ -99,7 +99,7 @@ void
global_plugin_init()
{
if((global_rwlock = slapi_new_rwlock()) == NULL){
- slapi_log_error( SLAPI_LOG_FATAL, "startup", "Failed to create
global plugin rwlock.\n" );
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "startup", "Failed to
create global plugin rwlock.\n" );
exit (1);
}
}
@@ -310,7 +310,7 @@ slapi_register_plugin_ext(
if ((found_precedence == PLUGIN_DEFAULT_PRECEDENCE) && group_identity) {
struct slapi_componentid * cid = (struct slapi_componentid *) group_identity;
if (cid->sci_plugin && (cid->sci_plugin->plg_precedence !=
PLUGIN_DEFAULT_PRECEDENCE)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, NULL,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, NULL,
"Plugin precedence (%s) reset to group precedence (%s): %d \n",
name ? name : "",
cid->sci_plugin->plg_name ? cid->sci_plugin->plg_name :
"",
@@ -2030,7 +2030,8 @@ plugin_call_func (struct slapdplugin *list, int operation,
Slapi_PBlock *pb, int
{
char *n = list->plg_name;
- LDAPDebug( LDAP_DEBUG_TRACE , "Calling plugin '%s' #%d type %d\n",
(n==NULL?"noname":n), count, operation );
+ LDAPDebug( LDAP_DEBUG_TRACE , LOG_DEBUG, "Calling plugin '%s' #%d type
%d\n",
+ (n==NULL?"noname":n), count, operation );
/* counters_to_errors_log("before plugin call"); */
/*
@@ -2142,7 +2143,7 @@ slapi_register_supported_saslmechanism( char *mechanism )
supported_saslmechanisms_lock = slapi_new_rwlock();
if (NULL == supported_saslmechanisms_lock) {
/* Out of resources */
- slapi_log_error(SLAPI_LOG_FATAL, "startup",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "startup",
"slapi_register_supported_saslmechanism: failed to create lock.\n");
exit (1);
}
@@ -2192,7 +2193,7 @@ ldapi_init_extended_ops( void )
extended_ops_lock = slapi_new_rwlock();
if (NULL == extended_ops_lock) {
/* Out of resources */
- slapi_log_error(SLAPI_LOG_FATAL, "startup",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "startup",
"ldapi_init_extended_ops: failed to create lock.\n");
exit (1);
}
@@ -2739,7 +2740,7 @@ plugin_add_descriptive_attributes( Slapi_Entry *e, struct
slapdplugin *plugin )
static void
plugin_free(struct slapdplugin *plugin)
{
- slapi_log_error(SLAPI_LOG_TRACE, "plugin_free", "Freeing %s \n",
plugin->plg_name );
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "plugin_free", "Freeing %s
\n", plugin->plg_name );
charray_free(plugin->plg_argv);
slapi_ch_free_string(&plugin->plg_libpath);
slapi_ch_free_string(&plugin->plg_initfunc);
@@ -2828,7 +2829,7 @@ plugin_setup(Slapi_Entry *plugin_entry, struct slapi_componentid
*group,
if (!slapi_entry_get_sdn_const(plugin_entry))
{
- LDAPDebug0Args(LDAP_DEBUG_ANY, "plugin_setup: DN is missing from the
plugin.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "plugin_setup: DN is missing from the
plugin.\n");
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE,"Plugin is missing dn.");
return -1;
}
@@ -3632,7 +3633,7 @@ plugin_config_set_action (int *action, char *value)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"plugin_config_set_action: invalid action %s\n", value);
return -1;
}
@@ -3807,7 +3808,7 @@ char* plugin_get_dn (const struct slapdplugin *plugin)
/* plg_name is normalized in plugin_setup. So, we can use smprintf */
plugindn = slapi_ch_smprintf(pattern, plugin->plg_name);
if (NULL == plugindn) {
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"plugin_get_dn: failed to create plugin dn "
"(plugin name: %s)\n", plugin->plg_name);
return NULL;
@@ -4036,7 +4037,7 @@ static void trace_plugin_invocation (Slapi_DN *target_spec,
PluginTargetData *pt
Slapi_DN *sdn;
- slapi_log_error (SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"Invocation parameters: target_spec = %s, bindop = %d, isroot=%d,
islocal=%d\n"
"Plugin configuration: local_data=%d, remote_data=%d, anonymous_bind=%d,
root_bind=%d\n",
slapi_sdn_get_ndn (target_spec), bindop, isroot, islocal, ptd->special_data[0],
@@ -4045,11 +4046,11 @@ static void trace_plugin_invocation (Slapi_DN *target_spec,
PluginTargetData *pt
sdn = ptd_get_first_subtree (ptd, &cookie);
while (sdn)
{
- slapi_log_error (SLAPI_LOG_FATAL, NULL, "target_subtree%d: %s\n", i,
slapi_sdn_get_ndn (sdn));
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "target_subtree%d: %s\n", i,
slapi_sdn_get_ndn (sdn));
sdn = ptd_get_next_subtree (ptd, &cookie);
}
- slapi_log_error (SLAPI_LOG_FATAL, NULL, invoked ? "Plugin is invoked\n" :
"Plugin is not invoked\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, invoked ? "Plugin is
invoked\n" : "Plugin is not invoked\n");
}
#endif
@@ -4240,11 +4241,11 @@ void plugin_print_lists(void)
for (i = 0; i < PLUGIN_LIST_GLOBAL_MAX; i++) {
if ((list = get_plugin_list(i)))
{
- slapi_log_error(SLAPI_LOG_PLUGIN, NULL,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, NULL,
"---- Plugin List (type %d) ----\n", i);
for ( tmp = list; tmp; tmp = tmp->plg_next )
{
- slapi_log_error(SLAPI_LOG_PLUGIN, NULL, " %s (precedence: %d)\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, NULL, " %s (precedence:
%d)\n",
tmp->plg_name, tmp->plg_precedence);
}
}
@@ -4566,7 +4567,7 @@ slapi_plugin_call_preop_be_plugins(Slapi_PBlock *pb, int function)
break;
default:
/* invalid function */
- slapi_log_error(SLAPI_LOG_FATAL,
"slapi_plugin_call_preop_betxn_plugins",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"slapi_plugin_call_preop_betxn_plugins",
"Invalid function specified - backend plugins will not be
called.\n");
return 0;
}
@@ -4613,7 +4614,7 @@ slapi_plugin_call_postop_be_plugins(Slapi_PBlock *pb, int function)
break;
default:
/* invalid function */
- slapi_log_error(SLAPI_LOG_FATAL,
"slapi_plugin_call_postop_betxn_plugins",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"slapi_plugin_call_postop_betxn_plugins",
"Invalid function specified - backend plugins will not be
called.\n");
return 0;
}
diff --git a/ldap/servers/slapd/plugin_acl.c b/ldap/servers/slapd/plugin_acl.c
index 61aa67f..2824c5d 100644
--- a/ldap/servers/slapd/plugin_acl.c
+++ b/ldap/servers/slapd/plugin_acl.c
@@ -152,7 +152,7 @@ plugin_call_acl_mods_update ( Slapi_PBlock *pb, int optype )
}
if (NULL == sdn) {
- LDAPDebug0Args ( LDAP_DEBUG_ANY,
+ LDAPDebug0Args ( LDAP_DEBUG_ANY, LOG_ERR,
"plugin_call_acl_mods_update: Null target DN\n" );
return LDAP_INVALID_DN_SYNTAX;
}
diff --git a/ldap/servers/slapd/plugin_internal_op.c
b/ldap/servers/slapd/plugin_internal_op.c
index 0f03c76..3531029 100644
--- a/ldap/servers/slapd/plugin_internal_op.c
+++ b/ldap/servers/slapd/plugin_internal_op.c
@@ -209,7 +209,7 @@ slapi_seq_callback( const char *ibase,
if (ibase == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"slapi_seq_callback: NULL parameter\n");
return -1;
}
@@ -265,7 +265,7 @@ slapi_search_internal_set_pb (Slapi_PBlock *pb, const char *base,
char **tmp_attrs = NULL;
if (pb == NULL || base == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"slapi_search_internal_set_pb: NULL parameter\n");
return;
}
@@ -299,7 +299,7 @@ slapi_search_internal_set_pb_ext (Slapi_PBlock *pb, Slapi_DN *sdn,
char **tmp_attrs = NULL;
if (pb == NULL || sdn == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"slapi_search_internal_set_pb: NULL parameter\n");
return;
}
@@ -331,7 +331,7 @@ void slapi_seq_internal_set_pb(Slapi_PBlock *pb, char *base, int type,
char *att
char **tmp_attrs = NULL;
if (pb == NULL || base == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, NULL,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
"slapi_seq_internal_set_pb: NULL parameter\n");
return;
}
@@ -812,13 +812,13 @@ PRBool allow_operation (Slapi_PBlock *pb)
slapi_pblock_get (pb, SLAPI_PLUGIN_IDENTITY, &cid);
if (cid == NULL)
{
- slapi_log_error( SLAPI_LOG_FATAL, NULL, "allow_operation: component identity is
NULL\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "allow_operation: component
identity is NULL\n");
return PR_FALSE;
}
plugin=(struct slapdplugin *) cid->sci_plugin;
if (plugin == NULL)
{
- slapi_log_error( SLAPI_LOG_FATAL, NULL, "allow_operation: plugin identity is
NULL\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "allow_operation: plugin identity
is NULL\n");
return PR_FALSE;
}
diff --git a/ldap/servers/slapd/plugin_mr.c b/ldap/servers/slapd/plugin_mr.c
index 996dbc0..6e77e38 100644
--- a/ldap/servers/slapd/plugin_mr.c
+++ b/ldap/servers/slapd/plugin_mr.c
@@ -78,7 +78,7 @@ plugin_mr_find( const char *nameoroid )
}
if (nameoroid && !pi) {
- slapi_log_error(SLAPI_LOG_CONFIG, "plugin_mr_find",
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, "plugin_mr_find",
"Error: matching rule plugin for [%s] not found\n", nameoroid);
}
@@ -281,9 +281,9 @@ mr_wrap_mr_index_sv_fn(Slapi_PBlock* pb)
slapi_pblock_set(pb, SLAPI_PLUGIN_MR_KEYS, out_vals); /* make sure output is cleared */
slapi_pblock_get(pb, SLAPI_PLUGIN, &pi);
if (!pi) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "mr_wrap_mr_index_sv_fn: error - no plugin
specified\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "mr_wrap_mr_index_sv_fn: error - no plugin
specified\n");
} else if (!pi->plg_mr_values2keys) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "mr_wrap_mr_index_sv_fn: error - plugin has no
plg_mr_values2keys function\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "mr_wrap_mr_index_sv_fn: error - plugin
has no plg_mr_values2keys function\n");
} else {
struct mr_private *mrpriv = NULL;
int ftype = plugin_mr_get_type(pi);
@@ -412,7 +412,7 @@ default_mr_filter_index(Slapi_PBlock *pb)
slapi_pblock_get(pb, SLAPI_PLUGIN_MR_OID, &mrOID);
slapi_pblock_get(pb, SLAPI_PLUGIN_MR_TYPE, &mrTYPE);
- slapi_log_error(SLAPI_LOG_FATAL, "default_mr_filter_index",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "default_mr_filter_index",
"Failure because mrpriv is NULL : %s %s\n",
mrOID ? "" : " oid",
mrTYPE ? "" : " attribute type");
@@ -443,7 +443,7 @@ default_mr_filter_create(Slapi_PBlock *pb)
struct berval* mrVALUE = NULL;
struct slapdplugin* pi = NULL;
- LDAPDebug0Args(LDAP_DEBUG_FILTER, "=> default_mr_filter_create\n");
+ LDAPDebug0Args(LDAP_DEBUG_FILTER, LOG_DEBUG, "=>
default_mr_filter_create\n");
if (!slapi_pblock_get(pb, SLAPI_PLUGIN_MR_OID, &mrOID) && mrOID != NULL
&&
!slapi_pblock_get(pb, SLAPI_PLUGIN_MR_TYPE, &mrTYPE) && mrTYPE != NULL
&&
@@ -453,13 +453,13 @@ default_mr_filter_create(Slapi_PBlock *pb)
struct mr_private *mrpriv = NULL;
int ftype = 0;
- LDAPDebug2Args(LDAP_DEBUG_FILTER, "=> default_mr_filter_create(oid %s; type
%s)\n",
+ LDAPDebug2Args(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> default_mr_filter_create(oid
%s; type %s)\n",
mrOID, mrTYPE);
/* check to make sure this create function is supposed to be used with the
given oid */
if (!charray_inlist(pi->plg_mr_names, mrOID)) {
- LDAPDebug2Args(LDAP_DEBUG_FILTER,
+ LDAPDebug2Args(LDAP_DEBUG_FILTER, LOG_DEBUG,
"=> default_mr_filter_create: cannot use matching rule %s with plugin
%s\n",
mrOID, pi->plg_name);
goto done;
@@ -484,7 +484,7 @@ default_mr_filter_create(Slapi_PBlock *pb)
reason is that the API provides no way to pass in the search time limit
required by the syntax filter substring match functions
*/
- LDAPDebug1Arg(LDAP_DEBUG_FILTER, "<= default_mr_filter_create - unsupported
filter type %d\n",
+ LDAPDebug1Arg(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= default_mr_filter_create -
unsupported filter type %d\n",
ftype);
goto done;
}
@@ -537,7 +537,7 @@ default_mr_filter_create(Slapi_PBlock *pb)
}
done:
- LDAPDebug1Arg(LDAP_DEBUG_FILTER, "=> default_mr_filter_create: %d\n", rc);
+ LDAPDebug1Arg(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> default_mr_filter_create:
%d\n", rc);
return rc;
}
@@ -659,7 +659,7 @@ default_mr_indexer_create(Slapi_PBlock* pb)
slapi_pblock_get(pb, SLAPI_PLUGIN, &pi);
if (NULL == pi) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "default_mr_indexer_create: error - no plugin
specified\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "default_mr_indexer_create: error - no
plugin specified\n");
goto done;
}
slapi_pblock_get (pb, SLAPI_PLUGIN_MR_OID, &oid);
@@ -667,14 +667,14 @@ default_mr_indexer_create(Slapi_PBlock* pb)
* MR plugin. We need to check the selected plugin handle the expected OID
*/
if ( oid == NULL || !charray_inlist(pi->plg_mr_names, oid)) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, "default_mr_indexer_create: warning - plugin
[%s] does not handle %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "default_mr_indexer_create: warning -
plugin [%s] does not handle %s\n",
pi->plg_name,
oid ? oid : "unknown oid");
goto done;
}
if (NULL == pi->plg_mr_values2keys) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "default_mr_indexer_create: error - plugin [%s] has
no plg_mr_values2keys function\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "default_mr_indexer_create: error - plugin
[%s] has no plg_mr_values2keys function\n",
pi->plg_name);
goto done;
}
diff --git a/ldap/servers/slapd/plugin_syntax.c b/ldap/servers/slapd/plugin_syntax.c
index fb5a581..d35349e 100644
--- a/ldap/servers/slapd/plugin_syntax.c
+++ b/ldap/servers/slapd/plugin_syntax.c
@@ -313,7 +313,7 @@ slapi_dn_syntax_check(
/* Validate the value. */
if (dn_plugin->plg_syntax_validate(&dn_bval) != 0) {
if (syntaxlogging) {
- slapi_log_error( SLAPI_LOG_FATAL, "Syntax Check",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Syntax Check",
"DN value (%s) invalid per syntax\n", dn);
}
@@ -400,7 +400,7 @@ slapi_entry_syntax_check(
bval = slapi_value_get_berval(val);
if ((a->a_plugin->plg_syntax_validate( bval )) != 0) {
if (syntaxlogging) {
- slapi_log_error( SLAPI_LOG_FATAL, "Syntax Check",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Syntax Check",
"\"%s\": (%s) value #%d invalid per
syntax\n",
slapi_entry_get_dn(e), a->a_type, hint );
}
@@ -502,7 +502,7 @@ slapi_mods_syntax_check(
for (j = 0; mod->mod_bvalues[j] != NULL; j++) {
if (syntax_plugin->plg_syntax_validate(mod->mod_bvalues[j]) != 0) {
if (syntaxlogging) {
- slapi_log_error( SLAPI_LOG_FATAL, "Syntax Check",
"\"%s\": (%s) value #%d invalid per syntax\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Syntax Check",
"\"%s\": (%s) value #%d invalid per syntax\n",
dn ? dn : "NULL", mod->mod_type, j );
}
diff --git a/ldap/servers/slapd/proto-slap.h b/ldap/servers/slapd/proto-slap.h
index 7ab8ca3..87652f7 100644
--- a/ldap/servers/slapd/proto-slap.h
+++ b/ldap/servers/slapd/proto-slap.h
@@ -758,7 +758,7 @@ int lock_fclose( FILE *fp, FILE *lfp );
/*
* log.c
*/
-int slapd_log_error_proc( char *subsystem, char *fmt, ... );
+int slapd_log_error_proc( char *subsystem, int sev_level, char *fmt, ... );
int slapi_log_access( int level, char *fmt, ... )
#ifdef __GNUC__
diff --git a/ldap/servers/slapd/psearch.c b/ldap/servers/slapd/psearch.c
index d2ee5c8..b11e17c 100644
--- a/ldap/servers/slapd/psearch.c
+++ b/ldap/servers/slapd/psearch.c
@@ -282,7 +282,7 @@ ps_send_results( void *arg )
PR_ExitMonitor(ps->ps_pblock->pb_conn->c_mutex);
if (conn_acq_flag) {
- slapi_log_error(SLAPI_LOG_CONNS, "Persistent Search",
+ slapi_log_error(SLAPI_LOG_CONNS, LOG_DEBUG, "Persistent Search",
"conn=%" NSPRIu64 " op=%d Could not acquire the connection - psearch
aborted\n",
ps->ps_pblock->pb_conn->c_connid, ps->ps_pblock->pb_op->o_opid);
}
@@ -292,7 +292,7 @@ ps_send_results( void *arg )
while ( (conn_acq_flag == 0) && !ps->ps_complete ) {
/* Check for an abandoned operation */
if ( ps->ps_pblock->pb_op == NULL || slapi_op_abandoned( ps->ps_pblock ) ) {
- slapi_log_error(SLAPI_LOG_CONNS, "Persistent Search",
+ slapi_log_error(SLAPI_LOG_CONNS, LOG_DEBUG, "Persistent Search",
"conn=%" NSPRIu64 " op=%d The operation has been abandoned\n",
ps->ps_pblock->pb_conn->c_connid, ps->ps_pblock->pb_op->o_opid);
break;
@@ -350,7 +350,7 @@ ps_send_results( void *arg )
rc = send_ldap_search_entry( ps->ps_pblock, ec,
ectrls, attrs, attrsonly );
if (rc) {
- slapi_log_error(SLAPI_LOG_CONNS, "Persistent Search",
+ slapi_log_error(SLAPI_LOG_CONNS, LOG_DEBUG, "Persistent Search",
"conn=%" NSPRIu64 " op=%d Error %d sending entry %s with op status
%d\n",
ps->ps_pblock->pb_conn->c_connid,
ps->ps_pblock->pb_op->o_opid,
rc, slapi_entry_get_dn_const(ec), ps->ps_pblock->pb_op->o_status);
@@ -399,7 +399,7 @@ ps_send_results( void *arg )
/* Clean up the connection structure */
PR_EnterMonitor(conn->c_mutex);
- slapi_log_error(SLAPI_LOG_CONNS, "Persistent Search",
+ slapi_log_error(SLAPI_LOG_CONNS, LOG_DEBUG, "Persistent Search",
"conn=%" NSPRIu64 " op=%d Releasing the connection and
operation\n",
conn->c_connid, ps->ps_pblock->pb_op->o_opid);
/* Delete this op from the connection's list */
@@ -534,7 +534,7 @@ ps_service_persistent_searches( Slapi_Entry *e, Slapi_Entry *eprev,
ber_int_t ch
continue;
}
- slapi_log_error(SLAPI_LOG_CONNS, "Persistent Search",
+ slapi_log_error(SLAPI_LOG_CONNS, LOG_DEBUG, "Persistent Search",
"conn=%" NSPRIu64 " op=%d entry %s with chgtype %d "
"matches the ps changetype %d\n",
ps->ps_pblock->pb_conn->c_connid,
diff --git a/ldap/servers/slapd/pw.c b/ldap/servers/slapd/pw.c
index f040893..e755028 100644
--- a/ldap/servers/slapd/pw.c
+++ b/ldap/servers/slapd/pw.c
@@ -64,7 +64,7 @@ pw_send_ldap_result(
slapi_pblock_get (pb, SLAPI_OPERATION, &operation);
if (NULL == operation) {
- slapi_log_error(SLAPI_LOG_FATAL, "pwdpolicy", "pw_send_ldap_result: no
operation\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "pwdpolicy",
"pw_send_ldap_result: no operation\n");
return;
}
internal_op= operation_is_flag_set(operation, OP_FLAG_INTERNAL);
@@ -171,7 +171,7 @@ char* slapi_encode_ext (Slapi_PBlock *pb, const Slapi_DN *sdn, char
*value, char
if (pws_enc == NULL)
{
- slapi_log_error( SLAPI_LOG_FATAL, "pwdpolicy",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "pwdpolicy",
"slapi_encode: no server scheme\n" );
return NULL;
}
@@ -183,12 +183,12 @@ char* slapi_encode_ext (Slapi_PBlock *pb, const Slapi_DN *sdn, char
*value, char
{
char * scheme_list =
plugin_get_pwd_storage_scheme_list(PLUGIN_LIST_PWD_STORAGE_SCHEME);
if ( scheme_list != NULL ) {
- slapi_log_error( SLAPI_LOG_FATAL, "pwdpolicy",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "pwdpolicy",
"slapi_encode: invalid scheme - %s\n"
"Valid values are: %s\n", alg, scheme_list );
slapi_ch_free((void **)&scheme_list);
} else {
- slapi_log_error( SLAPI_LOG_FATAL, "pwdpolicy",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "pwdpolicy",
"slapi_encode: invalid scheme - %s\n"
"no pwdstorage scheme plugin loaded", alg);
}
@@ -601,7 +601,7 @@ update_pw_info ( Slapi_PBlock *pb , char *old_pw)
slapi_pblock_get( pb, SLAPI_REQUESTOR_NDN, &bind_dn);
slapi_pblock_get( pb, SLAPI_ENTRY_PRE_OP, &e);
if ((NULL == operation) || (NULL == sdn) || (NULL == e)){
- slapi_log_error(SLAPI_LOG_FATAL, "pwdpolicy",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "pwdpolicy",
"update_pw_info: param error - no password entry/target
dn/operation\n");
return -1;
}
@@ -809,7 +809,7 @@ check_pw_syntax_ext ( Slapi_PBlock *pb, const Slapi_DN *sdn,
Slapi_Value **vals,
return 0;
}
if (NULL == vals) {
- slapi_log_error( SLAPI_LOG_FATAL, "pwdpolicy",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "pwdpolicy",
"check_pw_syntax_ext: no passwords to check\n" );
return -1;
}
@@ -820,7 +820,7 @@ check_pw_syntax_ext ( Slapi_PBlock *pb, const Slapi_DN *sdn,
Slapi_Value **vals,
slapi_pblock_get(pb, SLAPI_IS_REPLICATED_OPERATION, &is_replication);
slapi_pblock_get(pb, SLAPI_OPERATION, &operation);
if (NULL == operation) {
- slapi_log_error(SLAPI_LOG_FATAL, "pwdpolicy", "check_pw_syntax_ext: no
operation\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "pwdpolicy",
"check_pw_syntax_ext: no operation\n");
return -1;
}
internal_op = slapi_operation_is_flag_set(operation, SLAPI_OP_FLAG_INTERNAL);
@@ -1228,7 +1228,7 @@ update_pw_history( Slapi_PBlock *pb, const Slapi_DN *sdn, char
*old_pw )
slapi_modify_internal_pb(&mod_pb);
slapi_pblock_get(&mod_pb, SLAPI_PLUGIN_INTOP_RESULT, &res);
if (res != LDAP_SUCCESS){
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"WARNING: passwordPolicy modify error %d on entry '%s'\n", res,
dn);
}
pblock_done(&mod_pb);
@@ -1353,7 +1353,7 @@ add_password_attrs( Slapi_PBlock *pb, Operation *op, Slapi_Entry *e
)
int isShadowAccount = 0;
int has_shadowLastChange = 0;
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "add_password_attrs\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "add_password_attrs\n");
bvals[0] = &bv;
bvals[1] = NULL;
@@ -1753,7 +1753,7 @@ new_passwdPolicy(Slapi_PBlock *pb, const char *dn)
slapi_entry_free( e );
if ( pw_entry == NULL ) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"loading global password policy for %s"
"--local policy entry not found\n", dn);
goto done;
@@ -1773,7 +1773,7 @@ new_passwdPolicy(Slapi_PBlock *pb, const char *dn)
if ((sval = attr_get_present_values(attr))) {
pwdpolicy->pw_minage = slapi_value_get_timelonglong(*sval);
if (-1 == pwdpolicy->pw_minage) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"Password Policy Entry%s: Invalid passwordMinAge: %s\n",
slapi_entry_get_dn_const(pw_entry),
slapi_value_get_string(*sval));
@@ -1785,7 +1785,7 @@ new_passwdPolicy(Slapi_PBlock *pb, const char *dn)
if ((sval = attr_get_present_values(attr))) {
pwdpolicy->pw_maxage = slapi_value_get_timelonglong(*sval);
if (-1 == pwdpolicy->pw_maxage) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"Password Policy Entry%s: Invalid passwordMaxAge: %s\n",
slapi_entry_get_dn_const(pw_entry),
slapi_value_get_string(*sval));
@@ -1797,7 +1797,7 @@ new_passwdPolicy(Slapi_PBlock *pb, const char *dn)
if ((sval = attr_get_present_values(attr))) {
pwdpolicy->pw_warning = slapi_value_get_timelonglong(*sval);
if (-1 == pwdpolicy->pw_warning) {
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"Password Policy Entry%s: Invalid passwordWarning: %s\n",
slapi_entry_get_dn_const(pw_entry),
slapi_value_get_string(*sval));
@@ -2554,9 +2554,9 @@ pw_entry_constructor(void *object, void *parent)
struct slapi_pw_entry_ext *pw_extp = NULL;
Slapi_RWLock *rwlock;
if ((rwlock = slapi_new_rwlock()) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, "pwdpolicy",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "pwdpolicy",
"pw_entry_constructor: slapi_new_rwlock() failed\n");
- slapi_log_error(SLAPI_LOG_FATAL, "pwdpolicy",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "pwdpolicy",
"WARNING: the server cannot handle unhashed password.\n");
return NULL;
}
@@ -2596,7 +2596,7 @@ pw_exp_init ( void )
pw_entry_destructor,
&pw_entry_objtype,
&pw_entry_handle) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, "pwdpolicy",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "pwdpolicy",
"pw_init: slapi_register_object_extension failed; "
"unhashed password is not able to access\n");
}
@@ -2612,14 +2612,14 @@ slapi_pw_get_entry_ext(Slapi_Entry *entry, Slapi_Value ***vals)
struct slapi_pw_entry_ext *extp = NULL;
if (NULL == vals) {
- slapi_log_error(SLAPI_LOG_FATAL, "pwdpolicy",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "pwdpolicy",
"slapi_pw_get_entry_ext: output param vals is NULL.\n");
return LDAP_PARAM_ERROR;
}
*vals = NULL;
if ((-1 == pw_entry_objtype) || (-1 == pw_entry_handle)) {
- slapi_log_error(SLAPI_LOG_TRACE, NULL,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, NULL,
"slapi_pw_get_entry_ext: pw_entry_extension is not "
"registered\n");
return LDAP_OPERATIONS_ERROR;
@@ -2630,7 +2630,7 @@ slapi_pw_get_entry_ext(Slapi_Entry *entry, Slapi_Value ***vals)
entry,
pw_entry_handle);
if ((NULL == extp) || (NULL == extp->pw_entry_values)) {
- slapi_log_error(SLAPI_LOG_TRACE, NULL,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, NULL,
"slapi_pw_get_entry_ext: "
"pw_entry_extension is not set\n");
return LDAP_NO_SUCH_ATTRIBUTE;
@@ -2650,7 +2650,7 @@ slapi_pw_set_entry_ext(Slapi_Entry *entry, Slapi_Value **vals, int
flags)
struct slapi_pw_entry_ext *extp = NULL;
if ((-1 == pw_entry_objtype) || (-1 == pw_entry_handle)) {
- slapi_log_error(SLAPI_LOG_TRACE, NULL,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, NULL,
"slapi_pw_set_entry_ext: "
"pw_entry_extension is not registered\n");
return LDAP_OPERATIONS_ERROR;
@@ -2661,7 +2661,7 @@ slapi_pw_set_entry_ext(Slapi_Entry *entry, Slapi_Value **vals, int
flags)
entry,
pw_entry_handle);
if (NULL == extp) {
- slapi_log_error(SLAPI_LOG_TRACE, NULL,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, NULL,
"slapi_pw_set_entry_ext: "
"pw_entry_extension is not set\n");
return LDAP_NO_SUCH_ATTRIBUTE;
@@ -2691,7 +2691,7 @@ pw_copy_entry_ext(Slapi_Entry *src_e, Slapi_Entry *dest_e)
struct slapi_pw_entry_ext *dest_extp = NULL;
if ((-1 == pw_entry_objtype) || (-1 == pw_entry_handle)) {
- slapi_log_error(SLAPI_LOG_TRACE, NULL,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, NULL,
"pw_copy_entry_ext: "
"pw_entry_extension is not registered\n");
return LDAP_OPERATIONS_ERROR;
@@ -2702,7 +2702,7 @@ pw_copy_entry_ext(Slapi_Entry *src_e, Slapi_Entry *dest_e)
src_e,
pw_entry_handle);
if (NULL == src_extp) {
- slapi_log_error(SLAPI_LOG_TRACE, NULL,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, NULL,
"pw_copy_entry_ext: source pw_entry_extension is "
"not set\n");
return LDAP_NO_SUCH_ATTRIBUTE;
@@ -2715,7 +2715,7 @@ pw_copy_entry_ext(Slapi_Entry *src_e, Slapi_Entry *dest_e)
pw_entry_handle);
if (NULL == dest_extp) {
slapi_rwlock_unlock(src_extp->pw_entry_lock);
- slapi_log_error(SLAPI_LOG_TRACE, NULL,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, NULL,
"pw_copy_entry_ext: "
"dest pw_entry_extension is not set\n");
return LDAP_NO_SUCH_ATTRIBUTE;
@@ -2741,7 +2741,7 @@ slapi_get_first_clear_text_pw(Slapi_Entry *entry)
const char *password_str = NULL;
if ((-1 == pw_entry_objtype) || (-1 == pw_entry_handle)) {
- slapi_log_error(SLAPI_LOG_TRACE, NULL,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, NULL,
"slapi_get_first_clear_text_pw: "
"pw_entry_extension is not registered\n");
return NULL;
@@ -2752,7 +2752,7 @@ slapi_get_first_clear_text_pw(Slapi_Entry *entry)
entry,
pw_entry_handle);
if ((NULL == extp) || (NULL == extp->pw_entry_values)) {
- slapi_log_error(SLAPI_LOG_TRACE, NULL,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, NULL,
"slapi_get_first_clear_text_pw: "
"pw_entry_extension is not set\n");
return NULL;
@@ -2858,7 +2858,7 @@ add_shadow_ext_password_attrs(Slapi_PBlock *pb, Slapi_Entry **e)
return rc;
}
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "--> add_shadow_password_attrs\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
add_shadow_password_attrs\n");
/* shadowMin - the minimum number of days required between password changes. */
if (pwpolicy->pw_minage > 0) {
@@ -2980,6 +2980,6 @@ add_shadow_ext_password_attrs(Slapi_PBlock *pb, Slapi_Entry **e)
*/
#endif
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "<-- add_shadow_password_attrs\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
add_shadow_password_attrs\n");
return rc;
}
diff --git a/ldap/servers/slapd/pw_retry.c b/ldap/servers/slapd/pw_retry.c
index 9f5f84c..024b1c1 100644
--- a/ldap/servers/slapd/pw_retry.c
+++ b/ldap/servers/slapd/pw_retry.c
@@ -200,7 +200,7 @@ Slapi_Entry *get_entry ( Slapi_PBlock *pb, const char *dn)
}
if (target_dn == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"WARNING: 'get_entry' - no dn specified.\n");
goto bail;
}
@@ -214,7 +214,7 @@ Slapi_Entry *get_entry ( Slapi_PBlock *pb, const char *dn)
&retentry,
pw_get_componentID());
if (search_result != LDAP_SUCCESS) {
- LDAPDebug2Args(LDAP_DEBUG_TRACE,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
"WARNING: 'get_entry' can't find entry '%s',
err %d\n",
target_dn, search_result);
}
@@ -246,7 +246,7 @@ pw_apply_mods(const Slapi_DN *sdn, Slapi_Mods *mods)
slapi_pblock_get(&pb, SLAPI_PLUGIN_INTOP_RESULT, &res);
if (res != LDAP_SUCCESS){
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"WARNING: passwordPolicy modify error %d on entry '%s'\n",
res, slapi_sdn_get_dn(sdn));
}
diff --git a/ldap/servers/slapd/referral.c b/ldap/servers/slapd/referral.c
index a7e799e..fc26a65 100644
--- a/ldap/servers/slapd/referral.c
+++ b/ldap/servers/slapd/referral.c
@@ -176,7 +176,7 @@ ref_adjust( Slapi_PBlock *pb, struct berval **urls, const Slapi_DN
*refsdn,
slapi_pblock_get( pb, SLAPI_OPERATION, &op ) != 0 || op == NULL ||
( operation_get_type(op) == SLAPI_OPERATION_SEARCH && slapi_pblock_get(
pb,
SLAPI_SEARCH_SCOPE, &scope ) != 0 )) {
- LDAPDebug0Args( LDAP_DEBUG_ANY, "ref_adjust: referrals suppressed "
+ LDAPDebug0Args( LDAP_DEBUG_ANY, LOG_ERR, "ref_adjust: referrals suppressed
"
"(could not get target DN, operation, "
"or scope from pblock)\n" );
return( NULL );
diff --git a/ldap/servers/slapd/resourcelimit.c b/ldap/servers/slapd/resourcelimit.c
index 5b08cb8..18527d6 100644
--- a/ldap/servers/slapd/resourcelimit.c
+++ b/ldap/servers/slapd/resourcelimit.c
@@ -171,14 +171,14 @@ reslimit_init( void )
reslimit_connext_destructor,
&reslimit_connext_objtype, &reslimit_connext_handle )
!= 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, SLAPI_RESLIMIT_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPI_RESLIMIT_MODULE,
"reslimit_init: slapi_register_object_extension()"
" failed\n" );
return( -1 );
}
if (( reslimit_map_rwlock = slapi_new_rwlock()) == NULL ) {
- slapi_log_error( SLAPI_LOG_FATAL, SLAPI_RESLIMIT_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPI_RESLIMIT_MODULE,
"reslimit_init: slapi_new_rwlock() failed\n" );
return( -1 );
}
@@ -232,7 +232,7 @@ reslimit_connext_constructor( void *object, void *parent )
Slapi_RWLock *rwlock;
if (( rwlock = slapi_new_rwlock()) == NULL ) {
- slapi_log_error( SLAPI_LOG_FATAL, SLAPI_RESLIMIT_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPI_RESLIMIT_MODULE,
"reslimit_connext_constructor: slapi_new_rwlock() failed\n" );
return( NULL );
}
@@ -275,7 +275,7 @@ reslimit_get_ext( Slapi_Connection *conn, const char *logname,
{
if ( !reslimit_inited && reslimit_init() != 0 ) {
if ( NULL != logname ) {
- slapi_log_error( SLAPI_LOG_FATAL, SLAPI_RESLIMIT_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPI_RESLIMIT_MODULE,
"%s: reslimit_init() failed\n", logname );
}
return( SLAPI_RESLIMIT_STATUS_INIT_FAILURE );
@@ -285,7 +285,7 @@ reslimit_get_ext( Slapi_Connection *conn, const char *logname,
reslimit_connext_objtype, conn,
reslimit_connext_handle )) == NULL ) {
if ( NULL != logname ) {
- slapi_log_error( SLAPI_LOG_FATAL, SLAPI_RESLIMIT_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPI_RESLIMIT_MODULE,
"%s: slapi_get_object_extension() returned NULL\n", logname );
}
return( SLAPI_RESLIMIT_STATUS_INTERNAL_ERROR );
@@ -351,7 +351,7 @@ reslimit_update_from_entry( Slapi_Connection *conn, Slapi_Entry *e )
int free_flags = 0;
int rc, i;
- LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL, "=> %s conn=0x%x, entry=0x%x\n",
+ LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL, LOG_DEBUG, "=> %s conn=0x%x,
entry=0x%x\n",
fnname, conn, e );
rc = SLAPI_RESLIMIT_STATUS_SUCCESS; /* optimistic */
@@ -392,7 +392,7 @@ reslimit_update_from_entry( Slapi_Connection *conn, Slapi_Entry *e )
continue;
}
- LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL,
+ LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL, LOG_DEBUG,
"%s: setting limit for handle %d (based on %s)\n",
fnname, i, reslimit_map[ i ].rlmap_at );
@@ -409,13 +409,13 @@ reslimit_update_from_entry( Slapi_Connection *conn, Slapi_Entry *e
)
rlcdp->rlcd_integer_value[ i ] = slapi_value_get_int( v );
rlcdp->rlcd_integer_available[ i ] = PR_TRUE;
- LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL,
+ LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL, LOG_DEBUG,
"%s: set limit based on %s to %d\n",
fnname, reslimit_map[ i ].rlmap_at,
rlcdp->rlcd_integer_value[ i ] );
if ( slapi_valueset_next_value( vs, index, &v ) != -1 ) {
- slapi_log_error( SLAPI_LOG_FATAL, SLAPI_RESLIMIT_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPI_RESLIMIT_MODULE,
"%s: ignoring multiple values for %s in entry %s\n",
fnname, reslimit_map[ i ].rlmap_at,
slapi_entry_get_dn_const( e ));
@@ -432,7 +432,7 @@ reslimit_update_from_entry( Slapi_Connection *conn, Slapi_Entry *e )
/* UNLOCKED -- map lock */
log_and_return:
- LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL, "<= %s returning status %d\n",
+ LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL, LOG_DEBUG, "<= %s returning status
%d\n",
fnname, rc, 0 );
return( rc );
@@ -482,14 +482,14 @@ slapi_reslimit_register( int type, const char *attrname, int
*handlep )
char *fnname = "slapi_reslimit_register()";
int i, rc;
- LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL, "=> %s attrname=%s\n",
+ LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL, LOG_DEBUG, "=> %s attrname=%s\n",
fnname, attrname, 0 );
rc = SLAPI_RESLIMIT_STATUS_SUCCESS; /* optimistic */
/* initialize if necessary */
if ( !reslimit_inited && reslimit_init() != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, SLAPI_RESLIMIT_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPI_RESLIMIT_MODULE,
"%s: reslimit_init() failed\n", fnname );
rc = SLAPI_RESLIMIT_STATUS_INIT_FAILURE;
goto log_and_return;
@@ -498,7 +498,7 @@ slapi_reslimit_register( int type, const char *attrname, int *handlep
)
/* sanity check parameters */
if ( type != SLAPI_RESLIMIT_TYPE_INT || attrname == NULL
|| handlep == NULL ) {
- slapi_log_error( SLAPI_LOG_FATAL, SLAPI_RESLIMIT_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPI_RESLIMIT_MODULE,
"%s: parameter error\n", fnname );
rc = SLAPI_RESLIMIT_STATUS_PARAM_ERROR;
goto log_and_return;
@@ -513,7 +513,7 @@ slapi_reslimit_register( int type, const char *attrname, int *handlep
)
for ( i = 0; i < reslimit_map_count; ++i ) {
if ( 0 == slapi_attr_type_cmp( reslimit_map[ i ].rlmap_at,
attrname, SLAPI_TYPE_CMP_EXACT )) {
- slapi_log_error( SLAPI_LOG_FATAL, SLAPI_RESLIMIT_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPI_RESLIMIT_MODULE,
"%s: parameter error (%s already registered)\n",
attrname, fnname );
rc = SLAPI_RESLIMIT_STATUS_PARAM_ERROR;
@@ -538,7 +538,7 @@ unlock_and_return:
/* UNLOCKED -- map lock */
log_and_return:
- LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL,
+ LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL, LOG_DEBUG,
"<= %s returning status=%d, handle=%d\n", fnname, rc,
(handlep == NULL) ? -1 : *handlep );
@@ -566,14 +566,14 @@ slapi_reslimit_get_integer_limit( Slapi_Connection *conn, int
handle,
int rc;
SLAPIResLimitConnData *rlcdp;
- LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL, "=> %s conn=0x%x, handle=%d\n",
+ LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL, LOG_DEBUG, "=> %s conn=0x%x,
handle=%d\n",
fnname, conn, handle );
rc = SLAPI_RESLIMIT_STATUS_SUCCESS; /* optimistic */
/* sanity check parameters */
if ( limitp == NULL ) {
- slapi_log_error( SLAPI_LOG_FATAL, SLAPI_RESLIMIT_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPI_RESLIMIT_MODULE,
"%s: parameter error\n", fnname );
rc = SLAPI_RESLIMIT_STATUS_PARAM_ERROR;
goto log_and_return;
@@ -595,7 +595,7 @@ slapi_reslimit_get_integer_limit( Slapi_Connection *conn, int handle,
if(rlcdp->rlcd_integer_count==0) {
rc = SLAPI_RESLIMIT_STATUS_NOVALUE;
} else if ( handle < 0 || handle >= rlcdp->rlcd_integer_count ) {
- slapi_log_error( SLAPI_LOG_FATAL, SLAPI_RESLIMIT_MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPI_RESLIMIT_MODULE,
"%s: unknown handle %d\n", fnname, handle );
rc = SLAPI_RESLIMIT_STATUS_UNKNOWN_HANDLE;
} else if ( rlcdp->rlcd_integer_available[ handle ] ) {
@@ -610,13 +610,13 @@ slapi_reslimit_get_integer_limit( Slapi_Connection *conn, int
handle,
log_and_return:
if ( LDAPDebugLevelIsSet( LDAP_DEBUG_TRACE )) {
if ( rc == SLAPI_RESLIMIT_STATUS_SUCCESS ) {
- LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL,
+ LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL, LOG_DEBUG,
"<= %s returning SUCCESS, value=%d\n", fnname, *limitp, 0 );
} else if ( rc == SLAPI_RESLIMIT_STATUS_NOVALUE ) {
- LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL, "<= %s returning NO VALUE\n",
+ LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL, LOG_DEBUG, "<= %s returning NO
VALUE\n",
fnname, 0, 0 );
} else {
- LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL, "<= %s returning ERROR %d\n",
+ LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL, LOG_DEBUG, "<= %s returning ERROR
%d\n",
fnname, rc, 0 );
}
}
diff --git a/ldap/servers/slapd/result.c b/ldap/servers/slapd/result.c
index ad8983e..bd3c81e 100644
--- a/ldap/servers/slapd/result.c
+++ b/ldap/servers/slapd/result.c
@@ -2126,7 +2126,7 @@ log_result( Slapi_PBlock *pb, Operation *op, int err, ber_tag_t tag,
int nentrie
}
plugin_dn = plugin_get_dn(plugin);
- slapi_log_error (SLAPI_LOG_FATAL, "Internal search" , "Unindexed
search: source (%s) "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Internal search" ,
"Unindexed search: source (%s) "
"search base=\"%s\" filter=\"%s\" etime=%s nentries=%d
%s\n",
plugin_dn, base_dn, filter_str, etime, nentries, notes_str);
diff --git a/ldap/servers/slapd/sasl_io.c b/ldap/servers/slapd/sasl_io.c
index 0748a63..f852061 100644
--- a/ldap/servers/slapd/sasl_io.c
+++ b/ldap/servers/slapd/sasl_io.c
@@ -77,7 +77,7 @@ debug_print_layers(PRFileDesc *fd)
PRSocketOptionData sod;
PRInt32 err;
- LDAPDebug2Args( LDAP_DEBUG_CONNS,
+ LDAPDebug2Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
"debug_print_layers: fd %d sasl_io_recv = %p\n",
PR_FileDesc2NativeHandle(fd), sasl_io_recv );
LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
@@ -88,31 +88,31 @@ debug_print_layers(PRFileDesc *fd)
sod.option = PR_SockOpt_Nonblocking;
if (PR_FAILURE == PR_GetSocketOption(fd, &sod)) {
err = PR_GetError();
- LDAPDebug2Args( LDAP_DEBUG_CONNS,
+ LDAPDebug2Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
"debug_print_layers: error getting nonblocking option:
%d %s\n",
err, slapd_pr_strerror(err) );
} else {
- LDAPDebug1Arg( LDAP_DEBUG_CONNS,
+ LDAPDebug1Arg( LDAP_DEBUG_CONNS, LOG_DEBUG,
"debug_print_layers: non blocking %d\n",
sod.value.non_blocking );
}
sod.option = PR_SockOpt_Reuseaddr;
if (PR_FAILURE == PR_GetSocketOption(fd, &sod)) {
err = PR_GetError();
- LDAPDebug2Args( LDAP_DEBUG_CONNS,
+ LDAPDebug2Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
"debug_print_layers: error getting reuseaddr option: %d
%s\n",
err, slapd_pr_strerror(err) );
} else {
- LDAPDebug1Arg( LDAP_DEBUG_CONNS,
+ LDAPDebug1Arg( LDAP_DEBUG_CONNS, LOG_DEBUG,
"debug_print_layers: reuseaddr %d\n",
sod.value.reuse_addr );
}
sod.option = PR_SockOpt_RecvBufferSize;
if (PR_FAILURE == PR_GetSocketOption(fd, &sod)) {
err = PR_GetError();
- LDAPDebug2Args( LDAP_DEBUG_CONNS,
+ LDAPDebug2Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
"debug_print_layers: error getting recvbuffer option: %d
%s\n",
err, slapd_pr_strerror(err) );
} else {
- LDAPDebug1Arg( LDAP_DEBUG_CONNS,
+ LDAPDebug1Arg( LDAP_DEBUG_CONNS, LOG_DEBUG,
"debug_print_layers: recvbuffer %d\n",
sod.value.recv_buffer_size );
}
fd = fd->lower;
@@ -203,7 +203,7 @@ sasl_io_start_packet(PRFileDesc *fd, PRIntn flags, PRIntervalTime
timeout, PRInt
if (ret <= 0) {
*err = PR_GetError();
if (ret == 0) {
- LDAPDebug1Arg( LDAP_DEBUG_CONNS,
+ LDAPDebug1Arg( LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_io_start_packet: connection closed while reading sasl
packet length on connection %" NSPRIu64 "\n",
c->c_connid );
} else {
@@ -224,7 +224,7 @@ sasl_io_start_packet(PRFileDesc *fd, PRIntn flags, PRIntervalTime
timeout, PRInt
memcpy(sp->encrypted_buffer + sp->encrypted_buffer_offset, buffer, ret);
sp->encrypted_buffer_offset += ret;
if (sp->encrypted_buffer_offset < sizeof(buffer)) {
- LDAPDebug2Args( LDAP_DEBUG_CONNS,
+ LDAPDebug2Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_io_start_packet: read only %d bytes of sasl packet "
"length on connection %" NSPRIu64 "\n", ret,
c->c_connid );
#if defined(EWOULDBLOCK)
@@ -251,7 +251,7 @@ sasl_io_start_packet(PRFileDesc *fd, PRIntn flags, PRIntervalTime
timeout, PRInt
ber_len_t ber_len = 0;
ber_tag_t tag = 0;
- slapi_log_error( SLAPI_LOG_CONNS, "sasl_io_start_packet",
"conn=%" NSPRIu64 " fd=%d "
+ slapi_log_error(SLAPI_LOG_CONNS, LOG_DEBUG, "sasl_io_start_packet",
"conn=%" NSPRIu64 " fd=%d "
"Sent an LDAP message that was not encrypted.\n",
c->c_connid,
c->c_sd);
@@ -264,7 +264,7 @@ sasl_io_start_packet(PRFileDesc *fd, PRIntn flags, PRIntervalTime
timeout, PRInt
/* Is the ldap operation too large? */
if(ber_len > maxbersize){
- slapi_log_error( SLAPI_LOG_FATAL, "connection",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "connection",
"conn=%" NSPRIu64 " fd=%d Incoming BER Element was too
long, max allowable "
"is %" BERLEN_T " bytes. Change the nsslapd-maxbersize
attribute in "
"cn=config to increase.\n",
@@ -358,7 +358,7 @@ sasl_io_start_packet(PRFileDesc *fd, PRIntn flags, PRIntervalTime
timeout, PRInt
tag = *ber->ber_ptr++;
if (*ber->ber_ptr == LDAP_REQ_UNBIND){
#endif
- slapi_log_error( SLAPI_LOG_CONNS, "sasl_io_start_packet",
"conn=%" NSPRIu64 " fd=%d "
+ slapi_log_error(SLAPI_LOG_CONNS, LOG_DEBUG,
"sasl_io_start_packet", "conn=%" NSPRIu64 " fd=%d "
"Received unencrypted UNBIND operation.\n",
c->c_connid,
c->c_sd);
sp->encrypted_buffer_count = sp->encrypted_buffer_offset;
@@ -366,7 +366,7 @@ sasl_io_start_packet(PRFileDesc *fd, PRIntn flags, PRIntervalTime
timeout, PRInt
ber_free(ber, 1);
return SASL_IO_BUFFER_NOT_ENCRYPTED;
}
- slapi_log_error( SLAPI_LOG_CONNS, "sasl_io_start_packet",
"conn=%" NSPRIu64 " fd=%d "
+ slapi_log_error(SLAPI_LOG_CONNS, LOG_DEBUG,
"sasl_io_start_packet", "conn=%" NSPRIu64 " fd=%d "
"Error: received an LDAP message (tag 0x%lx) that was not
encrypted.\n",
#ifdef USE_OPENLDAP
c->c_connid, c->c_sd, (long unsigned int)tag);
@@ -378,7 +378,7 @@ sasl_io_start_packet(PRFileDesc *fd, PRIntn flags, PRIntervalTime
timeout, PRInt
done:
/* If we got here we have garbage, or a denied LDAP operation */
- slapi_log_error( SLAPI_LOG_CONNS, "sasl_io_start_packet",
"conn=%" NSPRIu64 " fd=%d "
+ slapi_log_error(SLAPI_LOG_CONNS, LOG_DEBUG, "sasl_io_start_packet",
"conn=%" NSPRIu64 " fd=%d "
"Error: received an invalid message that was not
encrypted.\n",
c->c_connid, c->c_sd);
@@ -396,7 +396,7 @@ done:
/* add length itself (for Cyrus SASL library) */
packet_length += sizeof(uint32_t);
- LDAPDebug2Args( LDAP_DEBUG_CONNS,
+ LDAPDebug2Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
"read sasl packet length %ld on connection %" NSPRIu64
"\n",
packet_length, c->c_connid );
@@ -404,7 +404,7 @@ done:
* setting of -1 means that we allow any size SASL IO packet. */
saslio_limit = config_get_maxsasliosize();
if(((long)saslio_limit != -1) && (packet_length > saslio_limit)) {
- LDAPDebug2Args( LDAP_DEBUG_ANY,
+ LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR,
"SASL encrypted packet length exceeds maximum allowed limit
(length=%ld, limit=%ld)."
" Change the nsslapd-maxsasliosize attribute in cn=config to
increase limit.\n",
packet_length, config_get_maxsasliosize() );
@@ -429,7 +429,7 @@ sasl_io_read_packet(PRFileDesc *fd, PRIntn flags, PRIntervalTime
timeout, PRInt3
Connection *c = sp->conn;
size_t bytes_remaining_to_read = sp->encrypted_buffer_count -
sp->encrypted_buffer_offset;
- LDAPDebug2Args( LDAP_DEBUG_CONNS,
+ LDAPDebug2Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_io_read_packet: reading %d bytes for connection %"
NSPRIu64 "\n",
bytes_remaining_to_read,
c->c_connid );
@@ -437,7 +437,7 @@ sasl_io_read_packet(PRFileDesc *fd, PRIntn flags, PRIntervalTime
timeout, PRInt3
if (ret <= 0) {
*err = PR_GetError();
if (ret == 0) {
- LDAPDebug1Arg( LDAP_DEBUG_CONNS,
+ LDAPDebug1Arg( LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_io_read_packet: connection closed while reading sasl
packet on connection %" NSPRIu64 "\n", c->c_connid );
} else {
LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
@@ -511,7 +511,7 @@ sasl_io_recv(PRFileDesc *fd, void *buf, PRInt32 len, PRIntn flags,
{
const char *output_buffer = NULL;
unsigned int output_length = 0;
- LDAPDebug1Arg( LDAP_DEBUG_CONNS,
+ LDAPDebug1Arg( LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_io_recv finished reading packet for connection %"
NSPRIu64 "\n", c->c_connid );
/* Now decode it */
ret =
sasl_decode(c->c_sasl_conn,sp->encrypted_buffer,sp->encrypted_buffer_count,&output_buffer,&output_length);
@@ -519,7 +519,7 @@ sasl_io_recv(PRFileDesc *fd, void *buf, PRInt32 len, PRIntn flags,
sp->encrypted_buffer_offset = 0;
sp->encrypted_buffer_count = 0;
if (SASL_OK == ret) {
- LDAPDebug2Args( LDAP_DEBUG_CONNS,
+ LDAPDebug2Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_io_recv decoded packet length %d for connection
%" NSPRIu64 "\n", output_length, c->c_connid );
if (output_length) {
sasl_io_resize_decrypted_buffer(sp,output_length);
@@ -529,7 +529,7 @@ sasl_io_recv(PRFileDesc *fd, void *buf, PRInt32 len, PRIntn flags,
bytes_in_buffer = output_length;
}
} else {
- LDAPDebug1Arg( LDAP_DEBUG_ANY,
+ LDAPDebug1Arg( LDAP_DEBUG_ANY, LOG_ERR,
"sasl_io_recv failed to decode packet for connection %"
NSPRIu64 "\n", c->c_connid );
PR_SetError(PR_IO_ERROR, 0);
return PR_FAILURE;
@@ -547,7 +547,7 @@ sasl_io_recv(PRFileDesc *fd, void *buf, PRInt32 len, PRIntn flags,
if (bytes_in_buffer == bytes_to_return) {
sp->decrypted_buffer_offset = 0;
sp->decrypted_buffer_count = 0;
- LDAPDebug1Arg( LDAP_DEBUG_CONNS,
+ LDAPDebug1Arg( LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_io_recv all decrypted data returned for connection
%" NSPRIu64 "\n", c->c_connid );
} else {
sp->decrypted_buffer_offset += bytes_to_return;
@@ -582,7 +582,7 @@ sasl_io_send(PRFileDesc *fd, const void *buf, PRInt32 amount,
sasl_io_private *sp = sasl_get_io_private(fd);
Connection *c = sp->conn;
- LDAPDebug1Arg( LDAP_DEBUG_CONNS,
+ LDAPDebug1Arg( LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_io_send writing %d bytes\n", amount );
if (sp->send_encrypted) {
/* Get SASL to encrypt the buffer */
@@ -590,19 +590,19 @@ sasl_io_send(PRFileDesc *fd, const void *buf, PRInt32 amount,
ret = sasl_encode(c->c_sasl_conn, buf, amount, &sp->send_buffer,
&sp->send_size);
if (ret != SASL_OK) {
const char *saslerr = sasl_errdetail(c->c_sasl_conn);
- LDAPDebug2Args( LDAP_DEBUG_ANY,
+ LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_DEBUG,
"sasl_io_send could not encode %d bytes - sasl error
%s\n",
amount, saslerr ? saslerr : "unknown" );
reset_send_info(sp);
PR_SetError(PR_IO_ERROR, 0);
return PR_FAILURE;
}
- LDAPDebug1Arg( LDAP_DEBUG_CONNS,
+ LDAPDebug1Arg( LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_io_send encoded as %d bytes\n",
sp->send_size );
sp->send_offset = 0;
} else if ((amount > 0) && (sp->send_offset >=
sp->send_size)) {
/* something went wrong - we sent too many bytes */
- LDAPDebug2Args( LDAP_DEBUG_ANY,
+ LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_DEBUG,
"sasl_io_send - client requested to send %d bytes but we
"
"already sent %d bytes\n", amount,
(sp->send_offset >= sp->send_size));
reset_send_info(sp);
@@ -616,7 +616,7 @@ sasl_io_send(PRFileDesc *fd, const void *buf, PRInt32 amount,
ret = amount; /* sent amount of data requested by caller */
reset_send_info(sp); /* done with this buffer, ready for next buffer */
} else if (ret > 0) { /* could not send the entire encrypted buffer - tell
caller we're blocked */
- LDAPDebug2Args( LDAP_DEBUG_CONNS,
+ LDAPDebug2Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_io_send error: only sent %d of %d encoded
bytes\n", ret,
(sp->send_size - sp->send_offset) );
sp->send_offset += ret;
@@ -656,7 +656,7 @@ sasl_pop_IO_layer(PRFileDesc* stack, int doclose)
/* see if stack has the sasl io layer */
if (!sasl_LayerID || !stack) {
- LDAPDebug0Args( LDAP_DEBUG_CONNS,
+ LDAPDebug0Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_pop_IO_layer: no SASL IO layer\n" );
return PR_SUCCESS;
}
@@ -666,7 +666,7 @@ sasl_pop_IO_layer(PRFileDesc* stack, int doclose)
if (!doclose) {
id = sasl_LayerID;
if (!PR_GetIdentitiesLayer(stack, id)) {
- LDAPDebug0Args( LDAP_DEBUG_CONNS,
+ LDAPDebug0Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_pop_IO_layer: no SASL IO layer\n" );
return PR_SUCCESS;
}
@@ -675,7 +675,7 @@ sasl_pop_IO_layer(PRFileDesc* stack, int doclose)
/* remove the layer from the stack */
layer = PR_PopIOLayer(stack, id);
if (!layer) {
- LDAPDebug0Args( LDAP_DEBUG_CONNS,
+ LDAPDebug0Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_pop_IO_layer: error - could not pop SASL IO
layer\n" );
return PR_FAILURE;
}
@@ -684,7 +684,7 @@ sasl_pop_IO_layer(PRFileDesc* stack, int doclose)
sp = sasl_get_io_private(layer);
if (sp) {
- LDAPDebug0Args( LDAP_DEBUG_CONNS,
+ LDAPDebug0Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_pop_IO_layer: removing SASL IO layer\n" );
/* Free the buffers */
slapi_ch_free_string(&sp->encrypted_buffer);
@@ -709,11 +709,11 @@ static PRStatus PR_CALLBACK
closeLayer(PRFileDesc* stack)
{
PRStatus rv = 0;
- LDAPDebug0Args( LDAP_DEBUG_CONNS,
+ LDAPDebug0Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
"closeLayer: closing SASL IO layer\n" );
rv = sasl_pop_IO_layer(stack, 1 /* do close */);
if (PR_SUCCESS != rv) {
- LDAPDebug0Args( LDAP_DEBUG_CONNS,
+ LDAPDebug0Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
"closeLayer: error closing SASL IO layer\n" );
return rv;
}
@@ -758,7 +758,7 @@ sasl_io_enable(Connection *c, void *data /* UNUSED */)
sasl_io_private *sp = NULL;
if ( c->c_flags & CONN_FLAG_CLOSING ) {
- slapi_log_error( SLAPI_LOG_FATAL, "sasl_io_enable",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "sasl_io_enable",
"Cannot enable SASL security on connection in CLOSING
state\n");
return PR_FAILURE;
}
diff --git a/ldap/servers/slapd/saslbind.c b/ldap/servers/slapd/saslbind.c
index c84fafc..1172a45 100644
--- a/ldap/servers/slapd/saslbind.c
+++ b/ldap/servers/slapd/saslbind.c
@@ -185,7 +185,7 @@ static int ids_sasl_log(
{
switch (level) {
case SASL_LOG_ERR: /* log unusual errors (default) */
- slapi_log_error(SLAPI_LOG_FATAL, "sasl", "%s\n", message);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "sasl", "%s\n",
message);
break;
case SASL_LOG_FAIL: /* log all authentication failures */
@@ -384,7 +384,7 @@ static int ids_sasl_canon_user(
sasl_getprop(conn, SASL_MECHNAME, (const void**)&mech);
if (mech == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "Unable to read SASL mechanism while
"
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "Unable to read SASL mechanism
while "
"canonifying user.\n")
goto fail;
}
@@ -548,7 +548,7 @@ int ids_sasl_init(void)
PR_ASSERT(inited == 0);
if (inited != 0) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "ids_sasl_init is called more than
once.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "ids_sasl_init is called more than
once.\n");
}
inited = 1;
@@ -834,7 +834,7 @@ void ids_sasl_check_bind(Slapi_PBlock *pb)
if ((pb->pb_conn->c_flags & CONN_FLAG_SASL_COMPLETE) || continuing) {
Slapi_Operation *operation;
slapi_pblock_get( pb, SLAPI_OPERATION, &operation);
- slapi_log_error(SLAPI_LOG_CONNS, "ids_sasl_check_bind",
+ slapi_log_error(SLAPI_LOG_CONNS, LOG_DEBUG, "ids_sasl_check_bind",
"cleaning up sasl IO conn=%" NSPRIu64 " op=%d
complete=%d continuing=%d\n",
pb->pb_conn->c_connid, operation->o_opid,
(pb->pb_conn->c_flags & CONN_FLAG_SASL_COMPLETE),
continuing);
diff --git a/ldap/servers/slapd/schema.c b/ldap/servers/slapd/schema.c
index 8421244..0e6bf82 100644
--- a/ldap/servers/slapd/schema.c
+++ b/ldap/servers/slapd/schema.c
@@ -293,7 +293,7 @@ static PRStatus
schema_dse_mandatory_init( void )
{
if ( NULL == ( schema_dse_lock = slapi_new_rwlock())) {
- slapi_log_error( SLAPI_LOG_FATAL, "schema_dse_mandatory_init",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schema_dse_mandatory_init",
"slapi_new_rwlock() for schema DSE lock failed\n" );
return PR_FAILURE;
}
@@ -437,7 +437,7 @@ slapi_schema_load_repl_policies()
{
if (schema_policy_lock == NULL) {
if (NULL == (schema_policy_lock = slapi_new_rwlock())) {
- slapi_log_error(SLAPI_LOG_FATAL,
"slapi_schema_load_repl_policies",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"slapi_schema_load_repl_policies",
"slapi_new_rwlock() for schema replication policy
lock failed\n");
return -1;
}
@@ -2117,7 +2117,7 @@ modify_schema_dse (Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry *entr
schema_create_errormsg( returntext, SLAPI_DSE_RETURNTEXT_SIZE,
schema_errprefix_generic, attr_name,
"Replace is not possible, local consumer schema is a superset
of the supplier" );
- slapi_log_error(SLAPI_LOG_FATAL, "schema",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schema",
"[C] Local %s must not be overwritten (set replication log for
additional info)\n",
attr_name);
*returncode = LDAP_UNWILLING_TO_PERFORM;
@@ -2197,7 +2197,7 @@ modify_schema_dse (Slapi_PBlock *pb, Slapi_Entry *entryBefore,
Slapi_Entry *entr
schema_create_errormsg( returntext, SLAPI_DSE_RETURNTEXT_SIZE,
schema_errprefix_generic, mods[i]->mod_type,
"Replace is not allowed on the subschema subentry" );
- slapi_log_error(SLAPI_LOG_REPL, "schema",
"modify_schema_dse: Replace is not allowed on the subschema subentry\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"modify_schema_dse: Replace is not allowed on the subschema subentry\n");
rc = SLAPI_DSE_CALLBACK_ERROR;
} else {
if (strcasecmp (mods[i]->mod_type, "attributetypes") == 0) {
@@ -2475,7 +2475,7 @@ schema_delete_objectclasses( Slapi_Entry *entryBefore, LDAPMod
*mod,
if ( NULL == mod->mod_bvalues ) {
if (is_internal_operation) {
- slapi_log_error(SLAPI_LOG_REPL, "schema", "schema_delete_objectclasses:
Remove all objectclass in Internal op\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"schema_delete_objectclasses: Remove all objectclass in Internal op\n");
} else {
schema_create_errormsg(errorbuf, errorbufsize, schema_errprefix_oc,
NULL, "Cannot remove all schema object classes");
@@ -2499,14 +2499,14 @@ schema_delete_objectclasses( Slapi_Entry *entryBefore, LDAPMod
*mod,
if (poc2->oc_superior &&
(strcasecmp (poc2->oc_superior, delete_oc->oc_name) == 0)) {
if (is_internal_operation) {
- slapi_log_error(SLAPI_LOG_REPL, "schema",
"schema_delete_objectclasses: Should not delete object class (%s) which has child
object classes"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"schema_delete_objectclasses: Should not delete object class (%s) which has child
object classes"
". But accept it because it is internal operation\n",
delete_oc->oc_name);
} else {
schema_create_errormsg(errorbuf, errorbufsize, schema_errprefix_oc,
delete_oc->oc_name, "Cannot delete an object class"
" which has child object classes");
- slapi_log_error(SLAPI_LOG_REPL, "schema",
"schema_delete_objectclasses: Cannot delete an object class (%s) which has child
object classes\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"schema_delete_objectclasses: Cannot delete an object class (%s) which has child
object classes\n",
delete_oc->oc_name);
rc = LDAP_UNWILLING_TO_PERFORM;
goto unlock_and_return;
@@ -2520,14 +2520,14 @@ schema_delete_objectclasses( Slapi_Entry *entryBefore, LDAPMod
*mod,
else {
if (is_internal_operation) {
- slapi_log_error(SLAPI_LOG_REPL, "schema",
"schema_delete_objectclasses: Should not delete a standard object class (%s)"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"schema_delete_objectclasses: Should not delete a standard object class (%s)"
". But accept it because it is internal operation\n",
delete_oc->oc_name);
oc_delete_nolock (poc->oc_name);
} else {
schema_create_errormsg( errorbuf, errorbufsize, schema_errprefix_oc,
delete_oc->oc_name, "Cannot delete a standard object class" );
- slapi_log_error(SLAPI_LOG_REPL, "schema",
"schema_delete_objectclasses: Cannot delete a standard object class (%s)\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"schema_delete_objectclasses: Cannot delete a standard object class (%s)\n",
delete_oc->oc_name);
rc = LDAP_UNWILLING_TO_PERFORM;
goto unlock_and_return;
@@ -2587,7 +2587,7 @@ schema_delete_attributes ( Slapi_Entry *entryBefore, LDAPMod *mod,
if (NULL == mod->mod_bvalues) {
if (is_internal_operation) {
- slapi_log_error(SLAPI_LOG_REPL, "schema", "schema_delete_attributes:
Remove all attributetypes in Internal op\n");
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"schema_delete_attributes: Remove all attributetypes in Internal op\n");
} else {
schema_create_errormsg( errorbuf, errorbufsize, schema_errprefix_at,
NULL, "Cannot remove all schema attribute types" );
@@ -2620,14 +2620,14 @@ schema_delete_attributes ( Slapi_Entry *entryBefore, LDAPMod
*mod,
/* only modify attrs which were user defined */
if (a->asi_flags & SLAPI_ATTR_FLAG_STD_ATTR) {
if (is_internal_operation) {
- slapi_log_error(SLAPI_LOG_REPL, "schema", "schema_delete_attributes:
Should not delete a standard attribute type (%s)"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"schema_delete_attributes: Should not delete a standard attribute type (%s)"
". But accept it because it is internal operation\n",
psbAttrName->buffer);
} else {
schema_create_errormsg( errorbuf, errorbufsize, schema_errprefix_at,
psbAttrName->buffer,
"Cannot delete a standard attribute type");
- slapi_log_error(SLAPI_LOG_REPL, "schema", "schema_delete_attributes:
Cannot delete a standard attribute type (%s)\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"schema_delete_attributes: Cannot delete a standard attribute type (%s)\n",
psbAttrName->buffer);
attr_syntax_return(a);
return schema_return(LDAP_UNWILLING_TO_PERFORM, psbAttrOid, psbAttrName,
@@ -2663,14 +2663,14 @@ schema_delete_attributes ( Slapi_Entry *entryBefore, LDAPMod
*mod,
if (attr_in_use_by_an_oc) {
if (is_internal_operation) {
- slapi_log_error(SLAPI_LOG_REPL, "schema", "schema_delete_attributes:
Should not delete an attribute (%s) used in oc (%s)"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"schema_delete_attributes: Should not delete an attribute (%s) used in oc (%s)"
". But accept it because it is internal operation\n",
oc_list_type, oc->oc_name);
} else {
schema_create_errormsg(errorbuf, errorbufsize, schema_errprefix_at,
psbAttrName->buffer, "Is included in the %s list for object class %s.
Cannot delete.",
oc_list_type, oc->oc_name);
- slapi_log_error(SLAPI_LOG_REPL, "schema", "schema_delete_attributes:
Could delete an attribute (%s) used in oc (%s)"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"schema_delete_attributes: Could delete an attribute (%s) used in oc (%s)"
". But accept it because it is internal operation\n",
oc_list_type, oc->oc_name);
break;
@@ -2680,7 +2680,7 @@ schema_delete_attributes ( Slapi_Entry *entryBefore, LDAPMod *mod,
oc_unlock();
if (attr_in_use_by_an_oc) {
if (is_internal_operation) {
- slapi_log_error(SLAPI_LOG_REPL, "schema", "schema_delete_attributes:
Should not delete an attribute used in oc"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"schema_delete_attributes: Should not delete an attribute used in oc"
". But accept it because it is internal operation\n");
} else {
@@ -4130,7 +4130,7 @@ parse_attr_str(const char *input, struct asyntaxinfo **asipp, char
*errorbuf,
char ebuf[SLAPI_DSE_RETURNTEXT_SIZE];
parser_flags |= LDAP_SCHEMA_ALLOW_QUOTED;
if (config_set_enquote_sup_oc(CONFIG_ENQUOTE_SUP_OC_ATTRIBUTE, "on",
ebuf, CONFIG_APPLY)) {
- slapi_log_error(SLAPI_LOG_FATAL, "schema", "Failed to enable
%s: %s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schema", "Failed to
enable %s: %s\n",
CONFIG_ENQUOTE_SUP_OC_ATTRIBUTE, ebuf);
}
}
@@ -4515,7 +4515,7 @@ parse_objclass_str ( const char *input, struct objclass **oc, char
*errorbuf,
char ebuf[SLAPI_DSE_RETURNTEXT_SIZE];
parser_flags |= LDAP_SCHEMA_ALLOW_QUOTED;
if (config_set_enquote_sup_oc(CONFIG_ENQUOTE_SUP_OC_ATTRIBUTE, "on",
ebuf, CONFIG_APPLY)) {
- slapi_log_error(SLAPI_LOG_FATAL, "schema", "Failed to enable
%s: %s\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schema", "Failed to
enable %s: %s\n",
CONFIG_ENQUOTE_SUP_OC_ATTRIBUTE, ebuf);
}
}
@@ -5282,7 +5282,7 @@ init_schema_dse_ext(char *schemadir, Slapi_Backend *be,
filelist = get_priority_filelist(myschemadir, ".*ldif$");
if (!filelist || !*filelist)
{
- slapi_log_error(SLAPI_LOG_FATAL, "schema",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schema",
"No schema files were found in the directory %s\n", myschemadir);
free_filelist(filelist);
rc = 0;
@@ -5359,7 +5359,7 @@ init_schema_dse_ext(char *schemadir, Slapi_Backend *be,
}
if (rc)
{
- slapi_log_error(SLAPI_LOG_FATAL, "schema", "Could not add"
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schema", "Could not
add"
" attribute type \"objectClass\" to the schema: %s\n",
errorbuf);
}
@@ -5407,7 +5407,7 @@ init_schema_dse_ext(char *schemadir, Slapi_Backend *be,
if (backend_plugin->plg_add_schema) {
(backend_plugin->plg_add_schema)( NULL );
} else {
- slapi_log_error( SLAPI_LOG_FATAL, "init_schema_dse",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "init_schema_dse",
"backend has not set internal schema\n" );
}
}
@@ -6128,7 +6128,7 @@ slapi_validate_schema_files(char *schemadir)
if (rc) {
return LDAP_SUCCESS;
} else {
- slapi_log_error( SLAPI_LOG_FATAL, "schema_reload",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schema_reload",
"schema file validation failed\n" );
return LDAP_OBJECT_CLASS_VIOLATION;
}
@@ -6153,7 +6153,7 @@ slapi_reload_schema_files(char *schemadir)
if (NULL == be)
{
- slapi_log_error( SLAPI_LOG_FATAL, "schema_reload",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schema_reload",
"schema file reload failed\n" );
return LDAP_LOCAL_ERROR;
}
@@ -6182,7 +6182,7 @@ slapi_reload_schema_files(char *schemadir)
} else {
reload_schemafile_unlock();
slapi_be_Unlock(be);
- slapi_log_error( SLAPI_LOG_FATAL, "schema_reload",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schema_reload",
"schema file reload failed\n" );
return LDAP_LOCAL_ERROR;
}
@@ -6224,7 +6224,7 @@ slapi_schema_list_objectclass_attributes(const char *ocname_or_oid,
charray_merge(&attrs, oc->oc_allowed, 1/*copy_strs*/);
break;
default:
- slapi_log_error( SLAPI_LOG_FATAL, "list objectclass attributes",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "list objectclass attributes",
"flag 0x%x not supported\n", flags );
break;
}
@@ -6299,13 +6299,13 @@ schema_oc_superset_check(struct objclass *oc_list1, struct
objclass *oc_list2, c
repl_schema_policy = schema_check_policy(replica_role,
REPL_SCHEMA_OBJECTCLASS, oc_1->oc_name, oc_1->oc_oid);
if (repl_schema_policy == REPL_SCHEMA_UPDATE_ACCEPT_VALUE) {
/* We are skipping the superset checking for that objectclass */
- slapi_log_error(SLAPI_LOG_REPL, "schema", "Do not
check if this OBJECTCLASS is missing on local/remote schema [%s or %s]\n",
oc_1->oc_name, oc_1->oc_oid);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"Do not check if this OBJECTCLASS is missing on local/remote schema [%s or
%s]\n", oc_1->oc_name, oc_1->oc_oid);
continue;
} else if (repl_schema_policy == REPL_SCHEMA_UPDATE_REJECT_VALUE) {
/* This objectclass being present, we need to fail as if it was a
superset
* keep evaluating to have all the objectclass checking
*/
- slapi_log_error(SLAPI_LOG_REPL, "schema", "%s
objectclass prevents replication of the schema\n", oc_1->oc_name);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"%s objectclass prevents replication of the schema\n", oc_1->oc_name);
rc = 1;
if(debug_logging){
/* we continue to check all the objectclasses so we log what
is wrong */
@@ -6326,10 +6326,10 @@ schema_oc_superset_check(struct objclass *oc_list1, struct
objclass *oc_list2, c
rc = 1;
if (debug_logging) {
if (replica_role == REPL_SCHEMA_AS_CONSUMER) {
- slapi_log_error(SLAPI_LOG_REPL,
"schema", "Local %s schema objectclasses is a superset of"
+ slapi_log_error(SLAPI_LOG_REPL,
LOG_DEBUG, "schema", "Local %s schema objectclasses is a superset of"
" the received one.\n",
oc_1->oc_name);
} else {
- slapi_log_error(SLAPI_LOG_REPL,
"schema", "Remote %s schema objectclasses is a superset of"
+ slapi_log_error(SLAPI_LOG_REPL,
LOG_DEBUG, "schema", "Remote %s schema objectclasses is a superset
of"
" the received one.\n",
oc_1->oc_name);
}
continue;
@@ -6338,7 +6338,7 @@ schema_oc_superset_check(struct objclass *oc_list1, struct objclass
*oc_list2, c
}
}
} else {
- slapi_log_error(SLAPI_LOG_REPL, "schema", "Fail to
retrieve in the %s schema [%s or %s]\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"Fail to retrieve in the %s schema [%s or %s]\n",
description,
oc_1->oc_name,
oc_1->oc_oid);
@@ -6440,7 +6440,7 @@ schema_oc_to_string(struct objclass *oc)
}
strcat(oc_str, " )");
- slapi_log_error(SLAPI_LOG_REPL, "schema", "schema_oc_to_string:
replace (old[%d]=%s)\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"schema_oc_to_string: replace (old[%d]=%s)\n",
size, oc_str);
return(oc_str);
@@ -6480,12 +6480,12 @@ schema_list_oc2learn(struct objclass *oc_remote_list, struct
objclass *oc_local_
if ((oc_local == NULL) ||
(schema_oc_compare(oc_local, oc_remote, message) < 0)) {
/* This replica does not know this objectclass, It needs to be
added */
- slapi_log_error(SLAPI_LOG_REPL, "schema", "Add
that unknown/extended objectclass %s (%s)\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"Add that unknown/extended objectclass %s (%s)\n",
oc_remote->oc_name,
oc_remote->oc_oid);
if ((mods_index = (struct schema_mods_indexes *)
slapi_ch_calloc(1, sizeof (struct schema_mods_indexes))) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, "schema",
"Fail to Add (no memory) objectclass %s (%s)\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"schema", "Fail to Add (no memory) objectclass %s (%s)\n",
oc_remote->oc_name,
oc_remote->oc_oid);
continue;
@@ -6543,12 +6543,12 @@ schema_list_attr2learn(struct asyntaxinfo *at_list_local, struct
asyntaxinfo *at
if (((at_local = attr_syntax_find(at_remote, at_list_local)) == NULL) ||
(schema_at_compare(at_local, at_remote, message, debug_logging)
< 0)) {
/* This replica does not know this attribute, It needs to be
added */
- slapi_log_error(SLAPI_LOG_REPL, "schema", "Add
that unknown/extended attribute %s (%s)\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"Add that unknown/extended attribute %s (%s)\n",
at_remote->asi_name,
at_remote->asi_oid);
if ((mods_index = (struct schema_mods_indexes *)
slapi_ch_calloc(1, sizeof (struct schema_mods_indexes))) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, "schema",
"Fail to Add (no memory) attribute %s (%s)\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"schema", "Fail to Add (no memory) attribute %s (%s)\n",
at_remote->asi_name,
at_remote->asi_oid);
continue;
@@ -6615,7 +6615,7 @@ schema_oc_compare_strict(struct objclass *oc_1, struct objclass
*oc_2, const cha
}
if (moved_must_to_may) {
/* This is a special case where oc1 is actually
NOT a superset of oc2 */
- slapi_log_error(SLAPI_LOG_REPL,
"schema", "Attribute %s is no longer 'required' in '%s' of
the %s schema but is now 'allowed'\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG,
"schema", "Attribute %s is no longer 'required' in '%s' of
the %s schema but is now 'allowed'\n",
oc_1->oc_orig_required[i],
oc_1->oc_name,
description);
@@ -6623,7 +6623,7 @@ schema_oc_compare_strict(struct objclass *oc_1, struct objclass
*oc_2, const cha
/* The required attribute in the oc1
* is not required in the oc2
*/
- slapi_log_error(SLAPI_LOG_REPL,
"schema", "Attribute %s is not required in '%s' of the %s
schema\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG,
"schema", "Attribute %s is not required in '%s' of the %s
schema\n",
oc_1->oc_orig_required[i],
oc_1->oc_name,
description);
@@ -6654,7 +6654,7 @@ schema_oc_compare_strict(struct objclass *oc_1, struct objclass
*oc_2, const cha
/* The allowed attribute in the remote schema
(remote_oc->oc_orig_allowed[i])
* is not allowed in the local schema
*/
- slapi_log_error(SLAPI_LOG_REPL, "schema",
"Attribute %s is not allowed in '%s' of the %s schema\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG,
"schema", "Attribute %s is not allowed in '%s' of the %s
schema\n",
oc_1->oc_orig_allowed[i],
oc_1->oc_name,
description);
@@ -6723,7 +6723,7 @@ schema_at_compare(struct asyntaxinfo *at_1, struct asyntaxinfo
*at_2, char *mess
/* at_1 is a superset */
if (debug_logging) {
- slapi_log_error(SLAPI_LOG_REPL, "schema", "%s
schema attribute [%s] is not "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"%s schema attribute [%s] is not "
"\"single-valued\" \n", message,
at_1->asi_name);
}
return 1;
@@ -6731,7 +6731,7 @@ schema_at_compare(struct asyntaxinfo *at_1, struct asyntaxinfo
*at_2, char *mess
if ((at_1->asi_flags & SLAPI_ATTR_FLAG_SINGLE) &&
!(at_2->asi_flags & SLAPI_ATTR_FLAG_SINGLE)) {
/* at_2 is a superset */
if (debug_logging) {
- slapi_log_error(SLAPI_LOG_REPL, "schema", "%s
schema attribute [%s] is not "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"%s schema attribute [%s] is not "
"\"single-valued\" \n", message,
at_1->asi_name);
}
return -1;
@@ -6743,7 +6743,7 @@ schema_at_compare(struct asyntaxinfo *at_1, struct asyntaxinfo
*at_2, char *mess
if (schema_at_superset_check_syntax_oids(at_1->asi_syntax_oid,
at_2->asi_syntax_oid)) {
/* at_1 is a superset */
if (debug_logging) {
- slapi_log_error(SLAPI_LOG_REPL, "schema", "%s
schema attribute [%s] syntax "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"%s schema attribute [%s] syntax "
"can not be overwritten\n", message,
at_1->asi_name);
}
return 1;
@@ -6751,7 +6751,7 @@ schema_at_compare(struct asyntaxinfo *at_1, struct asyntaxinfo
*at_2, char *mess
if (schema_at_superset_check_syntax_oids(at_2->asi_syntax_oid,
at_1->asi_syntax_oid)) {
/* at_2 is a superset */
if (debug_logging) {
- slapi_log_error(SLAPI_LOG_REPL, "schema", "%s
schema attribute [%s] syntax "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"%s schema attribute [%s] syntax "
"can not be overwritten\n", message,
at_2->asi_name);
}
return -1;
@@ -6764,14 +6764,14 @@ schema_at_compare(struct asyntaxinfo *at_1, struct asyntaxinfo
*at_2, char *mess
*/
if (schema_at_superset_check_mr(at_1, at_2, info)) {
if (debug_logging) {
- slapi_log_error(SLAPI_LOG_REPL, "schema", "%s
schema attribute [%s] matching "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"%s schema attribute [%s] matching "
"rule can not be overwritten\n", message,
at_1->asi_name);
}
return 1;
}
if (schema_at_superset_check_mr(at_2, at_1, info)) {
if (debug_logging) {
- slapi_log_error(SLAPI_LOG_REPL, "schema", "%s
schema attribute [%s] matching "
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"%s schema attribute [%s] matching "
"rule can not be overwritten\n", message,
at_2->asi_name);
}
return -1;
@@ -6804,13 +6804,13 @@ schema_at_superset_check(struct asyntaxinfo *at_list1, struct
asyntaxinfo *at_li
repl_schema_policy = schema_check_policy(replica_role, REPL_SCHEMA_ATTRIBUTE,
at_1->asi_name, at_1->asi_oid);
if (repl_schema_policy == REPL_SCHEMA_UPDATE_ACCEPT_VALUE) {
/* We are skipping the superset checking for that attribute */
- slapi_log_error(SLAPI_LOG_REPL, "schema", "Do not check if
this ATTRIBUTE is missing on local/remote schema [%s or %s]\n", at_1->asi_name,
at_1->asi_oid);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema", "Do
not check if this ATTRIBUTE is missing on local/remote schema [%s or %s]\n",
at_1->asi_name, at_1->asi_oid);
continue;
} else if (repl_schema_policy == REPL_SCHEMA_UPDATE_REJECT_VALUE) {
/* This attribute being present, we need to fail as if it was a superset
* but keep evaluating to have all the attribute checking
*/
- slapi_log_error(SLAPI_LOG_REPL, "schema", "%s attribute
prevents replication of the schema\n", at_1->asi_name);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema", "%s
attribute prevents replication of the schema\n", at_1->asi_name);
rc = 1;
if (debug_logging) {
/* we continue to check all the objectclasses so we log what is
wrong */
@@ -6826,10 +6826,10 @@ schema_at_superset_check(struct asyntaxinfo *at_list1, struct
asyntaxinfo *at_li
rc = 1;
if (debug_logging) {
if (replica_role == REPL_SCHEMA_AS_CONSUMER) {
- slapi_log_error(SLAPI_LOG_REPL,
"schema", "Local %s schema attributetypes is a superset of"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG,
"schema", "Local %s schema attributetypes is a superset of"
" the received one.\n",
at_1->asi_name);
} else {
- slapi_log_error(SLAPI_LOG_REPL,
"schema", "Remote %s schema attributetypes is a superset of"
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG,
"schema", "Remote %s schema attributetypes is a superset of"
" the received one.\n",
at_1->asi_name);
}
continue;
@@ -6841,7 +6841,7 @@ schema_at_superset_check(struct asyntaxinfo *at_list1, struct
asyntaxinfo *at_li
rc = 1;
if(debug_logging){
/* we continue to check all attributes so we log what is wrong */
- slapi_log_error(SLAPI_LOG_REPL, "schema", "Fail to
retrieve in the %s schema [%s or %s]\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema", "Fail
to retrieve in the %s schema [%s or %s]\n",
message, at_1->asi_name, at_1->asi_oid);
continue;
} else {
@@ -7194,7 +7194,7 @@ schema_berval_to_oclist(struct berval **oc_berval)
if (LDAP_SUCCESS != (rc = parse_oc_str(oc_berval[i]->bv_val,
&oc,
errorbuf, sizeof(errorbuf), DSE_SCHEMA_NO_CHECK |
DSE_SCHEMA_USE_PRIV_SCHEMA, 0,
schema_ds4x_compat, oc_list))) {
- slapi_log_error(SLAPI_LOG_FATAL, "schema",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"schema",
"parse_oc_str returned error:
%s\n",
errorbuf[0]?errorbuf:"unknown");
oc_free(&oc);
@@ -7236,7 +7236,7 @@ schema_berval_to_atlist(struct berval **at_berval)
rc = parse_at_str(at_berval[i]->bv_val, &at, errorbuf,
sizeof(errorbuf),
DSE_SCHEMA_NO_CHECK | DSE_SCHEMA_USE_PRIV_SCHEMA, 0,
schema_ds4x_compat, 0);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "schema",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schema",
"schema_berval_to_atlist: parse_at_str(%s) failed -
%s\n",
at_berval[i]->bv_val,
errorbuf[0]?errorbuf:"unknown");
attr_syntax_free(at);
@@ -7383,7 +7383,7 @@ modify_schema_internal_mod(Slapi_DN *sdn, Slapi_Mods *smods)
} else {
type = "unknown";
}
- slapi_log_error(SLAPI_LOG_REPL, "schema", "modify_schema_internal_mod:
successfully learn %s definitions\n", type);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"modify_schema_internal_mod: successfully learn %s definitions\n", type);
/* Update the schema csn if the operation succeeded */
schema_csn = csn_new();
if (NULL != schema_csn) {
@@ -7392,7 +7392,7 @@ modify_schema_internal_mod(Slapi_DN *sdn, Slapi_Mods *smods)
g_set_global_schema_csn(schema_csn);
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, "schema", "modify_schema_internal_mod:
fail to learn schema definitions (%d) \n", op_result);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schema",
"modify_schema_internal_mod: fail to learn schema definitions (%d) \n",
op_result);
}
slapi_pblock_destroy(newpb);
@@ -7427,7 +7427,7 @@ modify_schema_prepare_mods(Slapi_Mods *smods, char *type, struct
schema_mods_ind
bv->bv_val = (void*) object->old_value;
bvps_del[i] = bv;
i++;
- slapi_log_error(SLAPI_LOG_REPL, "schema", "MOD[%d] del
(%s): %s\n", i, type, object->old_value);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"MOD[%d] del (%s): %s\n", i, type, object->old_value);
}
}
bvps_del[nb_values_del] = NULL;
@@ -7445,7 +7445,7 @@ modify_schema_prepare_mods(Slapi_Mods *smods, char *type, struct
schema_mods_ind
bv->bv_len = strlen(object->new_value);
bv->bv_val = (void*) object->new_value;
bvps_add[i] = bv;
- slapi_log_error(SLAPI_LOG_REPL, "schema", "MOD[%d] add (%s):
%s\n", i, type, object->new_value);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema", "MOD[%d]
add (%s): %s\n", i, type, object->new_value);
}
bvps_add[nb_values_add] = NULL;
}
@@ -7496,7 +7496,7 @@ modify_schema_apply_new_definitions(char *attr_name, struct
schema_mods_indexes
/* Then the sdn */
sdn = slapi_sdn_new();
if (!sdn) {
- slapi_log_error( SLAPI_LOG_FATAL, "schema",
"modify_schema_apply_new_definitions Out of memory \n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schema",
"modify_schema_apply_new_definitions Out of memory \n");
goto done;
}
slapi_sdn_set_dn_byval(sdn, SLAPD_SCHEMA_DN);
@@ -7581,7 +7581,7 @@ modify_schema_get_new_definitions(Slapi_PBlock *pb, LDAPMod **mods,
struct schem
/* If we can not build an attributes list from
the mods, just skip
* it and look for objectclasses
*/
- slapi_log_error(SLAPI_LOG_FATAL,
"schema",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"schema",
"Not able to build an attributes
list (%s) from the schema received from the supplier\n",
mods[i]->mod_type);
continue;
@@ -7598,7 +7598,7 @@ modify_schema_get_new_definitions(Slapi_PBlock *pb, LDAPMod **mods,
struct schem
at2learn->new_value = (char *)
slapi_ch_malloc(bv->bv_len + 1);
memcpy(at2learn->new_value, bv->bv_val,
bv->bv_len);
at2learn->new_value[bv->bv_len] =
'\0';
- slapi_log_error(SLAPI_LOG_REPL,
"schema", "take attributetypes: %s\n", at2learn->new_value);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG,
"schema", "take attributetypes: %s\n", at2learn->new_value);
}
/* Free the remote schema list */
@@ -7612,7 +7612,7 @@ modify_schema_get_new_definitions(Slapi_PBlock *pb, LDAPMod **mods,
struct schem
/* If we can not build an objectclasses list from
the mods, just skip
* it and look for attributes
*/
- slapi_log_error(SLAPI_LOG_FATAL,
"schema",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"schema",
"Not able to build an objectclasses
list (%s) from the schema received from the supplier\n",
mods[i]->mod_type);
continue;
@@ -7629,7 +7629,7 @@ modify_schema_get_new_definitions(Slapi_PBlock *pb, LDAPMod **mods,
struct schem
oc2learn->new_value = (char *)
slapi_ch_malloc(bv->bv_len + 1);
memcpy(oc2learn->new_value, bv->bv_val,
bv->bv_len);
oc2learn->new_value[bv->bv_len] =
'\0';
- slapi_log_error(SLAPI_LOG_REPL,
"schema", "take objectclass: %s\n", oc2learn->new_value);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG,
"schema", "take objectclass: %s\n", oc2learn->new_value);
}
/* Free the remote schema list*/
@@ -7763,14 +7763,14 @@ supplier_get_new_definitions(struct berval **objectclasses, struct
berval **attr
oc2learn->new_value = (char *) slapi_ch_malloc(bv->bv_len +
1);
memcpy(oc2learn->new_value, bv->bv_val, bv->bv_len);
oc2learn->new_value[bv->bv_len] = '\0';
- slapi_log_error(SLAPI_LOG_REPL, "schema",
"supplier takes objectclass: %s\n", oc2learn->new_value);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"supplier takes objectclass: %s\n", oc2learn->new_value);
}
/* Free the remote schema list*/
schema_oclist_free(remote_oc_list);
} else {
/* If we can not build an objectclasses list */
- slapi_log_error(SLAPI_LOG_FATAL, "schema",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schema",
"Not able to build an objectclasses list from the consumer
schema\n");
}
@@ -7792,7 +7792,7 @@ supplier_get_new_definitions(struct berval **objectclasses, struct
berval **attr
at2learn->new_value = (char *) slapi_ch_malloc(bv->bv_len +
1);
memcpy(at2learn->new_value, bv->bv_val, bv->bv_len);
at2learn->new_value[bv->bv_len] = '\0';
- slapi_log_error(SLAPI_LOG_REPL, "schema",
"supplier takes attributetypes: %s\n", at2learn->new_value);
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema",
"supplier takes attributetypes: %s\n", at2learn->new_value);
}
/* Free the remote schema list */
@@ -7801,7 +7801,7 @@ supplier_get_new_definitions(struct berval **objectclasses, struct
berval **attr
/* If we can not build an attributes list from the mods, just skip
* it and look for objectclasses
*/
- slapi_log_error(SLAPI_LOG_FATAL, "schema",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schema",
"Not able to build an attributes list from the consumer
schema");
}
schema_dse_unlock();
diff --git a/ldap/servers/slapd/schemaparse.c b/ldap/servers/slapd/schemaparse.c
index b0968ea..86ba757 100644
--- a/ldap/servers/slapd/schemaparse.c
+++ b/ldap/servers/slapd/schemaparse.c
@@ -39,7 +39,7 @@ static PRStatus
oc_init_lock( void )
{
if ( NULL == ( oc_lock = slapi_new_rwlock())) {
- slapi_log_error( SLAPI_LOG_FATAL, "oc_init_lock",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "oc_init_lock",
"slapi_new_rwlock() for objectclass lock failed\n" );
return PR_FAILURE;
}
diff --git a/ldap/servers/slapd/search.c b/ldap/servers/slapd/search.c
index afd5d09..920d8fc 100644
--- a/ldap/servers/slapd/search.c
+++ b/ldap/servers/slapd/search.c
@@ -240,7 +240,7 @@ do_search( Slapi_PBlock *pb )
char *dummyary[2]; /* need a char ** for charray_merge_nodup */
if ((*(p + 1) == '\0') || (p == attrs[i]) || (strchr(p+1, '@'))) /*
e.g. "foo@" or "@objectclassname" or "foo@bar@baz" */
{
- slapi_log_error( SLAPI_LOG_ARGS, "do_search",
+ slapi_log_error(SLAPI_LOG_ARGS, LOG_DEBUG, "do_search",
"invalid attribute [%s] in list - must be of the form "
"attributename@objectclassname where attributename is the
"
"name of an attribute or \"*\" or \"+\"
and objectclassname "
@@ -295,7 +295,7 @@ do_search( Slapi_PBlock *pb )
strarray2str( attrs, abuf, sizeof( abuf ), 1 /* include quotes */);
astr = abuf;
}
- slapi_log_error( SLAPI_LOG_ARGS, NULL, "SRCH base=\"%s\" "
+ slapi_log_error(SLAPI_LOG_ARGS, LOG_DEBUG, NULL, "SRCH base=\"%s\"
"
"scope=%d deref=%d "
"sizelimit=%d timelimit=%d attrsonly=%d filter=\"%s\" "
"attrs=%s\n", base, scope, deref, sizelimit, timelimit,
diff --git a/ldap/servers/slapd/slapi-plugin.h b/ldap/servers/slapd/slapi-plugin.h
index 2dda7e3..88945ef 100644
--- a/ldap/servers/slapd/slapi-plugin.h
+++ b/ldap/servers/slapd/slapi-plugin.h
@@ -31,6 +31,7 @@ extern "C" {
#include "ldap.h"
#include "prprf.h"
#include "nspr.h"
+#include <syslog.h>
NSPR_API(PRUint32) PR_snprintf(char *out, PRUint32 outlen, const char *fmt, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 3, 4)));
@@ -6061,9 +6062,9 @@ int slapi_register_plugin_ext( const char *plugintype, int enabled,
/*
* logging
*/
-int slapi_log_error( int severity, char *subsystem, char *fmt, ... )
+int slapi_log_error( int loglevel, int severity, char *subsystem, char *fmt, ... )
#ifdef __GNUC__
- __attribute__ ((format (printf, 3, 4)));
+ __attribute__ ((format (printf, 4, 5)));
#else
;
#endif
diff --git a/ldap/servers/slapd/snmp_collator.c b/ldap/servers/slapd/snmp_collator.c
index 98cae86..81f932c 100644
--- a/ldap/servers/slapd/snmp_collator.c
+++ b/ldap/servers/slapd/snmp_collator.c
@@ -369,7 +369,7 @@ int snmp_collator_start()
{
if (err != EEXIST) /* Ignore if file already exists */
{
- slapi_log_error(SLAPI_LOG_FATAL, "snmp collator", "Failed to open
stats file (%s) "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "snmp collator", "Failed
to open stats file (%s) "
"(error %d): %s.\n", szStatsFile, err,
slapd_system_strerror(err));
exit(1);
}
@@ -494,7 +494,7 @@ snmp_collator_sem_wait(void)
int got_sem = 0;
if (SEM_FAILED == stats_sem) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"semaphore for stats file (%s) is not available.\n", szStatsFile);
return;
}
diff --git a/ldap/servers/slapd/ssl.c b/ldap/servers/slapd/ssl.c
index 2b35c5e..a57d68a 100644
--- a/ldap/servers/slapd/ssl.c
+++ b/ldap/servers/slapd/ssl.c
@@ -549,7 +549,7 @@ _conf_init_ciphers(void)
for (x = 0; implementedCiphers && (x < SSL_NumImplementedCiphers); x++) {
rc = SSL_GetCipherSuiteInfo(implementedCiphers[x], &info, sizeof info);
if (SECFailure == rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "SSL Initialization",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "SSL Initialization",
"Warning: failed to get the cipher suite info of cipher
ID %d\n",
implementedCiphers[x]);
continue;
@@ -600,7 +600,7 @@ _conf_setallciphers(int flag, char ***suplist, char ***unsuplist)
*/
rc = SSL_CipherPrefGetDefault(_conf_ciphers[x].num, &setme);
if (SECFailure == rc) {
- slapi_log_error(SLAPI_LOG_FATAL, "SSL Initialization",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "SSL
Initialization",
"Warning: failed to get the default state of cipher %s\n",
_conf_ciphers[x].name);
continue;
@@ -954,7 +954,7 @@ warn_if_no_cert_file(const char *dir, int no_log)
if (PR_SUCCESS != status) {
ret = 1;
if (!no_log) {
- slapi_log_error(SLAPI_LOG_FATAL, "SSL Initialization",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "SSL
Initialization",
"Warning: certificate DB file cert8.db nor cert7.db exists in
[%s] - "
"SSL initialization will likely fail\n", dir);
}
@@ -976,7 +976,7 @@ warn_if_no_key_file(const char *dir, int no_log)
if (PR_SUCCESS != status) {
ret = 1;
if (!no_log) {
- slapi_log_error(SLAPI_LOG_FATAL, "SSL Initialization",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "SSL Initialization",
"Warning: key DB file %s does not exist - SSL initialization will
"
"likely fail\n", filename);
}
@@ -1185,7 +1185,7 @@ slapd_nss_init(int init_ssl, int config_available)
(void) slapi_getSSLVersion_str(enabledNSSVersions.min, emin, sizeof(emin));
(void) slapi_getSSLVersion_str(enabledNSSVersions.max, emax, sizeof(emax));
- slapi_log_error(SLAPI_LOG_CONFIG, "SSL Initialization",
+ slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, "SSL Initialization",
"supported range by NSS: min: %s, max: %s\n",
emin, emax);
#endif
@@ -1211,7 +1211,7 @@ slapd_nss_init(int init_ssl, int config_available)
char *serveruser = "unknown";
serveruser = config_get_localuser();
- slapi_log_error(SLAPI_LOG_FATAL, "SSL Initialization",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "SSL Initialization",
"Warning: The key/cert database directory [%s] is not writable by "
"the server uid [%s]: initialization likely to fail.\n",
certdir, serveruser);
@@ -1445,7 +1445,7 @@ slapd_ssl_init()
#endif
if (slapd_pk11_authenticate(slot, PR_TRUE, NULL) != SECSuccess) {
errorCode = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_ssl_init",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_ssl_init",
"Unable to authenticate ("
SLAPI_COMPONENT_NAME_NSPR " error %d - %s)",
errorCode, slapd_pr_strerror(errorCode));
freeChildren(family_list);
@@ -1778,7 +1778,7 @@ slapd_ssl_init2(PRFileDesc **fd, int startTLS)
if(slapd_pk11_isFIPS()) {
if(slapd_pk11_authenticate(slot, PR_TRUE, NULL) != SECSuccess) {
errorCode = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_ssl_init2",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_ssl_init2",
"Unable to authenticate ("
SLAPI_COMPONENT_NAME_NSPR " error %d - %s)\n",
errorCode, slapd_pr_strerror(errorCode));
return -1;
@@ -1979,7 +1979,7 @@ slapd_ssl_init2(PRFileDesc **fd, int startTLS)
tmpDir = slapd_get_tmp_dir();
- slapi_log_error(SLAPI_LOG_TRACE,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG,
"slapd_ssl_init2", "tmp dir = %s\n", tmpDir);
rv = SSL_ConfigServerSessionIDCache(0, stimeout, stimeout, tmpDir);
@@ -2125,7 +2125,7 @@ slapd_ssl_init2(PRFileDesc **fd, int startTLS)
restrict_SSLVersionRange();
(void) slapi_getSSLVersion_str(slapdNSSVersions.min, mymin, sizeof(mymin));
(void) slapi_getSSLVersion_str(slapdNSSVersions.max, mymax, sizeof(mymax));
- slapi_log_error(SLAPI_LOG_FATAL, "SSL Initialization",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "SSL Initialization",
"Configured SSL version range: min: %s, max: %s\n",
mymin, mymax);
sslStatus = SSL_VersionRangeSet(pr_sock, &slapdNSSVersions);
@@ -2495,6 +2495,7 @@ char* slapd_get_tmp_dir()
{
slapi_log_error(
SLAPI_LOG_FATAL,
+ LOG_ERR,
"slapd_get_tmp_dir",
"config_get_tmpdir returns NULL Setting tmp dir to default\n");
@@ -2507,12 +2508,14 @@ char* slapd_get_tmp_dir()
if (errno == EEXIST) {
slapi_log_error(
SLAPI_LOG_TRACE,
+ LOG_DEBUG,
"slapd_get_tmp_dir",
"mkdir(%s, 00770) - already exists\n",
tmpdir);
} else {
slapi_log_error(
SLAPI_LOG_FATAL,
+ LOG_DEBUG,
"slapd_get_tmp_dir",
"mkdir(%s, 00770) Error: %s\n",
tmpdir, strerror(errno));
@@ -2532,7 +2535,7 @@ slapd_get_unlocked_key_for_cert(CERTCertificate *cert, void
*pin_arg)
if (!slotlist) {
PRErrorCode errcode = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_get_unlocked_key_for_cert",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_get_unlocked_key_for_cert",
"Error: cannot get slot list for certificate [%s] (%d: %s)\n",
certsubject, errcode, slapd_pr_strerror(errcode));
return key;
@@ -2543,25 +2546,25 @@ slapd_get_unlocked_key_for_cert(CERTCertificate *cert, void
*pin_arg)
const char *slotname = (slot && PK11_GetSlotName(slot)) ?
PK11_GetSlotName(slot) : "unknown slot";
const char *tokenname = (slot && PK11_GetTokenName(slot)) ?
PK11_GetTokenName(slot) : "unknown token";
if (!slot) {
- slapi_log_error(SLAPI_LOG_TRACE, "slapd_get_unlocked_key_for_cert",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG,
"slapd_get_unlocked_key_for_cert",
"Missing slot for slot list element for certificate [%s]\n",
certsubject);
} else if (!PK11_NeedLogin(slot) || PK11_IsLoggedIn(slot, pin_arg)) {
key = PK11_FindKeyByDERCert(slot, cert, pin_arg);
- slapi_log_error(SLAPI_LOG_TRACE, "slapd_get_unlocked_key_for_cert",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG,
"slapd_get_unlocked_key_for_cert",
"Found unlocked slot [%s] token [%s] for certificate [%s]\n",
slotname, tokenname, certsubject);
break;
} else {
PRErrorCode errcode = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_get_unlocked_key_for_cert",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"slapd_get_unlocked_key_for_cert",
"Skipping locked slot [%s] token [%s] for certificate [%s] (%d - %s)\n",
slotname, tokenname, certsubject, errcode, slapd_pr_strerror(errcode));
}
}
if (!key) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_get_unlocked_key_for_cert",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_get_unlocked_key_for_cert",
"Error: could not find any unlocked slots for certificate [%s]. "
"Please review your TLS/SSL configuration. The following slots
were found:\n",
certsubject);
@@ -2569,7 +2572,7 @@ slapd_get_unlocked_key_for_cert(CERTCertificate *cert, void
*pin_arg)
PK11SlotInfo *slot = sle->slot;
const char *slotname = (slot && PK11_GetSlotName(slot)) ?
PK11_GetSlotName(slot) : "unknown slot";
const char *tokenname = (slot && PK11_GetTokenName(slot)) ?
PK11_GetTokenName(slot) : "unknown token";
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_get_unlocked_key_for_cert",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"slapd_get_unlocked_key_for_cert",
"Slot [%s] token [%s] was locked.\n",
slotname, tokenname);
}
@@ -2618,18 +2621,18 @@ listCerts(CERTCertDBHandle *handle, CERTCertificate *cert,
PK11SlotInfo *slot,
char *name = NULL;
if (!cert) {
- slapi_log_error(SLAPI_LOG_FATAL, "listCerts", "No cert
given\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "listCerts", "No cert
given\n");
return rv;
}
name = cert->nickname;
if (!name) {
- slapi_log_error(SLAPI_LOG_FATAL, "listCerts", "No cert
nickname\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "listCerts", "No cert
nickname\n");
return rv;
}
the_cert = CERT_FindCertByNicknameOrEmailAddr(handle, name);
if (!the_cert) {
- slapi_log_error(SLAPI_LOG_FATAL, "listCerts", "Could not find
cert: %s\n", name);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "listCerts", "Could not
find cert: %s\n", name);
return SECFailure;
}
@@ -2644,7 +2647,7 @@ listCerts(CERTCertDBHandle *handle, CERTCertificate *cert,
PK11SlotInfo *slot,
PR_Now(), PR_FALSE);
CERT_DestroyCertificate(the_cert);
if (!certs) {
- slapi_log_error(SLAPI_LOG_FATAL, "listCerts", "problem printing
certificates");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "listCerts", "problem
printing certificates");
return SECFailure;
}
for (node = CERT_LIST_HEAD(certs); !CERT_LIST_END(node,certs); node =
CERT_LIST_NEXT(node)) {
@@ -2662,7 +2665,7 @@ listCerts(CERTCertDBHandle *handle, CERTCertificate *cert,
PK11SlotInfo *slot,
CERT_DestroyCertList(certs);
}
if (rv) {
- slapi_log_error(SLAPI_LOG_FATAL, "listCerts", "problem printing
certificate nicknames");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "listCerts", "problem
printing certificate nicknames");
return SECFailure;
}
@@ -2717,7 +2720,7 @@ slapd_extract_cert(Slapi_Entry *entry, int isCA)
char *personality = NULL;
if (!entry) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_cert",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_cert",
"No entry is given for %s Cert.\n",
isCA?"CA":"Server");
goto bail;
}
@@ -2747,7 +2750,7 @@ slapd_extract_cert(Slapi_Entry *entry, int isCA)
(trust.sslFlags &
(CERTDB_VALID_CA|CERTDB_TRUSTED_CA|CERTDB_TRUSTED_CLIENT_CA))) {
/* default token "internal" */
PK11SlotInfo *slot = slapd_pk11_getInternalKeySlot();
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_cert", "CA
CERT NAME: %s\n", cert->nickname);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_cert",
"CA CERT NAME: %s\n", cert->nickname);
if (!certfile) {
char buf[BUFSIZ];
certfile = slapi_ch_smprintf("%s/%s%s", certdir,
@@ -2759,14 +2762,14 @@ slapd_extract_cert(Slapi_Entry *entry, int isCA)
outFile = PR_Open(certfile, PR_CREATE_FILE | PR_RDWR | PR_TRUNCATE,
00660);
}
if (!outFile) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_cert",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"slapd_extract_cert",
"Unable to open \"%s\" for writing
(%d, %d).\n",
certfile, PR_GetError(), PR_GetOSError());
goto bail;
}
rv = listCerts(certHandle, cert, slot, outFile, NULL);
if (rv) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_cert",
"listCerts failed\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"slapd_extract_cert", "listCerts failed\n");
break;
}
}
@@ -2774,7 +2777,7 @@ slapd_extract_cert(Slapi_Entry *entry, int isCA)
default:
if (!PL_strcmp(cert->nickname, personality)) {
PK11SlotInfo *slot = slapd_pk11_getInternalKeySlot();
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_cert",
"SERVER CERT NAME: %s\n", cert->nickname);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_cert",
"SERVER CERT NAME: %s\n", cert->nickname);
if (!certfile) {
char buf[BUFSIZ];
certfile = slapi_ch_smprintf("%s/%s%s", certdir,
@@ -2784,14 +2787,14 @@ slapd_extract_cert(Slapi_Entry *entry, int isCA)
outFile = PR_Open(certfile, PR_CREATE_FILE | PR_RDWR | PR_TRUNCATE,
00660);
}
if (!outFile) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_cert",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"slapd_extract_cert",
"Unable to open \"%s\" for writing
(%d, %d).\n",
certfile, PR_GetError(), PR_GetOSError());
goto bail;
}
rv = listCerts(certHandle, cert, slot, outFile, NULL);
if (rv) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_cert",
"listCerts failed\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"slapd_extract_cert", "listCerts failed\n");
}
PR_Close(outFile);
outFile = NULL;
@@ -2842,7 +2845,7 @@ extractRSAKeysAndSubject(
CERTCertificate *cert = PK11_FindCertFromNickname((char *)nickname, NULL);
if (!cert) {
rv = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, "extractRSAKeysAndSubject",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "extractRSAKeysAndSubject",
"Failed extract cert with %s, (%d-%s, %d).\n",
nickname, rv, slapd_pr_strerror(rv), PR_GetOSError());
goto bail;
@@ -2851,7 +2854,7 @@ extractRSAKeysAndSubject(
*pubkey = CERT_ExtractPublicKey(cert);
if (!*pubkey) {
rv = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, "extractRSAKeysAndSubject",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "extractRSAKeysAndSubject",
"Could not get public key from cert for %s, (%d-%s,
%d)\n",
nickname, rv, slapd_pr_strerror(rv), PR_GetOSError());
goto bail;
@@ -2860,13 +2863,13 @@ extractRSAKeysAndSubject(
*privkey = PK11_FindKeyByDERCert(slot, cert, pwdata);
if (!*privkey) {
rv = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, "extractRSAKeysAndSubject",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "extractRSAKeysAndSubject",
"Unable to find the key with PK11_FindKeyByDERCert for %s,
(%d-%s, %d)\n",
nickname, rv, slapd_pr_strerror(rv), PR_GetOSError());
*privkey= PK11_FindKeyByAnyCert(cert, &pwdata);
if (!*privkey) {
rv = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, "extractRSAKeysAndSubject",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"extractRSAKeysAndSubject",
"Unable to find the key with PK11_FindKeyByAnyCert for
%s, (%d-%s, %d)\n",
nickname, rv, slapd_pr_strerror(rv), PR_GetOSError());
goto bail;
@@ -2877,7 +2880,7 @@ extractRSAKeysAndSubject(
*subject = CERT_AsciiToName(cert->subjectName);
if (!*subject) {
- slapi_log_error(SLAPI_LOG_FATAL, "extractRSAKeysAndSubject",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "extractRSAKeysAndSubject",
"Improperly formatted name: \"%s\"\n",
cert->subjectName);
goto bail;
@@ -2996,25 +2999,25 @@ slapd_extract_key(Slapi_Entry *entry, char *token, PK11SlotInfo
*slot)
#endif
if (!entry) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_key",
"No entry is given for Server Key.\n");
goto bail;
}
#if defined(ENCRYPTEDKEY)
if (!token) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_key",
"No token is given.\n");
goto bail;
}
StdPinObj = (SVRCOREStdPinObj *)SVRCORE_GetRegisteredPinObj();
if (!StdPinObj) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_key",
"No entry is given for Server Key.\n");
goto bail;
}
err = SVRCORE_StdPinGetPin(&keyEncPwd, StdPinObj, token);
if (err || !keyEncPwd) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_key",
"Failed to extract pw with token %s.\n", token);
goto bail;
}
@@ -3028,7 +3031,7 @@ slapd_extract_key(Slapi_Entry *entry, char *token, PK11SlotInfo
*slot)
*/
rv = PK11_GenerateRandom(randomPassword, sizeof(randomPassword) - 1);
if (rv != SECSuccess) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_key", "Failed to
generate random.\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_key",
"Failed to generate random.\n");
goto bail;
}
pwitem.data = randomPassword;
@@ -3040,7 +3043,7 @@ slapd_extract_key(Slapi_Entry *entry, char *token, PK11SlotInfo
*slot)
KeyExtractFile = slapi_entry_attr_get_charptr(entry,
"ServerKeyExtractFile");
personality = slapi_entry_attr_get_charptr(entry, "nsSSLPersonalitySSL" );
if (!personality) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_key",
"nsSSLPersonalitySSL value not found.\n");
goto bail;
}
@@ -3053,7 +3056,7 @@ slapd_extract_key(Slapi_Entry *entry, char *token, PK11SlotInfo
*slot)
}
outFile = PR_Open(keyfile, PR_CREATE_FILE | PR_RDWR | PR_TRUNCATE, 00660);
if (!outFile) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_key",
"Unable to open \"%s\" for writing (%d,
%d).\n",
keyfile, PR_GetError(), PR_GetOSError());
goto bail;
@@ -3061,10 +3064,10 @@ slapd_extract_key(Slapi_Entry *entry, char *token, PK11SlotInfo
*slot)
rv = extractRSAKeysAndSubject(personality, slot, &pwdata, &privkey,
&pubkey, &subject);
if (rv != SECSuccess) {
#if defined(ENCRYPTEDKEY)
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_key",
"Failed to extract keys for \"%s\".\n",
token);
#else
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_key", "Failed to
extract keys for %s.\n", personality);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_key",
"Failed to extract keys for %s.\n", personality);
#endif
goto bail;
}
@@ -3075,7 +3078,7 @@ slapd_extract_key(Slapi_Entry *entry, char *token, PK11SlotInfo
*slot)
*/
epki = PK11_ExportEncryptedPrivKeyInfo(NULL, SEC_OID_DES_EDE3_CBC, &pwitem,
privkey, 1000, &pwdata);
if (!epki) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_key",
"Unable to export encrypted private key (%d, %d).\n",
PR_GetError(), PR_GetOSError());
goto bail;
@@ -3085,7 +3088,7 @@ slapd_extract_key(Slapi_Entry *entry, char *token, PK11SlotInfo
*slot)
/* NULL dest to let it allocate memory for us */
encryptedKeyDER = SEC_ASN1EncodeItem(arenaForEPKI, NULL, epki,
SECKEY_EncryptedPrivateKeyInfoTemplate);
if (!encryptedKeyDER) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_key",
"SEC_ASN1EncodeItem failed. (%d, %d).\n",
PR_GetError(), PR_GetOSError());
goto bail;
}
@@ -3093,7 +3096,7 @@ slapd_extract_key(Slapi_Entry *entry, char *token, PK11SlotInfo
*slot)
/* Make a decrypted key the one to write out. */
arenaForPKI = PORT_NewArena(2048);
if (!arenaForPKI) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_key",
"PORT_NewArena failed. (%d, %d).\n", PR_GetError(),
PR_GetOSError());
goto bail;
}
@@ -3103,7 +3106,7 @@ slapd_extract_key(Slapi_Entry *entry, char *token, PK11SlotInfo
*slot)
rv = DecryptKey(epki, SEC_OID_DES_EDE3_CBC, &pwitem, &pwdata,
&clearKeyDER);
if (rv != SECSuccess) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_key",
"DekryptKey failed. (%d, %d).\n", PR_GetError(),
PR_GetOSError());
goto bail;
}
@@ -3116,7 +3119,7 @@ slapd_extract_key(Slapi_Entry *entry, char *token, PK11SlotInfo
*slot)
b64 = BTOA_ConvertItemToAscii(&clearKeyDER);
#endif
if (!b64) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_key",
"Failed to conver to the ASCII (%d, %d).\n",
PR_GetError(), PR_GetOSError());
goto bail;
@@ -3131,7 +3134,7 @@ slapd_extract_key(Slapi_Entry *entry, char *token, PK11SlotInfo
*slot)
#endif
numBytes = PR_Write(outFile, b64, total);
if (numBytes != total) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_key",
"Failed to write to the file (%d, %d).\n",
PR_GetError(), PR_GetOSError());
goto bail;
diff --git a/ldap/servers/slapd/start_tls_extop.c b/ldap/servers/slapd/start_tls_extop.c
index af8d8f7..4401bd6 100644
--- a/ldap/servers/slapd/start_tls_extop.c
+++ b/ldap/servers/slapd/start_tls_extop.c
@@ -55,19 +55,19 @@ start_tls_io_enable(Connection *c, void *data /* UNUSED */)
ssl_listensocket = get_ssl_listener_fd();
if ( ssl_listensocket == (PRFileDesc *) NULL ) {
- slapi_log_error( SLAPI_LOG_FATAL, "start_tls",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "start_tls",
"SSL listener socket not found.\n" );
goto done;
}
newsocket = slapd_ssl_importFD( ssl_listensocket, c->c_prfd );
if ( newsocket == (PRFileDesc *) NULL ) {
- slapi_log_error( SLAPI_LOG_FATAL, "start_tls",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "start_tls",
"SSL socket import failed.\n" );
goto done;
}
} else {
if ( slapd_ssl_init2( &c->c_prfd, 1 ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, "start_tls",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "start_tls",
"SSL socket import or configuration failed.\n" );
goto done;
}
@@ -77,7 +77,7 @@ start_tls_io_enable(Connection *c, void *data /* UNUSED */)
rv = slapd_ssl_resetHandshake( newsocket, 1 );
if ( rv != SECSuccess ) {
- slapi_log_error( SLAPI_LOG_FATAL, "start_tls",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "start_tls",
"Unable to set socket ready for SSL handshake.\n" );
goto done;
}
@@ -100,7 +100,7 @@ start_tls_io_enable(Connection *c, void *data /* UNUSED */)
if ( rv < 0 ) {
PRErrorCode prerr = PR_GetError();
- slapi_log_error( SLAPI_LOG_FATAL, "start_tls",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "start_tls",
"SSL_HandshakeCallback() %d " SLAPI_COMPONENT_NAME_NSPR " error %d
(%s)\n",
rv, prerr, slapd_pr_strerror( prerr ) );
}
@@ -109,7 +109,7 @@ start_tls_io_enable(Connection *c, void *data /* UNUSED */)
rv = slapd_ssl_badCertHook (c->c_prfd, (void *)handle_bad_certificate, c);
if ( rv < 0 ) {
PRErrorCode prerr = PR_GetError();
- slapi_log_error( SLAPI_LOG_FATAL, "start_tls",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "start_tls",
"SSL_BadCertHook(%i) %i " SLAPI_COMPONENT_NAME_NSPR " error %d
(%s)\n",
c->c_sd, rv, prerr, slapd_pr_strerror( prerr ) );
}
@@ -134,7 +134,7 @@ start_tls( Slapi_PBlock *pb )
* The only requirement is to set the LDAP OID of the extended response to the
START_TLS_OID. */
if ( slapi_pblock_set( pb, SLAPI_EXT_OP_RET_OID, START_TLS_OID ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "start_tls",
"Could not set extended response oid.\n" );
slapi_send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL,
"Could not set extended response oid.", 0, NULL );
@@ -147,24 +147,24 @@ start_tls( Slapi_PBlock *pb )
* match this very plugin's OID: START_TLS_OID. */
if ( slapi_pblock_get( pb, SLAPI_EXT_OP_REQ_OID, &oid ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "start_tls",
"Could not get OID value from request.\n" );
slapi_send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL,
"Could not get OID value from request.", 0, NULL );
return( SLAPI_PLUGIN_EXTENDED_SENT_RESULT );
} else {
- slapi_log_error( SLAPI_LOG_PLUGIN, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "start_tls",
"Received extended operation request with OID %s\n", oid );
}
if ( strcasecmp( oid, START_TLS_OID ) != 0) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "start_tls",
"Request OID does not match Start TLS OID.\n" );
slapi_send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL,
"Request OID does not match Start TLS OID.", 0, NULL );
return( SLAPI_PLUGIN_EXTENDED_SENT_RESULT );
} else {
- slapi_log_error( SLAPI_LOG_PLUGIN, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "start_tls",
"Start TLS extended operation request confirmed.\n" );
}
@@ -175,7 +175,7 @@ start_tls( Slapi_PBlock *pb )
PR_EnterMonitor(conn->c_mutex);
/* cannot call slapi_send_ldap_result with mutex locked - will deadlock if ber_flush
returns error */
if ( conn->c_prfd == (PRFileDesc *) NULL ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "start_tls",
"Connection socket not available.\n" );
ldaprc = LDAP_UNAVAILABLE;
ldapmsg = "Connection socket not available.";
@@ -185,7 +185,7 @@ start_tls( Slapi_PBlock *pb )
/* Check whether the Start TLS request can be accepted. */
if ( connection_operations_pending( conn, pb->pb_op,
1 /* check for ops where result not yet sent */ )) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "start_tls",
"Other operations are still pending on the connection.\n" );
ldaprc = LDAP_OPERATIONS_ERROR;
ldapmsg = "Other operations are still pending on the connection.";
@@ -196,7 +196,7 @@ start_tls( Slapi_PBlock *pb )
if ( !config_get_security() ) {
/* if any, here is where the referral to another SSL supporting server should be
done: */
/* slapi_send_ldap_result( pb, LDAP_REFERRAL, NULL, msg, 0, url ); */
- slapi_log_error( SLAPI_LOG_PLUGIN, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "start_tls",
"SSL not supported by this server.\n" );
ldaprc = LDAP_PROTOCOL_ERROR;
ldapmsg = "SSL not supported by this server.";
@@ -205,7 +205,7 @@ start_tls( Slapi_PBlock *pb )
if ( conn->c_flags & CONN_FLAG_SSL ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "start_tls",
"SSL connection already established.\n" );
ldaprc = LDAP_OPERATIONS_ERROR;
ldapmsg = "SSL connection already established.";
@@ -213,7 +213,7 @@ start_tls( Slapi_PBlock *pb )
}
if ( conn->c_flags & CONN_FLAG_SASL_CONTINUE ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "start_tls",
"SASL multi-stage bind in progress.\n" );
ldaprc = LDAP_OPERATIONS_ERROR;
ldapmsg = "SASL multi-stage bind in progress.";
@@ -221,7 +221,7 @@ start_tls( Slapi_PBlock *pb )
}
if ( conn->c_flags & CONN_FLAG_CLOSING ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "start_tls",
"Connection being closed at this moment.\n" );
ldaprc = LDAP_UNAVAILABLE;
ldapmsg = "Connection being closed at this moment.";
@@ -232,7 +232,7 @@ start_tls( Slapi_PBlock *pb )
* So, we may as well try initialising SSL. */
if ( slapd_security_library_is_initialized() == 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "start_tls",
"NSS libraries not initialised.\n" );
ldaprc = LDAP_UNAVAILABLE;
ldapmsg = "NSS libraries not initialised.";
@@ -279,7 +279,7 @@ start_tls_graceful_closure( Connection *c, Slapi_PBlock * pb, int
is_initiator )
pblock->pb_op = c->c_ops;
set_db_default_result_handlers( pblock );
if ( slapi_pblock_set( pblock, SLAPI_EXT_OP_RET_OID, START_TLS_OID ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "start_tls",
"Could not set extended response oid.\n" );
slapi_send_ldap_result( pblock, LDAP_OPERATIONS_ERROR, NULL,
"Could not set extended response oid.", 0, NULL );
@@ -293,12 +293,12 @@ start_tls_graceful_closure( Connection *c, Slapi_PBlock * pb, int
is_initiator )
*/
while ( connection_operations_pending( c, pblock->pb_op,
0 /* wait for all other ops to full complete */ )) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "start_tls",
"Still %d operations to be completed before closing the SSL
connection.\n",
c->c_refcnt - 1 );
}
- slapi_log_error( SLAPI_LOG_PLUGIN, "start_tls_graceful_closure",
"SSL_CLOSE_NOTIFY_ALERT\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "start_tls_graceful_closure",
"SSL_CLOSE_NOTIFY_ALERT\n" );
/* An SSL close_notify alert should be sent to the client. However, the NSS API
* doesn't provide us with anything alike.
@@ -380,19 +380,19 @@ int start_tls_init( Slapi_PBlock *pb )
*/
if ( slapi_pblock_get( pb, SLAPI_PLUGIN_ARGV, &argv ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "start_tls_init", "Could not
get argv\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "start_tls_init",
"Could not get argv\n" );
return( -1 );
}
/* Compare the OID specified in the configuration file against the Start TLS OID. */
if ( argv == NULL || strcmp( argv[0], START_TLS_OID ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "start_tls_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "start_tls_init",
"OID is missing or is not %s\n", START_TLS_OID );
return( -1 );
} else {
oid = slapi_ch_strdup( argv[0] );
- slapi_log_error( SLAPI_LOG_PLUGIN, "start_tls_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "start_tls_init",
"Registering plug-in for Start TLS extended op %s.\n", oid );
slapi_ch_free_string( &oid );
}
@@ -407,7 +407,7 @@ int start_tls_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_OIDLIST, start_tls_oid_list ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_NAMELIST, start_tls_name_list ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "start_tls_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "start_tls_init",
"Failed to set plug-in version, function, and OID.\n" );
return( -1 );
}
diff --git a/ldap/servers/slapd/str2filter.c b/ldap/servers/slapd/str2filter.c
index ae5a577..2936719 100644
--- a/ldap/servers/slapd/str2filter.c
+++ b/ldap/servers/slapd/str2filter.c
@@ -47,28 +47,28 @@ slapi_str2filter( char *str )
str++;
switch ( *str ) {
case '&':
- LDAPDebug0Args(LDAP_DEBUG_FILTER, "slapi_str2filter: AND\n");
+ LDAPDebug0Args(LDAP_DEBUG_FILTER, LOG_DEBUG, "slapi_str2filter: AND\n");
str++;
f = str2list( str, LDAP_FILTER_AND );
break;
case '|':
- LDAPDebug0Args(LDAP_DEBUG_FILTER, "put_filter: OR\n");
+ LDAPDebug0Args(LDAP_DEBUG_FILTER, LOG_DEBUG, "put_filter: OR\n");
str++;
f = str2list( str, LDAP_FILTER_OR );
break;
case '!':
- LDAPDebug0Args(LDAP_DEBUG_FILTER, "put_filter: NOT\n");
+ LDAPDebug0Args(LDAP_DEBUG_FILTER, LOG_DEBUG, "put_filter: NOT\n");
str++;
f = str2list( str, LDAP_FILTER_NOT );
break;
default:
- LDAPDebug0Args(LDAP_DEBUG_FILTER, "slapi_str2filter: simple\n");
+ LDAPDebug0Args(LDAP_DEBUG_FILTER, LOG_DEBUG, "slapi_str2filter: simple\n");
f = str2simple( str , 1 /* unescape_filter */);
break;
@@ -77,7 +77,7 @@ slapi_str2filter( char *str )
break;
default: /* assume it's a simple type=value filter */
- LDAPDebug0Args(LDAP_DEBUG_FILTER, "slapi_str2filter: default\n");
+ LDAPDebug0Args(LDAP_DEBUG_FILTER, LOG_DEBUG, "slapi_str2filter: default\n");
f = str2simple( str , 1 /* unescape_filter */);
break;
diff --git a/ldap/servers/slapd/task.c b/ldap/servers/slapd/task.c
index 08a6247..e785a7b 100644
--- a/ldap/servers/slapd/task.c
+++ b/ldap/servers/slapd/task.c
@@ -471,7 +471,7 @@ slapi_plugin_task_register_handler(const char *name, dseCallbackFn
func, Slapi_P
dn = slapi_create_dn_string("cn=%s,%s", name, TASK_BASE_DN);
if (NULL == dn) {
- LDAPDebug1Arg( LDAP_DEBUG_ANY,
+ LDAPDebug1Arg( LDAP_DEBUG_ANY, LOG_ERR,
"slapi_task_register_handler: "
"failed to create task dn for %s\n", name);
return ret;
@@ -571,7 +571,7 @@ new_task(const char *rawdn, void *plugin)
dn = slapi_create_dn_string("%s", rawdn);
if (NULL == dn) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
"new_task failed: invalid task dn: %s\n", rawdn);
return NULL;
}
@@ -2099,7 +2099,7 @@ fixup_tombstone(Slapi_PBlock *pb, char *suffix, Slapi_Entry *e, int
*fixup_count
int rc = LDAP_SUCCESS;
if((tombstone_csn = entry_get_deletion_csn(e))){
- slapi_log_error(SLAPI_LOG_REPL, TASK_TOMBSTONE_FIXUP,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, TASK_TOMBSTONE_FIXUP,
"Fixing tombstone (%s)\n", slapi_entry_get_dn(e));
/* We have an entry tombstone that needs fixing */
@@ -2141,7 +2141,7 @@ strip_tombstone(Slapi_PBlock *pb, char *suffix, Slapi_Entry *e, int
*strip_count
LDAPMod *mods[2];
int rc = 0;
- slapi_log_error(SLAPI_LOG_REPL, TASK_TOMBSTONE_FIXUP,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, TASK_TOMBSTONE_FIXUP,
"Stripping tombstone (%s)\n", slapi_entry_get_dn(e));
/* We have an entry tombstone that needs stripping */
@@ -2164,7 +2164,7 @@ strip_tombstone(Slapi_PBlock *pb, char *suffix, Slapi_Entry *e, int
*strip_count
if(rc == LDAP_SUCCESS){
(*strip_count)++;
} else {
- slapi_log_error(SLAPI_LOG_REPL, TASK_TOMBSTONE_FIXUP,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, TASK_TOMBSTONE_FIXUP,
"Stripping tombstone (%s) failed, error %d\n",
slapi_entry_get_dn(e), rc);
}
}
@@ -2194,11 +2194,11 @@ task_fixup_tombstone_thread(void *arg)
return; /* no task */
}
slapi_task_inc_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, TASK_TOMBSTONE_FIXUP,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, TASK_TOMBSTONE_FIXUP,
"fixup_tombstone_task_thread --> refcount
incremented.\n" );
slapi_task_begin(task, 1);
slapi_task_log_notice(task, "Beginning tombstone fixup task...\n");
- slapi_log_error(SLAPI_LOG_REPL, TASK_TOMBSTONE_FIXUP,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, TASK_TOMBSTONE_FIXUP,
"Beginning tombstone fixup task...\n");
if(task_data->stripcsn){
@@ -2228,7 +2228,7 @@ task_fixup_tombstone_thread(void *arg)
if (rc != LDAP_SUCCESS) {
slapi_task_log_notice(task,
"Failed to search backend for tombstones, error %d\n",
rc);
- slapi_log_error(SLAPI_LOG_REPL, TASK_TOMBSTONE_FIXUP,
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, TASK_TOMBSTONE_FIXUP,
"Failed to search backend for tombstones, error %d\n",
rc);
slapi_pblock_destroy(search_pb);
goto bail;
@@ -2248,7 +2248,7 @@ task_fixup_tombstone_thread(void *arg)
slapi_task_log_notice(task,
"Failed to update tombstone entry (%s) error %d\n",
slapi_entry_get_dn(entries[j]), rc);
- slapi_log_error(SLAPI_LOG_FATAL, TASK_TOMBSTONE_FIXUP,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, TASK_TOMBSTONE_FIXUP,
"Failed to update tombstone entry (%s) error
%d\n",
slapi_entry_get_dn(entries[j]), rc);
}
@@ -2261,13 +2261,13 @@ task_fixup_tombstone_thread(void *arg)
}
slapi_task_log_notice(task, "%s %d tombstones.\n",
task_data->stripcsn ? "Stripped" :
"Fixed", fixup_count);
- slapi_log_error(SLAPI_LOG_REPL, TASK_TOMBSTONE_FIXUP, "%s %d
tombstones.\n",
+ slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, TASK_TOMBSTONE_FIXUP, "%s %d
tombstones.\n",
task_data->stripcsn ? "Stripped" : "Fixed",
fixup_count);
slapi_task_inc_progress(task);
bail:
slapi_task_finish(task, rc);
slapi_task_dec_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, TASK_TOMBSTONE_FIXUP,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, TASK_TOMBSTONE_FIXUP,
"fixup_tombstone_task_thread <-- refcount
decremented.\n" );
}
@@ -2412,7 +2412,7 @@ done:
static void
fixup_tombstone_task_destructor(Slapi_Task *task)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, TASK_TOMBSTONE_FIXUP,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, TASK_TOMBSTONE_FIXUP,
"fixup_tombstone_task_destructor -->\n" );
if (task) {
struct task_tombstone_data *mydata = (struct task_tombstone_data
*)slapi_task_get_data(task);
@@ -2425,7 +2425,7 @@ fixup_tombstone_task_destructor(Slapi_Task *task)
slapi_ch_free((void **)&mydata);
}
}
- slapi_log_error(SLAPI_LOG_PLUGIN, TASK_TOMBSTONE_FIXUP,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, TASK_TOMBSTONE_FIXUP,
"fixup_tombstone_task_destructor <--\n" );
}
@@ -2503,7 +2503,7 @@ task_des2aes(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter,
if (thread == NULL) {
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE,
"unable to create des2aes thread!\n");
- slapi_log_error(SLAPI_LOG_FATAL, TASK_DES2AES,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, TASK_DES2AES,
"unable to create des2aes thread!\n");
*returncode = LDAP_OPERATIONS_ERROR;
slapi_task_finish(task, *returncode);
@@ -2576,7 +2576,7 @@ task_des2aes_thread(void *arg)
struct suffixlist *list;
char *cookie = NULL;
- slapi_log_error(SLAPI_LOG_FATAL, TASK_DES2AES,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, TASK_DES2AES,
"Checking for DES passwords to convert to AES...\n");
slapi_task_log_notice(task,
"Checking for DES passwords to convert to AES...\n");
@@ -2620,7 +2620,7 @@ task_des2aes_thread(void *arg)
slapi_search_internal_pb(pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
if (LDAP_SUCCESS != result) {
- slapi_log_error(SLAPI_LOG_FATAL, "convert_pbe_des_to_aes:
",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
"convert_pbe_des_to_aes: ",
"Failed to search for password attribute (%s) error (%d),
skipping suffix (%s)\n",
attrs[i], result, backends[be_idx]);
slapi_task_log_notice(task,
@@ -2647,7 +2647,7 @@ task_des2aes_thread(void *arg)
/* Decode the DES password */
if(pw_rever_decode(val, &passwd, attrs[i]) == -1){
- slapi_log_error(SLAPI_LOG_FATAL, TASK_DES2AES,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, TASK_DES2AES,
"Failed to decode existing DES password for
(%s)\n",
slapi_entry_get_dn(entries[ii]));
slapi_task_log_notice(task,
@@ -2660,7 +2660,7 @@ task_des2aes_thread(void *arg)
/* Encode the password */
sval = slapi_value_new_string(passwd);
if(pw_rever_encode(&sval, attrs[i]) == -1){
- slapi_log_error(SLAPI_LOG_FATAL, TASK_DES2AES,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, TASK_DES2AES,
"failed to encode AES password for
(%s)\n",
slapi_entry_get_dn(entries[ii]));
slapi_task_log_notice(task,
@@ -2688,7 +2688,7 @@ task_des2aes_thread(void *arg)
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT,
&result);
if (LDAP_SUCCESS != result) {
- slapi_log_error(SLAPI_LOG_FATAL, TASK_DES2AES,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, TASK_DES2AES,
"Failed to convert password for (%s) error
(%d)\n",
slapi_entry_get_dn(entries[ii]), result);
slapi_task_log_notice(task,
@@ -2696,7 +2696,7 @@ task_des2aes_thread(void *arg)
slapi_entry_get_dn(entries[ii]), result);
rc = 1;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, TASK_DES2AES,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, TASK_DES2AES,
"Successfully converted password for
(%s)\n",
slapi_entry_get_dn(entries[ii]));
slapi_task_log_notice(task,
@@ -2718,23 +2718,23 @@ task_des2aes_thread(void *arg)
slapi_ch_free_string(&filter);
}
if (!converted_des_passwd){
- slapi_log_error(SLAPI_LOG_FATAL, TASK_DES2AES,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, TASK_DES2AES,
"No DES passwords found to convert.\n");
slapi_task_log_notice(task, "No DES passwords found to
convert.\n");
}
} else {
/* No AES/DES */
if (!have_des){
- slapi_log_error(SLAPI_LOG_FATAL, TASK_DES2AES,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, TASK_DES2AES,
"DES plugin not enabled\n");
slapi_task_log_notice(task, "DES plugin not enabled\n");
}
if (!have_aes){
- slapi_log_error(SLAPI_LOG_FATAL, TASK_DES2AES,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, TASK_DES2AES,
"AES plugin not enabled\n");
slapi_task_log_notice(task, "AES plugin not enabled\n");
}
- slapi_log_error(SLAPI_LOG_FATAL, TASK_DES2AES,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, TASK_DES2AES,
"Unable to convert passwords\n");
slapi_task_log_notice(task, "Unable to convert passwords\n");
rc = 1;
@@ -2751,7 +2751,7 @@ done:
static void
des2aes_task_destructor(Slapi_Task *task)
{
- slapi_log_error(SLAPI_LOG_TRACE, TASK_DES2AES,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, TASK_DES2AES,
"des2aes_task_destructor -->\n" );
if (task) {
struct task_des2aes_data *task_data = (struct task_des2aes_data
*)slapi_task_get_data(task);
@@ -2764,7 +2764,7 @@ des2aes_task_destructor(Slapi_Task *task)
slapi_ch_free((void **)&task_data);
}
}
- slapi_log_error(SLAPI_LOG_TRACE, TASK_DES2AES,
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, TASK_DES2AES,
"des2aes_task_destructor <--\n" );
}
diff --git a/ldap/servers/slapd/test-plugins/sampletask.c
b/ldap/servers/slapd/test-plugins/sampletask.c
index 14922da..5e9d053 100644
--- a/ldap/servers/slapd/test-plugins/sampletask.c
+++ b/ldap/servers/slapd/test-plugins/sampletask.c
@@ -101,7 +101,7 @@ task_sampletask_thread(void *arg)
/* update task state to show it's running */
slapi_task_begin(task, total_work);
slapi_task_log_notice(task, "Sample task starts (arg: %s) ...\n", myarg);
- slapi_log_error(SLAPI_LOG_FATAL, "sampletask", "Sample task starts
(arg: %s) ...\n", myarg);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "sampletask", "Sample task
starts (arg: %s) ...\n", myarg);
/* real work would be done here */
for (i = 0; i < total_work; i++) {
@@ -112,7 +112,7 @@ task_sampletask_thread(void *arg)
/* update task state to say we're finished */
slapi_task_log_notice(task, "Sample task finished.");
slapi_task_log_status(task, "Sample task finished.");
- slapi_log_error(SLAPI_LOG_FATAL, "sampletask", "Sample task
finished.\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "sampletask", "Sample task
finished.\n");
/* this will queue the destruction of the task */
slapi_task_finish(task, rv);
@@ -179,7 +179,7 @@ task_sampletask_add(Slapi_PBlock *pb, Slapi_Entry *e,
/* allocate new task now */
task = slapi_new_task(slapi_entry_get_ndn(e));
if (task == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, "sampletask", "unable to allocate
new task!\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "sampletask", "unable to
allocate new task!\n");
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -196,7 +196,7 @@ task_sampletask_add(Slapi_PBlock *pb, Slapi_Entry *e,
(void *)task, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, "sampletask",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "sampletask",
"unable to create sample task thread!\n");
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
diff --git a/ldap/servers/slapd/test-plugins/testbind.c
b/ldap/servers/slapd/test-plugins/testbind.c
index 219c203..2254e4a 100644
--- a/ldap/servers/slapd/test-plugins/testbind.c
+++ b/ldap/servers/slapd/test-plugins/testbind.c
@@ -66,7 +66,7 @@ test_bind( Slapi_PBlock *pb )
Slapi_Attr *attr = NULL;
/* Log a message to the server error log. */
- slapi_log_error( SLAPI_LOG_PLUGIN, "test_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "test_bind",
"Pre-operation bind function called.\n" );
/* Gets parameters available when processing an LDAP bind
@@ -75,7 +75,7 @@ test_bind( Slapi_PBlock *pb )
slapi_pblock_get( pb, SLAPI_BIND_METHOD, &method ) != 0 ||
slapi_pblock_get( pb, SLAPI_BIND_CREDENTIALS, &credentials ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "test_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "test_bind",
"Could not get parameters for bind operation\n" );
slapi_send_ldap_result( pb, LDAP_OPERATIONS_ERROR,
NULL, NULL, 0, NULL );
@@ -92,7 +92,7 @@ test_bind( Slapi_PBlock *pb )
slapi_sdn_free( &sdn );
if ( rc != LDAP_SUCCESS ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "test_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "test_bind",
"Could not find entry %s (error %d)\n",
dn, rc );
break;
@@ -108,7 +108,7 @@ test_bind( Slapi_PBlock *pb )
if ( slapi_entry_attr_find( e, SLAPI_USERPWD_ATTR,
&attr ) != 0 || slapi_attr_get_numvalues( attr,
&valcount ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "test_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "test_bind",
"Entry has no %s attribute values\n",
SLAPI_USERPWD_ATTR );
rc = LDAP_INAPPROPRIATE_AUTH;
@@ -126,7 +126,7 @@ test_bind( Slapi_PBlock *pb )
}
if ( slapi_pw_find_sv( pwvals, credval ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "test_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "test_bind",
"Credentials are not correct\n" );
rc = LDAP_INVALID_CREDENTIALS;
}
@@ -140,7 +140,7 @@ test_bind( Slapi_PBlock *pb )
} else {
/* This should not happen. The previous section of code
already checks for this case. */
- slapi_log_error( SLAPI_LOG_PLUGIN, "test_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "test_bind",
"Could find entry for %s\n", dn );
rc = LDAP_NO_SUCH_OBJECT;
break;
@@ -152,14 +152,14 @@ test_bind( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_CONN_AUTHMETHOD,
SLAPD_AUTH_SIMPLE ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "test_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "test_bind",
"Failed to set DN and method for connection\n" );
rc = LDAP_OPERATIONS_ERROR;
break;
}
/* Send a "success" result code back to the client. */
- slapi_log_error( SLAPI_LOG_PLUGIN, "test_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "test_bind",
"Authenticated: %s\n", dn );
rc = LDAP_SUCCESS;
break;
@@ -172,7 +172,7 @@ test_bind( Slapi_PBlock *pb )
1.
*/
case LDAP_AUTH_NONE:
- slapi_log_error( SLAPI_LOG_PLUGIN, "test_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "test_bind",
"Authenticating anonymously\n" );
rc = LDAP_SUCCESS;
break;
@@ -180,7 +180,7 @@ test_bind( Slapi_PBlock *pb )
/* This plug-in does not support any other method of authentication */
case LDAP_AUTH_SASL:
default:
- slapi_log_error( SLAPI_LOG_PLUGIN, "test_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "test_bind",
"Unsupported authentication method requested: %d\n",
method );
rc = LDAP_AUTH_METHOD_NOT_SUPPORTED;
@@ -199,7 +199,7 @@ test_search( Slapi_PBlock *pb )
char *reqdn;
/* Log a message to the server error log. */
- slapi_log_error( SLAPI_LOG_PLUGIN, "test_search",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "test_search",
"Pre-operation search function called.\n" );
/* Get requestor of search operation. This is not critical
@@ -208,17 +208,17 @@ test_search( Slapi_PBlock *pb )
if this fails. */
if ( slapi_pblock_get( pb, SLAPI_REQUESTOR_DN, &reqdn ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "test_search",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "test_search",
"Could not get requestor parameter for search operation\n" );
return( 0 );
}
/* Indicate who is requesting the search */
if ( reqdn != NULL && *reqdn != '\0' ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "test_search",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "test_search",
"Search requested by %s\n", reqdn );
} else {
- slapi_log_error( SLAPI_LOG_PLUGIN, "test_search",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "test_search",
"Search requested by anonymous client\n" );
}
return( 0 );
@@ -232,7 +232,7 @@ testbind_init( Slapi_PBlock *pb )
/* Retrieve and save the plugin identity to later pass to
internal operations */
if ( slapi_pblock_get( pb, SLAPI_PLUGIN_IDENTITY, &plugin_id ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "testbind_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testbind_init",
"Failed to retrieve SLAPI_PLUGIN_IDENTITY\n" );
return( -1 );
}
@@ -248,7 +248,7 @@ testbind_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_PRE_SEARCH_FN,
(void *) test_search ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "testbind_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testbind_init",
"Failed to set version and functions\n" );
return( -1 );
}
diff --git a/ldap/servers/slapd/test-plugins/testdatainterop.c
b/ldap/servers/slapd/test-plugins/testdatainterop.c
index 807736a..7e2fc77 100644
--- a/ldap/servers/slapd/test-plugins/testdatainterop.c
+++ b/ldap/servers/slapd/test-plugins/testdatainterop.c
@@ -115,11 +115,11 @@ nullsuffix_init( Slapi_PBlock *pb )
{
int i;
- slapi_log_error( SLAPI_LOG_PLUGIN, PLUGIN_NAME, "nullsuffix_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PLUGIN_NAME, "nullsuffix_init\n"
);
/* retrieve plugin identity to later pass to internal operations */
if ( slapi_pblock_get( pb, SLAPI_PLUGIN_IDENTITY, &plugin_id ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PLUGIN_NAME,
"unable to get SLAPI_PLUGIN_IDENTITY\n" );
return -1;
}
@@ -143,7 +143,7 @@ nullsuffix_init( Slapi_PBlock *pb )
(void *)nullsuffix_bind) != 0
|| slapi_pblock_set( pb, SLAPI_PLUGIN_PRE_MODRDN_FN,
(void *)nullsuffix_modrdn) != 0) {
- slapi_log_error( SLAPI_LOG_PLUGIN, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PLUGIN_NAME,
"failed to set version and function\n" );
return -1;
}
@@ -159,7 +159,7 @@ nullsuffix_bind( Slapi_PBlock *pb )
if( slapi_op_reserved(pb) ){
return PLUGIN_OPERATION_IGNORED;
}
- slapi_log_error( SLAPI_LOG_PLUGIN, PLUGIN_NAME, "nullsuffix_bind\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PLUGIN_NAME, "nullsuffix_bind\n"
);
send_ldap_result( pb, LDAP_SUCCESS, NULL, NULL, 0, NULL );
return PLUGIN_OPERATION_HANDLED;
@@ -172,7 +172,7 @@ nullsuffix_add( Slapi_PBlock *pb )
if( slapi_op_reserved(pb) ){
return PLUGIN_OPERATION_IGNORED;
}
- slapi_log_error( SLAPI_LOG_PLUGIN, PLUGIN_NAME, "nullsuffix_add\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PLUGIN_NAME, "nullsuffix_add\n"
);
slapi_pblock_get( pb, SLAPI_ADD_TARGET, &dn );
db_put_dn(dn);
send_ldap_result( pb, LDAP_SUCCESS, NULL, NULL, 0, NULL );
@@ -193,7 +193,7 @@ nullsuffix_modify( Slapi_PBlock *pb )
slapi_pblock_get( pb, SLAPI_ENTRY_PRE_OP, &entry);
db_put_dn(dn);
send_ldap_result( pb, LDAP_SUCCESS, NULL, NULL, 0, NULL );
- slapi_log_error( SLAPI_LOG_PLUGIN, PLUGIN_NAME, "nullsuffix_modify\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PLUGIN_NAME,
"nullsuffix_modify\n" );
return PLUGIN_OPERATION_HANDLED;
}
@@ -204,7 +204,7 @@ nullsuffix_delete( Slapi_PBlock *pb )
if( slapi_op_reserved(pb) ){
return PLUGIN_OPERATION_IGNORED;
}
- slapi_log_error( SLAPI_LOG_PLUGIN, PLUGIN_NAME, "nullsuffix_delete\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PLUGIN_NAME,
"nullsuffix_delete\n" );
send_ldap_result( pb, LDAP_SUCCESS, NULL, NULL, 0, NULL );
return PLUGIN_OPERATION_HANDLED;
}
@@ -215,7 +215,7 @@ nullsuffix_modrdn( Slapi_PBlock *pb )
if( slapi_op_reserved(pb) ){
return PLUGIN_OPERATION_IGNORED;
}
- slapi_log_error( SLAPI_LOG_PLUGIN, PLUGIN_NAME, "nullsuffix_modrdn\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PLUGIN_NAME,
"nullsuffix_modrdn\n" );
send_ldap_result( pb, LDAP_SUCCESS, NULL, NULL, 0, NULL );
return PLUGIN_OPERATION_HANDLED;
}
@@ -244,7 +244,7 @@ nullsuffix_search( Slapi_PBlock *pb )
"uid:jsmith\n"
"mail:jsmith@example.com\n";
- slapi_log_error( SLAPI_LOG_PLUGIN, PLUGIN_NAME, "nullsuffix_search\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PLUGIN_NAME,
"nullsuffix_search\n" );
if( slapi_op_reserved(pb) ){
return PLUGIN_OPERATION_IGNORED;
}
@@ -252,7 +252,7 @@ nullsuffix_search( Slapi_PBlock *pb )
/* get essential search parameters */
if ( slapi_pblock_get( pb, SLAPI_SEARCH_TARGET, &dn_base ) != 0 ||
slapi_pblock_get( pb, SLAPI_SEARCH_SCOPE, &scope ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PLUGIN_NAME,
"could not get base DN and scope search parameters\n" );
}
if ( dn_base == NULL ) {
@@ -268,12 +268,12 @@ nullsuffix_search( Slapi_PBlock *pb )
slapi_pblock_get( pb, SLAPI_SEARCH_FILTER, &filter ) != 0 ||
slapi_pblock_get( pb, SLAPI_SEARCH_ATTRS, &attrs ) != 0 ||
slapi_pblock_get( pb, SLAPI_SEARCH_ATTRSONLY, &attrsonly ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PLUGIN_NAME,
"could not get remaining search parameters\n" );
}
if ( slapi_pblock_get( pb, SLAPI_OPERATION, &op ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PLUGIN_NAME,
"could not get operation\n" );
} else {
slapi_operation_set_flag(op, SLAPI_OP_FLAG_NO_ACCESS_CHECK );
@@ -284,7 +284,7 @@ nullsuffix_search( Slapi_PBlock *pb )
if ( NULL == ( e = slapi_str2entry( newStr,
SLAPI_STR2ENTRY_ADDRDNVALS
| SLAPI_STR2ENTRY_EXPAND_OBJECTCLASSES ))) {
- slapi_log_error( SLAPI_LOG_PLUGIN, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PLUGIN_NAME,
"nullsuffix_search: slapi_str2entry() failed\n" );
} else {
slapi_send_ldap_search_entry( pb, e, NULL /* controls */,
@@ -295,7 +295,7 @@ nullsuffix_search( Slapi_PBlock *pb )
slapi_send_ldap_result( pb, ldaperr, NULL, "kilroy was here",
nentries, NULL );
- slapi_log_error( SLAPI_LOG_PLUGIN, PLUGIN_NAME, "nullsuffix_search:"
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PLUGIN_NAME,
"nullsuffix_search:"
" handled search based at %s with scope %d; ldaperr=%d\n",
dn_base, scope, ldaperr );
@@ -312,6 +312,6 @@ nullsuffix_search( Slapi_PBlock *pb )
static int
nullsuffix_close( Slapi_PBlock *pb )
{
- slapi_log_error( SLAPI_LOG_PLUGIN, PLUGIN_NAME, "nullsuffix_close\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PLUGIN_NAME, "nullsuffix_close\n"
);
return 0;
}
diff --git a/ldap/servers/slapd/test-plugins/testdbinterop.c
b/ldap/servers/slapd/test-plugins/testdbinterop.c
index fb2b7c2..a324b33 100644
--- a/ldap/servers/slapd/test-plugins/testdbinterop.c
+++ b/ldap/servers/slapd/test-plugins/testdbinterop.c
@@ -55,7 +55,7 @@ void make_key(DBT *key)
unsigned int seed = (unsigned int)time( (time_t*) 0);
long int key_long = slapi_rand_r(&seed) % number_of_keys;
sprintf(key_string,"key%ld",key_long);
- slapi_log_error(SLAPI_LOG_PLUGIN, DB_PLUGIN_NAME,"generated key: %s\n",
key_string);
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DB_PLUGIN_NAME,"generated key:
%s\n", key_string);
key->size = strlen(key_string);
}
@@ -91,10 +91,10 @@ db_put_dn(char *data_dn)
switch (ret =
dbp->put(dbp, NULL, &key, &data, DB_NOOVERWRITE)) {
case 0:
- slapi_log_error(SLAPI_LOG_PLUGIN, DB_PLUGIN_NAME, "db: %s: key stored.\n",
(char *)key.data);
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DB_PLUGIN_NAME, "db: %s: key
stored.\n", (char *)key.data);
break;
case DB_KEYEXIST:
- slapi_log_error(SLAPI_LOG_PLUGIN, DB_PLUGIN_NAME, "db: %s: key previously
stored.\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DB_PLUGIN_NAME, "db: %s: key
previously stored.\n",
(char *)key.data);
break;
default:
@@ -104,7 +104,7 @@ db_put_dn(char *data_dn)
err:
if(ret){
- slapi_log_error(SLAPI_LOG_PLUGIN, DB_PLUGIN_NAME, "db: Error detected in db_put
\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DB_PLUGIN_NAME, "db: Error detected
in db_put \n");
}
free(key.data);
if (dbp){
@@ -151,7 +151,7 @@ db_put_dn(char *data_dn)
/* open a file */
if ((prfd = PR_Open(db_path, PR_RDWR | PR_CREATE_FILE | PR_APPEND, 0600)) == NULL ) {
- slapi_log_error(SLAPI_LOG_FATAL, DB_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DB_PLUGIN_NAME,
"db: Could not open file \"%s\" for read/write; %d (%s)\n",
db_path, PR_GetError(), slapd_pr_strerror(PR_GetError()));
return;
@@ -162,17 +162,17 @@ db_put_dn(char *data_dn)
ret = PR_Write(prfd, data_dnp, data_sz);
if (ret == data_sz) {
- slapi_log_error(SLAPI_LOG_PLUGIN, DB_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DB_PLUGIN_NAME,
"db: %s: key stored.\n", data_dn);
ret = 0;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, DB_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DB_PLUGIN_NAME,
"db: Failed to store key \"%s\"; %d (%s)\n",
data_dn, PR_GetError(), slapd_pr_strerror(PR_GetError()));
ret = 1;
}
if(ret) {
- slapi_log_error(SLAPI_LOG_FATAL, DB_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DB_PLUGIN_NAME,
"db: Error detected in db_put_dn \n");
}
slapi_ch_free_string(&data_dnp);
diff --git a/ldap/servers/slapd/test-plugins/testentry.c
b/ldap/servers/slapd/test-plugins/testentry.c
index d5658f3..ca8b133 100644
--- a/ldap/servers/slapd/test-plugins/testentry.c
+++ b/ldap/servers/slapd/test-plugins/testentry.c
@@ -77,7 +77,7 @@ testentry_scramble( char **entry, unsigned long *len )
/* Log an entry to the server's error log file whenever
this function is called. */
- slapi_log_error( SLAPI_LOG_PLUGIN, "testentry_scramble",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testentry_scramble",
"Entry data scrambled.\n" );
/* Perform a bitwise exclusive-OR operation on each
@@ -107,7 +107,7 @@ testentry_unscramble( char **entry, unsigned long *len )
(*entry)[i] ^= 0xaa;
}
- slapi_log_error( SLAPI_LOG_PLUGIN, "testentry_unscramble",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testentry_unscramble",
"Entry data unscrambled.\n");
return( 0 );
}
@@ -126,7 +126,7 @@ testentry_init(Slapi_PBlock *pb)
slapi_pblock_set( pb, SLAPI_PLUGIN_ENTRY_STORE_FUNC,
(void *) testentry_scramble ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "testentry_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testentry_init",
"Failed to set version and functions\n" );
return( -1 );
}
diff --git a/ldap/servers/slapd/test-plugins/testextendedop.c
b/ldap/servers/slapd/test-plugins/testextendedop.c
index a08da18..6ccf71d 100644
--- a/ldap/servers/slapd/test-plugins/testextendedop.c
+++ b/ldap/servers/slapd/test-plugins/testextendedop.c
@@ -76,16 +76,16 @@ testexop_babs( Slapi_PBlock *pb )
if ( slapi_pblock_get( pb, SLAPI_EXT_OP_REQ_OID, &oid ) != 0 ||
slapi_pblock_get( pb, SLAPI_EXT_OP_REQ_VALUE, &bval ) != 0 ) {
msg = "Could not get OID and value from request.";
- slapi_log_error( SLAPI_LOG_PLUGIN, "testexop_babs", "%s\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testexop_babs",
"%s\n",
msg );
slapi_send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL,
msg, 0, NULL );
return( SLAPI_PLUGIN_EXTENDED_SENT_RESULT );
} else {
- slapi_log_error( SLAPI_LOG_PLUGIN, "testexop_babs",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testexop_babs",
"Received extended operation request with OID %s\n",
oid );
- slapi_log_error( SLAPI_LOG_PLUGIN, "testexop_babs",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testexop_babs",
"Value from client: %s\n", bval->bv_val );
}
@@ -107,7 +107,7 @@ testexop_babs( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_EXT_OP_RET_VALUE, &retbval ) != 0 ) {
slapi_ch_free( ( void ** ) &retval );
msg = "Could not set return values";
- slapi_log_error( SLAPI_LOG_PLUGIN, "testexop_babs", "%s\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testexop_babs",
"%s\n",
msg );
slapi_send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL,
msg, 0, NULL );
@@ -118,9 +118,9 @@ testexop_babs( Slapi_PBlock *pb )
back to the client. */
slapi_send_ldap_result( pb, LDAP_SUCCESS, NULL,
"operation babs successful!", 0, NULL );
- slapi_log_error( SLAPI_LOG_PLUGIN, "testexop_babs",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testexop_babs",
"OID sent to client: %s\n", "5.6.7.8" );
- slapi_log_error( SLAPI_LOG_PLUGIN, "testexop_babs",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testexop_babs",
"Value sent to client: %s\n", retval );
/* Free any memory allocated by this plug-in. */
@@ -145,7 +145,7 @@ testexop_init( Slapi_PBlock *pb )
*/
if ( slapi_pblock_get( pb, SLAPI_PLUGIN_ARGV, &argv ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
"testexop_init", "Could not get argv\n" );
return( -1 );
}
@@ -154,12 +154,12 @@ testexop_init( Slapi_PBlock *pb )
against the OID supported by this plug-in function. */
if ( argv == NULL || strcmp( argv[0], MY_OID ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
"testexop_init", "OID is missing or is not %s\n", MY_OID );
return( -1 );
} else {
oid = slapi_ch_strdup( argv[0] );
- slapi_log_error( SLAPI_LOG_PLUGIN, "testexop_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testexop_init",
"Registering plug-in for extended op %s.\n", oid );
}
@@ -183,7 +183,7 @@ testexop_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_OIDLIST, oidlist ) ||
slapi_pblock_set( pb, SLAPI_PLUGIN_EXT_OP_NAMELIST, namelist ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "testexop_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testexop_init",
"Failed to set plug-in version, function, and OID.\n" );
return( -1 );
}
diff --git a/ldap/servers/slapd/test-plugins/testgetip.c
b/ldap/servers/slapd/test-plugins/testgetip.c
index 6a3f1de..c4c28da 100644
--- a/ldap/servers/slapd/test-plugins/testgetip.c
+++ b/ldap/servers/slapd/test-plugins/testgetip.c
@@ -73,11 +73,11 @@ testgetip( Slapi_PBlock *pb )
*/
if ( slapi_pblock_get( pb, SLAPI_CONN_CLIENTNETADDR, &client_addr )
!= 0 || ( client_addr.raw.family == 0 )) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "testgetip",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testgetip",
"Could not get client IP.\n" );
} else if (( addrstr = netaddr2str( &client_addr, addrbuf,
sizeof(addrbuf))) != NULL ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "testgetip",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testgetip",
"Client's IP address is %s\n", addrstr );
}
@@ -86,11 +86,11 @@ testgetip( Slapi_PBlock *pb )
*/
if ( slapi_pblock_get( pb, SLAPI_CONN_SERVERNETADDR, &server_addr )
!= 0 || ( server_addr.raw.family == 0 )) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "testgetip",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testgetip",
"Could not get server IP.\n" );
} else if (( addrstr = netaddr2str( &server_addr, addrbuf,
sizeof(addrbuf))) != NULL ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "testgetip",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testgetip",
"Client sent request to server IP %s\n", addrstr );
}
@@ -107,12 +107,12 @@ testgetip_init( Slapi_PBlock *pb )
(void *)&getippdesc ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_PRE_SEARCH_FN,
(void *) testgetip ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, "testgetip_init",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "testgetip_init",
"Failed to set version and functions.\n" );
return( -1 );
}
- slapi_log_error( SLAPI_LOG_PLUGIN, "testgetip_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testgetip_init",
"Registered preop plugins.\n" );
return( 0 );
}
@@ -128,7 +128,7 @@ netaddr2str( PRNetAddr *addrp, char *buf, size_t buflen )
*buf = '\0';
if ( PR_NetAddrToString( addrp, buf, buflen ) != PR_SUCCESS ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "testgetip",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testgetip",
"PR_NetAddrToString failed.\n" );
return( NULL );
}
diff --git a/ldap/servers/slapd/test-plugins/testpostop.c
b/ldap/servers/slapd/test-plugins/testpostop.c
index 3ca8800..abf845b 100644
--- a/ldap/servers/slapd/test-plugins/testpostop.c
+++ b/ldap/servers/slapd/test-plugins/testpostop.c
@@ -83,13 +83,13 @@ testpostop_add( Slapi_PBlock *pb )
that entry. */
if ( slapi_pblock_get( pb, SLAPI_ADD_ENTRY, &e ) != 0 ||
slapi_pblock_get( pb, SLAPI_ADD_TARGET, &dn ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
"testpostop_add", "Could not get parameters\n" );
return( -1 );
}
/* Log the DN of the newly added entry in the server error log. */
- slapi_log_error( SLAPI_LOG_PLUGIN, "testpostop_add",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testpostop_add",
"Added entry (%s)\n", dn );
/* Log the DN and the entry to the change log file. */
@@ -108,13 +108,13 @@ testpostop_mod( Slapi_PBlock *pb )
/* Get the DN of the modified entry and the modifications made. */
if ( slapi_pblock_get( pb, SLAPI_MODIFY_TARGET, &dn ) != 0 ||
slapi_pblock_get( pb, SLAPI_MODIFY_MODS, &mods ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
"testpostop_mod", "Could not get parameters\n" );
return( -1 );
}
/* Log the DN of the modified entry to the server error log. */
- slapi_log_error( SLAPI_LOG_PLUGIN, "testpostop_mod",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testpostop_mod",
"Modified entry (%s)\n", dn );
/* Log the DN and the modifications made to the change log file. */
@@ -131,13 +131,13 @@ testpostop_del( Slapi_PBlock *pb )
/* Get the DN of the entry that was removed from the directory. */
if ( slapi_pblock_get( pb, SLAPI_DELETE_TARGET, &dn ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
"testpostop_del", "Could not get parameters\n" );
return( -1 );
}
/* Log the DN of the deleted entry to the server error log. */
- slapi_log_error( SLAPI_LOG_PLUGIN, "testpostop_del",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testpostop_del",
"Deleted entry (%s)\n", dn );
/* Log the DN of the deleted entry to the change log. */
@@ -160,13 +160,13 @@ testpostop_modrdn( Slapi_PBlock *pb )
if ( slapi_pblock_get( pb, SLAPI_MODRDN_TARGET, &dn ) != 0 ||
slapi_pblock_get( pb, SLAPI_MODRDN_NEWRDN, &newrdn ) != 0 ||
slapi_pblock_get( pb, SLAPI_MODRDN_DELOLDRDN, &dflag ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
"testpostop_modrdn", "Could not get parameters\n" );
return( -1 );
}
/* Log the DN of the renamed entry to the server error log. */
- slapi_log_error( SLAPI_LOG_PLUGIN, "testpostop_modrdn",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testpostop_modrdn",
"modrdn entry (%s)\n", dn );
/* Log the DN of the renamed entry, its new RDN, and the
@@ -185,14 +185,14 @@ testpostop_abandon( Slapi_PBlock *pb )
/* Get the LDAP message ID of the abandoned operation */
if ( slapi_pblock_get( pb, SLAPI_ABANDON_MSGID, &msgid ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
"testpostop_abandon", "Could not get parameters\n" );
return( -1 );
}
/* Log information about the abandon operation to the
server error log. */
- slapi_log_error( SLAPI_LOG_PLUGIN, "testpostop_abandon",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testpostop_abandon",
"Postoperation abandon function called.\n"
"\tTarget MsgID: %d\n",
msgid );
@@ -220,7 +220,7 @@ testpostop_init( Slapi_PBlock *pb )
(void *) testpostop_modrdn ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_POST_ABANDON_FN,
(void *) testpostop_abandon ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "testpostop_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testpostop_init",
"Failed to set version and functions\n" );
return( -1 );
}
@@ -285,7 +285,7 @@ write_changelog(
return;
}
if ( (fp = fopen( changelogfile, "ab" )) == NULL ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "write_changelog",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "write_changelog",
"Could not open log file %s\n", changelogfile );
return;
}
diff --git a/ldap/servers/slapd/test-plugins/testpreop.c
b/ldap/servers/slapd/test-plugins/testpreop.c
index e58f6ae..5450ee8 100644
--- a/ldap/servers/slapd/test-plugins/testpreop.c
+++ b/ldap/servers/slapd/test-plugins/testpreop.c
@@ -70,7 +70,7 @@ testpreop_bind( Slapi_PBlock *pb )
of authentication used. */
if ( slapi_pblock_get( pb, SLAPI_BIND_TARGET, &dn ) != 0 ||
slapi_pblock_get( pb, SLAPI_BIND_METHOD, &method ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
"testpreop_bind", "Could not get parameters\n" );
return( -1 );
}
@@ -92,7 +92,7 @@ testpreop_bind( Slapi_PBlock *pb )
/* Log information about the bind operation to the
server error log. */
- slapi_log_error( SLAPI_LOG_PLUGIN, "testpreop_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testpreop_bind",
"Preoperation bind function called.\n"
"\tTarget DN: %s\n\tAuthentication method: %s\n",
dn, auth );
@@ -114,7 +114,7 @@ testpreop_add( Slapi_PBlock *pb )
/* Get the entry that is about to be added. */
if ( slapi_pblock_get( pb, SLAPI_ADD_ENTRY, &e ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
"testpreop_add", "Could not get entry\n" );
return( -1 );
}
@@ -142,15 +142,15 @@ testpreop_search( Slapi_PBlock *pb )
{
char *base;
/* Log a message to indicate when the plug-in function starts */
- slapi_log_error( SLAPI_LOG_FATAL, "testpreop_search",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "testpreop_search",
"*** PREOPERATION SEARCH PLUGIN ***\n");
/* Get and log the base DN of the search criteria */
if ( slapi_pblock_get( pb, SLAPI_SEARCH_TARGET, &base ) == 0 )
- slapi_log_error( SLAPI_LOG_FATAL, "SLAPI_SEARCH_TARGET",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "SLAPI_SEARCH_TARGET",
"%s\n", base );
/* Get and log the original base DN */
if ( slapi_pblock_get( pb, SLAPI_ORIGINAL_TARGET_DN, &base ) == 0 )
- slapi_log_error( SLAPI_LOG_FATAL, "SLAPI_ORIGINAL_TARGET_DN",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "SLAPI_ORIGINAL_TARGET_DN",
"%s\n", base );
return( 0 ); /* allow the operation to continue */
@@ -165,14 +165,14 @@ testpreop_abandon( Slapi_PBlock *pb )
/* Get the LDAP message ID of the abandon target */
if ( slapi_pblock_get( pb, SLAPI_ABANDON_MSGID, &msgid ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
"testpreop_abandon", "Could not get parameters\n" );
return( -1 );
}
/* Log information about the abandon operation to the
server error log. */
- slapi_log_error( SLAPI_LOG_PLUGIN, "testpreop_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testpreop_bind",
"Preoperation abandon function called.\n"
"\tTarget MsgID: %d\n",
msgid );
@@ -234,7 +234,7 @@ testpreop_init( Slapi_PBlock *pb )
(void *) testpreop_search ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_PRE_ABANDON_FN,
(void *) testpreop_abandon ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, "testpreop_init",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "testpreop_init",
"Failed to set version and function\n" );
return( -1 );
}
diff --git a/ldap/servers/slapd/test-plugins/testsaslbind.c
b/ldap/servers/slapd/test-plugins/testsaslbind.c
index a58e321..817735f 100644
--- a/ldap/servers/slapd/test-plugins/testsaslbind.c
+++ b/ldap/servers/slapd/test-plugins/testsaslbind.c
@@ -74,7 +74,7 @@ testsasl_bind( Slapi_PBlock *pb )
struct berval svrcreds;
/* Log a message to the server error log. */
- slapi_log_error( SLAPI_LOG_PLUGIN, "testsasl_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testsasl_bind",
"Pre-operation bind function called.\n" );
/* Gets parameters available when processing an LDAP bind
@@ -84,7 +84,7 @@ testsasl_bind( Slapi_PBlock *pb )
slapi_pblock_get( pb, SLAPI_BIND_CREDENTIALS, &credentials ) != 0 ||
slapi_pblock_get( pb, SLAPI_BIND_SASLMECHANISM, &mechanism )
!= 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, "testsasl_bind",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "testsasl_bind",
"Could not get parameters for bind operation\n" );
return( 0 ); /* let the server try other mechanisms */
}
@@ -102,7 +102,7 @@ testsasl_bind( Slapi_PBlock *pb )
if ( slapi_pblock_set( pb, SLAPI_CONN_DN, slapi_ch_strdup( target ) )
!= 0 || slapi_pblock_set( pb, SLAPI_CONN_AUTHMETHOD,
TEST_SASL_AUTHMETHOD ) != 0 ) {
- slapi_log_error( SLAPI_LOG_FATAL, "testsasl_bind",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "testsasl_bind",
"Failed to set DN and method for connection\n" );
slapi_send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL,
NULL, 0, NULL );
@@ -114,7 +114,7 @@ testsasl_bind( Slapi_PBlock *pb )
svrcreds.bv_len = sizeof("my credentials") - 1;
if ( slapi_pblock_set( pb, SLAPI_BIND_RET_SASLCREDS, &svrcreds )
!= 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "testsasl_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testsasl_bind",
"Could not set credentials to return to client\n" );
slapi_pblock_set( pb, SLAPI_CONN_DN, NULL );
slapi_pblock_set( pb, SLAPI_CONN_AUTHMETHOD, SLAPD_AUTH_NONE );
@@ -122,7 +122,7 @@ testsasl_bind( Slapi_PBlock *pb )
}
/* Send the credentials back to the client. */
- slapi_log_error( SLAPI_LOG_PLUGIN, "testsasl_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testsasl_bind",
"Authenticated: %s\n", target );
slapi_send_ldap_result( pb, LDAP_SUCCESS, NULL, NULL, 0, NULL );
@@ -138,7 +138,7 @@ testsasl_init( Slapi_PBlock *pb )
if ( slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION, SLAPI_PLUGIN_VERSION_01 ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION, (void *)&saslpdesc ) != 0 ||
slapi_pblock_set( pb, SLAPI_PLUGIN_PRE_BIND_FN, (void *) testsasl_bind ) != 0 ) {
- slapi_log_error( SLAPI_LOG_PLUGIN, "testsasl_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testsasl_init",
"Failed to set version and function\n" );
return( -1 );
}
diff --git a/ldap/servers/slapd/time.c b/ldap/servers/slapd/time.c
index 96d50fb..9f02212 100644
--- a/ldap/servers/slapd/time.c
+++ b/ldap/servers/slapd/time.c
@@ -517,7 +517,7 @@ parse_duration(char *value)
duration *= times;
bail:
if (duration == -1) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "parse_duration: invalid duration
(%s)\n", value?value:"null");
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "parse_duration: invalid duration
(%s)\n", value?value:"null");
}
slapi_ch_free_string(&input);
return duration;
@@ -584,7 +584,7 @@ parse_duration_longlong(char *value)
duration *= times;
bail:
if (duration == -1) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "parse_duration_longlong: invalid duration
(%s)\n", value?value:"null");
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "parse_duration_longlong: invalid
duration (%s)\n", value?value:"null");
}
slapi_ch_free_string(&input);
return duration;
diff --git a/ldap/servers/slapd/tools/mmldif.c b/ldap/servers/slapd/tools/mmldif.c
index 35c594a..5aad22d 100644
--- a/ldap/servers/slapd/tools/mmldif.c
+++ b/ldap/servers/slapd/tools/mmldif.c
@@ -776,7 +776,7 @@ readrec(edfFILE * edf1, attrib1_t ** attrib)
break;
line[0] = '\0';
if (NULL == fgets(line, sizeof(line), edf1->fp)) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "readrec: failed to read
line\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "readrec: failed to
read line\n");
break;
}
len = strlen(line);
@@ -815,7 +815,7 @@ readrec(edfFILE * edf1, attrib1_t ** attrib)
if (lookahead != ' ')
break;
if (NULL == fgets(line, sizeof(line), edf1->fp)) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, "readrec: failed to read
line\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "readrec: failed to
read line\n");
break;
}
len = strlen(line);
diff --git a/ldap/servers/slapd/uniqueid.c b/ldap/servers/slapd/uniqueid.c
index 0e3f5ac..6ef9366 100644
--- a/ldap/servers/slapd/uniqueid.c
+++ b/ldap/servers/slapd/uniqueid.c
@@ -41,7 +41,7 @@ Slapi_UniqueID *slapi_uniqueIDNew ()
if (uId == NULL)
{
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "uniqueIDNew: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "uniqueIDNew: "
"failed to allocate new id.\n");
return NULL;
}
@@ -78,7 +78,7 @@ void slapi_uniqueIDDestroy (Slapi_UniqueID **uId)
int slapi_uniqueIDCompare (const Slapi_UniqueID *uId1, const Slapi_UniqueID *uId2){
if (uId1 == NULL || uId2 == NULL)
{
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "uniqueIDCompare: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "uniqueIDCompare: "
"NULL argument passed to the function.\n");
return UID_BADDATA;
}
@@ -126,7 +126,7 @@ int slapi_uniqueIDFormat (const Slapi_UniqueID *uId, char **buff){
if (uId == NULL || buff == NULL)
{
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "uniqueIDFormat: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "uniqueIDFormat: "
"NULL argument passed to the function.\n");
return UID_BADDATA;
}
@@ -134,7 +134,7 @@ int slapi_uniqueIDFormat (const Slapi_UniqueID *uId, char **buff){
*buff = (char*)slapi_ch_malloc (UIDSTR_SIZE + 1);
if (*buff == NULL)
{
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "uniqueIDFormat: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "uniqueIDFormat: "
"failed to allocate buffer.\n");
return UID_MEMORY_ERROR;
}
@@ -179,14 +179,14 @@ int slapi_uniqueIDFormat (const Slapi_UniqueID *uId, char **buff){
int slapi_uniqueIDScan (Slapi_UniqueID *uId, const char *buff){
if (uId == NULL || buff == NULL)
{
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "uniqueIDScan: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "uniqueIDScan: "
"NULL argument passed to the function.\n");
return UID_BADDATA;
}
if (!isValidFormat (buff))
{
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "uniqueIDScan: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "uniqueIDScan: "
"invalid data format.\n");
return UID_BADDATA;
}
diff --git a/ldap/servers/slapd/uniqueidgen.c b/ldap/servers/slapd/uniqueidgen.c
index 3fbe53c..b261543 100644
--- a/ldap/servers/slapd/uniqueidgen.c
+++ b/ldap/servers/slapd/uniqueidgen.c
@@ -46,7 +46,7 @@ int uniqueIDGenInit (const char *configDir, const Slapi_DN *configDN,
PRBool mtG
if ((configDN == NULL && (configDir == NULL || !validDir(configDir))) ||
(configDN && configDir))
{
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "uniqueIDGenInit: invalid
arguments\n");
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "uniqueIDGenInit: invalid
arguments\n");
return UID_BADDATA;
}
@@ -57,7 +57,7 @@ int uniqueIDGenInit (const char *configDir, const Slapi_DN *configDN,
PRBool mtG
return UID_SUCCESS;
else
{
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "uniqueIDGenInit: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "uniqueIDGenInit: "
"generator initialization failed\n");
return UID_SYSTEM_ERROR;
}
@@ -85,7 +85,7 @@ int slapi_uniqueIDGenerate (Slapi_UniqueID *uId){
if (uId == NULL)
{
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "uniqueIDGenerate: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "uniqueIDGenerate: "
"NULL parameter is passed to the function.\n");
return UID_BADDATA;
}
@@ -93,7 +93,7 @@ int slapi_uniqueIDGenerate (Slapi_UniqueID *uId){
rt = uuid_create(uId);
if (rt != UUID_SUCCESS)
{
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "uniqueIDGenerate: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "uniqueIDGenerate: "
"id generation failed.\n");
return UID_SYSTEM_ERROR;
}
@@ -145,7 +145,7 @@ int slapi_uniqueIDGenerateFromName (Slapi_UniqueID *uId, const
Slapi_UniqueID *u
{
if (uId == NULL || uIdBase == NULL || name == NULL || namelen <= 0)
{
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "uniqueIDGenerateMT: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "uniqueIDGenerateMT: "
"invalid parameter is passed to the function.\n");
return UID_BADDATA;
}
diff --git a/ldap/servers/slapd/util.c b/ldap/servers/slapd/util.c
index 94e46ab..f14fcec 100644
--- a/ldap/servers/slapd/util.c
+++ b/ldap/servers/slapd/util.c
@@ -612,7 +612,7 @@ int slapi_mods2entry (Slapi_Entry **e, const char *idn, LDAPMod
**iattrs)
valuearray_free(&vals);
if (rc != LDAP_SUCCESS)
{
- LDAPDebug2Args(LDAP_DEBUG_ANY,
+ LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
"slapi_mods2entry: add_values for type %s failed (rc: %d)\n",
normtype, rc );
slapi_entry_free (*e);
@@ -1415,11 +1415,11 @@ slapi_is_special_rdn(const char *rdn, int flag)
}
if ((RDN_IS_TOMBSTONE != flag) && (RDN_IS_CONFLICT != flag)) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "slapi_is_special_rdn: invalid flag %d\n",
flag);
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "slapi_is_special_rdn: invalid flag
%d\n", flag);
return 0; /* not a special rdn/dn */
}
if (!rdn) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "slapi_is_special_rdn: NULL rdn\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "slapi_is_special_rdn: NULL rdn\n");
return 0; /* not a special rdn/dn */
}
@@ -1490,7 +1490,7 @@ static size_t util_getvirtualmemsize(void)
* memory.
*/
int errsrv = errno;
- slapi_log_error(SLAPI_LOG_FATAL,"util_getvirtualmemsize", "ERROR:
getrlimit returned non-zero. errno=%u\n", errsrv);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,"util_getvirtualmemsize",
"ERROR: getrlimit returned non-zero. errno=%u\n", errsrv);
return 0;
}
return rl.rlim_cur;
@@ -1503,7 +1503,7 @@ static size_t util_getvirtualmemsize(void)
int util_info_sys_pages(size_t *pagesize, size_t *pages, size_t *procpages, size_t
*availpages)
{
if ((NULL == pagesize) || (NULL == pages) || (NULL == procpages) || (NULL ==
availpages)) {
- slapi_log_error(SLAPI_LOG_FATAL, "util_info_sys_pages",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "util_info_sys_pages",
"ERROR: Null return variables are passed. Skip getting the
system info.\n");
return 1;
}
@@ -1590,7 +1590,7 @@ int util_info_sys_pages(size_t *pagesize, size_t *pages, size_t
*procpages, size
if (!f) { /* fopen failed */
/* We should probably make noise here! */
int errsrv = errno;
- slapi_log_error(SLAPI_LOG_FATAL,"util_info_sys_pages", "ERROR:
Unable to open file /proc/%d/status. errno=%u\n", getpid(), errsrv);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,"util_info_sys_pages",
"ERROR: Unable to open file /proc/%d/status. errno=%u\n", getpid(), errsrv);
return 1;
}
while (! feof(f)) {
@@ -1614,7 +1614,7 @@ int util_info_sys_pages(size_t *pagesize, size_t *pages, size_t
*procpages, size
fm = fopen(fmn, "r");
if (!fm) {
int errsrv = errno;
- slapi_log_error(SLAPI_LOG_FATAL,"util_info_sys_pages", "ERROR:
Unable to open file /proc/meminfo. errno=%u\n", errsrv);
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,"util_info_sys_pages",
"ERROR: Unable to open file /proc/meminfo. errno=%u\n", errsrv);
return 1;
}
while (! feof(fm)) {
@@ -1743,7 +1743,7 @@ int util_info_sys_pages(size_t *pagesize, size_t *pages, size_t
*procpages, size
/* This is stupid. If you set %u to %zu to print a size_t, you get literal %zu in
your logs
* So do the filthy cast instead.
*/
- slapi_log_error(SLAPI_LOG_TRACE,"util_info_sys_pages", "USING
pages=%lu, procpages=%lu, availpages=%lu \n",
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG,"util_info_sys_pages",
"USING pages=%lu, procpages=%lu, availpages=%lu \n",
(unsigned long)*pages, (unsigned long)*procpages, (unsigned long)*availpages);
return 0;
@@ -1799,8 +1799,8 @@ int util_is_cachesize_sane(size_t *cachesize)
/* These are now trace warnings, because it was to confusing to log this *then*
kill the request anyway.
* Instead, we will let the caller worry about the notification, and we'll
just use this in debugging and tracing.
*/
- slapi_log_error(SLAPI_LOG_TRACE, "util_is_cachesize_sane",
"Available pages %lu, requested pages %lu, pagesize %lu\n", (unsigned
long)availpages, (unsigned long)cachepages, (unsigned long)pagesize);
- slapi_log_error(SLAPI_LOG_TRACE, "util_is_cachesize_sane",
"WARNING adjusted cachesize to %lu\n", (unsigned long)*cachesize);
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "util_is_cachesize_sane",
"Available pages %lu, requested pages %lu, pagesize %lu\n", (unsigned
long)availpages, (unsigned long)cachepages, (unsigned long)pagesize);
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "util_is_cachesize_sane",
"WARNING adjusted cachesize to %lu\n", (unsigned long)*cachesize);
}
#else
size_t freepages = 0;
@@ -1814,13 +1814,13 @@ int util_is_cachesize_sane(size_t *cachesize)
if (!issane) {
*cachesize = (size_t)((pages - procpages) * pagesize);
- slapi_log_error(SLAPI_LOG_FATAL, "util_is_cachesize_sane",
"util_is_cachesize_sane WARNING adjusted cachesize to %lu\n",
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "util_is_cachesize_sane",
"util_is_cachesize_sane WARNING adjusted cachesize to %lu\n",
(unsigned long )*cachesize);
}
#endif
out:
if (!issane) {
- slapi_log_error(SLAPI_LOG_TRACE,"util_is_cachesize_sane",
"WARNING: Cachesize not sane \n");
+ slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG,"util_is_cachesize_sane",
"WARNING: Cachesize not sane \n");
}
return issane;
diff --git a/ldap/servers/slapd/uuid.c b/ldap/servers/slapd/uuid.c
index 11b9729..1f90672 100644
--- a/ldap/servers/slapd/uuid.c
+++ b/ldap/servers/slapd/uuid.c
@@ -128,7 +128,7 @@ int uuid_init (const char *configDir, const Slapi_DN *configDN, PRBool
mtGen)
if (_state.initialized)
{
- slapi_log_error (SLAPI_LOG_FATAL, MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE,
"uuid_init: generator is already initialized\n");
return UUID_SUCCESS;
}
@@ -139,7 +139,7 @@ int uuid_init (const char *configDir, const Slapi_DN *configDN, PRBool
mtGen)
rt = read_state(configDir, configDN, &newState);
if (rt != UUID_SUCCESS)
{
- slapi_log_error (SLAPI_LOG_FATAL, MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE,
"uuid_init: failed to get generator's state\n");
uuid_cleanup ();
return rt;
@@ -154,7 +154,7 @@ int uuid_init (const char *configDir, const Slapi_DN *configDN, PRBool
mtGen)
if (!_state.lock)
{
PRErrorCode prerr = PR_GetError();
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "uuid_init: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "uuid_init: "
"failed to create state lock; " SLAPI_COMPONENT_NAME_NSPR " error
%d (%s).\n",
prerr, slapd_pr_strerror(prerr));
uuid_cleanup ();
@@ -173,12 +173,12 @@ int uuid_init (const char *configDir, const Slapi_DN *configDN,
PRBool mtGen)
* If server is readonly and error is UUID_LDAP_ERROR
* we can continue.
*/
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "Warning: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "Warning: "
"The server is in read-only mode, therefore the unique ID generator cannot
be used. "
"Do not use this server in any replication agreement\n");
}
else {
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "uuid_init: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "uuid_init: "
"failed to save generator's state.\n");
uuid_cleanup ();
return rt;
@@ -336,7 +336,7 @@ static int uuid_create_mt(guid_t *uuid)
* time calls are made by a uuid_update_state */
if (update_time_mt(×tamp, &clock_seq) == UUID_TIME_ERROR)
{
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "uuid_create_mt: generator ran "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "uuid_create_mt: generator ran
"
"out of sequence numbers.\n");
return UUID_TIME_ERROR;
}
@@ -390,7 +390,7 @@ static int read_state(const char *configDir, const Slapi_DN *configDN,
PRBool *n
if (rt != UUID_SUCCESS && rt != UUID_NOTFOUND) /* fatal error - bail out */
{
- slapi_log_error (SLAPI_LOG_FATAL, MODULE,
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE,
"read_state: failed to get generator's state\n");
return rt;
}
@@ -435,7 +435,7 @@ static int read_state_from_file (const char *configDir)
path = (char*)slapi_ch_malloc(strlen (STATE_FILE) + 1);
if (path == NULL)
{
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "read_state: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "read_state: "
"memory allocation failed.\n");
return (UUID_MEMORY_ERROR);
}
@@ -447,7 +447,7 @@ static int read_state_from_file (const char *configDir)
path = slapi_ch_smprintf("%s/%s", configDir, STATE_FILE);
if (path == NULL)
{
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "read_state: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "read_state: "
"memory allocation failed.\n");
return (UUID_MEMORY_ERROR);
}
@@ -460,7 +460,7 @@ static int read_state_from_file (const char *configDir)
if (!_state.fd)
{
PRErrorCode prerr = PR_GetError();
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "read_state: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "read_state: "
"failed to open state file - %s; " SLAPI_COMPONENT_NAME_NSPR "
error %d (%s).\n",
path, prerr, slapd_pr_strerror(prerr));
return (UUID_IO_ERROR);
@@ -475,7 +475,7 @@ static int read_state_from_file (const char *configDir)
if (rt == -1)
{
PRErrorCode prerr = PR_GetError();
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "read_state: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "read_state: "
"failed to read state information; " SLAPI_COMPONENT_NAME_NSPR "
error %d (%s).\n",
prerr, slapd_pr_strerror(prerr));
return (UUID_IO_ERROR);
@@ -502,7 +502,7 @@ static int read_state_from_entry (const Slapi_DN *configDN)
if (pb == NULL)
{
/* the only time NULL pb is returned is when memory allocation fails */
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "read_state_from_entry: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "read_state_from_entry: "
"NULL pblock returned from search\n");
return UUID_MEMORY_ERROR;
}
@@ -517,7 +517,7 @@ static int read_state_from_entry (const Slapi_DN *configDN)
if (res != LDAP_SUCCESS)
{
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "read_state_from_entry: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "read_state_from_entry: "
"search operation failed; LDAP error - %d\n", res);
rt = UUID_LDAP_ERROR;
goto done;
@@ -586,7 +586,7 @@ static int write_state_to_file(void)
if (rt == -1)
{
PRErrorCode prerr = PR_GetError();
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "write_state: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "write_state: "
"failed to rewind state file; " SLAPI_COMPONENT_NAME_NSPR " error
%d (%s).\n",
prerr, slapd_pr_strerror(prerr));
return UUID_IO_ERROR;
@@ -596,7 +596,7 @@ static int write_state_to_file(void)
if (rt == -1)
{
PRErrorCode prerr = PR_GetError();
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "write_state: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "write_state: "
"failed to update state file; " SLAPI_COMPONENT_NAME_NSPR " error
%d (%s).\n",
prerr, slapd_pr_strerror(prerr));
@@ -649,7 +649,7 @@ static int add_state_entry(void)
if (pb == NULL)
{
/* the only time NULL pb is returned is when memory allocation fails */
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "add_state_entry: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "add_state_entry: "
"NULL pblock returned from search\n");
return UUID_MEMORY_ERROR;
}
@@ -661,12 +661,12 @@ static int add_state_entry(void)
if (rt != LDAP_SUCCESS)
{
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "add_state_entry: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "add_state_entry: "
"add operation failed; LDAP error - %d.\n", rt);
return UUID_LDAP_ERROR;
}
- slapi_log_error (SLAPI_LOG_HOUSE, MODULE, "add_state_entry: "
+ slapi_log_error(SLAPI_LOG_HOUSE, LOG_DEBUG, MODULE, "add_state_entry: "
"successfully added generator's state entry");
return UUID_SUCCESS;
@@ -695,7 +695,7 @@ static int modify_state_entry(void)
if (pb == NULL)
{
/* the only time NULL pb is returned is when memory allocation fails */
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "modify_state_entry: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "modify_state_entry: "
"NULL pblock returned from search\n");
return UUID_MEMORY_ERROR;
}
@@ -704,13 +704,13 @@ static int modify_state_entry(void)
slapi_pblock_destroy(pb);
if (res != LDAP_SUCCESS)
{
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "modify_state_entry: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "modify_state_entry: "
"update operation failed; LDAP error - %d.\n", res);
return UUID_LDAP_ERROR;
}
- slapi_log_error (SLAPI_LOG_HOUSE, MODULE, "modify_state_entry: "
+ slapi_log_error(SLAPI_LOG_HOUSE, LOG_DEBUG, MODULE, "modify_state_entry: "
"successfully updated generator's state entry");
return UUID_SUCCESS;
}
@@ -775,7 +775,7 @@ static int update_time_mt (uuid_time_t *timestamp, unsigned16
*clock_seq)
if (_state.time_seq >= SEQ_PER_SEC - 1)
{
_state.time_seq = NEED_TIME_UPDATE;
- slapi_log_error (SLAPI_LOG_FATAL, MODULE, "update_time_mt: "
+ slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "update_time_mt: "
"ran out of time sequence numbers; "
"uuid_update_state must be called\n");
diff --git a/lib/base/ereport.cpp b/lib/base/ereport.cpp
index b50062e..fa6ddcb 100644
--- a/lib/base/ereport.cpp
+++ b/lib/base/ereport.cpp
@@ -45,13 +45,13 @@ NSAPI_PUBLIC int ereport_v(int degree, char *fmt, va_list args)
case LOG_INFORM:
case LOG_VERBOSE:
case LOG_MISCONFIG:
-// slapi_log_error(SLAPI_LOG_PLUGIN, ACL_PLUGIN_NAME, errstr);
+// slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ACL_PLUGIN_NAME, errstr);
break;
case LOG_SECURITY:
-// slapi_log_error(SLAPI_LOG_ACL, ACL_PLUGIN_NAME, errstr);
+// slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, ACL_PLUGIN_NAME, errstr);
break;
case LOG_CATASTROPHE:
-// slapi_log_error(SLAPI_LOG_FATAL, ACL_PLUGIN_NAME, errstr);
+// slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ACL_PLUGIN_NAME, errstr);
break;
default:
break;
commit b7631218d5fa118aae223370e1ddda66d93168e2
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Wed Sep 7 11:52:12 2016 -0400
Ticket48978 - refactor LDAPDebug()
Description: Refectored LDAPDebug function calls to use the new
severity level.
https://fedorahosted.org/389/ticket/48978
Reviewed by: ?
diff --git a/ldap/servers/plugins/acl/aclutil.c b/ldap/servers/plugins/acl/aclutil.c
index 5915e88..047f532 100644
--- a/ldap/servers/plugins/acl/aclutil.c
+++ b/ldap/servers/plugins/acl/aclutil.c
@@ -765,7 +765,7 @@ acl_match_macro_in_target( const char *ndn, char * match_this,
/* we know it's got a $(dn) */
tmp_ptr = PL_strcasestr(macro_prefix, ACL_TARGET_MACRO_DN_KEY);
if (!tmp_ptr) {
- LDAPDebug(LDAP_DEBUG_ACL,"acl_match_macro_in_target: "
+ LDAPDebug(LDAP_DEBUG_ACL, LOG_DEBUG,"acl_match_macro_in_target: "
"Target macro DN key \"%s\" not found in \"%s\".\n",
ACL_TARGET_MACRO_DN_KEY, macro_prefix, 0);
slapi_ch_free_string(¯o_prefix);
@@ -1463,7 +1463,7 @@ acl_ht_display_entry(PLHashEntry *he, PRIntn i, void *arg)
PLHashNumber aci_index = (PLHashNumber)he->key;
char *matched_val = (char *)he->value;
- LDAPDebug(LDAP_DEBUG_ACL,"macro ht entry: key='%d'
matched_val='%s'"
+ LDAPDebug(LDAP_DEBUG_ACL, LOG_DEBUG,"macro ht entry: key='%d'
matched_val='%s'"
"keyhash='%d'\n",
aci_index, (matched_val ? matched_val: "NULL"),
(PLHashNumber)he->keyHash);
diff --git a/ldap/servers/plugins/bitwise/bitwise.c
b/ldap/servers/plugins/bitwise/bitwise.c
index 377981e..2a3ff8f 100644
--- a/ldap/servers/plugins/bitwise/bitwise.c
+++ b/ldap/servers/plugins/bitwise/bitwise.c
@@ -163,7 +163,7 @@ bitwise_filter_create (Slapi_PBlock* pb)
} else if (strcmp(mrOID, "1.2.840.113556.1.4.804") == 0) {
slapi_pblock_set (pb, SLAPI_PLUGIN_MR_FILTER_MATCH_FN,
(void*)bitwise_filter_match_or);
} else { /* this oid not handled by this plugin */
- LDAPDebug (LDAP_DEBUG_FILTER, "=> bitwise_filter_create OID (%s) not
handled\n", mrOID, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> bitwise_filter_create OID (%s)
not handled\n", mrOID, 0, 0);
return rc;
}
bmc = new_bitwise_match_cb(mrTYPE, mrVALUE);
@@ -171,9 +171,9 @@ bitwise_filter_create (Slapi_PBlock* pb)
slapi_pblock_set (pb, SLAPI_PLUGIN_DESTROY_FN, (void*)bitwise_filter_destroy);
rc = LDAP_SUCCESS;
} else {
- LDAPDebug (LDAP_DEBUG_FILTER, "=> bitwise_filter_create missing
parameter(s)\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> bitwise_filter_create missing
parameter(s)\n", 0, 0, 0);
}
- LDAPDebug (LDAP_DEBUG_FILTER, "<= bitwise_filter_create %i\n", rc, 0,
0);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= bitwise_filter_create %i\n",
rc, 0, 0);
return LDAP_SUCCESS;
}
@@ -189,6 +189,6 @@ bitwise_init (Slapi_PBlock* pb)
if ( rc == 0 ) {
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION, (void *)&pdesc );
}
- LDAPDebug (LDAP_DEBUG_FILTER, "bitwise_init %i\n", rc, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "bitwise_init %i\n", rc, 0, 0);
return rc;
}
diff --git a/ldap/servers/plugins/collation/collate.c
b/ldap/servers/plugins/collation/collate.c
index 483a132..6edf427 100644
--- a/ldap/servers/plugins/collation/collate.c
+++ b/ldap/servers/plugins/collation/collate.c
@@ -60,7 +60,7 @@ collation_config (size_t cargc, char** cargv,
/* ignore - not needed anymore with ICU - was used to get path for NLS_Initialize */
} else if (!strcasecmp (cargv[0], "collation")) {
if ( cargc < 7 ) {
- LDAPDebug (LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: line %lu ignored: only %lu arguments (expected "
"collation language country variant strength decomposition oid
...)\n",
fname, (unsigned long)lineno, (unsigned long)cargc );
@@ -76,7 +76,7 @@ collation_config (size_t cargc, char** cargv,
case 3: profile->strength = UCOL_TERTIARY; break;
case 4: profile->strength = UCOL_IDENTICAL; break;
default: profile->strength = UCOL_SECONDARY;
- LDAPDebug (LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: line %lu: strength \"%s\" not supported (will use 2)\n",
fname, (unsigned long)lineno, cargv[4]);
break;
@@ -86,7 +86,7 @@ collation_config (size_t cargc, char** cargv,
case 2: profile->decomposition = UCOL_DEFAULT; /* no break here? fall through?
wtf? */
case 3: profile->decomposition = UCOL_ON; break;
default: profile->decomposition = UCOL_DEFAULT;
- LDAPDebug (LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: line %lu: decomposition \"%s\" not supported (will use
2)\n",
fname, (unsigned long)lineno, cargv[5]);
break;
@@ -326,7 +326,7 @@ collation_index (indexer_t* ix, struct berval** bvec, struct berval**
prefixes)
}
memcpy(bk->bv_val + prefixLen, key, realLen);
bk->bv_val[bk->bv_len] = '\0';
- LDAPDebug (LDAP_DEBUG_FILTER, "collation_index(%.*s) %lu bytes\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "collation_index(%.*s) %lu
bytes\n",
bk->bv_len, bk->bv_val, (unsigned long)bk->bv_len);
keys = (struct berval**)
slapi_ch_realloc ((void*)keys, sizeof(struct berval*) * (keyn + 2));
@@ -425,13 +425,13 @@ collation_indexer_create (const char* oid)
ix = (indexer_t*) slapi_ch_calloc (1, sizeof (indexer_t));
ucol_setAttribute (coll, UCOL_STRENGTH, profile->strength, &err);
if (U_FAILURE(err)) {
- LDAPDebug (LDAP_DEBUG_ANY, "collation_indexer_create: could not "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "collation_indexer_create: could not
"
"set the collator strength for oid %s to %d: err %d\n",
oid, profile->strength, err);
}
ucol_setAttribute (coll, UCOL_DECOMPOSITION_MODE, profile->decomposition,
&err);
if (U_FAILURE(err)) {
- LDAPDebug (LDAP_DEBUG_ANY, "collation_indexer_create: could not "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "collation_indexer_create: could not
"
"set the collator decomposition mode for oid %s to %d: err %d\n",
oid, profile->decomposition, err);
}
@@ -442,7 +442,7 @@ collation_indexer_create (const char* oid)
}
}
if (!*id) {
- LDAPDebug (LDAP_DEBUG_ANY, "collation_indexer_create: id not
found\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "collation_indexer_create: id not
found\n", 0, 0, 0);
goto error;
}
@@ -454,12 +454,12 @@ collation_indexer_create (const char* oid)
/* free (etc); */
/* free (ix); */
} else if (err == U_USING_DEFAULT_WARNING) {
- LDAPDebug (LDAP_DEBUG_FILTER, "collation_indexer_create: could not "
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "collation_indexer_create: could not
"
"create an indexer for OID %s for locale %s and could not "
"use default locale\n",
oid, (locale ? locale : "(default)"), NULL);
} else { /* error */
- LDAPDebug (LDAP_DEBUG_FILTER, "collation_indexer_create: could not "
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "collation_indexer_create: could not
"
"create an indexer for OID %s for locale %s: err = %d\n",
oid, (locale ? locale : "(default)"), err);
}
diff --git a/ldap/servers/plugins/collation/config.c
b/ldap/servers/plugins/collation/config.c
index a317a0c..42aa1fd 100644
--- a/ldap/servers/plugins/collation/config.c
+++ b/ldap/servers/plugins/collation/config.c
@@ -83,7 +83,7 @@ fp_parse_line(
for ( token = strtok_quote( line, " \t" ); token != NULL;
token = strtok_quote( NULL, " \t" ) ) {
if ( *argcp == MAXARGS ) {
- LDAPDebug( LDAP_DEBUG_ANY, "Too many tokens (max %d)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Too many tokens (max %d)\n",
MAXARGS, 0, 0 );
exit( 1 );
}
@@ -156,13 +156,13 @@ collation_read_config( char *fname )
fp = fopen( fname, "r" );
if ( fp == NULL ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"could not open config file \"%s\" - absolute path?\n",
fname, 0, 0 );
return; /* Do not exit */
}
- LDAPDebug( LDAP_DEBUG_CONFIG, "reading config file %s\n", fname, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_CONFIG, LOG_DEBUG, "reading config file %s\n", fname,
0, 0 );
fp_getline_init( &lineno );
while ( (line = fp_getline( fp, &lineno )) != NULL ) {
@@ -170,10 +170,10 @@ collation_read_config( char *fname )
if ( line[0] == '#' || line[0] == '\0' ) {
continue;
}
- LDAPDebug( LDAP_DEBUG_CONFIG, "line %d: %s\n", lineno, line, 0 );
+ LDAPDebug(LDAP_DEBUG_CONFIG, LOG_DEBUG, "line %d: %s\n", lineno, line, 0 );
fp_parse_line( line, &cargc, cargv );
if ( cargc < 1 ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: line %d: bad config line (ignored)\n",
fname, lineno, 0 );
continue;
diff --git a/ldap/servers/plugins/collation/orfilter.c
b/ldap/servers/plugins/collation/orfilter.c
index a6d374d..4a22ee3 100644
--- a/ldap/servers/plugins/collation/orfilter.c
+++ b/ldap/servers/plugins/collation/orfilter.c
@@ -64,7 +64,7 @@ static int
or_filter_destroy (Slapi_PBlock* pb)
{
auto or_filter_t* or = or_filter_get (pb);
- LDAPDebug (LDAP_DEBUG_FILTER, "or_filter_destroy(%p)\n", (void*)or, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "or_filter_destroy(%p)\n",
(void*)or, 0, 0);
if (or != NULL) {
slapi_ch_free((void**)&or->or_type);
slapi_ch_free((void**)&or->or_oid);
@@ -473,7 +473,7 @@ or_filter_create (Slapi_PBlock* pb)
auto struct berval bv;
auto int reusable = MRF_ANY_TYPE;
- LDAPDebug (LDAP_DEBUG_FILTER, "=> or_filter_create(oid %s; type %s)\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> or_filter_create(oid %s; type
%s)\n",
mrOID, mrTYPE, 0);
if (len > 1 && (ix = indexer_create (mrOID)) != NULL) {
auto char* val = mrVALUE->bv_val;
@@ -535,7 +535,7 @@ or_filter_create (Slapi_PBlock* pb)
{
auto struct berval** val = or->or_values;
if (val) for (; *val; ++val) {
- LDAPDebug (LDAP_DEBUG_FILTER, "value \"%s\"\n",
(*val)->bv_val, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "value \"%s\"\n",
(*val)->bv_val, 0, 0);
}
}
if (or->or_op == SLAPI_OP_SUBSTRING) {
@@ -553,9 +553,9 @@ or_filter_create (Slapi_PBlock* pb)
rc = LDAP_SUCCESS;
}
} else {
- LDAPDebug (LDAP_DEBUG_FILTER, "=> or_filter_create missing parameter(s)\n",
0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> or_filter_create missing
parameter(s)\n", 0, 0, 0);
}
- LDAPDebug (LDAP_DEBUG_FILTER, "<= or_filter_create(%p) %i\n", (void*)or,
rc, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= or_filter_create(%p) %i\n",
(void*)or, rc, 0);
return rc;
}
@@ -573,7 +573,7 @@ static int
op_indexer_destroy (Slapi_PBlock* pb)
{
auto indexer_t* ix = op_indexer_get (pb);
- LDAPDebug (LDAP_DEBUG_FILTER, "op_indexer_destroy(%p)\n", (void*)ix, 0,
0);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "op_indexer_destroy(%p)\n",
(void*)ix, 0, 0);
if (ix != NULL) {
indexer_free (ix);
/* The keys were freed, but we need to reset the pblock pointer */
@@ -596,7 +596,7 @@ op_index_entry (Slapi_PBlock* pb)
} else {
rc = LDAP_OPERATIONS_ERROR;
}
- LDAPDebug (LDAP_DEBUG_FILTER, "op_index_entry(%p) %i\n", (void*)ix, rc,
0);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "op_index_entry(%p) %i\n",
(void*)ix, rc, 0);
return rc;
}
@@ -618,7 +618,7 @@ op_index_search (Slapi_PBlock* pb)
rc = slapi_pblock_set (pb, SLAPI_PLUGIN_MR_KEYS, or->or_index_keys);
}
}
- LDAPDebug (LDAP_DEBUG_FILTER, "op_index_search(%p) %i\n", (void*)or, rc,
0);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "op_index_search(%p) %i\n",
(void*)or, rc, 0);
return rc;
}
@@ -652,7 +652,7 @@ static void
ss_indexer_destroy (Slapi_PBlock* pb)
{
auto ss_indexer_t* ss = ss_indexer_get (pb);
- LDAPDebug (LDAP_DEBUG_FILTER, "ss_indexer_destroy(%p)\n", (void*)ss, 0,
0);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "ss_indexer_destroy(%p)\n",
(void*)ss, 0, 0);
if (ss) {
ss_indexer_free(ss);
/* The keys were freed, but we need to reset the pblock pointer */
@@ -743,7 +743,7 @@ ss_index_entry (Slapi_PBlock* pb)
slapi_ch_free((void**)&prefixes);
}
}
- LDAPDebug (LDAP_DEBUG_FILTER, "ss_index_entry(%p) %i %lu substrings\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "ss_index_entry(%p) %i %lu
substrings\n",
(void*)ss, rc, (unsigned long)substringsLen);
return rc;
}
@@ -809,7 +809,7 @@ ss_index_search (Slapi_PBlock* pb)
rc = slapi_pblock_set (pb, SLAPI_PLUGIN_MR_KEYS, or->or_index_keys);
}
}
- LDAPDebug (LDAP_DEBUG_FILTER, "ss_index_search(%p) %i\n", (void*)or, rc,
0);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "ss_index_search(%p) %i\n",
(void*)or, rc, 0);
return rc;
}
@@ -884,7 +884,7 @@ or_filter_index (Slapi_PBlock* pb)
!(rc = slapi_pblock_set (pb, SLAPI_PLUGIN_MR_OID, mrOID))) {
rc = slapi_pblock_set (pb, SLAPI_PLUGIN_MR_QUERY_OPERATOR, &mrQUERY_OPERATOR);
}
- LDAPDebug (LDAP_DEBUG_FILTER, "or_filter_index(%p) %i\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "or_filter_index(%p) %i\n",
(void*)(or ? or->or_indexer : NULL), rc, 0);
return rc;
}
@@ -896,12 +896,12 @@ or_indexer_create (Slapi_PBlock* pb)
auto char* mrOID = NULL;
auto void* mrOBJECT = NULL;
if (slapi_pblock_get (pb, SLAPI_PLUGIN_MR_OID, &mrOID) || mrOID == NULL) {
- LDAPDebug (LDAP_DEBUG_FILTER, "=> or_indexer_create: no OID parameter\n",
0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> or_indexer_create: no OID
parameter\n", 0, 0, 0);
} else {
auto indexer_t* ix = indexer_create (mrOID);
auto char* mrTYPE = NULL;
slapi_pblock_get (pb, SLAPI_PLUGIN_MR_TYPE, &mrTYPE);
- LDAPDebug (LDAP_DEBUG_FILTER, "=> or_indexer_create(oid %s; type %s)\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> or_indexer_create(oid %s; type
%s)\n",
mrOID, mrTYPE ? mrTYPE : "<NULL>", 0);
if (ix != NULL) {
if (ix->ix_index != NULL &&
@@ -944,7 +944,7 @@ or_indexer_create (Slapi_PBlock* pb)
}
}
}
- LDAPDebug (LDAP_DEBUG_FILTER, "<= or_indexer_create(%p) %i\n", mrOBJECT,
rc, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= or_indexer_create(%p) %i\n",
mrOBJECT, rc, 0);
return rc;
}
@@ -995,6 +995,6 @@ orderingRule_init (Slapi_PBlock* pb)
if ( rc == 0 ) {
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION, (void *)&pdesc );
}
- LDAPDebug (LDAP_DEBUG_FILTER, "orderingRule_init %i\n", rc, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "orderingRule_init %i\n", rc, 0,
0);
return rc;
}
diff --git a/ldap/servers/plugins/cos/cos.c b/ldap/servers/plugins/cos/cos.c
index 75ef2ba..4a1de56 100644
--- a/ldap/servers/plugins/cos/cos.c
+++ b/ldap/servers/plugins/cos/cos.c
@@ -143,7 +143,7 @@ int cos_init( Slapi_PBlock *pb )
int ret = 0;
void * plugin_identity=NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_init\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_init\n",0,0,0);
/*
** Store the plugin identity for later use.
@@ -178,7 +178,7 @@ int cos_init( Slapi_PBlock *pb )
plugin_identity);
bailout:
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_init\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_init\n",0,0,0);
return ret;
}
@@ -193,22 +193,22 @@ int cos_start( Slapi_PBlock *pb )
{
int ret = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_start\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_start\n",0,0,0);
if( !cos_cache_init() )
{
- LDAPDebug( LDAP_DEBUG_PLUGIN, "cos: ready for service\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos: ready for service\n",0,0,0);
}
else
{
/* problems we are hosed */
cos_cache_stop();
- LDAPDebug( LDAP_DEBUG_ANY, "cos_start: failed to initialise\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_start: failed to
initialise\n",0,0,0);
ret = -1;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_start\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_start\n",0,0,0);
return ret;
}
@@ -219,11 +219,11 @@ int cos_start( Slapi_PBlock *pb )
*/
int cos_close( Slapi_PBlock *pb )
{
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_close\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_close\n",0,0,0);
cos_cache_stop();
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_close\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_close\n",0,0,0);
return 0;
}
@@ -260,11 +260,11 @@ int cos_compute(computed_attr_context *c,char* type,Slapi_Entry
*e,slapi_compute
*/
int cos_post_op( Slapi_PBlock *pb )
{
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_post_op\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_post_op\n",0,0,0);
cos_cache_change_notify(pb);
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_post_op\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_post_op\n",0,0,0);
return SLAPI_PLUGIN_SUCCESS; /* always succeed */
}
diff --git a/ldap/servers/plugins/cos/cos_cache.c b/ldap/servers/plugins/cos/cos_cache.c
index e6889d8..45439b9 100644
--- a/ldap/servers/plugins/cos/cos_cache.c
+++ b/ldap/servers/plugins/cos/cos_cache.c
@@ -288,7 +288,7 @@ int cos_cache_init(void)
{
int ret = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_init\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_init\n",0,0,0);
slapi_vattrcache_cache_none();
cache_lock = slapi_new_mutex();
@@ -357,7 +357,7 @@ int cos_cache_init(void)
out:
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_init\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_init\n",0,0,0);
return ret;
}
@@ -375,7 +375,7 @@ out:
*/
static void cos_cache_wait_on_change(void *arg)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_wait_on_change
thread\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_wait_on_change
thread\n",0,0,0);
slapi_lock_mutex(stop_lock);
slapi_lock_mutex(change_lock);
@@ -428,7 +428,7 @@ static void cos_cache_wait_on_change(void *arg)
slapi_unlock_mutex(change_lock);
slapi_unlock_mutex(stop_lock);
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_wait_on_change thread
exit\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_wait_on_change thread
exit\n",0,0,0);
}
/*
@@ -446,7 +446,7 @@ static int cos_cache_create(void)
static int firstTime = 1;
int cache_built = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_create\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_create\n",0,0,0);
pNewCache = (cosCache*)slapi_ch_malloc(sizeof(cosCache));
if(pNewCache)
@@ -509,21 +509,21 @@ static int cos_cache_create(void)
{
/* we should not go on without proper schema checking */
cos_cache_release(pNewCache);
- LDAPDebug( LDAP_DEBUG_ANY, "cos_cache_create: failed to cache the
schema\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_create: failed to cache the
schema\n",0,0,0);
}
}
else
{
/* currently we cannot go on without the indexes */
cos_cache_release(pNewCache);
- LDAPDebug( LDAP_DEBUG_ANY, "cos_cache_create: failed to index
cache\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_create: failed to index
cache\n",0,0,0);
}
}
else
{
if(firstTime)
{
- LDAPDebug( LDAP_DEBUG_PLUGIN, "cos_cache_create: cos disabled\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos_cache_create: cos
disabled\n",0,0,0);
firstTime = 0;
}
@@ -531,7 +531,7 @@ static int cos_cache_create(void)
}
}
else
- LDAPDebug( LDAP_DEBUG_ANY, "cos_cache_create: memory allocation
failure\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_create: memory allocation
failure\n",0,0,0);
/* make sure we have a new cache */
@@ -563,7 +563,7 @@ static int cos_cache_create(void)
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_create\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_create\n",0,0,0);
return ret;
}
@@ -587,7 +587,7 @@ static int cos_cache_build_definition_list(cosDefinitions **pDefs, int
*vattr_ca
int cos_def_available = 0;
static int firstTime = 1;
- LDAPDebug( LDAP_DEBUG_TRACE, "-->
cos_cache_build_definition_list\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
cos_cache_build_definition_list\n",0,0,0);
/*
* The class of service definitions may be anywhere in the DIT,
@@ -597,7 +597,7 @@ static int cos_cache_build_definition_list(cosDefinitions **pDefs, int
*vattr_ca
attrs[0] = "namingcontexts";
attrs[1] = 0;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "cos: Building class of service cache after status
change.\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos: Building class of service cache after
status change.\n",0,0,0);
/*
* XXXrbyrne: this looks really inefficient--should be using
@@ -609,7 +609,7 @@ static int cos_cache_build_definition_list(cosDefinitions **pDefs, int
*vattr_ca
slapi_pblock_get( pSuffixSearch, SLAPI_PLUGIN_INTOP_RESULT, &ret);
if(!pSuffixSearch || ret != LDAP_SUCCESS) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"cos_cache_build_definition_list: failed to find suffixes\n",
0,0,0);
ret = -1;
@@ -665,14 +665,14 @@ next:
{
if(firstTime)
{
- LDAPDebug( LDAP_DEBUG_PLUGIN, "cos_cache_build_definition_list: Found no cos
definitions, cos disabled while waiting for updates\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos_cache_build_definition_list: Found
no cos definitions, cos disabled while waiting for updates\n",0,0,0);
firstTime = 0;
}
ret = -1;
}
else
- LDAPDebug( LDAP_DEBUG_PLUGIN, "cos: Class of service cache built.\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos: Class of service cache
built.\n",0,0,0);
/* clean up */
if(pSuffixSearch)
@@ -681,7 +681,7 @@ next:
slapi_pblock_destroy(pSuffixSearch);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<--
cos_cache_build_definition_list\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
cos_cache_build_definition_list\n",0,0,0);
return ret;
}
@@ -977,12 +977,12 @@ cos_dn_defs_cb (Slapi_Entry* e, void *callback_data)
* Don't reset info->ret....it keeps track of any success
*/
if ( rc == COS_DEF_ERROR_NO_TEMPLATES) {
- LDAPDebug(LDAP_DEBUG_ANY, "Skipping CoS Definition %s"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Skipping CoS Definition %s"
"--no CoS Templates found, "
"which should be added before the CoS Definition.\n",
pTmpDn, 0, 0);
} else {
- LDAPDebug(LDAP_DEBUG_ANY, "Skipping CoS Definition %s\n"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Skipping CoS Definition %s\n"
"--error(%d)\n",
pTmpDn, rc, 0);
}
@@ -999,10 +999,10 @@ cos_dn_defs_cb (Slapi_Entry* e, void *callback_data)
*/
if(pDn)
{
- LDAPDebug( LDAP_DEBUG_ANY, "cos_cache_add_dn_defs: incomplete cos definition
detected in %s, discarding from cache.\n",pDn->val,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_add_dn_defs: incomplete cos
definition detected in %s, discarding from cache.\n",pDn->val,0,0);
}
else
- LDAPDebug( LDAP_DEBUG_ANY, "cos_cache_add_dn_defs: incomplete cos definition
detected, no DN to report, discarding from cache.\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_add_dn_defs: incomplete cos
definition detected, no DN to report, discarding from cache.\n",0,0,0);
if(pCosTargetTree)
cos_cache_del_attrval_list(&pCosTargetTree);
@@ -1199,7 +1199,7 @@ static int cos_dn_tmpl_entries_cb (Slapi_Entry* e, void
*callback_data) {
info->ret = 0; /* we have succeed to add the tmpl */
} else {
/* Don't reset info->ret....it keeps track of any success */
- LDAPDebug(LDAP_DEBUG_ANY, "cos_cache_add_dn_tmpls:"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_add_dn_tmpls:"
"could not cache cos template %s\n",pDn,0,0);
}
}
@@ -1215,10 +1215,10 @@ static int cos_dn_tmpl_entries_cb (Slapi_Entry* e, void
*callback_data) {
*/
if(pDn)
{
- LDAPDebug( LDAP_DEBUG_PLUGIN, "cos_cache_add_dn_tmpls: incomplete cos template
detected in %s, discarding from cache.\n",pDn->val,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos_cache_add_dn_tmpls: incomplete cos
template detected in %s, discarding from cache.\n",pDn->val,0,0);
}
else
- LDAPDebug( LDAP_DEBUG_PLUGIN, "cos_cache_add_dn_tmpls: incomplete cos template
detected, no DN to report, discarding from cache.\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos_cache_add_dn_tmpls: incomplete cos
template detected, no DN to report, discarding from cache.\n",0,0,0);
if(pObjectclass)
cos_cache_del_attrval_list(&pObjectclass);
@@ -1259,7 +1259,7 @@ static int cos_cache_add_dn_tmpls(char *dn, cosAttrValue
*pCosSpecifier, cosAttr
struct tmpl_info info = {NULL, 0, 0, 0};
Slapi_PBlock *pDnSearch = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_add_dn_tmpls\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
cos_cache_add_dn_tmpls\n",0,0,0);
/* no cos specifier means this is an indirect scheme */
if(pCosSpecifier)
@@ -1331,17 +1331,17 @@ static int cos_cache_add_defn(
cosAttributes *pDummyAttributes = 0;
cosAttrValue *pSpecsIter = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_add_defn\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_add_defn\n",0,0,0);
if (!spec) {
- LDAPDebug( LDAP_DEBUG_ANY, "missing spec\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "missing spec\n",0,0,0);
ret = -1;
goto out;
}
pSpecsIter = *spec;
if (!tmpDn) {
- LDAPDebug( LDAP_DEBUG_ANY, "missing tmpDn\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "missing tmpDn\n",0,0,0);
ret = -1;
goto out;
}
@@ -1353,7 +1353,7 @@ static int cos_cache_add_defn(
if( cos_cache_attrval_exists(*pAttrs, pSpecsIter->val ) )
{
/* no, this is not sane, lets reject the whole darn scheme in disgust */
- LDAPDebug( LDAP_DEBUG_ANY, "cos definition %s supplies its own cosspecifier,
rejecting scheme\n",(*dn)->val,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos definition %s supplies its own
cosspecifier, rejecting scheme\n",(*dn)->val,0,0);
ret = -1;
}
@@ -1370,7 +1370,7 @@ static int cos_cache_add_defn(
/* process each template in turn */
- LDAPDebug( LDAP_DEBUG_PLUGIN, "Processing cosDefinition
%s\n",(*dn)->val,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Processing cosDefinition
%s\n",(*dn)->val,0,0);
while(pTmpTmplDn && cosType != COSTYPE_INDIRECT)
{
@@ -1384,7 +1384,7 @@ static int cos_cache_add_defn(
if(tmplCount == 0 && cosType != COSTYPE_INDIRECT)
{
/* without our golden templates we are nothing
- LDAPDebug( LDAP_DEBUG_ANY, "cos_cache_add_defn:"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_add_defn:"
"no templates for cos definition at %s.\n",(*dn)->val,0,0);*/
ret = COS_DEF_ERROR_NO_TEMPLATES;
}
@@ -1429,7 +1429,7 @@ static int cos_cache_add_defn(
theDef->pCosOpDefault = *pCosOpDefault;
cos_cache_add_ll_entry((void**)pDefs, theDef, NULL);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "Added cosDefinition
%s\n",(*dn)->val,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Added cosDefinition
%s\n",(*dn)->val,0,0);
}
}
else
@@ -1453,7 +1453,7 @@ out:
cos_cache_del_attrval_list(pAttrs);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_add_defn\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_add_defn\n",0,0,0);
return ret;
}
@@ -1464,7 +1464,7 @@ out:
*/
static void cos_cache_del_attrval_list(cosAttrValue **pVal)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_del_attrval_list\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
cos_cache_del_attrval_list\n",0,0,0);
while(*pVal)
{
@@ -1475,7 +1475,7 @@ static void cos_cache_del_attrval_list(cosAttrValue **pVal)
*pVal = pTmp;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_del_attrval_list\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
cos_cache_del_attrval_list\n",0,0,0);
}
@@ -1490,7 +1490,7 @@ cos_cache_add_attrval(cosAttrValue **attrval, char *val)
int ret = 0;
cosAttrValue *theVal;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_add_attrval\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
cos_cache_add_attrval\n",0,0,0);
/* create the attrvalue */
theVal = (cosAttrValue*) slapi_ch_malloc(sizeof(cosAttrValue));
@@ -1504,17 +1504,17 @@ cos_cache_add_attrval(cosAttrValue **attrval, char *val)
else
{
slapi_ch_free((void**)&theVal);
- LDAPDebug( LDAP_DEBUG_ANY, "cos_cache_add_attrval: failed to allocate
memory\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_add_attrval: failed to allocate
memory\n",0,0,0);
ret = -1;
}
}
else
{
- LDAPDebug( LDAP_DEBUG_ANY, "cos_cache_add_attrval: failed to allocate
memory\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_add_attrval: failed to allocate
memory\n",0,0,0);
ret = -1;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_add_attrval\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
cos_cache_add_attrval\n",0,0,0);
return ret;
}
@@ -1551,7 +1551,7 @@ static void cos_cache_add_ll_entry(void** attrval, void *theVal, int
( *compare
static int call_count = 0;
call_count++;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_add_ll_entry - recursion level
%d\n",call_count,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_add_ll_entry - recursion
level %d\n",call_count,0,0);
/*
@@ -1614,7 +1614,7 @@ static void cos_cache_add_ll_entry(void** attrval, void *theVal, int
( *compare
*attrval = theVal;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_add_ll_entry - recursion level
%d\n",call_count,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_add_ll_entry - recursion
level %d\n",call_count,0,0);
call_count--;
}
@@ -1630,7 +1630,7 @@ int cos_cache_getref(cos_cache **pptheCache)
static int first_time = 1;
cosCache **ppCache = (cosCache**)pptheCache;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_getref\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_getref\n",0,0,0);
if(first_time)
{
@@ -1642,7 +1642,7 @@ int cos_cache_getref(cos_cache **pptheCache)
if(cos_cache_create())
{
/* there was a problem or no COS definitions were found */
- LDAPDebug( LDAP_DEBUG_PLUGIN, "cos_cache_getref: no cos cache
created\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos_cache_getref: no cos cache
created\n",0,0,0);
}
}
slapi_unlock_mutex(change_lock);
@@ -1659,7 +1659,7 @@ int cos_cache_getref(cos_cache **pptheCache)
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_getref\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_getref\n",0,0,0);
return ret;
}
@@ -1673,7 +1673,7 @@ int cos_cache_addref(cos_cache *ptheCache)
int ret = 0;
cosCache *pCache = (cosCache*)ptheCache;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_addref\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_addref\n",0,0,0);
slapi_lock_mutex(cache_lock);
@@ -1682,7 +1682,7 @@ int cos_cache_addref(cos_cache *ptheCache)
slapi_unlock_mutex(cache_lock);
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_addref\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_addref\n",0,0,0);
return ret;
}
@@ -1700,7 +1700,7 @@ int cos_cache_release(cos_cache *ptheCache)
int destroy = 0;
cosCache *pOldCache = (cosCache*)ptheCache;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_release\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_release\n",0,0,0);
slapi_lock_mutex(cache_lock);
@@ -1770,7 +1770,7 @@ int cos_cache_release(cos_cache *ptheCache)
slapi_ch_free((void**)&pOldCache);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_release\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_release\n",0,0,0);
return ret;
}
@@ -1783,7 +1783,7 @@ int cos_cache_release(cos_cache *ptheCache)
*/
static void cos_cache_del_attr_list(cosAttributes **pAttrs)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_del_attr_list\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
cos_cache_del_attr_list\n",0,0,0);
while(*pAttrs)
{
@@ -1796,7 +1796,7 @@ static void cos_cache_del_attr_list(cosAttributes **pAttrs)
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_del_attr_list\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
cos_cache_del_attr_list\n",0,0,0);
}
@@ -1810,7 +1810,7 @@ static void cos_cache_del_schema(cosCache *pCache)
char *pLastName = 0;
int attr_index = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_del_schema\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
cos_cache_del_schema\n",0,0,0);
if(pCache && pCache->attrCount && pCache->ppAttrIndex)
{
@@ -1831,7 +1831,7 @@ static void cos_cache_del_schema(cosCache *pCache)
cos_cache_del_attrval_list(&(pCache->ppAttrIndex[0]->pObjectclasses));
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_del_schema\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
cos_cache_del_schema\n",0,0,0);
}
@@ -1845,7 +1845,7 @@ static int cos_cache_add_attr(cosAttributes **pAttrs, char *name,
cosAttrValue *
int ret =0;
cosAttributes *theAttr;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_add_attr\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_add_attr\n",0,0,0);
/* create the attribute */
theAttr = (cosAttributes*) slapi_ch_malloc(sizeof(cosAttributes));
@@ -1857,22 +1857,22 @@ static int cos_cache_add_attr(cosAttributes **pAttrs, char *name,
cosAttrValue *
if(theAttr->pAttrName)
{
cos_cache_add_ll_entry((void**)pAttrs, theAttr, NULL);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "cos_cache_add_attr: Added attribute
%s\n",name,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos_cache_add_attr: Added attribute
%s\n",name,0,0);
}
else
{
slapi_ch_free((void**)&theAttr);
- LDAPDebug( LDAP_DEBUG_ANY, "cos_cache_add_attr: failed to allocate
memory\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_add_attr: failed to allocate
memory\n",0,0,0);
ret = -1;
}
}
else
{
- LDAPDebug( LDAP_DEBUG_ANY, "cos_cache_add_attr: failed to allocate
memory\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_add_attr: failed to allocate
memory\n",0,0,0);
ret = -1;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_add_attr\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_add_attr\n",0,0,0);
return ret;
}
@@ -1887,7 +1887,7 @@ static int cos_cache_add_tmpl(cosTemplates **pTemplates,
cosAttrValue *dn, cosAt
int ret =0;
cosTemplates *theTemp;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_add_tmpl\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_add_tmpl\n",0,0,0);
/* create the attribute */
theTemp = (cosTemplates*) slapi_ch_malloc(sizeof(cosTemplates));
@@ -1903,7 +1903,7 @@ static int cos_cache_add_tmpl(cosTemplates **pTemplates,
cosAttrValue *dn, cosAt
slapi_ch_free_string(&dn->val);
dn->val = normed;
} else {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"cos_cache_add_tmpl: failed to normalize dn %s. "
"Processing the pre normalized dn.\n",
dn->val, 0, 0);
@@ -1997,7 +1997,7 @@ static int cos_cache_add_tmpl(cosTemplates **pTemplates,
cosAttrValue *dn, cosAt
else
{
/* mmm, should never get here, it means the dn is whacky */
- LDAPDebug( LDAP_DEBUG_ANY, "cos_cache_add_tmpl: malformed dn detected:
%s\n",dn,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_add_tmpl: malformed dn detected:
%s\n",dn,0,0);
grade[0] = '\0';
}
@@ -2016,17 +2016,17 @@ static int cos_cache_add_tmpl(cosTemplates **pTemplates,
cosAttrValue *dn, cosAt
}
cos_cache_add_ll_entry((void**)pTemplates, theTemp, NULL);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "cos_cache_add_tmpl: Added template
%s\n",dn->val,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos_cache_add_tmpl: Added template
%s\n",dn->val,0,0);
slapi_ch_free((void**)&grade);
}
else
{
- LDAPDebug( LDAP_DEBUG_ANY, "cos_cache_add_tmpl: failed to allocate
memory\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_add_tmpl: failed to allocate
memory\n",0,0,0);
ret = -1;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_add_tmpl\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_add_tmpl\n",0,0,0);
return ret;
}
@@ -2045,7 +2045,7 @@ static int cos_cache_attrval_exists(cosAttrValue *pAttrs, const char
*val)
{
int ret = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_attrval_exists\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
cos_cache_attrval_exists\n",0,0,0);
while(pAttrs)
{
@@ -2058,7 +2058,7 @@ static int cos_cache_attrval_exists(cosAttrValue *pAttrs, const char
*val)
pAttrs = pAttrs->list.pNext;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_attrval_exists\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
cos_cache_attrval_exists\n",0,0,0);
return ret;
}
@@ -2070,12 +2070,12 @@ static int cos_cache_vattr_get(vattr_sp_handle *handle,
vattr_context *c, Slapi_
int indirect_cos = 0;
int ret = -1;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_vattr_get\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_vattr_get\n",0,0,0);
if(cos_cache_getref(&pCache) < 1)
{
/* problems we are hosed */
- LDAPDebug( LDAP_DEBUG_PLUGIN, "cos_cache_vattr_get: failed to get class of service
reference\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos_cache_vattr_get: failed to get class
of service reference\n",0,0,0);
goto bail;
}
@@ -2095,7 +2095,7 @@ static int cos_cache_vattr_get(vattr_sp_handle *handle,
vattr_context *c, Slapi_
bail:
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_vattr_get\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_vattr_get\n",0,0,0);
return ret;
}
@@ -2105,12 +2105,12 @@ static int cos_cache_vattr_compare(vattr_sp_handle *handle,
vattr_context *c, Sl
int ret = -1;
cos_cache *pCache = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_vattr_compare\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
cos_cache_vattr_compare\n",0,0,0);
if(cos_cache_getref(&pCache) < 1)
{
/* problems we are hosed */
- LDAPDebug( LDAP_DEBUG_PLUGIN, "cos_cache_vattr_compare: failed to get class of
service reference\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos_cache_vattr_compare: failed to get
class of service reference\n",0,0,0);
goto bail;
}
@@ -2120,7 +2120,7 @@ static int cos_cache_vattr_compare(vattr_sp_handle *handle,
vattr_context *c, Sl
bail:
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_vattr_compare\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
cos_cache_vattr_compare\n",0,0,0);
return ret;
}
@@ -2137,12 +2137,12 @@ static int cos_cache_vattr_types(vattr_sp_handle
*handle,Slapi_Entry *e,
char *lastattr = "thisisfakeforcos";
int props = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_vattr_types\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
cos_cache_vattr_types\n",0,0,0);
if(cos_cache_getref((cos_cache **)&pCache) < 1)
{
/* problems we are hosed */
- LDAPDebug( LDAP_DEBUG_PLUGIN, "cos_cache_vattr_types: failed to get class of
service reference\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos_cache_vattr_types: failed to get
class of service reference\n",0,0,0);
goto bail;
}
@@ -2175,7 +2175,7 @@ static int cos_cache_vattr_types(vattr_sp_handle *handle,Slapi_Entry
*e,
bail:
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_vattr_types\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
cos_cache_vattr_types\n",0,0,0);
return ret;
}
@@ -2222,7 +2222,7 @@ static int cos_cache_query_attr(cos_cache *ptheCache, vattr_context
*context,
int entry_has_value = 0;
int merge_mode = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_query_attr\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
cos_cache_query_attr\n",0,0,0);
if(out_attr)
@@ -2285,7 +2285,7 @@ static int cos_cache_query_attr(cos_cache *ptheCache, vattr_context
*context,
if(pDn == 0)
{
- LDAPDebug( LDAP_DEBUG_ANY, "cos_cache_query_attr: failed to get entry
dn\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_query_attr: failed to get entry
dn\n",0,0,0);
ret = 1;
goto bail;
}
@@ -2300,13 +2300,13 @@ static int cos_cache_query_attr(cos_cache *ptheCache,
vattr_context *context,
if(slapi_entry_attr_find( e, "objectclass", &pObjclasses ))
{
- LDAPDebug( LDAP_DEBUG_ANY, "cos_cache_query_attr: failed to get objectclass from
%s\n",pDn,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_query_attr: failed to get
objectclass from %s\n",pDn,0,0);
goto bail;
}
if(!cos_cache_schema_check(pCache, attr_index, pObjclasses))
{
- LDAPDebug( LDAP_DEBUG_PLUGIN, "cos_cache_query_attr: cos attribute %s failed
schema check on dn: %s\n",type,pDn,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos_cache_query_attr: cos attribute %s
failed schema check on dn: %s\n",type,pDn,0);
goto bail;
}
}
@@ -2474,7 +2474,7 @@ static int cos_cache_query_attr(cos_cache *ptheCache, vattr_context
*context,
hit = 1;
else
{
- LDAPDebug( LDAP_DEBUG_ANY, "cos_cache_query_attr: could not create values
to return\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_query_attr: could not
create values to return\n",0,0,0);
goto bail;
}
@@ -2557,7 +2557,7 @@ static int cos_cache_query_attr(cos_cache *ptheCache, vattr_context
*context,
hit = 1;
else
{
- LDAPDebug( LDAP_DEBUG_ANY, "cos_cache_query_attr: could not create values to
return\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_query_attr: could not create
values to return\n",0,0,0);
goto bail;
}
}
@@ -2602,7 +2602,7 @@ static int cos_cache_query_attr(cos_cache *ptheCache, vattr_context
*context,
bail:
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_query_attr\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
cos_cache_query_attr\n",0,0,0);
return ret;
}
@@ -2618,7 +2618,7 @@ static int cos_cache_find_attr(cosCache *pCache, char *type)
int ret = -1; /* assume failure */
cosAttributes attr;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_find_attr\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_find_attr\n",0,0,0);
attr.pAttrName = type;
@@ -2633,7 +2633,7 @@ static int cos_cache_find_attr(cosCache *pCache, char *type)
}
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_find_attr\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_find_attr\n",0,0,0);
return ret;
}
@@ -2652,7 +2652,7 @@ static int cos_cache_schema_check(cosCache *pCache, int attr_index,
Slapi_Attr *
Slapi_Value *val;
int hint;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_schema_check\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
cos_cache_schema_check\n",0,0,0);
hint = slapi_attr_first_value( pObjclasses, &val );
while(hint != -1)
@@ -2664,7 +2664,7 @@ static int cos_cache_schema_check(cosCache *pCache, int attr_index,
Slapi_Attr *
hint = slapi_attr_next_value( pObjclasses, hint, &val );
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_schema_check\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
cos_cache_schema_check\n",0,0,0);
return ret;
}
@@ -2682,7 +2682,7 @@ static int cos_cache_schema_build(cosCache *pCache)
cosAttrValue *pLastRef = 0;
int attr_index = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_schema_build\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
cos_cache_schema_build\n",0,0,0);
if(!config_get_schemacheck())
ret = 0;
@@ -2762,7 +2762,7 @@ static int cos_cache_schema_build(cosCache *pCache)
}
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_schema_build\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
cos_cache_schema_build\n",0,0,0);
return ret;
}
@@ -2788,7 +2788,7 @@ static int cos_cache_index_all(cosCache *pCache)
{
int ret = -1;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_index_all\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_index_all\n",0,0,0);
/*
first fixup the index array so we can use qsort()
@@ -2877,7 +2877,7 @@ static int cos_cache_index_all(cosCache *pCache)
slapi_ch_free_string(&pAttrVal->val);
pAttrVal->val = normed;
} else {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"cos_cache_index_all: failed to normalize dn %s. "
"Processing the pre normalized dn.\n",
pAttrVal->val, 0, 0);
@@ -2949,7 +2949,7 @@ static int cos_cache_index_all(cosCache *pCache)
pCache->templateCount = actualCount;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "cos: cos cache index built\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos: cos cache index
built\n",0,0,0);
ret = 0;
}
@@ -2961,13 +2961,13 @@ static int cos_cache_index_all(cosCache *pCache)
if(pCache->ppTemplateList)
slapi_ch_free((void**)(&pCache->ppTemplateList));
- LDAPDebug( LDAP_DEBUG_ANY, "cos_cache_index_all: failed to allocate index
memory\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_index_all: failed to allocate index
memory\n",0,0,0);
}
}
else
- LDAPDebug( LDAP_DEBUG_ANY, "cos_cache_index_all: no attributes to
index\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_index_all: no attributes to
index\n",0,0,0);
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_index_all\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_index_all\n",0,0,0);
return ret;
}
@@ -2995,7 +2995,7 @@ static int cos_cache_total_attr_count(cosCache *pCache)
int count = 0;
cosDefinitions *pDef = pCache->pDefs;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_total_attr_count\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
cos_cache_total_attr_count\n",0,0,0);
pCache->templateCount = 0;
@@ -3020,7 +3020,7 @@ static int cos_cache_total_attr_count(cosCache *pCache)
pDef = pDef->list.pNext;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_total_attr_count\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
cos_cache_total_attr_count\n",0,0,0);
return count;
}
@@ -3087,7 +3087,7 @@ static int cos_cache_template_index_bsearch(const char *dn)
int ret = 0;
cosCache *pCache;
- LDAPDebug( LDAP_DEBUG_TRACE, "-->
cos_cache_template_index_bsearch\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
cos_cache_template_index_bsearch\n",0,0,0);
if(-1 != cos_cache_getref((cos_cache**)&pCache))
{
@@ -3097,7 +3097,7 @@ static int cos_cache_template_index_bsearch(const char *dn)
cos_cache_release((cos_cache*)pCache);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<--
cos_cache_template_index_bsearch\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
cos_cache_template_index_bsearch\n",0,0,0);
return ret;
}
@@ -3115,7 +3115,7 @@ static int cos_cache_attr_index_bsearch( const cosCache *pCache,
const cosAttrib
int ret = -1;
int index = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_attr_index_bsearch\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
cos_cache_attr_index_bsearch\n",0,0,0);
if(upper >= lower)
{
@@ -3159,7 +3159,7 @@ static int cos_cache_attr_index_bsearch( const cosCache *pCache,
const cosAttrib
else
index = -1;
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_attr_index_bsearch\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
cos_cache_attr_index_bsearch\n",0,0,0);
return index;
}
@@ -3171,7 +3171,7 @@ static int cos_cache_cmp_attr(cosAttributes *pAttr, Slapi_Value
*test_this, int
cosAttrValue *pAttrVal = pAttr->pAttrValue;
char *the_cmp = (char *)slapi_value_get_string(test_this);
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_cmp_attr\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_cmp_attr\n",0,0,0);
*result = 0;
@@ -3189,7 +3189,7 @@ static int cos_cache_cmp_attr(cosAttributes *pAttr, Slapi_Value
*test_this, int
index++;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_cmp_attr\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_cmp_attr\n",0,0,0);
return ret;
}
@@ -3208,7 +3208,7 @@ static int cos_cache_cos_2_slapi_valueset(cosAttributes *pAttr,
Slapi_ValueSet *
static Slapi_Attr *attr = 0; /* allocated once, never freed */
static int done_once = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_cos_2_slapi_attr\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
cos_cache_cos_2_slapi_attr\n",0,0,0);
/* test out_vs for existing values */
if(*out_vs)
@@ -3242,7 +3242,7 @@ static int cos_cache_cos_2_slapi_valueset(cosAttributes *pAttr,
Slapi_ValueSet *
}
else
{
- LDAPDebug( LDAP_DEBUG_ANY, "cos_cache_cos_2_slapi_attr: memory allocation
error\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_cos_2_slapi_attr: memory
allocation error\n",0,0,0);
ret = -1;
goto bail;
}
@@ -3253,13 +3253,13 @@ static int cos_cache_cos_2_slapi_valueset(cosAttributes *pAttr,
Slapi_ValueSet *
}
else
{
- LDAPDebug( LDAP_DEBUG_ANY, "cos_cache_cos_2_slapi_attr: memory allocation
error\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_cos_2_slapi_attr: memory allocation
error\n",0,0,0);
ret = -1;
}
bail:
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_cos_2_slapi_attr\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
cos_cache_cos_2_slapi_attr\n",0,0,0);
return ret;
}
@@ -3295,7 +3295,7 @@ void cos_cache_change_notify(Slapi_PBlock *pb)
int rc = 0;
int optype = -1;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_change_notify\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
cos_cache_change_notify\n",0,0,0);
/* Don't update local cache when remote entries are updated. */
slapi_pblock_get( pb, SLAPI_BACKEND, &be );
@@ -3376,7 +3376,7 @@ void cos_cache_change_notify(Slapi_PBlock *pb)
}
bail:
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_change_notify\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
cos_cache_change_notify\n",0,0,0);
}
/*
@@ -3386,7 +3386,7 @@ bail:
*/
void cos_cache_stop(void)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_stop\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_stop\n",0,0,0);
/* first deregister our state change func */
slapi_unregister_backend_state_change((void *)cos_cache_backend_state_change);
@@ -3411,7 +3411,7 @@ void cos_cache_stop(void)
slapi_destroy_condvar(start_cond); start_cond = NULL;
slapi_destroy_mutex(start_lock); start_lock = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_stop\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_stop\n",0,0,0);
}
/*
@@ -3431,7 +3431,7 @@ static int cos_cache_backwards_stricmp_and_clip(char*s1,char*s2)
s1len = strlen(s1);
s2len = strlen(s2);
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_backwards_stricmp_and_clip s1 %d s2
%d\n",s1len,s2len,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_backwards_stricmp_and_clip
s1 %d s2 %d\n",s1len,s2len,0);
if(s1len > s2len && s2len > 0)
{
@@ -3458,7 +3458,7 @@ static int cos_cache_backwards_stricmp_and_clip(char*s1,char*s2)
}
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<--
cos_cache_backwards_stricmp_and_clip\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
cos_cache_backwards_stricmp_and_clip\n",0,0,0);
return ret;
}
diff --git a/ldap/servers/plugins/http/http_client.c
b/ldap/servers/plugins/http/http_client.c
index 4ce992c..16befdb 100644
--- a/ldap/servers/plugins/http/http_client.c
+++ b/ldap/servers/plugins/http/http_client.c
@@ -113,7 +113,7 @@ int http_client_version(void)
int http_client_init(Slapi_PBlock *pb)
{
int status = HTTP_SUCCESS;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> http_client_init -- BEGIN\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> http_client_init --
BEGIN\n",0,0,0);
if ( slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
SLAPI_PLUGIN_VERSION_01 ) != 0 ||
@@ -137,7 +137,7 @@ int http_client_init(Slapi_PBlock *pb)
return HTTP_FAILURE;
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- http_client_init -- END\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- http_client_init --
END\n",0,0,0);
return status;
}
@@ -147,7 +147,7 @@ static int http_client_start(Slapi_PBlock *pb)
/**
* do some init work here
*/
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> http_client_start -- BEGIN\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> http_client_start --
BEGIN\n",0,0,0);
api[0] = 0; /* reserved for api broker use, must be zero */
api[1] = (void *)_http_init;
@@ -165,7 +165,7 @@ static int http_client_start(Slapi_PBlock *pb)
_http_init(plugin_id);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- http_client_start -- END\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- http_client_start --
END\n",0,0,0);
return status;
}
@@ -175,11 +175,11 @@ static int http_client_close(Slapi_PBlock *pb)
/**
* do cleanup
*/
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> http_client_close -- BEGIN\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> http_client_close --
BEGIN\n",0,0,0);
slapi_apib_unregister(HTTP_v1_0_GUID);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- http_client_close -- END\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- http_client_close --
END\n",0,0,0);
return status;
}
@@ -189,11 +189,11 @@ static int http_client_close(Slapi_PBlock *pb)
*/
static void _http_init(Slapi_ComponentId *plugin_id)
{
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> _http_init -- BEGIN\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> _http_init --
BEGIN\n",0,0,0);
http_impl_init(plugin_id);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- _http_init -- END\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- _http_init -- END\n",0,0,0);
}
/**
@@ -203,11 +203,11 @@ static void _http_init(Slapi_ComponentId *plugin_id)
static int _http_get_text(char *url, char **data, int *bytesRead)
{
int status = HTTP_SUCCESS;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> _http_get_text -- BEGIN\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> _http_get_text --
BEGIN\n",0,0,0);
status = http_impl_get_text(url, data, bytesRead);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- _http_get_text -- END\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- _http_get_text --
END\n",0,0,0);
return status;
}
@@ -218,11 +218,11 @@ static int _http_get_text(char *url, char **data, int *bytesRead)
static int _http_get_binary(char *url, char **data, int *bytesRead)
{
int status = HTTP_SUCCESS;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> _http_get_binary -- BEGIN\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> _http_get_binary --
BEGIN\n",0,0,0);
status = http_impl_get_binary(url, data, bytesRead);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- _http_get_binary -- END\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- _http_get_binary --
END\n",0,0,0);
return status;
}
@@ -233,11 +233,11 @@ static int _http_get_binary(char *url, char **data, int *bytesRead)
static int _http_get_redirected_uri(char *url, char **data, int *bytesRead)
{
int status = HTTP_SUCCESS;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> _http_get_redirected_uri --
BEGIN\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> _http_get_redirected_uri --
BEGIN\n",0,0,0);
status = http_impl_get_redirected_uri(url, data, bytesRead);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- _http_get_redirected_uri --
END\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- _http_get_redirected_uri --
END\n",0,0,0);
return status;
}
@@ -247,11 +247,11 @@ static int _http_get_redirected_uri(char *url, char **data, int
*bytesRead)
static int _http_post(char *url, httpheader ** httpheaderArray, char *body, char **data,
int *bytesRead)
{
int status = HTTP_SUCCESS;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> _http_post -- BEGIN\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> _http_post --
BEGIN\n",0,0,0);
status = http_impl_post(url, httpheaderArray, body, data, bytesRead);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- _http_post -- END\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- _http_post -- END\n",0,0,0);
return status;
}
@@ -260,10 +260,10 @@ static int _http_post(char *url, httpheader ** httpheaderArray, char
*body, char
*/
static void _http_shutdown( void )
{
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> _http_shutdown -- BEGIN\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> _http_shutdown --
BEGIN\n",0,0,0);
http_impl_shutdown();
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- _http_shutdown -- END\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- _http_shutdown --
END\n",0,0,0);
}
diff --git a/ldap/servers/plugins/http/http_impl.c
b/ldap/servers/plugins/http/http_impl.c
index e2a141a..f4605e2 100644
--- a/ldap/servers/plugins/http/http_impl.c
+++ b/ldap/servers/plugins/http/http_impl.c
@@ -182,14 +182,14 @@ static int doRequestRetry(const char *url, httpheader
**httpheaderArray, char *b
retrycnt = httpConfig->retryCount;
if (retrycnt == 0) {
- LDAPDebug( LDAP_DEBUG_PLUGIN, "doRequestRetry: Retry Count cannot be read.
Setting to default value of 3 \n", 0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "doRequestRetry: Retry Count cannot be
read. Setting to default value of 3 \n", 0,0,0);
retrycnt = 3;
}
status = doRequest(url, httpheaderArray, body, buf, bytesRead, reqType);
if (status != HTTP_IMPL_SUCCESS) {
- LDAPDebug( LDAP_DEBUG_PLUGIN, "doRequestRetry: Failed to perform http
request \n", 0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "doRequestRetry: Failed to perform
http request \n", 0,0,0);
while (retrycnt > 0) {
- LDAPDebug( LDAP_DEBUG_PLUGIN, "doRequestRetry: Retrying http
request %d.\n", i,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "doRequestRetry: Retrying
http request %d.\n", i,0,0);
status = doRequest(url, httpheaderArray, body, buf, bytesRead,
reqType);
if (status == HTTP_IMPL_SUCCESS) {
break;
@@ -198,8 +198,8 @@ static int doRequestRetry(const char *url, httpheader
**httpheaderArray, char *b
i++;
}
if (status != HTTP_IMPL_SUCCESS) {
- LDAPDebug( LDAP_DEBUG_ANY, "doRequestRetry: Failed to perform http
request after %d attempts.\n", i,0,0);
- LDAPDebug( LDAP_DEBUG_ANY, "doRequestRetry: Verify plugin URI configuration and
contact Directory Administrator.\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "doRequestRetry: Failed to
perform http request after %d attempts.\n", i,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "doRequestRetry: Verify plugin URI
configuration and contact Directory Administrator.\n",0,0,0);
}
}
@@ -219,9 +219,9 @@ static int doRequest(const char *url, httpheader **httpheaderArray,
char *body,
PRInt32 http_connection_time_out = 0;
PRInt32 sslOn = 0;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> doRequest -- BEGIN\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> doRequest -- BEGIN\n",0,0,0);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> url=[%s] \n",url,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> url=[%s]
\n",url,0,0);
/* Parse the URL and initialize the host, port, path */
if (parseURI(url, &host, &port, &path, &sslOn) == PR_FAILURE) {
@@ -231,7 +231,7 @@ static int doRequest(const char *url, httpheader **httpheaderArray,
char *body,
goto bail;
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> host=[%s] port[%d] path[%s]
\n",host,port,path);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> host=[%s] port[%d] path[%s]
\n",host,port,path);
/* Initialize the Net Addr */
if (PR_StringToNetAddr(host, &addr) == PR_FAILURE) {
@@ -251,7 +251,7 @@ static int doRequest(const char *url, httpheader **httpheaderArray,
char *body,
addr.inet.port = (PRUint16)port;
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> Successfully created NetAddr
\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Successfully created
NetAddr \n",0,0,0);
/* open a TCP connection to the server */
fd = PR_NewTCPSocket();
@@ -262,7 +262,7 @@ static int doRequest(const char *url, httpheader **httpheaderArray,
char *body,
goto bail;
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> Successfully created New TCP Socket
\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Successfully created New
TCP Socket \n",0,0,0);
/* immediately send the response */
setTCPNoDelay(fd);
@@ -297,7 +297,7 @@ static int doRequest(const char *url, httpheader **httpheaderArray,
char *body,
goto bail;
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> Successfully connected to host [%s]
\n",host,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Successfully connected to
host [%s] \n",host,0,0);
/* send the request to the server */
if (reqType == HTTP_REQ_TYPE_POST) {
@@ -317,7 +317,7 @@ static int doRequest(const char *url, httpheader **httpheaderArray,
char *body,
}
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> Successfully sent the request [%s]
\n",path,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Successfully sent the
request [%s] \n",path,0,0);
/* read the response */
if (processResponse(fd, buf, bytesRead, reqType) == PR_FAILURE) {
@@ -326,7 +326,7 @@ static int doRequest(const char *url, httpheader **httpheaderArray,
char *body,
status = HTTP_CLIENT_ERROR_BAD_RESPONSE;
goto bail;
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> Successfully read the
response\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Successfully read the
response\n",0,0,0);
bail:
if (host) {
PR_Free(host);
@@ -338,7 +338,7 @@ bail:
PR_Close(fd);
fd = NULL;
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- doRequest -- END\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- doRequest -- END\n",0,0,0);
return status;
}
@@ -368,7 +368,7 @@ static PRStatus processResponse(PRFileDesc *fd, char **resBUF, int
*bytesRead, i
* the HTTP_DEFAULT_BUFFER_SIZE, it will cause the server to crash. A 4k
* buffer should be good enough.
*/
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> processResponse -- BEGIN\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> processResponse --
BEGIN\n",0,0,0);
headers = (char *)PR_Calloc(1, 4 * HTTP_DEFAULT_BUFFER_SIZE);
/* Get protocol string */
@@ -390,7 +390,7 @@ static PRStatus processResponse(PRFileDesc *fd, char **resBUF, int
*bytesRead, i
tmp[index] = '\0';
protocol = PL_strdup(tmp);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> protocol=[%s]
\n",protocol,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> protocol=[%s]
\n",protocol,0,0);
/* Get status num */
index = 0;
@@ -412,7 +412,7 @@ static PRStatus processResponse(PRFileDesc *fd, char **resBUF, int
*bytesRead, i
statusNum = PL_strdup(tmp);
retcode=atoi(tmp);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> statusNum=[%s]
\n",statusNum,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> statusNum=[%s]
\n",statusNum,0,0);
if (HTTP_RESPONSE_REDIRECT && (reqType == HTTP_REQ_TYPE_REDIRECT)) {
isRedirect = PR_TRUE;
@@ -433,7 +433,7 @@ static PRStatus processResponse(PRFileDesc *fd, char **resBUF, int
*bytesRead, i
}
tmp[index] = '\0';
statusString = PL_strdup(tmp);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> statusString [%s]
\n",statusString,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> statusString [%s]
\n",statusString,0,0);
}
/**
@@ -507,7 +507,7 @@ static PRStatus processResponse(PRFileDesc *fd, char **resBUF, int
*bytesRead, i
value[index] = '\0';
index = 0;
inName = PR_TRUE;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> name=[%s]
value=[%s]\n",name,value,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> name=[%s]
value=[%s]\n",name,value,0);
if (isRedirect && !PL_strcasecmp(name,"location")) {
location = PL_strdup(value);
}
@@ -530,7 +530,7 @@ static PRStatus processResponse(PRFileDesc *fd, char **resBUF, int
*bytesRead, i
*resBUF = PL_strdup(location);
*bytesRead = strlen(location);
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> Response Buffer=[%s] bytesRead=[%d]
\n",*resBUF,*bytesRead,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Response Buffer=[%s]
bytesRead=[%d] \n",*resBUF,*bytesRead,0);
bail:
@@ -550,7 +550,7 @@ bail:
PL_strfree(location);
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- processResponse -- END\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- processResponse --
END\n",0,0,0);
return status;
}
@@ -605,7 +605,7 @@ static PRStatus sendFullData( PRFileDesc *fd, char *buf, int timeOut)
slapi_log_error( SLAPI_LOG_FATAL, HTTP_PLUGIN_SUBSYSTEM,
"sendFullData: dataSent=%d bufLen=%d -> NSPR Error code (%d)\n",
dataSent, bufLen, errcode);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "---------->NSPR Error code (%d) \n",
errcode,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "---------->NSPR Error code (%d)
\n", errcode,0,0);
return PR_FAILURE;
}
}
@@ -675,7 +675,7 @@ static PRStatus sendPostReq(PRFileDesc *fd, const char *path,
httpheader **httph
}
strcat(reqBUF, "\0");
- LDAPDebug( LDAP_DEBUG_PLUGIN, "---------->reqBUF is %s \n",reqBUF,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "---------->reqBUF is %s
\n",reqBUF,0,0);
http_connection_time_out = httpConfig->connectionTimeOut;
status = sendFullData( fd, reqBUF, http_connection_time_out);
@@ -1343,7 +1343,7 @@ static int parseHTTPConfigEntry(Slapi_Entry *e)
httpConfig->connectionTimeOut = value;
}
else {
- LDAPDebug( LDAP_DEBUG_PLUGIN, "parseHTTPConfigEntry: HTTP
Connection Time Out cannot be read. Setting to default value of 5000 ms \n", 0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "parseHTTPConfigEntry: HTTP
Connection Time Out cannot be read. Setting to default value of 5000 ms \n", 0,0,0);
httpConfig->connectionTimeOut = 5000;
}
@@ -1353,7 +1353,7 @@ static int parseHTTPConfigEntry(Slapi_Entry *e)
httpConfig->readTimeOut = value;
}
else {
- LDAPDebug( LDAP_DEBUG_PLUGIN, "parseHTTPConfigEntry: HTTP Read Time
Out cannot be read. Setting to default value of 5000 ms \n", 0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "parseHTTPConfigEntry: HTTP
Read Time Out cannot be read. Setting to default value of 5000 ms \n", 0,0,0);
httpConfig->readTimeOut = 5000;
}
diff --git a/ldap/servers/plugins/presence/presence.c
b/ldap/servers/plugins/presence/presence.c
index 0c9a485..4af3d9c 100644
--- a/ldap/servers/plugins/presence/presence.c
+++ b/ldap/servers/plugins/presence/presence.c
@@ -249,7 +249,7 @@ int presence_init( Slapi_PBlock *pb )
int status = PRESENCE_SUCCESS;
char * plugin_identity=NULL;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> presence_init -- BEGIN\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> presence_init --
BEGIN\n",0,0,0);
/**
* Store the plugin identity for later use.
@@ -274,7 +274,7 @@ int presence_init( Slapi_PBlock *pb )
status = PRESENCE_FAILURE;
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- presence_init -- END\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- presence_init --
END\n",0,0,0);
return status;
}
@@ -289,7 +289,7 @@ int presence_start( Slapi_PBlock *pb )
{
char * plugindn = NULL;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> presence_start -- begin\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> presence_start --
begin\n",0,0,0);
if(slapi_apib_get_interface(HTTP_v1_0_GUID, &_HttpAPI))
{
@@ -345,8 +345,8 @@ int presence_start( Slapi_PBlock *pb )
return PRESENCE_FAILURE;
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "presence: ready for service\n",0,0,0);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- presence_start -- end\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "presence: ready for
service\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- presence_start --
end\n",0,0,0);
return PRESENCE_SUCCESS;
}
@@ -358,11 +358,11 @@ int presence_start( Slapi_PBlock *pb )
*/
int presence_close( Slapi_PBlock *pb )
{
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> presence_close\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> presence_close\n",0,0,0);
deleteMapTables();
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- presence_close\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- presence_close\n",0,0,0);
return PRESENCE_SUCCESS;
}
@@ -386,9 +386,9 @@ static int presence_vattr_get(vattr_sp_handle *handle,
_Vmap *map = NULL;
_ConfigEntry *info = NULL;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> presence_vattr_get \n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> presence_vattr_get
\n",0,0,0);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> Type=[%s] \n",type,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Type=[%s]
\n",type,0,0);
if (imIDExists(e, type, &id, &map, &info) != PRESENCE_SUCCESS)
{
@@ -400,7 +400,7 @@ static int presence_vattr_get(vattr_sp_handle *handle,
status = PRESENCE_FAILURE;
goto cleanup;
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> ID=[%s] \n",id,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> ID=[%s] \n",id,0,0);
/**
* Now since we got a valid id we do a quick schema check
@@ -417,8 +417,8 @@ static int presence_vattr_get(vattr_sp_handle *handle,
status = makeHttpRequest(id, map, info, &returnedBUF, &size);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> size=[%d] \n",size,0,0);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> buffer=[%s]\n",(returnedBUF) ?
returnedBUF : "NULL",0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> size=[%d]
\n",size,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "---------->
buffer=[%s]\n",(returnedBUF) ? returnedBUF : "NULL",0,0);
if(status == PRESENCE_SUCCESS)
@@ -451,14 +451,14 @@ static int presence_vattr_get(vattr_sp_handle *handle,
}
cleanup:
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> Processed ID=[%s] \n",id,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Processed ID=[%s]
\n",id,0,0);
if (id != NULL ) {
slapi_ch_free((void **)&id);
}
if (returnedBUF != NULL ) {
PR_Free(returnedBUF);
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- presence_vattr_get \n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- presence_vattr_get
\n",0,0,0);
return status;
}
@@ -469,8 +469,8 @@ static int presence_vattr_compare(vattr_sp_handle *handle,
vattr_context *c, Sla
/**
* not yet implemented ???
*/
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> presence_vattr_compare \n",0,0,0);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- presence_vattr_compare \n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> presence_vattr_compare
\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- presence_vattr_compare
\n",0,0,0);
return status;
}
@@ -482,11 +482,11 @@ static int presence_vattr_types(vattr_sp_handle *handle,Slapi_Entry
*e,vattr_typ
args.entry = e;
args.context = type_context;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> presence_vattr_types\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "-->
presence_vattr_types\n",0,0,0);
PL_HashTableEnumerateEntries(_IdVattrMapTable, setTypes, &args);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- presence_vattr_types\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<--
presence_vattr_types\n",0,0,0);
return status;
}
@@ -498,7 +498,7 @@ static int loadPluginConfig(void)
Slapi_PBlock *search_pb;
Slapi_Entry **entries = NULL;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> loadPluginConfig\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> loadPluginConfig\n",0,0,0);
search_pb = slapi_pblock_new();
@@ -541,7 +541,7 @@ static int loadPluginConfig(void)
NULL
);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> parseConfigEntry \n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> parseConfigEntry \n",0,0,0);
for (i = 0; (entries[i] != NULL); i++)
{
@@ -552,9 +552,9 @@ static int loadPluginConfig(void)
goto cleanup;
}
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- parseConfigEntry \n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- parseConfigEntry \n",0,0,0);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- loadPluginConfig\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- loadPluginConfig\n",0,0,0);
cleanup:
slapi_free_search_results_internal(search_pb);
@@ -579,7 +579,7 @@ static int parseConfigEntry(Slapi_Entry *e)
*/
return PRESENCE_FAILURE;
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> key [%s] \n",key,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> key [%s]
\n",key,0,0);
/**
* Now create the config entry which will hold all the
* attributes of a presence vendor
@@ -602,7 +602,7 @@ static int parseConfigEntry(Slapi_Entry *e)
toLowerCase(value);
PL_HashTableAdd(_IdVattrMapTable, value, map);
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> nsIMStatusText [%s]
\n",value,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> nsIMStatusText [%s]
\n",value,0,0);
value = slapi_entry_attr_get_charptr(e, NS_IM_STATUS_GRAPHIC);
if (value) {
@@ -614,35 +614,35 @@ static int parseConfigEntry(Slapi_Entry *e)
PL_HashTableAdd(_IdVattrMapTable, value, map);
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> nsIMStatusGraphic [%s]
\n",value,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> nsIMStatusGraphic [%s]
\n",value,0,0);
value = slapi_entry_attr_get_charptr(e, NS_IM_URL_TEXT);
if (value) {
entry->textURL = value;
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> nsIMURLText [%s]
\n",value,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> nsIMURLText [%s]
\n",value,0,0);
value = slapi_entry_attr_get_charptr(e, NS_IM_URL_GRAPHIC);
if (value) {
entry->graphicURL = value;
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> nsIMStatusGraphic [%s]
\n",value,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> nsIMStatusGraphic [%s]
\n",value,0,0);
value = slapi_entry_attr_get_charptr(e, NS_IM_ON_VALUE_MAP_TEXT);
if (value) {
entry->onTextMap = value;
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> nsIMOnValueMapText [%s]
\n",value,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> nsIMOnValueMapText [%s]
\n",value,0,0);
value = slapi_entry_attr_get_charptr(e, NS_IM_OFF_VALUE_MAP_TEXT);
if (value) {
entry->offTextMap = value;
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> nsIMOffValueMapText [%s]
\n",value,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> nsIMOffValueMapText [%s]
\n",value,0,0);
/**
* Next 3 are binary syntax types so needs special handling
@@ -670,20 +670,20 @@ static int parseConfigEntry(Slapi_Entry *e)
entry->requestMethod = value;
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> nsIMRequestMethod [%s]
\n",value,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> nsIMRequestMethod [%s]
\n",value,0,0);
value = slapi_entry_attr_get_charptr(e, NS_IM_URL_TEXT_RETURN_TYPE);
if (value) {
entry->textReturnType = value;
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> nsIMURLTextReturnType [%s]
\n",value,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> nsIMURLTextReturnType [%s]
\n",value,0,0);
value = slapi_entry_attr_get_charptr(e, NS_IM_URL_GRAPHIC_RETURN_TYPE);
if (value) {
entry->graphicReturnType = value;
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> nsIMURLGraphicReturnType [%s]
\n",value,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> nsIMURLGraphicReturnType
[%s] \n",value,0,0);
/**
* Finally add the entry to the map table
@@ -705,8 +705,8 @@ static int imIDExists(Slapi_Entry *e, char *type, char **value, _Vmap
**map, _Co
_ConfigEntry *tEntry = NULL;
_Vmap *tMap = NULL;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> imIDExists \n",0,0,0);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> Type [%s] \n",type,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> imIDExists \n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Type [%s]
\n",type,0,0);
/**
* The public function PL_HashTableLookup modifies the
@@ -739,14 +739,14 @@ static int imIDExists(Slapi_Entry *e, char *type, char **value,
_Vmap **map, _Co
status = PRESENCE_FAILURE;
goto bail;
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> Value [%s] \n",tValue,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Value [%s]
\n",tValue,0,0);
tEntry = PL_HashTableLookupConst(_IdConfigMapTable, tMap->imID);
*value = tValue;
*entry = tEntry;
*map = tMap;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- imIDExists \n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- imIDExists \n",0,0,0);
bail:
return status;
@@ -760,7 +760,7 @@ static int makeHttpRequest(char *id, _Vmap *map, _ConfigEntry *info,
char **BUF,
char *urltosend = NULL;
int bytesRead;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> makeHttpRequest:: \n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> makeHttpRequest:: \n",0,0,0);
if (map->syntax == PRESENCE_STRING) {
url = info->textURL;
@@ -773,14 +773,14 @@ static int makeHttpRequest(char *id, _Vmap *map, _ConfigEntry *info,
char **BUF,
}
urltosend = replaceIdWithValue(url, map->imID, id);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> URL [%s] \n",urltosend,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> URL [%s]
\n",urltosend,0,0);
/**
* make an actual HTTP call now
*/
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> RequestMethod [%s] \n",
info->requestMethod,0,0);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> Syntax [%d] \n",
map->syntax,0,0);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> TextReturnType [%s] \n",
info->textReturnType,0,0);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> GraphicReturnType [%s] \n",
info->graphicReturnType,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> RequestMethod [%s]
\n", info->requestMethod,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Syntax [%d] \n",
map->syntax,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> TextReturnType [%s]
\n", info->textReturnType,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> GraphicReturnType [%s]
\n", info->graphicReturnType,0,0);
if (!strcasecmp(info->requestMethod, PRESENCE_REQUEST_METHOD_GET)) {
if (map->syntax == PRESENCE_STRING) {
if (!strcasecmp(info->textReturnType, PRESENCE_TEXT_RETURN_TYPE)) {
@@ -817,7 +817,7 @@ static int makeHttpRequest(char *id, _Vmap *map, _ConfigEntry *info,
char **BUF,
}
bail:
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- makeHttpRequest::
<%d>\n",status,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- makeHttpRequest::
<%d>\n",status,0,0);
slapi_ch_free((void**)&urltosend);
return status;
@@ -889,7 +889,7 @@ static int setIMStatus(char *id, _Vmap *map, _ConfigEntry *info,
Slapi_Attr *attr = NULL;
const struct berval *tmp = NULL;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> setIMStatus \n", 0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> setIMStatus \n", 0,0,0);
/**
* we got some data back so lets try to map it to
* the existing set of on/off data
@@ -932,15 +932,15 @@ static int setIMStatus(char *id, _Vmap *map, _ConfigEntry *info,
bval.bv_val = returnedBUF;
value1 = slapi_value_new_berval(&bval);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> returned size [%d] \n",
bval.bv_len,0,0);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> returned value [%s] \n",
bval.bv_val,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> returned size [%d]
\n", bval.bv_len,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> returned value [%s]
\n", bval.bv_val,0,0);
attr = info->onGraphicMap;
if (attr) {
slapi_attr_first_value(attr, &value2);
tmp = slapi_value_get_berval(value2);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> Stored size [%d] \n",
tmp->bv_len,0,0);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> Stored value [%s] \n",
tmp->bv_val,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Stored size [%d]
\n", tmp->bv_len,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Stored value [%s]
\n", tmp->bv_val,0,0);
if (!slapi_value_compare(attr, value1, value2)) {
value = slapi_value_new_string(PRESENCE_RETURNED_ON_TEXT);
}
@@ -973,7 +973,7 @@ static int setIMStatus(char *id, _Vmap *map, _ConfigEntry *info,
*/
value = slapi_value_new_string(PRESENCE_RETURNED_ERROR_TEXT);
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> value [%s] \n",
returnedBUF,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> value [%s] \n",
returnedBUF,0,0);
} else {
/**
* we had send a request for image
@@ -981,7 +981,7 @@ static int setIMStatus(char *id, _Vmap *map, _ConfigEntry *info,
* return instead of analyzing it
*/
if (!strcasecmp(info->graphicReturnType, PRESENCE_TEXT_RETURN_TYPE)) {
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> value [%s] \n",
returnedBUF,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> value [%s] \n",
returnedBUF,0,0);
if (!strcasecmp(info->requestMethod, PRESENCE_REQUEST_METHOD_REDIRECT)) {
/**
* a redirect case in which we should probably have a
@@ -1016,7 +1016,7 @@ static int setIMStatus(char *id, _Vmap *map, _ConfigEntry *info,
*/
}
} else {
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> value [%s] \n",
returnedBUF,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> value [%s] \n",
returnedBUF,0,0);
bval.bv_len = size;
bval.bv_val = returnedBUF;
value = slapi_value_new_berval(&bval);
@@ -1037,7 +1037,7 @@ static int setIMStatus(char *id, _Vmap *map, _ConfigEntry *info,
if (value && map->syntax == PRESENCE_STRING) {
slapi_value_free(&value);
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- setIMStatus \n", 0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- setIMStatus \n", 0,0,0);
return status;
}
@@ -1056,7 +1056,7 @@ static int setTypes(PLHashEntry *he, PRIntn i, void *arg)
_Vmap *map = (_Vmap *)he->value;
char *id = map->imID;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "--> setTypes \n", 0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> setTypes \n", 0,0,0);
status = slapi_vattr_values_get_sp(NULL, args->entry, id, &results,
&type_name_disposition, &actual_type_name, 0, &free_flags);
if(status == PRESENCE_SUCCESS)
@@ -1071,9 +1071,9 @@ static int setTypes(PLHashEntry *he, PRIntn i, void *arg)
slapi_vattr_values_free(&results, &actual_type_name, free_flags);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> ID [%s] Type[%s]\n",
actual_type_name,type,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> ID [%s] Type[%s]\n",
actual_type_name,type,0);
}
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- setTypes \n", 0,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- setTypes \n", 0,0,0);
return HT_ENUMERATE_NEXT;
}
@@ -1091,14 +1091,14 @@ logGraphicAttributeValue( Slapi_Attr *attr, const char *attrname
)
if (v) {
char *ldifvalue;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> %s size [%d] \n",
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> %s size [%d] \n",
attrname,v->bv_len,0);
ldifvalue = ldif_type_and_value_with_options(
(char *)attrname, /* XXX: had to cast away const */
v->bv_val, v->bv_len, 0 );
if ( NULL != ldifvalue ) {
- LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> %s value [\n%s]\n",
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> %s value
[\n%s]\n",
attrname,ldifvalue,0);
slapi_ch_free_string( &ldifvalue );
}
diff --git a/ldap/servers/plugins/replication/windows_connection.c
b/ldap/servers/plugins/replication/windows_connection.c
index 1ac753d..1af6267 100644
--- a/ldap/servers/plugins/replication/windows_connection.c
+++ b/ldap/servers/plugins/replication/windows_connection.c
@@ -120,7 +120,7 @@ windows_conn_new(Repl_Agmt *agmt)
{
Repl_Connection *rpc;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_new\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_new\n", 0, 0, 0 );
rpc = (Repl_Connection *)slapi_ch_malloc(sizeof(repl_connection));
if ((rpc->lock = PR_NewLock()) == NULL)
@@ -153,12 +153,12 @@ windows_conn_new(Repl_Agmt *agmt)
rpc->timeout.tv_usec = 0;
rpc->flag_agmt_changed = 0;
rpc->plain = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_new\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_new\n", 0, 0, 0 );
return rpc;
loser:
windows_conn_delete(rpc);
slapi_ch_free((void**)&rpc);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_new - loser\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_new - loser\n", 0,
0, 0 );
return NULL;
}
@@ -170,11 +170,11 @@ static PRBool
windows_conn_connected(Repl_Connection *conn)
{
PRBool return_value;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_connected\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_connected\n", 0, 0,
0 );
PR_Lock(conn->lock);
return_value = STATE_CONNECTED == conn->state;
PR_Unlock(conn->lock);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_connected\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_connected\n", 0, 0,
0 );
return return_value;
}
@@ -185,14 +185,14 @@ windows_conn_connected(Repl_Connection *conn)
static void
windows_conn_delete_internal(Repl_Connection *conn)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_delete_internal\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_delete_internal\n",
0, 0, 0 );
PR_ASSERT(NULL != conn);
close_connection_internal(conn);
/* slapi_ch_free accepts NULL pointer */
slapi_ch_free((void **)&conn->hostname);
slapi_ch_free((void **)&conn->binddn);
slapi_ch_free((void **)&conn->plain);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_delete_internal\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_delete_internal\n",
0, 0, 0 );
}
/*
@@ -204,7 +204,7 @@ windows_conn_delete(Repl_Connection *conn)
{
PRBool destroy_it = PR_FALSE;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_delete\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_delete\n", 0, 0, 0
);
PR_ASSERT(NULL != conn);
PR_Lock(conn->lock);
@@ -231,7 +231,7 @@ windows_conn_delete(Repl_Connection *conn)
{
windows_conn_delete_internal(conn);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_delete\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_delete\n", 0, 0, 0
);
}
@@ -242,22 +242,22 @@ windows_conn_delete(Repl_Connection *conn)
void
windows_conn_get_error(Repl_Connection *conn, int *operation, int *error)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_get_error\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_get_error\n", 0, 0,
0 );
PR_Lock(conn->lock);
*operation = conn->last_operation;
*error = conn->last_ldap_error;
PR_Unlock(conn->lock);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_get_error\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_get_error\n", 0, 0,
0 );
}
void
windows_conn_set_error(Repl_Connection *conn, int error)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_set_error\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_set_error\n", 0, 0,
0 );
PR_Lock(conn->lock);
conn->last_ldap_error = error;
PR_Unlock(conn->lock);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_set_error\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_set_error\n", 0, 0,
0 );
}
/*
@@ -286,7 +286,7 @@ windows_perform_operation(Repl_Connection *conn, int optype, const
char *dn,
const char *op_string = NULL;
const char *extra_op_string = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_perform_operation\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_perform_operation\n", 0,
0, 0 );
if (windows_conn_connected(conn))
{
@@ -490,7 +490,7 @@ windows_perform_operation(Repl_Connection *conn, int optype, const
char *dn,
*/
return_value = CONN_NOT_CONNECTED;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_perform_operation\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_perform_operation\n", 0,
0, 0 );
return return_value;
}
@@ -695,10 +695,10 @@ windows_search_entry_ext(Repl_Connection *conn, char* searchbase,
char *filter,
{
ConnResult return_value = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_search_entry\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_search_entry\n", 0, 0, 0
);
if (!entry) {
- LDAPDebug( LDAP_DEBUG_ANY, "windows_search_entry: NULL entry\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "windows_search_entry: NULL entry\n", 0,
0, 0 );
return_value = CONN_LOCAL_ERROR; /* entry should never == NULL here */
goto done;
}
@@ -717,7 +717,7 @@ windows_search_entry_ext(Repl_Connection *conn, char* searchbase, char
*filter,
slapi_add_controls(&serverctrls_copy, serverctrls, 1 /* make a copy we can free
*/);
- LDAPDebug( LDAP_DEBUG_REPL, "Calling windows entry search request plugin\n",
0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_REPL, LOG_DEBUG, "Calling windows entry search request
plugin\n", 0, 0, 0 );
winsync_plugin_call_pre_ad_search_cb(conn->agmt, NULL, &searchbase_copy,
&scope, &filter_copy,
&attrs, &serverctrls_copy);
@@ -748,7 +748,7 @@ next:
nummessages = ldap_count_messages(conn->ld, res);
numentries = ldap_count_entries(conn->ld, res);
numreferences = ldap_count_references(conn->ld, res);
- LDAPDebug( LDAP_DEBUG_REPL, "windows_search_entry: received %d messages, %d
entries, %d references\n",
+ LDAPDebug(LDAP_DEBUG_REPL, LOG_DEBUG, "windows_search_entry: received %d
messages, %d entries, %d references\n",
nummessages, numentries, numreferences );
}
@@ -797,7 +797,7 @@ next:
return_value = CONN_NOT_CONNECTED;
}
done:
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_search_entry\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_search_entry\n", 0, 0, 0
);
return return_value;
}
@@ -806,7 +806,7 @@ send_dirsync_search(Repl_Connection *conn)
{
ConnResult return_value;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> send_dirsync_search\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> send_dirsync_search\n", 0, 0, 0
);
if (windows_conn_connected(conn))
{
@@ -836,7 +836,7 @@ send_dirsync_search(Repl_Connection *conn)
conn->status = STATUS_SEARCHING;
op_string = "search";
- LDAPDebug( LDAP_DEBUG_REPL, "Calling dirsync search request plugin\n", 0, 0,
0 );
+ LDAPDebug(LDAP_DEBUG_REPL, LOG_DEBUG, "Calling dirsync search request
plugin\n", 0, 0, 0 );
userfilter = windows_private_get_windows_userfilter(conn->agmt);
if (userfilter) {
filter = slapi_ch_strdup(userfilter);
@@ -846,7 +846,7 @@ send_dirsync_search(Repl_Connection *conn)
winsync_plugin_call_dirsync_search_params_cb(conn->agmt, old_dn, &dn,
&scope, &filter,
&attrs, &server_controls);
- LDAPDebug( LDAP_DEBUG_REPL, "Sending dirsync search request\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_REPL, LOG_DEBUG, "Sending dirsync search request\n", 0,
0, 0 );
rc = ldap_search_ext( conn->ld, dn, scope, filter, attrs, PR_FALSE,
server_controls,
NULL /* ClientControls */, 0,0, &msgid);
@@ -889,7 +889,7 @@ send_dirsync_search(Repl_Connection *conn)
*/
return_value = CONN_NOT_CONNECTED;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= send_dirsync_search\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= send_dirsync_search\n", 0, 0, 0
);
return return_value;
}
@@ -902,12 +902,12 @@ windows_conn_send_add(Repl_Connection *conn, const char *dn, LDAPMod
**attrs,
LDAPControl **server_controls, LDAPControl ***returned_controls)
{
ConnResult res = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_send_add\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_send_add\n", 0, 0,
0 );
res = windows_perform_operation(conn, CONN_ADD, dn, attrs, NULL /* newrdn */,
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 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_send_add\n", 0, 0,
0 );
return res;
}
@@ -919,8 +919,8 @@ ConnResult
windows_conn_send_delete(Repl_Connection *conn, const char *dn,
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 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_send_delete\n", 0,
0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_send_delete\n", 0,
0, 0 );
return windows_perform_operation(conn, CONN_DELETE, dn, NULL /* attrs */,
NULL /* newrdn */, NULL /* newparent */, 0 /* deleteoldrdn */,
server_controls, NULL /* extop OID */, NULL /* extop payload */,
@@ -935,8 +935,8 @@ ConnResult
windows_conn_send_modify(Repl_Connection *conn, const char *dn, LDAPMod **mods,
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 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_send_modify\n", 0,
0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_send_modify\n", 0,
0, 0 );
return windows_perform_operation(conn, CONN_MODIFY, dn, mods, NULL /* newrdn */,
NULL /* newparent */, 0 /* deleteoldrdn */, server_controls,
NULL /* extop OID */, NULL /* extop payload */, NULL /* retoidp */,
@@ -951,8 +951,8 @@ windows_conn_send_rename(Repl_Connection *conn, const char *dn,
const char *newrdn, const char *newparent, int deleteoldrdn,
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 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_send_rename\n", 0,
0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_send_rename\n", 0,
0, 0 );
return windows_perform_operation(conn, CONN_RENAME, dn, NULL /* attrs */,
newrdn, newparent, deleteoldrdn, server_controls,
NULL /* extop OID */, NULL /* extop payload */, NULL /* retoidp */,
@@ -971,7 +971,7 @@ Slapi_Entry * windows_conn_get_search_result(Repl_Connection *conn)
LDAPMessage *lm = NULL;
char *dn = "";
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_get_search_result\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
windows_conn_get_search_result\n", 0, 0, 0 );
if (windows_conn_connected(conn))
{
@@ -1026,7 +1026,7 @@ Slapi_Entry * windows_conn_get_search_result(Repl_Connection *conn)
res = NULL;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_get_search_result\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
windows_conn_get_search_result\n", 0, 0, 0 );
return e;
}
@@ -1039,8 +1039,8 @@ windows_conn_send_extended_operation(Repl_Connection *conn, const
char *extop_oi
struct berval *payload, char **retoidp, struct berval **retdatap,
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 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
windows_conn_send_extended_operation\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
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 */,
server_controls, extop_oid, payload, retoidp, retdatap,
@@ -1067,7 +1067,7 @@ windows_conn_read_entry_attribute(Repl_Connection *conn, const char
*dn,
LDAPMessage *res = NULL;
char *attrs[2];
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_read_entry_attribute\n", 0,
0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
windows_conn_read_entry_attribute\n", 0, 0, 0 );
PR_ASSERT(NULL != type);
if (windows_conn_connected(conn))
@@ -1109,7 +1109,7 @@ windows_conn_read_entry_attribute(Repl_Connection *conn, const char
*dn,
{
return_value = CONN_NOT_CONNECTED;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_read_entry_attribute\n", 0,
0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
windows_conn_read_entry_attribute\n", 0, 0, 0 );
return return_value;
}
@@ -1121,8 +1121,8 @@ windows_conn_read_entry_attribute(Repl_Connection *conn, const char
*dn,
const char *
windows_conn_get_status(Repl_Connection *conn)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_get_status\n", 0, 0, 0 );
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_get_status\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_get_status\n", 0,
0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_get_status\n", 0,
0, 0 );
return conn->status;
}
@@ -1135,7 +1135,7 @@ windows_conn_get_status(Repl_Connection *conn)
void
windows_conn_cancel_linger(Repl_Connection *conn)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_cancel_linger\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_cancel_linger\n",
0, 0, 0 );
PR_ASSERT(NULL != conn);
PR_Lock(conn->lock);
if (conn->linger_active)
@@ -1158,7 +1158,7 @@ windows_conn_cancel_linger(Repl_Connection *conn)
agmt_get_long_name(conn->agmt));
}
PR_Unlock(conn->lock);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_cancel_linger\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_cancel_linger\n",
0, 0, 0 );
}
@@ -1174,7 +1174,7 @@ linger_timeout(time_t event_time, void *arg)
PRBool delete_now;
Repl_Connection *conn = (Repl_Connection *)arg;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> linger_timeout\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> linger_timeout\n", 0, 0, 0 );
PR_ASSERT(NULL != conn);
slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
@@ -1193,7 +1193,7 @@ linger_timeout(time_t event_time, void *arg)
{
windows_conn_delete_internal(conn);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= linger_timeout\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= linger_timeout\n", 0, 0, 0 );
}
@@ -1206,7 +1206,7 @@ windows_conn_start_linger(Repl_Connection *conn)
{
time_t now;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_start_linger\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_start_linger\n", 0,
0, 0 );
PR_ASSERT(NULL != conn);
slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
@@ -1234,7 +1234,7 @@ windows_conn_start_linger(Repl_Connection *conn)
conn->status = STATUS_LINGERING;
}
PR_Unlock(conn->lock);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_start_linger\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_start_linger\n", 0,
0, 0 );
}
@@ -1257,7 +1257,7 @@ windows_conn_connect(Repl_Connection *conn)
ConnResult return_value = CONN_OPERATION_SUCCESS;
int pw_ret = 1;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_connect\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_connect\n", 0, 0, 0
);
/** Connection already open just return SUCCESS **/
if(conn->state == STATE_CONNECTED) {
@@ -1408,7 +1408,7 @@ windows_conn_connect(Repl_Connection *conn)
{
/* We assume that a server that doesn't support dirsync is our NT4 LDAP service
*/
windows_private_set_isnt4(conn->agmt,1);
- LDAPDebug( LDAP_DEBUG_REPL, "windows_conn_connect : detected NT4 peer\n", 0,
0, 0 );
+ LDAPDebug(LDAP_DEBUG_REPL, LOG_DEBUG, "windows_conn_connect : detected NT4
peer\n", 0, 0, 0 );
} else
{
windows_private_set_isnt4(conn->agmt,0);
@@ -1418,7 +1418,7 @@ windows_conn_connect(Repl_Connection *conn)
if (CONN_IS_WIN2K3 == supports)
{
windows_private_set_iswin2k3(conn->agmt,1);
- LDAPDebug( LDAP_DEBUG_REPL, "windows_conn_connect : detected Win2k3 or later
peer\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_REPL, LOG_DEBUG, "windows_conn_connect : detected Win2k3 or
later peer\n", 0, 0, 0 );
} else
{
windows_private_set_iswin2k3(conn->agmt,0);
@@ -1442,7 +1442,7 @@ done:
creds = NULL;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_connect\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_connect\n", 0, 0, 0
);
return return_value;
}
@@ -1450,7 +1450,7 @@ done:
static void
close_connection_internal(Repl_Connection *conn)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "=> close_connection_internal\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> close_connection_internal\n", 0,
0, 0 );
if (NULL != conn->ld)
{
@@ -1464,18 +1464,18 @@ close_connection_internal(Repl_Connection *conn)
conn->supports_ds50_repl = -1;
slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
"%s: Disconnected from the consumer\n", agmt_get_long_name(conn->agmt));
- LDAPDebug( LDAP_DEBUG_TRACE, "<= close_connection_internal\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= close_connection_internal\n", 0,
0, 0 );
}
void
windows_conn_disconnect(Repl_Connection *conn)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_disconnect\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_disconnect\n", 0,
0, 0 );
PR_ASSERT(NULL != conn);
PR_Lock(conn->lock);
close_connection_internal(conn);
PR_Unlock(conn->lock);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_disconnect\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_disconnect\n", 0,
0, 0 );
}
@@ -1495,7 +1495,7 @@ windows_conn_replica_supports_ds5_repl(Repl_Connection *conn)
ConnResult return_value;
int ldap_rc;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_replica_supports_ds5_repl\n",
0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
windows_conn_replica_supports_ds5_repl\n", 0, 0, 0 );
if (windows_conn_connected(conn))
{
@@ -1564,7 +1564,7 @@ windows_conn_replica_supports_ds5_repl(Repl_Connection *conn)
/* Not connected */
return_value = CONN_NOT_CONNECTED;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_replica_supports_ds5_repl\n",
0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
windows_conn_replica_supports_ds5_repl\n", 0, 0, 0 );
return return_value;
}
@@ -1575,7 +1575,7 @@ windows_conn_replica_supports_dirsync(Repl_Connection *conn)
ConnResult return_value;
int ldap_rc;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_replica_supports_dirsync\n",
0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
windows_conn_replica_supports_dirsync\n", 0, 0, 0 );
if (getenv("WINSYNC_USE_DS")) {
/* used to fake out dirsync to think it's talking to a real ad when in fact
@@ -1636,7 +1636,7 @@ windows_conn_replica_supports_dirsync(Repl_Connection *conn)
/* Not connected */
return_value = CONN_NOT_CONNECTED;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_replica_supports_dirsync\n",
0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
windows_conn_replica_supports_dirsync\n", 0, 0, 0 );
return return_value;
}
@@ -1648,7 +1648,7 @@ 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 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
windows_conn_replica_is_win2k3\n", 0, 0, 0 );
if (windows_conn_connected(conn))
{
@@ -1702,7 +1702,7 @@ windows_conn_replica_is_win2k3(Repl_Connection *conn)
/* Not connected */
return_value = CONN_NOT_CONNECTED;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_replica_is_win2k3\n",
0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
windows_conn_replica_is_win2k3\n", 0, 0, 0 );
return return_value;
}
@@ -1718,7 +1718,7 @@ attribute_string_value_present(LDAP *ld, LDAPMessage *entry, const
char *type,
int return_value = 0;
ber_len_t vallen;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> attribute_string_value_present\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
attribute_string_value_present\n", 0, 0, 0 );
if (NULL != entry)
{
@@ -1754,7 +1754,7 @@ attribute_string_value_present(LDAP *ld, LDAPMessage *entry, const
char *type,
if (NULL != atype)
ldap_memfree(atype);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= attribute_string_value_present\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
attribute_string_value_present\n", 0, 0, 0 );
return return_value;
}
@@ -1778,24 +1778,24 @@ attribute_string_value_present(LDAP *ld, LDAPMessage *entry, const
char *type,
void
windows_conn_set_timeout(Repl_Connection *conn, long timeout)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_set_timeout\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_set_timeout\n", 0,
0, 0 );
PR_ASSERT(NULL != conn);
PR_ASSERT(timeout >= 0);
PR_Lock(conn->lock);
conn->timeout.tv_sec = timeout;
PR_Unlock(conn->lock);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_set_timeout\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_set_timeout\n", 0,
0, 0 );
}
void windows_conn_set_agmt_changed(Repl_Connection *conn)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_set_agmt_changed\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
windows_conn_set_agmt_changed\n", 0, 0, 0 );
PR_ASSERT(NULL != conn);
PR_Lock(conn->lock);
if (NULL != conn->agmt)
conn->flag_agmt_changed = 1;
PR_Unlock(conn->lock);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_conn_set_agmt_changed\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
windows_conn_set_agmt_changed\n", 0, 0, 0 );
}
static const char *
@@ -1833,7 +1833,7 @@ bind_and_check_pwp(Repl_Connection *conn, char * binddn, char
*password)
int rc;
const char *mech = bind_method_to_mech(conn->bindmethod);
- LDAPDebug( LDAP_DEBUG_TRACE, "=> bind_and_check_pwp\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> bind_and_check_pwp\n", 0, 0, 0
);
rc = slapi_ldap_bind(conn->ld, binddn, password, mech, NULL,
&ctrls, NULL, NULL);
@@ -1879,7 +1879,7 @@ bind_and_check_pwp(Repl_Connection *conn, char * binddn, char
*password)
ldap_controls_free( ctrls );
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= bind_and_check_pwp -
CONN_OPERATION_SUCCESS\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= bind_and_check_pwp -
CONN_OPERATION_SUCCESS\n", 0, 0, 0 );
return (CONN_OPERATION_SUCCESS);
}
@@ -1910,7 +1910,7 @@ bind_and_check_pwp(Repl_Connection *conn, char * binddn, char
*password)
ldap_err2string(rc), errmsg);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= bind_and_check_pwp -
CONN_OPERATION_FAILED\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= bind_and_check_pwp -
CONN_OPERATION_FAILED\n", 0, 0, 0 );
return (CONN_OPERATION_FAILED);
}
}
@@ -1974,7 +1974,7 @@ do_simple_bind (Repl_Connection *conn, LDAP *ld, char * binddn, char
*password)
{
int msgid;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> do_simple_bind\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> do_simple_bind\n", 0, 0, 0 );
if( LDAP_SUCCESS != slapi_ldap_bind( ld, binddn, password, LDAP_SASL_SIMPLE, NULL, NULL,
NULL, &msgid ) )
{
@@ -2004,7 +2004,7 @@ do_simple_bind (Repl_Connection *conn, LDAP *ld, char * binddn, char
*password)
"%s: Simple bind resumed\n",
agmt_get_long_name(conn->agmt));
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= do_simple_bind\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= do_simple_bind\n", 0, 0, 0 );
return msgid;
}
@@ -2014,14 +2014,14 @@ repl5_start_debug_timeout(int *setlevel)
{
Slapi_Eq_Context eqctx = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> repl5_start_debug_timeout\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> repl5_start_debug_timeout\n", 0,
0, 0 );
if (s_debug_timeout && s_debug_level) {
time_t now = time(NULL);
eqctx = slapi_eq_once(repl5_debug_timeout_callback, setlevel,
s_debug_timeout + now);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= repl5_start_debug_timeout\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= repl5_start_debug_timeout\n", 0,
0, 0 );
return eqctx;
}
@@ -2030,7 +2030,7 @@ repl5_stop_debug_timeout(Slapi_Eq_Context eqctx, int *setlevel)
{
char buf[20];
- LDAPDebug( LDAP_DEBUG_TRACE, "=> repl5_stop_debug_timeout\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> repl5_stop_debug_timeout\n", 0,
0, 0 );
if (eqctx && !*setlevel) {
(void)slapi_eq_cancel(eqctx);
@@ -2042,7 +2042,7 @@ repl5_stop_debug_timeout(Slapi_Eq_Context eqctx, int *setlevel)
config_set_errorlog_level("nsslapd-errorlog-level", buf, NULL, 1);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= repl5_stop_debug_timeout\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= repl5_stop_debug_timeout\n", 0,
0, 0 );
}
static void
@@ -2052,7 +2052,7 @@ repl5_debug_timeout_callback(time_t when, void *arg)
/* No longer needed as we are including the one in slap.h */
char buf[20];
- LDAPDebug( LDAP_DEBUG_TRACE, "=> repl5_debug_timeout_callback\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> repl5_debug_timeout_callback\n",
0, 0, 0 );
*setlevel = 1;
sprintf(buf, "%d", s_debug_level);
@@ -2062,5 +2062,5 @@ repl5_debug_timeout_callback(time_t when, void *arg)
"repl5_debug_timeout_callback: set debug level to %d at %ld\n",
s_debug_level, when);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= repl5_debug_timeout_callback\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= repl5_debug_timeout_callback\n",
0, 0, 0 );
}
diff --git a/ldap/servers/plugins/replication/windows_private.c
b/ldap/servers/plugins/replication/windows_private.c
index 28364e4..f8f433a 100644
--- a/ldap/servers/plugins/replication/windows_private.c
+++ b/ldap/servers/plugins/replication/windows_private.c
@@ -1698,7 +1698,7 @@ windows_plugin_callonce(void)
int idx;
for (idx = 0; theapis && theapis[idx]; ++idx) {
if (windows_plugin_add(theapis[idx], maxapi)) {
- LDAPDebug(LDAP_DEBUG_PLUGIN,
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG,
"<-- windows_plugin_callonce -- already added
windows plugin API "
"[%d][0x%p] for GUID [%s] -- end\n",
idx, theapis[idx], guid);
diff --git a/ldap/servers/plugins/replication/windows_protocol_util.c
b/ldap/servers/plugins/replication/windows_protocol_util.c
index 603ce8e..2f8c2e7 100644
--- a/ldap/servers/plugins/replication/windows_protocol_util.c
+++ b/ldap/servers/plugins/replication/windows_protocol_util.c
@@ -260,7 +260,7 @@ windows_ignore_error_and_keep_going(int error)
{
int return_value = PR_FALSE;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_ignore_error_and_keep_going\n", 0,
0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
windows_ignore_error_and_keep_going\n", 0, 0, 0 );
switch (error)
{
@@ -331,15 +331,15 @@ windows_ignore_error_and_keep_going(int error)
return_value = PR_FALSE;
break;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_ignore_error_and_keep_going\n", 0,
0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
windows_ignore_error_and_keep_going\n", 0, 0, 0 );
return return_value;
}
static const char*
op2string(int op)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "=> op2string\n", 0, 0, 0 );
- LDAPDebug( LDAP_DEBUG_TRACE, "<= op2string\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> op2string\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= op2string\n", 0, 0, 0 );
switch (op) {
case SLAPI_OPERATION_ADD:
return "add";
@@ -581,7 +581,7 @@ windows_acquire_replica(Private_Repl_Protocol *prp, RUV **ruv, int
check_ruv)
PRBool is_newer = PR_FALSE;
RUV *r = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_acquire_replica\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_acquire_replica\n", 0,
0, 0 );
if (NULL == ruv)
{
@@ -597,7 +597,7 @@ windows_acquire_replica(Private_Repl_Protocol *prp, RUV **ruv, int
check_ruv)
slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
"%s: Remote replica already acquired\n",
agmt_get_long_name(prp->agmt));
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_acquire_replica\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_acquire_replica\n", 0,
0, 0 );
return ACQUIRE_SUCCESS;
}
@@ -636,7 +636,7 @@ windows_acquire_replica(Private_Repl_Protocol *prp, RUV **ruv, int
check_ruv)
/* Once we get here we have a valid ruv */
if (is_newer == PR_FALSE && check_ruv) {
prp->last_acquire_response_code = NSDS50_REPL_UPTODATE;
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_acquire_replica -
ACQUIRE_CONSUMER_WAS_UPTODATE\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_acquire_replica -
ACQUIRE_CONSUMER_WAS_UPTODATE\n", 0, 0, 0 );
return ACQUIRE_CONSUMER_WAS_UPTODATE;
}
@@ -705,7 +705,7 @@ windows_acquire_replica(Private_Repl_Protocol *prp, RUV **ruv, int
check_ruv)
prp->replica_acquired = PR_TRUE;
}
done:
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_acquire_replica\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_acquire_replica\n", 0,
0, 0 );
return return_value;
}
@@ -713,7 +713,7 @@ done:
void
windows_release_replica(Private_Repl_Protocol *prp)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_release_replica\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_release_replica\n", 0,
0, 0 );
PR_ASSERT(NULL != prp);
PR_ASSERT(NULL != prp->conn);
@@ -725,7 +725,7 @@ windows_release_replica(Private_Repl_Protocol *prp)
prp->replica_acquired = PR_FALSE;
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_release_replica\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_release_replica\n", 0,
0, 0 );
}
@@ -1545,7 +1545,7 @@ windows_replay_update(Private_Repl_Protocol *prp,
slapi_operation_parameters *op
Slapi_Entry *local_entry = NULL;
Slapi_Entry *remote_entry = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_replay_update\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_replay_update\n", 0, 0,
0 );
local_dn = slapi_sdn_dup( op->target_address.sdn );
@@ -2039,7 +2039,7 @@ windows_create_remote_entry(Private_Repl_Protocol *prp,Slapi_Entry
*original_ent
"objectclass:top\n"
"objectclass:group\n";
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_create_remote_entry\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_create_remote_entry\n",
0, 0, 0 );
if (NULL == password) {
retval = LDAP_PARAM_ERROR;
@@ -2286,7 +2286,7 @@ error:
{
windows_dump_entry("Created new remote entry:\n",new_entry);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_create_remote_entry: %d\n",
retval, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_create_remote_entry:
%d\n", retval, 0, 0 );
return retval;
}
@@ -2301,12 +2301,12 @@ windows_entry_already_exists(Slapi_Entry *e){
Slapi_DN *sdn = NULL;
Slapi_Entry *entry = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_entry_already_exists\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_entry_already_exists\n",
0, 0, 0 );
sdn = slapi_entry_get_sdn(e);
rc = slapi_search_internal_get_entry( sdn, NULL, &entry, repl_get_plugin_identity
(PLUGIN_MULTIMASTER_REPLICATION));
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_entry_already_exists\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_entry_already_exists\n",
0, 0, 0 );
if (rc == LDAP_SUCCESS)
{
@@ -2326,7 +2326,7 @@ windows_delete_local_entry(Slapi_DN *sdn){
Slapi_PBlock *pb = NULL;
int return_value = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_delete_local_entry\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_delete_local_entry\n",
0, 0, 0 );
pb = slapi_pblock_new();
slapi_delete_internal_set_pb(pb, slapi_sdn_get_dn(sdn), NULL, NULL,
repl_get_plugin_identity(PLUGIN_MULTIMASTER_REPLICATION), 0);
@@ -2338,7 +2338,7 @@ windows_delete_local_entry(Slapi_DN *sdn){
slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
"delete operation on local entry %s returned: %d\n", slapi_sdn_get_dn(sdn),
return_value);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_delete_local_entry: %d\n",
return_value, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_delete_local_entry:
%d\n", return_value, 0, 0 );
return return_value;
}
@@ -2634,7 +2634,7 @@ windows_check_mods_for_rdn_change(Private_Repl_Protocol *prp,
LDAPMod **original
Slapi_Mod *smod = slapi_mod_new();
Slapi_Mod *last_smod = smod;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_check_mods_for_rdn_change\n", 0,
0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
windows_check_mods_for_rdn_change\n", 0, 0, 0 );
/* Iterate through the original mods, looking for a modification to the RDN attribute
*/
slapi_mods_init_byref(&smods, original_mods);
@@ -2786,7 +2786,7 @@ done:
}
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_check_mods_for_rdn_change: %d\n",
ret, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_check_mods_for_rdn_change:
%d\n", ret, 0, 0 );
return ret;
}
@@ -2809,16 +2809,16 @@ windows_map_mods_for_replay(Private_Repl_Protocol *prp,
const Slapi_DN *windows_subtree = NULL;
const subtreePair* subtree_pairs = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_map_mods_for_replay\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_map_mods_for_replay\n",
0, 0, 0 );
if (NULL == prp) {
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= windows_map_mods_for_replay; NULL protocol; NOOP\n", 0, 0,
0);
return;
}
windows_subtree = windows_private_get_windows_subtree(prp->agmt);
subtree_pairs = windows_private_get_subtreepairs(prp->agmt);
if ((NULL == windows_subtree) && (NULL == subtree_pairs)) {
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= windows_map_mods_for_replay; NULL agreement subtree;
NOOP\n", 0, 0, 0);
return;
}
@@ -3068,7 +3068,7 @@ windows_map_mods_for_replay(Private_Repl_Protocol *prp,
slapi_mods_done (&smods);
/* Extract the mods for the caller */
*returned_mods = slapi_mods_get_ldapmods_passout(&mapped_smods);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_map_mods_for_replay\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_map_mods_for_replay\n",
0, 0, 0 );
}
@@ -4479,7 +4479,7 @@ windows_create_local_entry(Private_Repl_Protocol *prp,Slapi_Entry
*remote_entry,
"ntGroupDeleteGroup:true\n"
"cn:%s\n";
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_create_local_entry\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_create_local_entry\n",
0, 0, 0 );
windows_is_remote_entry_user_or_group(remote_entry,&is_user,&is_group);
user_entry_template = is_nt4 ? local_nt4_user_entry_template :
local_user_entry_template;
@@ -4606,7 +4606,7 @@ error:
{
slapi_ch_free_string(&username);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_create_local_entry\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_create_local_entry\n",
0, 0, 0 );
return retval;
}
@@ -4676,7 +4676,7 @@ windows_generate_update_mods(Private_Repl_Protocol *prp,
Slapi_Entry *target_entry = NULL;
/* Iterate over the attributes on the remote entry, updating the local entry where
appropriate */
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_generate_update_mods\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_generate_update_mods\n",
0, 0, 0 );
*do_modify = 0;
@@ -5149,7 +5149,7 @@ windows_generate_update_mods(Private_Repl_Protocol *prp,
slapi_mods_dump(smods,"windows sync");
}
bail:
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_generate_update_mods: %d\n",
retval, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_generate_update_mods:
%d\n", retval, 0, 0 );
return retval;
}
@@ -6022,7 +6022,7 @@ windows_dirsync_inc_run(Private_Repl_Protocol *prp)
int rc = 0;
int done = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_dirsync_inc_run\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_dirsync_inc_run\n", 0,
0, 0 );
while (!done) {
Slapi_Entry *e = NULL;
@@ -6049,6 +6049,6 @@ windows_dirsync_inc_run(Private_Repl_Protocol *prp)
}
} /* While !done */
error:
- LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_dirsync_inc_run\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_dirsync_inc_run\n", 0,
0, 0 );
}
diff --git a/ldap/servers/plugins/retrocl/retrocl_trim.c
b/ldap/servers/plugins/retrocl/retrocl_trim.c
index b09f669..5e9b59f 100644
--- a/ldap/servers/plugins/retrocl/retrocl_trim.c
+++ b/ldap/servers/plugins/retrocl/retrocl_trim.c
@@ -294,7 +294,7 @@ static int trim_changelog(void)
}
}
} else {
- LDAPDebug(LDAP_DEBUG_PLUGIN, "not yet time to trim: %ld <
(%d+%d)\n",
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "not yet time to trim: %ld <
(%d+%d)\n",
now, lt, trim_interval);
}
PR_Lock( ts.ts_s_trim_mutex );
@@ -372,7 +372,7 @@ void retrocl_housekeeping ( time_t cur_time, void *noarg )
* But a client might have deleted it over protocol.
*/
first_time = retrocl_getchangetime( SLAPI_SEQ_FIRST, &ldrc );
- LDAPDebug(LDAP_DEBUG_PLUGIN,
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG,
"cltrim: ldrc=%d, first_time=%ld, cur_time=%ld\n",
ldrc,first_time,cur_time);
if ( LDAP_SUCCESS == ldrc && first_time > (time_t) 0L &&
diff --git a/ldap/servers/plugins/syntaxes/bin.c b/ldap/servers/plugins/syntaxes/bin.c
index 66dca47..221e4b5 100644
--- a/ldap/servers/plugins/syntaxes/bin.c
+++ b/ldap/servers/plugins/syntaxes/bin.c
@@ -211,11 +211,11 @@ bin_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> bin_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> bin_init\n", 0, 0, 0 );
rc = register_bin_like_plugin( pb, &bin_pdesc, bin_names,
BINARY_SYNTAX_OID );
rc |= register_matching_rule_plugins();
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= bin_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= bin_init %d\n", rc, 0, 0 );
return( rc );
}
@@ -225,10 +225,10 @@ octetstring_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> octetstring_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> octetstring_init\n", 0, 0, 0
);
rc = register_bin_like_plugin( pb, &octetstring_pdesc, octetstring_names,
OCTETSTRING_SYNTAX_OID );
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= octetstring_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= octetstring_init %d\n", rc, 0,
0 );
return( rc );
}
@@ -238,10 +238,10 @@ jpeg_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> jpeg_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> jpeg_init\n", 0, 0, 0 );
rc = register_bin_like_plugin( pb, &jpeg_pdesc, jpeg_names,
JPEG_SYNTAX_OID );
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= jpeg_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= jpeg_init %d\n", rc, 0, 0 );
return( rc );
}
@@ -251,10 +251,10 @@ fax_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> fax_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> fax_init\n", 0, 0, 0 );
rc = register_bin_like_plugin( pb, &fax_pdesc, fax_names,
FAX_SYNTAX_OID );
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= fax_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= fax_init %d\n", rc, 0, 0 );
return( rc );
}
diff --git a/ldap/servers/plugins/syntaxes/bitstring.c
b/ldap/servers/plugins/syntaxes/bitstring.c
index a399e8d..af49ec4 100644
--- a/ldap/servers/plugins/syntaxes/bitstring.c
+++ b/ldap/servers/plugins/syntaxes/bitstring.c
@@ -104,7 +104,7 @@ bitstring_init( Slapi_PBlock *pb )
{
int rc, flags;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> bitstring_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> bitstring_init\n", 0, 0, 0 );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -135,7 +135,7 @@ bitstring_init( Slapi_PBlock *pb )
(void *) bitstring_normalize );
rc |= register_matching_rule_plugins();
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= bitstring_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= bitstring_init %d\n", rc, 0, 0
);
return( rc );
}
diff --git a/ldap/servers/plugins/syntaxes/ces.c b/ldap/servers/plugins/syntaxes/ces.c
index 6ce19ca..6fd5d31 100644
--- a/ldap/servers/plugins/syntaxes/ces.c
+++ b/ldap/servers/plugins/syntaxes/ces.c
@@ -344,12 +344,12 @@ ces_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> ces_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> ces_init\n", 0, 0, 0 );
rc = register_ces_like_plugin(pb,&ia5_pdesc,ia5_names,IA5STRING_SYNTAX_OID,
ia5_validate);
rc |= register_matching_rule_plugins();
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= ces_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= ces_init %d\n", rc, 0, 0 );
return( rc );
}
@@ -358,12 +358,12 @@ uri_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> uri_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> uri_init\n", 0, 0, 0 );
rc = register_ces_like_plugin(pb,&uri_pdesc,uri_names,
"1.3.6.1.4.1.4401.1.1.1", NULL);
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= uri_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= uri_init %d\n", rc, 0, 0 );
return( rc );
}
diff --git a/ldap/servers/plugins/syntaxes/cis.c b/ldap/servers/plugins/syntaxes/cis.c
index a2cc456..dd46bd3 100644
--- a/ldap/servers/plugins/syntaxes/cis.c
+++ b/ldap/servers/plugins/syntaxes/cis.c
@@ -724,11 +724,11 @@ cis_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> cis_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> cis_init\n", 0, 0, 0 );
rc = register_cis_like_plugin( pb, &dirstring_pdesc, dirstring_names,
DIRSTRING_SYNTAX_OID, dirstring_validate );
rc |= register_matching_rule_plugins();
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= cis_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= cis_init %d\n", rc, 0, 0 );
return( rc );
}
@@ -738,10 +738,10 @@ boolean_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> boolean_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> boolean_init\n", 0, 0, 0 );
rc = register_cis_like_plugin( pb, &boolean_pdesc, boolean_names,
BOOLEAN_SYNTAX_OID, boolean_validate );
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= boolean_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= boolean_init %d\n", rc, 0, 0
);
return( rc );
}
@@ -750,10 +750,10 @@ time_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> time_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> time_init\n", 0, 0, 0 );
rc = register_cis_like_plugin( pb, &time_pdesc, time_names,
GENERALIZEDTIME_SYNTAX_OID, time_validate );
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= time_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= time_init %d\n", rc, 0, 0 );
return( rc );
}
@@ -762,10 +762,10 @@ country_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> country_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> country_init\n", 0, 0, 0 );
rc = register_cis_like_plugin( pb, &country_pdesc, country_names,
COUNTRYSTRING_SYNTAX_OID, country_validate );
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= country_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= country_init %d\n", rc, 0, 0
);
return( rc );
}
@@ -774,10 +774,10 @@ postal_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> postal_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> postal_init\n", 0, 0, 0 );
rc = register_cis_like_plugin( pb, &postal_pdesc, postal_names,
POSTALADDRESS_SYNTAX_OID, postal_validate );
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= postal_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= postal_init %d\n", rc, 0, 0 );
return( rc );
}
@@ -787,9 +787,9 @@ oid_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> oid_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> oid_init\n", 0, 0, 0 );
rc = register_cis_like_plugin( pb, &oid_pdesc, oid_names, OID_SYNTAX_OID,
oid_validate );
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= oid_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= oid_init %d\n", rc, 0, 0 );
return( rc );
}
@@ -798,10 +798,10 @@ printable_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> printable_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> printable_init\n", 0, 0, 0 );
rc = register_cis_like_plugin( pb, &printable_pdesc, printable_names,
PRINTABLESTRING_SYNTAX_OID, printable_validate );
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= printable_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= printable_init %d\n", rc, 0, 0
);
return( rc );
}
diff --git a/ldap/servers/plugins/syntaxes/deliverymethod.c
b/ldap/servers/plugins/syntaxes/deliverymethod.c
index 47e9052..6702dc4 100644
--- a/ldap/servers/plugins/syntaxes/deliverymethod.c
+++ b/ldap/servers/plugins/syntaxes/deliverymethod.c
@@ -49,7 +49,7 @@ delivery_init( Slapi_PBlock *pb )
{
int rc, flags;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> delivery_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> delivery_init\n", 0, 0, 0 );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -79,7 +79,7 @@ delivery_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_SYNTAX_NORMALIZE,
(void *) delivery_normalize );
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= delivery_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= delivery_init %d\n", rc, 0, 0
);
return( rc );
}
diff --git a/ldap/servers/plugins/syntaxes/dn.c b/ldap/servers/plugins/syntaxes/dn.c
index 12387c7..0dbc2ff 100644
--- a/ldap/servers/plugins/syntaxes/dn.c
+++ b/ldap/servers/plugins/syntaxes/dn.c
@@ -110,7 +110,7 @@ dn_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> dn_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> dn_init\n", 0, 0, 0 );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -136,7 +136,7 @@ dn_init( Slapi_PBlock *pb )
(void *) dn_normalize );
rc |= register_matching_rule_plugins();
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= dn_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= dn_init %d\n", rc, 0, 0 );
return( rc );
}
diff --git a/ldap/servers/plugins/syntaxes/facsimile.c
b/ldap/servers/plugins/syntaxes/facsimile.c
index 98b92e1..cbf7e25 100644
--- a/ldap/servers/plugins/syntaxes/facsimile.c
+++ b/ldap/servers/plugins/syntaxes/facsimile.c
@@ -49,7 +49,7 @@ facsimile_init( Slapi_PBlock *pb )
{
int rc, flags;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> facsimile_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> facsimile_init\n", 0, 0, 0 );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -79,7 +79,7 @@ facsimile_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_SYNTAX_NORMALIZE,
(void *) facsimile_normalize );
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= facsimile_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= facsimile_init %d\n", rc, 0, 0
);
return( rc );
}
diff --git a/ldap/servers/plugins/syntaxes/guide.c
b/ldap/servers/plugins/syntaxes/guide.c
index 889081e..9986fc7 100644
--- a/ldap/servers/plugins/syntaxes/guide.c
+++ b/ldap/servers/plugins/syntaxes/guide.c
@@ -59,7 +59,7 @@ guide_init( Slapi_PBlock *pb )
{
int rc, flags;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> guide_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> guide_init\n", 0, 0, 0 );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -89,7 +89,7 @@ guide_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_SYNTAX_NORMALIZE,
(void *) guide_normalize );
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= guide_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= guide_init %d\n", rc, 0, 0 );
return( rc );
}
@@ -98,7 +98,7 @@ enhancedguide_init( Slapi_PBlock *pb )
{
int rc, flags;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> guide_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> guide_init\n", 0, 0, 0 );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -126,7 +126,7 @@ enhancedguide_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_SYNTAX_VALIDATE,
(void *) enhancedguide_validate );
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= guide_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= guide_init %d\n", rc, 0, 0 );
return( rc );
}
diff --git a/ldap/servers/plugins/syntaxes/int.c b/ldap/servers/plugins/syntaxes/int.c
index a0ac682..400ad8a 100644
--- a/ldap/servers/plugins/syntaxes/int.c
+++ b/ldap/servers/plugins/syntaxes/int.c
@@ -162,7 +162,7 @@ int_init( Slapi_PBlock *pb )
{
int rc, flags;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> int_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> int_init\n", 0, 0, 0 );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -189,7 +189,7 @@ int_init( Slapi_PBlock *pb )
(void *) int_normalize );
rc |= register_matching_rule_plugins();
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= int_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= int_init %d\n", rc, 0, 0 );
return( rc );
}
diff --git a/ldap/servers/plugins/syntaxes/nameoptuid.c
b/ldap/servers/plugins/syntaxes/nameoptuid.c
index b31d506..98b319e 100644
--- a/ldap/servers/plugins/syntaxes/nameoptuid.c
+++ b/ldap/servers/plugins/syntaxes/nameoptuid.c
@@ -109,7 +109,7 @@ nameoptuid_init( Slapi_PBlock *pb )
{
int rc, flags;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> nameoptuid_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> nameoptuid_init\n", 0, 0, 0 );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -140,7 +140,7 @@ nameoptuid_init( Slapi_PBlock *pb )
(void *) nameoptuid_normalize );
rc |= register_matching_rule_plugins();
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= nameoptuid_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= nameoptuid_init %d\n", rc, 0, 0
);
return( rc );
}
diff --git a/ldap/servers/plugins/syntaxes/numericstring.c
b/ldap/servers/plugins/syntaxes/numericstring.c
index 2c3beaf..9d6a412 100644
--- a/ldap/servers/plugins/syntaxes/numericstring.c
+++ b/ldap/servers/plugins/syntaxes/numericstring.c
@@ -167,7 +167,7 @@ numstr_init( Slapi_PBlock *pb )
{
int rc, flags;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> numstr_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> numstr_init\n", 0, 0, 0 );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -194,7 +194,7 @@ numstr_init( Slapi_PBlock *pb )
(void *) numstr_normalize );
rc |= register_matching_rule_plugins();
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= numstr_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= numstr_init %d\n", rc, 0, 0 );
return( rc );
}
diff --git a/ldap/servers/plugins/syntaxes/sicis.c
b/ldap/servers/plugins/syntaxes/sicis.c
index dc8a35d..93b75e5 100644
--- a/ldap/servers/plugins/syntaxes/sicis.c
+++ b/ldap/servers/plugins/syntaxes/sicis.c
@@ -54,7 +54,7 @@ sicis_init( Slapi_PBlock *pb )
{
int rc, flags;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> sicis_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> sicis_init\n", 0, 0, 0 );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -82,7 +82,7 @@ sicis_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_SYNTAX_NORMALIZE,
(void *) sicis_normalize );
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= sicis_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= sicis_init %d\n", rc, 0, 0 );
return( rc );
}
diff --git a/ldap/servers/plugins/syntaxes/string.c
b/ldap/servers/plugins/syntaxes/string.c
index 149663b..541870f 100644
--- a/ldap/servers/plugins/syntaxes/string.c
+++ b/ldap/servers/plugins/syntaxes/string.c
@@ -181,7 +181,7 @@ string_filter_approx( struct berval *bvfilter, Slapi_Value **bvals,
if (0 != rc) {
rc = -1;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= string_filter_approx %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= string_filter_approx %d\n",
rc, 0, 0 );
return( rc );
@@ -208,7 +208,7 @@ string_filter_sub( Slapi_PBlock *pb, char *initial, char **any, char
*final,
int free_re = 1;
struct subfilt *sf = NULL;
- LDAPDebug( LDAP_DEBUG_FILTER, "=> string_filter_sub\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> string_filter_sub\n", 0, 0, 0
);
if (pb) {
slapi_pblock_get( pb, SLAPI_OPERATION, &op );
}
@@ -322,13 +322,13 @@ string_filter_sub( Slapi_PBlock *pb, char *initial, char **any, char
*final,
tmpbuf = NULL;
re = slapi_re_comp( p, &re_result );
if (NULL == re) {
- LDAPDebug( LDAP_DEBUG_ANY, "re_comp (%s) failed (%s): %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "re_comp (%s) failed (%s): %s\n",
pat, p, re_result?re_result:"unknown" );
rc = LDAP_OPERATIONS_ERROR;
goto bailout;
} else if (slapi_is_loglevel_set(SLAPI_LOG_TRACE)) {
char ebuf[BUFSIZ];
- LDAPDebug(LDAP_DEBUG_TRACE, "re_comp (%s)\n", escape_string(p, ebuf), 0,
0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "re_comp (%s)\n", escape_string(p,
ebuf), 0, 0);
}
}
@@ -376,7 +376,7 @@ string_filter_sub( Slapi_PBlock *pb, char *initial, char **any, char
*final,
if (slapi_is_loglevel_set(SLAPI_LOG_TRACE)) {
char ebuf[BUFSIZ];
- LDAPDebug(LDAP_DEBUG_TRACE, "re_exec (%s) %i\n", escape_string(realval,
ebuf), tmprc, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "re_exec (%s) %i\n",
escape_string(realval, ebuf), tmprc, 0);
}
if ( tmprc == 1 ) {
rc = 0;
@@ -393,7 +393,7 @@ bailout:
slapi_ch_free((void**)&tmpbuf ); /* NULL is fine */
slapi_ch_free((void**)&bigpat ); /* NULL is fine */
- LDAPDebug( LDAP_DEBUG_FILTER, "<= string_filter_sub %d\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= string_filter_sub %d\n",
rc, 0, 0 );
return( rc );
}
@@ -738,7 +738,7 @@ string_assertion2keys_ava(
}
break;
default:
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"string_assertion2keys_ava: unknown ftype 0x%x\n",
ftype, 0, 0 );
break;
@@ -920,7 +920,7 @@ substring_comp_keys(
PR_ASSERT(NULL != comp_buf);
PR_ASSERT(NULL != substrlens);
- LDAPDebug( LDAP_DEBUG_TRACE, "=> substring_comp_keys (%s) %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> substring_comp_keys (%s)
%d\n",
str, prepost, 0 );
/* prepend ^ for initial substring */
@@ -963,5 +963,5 @@ substring_comp_keys(
(*nsubs)++;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= substring_comp_keys\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= substring_comp_keys\n", 0, 0,
0 );
}
diff --git a/ldap/servers/plugins/syntaxes/tel.c b/ldap/servers/plugins/syntaxes/tel.c
index 6a5d92f..a777bdf 100644
--- a/ldap/servers/plugins/syntaxes/tel.c
+++ b/ldap/servers/plugins/syntaxes/tel.c
@@ -151,7 +151,7 @@ tel_init( Slapi_PBlock *pb )
{
int rc, flags;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> tel_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> tel_init\n", 0, 0, 0 );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -182,7 +182,7 @@ tel_init( Slapi_PBlock *pb )
(void *) tel_normalize );
rc |= register_matching_rule_plugins();
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= tel_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= tel_init %d\n", rc, 0, 0 );
return( rc );
}
diff --git a/ldap/servers/plugins/syntaxes/teletex.c
b/ldap/servers/plugins/syntaxes/teletex.c
index ae713ce..8255869 100644
--- a/ldap/servers/plugins/syntaxes/teletex.c
+++ b/ldap/servers/plugins/syntaxes/teletex.c
@@ -49,7 +49,7 @@ teletex_init( Slapi_PBlock *pb )
{
int rc, flags;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> teletex_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> teletex_init\n", 0, 0, 0 );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -79,7 +79,7 @@ teletex_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_SYNTAX_NORMALIZE,
(void *) teletex_normalize );
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= teletex_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= teletex_init %d\n", rc, 0, 0
);
return( rc );
}
diff --git a/ldap/servers/plugins/syntaxes/telex.c
b/ldap/servers/plugins/syntaxes/telex.c
index 99525af..14405f2 100644
--- a/ldap/servers/plugins/syntaxes/telex.c
+++ b/ldap/servers/plugins/syntaxes/telex.c
@@ -48,7 +48,7 @@ telex_init( Slapi_PBlock *pb )
{
int rc, flags;
- LDAPDebug( LDAP_DEBUG_PLUGIN, "=> telex_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> telex_init\n", 0, 0, 0 );
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
(void *) SLAPI_PLUGIN_VERSION_01 );
@@ -78,7 +78,7 @@ telex_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_SYNTAX_NORMALIZE,
(void *) telex_normalize );
- LDAPDebug( LDAP_DEBUG_PLUGIN, "<= telex_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= telex_init %d\n", rc, 0, 0 );
return( rc );
}
diff --git a/ldap/servers/plugins/syntaxes/value.c
b/ldap/servers/plugins/syntaxes/value.c
index ef496ee..360e57f 100644
--- a/ldap/servers/plugins/syntaxes/value.c
+++ b/ldap/servers/plugins/syntaxes/value.c
@@ -368,7 +368,7 @@ value_cmp(
} else if (syntax & SYNTAX_CES) {
rc = strcmp( v1->bv_val, v2->bv_val );
} else { /* error - unknown syntax */
- LDAPDebug(LDAP_DEBUG_PLUGIN,
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG,
"invalid syntax [%d]\n", syntax, 0, 0);
}
diff --git a/ldap/servers/slapd/abandon.c b/ldap/servers/slapd/abandon.c
index 9a39f6a..72680d7 100644
--- a/ldap/servers/slapd/abandon.c
+++ b/ldap/servers/slapd/abandon.c
@@ -38,7 +38,7 @@ do_abandon( Slapi_PBlock *pb )
Operation *o;
BerElement *ber = pb->pb_op->o_ber;
- LDAPDebug( LDAP_DEBUG_TRACE, "do_abandon\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "do_abandon\n", 0, 0, 0 );
/*
* Parse the abandon request. It looks like this:
@@ -47,7 +47,7 @@ do_abandon( Slapi_PBlock *pb )
*/
if ( ber_scanf( ber, "i", &id ) == LBER_ERROR ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ber_scanf failed (op=Abandon; params=ID)\n",
0, 0 ,0 );
return;
@@ -61,14 +61,14 @@ do_abandon( Slapi_PBlock *pb )
* pass them to the backend.
*/
if ( (err = get_ldapmessage_controls( pb, ber, NULL )) != 0 ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"get_ldapmessage_controls failed: %d (%s) (op=Abandon)\n",
err, ldap_err2string( err ), 0);
/* LDAP does not allow any response to an abandon */
return;
}
- LDAPDebug( LDAP_DEBUG_ARGS, "do_abandon: id %d\n", id, 0 ,0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "do_abandon: id %d\n", id, 0 ,0 );
/*
* find the operation being abandoned and set the o_abandon
@@ -97,7 +97,7 @@ do_abandon( Slapi_PBlock *pb )
if (ts) {
operation_set_target_spec (pb->pb_op, ts);
} else {
- LDAPDebug( LDAP_DEBUG_TRACE, "do_abandon: no target spec of abandoned
operation\n", 0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "do_abandon: no target spec of
abandoned operation\n", 0,0,0);
}
operation_set_abandoned_op (pb->pb_op, o->o_abandoned_op);
diff --git a/ldap/servers/slapd/add.c b/ldap/servers/slapd/add.c
index 0f38318..bfe5054 100644
--- a/ldap/servers/slapd/add.c
+++ b/ldap/servers/slapd/add.c
@@ -61,7 +61,7 @@ do_add( Slapi_PBlock *pb )
int rc;
PRBool searchsubentry=PR_TRUE;
- LDAPDebug( LDAP_DEBUG_TRACE, "do_add\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "do_add\n", 0, 0, 0 );
slapi_pblock_get( pb, SLAPI_OPERATION, &operation);
ber = operation->o_ber;
@@ -86,7 +86,7 @@ do_add( Slapi_PBlock *pb )
Slapi_DN mysdn;
if ( ber_scanf( ber, "{a", &rawdn ) == LBER_ERROR ) {
slapi_ch_free_string(&rawdn);
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ber_scanf failed (op=Add; params=DN)\n", 0, 0, 0 );
op_shared_log_error_access (pb, "ADD", "???", "decoding
error");
send_ldap_result( pb, LDAP_PROTOCOL_ERROR, NULL,
@@ -121,7 +121,7 @@ do_add( Slapi_PBlock *pb )
slapi_entry_init_ext(e, &mysdn, NULL);
slapi_sdn_done(&mysdn);
}
- LDAPDebug( LDAP_DEBUG_ARGS, " do_add: dn (%s)\n", slapi_entry_get_dn_const(e),
0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " do_add: dn (%s)\n",
slapi_entry_get_dn_const(e), 0, 0 );
/* get the attrs */
for ( tag = ber_first_element( ber, &len, &last );
@@ -140,7 +140,7 @@ do_add( Slapi_PBlock *pb )
}
if ( vals == NULL ) {
- LDAPDebug( LDAP_DEBUG_ANY, "no values for type %s\n", type, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "no values for type %s\n", type, 0, 0 );
op_shared_log_error_access (pb, "ADD", slapi_sdn_get_dn
(slapi_entry_get_sdn_const(e)), "null value");
send_ldap_result( pb, LDAP_PROTOCOL_ERROR, NULL, NULL,
0, NULL );
@@ -787,7 +787,7 @@ add_created_attrs(Slapi_PBlock *pb, Slapi_Entry *e)
struct slapi_componentid *cid = NULL;
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
- LDAPDebug(LDAP_DEBUG_TRACE, "add_created_attrs\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "add_created_attrs\n", 0, 0, 0);
bvals[0] = &bv;
bvals[1] = NULL;
@@ -881,7 +881,7 @@ static int check_rdn_for_created_attrs(Slapi_Entry *e)
for (i = 0; type[i] != NULL; i++) {
if (slapi_rdn_contains_attr(rdn, type[i], &value)) {
- LDAPDebug(LDAP_DEBUG_TRACE, "Invalid DN. RDN contains %s
attribute\n", type[i], 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "Invalid DN. RDN contains %s
attribute\n", type[i], 0, 0);
rc = 1;
break;
}
@@ -889,7 +889,7 @@ static int check_rdn_for_created_attrs(Slapi_Entry *e)
slapi_rdn_free(&rdn);
} else {
- LDAPDebug(LDAP_DEBUG_TRACE, "check_rdn_for_created_attrs: Error allocating
RDN\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "check_rdn_for_created_attrs: Error
allocating RDN\n", 0, 0, 0);
rc = -1;
}
@@ -907,7 +907,7 @@ static void handle_fast_add(Slapi_PBlock *pb, Slapi_Entry *entry)
if ((be == NULL) || (be->be_wire_import == NULL)) {
/* can this even happen? */
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"handle_fast_add: backend not supported\n", 0, 0, 0);
send_ldap_result(pb, LDAP_NOT_SUPPORTED, NULL, NULL, 0, NULL);
return;
@@ -924,7 +924,7 @@ static void handle_fast_add(Slapi_PBlock *pb, Slapi_Entry *entry)
if (operation_is_flag_set(operation, OP_FLAG_ACTION_SCHEMA_CHECK) &&
(slapi_entry_schema_check(pb, entry) != 0)) {
char *errtext;
- LDAPDebug(LDAP_DEBUG_TRACE, "entry failed schema check\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "entry failed schema check\n",
0, 0, 0);
slapi_pblock_get(pb, SLAPI_PB_RESULT_TEXT, &errtext);
send_ldap_result(pb, LDAP_OBJECT_CLASS_VIOLATION, NULL, errtext, 0, NULL);
slapi_entry_free(entry);
@@ -934,7 +934,7 @@ static void handle_fast_add(Slapi_PBlock *pb, Slapi_Entry *entry)
/* syntax check */
if (slapi_entry_syntax_check(pb, entry, 0) != 0) {
char *errtext;
- LDAPDebug(LDAP_DEBUG_TRACE, "entry failed syntax check\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "entry failed syntax check\n",
0, 0, 0);
slapi_pblock_get(pb, SLAPI_PB_RESULT_TEXT, &errtext);
send_ldap_result(pb, LDAP_INVALID_SYNTAX, NULL, errtext, 0, NULL);
slapi_entry_free(entry);
@@ -954,7 +954,7 @@ static void handle_fast_add(Slapi_PBlock *pb, Slapi_Entry *entry)
slapi_pblock_set(pb, SLAPI_BULK_IMPORT_STATE, &ret);
ret = (*be->be_wire_import)(pb);
if (ret != 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"wire import: error during import (%d)\n",
ret, 0, 0);
send_ldap_result(pb, LDAP_OPERATIONS_ERROR,
@@ -988,7 +988,7 @@ add_uniqueid (Slapi_Entry *e)
}
else
{
- LDAPDebug(LDAP_DEBUG_ANY, "add_created_attrs: uniqueid generation failed for %s;
error = %d\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "add_created_attrs: uniqueid generation failed
for %s; error = %d\n",
slapi_entry_get_dn_const(e), rc, 0);
}
diff --git a/ldap/servers/slapd/attrsyntax.c b/ldap/servers/slapd/attrsyntax.c
index 25078fe..b34216a 100644
--- a/ldap/servers/slapd/attrsyntax.c
+++ b/ldap/servers/slapd/attrsyntax.c
@@ -119,14 +119,14 @@ check_oid( const char *oid ) {
if ( oid == NULL) {
/* this is bad */
- LDAPDebug (LDAP_DEBUG_ANY, "NULL passed to check_oid\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "NULL passed to check_oid\n",0,0,0);
return 0;
}
length_oid = strlen(oid);
if (length_oid < 4) {
/* this is probably bad */
- LDAPDebug (LDAP_DEBUG_ANY, "Bad oid %s passed to check_oid\n",oid,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Bad oid %s passed to
check_oid\n",oid,0,0);
return 0;
}
@@ -141,14 +141,14 @@ check_oid( const char *oid ) {
if ( !isdigit(oid[0]) ||
!isdigit(oid[length_oid-1]) ) {
- LDAPDebug (LDAP_DEBUG_ANY, "Non numeric oid %s passed to
check_oid\n",oid,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Non numeric oid %s passed to
check_oid\n",oid,0,0);
return 0;
}
/* check to see that it contains only digits and dots */
for ( i = 0; i < length_oid; i++ ) {
if ( !isdigit(oid[i]) && oid[i] != '.' ){
- LDAPDebug (LDAP_DEBUG_ANY, "Non numeric oid %s passed to
check_oid\n",oid,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Non numeric oid %s passed to
check_oid\n",oid,0,0);
return 0;
}
}
@@ -174,7 +174,7 @@ attr_syntax_check_oids()
PLHashEntry *he = oid2asi->buckets[ii-1];
for (; he; he = he->next) {
if (!check_oid(he->key)) {
- LDAPDebug(LDAP_DEBUG_ANY, "Error: bad oid %s in bucket %d\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: bad oid %s in bucket %d\n",
he->key, ii-1, 0);
nbad++;
}
@@ -670,7 +670,7 @@ int default_dirstring_values2keys( Slapi_PBlock *pb, Slapi_Value
**bvals,Slapi_V
case LDAP_FILTER_SUBSTRINGS:
default:
/* default plugin only handles equality so far */
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"default_dirstring_values2keys: unsupported ftype 0x%x\n",
ftype, 0, 0 );
break;
diff --git a/ldap/servers/slapd/auth.c b/ldap/servers/slapd/auth.c
index 18cb7f9..f7dd9ce 100644
--- a/ldap/servers/slapd/auth.c
+++ b/ldap/servers/slapd/auth.c
@@ -59,7 +59,7 @@ slapu_search_s( LDAP* ld, const char* rawbaseDN, int scope, const char*
filter,
slapi_sdn_free(&sdn);
return err;
}
- LDAPDebug (LDAP_DEBUG_TRACE, "=> slapu_search_s (\"%s\", %i,
%s)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> slapu_search_s (\"%s\",
%i, %s)\n",
baseDN, scope, filter);
if (filter == NULL) filter = "objectclass=*";
@@ -86,18 +86,18 @@ slapu_search_s( LDAP* ld, const char* rawbaseDN, int scope, const
char* filter,
pb = NULL;
if (scope == LDAP_SCOPE_SUBTREE) {
char fbuf[ BUFSIZ ];
- LDAPDebug (LDAP_DEBUG_ANY, "slapi_search_internal (\"%s\",
subtree, %s) err %i\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "slapi_search_internal
(\"%s\", subtree, %s) err %i\n",
baseDN, escape_string( (char*)filter, fbuf ), err);
}
}
} else {
char fbuf[ BUFSIZ ];
- LDAPDebug (LDAP_DEBUG_ANY, "slapi_search_internal (\"%s\", %i, %s)
NULL\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "slapi_search_internal (\"%s\",
%i, %s) NULL\n",
baseDN, scope, escape_string( (char*)filter, fbuf ));
}
slapi_sdn_free(&sdn);
*result = (LDAPMessage*)pb;
- LDAPDebug (LDAP_DEBUG_TRACE, "<= slapu_search_s %i\n", err, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= slapu_search_s %i\n", err, 0,
0);
return err;
}
@@ -260,14 +260,14 @@ client_auth_init ()
if (client_auth_config_file == NULL) {
char *confdir = config_get_configdir();
if (NULL == confdir) {
- LDAPDebug (LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"client_auth_init: failed to get configdir\n",
0, 0, 0);
return;
}
client_auth_config_file = PR_smprintf("%s/certmap.conf", confdir);
if (NULL == client_auth_config_file) {
- LDAPDebug (LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"client_auth_init: failed to duplicate \"%s/certmap\"\n",
confdir, 0, 0);
slapi_ch_free_string(&confdir);
@@ -277,7 +277,7 @@ client_auth_init ()
}
err = ldaputil_init (client_auth_config_file, "", NULL, "slapd",
NULL);
if (err != LDAPU_SUCCESS) {
- LDAPDebug (LDAP_DEBUG_TRACE, "ldaputil_init(%s,...) %i\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ldaputil_init(%s,...) %i\n",
client_auth_config_file, err, 0);
} else {
LDAPUVTable_t vtable = {
@@ -331,7 +331,7 @@ subject_of (CERTCertificate* cert)
if (cert != NULL) {
int err = ldapu_get_cert_subject_dn (cert, &dn);
if (err != LDAPU_SUCCESS) {
- LDAPDebug (LDAP_DEBUG_ANY, "ldapu_get_cert_subject_dn(%p) %i (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldapu_get_cert_subject_dn(%p) %i
(%s)\n",
(void*)cert, err, ldapu_err2string (err));
}
}
@@ -345,7 +345,7 @@ issuer_of (CERTCertificate* cert)
if (cert != NULL) {
int err = ldapu_get_cert_issuer_dn (cert, &dn);
if (err != LDAPU_SUCCESS) {
- LDAPDebug (LDAP_DEBUG_ANY, "ldapu_get_cert_issuer_dn(%p) %i (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldapu_get_cert_issuer_dn(%p) %i
(%s)\n",
(void*)cert, err, ldapu_err2string (err));
}
}
@@ -487,12 +487,12 @@ handle_handshake_done (PRFileDesc *prfd, void* clientData)
} else {
extraErrorMsg = "no entry";
- LDAPDebug (LDAP_DEBUG_TRACE, "<= ldapu_cert_to_ldap_entry() %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ldapu_cert_to_ldap_entry()
%s\n",
extraErrorMsg, 0, 0);
}
} else {
extraErrorMsg = ldapu_err2string(err);
- LDAPDebug (LDAP_DEBUG_TRACE, "<= ldapu_cert_to_ldap_entry() %i
(%s)%s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ldapu_cert_to_ldap_entry() %i
(%s)%s\n",
err, extraErrorMsg, chain ? "" : " NULL");
}
slapi_ch_free_string(&basedn);
diff --git a/ldap/servers/slapd/ava.c b/ldap/servers/slapd/ava.c
index 03af368..006ac6b 100644
--- a/ldap/servers/slapd/ava.c
+++ b/ldap/servers/slapd/ava.c
@@ -31,7 +31,7 @@ get_ava(
== LBER_ERROR ) {
slapi_ch_free_string( &type );
ava_done(ava);
- LDAPDebug( LDAP_DEBUG_ANY, " get_ava ber_scanf\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, " get_ava ber_scanf\n", 0, 0, 0 );
return( LDAP_PROTOCOL_ERROR );
}
ava->ava_type = slapi_attr_syntax_normalize(type);
diff --git a/ldap/servers/slapd/back-ldbm/ancestorid.c
b/ldap/servers/slapd/back-ldbm/ancestorid.c
index 2fd752e..fa0be74 100644
--- a/ldap/servers/slapd/back-ldbm/ancestorid.c
+++ b/ldap/servers/slapd/back-ldbm/ancestorid.c
@@ -120,7 +120,7 @@ static int ldbm_get_nonleaf_ids(backend *be, DB_TXN *txn, IDList
**idl, ImportJo
/* Return the idlist */
if (ret == 0) {
*idl = nodes;
- LDAPDebug(LDAP_DEBUG_TRACE, "found %lu nodes for ancestorid\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "found %lu nodes for
ancestorid\n",
(u_long)IDL_NIDS(nodes), 0, 0);
} else {
idl_free(&nodes);
@@ -207,7 +207,7 @@ static int ldbm_ancestorid_default_create_index(backend *be, ImportJob
*job)
/* Maybe nothing to do */
if (nodes == NULL || nodes->b_nids == 0) {
- LDAPDebug(LDAP_DEBUG_ANY, "Nothing to do to build ancestorid index\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Nothing to do to build ancestorid
index\n",
0, 0, 0);
goto out;
}
@@ -268,7 +268,7 @@ static int ldbm_ancestorid_default_create_index(backend *be, ImportJob
*job)
descendants = idl_union_allids(be, ai_aid, ididl->idl, children);
idl_free(&children);
if (id2idl_hash_remove(ht, &id) == 0) {
- LDAPDebug(LDAP_DEBUG_ANY, "ancestorid hash_remove failed\n",
0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ancestorid hash_remove
failed\n", 0,0,0);
} else {
id2idl_free(&ididl);
}
@@ -302,7 +302,7 @@ static int ldbm_ancestorid_default_create_index(backend *be, ImportJob
*job)
ididl->keyid = parentid;
ididl->idl = descendants;
if (id2idl_hash_add(ht, &parentid, ididl, NULL) == 0) {
- LDAPDebug(LDAP_DEBUG_ANY, "ancestorid hash_add failed\n",
0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ancestorid hash_add
failed\n", 0,0,0);
}
}
@@ -384,7 +384,7 @@ static int ldbm_ancestorid_new_idl_create_index(backend *be, ImportJob
*job)
/* Bail now if we did not get here honestly. */
if (!idl_get_idl_new()) {
- LDAPDebug(LDAP_DEBUG_ANY, "Cannot create ancestorid index. "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Cannot create ancestorid index. "
"New IDL version called but idl_new is false!\n", 0,0,0);
return 1;
}
@@ -408,7 +408,7 @@ static int ldbm_ancestorid_new_idl_create_index(backend *be, ImportJob
*job)
/* Maybe nothing to do */
if (nodes == NULL || nodes->b_nids == 0) {
- LDAPDebug(LDAP_DEBUG_ANY, "Nothing to do to build ancestorid index\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Nothing to do to build ancestorid
index\n",
0, 0, 0);
goto out;
}
@@ -523,7 +523,7 @@ static int ldbm_ancestorid_new_idl_create_index(backend *be, ImportJob
*job)
}
import_log_notice(job, "Created ancestorid index (new idl).");
} else {
- LDAPDebug(LDAP_DEBUG_ANY, "Failed to create ancestorid index\n",
0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to create ancestorid
index\n", 0,0,0);
}
/* Free any leftover idlists */
@@ -632,7 +632,7 @@ static int check_cache(id2idl_hash *ht)
}
if (found > 0) {
- LDAPDebug(LDAP_DEBUG_ANY, "ERROR: parentid index is not complete (%lu extra
keys in ancestorid cache)\n", found,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: parentid index is not complete
(%lu extra keys in ancestorid cache)\n", found,0,0);
ret = -1;
}
@@ -699,13 +699,13 @@ static int ancestorid_addordel(
if (flags & BE_INDEX_ADD) {
#if 1
- LDAPDebug(LDAP_DEBUG_TRACE, "insert ancestorid %lu:%lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "insert ancestorid %lu:%lu\n",
(u_long)node_id, (u_long)id, 0);
#endif
ret = idl_insert_key(be, db, &key, id, txn, ai, allids);
} else {
#if 1
- LDAPDebug(LDAP_DEBUG_TRACE, "delete ancestorid %lu:%lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "delete ancestorid %lu:%lu\n",
(u_long)node_id, (u_long)id, 0);
#endif
ret = idl_delete_key(be, db, &key, id, txn, ai);
@@ -958,14 +958,14 @@ _sdn_suffix_cmp(
/* return the DN */
slapi_sdn_set_dn_passin(common, ndnstr);
- LDAPDebug(LDAP_DEBUG_TRACE, "common suffix <%s>\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "common suffix <%s>\n",
slapi_sdn_get_dn(common), 0, 0);
out:
slapi_ldap_value_free(rdns1);
slapi_ldap_value_free(rdns2);
- LDAPDebug(LDAP_DEBUG_TRACE, "_sdn_suffix_cmp(<%s>, <%s>) =>
%d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "_sdn_suffix_cmp(<%s>, <%s>)
=> %d\n",
slapi_sdn_get_dn(left), slapi_sdn_get_dn(right), ret);
return ret;
diff --git a/ldap/servers/slapd/back-ldbm/archive.c
b/ldap/servers/slapd/back-ldbm/archive.c
index 64d558c..19d2192 100644
--- a/ldap/servers/slapd/back-ldbm/archive.c
+++ b/ldap/servers/slapd/back-ldbm/archive.c
@@ -90,7 +90,7 @@ int ldbm_back_archive2ldbm( Slapi_PBlock *pb )
/* task does not support restore old idl onto new idl server */
if (is_old_to_new)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"backup has old idl format; "
"to restore old formated backup onto the new server, "
"please use command line utility \"bak2db\"
.\n",
@@ -111,7 +111,7 @@ int ldbm_back_archive2ldbm( Slapi_PBlock *pb )
/* check if an import/restore is already ongoing... */
if (instance_set_busy(inst) != 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm: '%s' is already in the middle of "
"another task and cannot be disturbed.\n",
inst->inst_name, 0, 0);
@@ -142,7 +142,7 @@ int ldbm_back_archive2ldbm( Slapi_PBlock *pb )
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);
- LDAPDebug(LDAP_DEBUG_ANY, "Bringing %s offline...\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Bringing %s offline...\n",
inst->inst_name, 0, 0);
if (task) {
slapi_task_log_notice(task, "Bringing %s offline...",
@@ -165,7 +165,7 @@ int ldbm_back_archive2ldbm( Slapi_PBlock *pb )
/* tell the database to restore */
return_value = dblayer_restore(li, directory, task, backendname);
if (0 != return_value) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"archive2db: Failed to read backup file set. "
"Either the directory specified doesn't exist, "
"or it exists but doesn't contain a valid backup set, "
@@ -206,7 +206,7 @@ int ldbm_back_archive2ldbm( Slapi_PBlock *pb )
*p = '\0';
}
bakup_dir = slapi_ch_smprintf("%s%ctmp_%010ld", directory, c,
time(0));
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"archive2db: backup dir: %s\n", bakup_dir, 0, 0);
if (p) *p = c;
@@ -241,7 +241,7 @@ int ldbm_back_archive2ldbm( Slapi_PBlock *pb )
inst = (ldbm_instance *)object_get_data(inst_obj);
ret = dblayer_instance_start(inst->inst_be, DBLAYER_NORMAL_MODE);
if (ret != 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"archive2db: Unable to restart '%s'\n",
inst->inst_name, 0, 0);
if (task) {
@@ -282,7 +282,7 @@ int ldbm_back_ldbm2archive( Slapi_PBlock *pb )
slapi_pblock_get( pb, SLAPI_BACKEND_TASK, &task );
if ( !rawdirectory || !*rawdirectory ) {
- LDAPDebug( LDAP_DEBUG_ANY, "db2archive: no archive name\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "db2archive: no archive name\n",
0, 0, 0 );
return -1;
}
@@ -295,7 +295,7 @@ int ldbm_back_ldbm2archive( Slapi_PBlock *pb )
if (0 != (return_value =
dblayer_start(li,
DBLAYER_ARCHIVE_MODE|DBLAYER_NO_DBTHREADS_MODE))) {
- LDAPDebug(LDAP_DEBUG_ANY, "db2archive: Failed to init database\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "db2archive: Failed to init
database\n",
0, 0, 0);
if (task) {
slapi_task_log_notice(task, "Failed to init database");
@@ -309,7 +309,7 @@ int ldbm_back_ldbm2archive( Slapi_PBlock *pb )
if (stat(directory, &sbuf) == 0) {
if (slapd_comp_path(directory, li->li_directory) == 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"db2archive: Cannot archive to the db directory.\n", 0, 0, 0);
if (task) {
slapi_task_log_notice(task,
@@ -320,7 +320,7 @@ int ldbm_back_ldbm2archive( Slapi_PBlock *pb )
}
dir_bak = slapi_ch_smprintf("%s.bak", directory);
- LDAPDebug(LDAP_DEBUG_ANY, "db2archive: %s exists. Renaming to %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "db2archive: %s exists. Renaming to
%s\n",
directory, dir_bak, 0);
if (task) {
slapi_task_log_notice(task, "%s exists. Renaming to %s",
@@ -329,7 +329,7 @@ int ldbm_back_ldbm2archive( Slapi_PBlock *pb )
if (stat(dir_bak, &sbuf) == 0) {
return_value = ldbm_delete_dirs(dir_bak);
if (0 != return_value) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"db2archive: %s exists and failed to delete
it.\n",
dir_bak, 0, 0);
if (task) {
@@ -343,10 +343,10 @@ int ldbm_back_ldbm2archive( Slapi_PBlock *pb )
return_value = PR_Rename(directory, dir_bak);
if (return_value != PR_SUCCESS) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"db2archive: Failed to rename \"%s\" to
\"%s\".\n",
directory, dir_bak, 0);
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
if (task) {
@@ -364,7 +364,7 @@ int ldbm_back_ldbm2archive( Slapi_PBlock *pb )
if (0 != MKDIR(directory,SLAPD_DEFAULT_DIR_MODE) && EEXIST != errno) {
char *msg = dblayer_strerror(errno);
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"db2archive: mkdir(%s) failed; errno %i (%s)\n",
directory, errno, msg ? msg : "unknown");
if (task) {
@@ -387,7 +387,7 @@ int ldbm_back_ldbm2archive( Slapi_PBlock *pb )
/* check if an import/restore is already ongoing... */
if (instance_set_busy(inst) != 0 || dblayer_in_import(inst) != 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm: '%s' is already in the middle of "
"another task and cannot be disturbed.\n",
inst->inst_name, 0, 0);
@@ -490,7 +490,7 @@ out:
/* close the database down again */
if (run_from_cmdline &&
0 != dblayer_close(li,DBLAYER_ARCHIVE_MODE|DBLAYER_NO_DBTHREADS_MODE)) {
- LDAPDebug(LDAP_DEBUG_ANY, "db2archive: Failed to close database\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "db2archive: Failed to close
database\n",
0, 0, 0);
if (task) {
slapi_task_log_notice(task, "Failed to close database");
diff --git a/ldap/servers/slapd/back-ldbm/cache.c b/ldap/servers/slapd/back-ldbm/cache.c
index b34bec9..4280cd1 100644
--- a/ldap/servers/slapd/back-ldbm/cache.c
+++ b/ldap/servers/slapd/back-ldbm/cache.c
@@ -43,12 +43,12 @@
#ifdef LDAP_CACHE_DEBUG
#define ASSERT(_x) do { \
if (!(_x)) { \
- LDAPDebug(LDAP_DEBUG_ANY, "BAD CACHE ASSERTION at %s/%d: %s\n", \
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "BAD CACHE ASSERTION at %s/%d: %s\n",
\
__FILE__, __LINE__, #_x); \
*(char *)0L = 23; \
} \
} while (0)
-#define LOG(_a, _x1, _x2, _x3) LDAPDebug(LDAP_DEBUG_CACHE, _a, _x1, _x2, _x3)
+#define LOG(_a, _x1, _x2, _x3) LDAPDebug(LDAP_DEBUG_CACHE, LOG_DEBUG, _a, _x1, _x2,
_x3)
#else
#define ASSERT(_x) ;
#define LOG(_a, _x1, _x2, _x3) ;
@@ -489,7 +489,7 @@ static void cache_make_hashes(struct cache *cache, int type)
/* initialize the cache */
int cache_init(struct cache *cache, size_t maxsize, long maxentries, int type)
{
- LDAPDebug(LDAP_DEBUG_TRACE, "=> cache_init\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> cache_init\n", 0, 0, 0);
cache->c_maxsize = maxsize;
cache->c_maxentries = maxentries;
cache->c_curentries = 0;
@@ -521,7 +521,7 @@ int cache_init(struct cache *cache, size_t maxsize, long maxentries,
int type)
LDAPDebug0Args(LDAP_DEBUG_ANY, "ldbm: cache_init: PR_NewMonitor
failed\n");
return 0;
}
- LDAPDebug(LDAP_DEBUG_TRACE, "<= cache_init\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= cache_init\n", 0, 0, 0);
return 1;
}
@@ -561,7 +561,7 @@ entrycache_flush(struct cache *cache)
ASSERT(e->ep_refcnt == 0);
e->ep_refcnt++;
if (entrycache_remove_int(cache, e) < 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"entry cache flush: unable to delete entry\n", 0, 0, 0);
break;
}
@@ -655,7 +655,7 @@ static void entrycache_set_max_size(struct cache *cache, size_t
bytes)
if (bytes < MINCACHESIZE) {
bytes = MINCACHESIZE;
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"WARNING -- Minimum cache size is %lu -- rounding up\n",
MINCACHESIZE, 0, 0);
}
@@ -683,7 +683,7 @@ static void entrycache_set_max_size(struct cache *cache, size_t
bytes)
* ldbm_instance_config
*/
if (! util_is_cachesize_sane(&bytes)) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"WARNING -- Possible CONFIGURATION ERROR -- cachesize "
"(%lu) may be configured to use more than the available "
"physical memory.\n", bytes, 0, 0);
@@ -1604,7 +1604,7 @@ dncache_set_max_size(struct cache *cache, size_t bytes)
if (bytes < MINCACHESIZE) {
bytes = MINCACHESIZE;
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"WARNING -- Minimum cache size is %lu -- rounding up\n",
MINCACHESIZE, 0, 0);
}
@@ -1968,7 +1968,7 @@ dncache_flush(struct cache *cache)
ASSERT(dn->ep_refcnt == 0);
dn->ep_refcnt++;
if (dncache_remove_int(cache, dn) < 0) {
- LDAPDebug(LDAP_DEBUG_ANY, "dn cache flush: unable to delete
entry\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dn cache flush: unable to delete
entry\n",
0, 0, 0);
break;
}
diff --git a/ldap/servers/slapd/back-ldbm/cleanup.c
b/ldap/servers/slapd/back-ldbm/cleanup.c
index 63116c5..6e31f57 100644
--- a/ldap/servers/slapd/back-ldbm/cleanup.c
+++ b/ldap/servers/slapd/back-ldbm/cleanup.c
@@ -20,14 +20,14 @@ int ldbm_back_cleanup( Slapi_PBlock *pb )
struct ldbminfo *li;
Slapi_Backend *be;
- LDAPDebug( LDAP_DEBUG_TRACE, "ldbm backend cleaning up\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ldbm backend cleaning up\n", 0, 0, 0
);
slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &li );
slapi_pblock_get( pb, SLAPI_BACKEND, &be );
if (be->be_state != BE_STATE_STOPPED &&
be->be_state != BE_STATE_DELETED)
{
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"ldbm_back_cleanup: warning - backend is in a wrong state - %d\n",
be->be_state, 0, 0 );
return 0;
@@ -38,7 +38,7 @@ int ldbm_back_cleanup( Slapi_PBlock *pb )
if (be->be_state != BE_STATE_STOPPED &&
be->be_state != BE_STATE_DELETED)
{
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"ldbm_back_cleanup: warning - backend is in a wrong state - %d\n",
be->be_state, 0, 0 );
PR_Unlock (be->be_state_lock);
diff --git a/ldap/servers/slapd/back-ldbm/close.c b/ldap/servers/slapd/back-ldbm/close.c
index 2032dbd..b69e2d5 100644
--- a/ldap/servers/slapd/back-ldbm/close.c
+++ b/ldap/servers/slapd/back-ldbm/close.c
@@ -19,7 +19,7 @@ int ldbm_back_close( Slapi_PBlock *pb )
{
struct ldbminfo *li;
- LDAPDebug( LDAP_DEBUG_TRACE, "ldbm backend syncing\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ldbm backend syncing\n", 0, 0, 0
);
slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &li );
/* Kill off any sleeping threads by setting this flag */
@@ -32,7 +32,7 @@ int ldbm_back_close( Slapi_PBlock *pb )
/* close down all the ldbm instances */
dblayer_close( li, DBLAYER_NORMAL_MODE );
- LDAPDebug( LDAP_DEBUG_TRACE, "ldbm backend done syncing\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ldbm backend done syncing\n", 0, 0, 0
);
return 0;
}
@@ -40,10 +40,10 @@ int ldbm_back_flush( Slapi_PBlock *pb )
{
struct ldbminfo *li;
- LDAPDebug( LDAP_DEBUG_TRACE, "ldbm backend flushing\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ldbm backend flushing\n", 0, 0, 0 );
slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &li );
dblayer_flush( li );
- LDAPDebug( LDAP_DEBUG_TRACE, "ldbm backend done flushing\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ldbm backend done flushing\n", 0, 0, 0
);
return 0;
}
@@ -56,5 +56,5 @@ void ldbm_back_instance_set_destructor(void **arg)
/* This function is called when the instance set is destroyed.
* I can't really think of anything we should do here, but that
* may change in the future. */
- LDAPDebug(LDAP_DEBUG_ANY, "Set of instances destroyed\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Set of instances destroyed\n", 0, 0, 0);
}
diff --git a/ldap/servers/slapd/back-ldbm/dbhelp.c
b/ldap/servers/slapd/back-ldbm/dbhelp.c
index 27079c9..c40a9fa 100644
--- a/ldap/servers/slapd/back-ldbm/dbhelp.c
+++ b/ldap/servers/slapd/back-ldbm/dbhelp.c
@@ -41,10 +41,10 @@ dblayer_copy_file_keybykey(DB_ENV *env,
int mode = 0;
char *p = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> dblayer_copy_file_keybykey\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> dblayer_copy_file_keybykey\n",
0, 0, 0 );
if (!env) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copy_file_keybykey, Out of memory\n", 0,
0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_file_keybykey, Out of
memory\n", 0, 0, 0);
goto error;
}
@@ -55,28 +55,28 @@ dblayer_copy_file_keybykey(DB_ENV *env,
/* Open the source file */
retval = db_create(&source_file, env, 0);
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copy_file_keybykey, Create error %d:
%s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_file_keybykey, Create error %d:
%s\n", retval, db_strerror(retval), 0);
goto error;
}
retval = (source_file->open)(source_file, NULL, source_file_name, NULL, DB_UNKNOWN,
DB_RDONLY, 0);
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copy_file_keybykey, Open error %d: %s\n",
retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_file_keybykey, Open error %d:
%s\n", retval, db_strerror(retval), 0);
goto error;
}
/* Get the info we need from the source file */
retval = source_file->get_flags(source_file, &dbflags);
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copy_file_keybykey, get_flags error %d:
%s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_file_keybykey, get_flags error
%d: %s\n", retval, db_strerror(retval), 0);
goto error;
}
retval = source_file->get_type(source_file, &dbtype);
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copy_file_keybykey, get_type error %d:
%s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_file_keybykey, get_type error %d:
%s\n", retval, db_strerror(retval), 0);
goto error;
}
retval = source_file->get_pagesize(source_file, &dbpagesize);
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copy_file_keybykey, get_pagesize error %d:
%s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_file_keybykey, get_pagesize error
%d: %s\n", retval, db_strerror(retval), 0);
goto error;
}
/* Open the destination file
@@ -84,17 +84,17 @@ dblayer_copy_file_keybykey(DB_ENV *env,
*/
retval = db_create(&destination_file, env, 0);
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copy_file_keybykey, Create error %d:
%s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_file_keybykey, Create error %d:
%s\n", retval, db_strerror(retval), 0);
goto error;
}
retval = destination_file->set_flags(destination_file,dbflags);
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copy_file_keybykey, set_flags error %d:
%s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_file_keybykey, set_flags error
%d: %s\n", retval, db_strerror(retval), 0);
goto error;
}
retval = destination_file->set_pagesize(destination_file,dbpagesize);
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copy_file_keybykey, set_pagesize error %d:
%s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_file_keybykey, set_pagesize error
%d: %s\n", retval, db_strerror(retval), 0);
goto error;
}
@@ -139,13 +139,13 @@ dblayer_copy_file_keybykey(DB_ENV *env,
retval = (destination_file->open)(destination_file, NULL, destination_file_name,
NULL, dbtype, DB_CREATE | DB_EXCL, mode);
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copy_file_keybykey, Open error %d: %s\n",
retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_file_keybykey, Open error %d:
%s\n", retval, db_strerror(retval), 0);
goto error;
}
/* Open a cursor on the source file */
retval = source_file->cursor(source_file,NULL,&source_cursor,0);
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copy_file_keybykey, Create cursor error %d:
%s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_file_keybykey, Create cursor
error %d: %s\n", retval, db_strerror(retval), 0);
goto error;
}
/* Seek to the first key */
@@ -160,7 +160,7 @@ dblayer_copy_file_keybykey(DB_ENV *env,
* In either case, set finished=1 so we can hop down and close the cursor. */
if ( DB_NOTFOUND != retval )
{
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copy_file_keybykey, c_get error %d:
%s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_file_keybykey, c_get error %d:
%s\n", retval, db_strerror(retval), 0);
goto error;
}
retval = 0; /* DB_NOTFOUND was OK... */
@@ -169,7 +169,7 @@ dblayer_copy_file_keybykey(DB_ENV *env,
/* For each key, insert into the destination file */
retval = destination_file->put(destination_file, NULL, &key, &data, 0);
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copy_file_keybykey, put error %d: %s\n",
retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_file_keybykey, put error %d:
%s\n", retval, db_strerror(retval), 0);
goto error;
}
cursor_flag = DB_NEXT;
@@ -181,7 +181,7 @@ error:
if (source_cursor) {
retval_cleanup = source_cursor->c_close(source_cursor);
if (retval_cleanup) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copy_file_keybykey, Close cursor error %d:
%s\n", retval_cleanup, db_strerror(retval_cleanup), 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_file_keybykey, Close cursor
error %d: %s\n", retval_cleanup, db_strerror(retval_cleanup), 0);
retval += retval_cleanup;
}
}
@@ -190,7 +190,7 @@ error:
retval_cleanup = source_file->close(source_file,0);
source_file = NULL;
if (retval_cleanup) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copy_file_keybykey, Close error %d:
%s\n", retval_cleanup, db_strerror(retval_cleanup), 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_file_keybykey, Close error %d:
%s\n", retval_cleanup, db_strerror(retval_cleanup), 0);
retval += retval_cleanup;
}
}
@@ -199,12 +199,12 @@ error:
retval_cleanup = destination_file->close(destination_file,0);
destination_file = NULL;
if (retval_cleanup) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copy_file_keybykey, Close error %d:
%s\n", retval_cleanup, db_strerror(retval_cleanup), 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_file_keybykey, Close error %d:
%s\n", retval_cleanup, db_strerror(retval_cleanup), 0);
retval += retval_cleanup;
}
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= dblayer_copy_file_keybykey\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= dblayer_copy_file_keybykey\n",
0, 0, 0 );
return retval;
}
@@ -219,19 +219,19 @@ dblayer_copy_file_resetlsns(char *home_dir,
int retval = 0;
DB_ENV *env = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> dblayer_copy_file_resetlsns\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> dblayer_copy_file_resetlsns\n",
0, 0, 0 );
/* Make the environment */
retval = dblayer_make_private_simple_env(home_dir,&env);
if (retval || !env) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copy_file_resetlsns: Call to
dblayer_make_private_simple_env failed!\n"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_file_resetlsns: Call to
dblayer_make_private_simple_env failed!\n"
"Unable to open an environment.", 0, 0, 0);
goto out;
}
/* Do the copy */
retval = dblayer_copy_file_keybykey(env, source_file_name, destination_file_name,
overwrite, priv, inst);
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copy_file_resetlsns: Copy not completed
successfully.", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_file_resetlsns: Copy not
completed successfully.", 0, 0, 0);
}
out:
/* Close the environment */
@@ -241,12 +241,12 @@ out:
if (retval2) {
if (0 == retval) {
retval = retval2;
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copy_file_resetlsns, error %d: %s\n",
retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_file_resetlsns, error %d:
%s\n", retval, db_strerror(retval), 0);
}
}
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= dblayer_copy_file_resetlsns\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= dblayer_copy_file_resetlsns\n",
0, 0, 0 );
return retval;
}
@@ -275,16 +275,16 @@ int dblayer_make_private_recovery_env(char *db_home_dir,
dblayer_private *priv,
int retval = 0;
DB_ENV *ret_env = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> dblayer_make_private_recovery_env\n", 0,
0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
dblayer_make_private_recovery_env\n", 0, 0, 0 );
if (NULL == env) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_make_private_recovery_env: Null environment.
Cannot continue.", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_make_private_recovery_env: Null
environment. Cannot continue.", 0, 0, 0);
return -1;
}
*env = NULL;
retval = db_env_create(&ret_env,0);
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_make_private_recovery_env, Create error %d:
%s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_make_private_recovery_env, Create
error %d: %s\n", retval, db_strerror(retval), 0);
goto error;
}
dblayer_set_env_debugging(ret_env, priv);
@@ -293,12 +293,12 @@ int dblayer_make_private_recovery_env(char *db_home_dir,
dblayer_private *priv,
if (0 == retval) {
*env = ret_env;
} else {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_make_private_recovery_env, Open error %d:
%s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_make_private_recovery_env, Open error
%d: %s\n", retval, db_strerror(retval), 0);
goto error;
}
error:
- LDAPDebug( LDAP_DEBUG_TRACE, "<= dblayer_make_private_recovery_env\n", 0,
0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
dblayer_make_private_recovery_env\n", 0, 0, 0 );
return retval;
}
@@ -308,16 +308,16 @@ int dblayer_make_private_simple_env(char *db_home_dir, DB_ENV
**env)
int retval = 0;
DB_ENV *ret_env = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> dblayer_make_private_simple_env\n", 0, 0,
0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
dblayer_make_private_simple_env\n", 0, 0, 0 );
if (NULL == env) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_make_private_simple_env: Null environment.
Cannot continue.", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_make_private_simple_env: Null
environment. Cannot continue.", 0, 0, 0);
return -1;
}
*env = NULL;
retval = db_env_create(&ret_env,0);
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_make_private_simple_env, error %d: %s\n",
retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_make_private_simple_env, error %d:
%s\n", retval, db_strerror(retval), 0);
goto error;
}
@@ -325,11 +325,11 @@ int dblayer_make_private_simple_env(char *db_home_dir, DB_ENV
**env)
if (0 == retval) {
*env = ret_env;
} else {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_make_private_simple_env, error %d: %s\n",
retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_make_private_simple_env, error %d:
%s\n", retval, db_strerror(retval), 0);
goto error;
}
error:
- LDAPDebug( LDAP_DEBUG_TRACE, "<= dblayer_make_private_simple_env\n", 0, 0,
0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
dblayer_make_private_simple_env\n", 0, 0, 0 );
return retval;
}
diff --git a/ldap/servers/slapd/back-ldbm/dblayer.c
b/ldap/servers/slapd/back-ldbm/dblayer.c
index 33287d4..dafd093 100644
--- a/ldap/servers/slapd/back-ldbm/dblayer.c
+++ b/ldap/servers/slapd/back-ldbm/dblayer.c
@@ -321,11 +321,11 @@ dblayer_set_batch_transactions(void *arg, void *value, char
*errorbuf, int phase
} else if(val > 0) {
if(trans_batch_limit == FLUSH_REMOTEOFF){
/* this requires a server restart to take effect */
- LDAPDebug(LDAP_DEBUG_ANY,"dblayer_set_batch_transactions:
enabling batch transactions "
+ LDAPDebug(LDAP_DEBUG_ANY,
LOG_ERR,"dblayer_set_batch_transactions: enabling batch transactions "
"requires a server restart.\n",0,0,0);
} else if (!log_flush_thread){
/* we are already disabled, log a reminder of that fact. */
- LDAPDebug(LDAP_DEBUG_ANY,"dblayer_set_batch_transactions: batch
transactions was "
+ LDAPDebug(LDAP_DEBUG_ANY,
LOG_ERR,"dblayer_set_batch_transactions: batch transactions was "
"previously disabled, this update requires a server
restart.\n",0,0,0);
}
trans_batch_limit=val;
@@ -356,7 +356,7 @@ dblayer_set_batch_txn_min_sleep(void *arg, void *value, char
*errorbuf, int phas
} else if(val > 0) {
if(trans_batch_txn_min_sleep == FLUSH_REMOTEOFF || !log_flush_thread){
/* this really has no effect until batch transactions are enabled */
- LDAPDebug(LDAP_DEBUG_ANY,"dblayer_set_batch_txn_min_sleep:
Warning batch transactions "
+ LDAPDebug(LDAP_DEBUG_ANY,
LOG_ERR,"dblayer_set_batch_txn_min_sleep: Warning batch transactions "
"is not enabled.\n",0,0,0);
}
trans_batch_txn_min_sleep = val;
@@ -387,7 +387,7 @@ dblayer_set_batch_txn_max_sleep(void *arg, void *value, char
*errorbuf, int phas
} else if(val > 0) {
if(trans_batch_txn_max_sleep == FLUSH_REMOTEOFF || !log_flush_thread){
/* this really has no effect until batch transactions are enabled */
- LDAPDebug(LDAP_DEBUG_ANY,"dblayer_set_batch_txn_max_sleep:
Warning batch transactions "
+ LDAPDebug(LDAP_DEBUG_ANY,
LOG_ERR,"dblayer_set_batch_txn_max_sleep: Warning batch transactions "
"is not enabled.\n",0,0,0);
}
trans_batch_txn_max_sleep = val;
@@ -453,7 +453,7 @@ static int _dblayer_check_version(dblayer_private *priv)
}
/* DB3X: always POST 24 :) */
priv->dblayer_lib_version = DBLAYER_LIB_VERSION_POST_24;
- LDAPDebug(LDAP_DEBUG_TRACE,"version check: %s (%d.%d)\n", string, major,
minor);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"version check: %s (%d.%d)\n",
string, major, minor);
return ret;
}
@@ -480,7 +480,7 @@ dblayer_get_home_dir(struct ldbminfo *li, int *dbhome)
}
if (NULL == home_dir)
{
- LDAPDebug(LDAP_DEBUG_ANY,"Db home directory is not set. "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Db home directory is not set. "
"Possibly %s (optionally %s) is missing in the config file.\n",
CONFIG_DIRECTORY, CONFIG_DB_HOME_DIRECTORY, 0);
}
@@ -510,7 +510,7 @@ void dblayer_log_print(const char* prefix, char *buffer)
#endif
{
/* We ignore the prefix since we know who we are anyway */
- LDAPDebug(LDAP_DEBUG_ANY,"libdb: %s\n", buffer, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"libdb: %s\n", buffer, 0, 0);
}
void dblayer_remember_disk_filled(struct ldbminfo *li)
@@ -664,7 +664,7 @@ static int dblayer_override_libdb_functions(DB_ENV *pEnv,
dblayer_private *priv)
db_env_set_func_seek((int (*)(int, off_t, int))dblayer_seek24_large);
#endif
- LDAPDebug(LDAP_DEBUG_TRACE, "Enabled 64-bit files\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "Enabled 64-bit files\n", 0, 0, 0);
#endif /* DB_USE_64LFS */
return 0;
}
@@ -759,7 +759,7 @@ static void dblayer_select_ncache(size_t cachesize, int *ncachep)
#if defined(__LP64__) || defined (_LP64)
if ( (sizeof(cachesize) > 4) && (cachesize > (4L * GIGABYTE))) {
*ncachep = (cachesize / (4L * GIGABYTE)) + 1;
- LDAPDebug(LDAP_DEBUG_ANY,"Setting ncache to: %d to keep each chunk below
4Gbytes\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Setting ncache to: %d to keep each chunk below
4Gbytes\n",
*ncachep, 0, 0);
}
#endif
@@ -818,7 +818,7 @@ cleanup:
slapi_ch_free((void **)&head[i]);
}
if (myncache == mymaxncache) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"WARNING: dbcachesize %lu too big\n", cachesize, 0, 0);
myncache = 0;
found = -1;
@@ -874,41 +874,41 @@ static void dblayer_init_dbenv(DB_ENV *pEnv, dblayer_private *priv)
static void dblayer_dump_config_tracing(dblayer_private *priv)
{
if (priv->dblayer_home_directory) {
-
LDAPDebug(LDAP_DEBUG_TRACE,"home_directory=%s\n",priv->dblayer_home_directory,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"home_directory=%s\n",priv->dblayer_home_directory,0,0);
}
if (priv->dblayer_log_directory) {
-
LDAPDebug(LDAP_DEBUG_TRACE,"log_directory=%s\n",priv->dblayer_log_directory,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"log_directory=%s\n",priv->dblayer_log_directory,0,0);
}
if (priv->dblayer_dbhome_directory) {
-
LDAPDebug(LDAP_DEBUG_TRACE,"dbhome_directory=%s\n",priv->dblayer_dbhome_directory,0,0);
- }
-
LDAPDebug(LDAP_DEBUG_TRACE,"trickle_percentage=%d\n",priv->dblayer_trickle_percentage,0,0);
-
LDAPDebug(LDAP_DEBUG_TRACE,"page_size=%lu\n",priv->dblayer_page_size,0,0);
-
LDAPDebug(LDAP_DEBUG_TRACE,"index_page_size=%lu\n",priv->dblayer_index_page_size,0,0);
-
LDAPDebug(LDAP_DEBUG_TRACE,"cachesize=%lu\n",priv->dblayer_cachesize,0,0);
-
LDAPDebug(LDAP_DEBUG_TRACE,"previous_cachesize=%lu\n",priv->dblayer_previous_cachesize,0,0);
- LDAPDebug(LDAP_DEBUG_TRACE,"ncache=%d\n",priv->dblayer_ncache,0,0);
-
LDAPDebug(LDAP_DEBUG_TRACE,"previous_ncache=%d\n",priv->dblayer_previous_ncache,0,0);
-
LDAPDebug(LDAP_DEBUG_TRACE,"recovery_required=%d\n",priv->dblayer_recovery_required,0,0);
-
LDAPDebug(LDAP_DEBUG_TRACE,"durable_transactions=%d\n",priv->dblayer_durable_transactions,0,0);
-
LDAPDebug(LDAP_DEBUG_TRACE,"checkpoint_interval=%d\n",priv->dblayer_checkpoint_interval,0,0);
-
LDAPDebug(LDAP_DEBUG_TRACE,"transaction_batch_val=%d\n",trans_batch_limit,0,0);
-
LDAPDebug(LDAP_DEBUG_TRACE,"circular_logging=%d\n",priv->dblayer_circular_logging,0,0);
-
LDAPDebug(LDAP_DEBUG_TRACE,"idl_divisor=%d\n",priv->dblayer_idl_divisor,0,0);
-
LDAPDebug(LDAP_DEBUG_TRACE,"logfile_size=%lu\n",priv->dblayer_logfile_size,0,0);
-
LDAPDebug(LDAP_DEBUG_TRACE,"logbuf_size=%lu\n",priv->dblayer_logbuf_size,0,0);
-
LDAPDebug(LDAP_DEBUG_TRACE,"file_mode=%d\n",priv->dblayer_file_mode,0,0);
-
LDAPDebug(LDAP_DEBUG_TRACE,"cache_config=%d\n",priv->dblayer_cache_config,0,0);
-
LDAPDebug(LDAP_DEBUG_TRACE,"lib_version=%d\n",priv->dblayer_lib_version,0,0);
-
LDAPDebug(LDAP_DEBUG_TRACE,"spin_count=%d\n",priv->dblayer_spin_count,0,0);
-
LDAPDebug(LDAP_DEBUG_TRACE,"named_regions=%d\n",priv->dblayer_named_regions,0,0);
- LDAPDebug(LDAP_DEBUG_TRACE,"private
mem=%d\n",priv->dblayer_private_mem,0,0);
- LDAPDebug(LDAP_DEBUG_TRACE,"private import
mem=%d\n",priv->dblayer_private_import_mem,0,0);
- LDAPDebug(LDAP_DEBUG_TRACE,"shm_key=%ld\n",priv->dblayer_shm_key,0,0);
- LDAPDebug(LDAP_DEBUG_TRACE,"lockdown=%d\n",priv->dblayer_lockdown,0,0);
- LDAPDebug(LDAP_DEBUG_TRACE,"locks=%d\n",priv->dblayer_lock_config,0,0);
-
LDAPDebug(LDAP_DEBUG_TRACE,"previous_locks=%d\n",priv->dblayer_previous_lock_config,0,0);
- LDAPDebug(LDAP_DEBUG_TRACE,"tx_max=%d\n",priv->dblayer_tx_max,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"dbhome_directory=%s\n",priv->dblayer_dbhome_directory,0,0);
+ }
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"trickle_percentage=%d\n",priv->dblayer_trickle_percentage,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"page_size=%lu\n",priv->dblayer_page_size,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"index_page_size=%lu\n",priv->dblayer_index_page_size,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"cachesize=%lu\n",priv->dblayer_cachesize,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"previous_cachesize=%lu\n",priv->dblayer_previous_cachesize,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"ncache=%d\n",priv->dblayer_ncache,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"previous_ncache=%d\n",priv->dblayer_previous_ncache,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"recovery_required=%d\n",priv->dblayer_recovery_required,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"durable_transactions=%d\n",priv->dblayer_durable_transactions,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"checkpoint_interval=%d\n",priv->dblayer_checkpoint_interval,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"transaction_batch_val=%d\n",trans_batch_limit,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"circular_logging=%d\n",priv->dblayer_circular_logging,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"idl_divisor=%d\n",priv->dblayer_idl_divisor,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"logfile_size=%lu\n",priv->dblayer_logfile_size,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"logbuf_size=%lu\n",priv->dblayer_logbuf_size,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"file_mode=%d\n",priv->dblayer_file_mode,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"cache_config=%d\n",priv->dblayer_cache_config,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"lib_version=%d\n",priv->dblayer_lib_version,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"spin_count=%d\n",priv->dblayer_spin_count,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"named_regions=%d\n",priv->dblayer_named_regions,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"private
mem=%d\n",priv->dblayer_private_mem,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"private import
mem=%d\n",priv->dblayer_private_import_mem,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"shm_key=%ld\n",priv->dblayer_shm_key,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"lockdown=%d\n",priv->dblayer_lockdown,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"locks=%d\n",priv->dblayer_lock_config,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"previous_locks=%d\n",priv->dblayer_previous_lock_config,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
LOG_DEBUG,"tx_max=%d\n",priv->dblayer_tx_max,0,0);
}
/* Check a given filesystem directory for access we need */
@@ -983,7 +983,7 @@ static int dblayer_grok_directory(char *directory, int flags)
}
/* If we're here, it means that we did not have the requested
* permission on this file */
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"WARNING---no %s permission to file %s\n",
access_string,filename,0);
} else {
@@ -1062,7 +1062,7 @@ dblayer_make_env(struct dblayer_private_env **env, struct ldbminfo
*li)
sizeof(dblayer_private_env));
if ((ret = db_env_create(&pEnv->dblayer_DB_ENV, 0)) != 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR -- Failed to create DB_ENV (returned: %d).\n",
ret, 0, 0);
}
@@ -1120,7 +1120,7 @@ dblayer_make_env(struct dblayer_private_env **env, struct ldbminfo
*li)
*env = pEnv;
pEnv = NULL; /* do not free below */
} else {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR -- Failed to create RWLock (returned: %d).\n",
ret, 0, 0);
}
@@ -1241,7 +1241,7 @@ no_diskspace(struct ldbminfo *li, int dbenv_flags)
char *region_dir;
if (statvfs(li->li_directory, &db_buf) < 0){
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Cannot get file system info for (%s); file system corrupted?\n",
li->li_directory, 0, 0);
return 1;
@@ -1257,7 +1257,7 @@ no_diskspace(struct ldbminfo *li, int dbenv_flags)
/* Calculate the available space as long as we are not using shared memory
*/
if(using_region_files){
if(statvfs(li->li_dblayer_private->dblayer_dbhome_directory,
&dbhome_buf) < 0){
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Cannot get file system info for (%s); file system
corrupted?\n",
li->li_dblayer_private->dblayer_dbhome_directory, 0, 0);
return 1;
@@ -1278,7 +1278,7 @@ no_diskspace(struct ldbminfo *li, int dbenv_flags)
/* Check if we have enough space */
if (fsiz < expected_siz){
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"No enough space left on device (%s) (%lu bytes); "
"at least %lu bytes space is needed for db region files\n",
region_dir, fsiz, expected_siz);
@@ -1324,11 +1324,11 @@ dblayer_start(struct ldbminfo *li, int dbmode)
if (NULL != priv->dblayer_env) {
if (CATASTROPHIC == priv->dblayer_env) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Error: DB previously failed to start.\n", 0, 0, 0);
return -1;
} else {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: DB already started.\n", 0, 0, 0);
return 0;
}
@@ -1337,7 +1337,7 @@ dblayer_start(struct ldbminfo *li, int dbmode)
/* DBDB we should pick these up in our config routine, and do away with
* the li_ one */
if (NULL == li->li_directory || '\0' == *li->li_directory) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Error: DB directory is not specified.\n", 0, 0, 0);
return -1;
}
@@ -1363,7 +1363,7 @@ dblayer_start(struct ldbminfo *li, int dbmode)
return_value = dblayer_grok_directory(region_dir,
DBLAYER_DIRECTORY_READWRITE_ACCESS);
if (0 != return_value) {
- LDAPDebug(LDAP_DEBUG_ANY,"Can't start because the database "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Can't start because the database
"
"directory \"%s\" either doesn't exist, or is not
"
"accessible\n", region_dir, 0, 0);
return return_value;
@@ -1375,7 +1375,7 @@ dblayer_start(struct ldbminfo *li, int dbmode)
return_value = dblayer_grok_directory(log_dir,
DBLAYER_DIRECTORY_READWRITE_ACCESS);
if (0 != return_value) {
- LDAPDebug(LDAP_DEBUG_ANY,"Can't start because the log "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Can't start because the log
"
"directory \"%s\" either doesn't exist, or is
not "
"accessible\n", log_dir, 0, 0);
return return_value;
@@ -1386,7 +1386,7 @@ dblayer_start(struct ldbminfo *li, int dbmode)
* the available phys mem */
if (!util_is_cachesize_sane(&(priv->dblayer_cachesize))) {
/* Oops---looks like the admin misconfigured, let's warn them */
- LDAPDebug(LDAP_DEBUG_ANY,"WARNING---Likely CONFIGURATION ERROR---"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"WARNING---Likely CONFIGURATION
ERROR---"
"dbcachesize is configured to use more than the available "
"physical memory, decreased to the largest available size (%lu
bytes).\n",
priv->dblayer_cachesize, 0, 0);
@@ -1421,13 +1421,13 @@ dblayer_start(struct ldbminfo *li, int dbmode)
if (priv->dblayer_recovery_required) {
open_flags |= DB_RECOVER;
if (DBLAYER_RESTORE_MODE & dbmode) {
- LDAPDebug(LDAP_DEBUG_ANY, "Recovering database after restore "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Recovering database after
restore "
"from archive.\n", 0, 0, 0);
} else if (DBLAYER_CLEAN_RECOVER_MODE & dbmode) {
- LDAPDebug(LDAP_DEBUG_ANY, "Clean up db environment and start "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Clean up db environment and
start "
"from archive.\n", 0, 0, 0);
} else {
- LDAPDebug(LDAP_DEBUG_ANY, "Detected Disorderly Shutdown last "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Detected Disorderly Shutdown
last "
"time Directory Server was running, recovering "
"database.\n", 0, 0, 0);
slapi_disordely_shutdown(PR_TRUE);
@@ -1448,7 +1448,7 @@ dblayer_start(struct ldbminfo *li, int dbmode)
}
if (priv->dblayer_private_mem) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"WARNING: Server is running with nsslapd-db-private-mem on;
"
"No other process is allowed to access the database\n",
0, 0, 0);
@@ -1473,11 +1473,11 @@ dblayer_start(struct ldbminfo *li, int dbmode)
(priv->dblayer_lock_config != priv->dblayer_previous_lock_config))
&&
!(dbmode & (DBLAYER_ARCHIVE_MODE|DBLAYER_EXPORT_MODE)) ) {
if (priv->dblayer_cachesize != priv->dblayer_previous_cachesize) {
- LDAPDebug(LDAP_DEBUG_ANY, "resizing db cache size: %lu ->
%lu\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "resizing db cache size: %lu ->
%lu\n",
priv->dblayer_previous_cachesize, priv->dblayer_cachesize,
0);
}
if (priv->dblayer_ncache != priv->dblayer_previous_ncache) {
- LDAPDebug(LDAP_DEBUG_ANY, "resizing db cache count: %d ->
%d\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "resizing db cache count: %d ->
%d\n",
priv->dblayer_previous_ncache, priv->dblayer_ncache, 0);
}
if (priv->dblayer_lock_config != priv->dblayer_previous_lock_config) {
@@ -1491,7 +1491,7 @@ dblayer_start(struct ldbminfo *li, int dbmode)
priv->dblayer_lock_config = 10000;
}
if (priv->dblayer_lock_config != priv->dblayer_previous_lock_config) {
- LDAPDebug(LDAP_DEBUG_ANY, "resizing max db lock count: %d ->
%d\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "resizing max db lock count: %d
-> %d\n",
priv->dblayer_previous_lock_config,
priv->dblayer_lock_config, 0);
}
}
@@ -1501,7 +1501,7 @@ dblayer_start(struct ldbminfo *li, int dbmode)
* the DB_ENV (pEnv) needs to be created again.
*/
if ((return_value = dblayer_make_env(&pEnv, li)) != 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR -- Failed to create DBENV (returned: %d).\n",
return_value, 0, 0);
}
@@ -1514,7 +1514,7 @@ dblayer_start(struct ldbminfo *li, int dbmode)
if(priv->dblayer_logbuf_size >= 32768) {
pEnv->dblayer_DB_ENV->set_lg_bsize(pEnv->dblayer_DB_ENV,priv->dblayer_logbuf_size);
} else {
- LDAPDebug(LDAP_DEBUG_ANY, "using default value for log bufsize because
configured value (%lu) is too small.\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "using default value for log bufsize
because configured value (%lu) is too small.\n",
priv->dblayer_logbuf_size, 0, 0);
}
}
@@ -1537,7 +1537,7 @@ dblayer_start(struct ldbminfo *li, int dbmode)
return_value = thisenv->remove(thisenv, region_dir, DB_FORCE);
if (0 != return_value)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"dblayer_start: failed to remove old db env "
"in %s: %s\n", region_dir,
dblayer_strerror(return_value), 0);
@@ -1547,7 +1547,7 @@ dblayer_start(struct ldbminfo *li, int dbmode)
if ((return_value = dblayer_make_env(&pEnv, li)) != 0)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR -- Failed to create DBENV (returned: %d).\n",
return_value, 0, 0);
return return_value;
@@ -1566,17 +1566,17 @@ dblayer_start(struct ldbminfo *li, int dbmode)
*
https://blackflag.mcom.com/show_bug.cgi?id=557319
* Crash ns-slapd while running scalab01 after restart slapd
*/
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"mmap in opening database environment (recovery mode)
"
"failed trying to allocate %lu bytes. (OS err %d -
%s)\n",
li->li_dbcachesize, return_value,
dblayer_strerror(return_value));
dblayer_free_env(&priv->dblayer_env);
priv->dblayer_env = CATASTROPHIC;
} else {
- LDAPDebug(LDAP_DEBUG_ANY, "Database Recovery Process FAILED. "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Database Recovery Process
FAILED. "
"The database is not recoverable. err=%d: %s\n",
return_value, dblayer_strerror(return_value), 0);
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Please make sure there is enough disk space for "
"dbcache (%lu bytes) and db region files\n",
li->li_dbcachesize, 0, 0);
@@ -1586,7 +1586,7 @@ dblayer_start(struct ldbminfo *li, int dbmode)
open_flags &= ~(DB_RECOVER | DB_RECOVER_FATAL);
pEnv->dblayer_DB_ENV->close(pEnv->dblayer_DB_ENV, 0);
if ((return_value = dblayer_make_env(&pEnv, li)) != 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR -- Failed to create DBENV (returned: %d).\n",
return_value, 0, 0);
return return_value;
@@ -1665,14 +1665,14 @@ dblayer_start(struct ldbminfo *li, int dbmode)
*
https://blackflag.mcom.com/show_bug.cgi?id=557319
* Crash ns-slapd while running scalab01 after restart slapd
*/
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"mmap in opening database environment "
"failed trying to allocate %d bytes. (OS err %lu -
%s)\n",
li->li_dbcachesize, return_value,
dblayer_strerror(return_value));
dblayer_free_env(&priv->dblayer_env);
priv->dblayer_env = CATASTROPHIC;
} else {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Opening database environment (%s) failed. err=%d:
%s\n",
region_dir, return_value, dblayer_strerror(return_value));
}
@@ -1713,7 +1713,7 @@ check_and_set_import_cache(struct ldbminfo *li)
pagesize, pages);
return ENOENT;
}
- LDAPDebug(LDAP_DEBUG_ANY, "check_and_set_import_cache: "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "check_and_set_import_cache: "
"pagesize: %ld, pages: %ld, procpages: %ld\n",
pagesize, pages, procpages);
@@ -1757,7 +1757,7 @@ check_and_set_import_cache(struct ldbminfo *li)
page_delta = pages - import_pages;
if (page_delta < hard_limit) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"After allocating import cache %ldKB, "
"the available memory is %ldKB, "
"which is less than the hard limit %ldKB. "
@@ -1767,7 +1767,7 @@ check_and_set_import_cache(struct ldbminfo *li)
return ENOMEM;
}
if (page_delta < soft_limit) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"WARNING: After allocating import cache %ldKB, "
"the available memory is %ldKB, "
"which is less than the soft limit %ldKB. "
@@ -1833,21 +1833,21 @@ int dblayer_instance_start(backend *be, int mode)
priv = (dblayer_private*)li->li_dblayer_private;
pEnv = priv->dblayer_env;
if (CATASTROPHIC == pEnv || NULL == pEnv) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"instance %s: dbenv is not available (0x%x).\n",
inst?inst->inst_name:"unknown", pEnv, 0);
return return_value;
}
if (NULL != inst->inst_id2entry) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: DB instance \"%s\" already started.\n",
inst->inst_name, 0, 0);
return 0;
}
if (attrcrypt_init(inst)) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Error: unable to initialize attrcrypt system for %s\n",
inst->inst_name, 0, 0);
return return_value;
@@ -1866,12 +1866,12 @@ int dblayer_instance_start(backend *be, int mode)
return_value = dblayer_grok_directory(inst_dirp,
DBLAYER_DIRECTORY_READWRITE_ACCESS);
} else {
- LDAPDebug(LDAP_DEBUG_ANY,"Can't start because the database instance
"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Can't start because the database
instance "
"directory is NULL\n", 0, 0, 0);
goto errout;
}
if (0 != return_value) {
- LDAPDebug(LDAP_DEBUG_ANY,"Can't start because the database instance
"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Can't start because the database
instance "
"directory \"%s\" either doesn't exist, "
"or the db files are not accessible\n",
inst_dirp, 0, 0);
@@ -1889,7 +1889,7 @@ int dblayer_instance_start(backend *be, int mode)
char *dataversion = NULL;
if (dbversion_read(li, inst_dirp, &ldbmversion, &dataversion) != 0)
{
- LDAPDebug(LDAP_DEBUG_ANY, "Warning: Unable to read dbversion "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Warning: Unable to read
dbversion "
"file in %s\n", inst->inst_dir_name, 0, 0);
} else {
int rval = 0;
@@ -1905,7 +1905,7 @@ int dblayer_instance_start(backend *be, int mode)
rval = check_db_inst_version(inst);
if (rval & DBVERSION_NOT_SUPPORTED)
{
- LDAPDebug(LDAP_DEBUG_ANY, "Instance %s does not have the "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Instance %s does not have
the "
"expected version\n", inst->inst_name, 0, 0);
PR_ASSERT(0);
slapi_ch_free_string(&dataversion);
@@ -1943,7 +1943,7 @@ int dblayer_instance_start(backend *be, int mode)
rval = ldbm_upgrade(inst, rval);
if (0 != rval)
{
- LDAPDebug(LDAP_DEBUG_ANY, "Upgrading instance %s
failed\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Upgrading instance %s
failed\n",
inst->inst_name, 0, 0);
PR_ASSERT(0);
return_value = -1;
@@ -1952,7 +1952,7 @@ int dblayer_instance_start(backend *be, int mode)
/**
if (rval & DBVERSION_NEED_IDL_OLD2NEW)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Instance %s: idl-switch is new while db idl format is
"
"old, modify nsslapd-idl-switch in dse.ldif to old\n",
inst->inst_name, 0, 0);
@@ -1961,7 +1961,7 @@ int dblayer_instance_start(backend *be, int mode)
}
else if (rval & DBVERSION_NEED_IDL_NEW2OLD)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Instance %s: idl-switch is old while db idl format is
"
"new, modify nsslapd-idl-switch in dse.ldif to new\n",
inst->inst_name, 0, 0);
@@ -2008,7 +2008,7 @@ int dblayer_instance_start(backend *be, int mode)
* but nsslapd-db-private-import-mem should work with import,
* as well */
if (priv->dblayer_private_import_mem) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"WARNING: Import is running with "
"nsslapd-db-private-import-mem on; "
"No other process is allowed to access the database\n",
@@ -2038,7 +2038,7 @@ int dblayer_instance_start(backend *be, int mode)
/* use our own env */
return_value = dblayer_make_env(&mypEnv, li);
if (return_value != 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Unable to create new DB_ENV for import/export!
%d\n",
return_value, 0, 0);
goto out;
@@ -2059,7 +2059,7 @@ int dblayer_instance_start(backend *be, int mode)
oflags,
priv->dblayer_file_mode);
if (return_value != 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Unable to open new DB_ENV for import/export! %d\n",
return_value, 0, 0);
goto out;
@@ -2072,7 +2072,7 @@ int dblayer_instance_start(backend *be, int mode)
inst->inst_id2entry = NULL;
return_value = db_create(&inst->inst_id2entry, mypEnv->dblayer_DB_ENV,
0);
if (0 != return_value) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Unable to create id2entry db file! %d\n",
return_value, 0, 0);
goto out;
@@ -2083,7 +2083,7 @@ int dblayer_instance_start(backend *be, int mode)
(priv->dblayer_page_size == 0) ? DBLAYER_PAGESIZE :
priv->dblayer_page_size);
if (0 != return_value) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"dbp->set_pagesize(%lu or %lu) failed %d\n",
priv->dblayer_page_size, DBLAYER_PAGESIZE,
return_value);
@@ -2121,7 +2121,7 @@ int dblayer_instance_start(backend *be, int mode)
(priv->dblayer_page_size == 0) ? DBLAYER_PAGESIZE :
priv->dblayer_page_size);
if (0 != return_value) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"dbp->set_pagesize(%lu or %lu) failed %d\n",
priv->dblayer_page_size, DBLAYER_PAGESIZE,
return_value);
@@ -2143,7 +2143,7 @@ int dblayer_instance_start(backend *be, int mode)
dbp, NULL/* txnid */, id2entry_file, subname, DB_BTREE,
open_flags, priv->dblayer_file_mode, return_value);
if (0 != return_value) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"dbp->open(\"%s\") failed: %s (%d)\n",
id2entry_file, dblayer_strerror(return_value),
return_value);
@@ -2153,7 +2153,7 @@ int dblayer_instance_start(backend *be, int mode)
if (strstr(dblayer_strerror(return_value),
"No such file or directory"))
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Instance %s is not registered as a db data directory. "
"Please restart the server to create it.\n",
inst?inst->inst_name:"unknown", pEnv, 0);
@@ -2161,7 +2161,7 @@ int dblayer_instance_start(backend *be, int mode)
else if (strstr(dblayer_strerror(return_value),
"Permission denied"))
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Instance directory %s may not be writable\n",
inst_dirp, 0, 0);
}
@@ -2200,14 +2200,14 @@ out:
* being imported or is in normal mode
*/
if (inst->inst_nextid > MAXID && !(mode & DBLAYER_EXPORT_MODE)) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_instance_start fail: backend '%s'
"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_instance_start fail: backend
'%s' "
"has no IDs left. DATABASE MUST BE REBUILT.\n",
be->be_name, 0, 0);
return 1;
}
if (return_value != 0) {
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_instance_start fail: %s (%d)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_instance_start fail: %s
(%d)\n",
dblayer_strerror(return_value), return_value, 0);
}
errout:
@@ -2299,7 +2299,7 @@ dblayer_get_aux_id2entry_ext(backend *be, DB **ppDB, DB_ENV
**ppEnv,
inst = (ldbm_instance *) be->be_instance_info;
if (NULL == inst)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"No instance/env: persistent id2entry is not available\n", 0, 0,
0);
goto done;
}
@@ -2307,7 +2307,7 @@ dblayer_get_aux_id2entry_ext(backend *be, DB **ppDB, DB_ENV
**ppEnv,
li = inst->inst_li;
if (NULL == li)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"No ldbm info: persistent id2entry is not available\n", 0, 0, 0);
goto done;
}
@@ -2315,7 +2315,7 @@ dblayer_get_aux_id2entry_ext(backend *be, DB **ppDB, DB_ENV
**ppEnv,
opriv = li->li_dblayer_private;
if (NULL == opriv)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"No dblayer info: persistent id2entry is not available\n", 0, 0,
0);
goto done;
}
@@ -2330,7 +2330,7 @@ dblayer_get_aux_id2entry_ext(backend *be, DB **ppDB, DB_ENV
**ppEnv,
}
else
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Instance dir is NULL: persistent id2entry is not available\n",
0, 0, 0);
goto done;
@@ -2340,7 +2340,7 @@ dblayer_get_aux_id2entry_ext(backend *be, DB **ppDB, DB_ENV
**ppEnv,
prst = PR_GetFileInfo64(inst_dirp, &prfinfo);
if (PR_FAILURE == prst || PR_FILE_DIRECTORY != prfinfo.type)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"No inst dir: persistent id2entry is not available\n", 0, 0, 0);
goto done;
}
@@ -2400,7 +2400,7 @@ dblayer_get_aux_id2entry_ext(backend *be, DB **ppDB, DB_ENV
**ppEnv,
rval = dbp->set_pagesize(dbp, (priv->dblayer_page_size == 0) ?
DBLAYER_PAGESIZE : priv->dblayer_page_size);
if (rval) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"dbp->set_pagesize(%lu or %lu) failed %d\n",
priv->dblayer_page_size, DBLAYER_PAGESIZE, rval);
goto err;
@@ -2419,7 +2419,7 @@ dblayer_get_aux_id2entry_ext(backend *be, DB **ppDB, DB_ENV
**ppEnv,
DB_OPEN(envflags, dbp, NULL/* txnid */, id2entry_file, subname, DB_BTREE,
dbflags, priv->dblayer_file_mode, rval);
if (rval) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"dbp->open(\"%s\") failed: %s (%d)\n",
id2entry_file, dblayer_strerror(rval), rval);
if (strstr(dblayer_strerror(rval), "Permission denied")) {
@@ -2471,7 +2471,7 @@ int dblayer_release_aux_id2entry(backend *be, DB *pDB, DB_ENV
*pEnv)
inst = (ldbm_instance *) be->be_instance_info;
if (NULL == inst)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"No instance/env: persistent id2entry is not available\n", 0, 0,
0);
goto done;
}
@@ -2553,7 +2553,7 @@ int dblayer_instance_close(backend *be)
}
if (attrcrypt_cleanup_private(inst)) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Error: failed to clean up attrcrypt system for %s\n",
inst->inst_name, 0, 0);
}
@@ -2620,7 +2620,7 @@ void dblayer_pre_close(struct ldbminfo *li)
PRIntervalTime cvwaittime = PR_MillisecondsToInterval(DBLAYER_SLEEP_INTERVAL *
100);
int timedout = 0;
/* Print handy-dandy log message */
- LDAPDebug(LDAP_DEBUG_ANY,"Waiting for %d database threads to stop\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Waiting for %d database threads to
stop\n",
threadcount, 0,0);
PR_Lock(priv->thread_count_lock);
/* Tell them to stop - we wait until the last possible moment to invoke
@@ -2653,14 +2653,14 @@ void dblayer_pre_close(struct ldbminfo *li)
}
PR_Unlock(priv->thread_count_lock);
if (timedout) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Timeout after [%d] milliseconds; leave %d database
thread(s)...\n",
(DBLAYER_SLEEP_INTERVAL * 100), threadcount,0);
priv->dblayer_bad_stuff_happened = 1;
goto timeout_escape;
}
}
- LDAPDebug(LDAP_DEBUG_ANY,"All database threads now stopped\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"All database threads now
stopped\n",0,0,0);
timeout_escape:
return;
}
@@ -2932,7 +2932,7 @@ dblayer_open_file(backend *be, char* indexname, int open_flag,
!is_fullpath(inst->inst_dir_name))
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"The instance path %s is not registered for db_data_dir, "
"although %s is a relative path.\n",
inst->inst_parent_dir_name, inst->inst_dir_name, 0);
@@ -3188,7 +3188,7 @@ dblayer_db_remove_ex(dblayer_private_env *env, char const path[],
char const dbN
rc = db_create(&db, db_env, 0); /* must use new handle to database */
if (0 != rc) {
- LDAPDebug(LDAP_DEBUG_ANY, "db_remove: Failed to create db (%d) %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "db_remove: Failed to create db (%d)
%s\n",
rc, dblayer_strerror(rc), 0);
goto done;
}
@@ -3415,7 +3415,7 @@ dblayer_txn_begin_ext(struct ldbminfo *li, back_txnid parent_txn,
back_txn *txn,
int txn_id = new_txn.back_txn_txn->id(new_txn.back_txn_txn);
PR_Lock(sync_txn_log_flush);
txn_in_progress_count++;
- LDAPDebug(LDAP_DEBUG_BACKLDBM, "txn_begin: batchcount: %d,
txn_in_progress: %d, curr_txn: %x\n", trans_batch_count, txn_in_progress_count,
txn_id);
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "txn_begin: batchcount:
%d, txn_in_progress: %d, curr_txn: %x\n", trans_batch_count, txn_in_progress_count,
txn_id);
PR_Unlock(sync_txn_log_flush);
}
dblayer_push_pvt_txn(&new_txn);
@@ -3429,7 +3429,7 @@ dblayer_txn_begin_ext(struct ldbminfo *li, back_txnid parent_txn,
back_txn *txn,
}
if (0 != return_value)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Serious Error---Failed in dblayer_txn_begin, err=%d
(%s)\n",
return_value, dblayer_strerror(return_value), 0);
}
@@ -3515,7 +3515,7 @@ int dblayer_txn_commit_ext(struct ldbminfo *li, back_txn *txn,
PRBool use_lock)
PR_Lock(sync_txn_log_flush);
txn_batch_slot = trans_batch_count++;
txn_log_flush_pending[txn_batch_slot] = txn_id;
- LDAPDebug(LDAP_DEBUG_BACKLDBM, "txn_commit (before notify):
batchcount: %d, "
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "txn_commit (before
notify): batchcount: %d, "
"txn_in_progress: %d, curr_txn: %x\n",
trans_batch_count,
txn_in_progress_count, txn_id);
/*
@@ -3538,7 +3538,7 @@ int dblayer_txn_commit_ext(struct ldbminfo *li, back_txn *txn,
PRBool use_lock)
PR_WaitCondVar(sync_txn_log_flush_done, PR_INTERVAL_NO_TIMEOUT);
}
txn_in_progress_count--;
- LDAPDebug(LDAP_DEBUG_BACKLDBM, "txn_commit (before unlock):
batchcount: %d, "
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "txn_commit (before
unlock): batchcount: %d, "
"txn_in_progress: %d, curr_txn %x\n",
trans_batch_count,
txn_in_progress_count, txn_id);
PR_Unlock(sync_txn_log_flush);
@@ -3554,7 +3554,7 @@ int dblayer_txn_commit_ext(struct ldbminfo *li, back_txn *txn,
PRBool use_lock)
if (0 != return_value)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Serious Error---Failed in dblayer_txn_commit, err=%d
(%s)\n",
return_value, dblayer_strerror(return_value), 0);
if (LDBM_OS_ERR_IS_DISKFULL(return_value)) {
@@ -3622,7 +3622,7 @@ int dblayer_txn_abort_ext(struct ldbminfo *li, back_txn *txn, PRBool
use_lock)
PR_Lock(sync_txn_log_flush);
txn_in_progress_count--;
PR_Unlock(sync_txn_log_flush);
- LDAPDebug(LDAP_DEBUG_BACKLDBM, "txn_abort : batchcount: %d,
txn_in_progress: %d, curr_txn: %x\n", trans_batch_count, txn_in_progress_count,
txn_id);
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "txn_abort : batchcount: %d,
txn_in_progress: %d, curr_txn: %x\n", trans_batch_count, txn_in_progress_count,
txn_id);
}
return_value = TXN_ABORT(db_txn);
/* if we were given a transaction, and it is the same as the
@@ -3644,7 +3644,7 @@ int dblayer_txn_abort_ext(struct ldbminfo *li, back_txn *txn, PRBool
use_lock)
if (0 != return_value)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Serious Error---Failed in dblayer_txn_abort, err=%d
(%s)\n",
return_value, dblayer_strerror(return_value), 0);
if (LDBM_OS_ERR_IS_DISKFULL(return_value)) {
@@ -3774,7 +3774,7 @@ dblayer_start_perf_thread(struct ldbminfo *li)
SLAPD_DEFAULT_THREAD_STACKSIZE) )
{
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, "failed to create database perf thread, "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "failed to create database perf thread,
"
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
return_value = -1;
@@ -3802,7 +3802,7 @@ static int perf_threadmain(void *param)
}
DECR_THREAD_COUNT(priv);
- LDAPDebug(LDAP_DEBUG_TRACE, "Leaving perf_threadmain\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "Leaving perf_threadmain\n", 0, 0,
0);
return 0;
}
@@ -3820,7 +3820,7 @@ dblayer_start_deadlock_thread(struct ldbminfo *li)
SLAPD_DEFAULT_THREAD_STACKSIZE) )
{
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, "failed to create database deadlock thread,
"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "failed to create database deadlock
thread, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
return_value = -1;
@@ -4251,7 +4251,7 @@ dblayer_start_txn_test_thread(struct ldbminfo *li)
SLAPD_DEFAULT_THREAD_STACKSIZE) )
{
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, "failed to create txn test thread, "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "failed to create txn test thread,
"
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
return_value = -1;
@@ -4289,7 +4289,7 @@ static int deadlock_threadmain(void *param)
int rejected = 0;
if ((rval = LOCK_DETECT(db_env, flags, deadlock_policy, &rejected))
!= 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Serious Error---Failed in deadlock detect (aborted at
0x%x), err=%d (%s)\n",
rejected, rval, dblayer_strerror(rval));
} else if (rejected) {
@@ -4302,12 +4302,12 @@ static int deadlock_threadmain(void *param)
}
DECR_THREAD_COUNT(priv);
- LDAPDebug(LDAP_DEBUG_TRACE, "Leaving deadlock_threadmain\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "Leaving deadlock_threadmain\n", 0,
0, 0);
return 0;
}
#define checkpoint_debug_message(debug, fmt, a1, a2, a3) \
- if (debug) { LDAPDebug(LDAP_DEBUG_ANY,fmt,a1,a2,a3); }
+ if (debug) { LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,fmt,a1,a2,a3); }
/* this thread tries to do two things:
1. catch a group of transactions that are pending allowing a worker thread
@@ -4336,7 +4336,7 @@ dblayer_start_log_flush_thread(dblayer_private *priv)
PR_UNJOINABLE_THREAD,
SLAPD_DEFAULT_THREAD_STACKSIZE) ) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"failed to create database log flush thread, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
@@ -4381,7 +4381,7 @@ static int log_flush_threadmain(void *param)
PR_Unlock(sync_txn_log_flush);
break;
}
- LDAPDebug(LDAP_DEBUG_BACKLDBM, "log_flush_threadmain (in loop):
batchcount: %d, "
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "log_flush_threadmain (in
loop): batchcount: %d, "
"txn_in_progress: %d\n", trans_batch_count,
txn_in_progress_count, 0);
/*
* if here, do flush the txn logs if any of the following conditions are
met
@@ -4390,7 +4390,7 @@ static int log_flush_threadmain(void *param)
* - do_flush indicate that the max waiting interval is exceeded
*/
if(trans_batch_count >= trans_batch_limit || trans_batch_count >=
txn_in_progress_count || do_flush) {
- LDAPDebug(LDAP_DEBUG_BACKLDBM, "log_flush_threadmain (working):
batchcount: %d, "
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "log_flush_threadmain
(working): batchcount: %d, "
"txn_in_progress: %d\n", trans_batch_count,
txn_in_progress_count, 0);
LOG_FLUSH(priv->dblayer_env->dblayer_DB_ENV,0);
for (i=0;i<trans_batch_count;i++){
@@ -4399,7 +4399,7 @@ static int log_flush_threadmain(void *param)
trans_batch_count = 0;
last_flush = PR_IntervalNow();
do_flush = 0;
- LDAPDebug(LDAP_DEBUG_BACKLDBM, "log_flush_threadmain (before
notify): batchcount: %d, "
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "log_flush_threadmain
(before notify): batchcount: %d, "
"txn_in_progress: %d\n", trans_batch_count,
txn_in_progress_count, 0);
PR_NotifyAllCondVar(sync_txn_log_flush_done);
}
@@ -4415,7 +4415,7 @@ static int log_flush_threadmain(void *param)
PR_WaitCondVar(sync_txn_log_do_flush, interval_wait);
}
PR_Unlock(sync_txn_log_flush);
- LDAPDebug(LDAP_DEBUG_BACKLDBM, "log_flush_threadmain (wakeup):
batchcount: %d, "
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "log_flush_threadmain
(wakeup): batchcount: %d, "
"txn_in_progress: %d\n", trans_batch_count,
txn_in_progress_count, 0);
} else {
DS_Sleep(interval_def);
@@ -4426,7 +4426,7 @@ static int log_flush_threadmain(void *param)
}
DECR_THREAD_COUNT(priv);
- LDAPDebug(LDAP_DEBUG_TRACE, "Leaving log_flush_threadmain\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "Leaving log_flush_threadmain\n", 0,
0, 0);
return 0;
}
@@ -4444,7 +4444,7 @@ dblayer_start_checkpoint_thread(struct ldbminfo *li)
SLAPD_DEFAULT_THREAD_STACKSIZE) )
{
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"failed to create database checkpoint thread, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
@@ -4488,7 +4488,7 @@ static int checkpoint_threadmain(void *param)
home_dir = dblayer_get_home_dir(li, NULL);
if (NULL == home_dir || '\0' == *home_dir)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Checkpoint thread failed due to missing db home directory
info\n",
0, 0, 0);
goto error_return;
@@ -4541,7 +4541,7 @@ static int checkpoint_threadmain(void *param)
"Checkpoint Done\n", 0, 0, 0);
if (rval != 0) {
/* bad error */
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Serious Error---Failed to checkpoint database, "
"err=%d (%s)\n", rval, dblayer_strerror(rval), 0);
if (LDBM_OS_ERR_IS_DISKFULL(rval)) {
@@ -4569,7 +4569,7 @@ static int checkpoint_threadmain(void *param)
"Checkpoint Done\n", 0, 0, 0);
if (rval != 0) {
/* bad error */
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Serious Error---Failed to checkpoint database, "
"err=%d (%s)\n", rval, dblayer_strerror(rval), 0);
if (LDBM_OS_ERR_IS_DISKFULL(rval)) {
@@ -4612,11 +4612,11 @@ static int checkpoint_threadmain(void *param)
rc = db->compact(db, txn.back_txn_txn, NULL/*start*/, NULL/*stop*/,
&c_data, DB_FREE_SPACE, NULL/*end*/);
if (rc) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"compactdb: failed to compact %s; db error - %d
%s\n",
inst->inst_name, rc, db_strerror(rc));
if((rc = dblayer_txn_abort(inst->inst_be, &txn))){
- LDAPDebug(LDAP_DEBUG_ANY, "compactdb: failed to abort txn
(%s) db error - %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "compactdb: failed to
abort txn (%s) db error - %d %s\n",
inst->inst_name, rc, db_strerror(rc));
break;
}
@@ -4625,7 +4625,7 @@ static int checkpoint_threadmain(void *param)
"compactdb: compact %s - %d pages freed\n",
inst->inst_name, c_data.compact_pages_free);
if((rc = dblayer_txn_commit(inst->inst_be, &txn))){
- LDAPDebug(LDAP_DEBUG_ANY, "compactdb: failed to commit txn
(%s) db error - %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "compactdb: failed to
commit txn (%s) db error - %d %s\n",
inst->inst_name, rc, db_strerror(rc));
break;
}
@@ -4656,7 +4656,7 @@ static int checkpoint_threadmain(void *param)
checkpoint_debug_message(debug_checkpointing,
"Renaming %s -> %s\n",*listp, new_filename,
0);
if(rename(*listp, new_filename) != 0){
- LDAPDebug(LDAP_DEBUG_ANY, "checkpoint_threadmain: failed to
rename log (%s) to (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "checkpoint_threadmain:
failed to rename log (%s) to (%s)\n",
*listp, new_filename, 0);
rval = -1;
goto error_return;
@@ -4696,7 +4696,7 @@ dblayer_start_trickle_thread(struct ldbminfo *li)
SLAPD_DEFAULT_THREAD_STACKSIZE) )
{
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, "failed to create database trickle thread, "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "failed to create database trickle
thread, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
return_value = -1;
@@ -4735,7 +4735,7 @@ static int trickle_threadmain(void *param)
priv->dblayer_trickle_percentage,
&pages_written)) != 0)
{
- LDAPDebug(LDAP_DEBUG_ANY,"Serious Error---Failed to trickle,
err=%d (%s)\n",rval,dblayer_strerror(rval), 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Serious Error---Failed to
trickle, err=%d (%s)\n",rval,dblayer_strerror(rval), 0);
}
if (pages_written > 0)
{
@@ -4746,7 +4746,7 @@ static int trickle_threadmain(void *param)
}
DECR_THREAD_COUNT(priv);
- LDAPDebug(LDAP_DEBUG_TRACE, "Leaving trickle_threadmain priv\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "Leaving trickle_threadmain priv\n",
0, 0, 0);
return 0;
}
@@ -4986,7 +4986,7 @@ static int commit_good_database(dblayer_private *priv)
priv->dblayer_file_mode );
if (NULL == prfd)
{
- LDAPDebug( LDAP_DEBUG_ANY,"Fatal Error---Failed to write guardian file %s,
database corruption possible" SLAPI_COMPONENT_NAME_NSPR " %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Fatal Error---Failed to write guardian
file %s, database corruption possible" SLAPI_COMPONENT_NAME_NSPR " %d
(%s)\n",
filename, PR_GetError(), slapd_pr_strerror(PR_GetError()) );
return -1;
}
@@ -5004,7 +5004,7 @@ static int commit_good_database(dblayer_private *priv)
return 0;
} else
{
- LDAPDebug( LDAP_DEBUG_ANY,"Fatal Error---Failed to write guardian file,
database corruption possible\n", 0,0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Fatal Error---Failed to write guardian
file, database corruption possible\n", 0,0, 0 );
(void)PR_Delete(filename);
return -1;
}
@@ -5069,7 +5069,7 @@ static int read_metadata(struct ldbminfo *li)
so we should check for condition 3.
*/
if (!dbversion_exists(li, home_dir)) {
- LDAPDebug( LDAP_DEBUG_ANY,"Fatal Error---database is corrupt.
Server can't start. Most likely cause is a previously aborted import. Either re-import
or delete the database and re-start the server.\n", 0,0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Fatal Error---database is
corrupt. Server can't start. Most likely cause is a previously aborted import. Either
re-import or delete the database and re-start the server.\n", 0,0, 0 );
return -1;
} else {
priv->dblayer_recovery_required = 1;
@@ -5122,7 +5122,7 @@ static int read_metadata(struct ldbminfo *li)
(void)PR_Close(prfd);
return_value = PR_Delete(filename); /* very important that this happen ! */
if (PR_SUCCESS != return_value) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Fatal Error---Failed to delete guardian file, "
"database corruption possible\n", 0, 0, 0 );
}
@@ -5145,7 +5145,7 @@ static int dblayer_force_checkpoint(struct ldbminfo *li)
if (priv->dblayer_enable_transactions) {
- LDAPDebug(LDAP_DEBUG_TRACE, "Checkpointing database ...\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "Checkpointing database ...\n", 0,
0, 0);
/*
* DB workaround. Newly created environments do not know what the
@@ -5161,21 +5161,21 @@ static int dblayer_force_checkpoint(struct ldbminfo *li)
if (ret != DB_INCOMPLETE)
#endif
{
- LDAPDebug(LDAP_DEBUG_ANY, "Checkpoint FAILED, error %s (%d)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Checkpoint FAILED, error %s
(%d)\n",
dblayer_strerror(ret), ret, 0);
break;
}
#if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR < 4100
- LDAPDebug(LDAP_DEBUG_ANY, "Busy: retrying checkpoint\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Busy: retrying checkpoint\n", 0, 0,
0);
/* teletubbies: "again! again!" */
ret = dblayer_txn_checkpoint(li, pEnv, PR_TRUE, PR_FALSE, PR_TRUE);
if (ret == DB_INCOMPLETE) {
- LDAPDebug(LDAP_DEBUG_ANY, "Busy: giving up on checkpoint\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Busy: giving up on checkpoint\n",
0, 0, 0);
break;
} else if (ret != 0) {
- LDAPDebug(LDAP_DEBUG_ANY, "Checkpoint FAILED, error %s (%d)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Checkpoint FAILED, error %s
(%d)\n",
dblayer_strerror(ret), ret, 0);
break;
}
@@ -5260,7 +5260,7 @@ static int _dblayer_delete_instance_dir(ldbm_instance *inst, int
startdb)
rval = dblayer_start(li, DBLAYER_NORMAL_MODE|DBLAYER_NO_DBTHREADS_MODE);
if (rval)
{
- LDAPDebug(LDAP_DEBUG_ANY, "_dblayer_delete_instance_dir: dblayer_start
failed! %s (%d)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "_dblayer_delete_instance_dir:
dblayer_start failed! %s (%d)\n",
dblayer_strerror(rval), rval, 0);
goto done;
}
@@ -5286,10 +5286,10 @@ static int _dblayer_delete_instance_dir(ldbm_instance *inst, int
startdb)
goto done;
}
if (inst_dirp && *inst_dirp) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"_dblayer_delete_instance_dir: inst_dir is NULL\n", 0, 0, 0);
} else {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"_dblayer_delete_instance_dir: PR_OpenDir(%s) failed (%d): %s\n",
inst_dirp, PR_GetError(),slapd_pr_strerror(PR_GetError()));
}
@@ -5334,7 +5334,7 @@ static int _dblayer_delete_instance_dir(ldbm_instance *inst, int
startdb)
rval = dblayer_close(li, DBLAYER_NORMAL_MODE);
if (rval)
{
- LDAPDebug(LDAP_DEBUG_ANY, "_dblayer_delete_instance_dir: dblayer_close
failed! %s (%d)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "_dblayer_delete_instance_dir:
dblayer_close failed! %s (%d)\n",
dblayer_strerror(rval), rval, 0);
}
}
@@ -5394,7 +5394,7 @@ dblayer_delete_database_ex(struct ldbminfo *li, char *instance, char
*cldir)
if (inst->inst_be->be_instance_info != NULL) {
if ((NULL != instance) && (strcasecmp(inst->inst_name,instance) != 0))
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"dblayer_delete_database: skipping instance %s\n",inst->inst_name , 0,
0);
} else
{
@@ -5406,7 +5406,7 @@ dblayer_delete_database_ex(struct ldbminfo *li, char *instance, char
*cldir)
}
if (ret != 0)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"dblayer_delete_database: WARNING _dblayer_delete_instance_dir failed
(%d)\n", ret, 0, 0);
return ret;
}
@@ -5429,7 +5429,7 @@ dblayer_delete_database_ex(struct ldbminfo *li, char *instance, char
*cldir)
dirhandle = PR_OpenDir(priv->dblayer_home_directory);
if (! dirhandle)
{
- LDAPDebug(LDAP_DEBUG_ANY, "PR_OpenDir (%s) failed (%d): %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "PR_OpenDir (%s) failed (%d): %s\n",
priv->dblayer_home_directory,
PR_GetError(),slapd_pr_strerror(PR_GetError()));
return -1;
@@ -5473,7 +5473,7 @@ dblayer_delete_database_ex(struct ldbminfo *li, char *instance, char
*cldir)
{
ret = dblayer_delete_transaction_logs(log_dir);
if(ret) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"dblayer_delete_database: dblayer_delete_transaction_logs failed (%d)\n",
ret, 0, 0);
return -1;
@@ -5685,7 +5685,7 @@ dblayer_copyfile(char *source, char *destination, int overwrite, int
mode)
break;
} else {
/* means error */
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copyfile: failed to write by
\"%s\"; real: %d bytes, exp: %d bytes\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copyfile: failed to
write by \"%s\"; real: %d bytes, exp: %d bytes\n",
strerror(errno), return_value, bytes_to_write);
if (return_value > 0) {
bytes_to_write -= return_value;
@@ -5792,7 +5792,7 @@ dblayer_copy_directory(struct ldbminfo *li,
} else {
inst = ldbm_instance_find_by_name(li, relative_instance_name);
if (NULL == inst) {
- LDAPDebug(LDAP_DEBUG_ANY, "Backend instance \"%s\" does not
exist; "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Backend instance \"%s\"
does not exist; "
"Instance path %s could be invalid.\n",
relative_instance_name, src_dir, 0);
return return_value;
@@ -5808,7 +5808,7 @@ dblayer_copy_directory(struct ldbminfo *li,
inst_dir, MAXPATHLEN);
if (!inst_dirp || !*inst_dirp)
{
- LDAPDebug(LDAP_DEBUG_ANY, "Instance dir is NULL.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Instance dir is NULL.\n", 0, 0,
0);
return return_value;
}
len = strlen(inst_dirp);
@@ -5881,7 +5881,7 @@ dblayer_copy_directory(struct ldbminfo *li,
}
if (mkdir_p(new_dest_dir, 0700) != PR_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "Can't create new directory %s,
"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Can't create new
directory %s, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
new_dest_dir, PR_GetError(),
slapd_pr_strerror(PR_GetError()));
@@ -5893,7 +5893,7 @@ dblayer_copy_directory(struct ldbminfo *li,
filename2 = slapi_ch_smprintf("%s/%s", new_dest_dir,
direntry->name);
if (restore) {
- LDAPDebug(LDAP_DEBUG_ANY, "Restoring file %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Restoring file %d (%s)\n",
*cnt, filename2, 0);
if (task) {
slapi_task_log_notice(task,
@@ -5902,7 +5902,7 @@ dblayer_copy_directory(struct ldbminfo *li,
"Restoring file %d (%s)", *cnt, filename2);
}
} else {
- LDAPDebug(LDAP_DEBUG_ANY, "Backing up file %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Backing up file %d
(%s)\n",
*cnt, filename2, 0);
if (task) {
slapi_task_log_notice(task,
@@ -6139,7 +6139,7 @@ dblayer_backup(struct ldbminfo *li, char *dest_dir, Slapi_Task
*task)
dest_dir, 0 /* backup */,
&cnt, 0, 0, 0);
if (return_value) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Backup: error in copying directory "
"(%s -> %s): err=%d\n",
inst_dirp, dest_dir, return_value);
@@ -6167,7 +6167,7 @@ dblayer_backup(struct ldbminfo *li, char *dest_dir, Slapi_Task
*task)
0 /* backup */,
&cnt, 0, 0, 1);
if (return_value) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Backup: error in copying directory "
"(%s -> %s): err=%d\n",
changelogdir, changelog_destdir, return_value);
@@ -6305,7 +6305,7 @@ dblayer_backup(struct ldbminfo *li, char *dest_dir, Slapi_Task
*task)
}
return_value = dblayer_copyfile(pathname1, pathname2, 0,
priv->dblayer_file_mode);
if (0 > return_value) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Backup: error in copying version file "
"(%s -> %s): err=%d\n",
pathname1, pathname2, return_value);
@@ -6385,7 +6385,7 @@ int dblayer_delete_transaction_logs(const char * log_dir)
{
if (NULL == direntry->name) {
/* NSPR doesn't behave like the docs say it should */
- LDAPDebug(LDAP_DEBUG_ANY, "PR_ReadDir failed (%d): %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "PR_ReadDir failed (%d):
%s\n",
PR_GetError(),slapd_pr_strerror(PR_GetError()), 0);
break;
}
@@ -6397,7 +6397,7 @@ int dblayer_delete_transaction_logs(const char * log_dir)
is_a_logfile = dblayer_is_logfilename(direntry->name);
if (is_a_logfile && (NULL != log_dir) && (0 !=
strlen(log_dir)) )
{
- LDAPDebug(LDAP_DEBUG_ANY, "Deleting log file: (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Deleting log file:
(%s)\n",
filename1, 0, 0);
unlink(filename1);
}
@@ -6406,7 +6406,7 @@ int dblayer_delete_transaction_logs(const char * log_dir)
}
else if (PR_FILE_NOT_FOUND_ERROR != PR_GetError())
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"dblayer_delete_transaction_logs: PR_OpenDir(%s) failed (%d):
%s\n",
log_dir, PR_GetError(),slapd_pr_strerror(PR_GetError()));
rc=1;
@@ -6458,7 +6458,7 @@ static int dblayer_copy_dirand_contents(char* src_dir, char*
dst_dir, int mode,
PR_snprintf(filename1, MAXPATHLEN, "%s/%s", src_dir,
direntry->name);
PR_snprintf(filename2, MAXPATHLEN, "%s/%s", dst_dir,
direntry->name);
- LDAPDebug(LDAP_DEBUG_ANY, "Moving file %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Moving file %s\n",
filename2, 0, 0);
/* Is this entry a directory? */
tmp_rval = PR_GetFileInfo64(filename1, &info);
@@ -6524,7 +6524,7 @@ static int dblayer_fri_trim(char *fri_dir_path, char* bename)
{
if(strcasecmp(direntry->name,bename)!=0)
{
- LDAPDebug(LDAP_DEBUG_ANY, "Removing file %s from staging area\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Removing file %s from staging
area\n",
filename, 0, 0);
ldbm_delete_dirs(filename);
}
@@ -6534,7 +6534,7 @@ static int dblayer_fri_trim(char *fri_dir_path, char* bename)
if ((strcmp(direntry->name,"DBVERSION") == 0)||
(strncmp(direntry->name,"__",2) == 0)||
(strncmp(direntry->name,"log",3) == 0)){
- LDAPDebug(LDAP_DEBUG_ANY, "Removing file %s from staging area\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Removing file %s from staging area\n",
filename, 0, 0);
PR_Delete(filename);
}
@@ -6579,18 +6579,18 @@ static int dblayer_fri_restore(char *home_dir, char *src_dir,
dblayer_private *p
fribak_dir_path = slapi_ch_smprintf("%s/../%s",home_dir,fribak_dir_name);
if((-1 == PR_MkDir(fribak_dir_path,NEWDIR_MODE)))
{
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_fri_restore: %s
exists\n",fribak_dir_path, 0, 0);
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_fri_restore: Removing
%s.\n",fribak_dir_path, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_fri_restore: %s
exists\n",fribak_dir_path, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_fri_restore: Removing
%s.\n",fribak_dir_path, 0, 0);
retval = ldbm_delete_dirs(fribak_dir_path);
if (retval)
{
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_fri_restore: Removal of %s failed!\n",
fribak_dir_path, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_fri_restore: Removal of %s
failed!\n", fribak_dir_path, 0, 0);
goto error;
}
PR_MkDir(fribak_dir_path,NEWDIR_MODE);
if (retval != PR_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_fri_restore: Creation of %s failed!\n",
fribak_dir_path, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_fri_restore: Creation of %s
failed!\n", fribak_dir_path, 0, 0);
goto error;
}
}
@@ -6599,21 +6599,21 @@ static int dblayer_fri_restore(char *home_dir, char *src_dir,
dblayer_private *p
retval = dblayer_copy_dirand_contents(src_dir, fribak_dir_path, mode, task);
if (retval)
{
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_fri_restore: Copy contents to %s
failed!\n", fribak_dir_path, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_fri_restore: Copy contents to %s
failed!\n", fribak_dir_path, 0, 0);
goto error;
}
/* Next, run recovery on the files */
retval = dblayer_recover_environment_path(fribak_dir_path, priv);
if (retval)
{
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_fri_restore: Recovery failed!\n", 0, 0,
0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_fri_restore: Recovery
failed!\n", 0, 0, 0);
goto error;
}
/* Files nicely recovered, next we stip out what we don't need from the backup set
*/
retval = dblayer_fri_trim(fribak_dir_path,bename);
if (retval)
{
- LDAPDebug(LDAP_DEBUG_ANY, "dblayer_fri_restore: Trim failed!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_fri_restore: Trim failed!\n", 0,
0, 0);
goto error;
}
*new_src_dir = fribak_dir_path;
@@ -7084,7 +7084,7 @@ dblayer_file_open(char *fname, int flags, int mode, PRFileDesc
**prfd)
if (NULL == *prfd) rc = PR_GetError();
if (rc && rc != PR_FILE_NOT_FOUND_ERROR ) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Failed to open file: %s, error: (%d) %s\n",
fname, rc, slapd_pr_strerror(rc));
}
@@ -7323,7 +7323,7 @@ int dblayer_update_db_ext(ldbm_instance *inst, char *oldext, char
*newext)
if (NULL == inst)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"update_db_ext: Null instance is passed\n", 0, 0, 0);
return -1; /* non zero */
}
@@ -7331,7 +7331,7 @@ int dblayer_update_db_ext(ldbm_instance *inst, char *oldext, char
*newext)
priv = (dblayer_private*)li->li_dblayer_private;
inst_dirp = dblayer_get_full_inst_dir(li, inst, inst_dir, MAXPATHLEN);
if (NULL == inst_dirp || '\0' == *inst_dirp) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"update_db_ext: instance dir is NULL\n", 0, 0, 0);
return -1; /* non zero */
}
@@ -7352,21 +7352,21 @@ int dblayer_update_db_ext(ldbm_instance *inst, char *oldext, char
*newext)
rval = db_create(&thisdb, priv->dblayer_env->dblayer_DB_ENV, 0);
if (0 != rval)
{
- LDAPDebug(LDAP_DEBUG_ANY, "db_create returned %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "db_create returned %d (%s)\n",
rval, dblayer_strerror(rval), 0);
goto done;
}
nfile = slapi_ch_smprintf("%s/%s%s", inst_dirp, a->ai_type,
newext);
- LDAPDebug(LDAP_DEBUG_TRACE, "update_db_ext: rename %s -> %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "update_db_ext: rename %s ->
%s\n",
ofile, nfile, 0);
rval = thisdb->rename(thisdb, (const char *)ofile, NULL /* subdb */,
(const char *)nfile, 0);
if (0 != rval)
{
- LDAPDebug(LDAP_DEBUG_ANY, "rename returned %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "rename returned %d (%s)\n",
rval, dblayer_strerror(rval), 0);
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"update_db_ext: index (%s) Failed to update index %s ->
%s\n",
inst->inst_name, ofile, nfile);
goto done;
@@ -7378,21 +7378,21 @@ int dblayer_update_db_ext(ldbm_instance *inst, char *oldext, char
*newext)
rval = db_create(&thisdb, priv->dblayer_env->dblayer_DB_ENV, 0);
if (0 != rval)
{
- LDAPDebug(LDAP_DEBUG_ANY, "db_create returned %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "db_create returned %d (%s)\n",
rval, dblayer_strerror(rval), 0);
goto done;
}
ofile = slapi_ch_smprintf("%s/%s%s", inst_dirp, ID2ENTRY, oldext);
nfile = slapi_ch_smprintf("%s/%s%s", inst_dirp, ID2ENTRY, newext);
- LDAPDebug(LDAP_DEBUG_TRACE, "update_db_ext: rename %s -> %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "update_db_ext: rename %s ->
%s\n",
ofile, nfile, 0);
rval = thisdb->rename(thisdb, (const char *)ofile, NULL /* subdb */,
(const char *)nfile, 0);
if (0 != rval)
{
- LDAPDebug(LDAP_DEBUG_ANY, "rename returned %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "rename returned %d (%s)\n",
rval, dblayer_strerror(rval), 0);
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"update_db_ext: index (%s) Failed to update index %s ->
%s\n",
inst->inst_name, ofile, nfile);
}
@@ -7416,7 +7416,7 @@ int dblayer_delete_indices(ldbm_instance *inst)
if (NULL == inst)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"update_index_ext: Null instance is passed\n", 0, 0, 0);
return rval;
}
@@ -7434,7 +7434,7 @@ void dblayer_set_recovery_required(struct ldbminfo *li)
{
if (NULL == li || NULL == li->li_dblayer_private)
{
- LDAPDebug(LDAP_DEBUG_ANY,"set_recovery_required: no dblayer info\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"set_recovery_required: no dblayer
info\n",
0, 0, 0);
return;
}
diff --git a/ldap/servers/slapd/back-ldbm/dbversion.c
b/ldap/servers/slapd/back-ldbm/dbversion.c
index 4d28cd6..e8d9e79 100644
--- a/ldap/servers/slapd/back-ldbm/dbversion.c
+++ b/ldap/servers/slapd/back-ldbm/dbversion.c
@@ -62,7 +62,7 @@ dbversion_write(struct ldbminfo *li, const char *directory,
if (( prfd = PR_Open( filename, PR_RDWR | PR_CREATE_FILE | PR_TRUNCATE,
SLAPD_DEFAULT_FILE_MODE )) == NULL )
{
- LDAPDebug( LDAP_DEBUG_ANY, "Could not open file \"%s\" for writing
"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Could not open file \"%s\" for
writing "
SLAPI_COMPONENT_NAME_NSPR " %d (%s)\n",
filename, PR_GetError(), slapd_pr_strerror(PR_GetError()) );
rc= -1;
@@ -100,7 +100,7 @@ dbversion_write(struct ldbminfo *li, const char *directory,
len = strlen(buf);
if ( slapi_write_buffer( prfd, buf, len ) != (PRInt32)len )
{
- LDAPDebug( LDAP_DEBUG_ANY, "Could not write to file
\"%s\"\n", filename, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Could not write to file
\"%s\"\n", filename, 0, 0 );
rc= -1;
}
if(rc==0 && dataversion!=NULL)
@@ -109,7 +109,7 @@ dbversion_write(struct ldbminfo *li, const char *directory,
len = strlen( buf );
if ( slapi_write_buffer( prfd, buf, len ) != (PRInt32)len )
{
- LDAPDebug( LDAP_DEBUG_ANY, "Could not write to file
\"%s\"\n", filename, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Could not write to file
\"%s\"\n", filename, 0, 0 );
rc= -1;
}
}
diff --git a/ldap/servers/slapd/back-ldbm/dn2entry.c
b/ldap/servers/slapd/back-ldbm/dn2entry.c
index 7656688..3db2b3f 100644
--- a/ldap/servers/slapd/back-ldbm/dn2entry.c
+++ b/ldap/servers/slapd/back-ldbm/dn2entry.c
@@ -45,7 +45,7 @@ dn2entry_ext(
struct backentry *e = NULL;
char *indexname = "";
- LDAPDebug( LDAP_DEBUG_TRACE, "=> dn2entry_ext \"%s\"\n",
slapi_sdn_get_dn(sdn), 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> dn2entry_ext
\"%s\"\n", slapi_sdn_get_dn(sdn), 0, 0 );
inst = (ldbm_instance *) be->be_instance_info;
@@ -118,7 +118,7 @@ dn2entry_ext(
* entrydn index, but we could not read the entry
* from the id2entry index. what should we do?
*/
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"dn2entry_ext: the dn \"%s\" was in the %s index, "
"but it did not exist in id2entry of instance %s.\n",
slapi_sdn_get_dn(sdn), indexname, inst->inst_name);
@@ -126,7 +126,7 @@ dn2entry_ext(
}
}
bail:
- LDAPDebug( LDAP_DEBUG_TRACE, "<= dn2entry_ext %p\n", e, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= dn2entry_ext %p\n", e, 0, 0 );
return( e );
}
@@ -159,7 +159,7 @@ dn2ancestor(
{
struct backentry *e = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> dn2ancestor \"%s\"\n",
slapi_sdn_get_dn(sdn), 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> dn2ancestor
\"%s\"\n", slapi_sdn_get_dn(sdn), 0, 0 );
/* first, check to see if the given sdn is empty or a root suffix of the
given backend - if so, it has no parent */
@@ -221,7 +221,7 @@ dn2ancestor(
e is the entry of the ancestor of sdn OR e is the suffix entry
OR e is NULL
ancestordn contains the unnormalized DN of e or is empty */
- LDAPDebug( LDAP_DEBUG_TRACE, "<= dn2ancestor %p\n", e, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= dn2ancestor %p\n", e, 0, 0
);
return( e );
}
@@ -255,7 +255,7 @@ get_copy_of_entry(Slapi_PBlock *pb, const entry_address *addr,
back_txn *txn, in
{
if(must_exist)
{
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Operation error fetching %s (%s), error %d.\n",
addr->sdn?slapi_sdn_get_dn(addr->sdn):"Null DN",
(addr->uniqueid==NULL?"null":addr->uniqueid), err );
diff --git a/ldap/servers/slapd/back-ldbm/filterindex.c
b/ldap/servers/slapd/back-ldbm/filterindex.c
index e87cf30..49e83cb 100644
--- a/ldap/servers/slapd/back-ldbm/filterindex.c
+++ b/ldap/servers/slapd/back-ldbm/filterindex.c
@@ -65,7 +65,7 @@ filter_candidates_ext(
IDList *result;
int ftype;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> filter_candidates\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> filter_candidates\n", 0, 0, 0
);
if (!allidslimit) {
allidslimit = compute_allids_limit(pb, li);
@@ -74,7 +74,7 @@ filter_candidates_ext(
/* check if this is to be serviced by a virtual index */
if(INDEX_FILTER_EVALUTED == index_subsys_evaluate_filter(f,
(Slapi_DN*)slapi_be_getsuffix(be, 0), (IndexEntryList**)&result))
{
- LDAPDebug( LDAP_DEBUG_TRACE, "<= filter_candidates %lu (vattr)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= filter_candidates %lu
(vattr)\n",
(u_long)IDL_NIDS(result), 0, 0 );
return result;
}
@@ -88,7 +88,7 @@ filter_candidates_ext(
slapi_pblock_get(pb, SLAPI_TXN, &txn.back_txn_txn);
result = vlv_find_index_by_filter_txn(be, base, f, &txn);
if (result) {
- LDAPDebug( LDAP_DEBUG_TRACE, "<= filter_candidates %lu
(vlv)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= filter_candidates %lu
(vlv)\n",
(u_long)IDL_NIDS(result), 0, 0 );
return result;
}
@@ -97,66 +97,66 @@ filter_candidates_ext(
result = NULL;
switch ( (ftype = slapi_filter_get_choice( f )) ) {
case LDAP_FILTER_EQUALITY:
- LDAPDebug( LDAP_DEBUG_FILTER, "\tEQUALITY\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "\tEQUALITY\n", 0, 0, 0 );
result = ava_candidates( pb, be, f, LDAP_FILTER_EQUALITY, nextf, range, err,
allidslimit );
break;
case LDAP_FILTER_SUBSTRINGS:
- LDAPDebug( LDAP_DEBUG_FILTER, "\tSUBSTRINGS\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "\tSUBSTRINGS\n", 0, 0, 0 );
result = substring_candidates( pb, be, f, err, allidslimit );
break;
case LDAP_FILTER_GE:
- LDAPDebug( LDAP_DEBUG_FILTER, "\tGE\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "\tGE\n", 0, 0, 0 );
result = ava_candidates( pb, be, f, LDAP_FILTER_GE, nextf, range,
err, allidslimit );
break;
case LDAP_FILTER_LE:
- LDAPDebug( LDAP_DEBUG_FILTER, "\tLE\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "\tLE\n", 0, 0, 0 );
result = ava_candidates( pb, be, f, LDAP_FILTER_LE, nextf, range,
err, allidslimit );
break;
case LDAP_FILTER_PRESENT:
- LDAPDebug( LDAP_DEBUG_FILTER, "\tPRESENT\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "\tPRESENT\n", 0, 0, 0 );
result = presence_candidates( pb, be, f, err, allidslimit );
break;
case LDAP_FILTER_APPROX:
- LDAPDebug( LDAP_DEBUG_FILTER, "\tAPPROX\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "\tAPPROX\n", 0, 0, 0 );
result = ava_candidates( pb, be, f, LDAP_FILTER_APPROX, nextf,
range, err, allidslimit );
break;
case LDAP_FILTER_EXTENDED:
- LDAPDebug( LDAP_DEBUG_FILTER, "\tEXTENSIBLE\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "\tEXTENSIBLE\n", 0, 0, 0 );
result = extensible_candidates( pb, be, f, err, allidslimit );
break;
case LDAP_FILTER_AND:
- LDAPDebug( LDAP_DEBUG_FILTER, "\tAND\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "\tAND\n", 0, 0, 0 );
result = list_candidates( pb, be, base, f, LDAP_FILTER_AND, err, allidslimit );
break;
case LDAP_FILTER_OR:
- LDAPDebug( LDAP_DEBUG_FILTER, "\tOR\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "\tOR\n", 0, 0, 0 );
result = list_candidates( pb, be, base, f, LDAP_FILTER_OR, err, allidslimit );
break;
case LDAP_FILTER_NOT:
- LDAPDebug( LDAP_DEBUG_FILTER, "\tNOT\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "\tNOT\n", 0, 0, 0 );
result = idl_allids( be );
break;
default:
- LDAPDebug( LDAP_DEBUG_FILTER,
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
"filter_candidates: unknown type 0x%X\n",
ftype, 0, 0 );
break;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= filter_candidates %lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= filter_candidates %lu\n",
(u_long)IDL_NIDS(result), 0, 0 );
return( result );
}
@@ -197,10 +197,10 @@ ava_candidates(
back_txn txn = {NULL};
int pr_idx = -1;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> ava_candidates\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ava_candidates\n", 0, 0, 0
);
if ( slapi_filter_get_ava( f, &type, &bval ) != 0 ) {
- LDAPDebug( LDAP_DEBUG_TRACE, " slapi_filter_get_ava failed\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, " slapi_filter_get_ava
failed\n",
0, 0, 0 );
return( NULL );
}
@@ -227,7 +227,7 @@ ava_candidates(
op = "~=";
break;
}
- LDAPDebug( LDAP_DEBUG_TRACE, " %s%s%s\n", type, op,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, " %s%s%s\n", type, op,
encode( bval, buf ) );
}
#endif
@@ -235,13 +235,13 @@ ava_candidates(
switch ( ftype ) {
case LDAP_FILTER_GE:
idl = range_candidates(pb, be, type, bval, NULL, err, &sattr,
allidslimit);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= ava_candidates %lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ava_candidates
%lu\n",
(u_long)IDL_NIDS(idl), 0, 0 );
goto done;
break;
case LDAP_FILTER_LE:
idl = range_candidates(pb, be, type, NULL, bval, err, &sattr,
allidslimit);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= ava_candidates %lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ava_candidates
%lu\n",
(u_long)IDL_NIDS(idl), 0, 0 );
goto done;
break;
@@ -252,7 +252,7 @@ ava_candidates(
indextype = (char*)indextype_APPROX;
break;
default:
- LDAPDebug( LDAP_DEBUG_TRACE, "<= ava_candidates invalid
filter\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ava_candidates invalid
filter\n", 0, 0, 0 );
goto done;
break;
}
@@ -312,7 +312,7 @@ ava_candidates(
slapi_attr_assertion2keys_ava_sv( &sattr, &sv, &ivals, ftype );
value_done(&sv);
if ( ivals == NULL || *ivals == NULL ) {
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= ava_candidates ALLIDS (no keys)\n", 0, 0, 0 );
idl = idl_allids( be );
goto done;
@@ -324,7 +324,7 @@ ava_candidates(
pagedresults_set_unindexed( pb->pb_conn, pb->pb_op, pr_idx );
}
valuearray_free( &ivals );
- LDAPDebug( LDAP_DEBUG_TRACE, "<= ava_candidates %lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ava_candidates %lu\n",
(u_long)IDL_NIDS(idl), 0, 0 );
}
done:
@@ -346,10 +346,10 @@ presence_candidates(
int unindexed = 0;
back_txn txn = {NULL};
- LDAPDebug( LDAP_DEBUG_TRACE, "=> presence_candidates\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> presence_candidates\n", 0, 0,
0 );
if ( slapi_filter_get_type( f, &type ) != 0 ) {
- LDAPDebug( LDAP_DEBUG_ANY, " slapi_filter_get_type failed\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, " slapi_filter_get_type
failed\n",
0, 0, 0 );
return( NULL );
}
@@ -367,7 +367,7 @@ presence_candidates(
if (idl != NULL && ALLIDS(idl) && strcasecmp(type,
"nscpentrydn") == 0) {
/* try the equality index instead */
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"fallback to eq index as pres index gave allids\n",
0, 0, 0);
idl_free(&idl);
@@ -376,7 +376,7 @@ presence_candidates(
NULL, NULL, 0, &txn, err, allidslimit);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= presence_candidates %lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= presence_candidates %lu\n",
(u_long)IDL_NIDS(idl), 0, 0 );
return( idl );
}
@@ -395,7 +395,7 @@ extensible_candidates(
int mrOP = 0;
Slapi_Operation *op = NULL;
back_txn txn = {NULL};
- LDAPDebug (LDAP_DEBUG_TRACE, "=> extensible_candidates\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> extensible_candidates\n", 0,
0, 0);
slapi_pblock_get(glob_pb, SLAPI_TXN, &txn.back_txn_txn);
if ( ! slapi_mr_filter_index (f, pb) && !slapi_pblock_get (pb,
SLAPI_PLUGIN_MR_QUERY_OPERATOR, &mrOP))
{
@@ -525,7 +525,7 @@ return_idl:
op = NULL;
slapi_pblock_set (pb, SLAPI_OPERATION, op);
slapi_pblock_destroy (pb);
- LDAPDebug (LDAP_DEBUG_TRACE, "<= extensible_candidates %lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= extensible_candidates %lu\n",
(u_long)IDL_NIDS(idl), 0, 0);
return idl;
}
@@ -555,14 +555,14 @@ range_candidates(
int operator = 0;
Operation *op = NULL;
- LDAPDebug(LDAP_DEBUG_TRACE, "=> range_candidates attr=%s\n", type, 0,
0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> range_candidates attr=%s\n",
type, 0, 0);
slapi_pblock_get(pb, SLAPI_TXN, &txn.back_txn_txn);
if (low_val != NULL) {
slapi_attr_assertion2keys_ava(sattr, low_val, &lows, LDAP_FILTER_EQUALITY);
if (lows == NULL || *lows == NULL) {
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= range_candidates ALLIDS (no keys)\n", 0, 0, 0 );
idl = idl_allids( be );
goto done;
@@ -573,7 +573,7 @@ range_candidates(
if (high_val != NULL) {
slapi_attr_assertion2keys_ava(sattr, high_val, &highs,
LDAP_FILTER_EQUALITY);
if (highs == NULL || *highs == NULL) {
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= range_candidates ALLIDS (no keys)\n", 0, 0, 0 );
idl = idl_allids( be );
goto done;
@@ -606,7 +606,7 @@ done:
if (lows) ber_bvecfree(lows);
if (highs) ber_bvecfree(highs);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= range_candidates %lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= range_candidates %lu\n",
(u_long)IDL_NIDS(idl), 0, 0 );
return idl;
@@ -656,7 +656,7 @@ list_candidates(
struct berval *vpairs[2] = {NULL, NULL};
int is_and = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> list_candidates 0x%x\n", ftype, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> list_candidates 0x%x\n",
ftype, 0, 0 );
/*
* Optimize bounded range queries such as (&(cn>=A)(cn<=B)).
@@ -753,7 +753,7 @@ list_candidates(
slapi_attr_init(&sattr, tpairs[0]);
idl = range_candidates(pb, be, tpairs[0], vpairs[0], vpairs[1], err, &sattr,
allidslimit);
attr_done(&sattr);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= list_candidates %lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= list_candidates %lu\n",
(u_long)IDL_NIDS(idl), 0, 0 );
goto out;
}
@@ -779,7 +779,7 @@ list_candidates(
/* Fetch the IDL for foo */
/* Later we'll remember to call idl_notin() */
- LDAPDebug( LDAP_DEBUG_TRACE,"NOT filter\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"NOT filter\n", 0, 0, 0 );
if (filter_is_subtype(slapi_filter_list_first(f))) {
/*
* If subtype is included in the filter (e.g., !(cn;fr=<CN>)),
@@ -806,7 +806,7 @@ list_candidates(
attr_done(&sattr);
if (tmp == NULL && ftype == LDAP_FILTER_AND)
{
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= list_candidates NULL\n", 0, 0, 0 );
idl_free( &idl );
idl = NULL;
@@ -816,7 +816,7 @@ list_candidates(
/* Proceed as normal */
else if ( (tmp = filter_candidates_ext( pb, be, base, f, nextf, range, err,
allidslimit ))
== NULL && ftype == LDAP_FILTER_AND ) {
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= list_candidates NULL\n", 0, 0, 0 );
idl_free( &idl );
idl = NULL;
@@ -879,7 +879,7 @@ list_candidates(
}
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= list_candidates %lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= list_candidates %lu\n",
(u_long)IDL_NIDS(idl), 0, 0 );
out:
if (is_and) {
@@ -918,10 +918,10 @@ substring_candidates(
int pr_idx = -1;
struct attrinfo *ai = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> sub_candidates\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> sub_candidates\n", 0, 0, 0
);
if (slapi_filter_get_subfilt( f, &type, &initial, &any, &final ) !=
0) {
- LDAPDebug( LDAP_DEBUG_ANY, " slapi_filter_get_subfilt fails\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, " slapi_filter_get_subfilt
fails\n",
0, 0, 0 );
return( NULL );
}
@@ -939,7 +939,7 @@ substring_candidates(
if ( ivals == NULL || *ivals == NULL ) {
slapi_pblock_set( pb, SLAPI_OPERATION_NOTES, &opnote );
pagedresults_set_unindexed( pb->pb_conn, pb->pb_op, pr_idx );
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= sub_candidates ALLIDS (no keys)\n", 0, 0, 0 );
return( idl_allids( be ) );
}
@@ -956,7 +956,7 @@ substring_candidates(
}
valuearray_free( &ivals );
- LDAPDebug( LDAP_DEBUG_TRACE, "<= sub_candidates %lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= sub_candidates %lu\n",
(u_long)IDL_NIDS(idl), 0, 0 );
return( idl );
}
@@ -977,7 +977,7 @@ keys2idl(
IDList *idl;
int i;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> keys2idl type %s indextype %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> keys2idl type %s indextype
%s\n",
type, indextype, 0 );
idl = NULL;
for ( i = 0; ivals[i] != NULL; i++ ) {
@@ -990,7 +990,7 @@ keys2idl(
{
char buf[BUFSIZ];
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
" ival[%d] = \"%s\" => %lu IDs\n", i,
encode( slapi_value_get_berval(ivals[i]), buf ), (u_long)IDL_NIDS(idl2)
);
}
diff --git a/ldap/servers/slapd/back-ldbm/findentry.c
b/ldap/servers/slapd/back-ldbm/findentry.c
index 8b842e3..4942ada 100644
--- a/ldap/servers/slapd/back-ldbm/findentry.c
+++ b/ldap/servers/slapd/back-ldbm/findentry.c
@@ -46,7 +46,7 @@ check_entry_for_referral(Slapi_PBlock *pb, Slapi_Entry *entry, char
*matched, co
url=(struct berval **) slapi_ch_malloc((numValues + 1) * sizeof(struct berval*));
if (!url) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"check_entry_for_referral: Out of memory\n",
0, 0, 0);
goto out;
@@ -62,7 +62,7 @@ check_entry_for_referral(Slapi_PBlock *pb, Slapi_Entry *entry, char
*matched, co
slapi_send_ldap_result( pb, LDAP_REFERRAL, matched, NULL, 0, refscopy );
rc= 1;
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= %s sent referral to (%s) for (%s)\n",
callingfn,
refscopy ? refscopy[0]->bv_val : "",
@@ -133,7 +133,7 @@ find_entry_internal_dn(
/* wait for entry modify lock */
if ( !lock || cache_lock_entry( &inst->inst_cache, e ) == 0 ) {
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= find_entry_internal_dn found (%s)\n", slapi_sdn_get_dn(sdn), 0, 0
);
return( e );
}
@@ -141,13 +141,13 @@ find_entry_internal_dn(
* this entry has been deleted - see if it was actually
* replaced with a new copy, and try the whole thing again.
*/
- LDAPDebug( LDAP_DEBUG_ARGS,
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG,
" find_entry_internal_dn retrying (%s)\n", slapi_sdn_get_dn(sdn), 0, 0
);
CACHE_RETURN( &inst->inst_cache, &e );
tries++;
}
if (tries >= LDBM_CACHE_RETRY_COUNT) {
- LDAPDebug( LDAP_DEBUG_ANY,"find_entry_internal_dn retry count exceeded
(%s)\n", slapi_sdn_get_dn(sdn), 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"find_entry_internal_dn retry count exceeded
(%s)\n", slapi_sdn_get_dn(sdn), 0, 0 );
}
/*
* there is no such entry in this server. see how far we
@@ -243,7 +243,7 @@ find_entry_internal_dn(
}
slapi_ch_free_string(&errbuf);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= find_entry_internal_dn not found (%s)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= find_entry_internal_dn not found
(%s)\n",
slapi_sdn_get_dn(sdn), 0, 0 );
return( NULL );
}
@@ -277,7 +277,7 @@ find_entry_internal_uniqueid(
/* wait for entry modify lock */
if ( !lock || cache_lock_entry( &inst->inst_cache, e ) == 0 ) {
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= find_entry_internal_uniqueid found; uniqueid = (%s)\n",
uniqueid, 0, 0 );
return( e );
@@ -286,14 +286,14 @@ find_entry_internal_uniqueid(
* this entry has been deleted - see if it was actually
* replaced with a new copy, and try the whole thing again.
*/
- LDAPDebug( LDAP_DEBUG_ARGS,
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG,
" find_entry_internal_uniqueid retrying; uniqueid = (%s)\n",
uniqueid, 0, 0 );
CACHE_RETURN( &inst->inst_cache, &e );
tries++;
}
if (tries >= LDBM_CACHE_RETRY_COUNT) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"find_entry_internal_uniqueid retry count exceeded; uniqueid = (%s)\n",
uniqueid , 0, 0 );
}
@@ -302,7 +302,7 @@ find_entry_internal_uniqueid(
slapi_send_ldap_result( pb, ( 0 == err || DB_NOTFOUND == err ) ?
LDAP_NO_SUCH_OBJECT : LDAP_OPERATIONS_ERROR, NULL /* matched */, NULL,
0, NULL );
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= find_entry_internal_uniqueid not found; uniqueid = (%s)\n",
uniqueid, 0, 0 );
return( NULL );
@@ -322,7 +322,7 @@ find_entry_internal(
/* check if we should search based on uniqueid or dn */
if (addr->uniqueid!=NULL)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "=> find_entry_internal (uniqueid=%s) lock
%d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> find_entry_internal (uniqueid=%s)
lock %d\n",
addr->uniqueid, lock, 0 );
return (find_entry_internal_uniqueid (pb, be, addr->uniqueid, lock, txn));
}
@@ -330,7 +330,7 @@ find_entry_internal(
{
struct backentry *entry = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> find_entry_internal (dn=%s) lock %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> find_entry_internal (dn=%s) lock
%d\n",
slapi_sdn_get_dn(addr->sdn), lock, 0 );
if (addr->sdn) {
entry = find_entry_internal_dn (pb, be, addr->sdn, lock, txn, flags, rc);
diff --git a/ldap/servers/slapd/back-ldbm/id2entry.c
b/ldap/servers/slapd/back-ldbm/id2entry.c
index aa012c1..e6521d9 100644
--- a/ldap/servers/slapd/back-ldbm/id2entry.c
+++ b/ldap/servers/slapd/back-ldbm/id2entry.c
@@ -36,11 +36,11 @@ id2entry_add_ext(backend *be, struct backentry *e, back_txn *txn,
struct backentry *encrypted_entry = NULL;
char *entrydn = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> id2entry_add( %lu, \"%s\"
)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> id2entry_add( %lu,
\"%s\" )\n",
(u_long)e->ep_id, backentry_get_ndn(e), 0 );
if ( (rc = dblayer_get_id2entry( be, &db )) != 0 ) {
- LDAPDebug( LDAP_DEBUG_ANY, "Could not open/create id2entry\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Could not open/create id2entry\n",
0, 0, 0 );
rc = -1;
goto done;
@@ -56,7 +56,7 @@ id2entry_add_ext(backend *be, struct backentry *e, back_txn *txn,
if (encrypt) {
rc = attrcrypt_encrypt_entry(be, e, &encrypted_entry);
if (rc) {
- LDAPDebug( LDAP_DEBUG_ANY, "attrcrypt_encrypt_entry failed in
id2entry_add\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "attrcrypt_encrypt_entry failed in
id2entry_add\n",
0, 0, 0 );
rc = -1;
goto done;
@@ -82,7 +82,7 @@ id2entry_add_ext(backend *be, struct backentry *e, back_txn *txn,
if (cache_replace( &inst->inst_dncache, oldbdn, bdn ) != 0) {
/* The entry was not in the cache for some reason (this
* should not happen since CACHE_ADD said it existed above). */
- LDAPDebug( LDAP_DEBUG_ANY, "id2entry_add_ext(): Entry
disappeared "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "id2entry_add_ext():
Entry disappeared "
"from cache (%s)\n", oldbdn->dn_sdn, 0, 0
);
}
}
@@ -189,7 +189,7 @@ done:
backentry_free(&encrypted_entry);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= id2entry_add %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= id2entry_add %d\n", rc, 0, 0
);
return( rc );
}
@@ -211,11 +211,11 @@ id2entry_delete( backend *be, struct backentry *e, back_txn *txn )
int rc;
char temp_id[sizeof(ID)];
- LDAPDebug( LDAP_DEBUG_TRACE, "=> id2entry_delete( %lu, \"%s\"
)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> id2entry_delete( %lu,
\"%s\" )\n",
(u_long)e->ep_id, backentry_get_ndn(e), 0 );
if ( (rc = dblayer_get_id2entry( be, &db )) != 0 ) {
- LDAPDebug( LDAP_DEBUG_ANY, "Could not open/create id2entry\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Could not open/create id2entry\n",
0, 0, 0 );
return( -1 );
}
@@ -245,7 +245,7 @@ id2entry_delete( backend *be, struct backentry *e, back_txn *txn )
rc = db->del( db,db_txn,&key,0 );
dblayer_release_id2entry( be, db );
- LDAPDebug( LDAP_DEBUG_TRACE, "<= id2entry_delete %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= id2entry_delete %d\n", rc, 0,
0 );
return( rc );
}
diff --git a/ldap/servers/slapd/back-ldbm/idl.c b/ldap/servers/slapd/back-ldbm/idl.c
index ada7879..7ecdc81 100644
--- a/ldap/servers/slapd/back-ldbm/idl.c
+++ b/ldap/servers/slapd/back-ldbm/idl.c
@@ -72,7 +72,7 @@ static void idl_init_maxids(struct ldbminfo *li,idl_private *priv)
}
priv->idl_maxindirect = (li->li_allidsthreshold / priv->idl_maxids) + 1;
priv->idl_allidslimit = (priv->idl_maxids * priv->idl_maxindirect);
- LDAPDebug (LDAP_DEBUG_ARGS,
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG,
"idl_init_private: blksize %lu, maxids %i, maxindirect %i\n",
(unsigned long)blksize, priv->idl_maxids, priv->idl_maxindirect);
}
@@ -195,7 +195,7 @@ idl_fetch_one(
DBT data = {0};
IDList *idl = NULL;
- /* LDAPDebug( LDAP_DEBUG_TRACE, "=> idl_fetch_one\n", 0, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> idl_fetch_one\n", 0, 0, 0 );
*/
data.flags = DB_DBT_MALLOC;
@@ -205,14 +205,14 @@ idl_fetch_one(
{
char *msg;
if ( EPERM == *err && *err != errno ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"idl_fetch_one(%s): Database failed to run, "
"There is either insufficient disk space or "
"insufficient memory available for database.\n",
((char*)key->dptr)[ key->dsize - 1 ] ?
"" : (char*)key->dptr, 0, 0 );
} else {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"idl_fetch_one error %d %s\n",
*err, (msg = dblayer_strerror( *err )) ? msg : "", 0 );
}
@@ -246,7 +246,7 @@ idl_old_fetch(
int i;
unsigned long nids;
- /* LDAPDebug( LDAP_DEBUG_TRACE, "=> idl_fetch\n", 0, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> idl_fetch\n", 0, 0, 0 ); */
if ( (idl = idl_fetch_one( li, db, key, txn, err )) == NULL ) {
return( NULL );
}
@@ -324,16 +324,16 @@ idl_old_fetch(
/* Check for inconsistencies: */
if ( tmp[i]->b_ids[0] != thisID ) {
- LDAPDebug (LDAP_DEBUG_ANY, "idl_fetch_one(%s)->b_ids[0] == %lu\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_fetch_one(%s)->b_ids[0] ==
%lu\n",
k2.dptr, (u_long)tmp[i]->b_ids[0], 0);
}
if ( nextID != NOID ) {
if ( nextID <= thisID ) {
- LDAPDebug (LDAP_DEBUG_ANY, "indirect block (%s) contains %lu, %lu\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "indirect block (%s) contains %lu,
%lu\n",
key->dptr, (u_long)thisID, (u_long)nextID);
}
if ( nextID <= tmp[i]->b_ids[(tmp[i]->b_nids)-1] ) {
- LDAPDebug (LDAP_DEBUG_ANY, "idl_fetch_one(%s)->b_ids[last] == %lu"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_fetch_one(%s)->b_ids[last] ==
%lu"
" >= %lu (next indirect ID)\n",
k2.dptr, (u_long)tmp[i]->b_ids[(tmp[i]->b_nids)-1], (u_long)nextID);
}
@@ -363,7 +363,7 @@ idl_old_fetch(
}
slapi_ch_free((void**)&tmp );
- LDAPDebug( LDAP_DEBUG_TRACE, "<= idl_fetch %lu ids (%lu max)\n",
(u_long)idl->b_nids,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= idl_fetch %lu ids (%lu max)\n",
(u_long)idl->b_nids,
(u_long)idl->b_nmax, 0 );
return( idl );
}
@@ -380,7 +380,7 @@ idl_store(
int rc;
DBT data = {0};
- /* LDAPDebug( LDAP_DEBUG_TRACE, "=> idl_store\n", 0, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> idl_store\n", 0, 0, 0 ); */
data.dptr = (char *) idl;
data.dsize = (2 + idl->b_nmax) * sizeof(ID);
@@ -389,7 +389,7 @@ idl_store(
if ( 0 != rc ) {
char *msg;
if ( EPERM == rc && rc != errno ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"idl_store(%s): Database failed to run, "
"There is insufficient memory available for database.\n",
((char*)key->dptr)[ key->dsize - 1 ] ? "" :
(char*)key->dptr, 0, 0 );
@@ -402,13 +402,13 @@ idl_store(
((char*)key->dptr)[ key->dsize - 1 ] ? "" :
(char*)key->dptr,
rc, (msg = dblayer_strerror( rc )) ? msg : "" );
if (rc == DB_RUNRECOVERY) {
- LDAPDebug(LDAP_DEBUG_ANY, "%s\n", "Note: idl_store failures can be
an indication of insufficient disk space.", 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s\n", "Note: idl_store
failures can be an indication of insufficient disk space.", 0, 0);
ldbm_nasty("idl_store",71,rc);
}
}
}
- /* LDAPDebug( LDAP_DEBUG_TRACE, "<= idl_store %d\n", rc, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= idl_store %d\n", rc, 0, 0 );
*/
return( rc );
}
@@ -471,13 +471,13 @@ idl_change_first(
int rc;
char *msg;
- /* LDAPDebug( LDAP_DEBUG_TRACE, "=> idl_change_first\n", 0, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> idl_change_first\n", 0, 0, 0
); */
/* delete old key block */
rc = db->del( db, txn, bkey, 0 );
if ( (rc != 0) && (DB_LOCK_DEADLOCK != rc) )
{
- LDAPDebug( LDAP_DEBUG_ANY, "idl_change_first del (%s) err %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_change_first del (%s) err %d %s\n",
bkey->dptr, rc, (msg = dblayer_strerror( rc )) ? msg : "" );
if (rc == DB_RUNRECOVERY) {
ldbm_nasty("idl_store",72,rc);
@@ -507,7 +507,7 @@ do { \
char* fmt = slapi_ch_malloc (strlen(func) + strlen(note) + strlen(FORMAT) + 30); \
if (fmt != NULL) { \
sprintf (fmt, "%s(%%s,%lu) %s: %s\n", func, (u_long)id, note, FORMAT); \
- LDAPDebug (LDAP_DEBUG_ANY, fmt, key->dptr, ARG1, ARG2); \
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, fmt, key->dptr, ARG1, ARG2); \
slapi_ch_free((void**)&fmt); \
} \
} while(0)
@@ -590,7 +590,7 @@ idl_old_insert_key(
if ( rc != 0 && rc != DB_NOTFOUND ) {
if ( rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug( LDAP_DEBUG_ANY, "idl_insert_key 0 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_insert_key 0 BAD %d %s\n",
rc, (msg = dblayer_strerror( rc )) ? msg : "", 0 );
}
return( rc );
@@ -600,7 +600,7 @@ idl_old_insert_key(
rc = idl_store( be, db, key, idl, txn );
if ( rc != 0 && rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug( LDAP_DEBUG_ANY, "idl_insert_key 1 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_insert_key 1 BAD %d %s\n",
rc, (msg = dblayer_strerror( rc )) ? msg : "", 0 );
}
@@ -638,7 +638,7 @@ idl_old_insert_key(
idl_unlock_list(a->ai_idl,key);
if ( rc != 0 && rc != DB_LOCK_DEADLOCK)
{
- LDAPDebug( LDAP_DEBUG_ANY, "idl_insert_key 2 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_insert_key 2 BAD %d %s\n",
rc, (msg = dblayer_strerror( rc )) ? msg : "", 0 );
}
if (NULL != disposition) {
@@ -666,7 +666,7 @@ idl_old_insert_key(
idl_free( &tmp2 );
if ( rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug( LDAP_DEBUG_ANY, "idl_insert_key 3 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_insert_key 3 BAD %d %s\n",
rc, (msg = dblayer_strerror( rc )) ? msg : "", 0 );
}
return( rc );
@@ -692,7 +692,7 @@ idl_old_insert_key(
idl_free( &tmp2 );
if ( rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug( LDAP_DEBUG_ANY, "idl_insert_key 4 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_insert_key 4 BAD %d %s\n",
rc, (msg = dblayer_strerror( rc )) ? msg : "", 0 );
}
return( rc );
@@ -710,7 +710,7 @@ idl_old_insert_key(
idl_unlock_list(a->ai_idl,key);
if ( rc != 0 && rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug( LDAP_DEBUG_ANY, "idl_insert_key 5 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_insert_key 5 BAD %d %s\n",
rc, (msg = dblayer_strerror( rc )) ? msg : "", 0 );
}
return( rc );
@@ -729,7 +729,7 @@ idl_old_insert_key(
; /* NULL */
if ( id == idl->b_ids[i] ) { /* already in a block */
#ifdef _DEBUG_LARGE_BLOCKS
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"id %lu for key (%s) is already in block %d\n",
(u_long)id, key.dptr, i);
#endif
@@ -750,12 +750,12 @@ idl_old_insert_key(
if ( rc != 0 ) {
if ( rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug( LDAP_DEBUG_ANY, "idl_insert_key 5.5 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_insert_key 5.5 BAD %d %s\n",
rc, (msg = dblayer_strerror( rc )) ? msg : "", 0 );
}
return( rc );
}
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"nonexistent continuation block (%s)\n", k2.dptr, 0, 0 );
idl_unlock_list(a->ai_idl,key);
idl_free( &idl );
@@ -815,7 +815,7 @@ idl_old_insert_key(
== NULL ) {
if ( rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"idl_fetch_one (%s) returns NULL\n",
k3.dptr, 0, 0 );
}
@@ -868,10 +868,10 @@ idl_old_insert_key(
break;
case 2: /* already there - how? */
case 3: /* split block - how? */
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"not expecting (%d) from idl_insert_maxids of %lu in (%s)\n",
rc, (u_long)id, k2.dptr );
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"likely database corruption\n",
0, 0, 0 );
rc = 0;
@@ -900,10 +900,10 @@ idl_old_insert_key(
* we started this insert. what can we do
* aside from log a warning?
*/
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"not expecting return %d from idl_insert_maxids of id %lu in block with key
(%s)\n",
rc, (u_long)tmp->b_ids[tmp->b_nids-1], k3.dptr );
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"likely database corruption\n", 0, 0, 0 );
/* FALL */
case 3: /* block is full */
@@ -1134,7 +1134,7 @@ int idl_old_store_block(
slapi_ch_free(&(cont_key.data));
if ( ret != 0 && ret != DB_LOCK_DEADLOCK )
{
- LDAPDebug( LDAP_DEBUG_ANY, "idl_store_block(%s) 1 BAD %d
%s\n",key->data, ret, dblayer_strerror( ret ));
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_store_block(%s) 1 BAD %d
%s\n",key->data, ret, dblayer_strerror( ret ));
goto done;
}
/* Put the lead ID number in the header block */
@@ -1358,7 +1358,7 @@ idl_old_delete_key(
IDList *idl, *didl;
DBT contkey = {0};
- LDAPDebug( LDAP_DEBUG_TRACE, "=> idl_delete_key(%s,%lu)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> idl_delete_key(%s,%lu)\n",
key->dptr, (u_long)id, 0 );
idl_Wlock_list(a->ai_idl,key);
@@ -1367,11 +1367,11 @@ idl_old_delete_key(
idl_unlock_list(a->ai_idl,key);
if ( rc != 0 && rc != DB_NOTFOUND && rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug( LDAP_DEBUG_ANY, "idl_delete_key(%s) 0 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_delete_key(%s) 0 BAD %d %s\n",
key->dptr, rc, (msg = dblayer_strerror( rc )) ? msg : "" );
}
if ( 0 == rc || DB_NOTFOUND == rc ) rc = -666;
- LDAPDebug( LDAP_DEBUG_TRACE, "<= idl_delete_key(%s,%lu) %d
!idl_fetch_one\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= idl_delete_key(%s,%lu) %d
!idl_fetch_one\n",
key->dptr, (u_long)id, rc );
return rc;
}
@@ -1384,7 +1384,7 @@ idl_old_delete_key(
rc = idl_store( be, db, key, idl, txn );
if ( rc != 0 && rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug( LDAP_DEBUG_ANY, "idl_delete_key(%s) 1 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_delete_key(%s) 1 BAD %d %s\n",
key->dptr, rc, (msg = dblayer_strerror( rc )) ? msg : "" );
}
break;
@@ -1393,7 +1393,7 @@ idl_old_delete_key(
rc = db->del( db, txn, key, 0 );
if ( rc != 0 && rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug( LDAP_DEBUG_ANY, "idl_delete_key(%s) 2 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_delete_key(%s) 2 BAD %d %s\n",
key->dptr, rc, (msg = dblayer_strerror( rc )) ? msg : "" );
if (rc == DB_RUNRECOVERY) {
ldbm_nasty("",74,rc);
@@ -1408,14 +1408,14 @@ idl_old_delete_key(
break;
default:
- LDAPDebug( LDAP_DEBUG_ANY, "idl_delete_key(%s) 3 BAD idl_delete\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_delete_key(%s) 3 BAD idl_delete\n",
key->dptr, 0, 0 );
break;
}
idl_free( &idl );
idl_unlock_list(a->ai_idl,key);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= idl_delete_key(%s,%lu) %d (not
indirect)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= idl_delete_key(%s,%lu) %d (not
indirect)\n",
key->dptr, (u_long)id, rc );
return( rc );
}
@@ -1436,7 +1436,7 @@ idl_old_delete_key(
if ( i == 0 && id < idl->b_ids[i] ) {
idl_free( &idl );
idl_unlock_list(a->ai_idl,key);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= idl_delete_key(%s,%lu) -666 (id not
found)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= idl_delete_key(%s,%lu) -666 (id not
found)\n",
key->dptr, (u_long)id, 0 );
return( -666 );
}
@@ -1451,10 +1451,10 @@ idl_old_delete_key(
idl_unlock_list(a->ai_idl,key);
if ( rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug( LDAP_DEBUG_ANY, "idl_delete_key(%s) 5 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_delete_key(%s) 5 BAD %d %s\n",
contkey.dptr, rc, (msg = dblayer_strerror( rc )) ? msg : "" );
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= idl_delete_key(%s,%lu) %d
idl_fetch_one(contkey)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= idl_delete_key(%s,%lu) %d
idl_fetch_one(contkey)\n",
contkey.dptr, (u_long)id, rc );
slapi_ch_free( (void **)&(contkey.dptr) );
return( rc );
@@ -1466,7 +1466,7 @@ idl_old_delete_key(
if ( (rc = idl_store( be, db, &contkey, didl, txn )) != 0 ) {
if ( rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug( LDAP_DEBUG_ANY, "idl_delete_key(%s) BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_delete_key(%s) BAD %d %s\n",
contkey.dptr, rc, (msg = dblayer_strerror( rc )) ? msg : "" );
}
}
@@ -1479,7 +1479,7 @@ idl_old_delete_key(
rc = idl_change_first( be, db, key, idl, i, &contkey, didl, txn );
if ( rc != 0 && rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug( LDAP_DEBUG_ANY, "idl_delete_key(%s) 7 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_delete_key(%s) 7 BAD %d %s\n",
contkey.dptr, rc, (msg = dblayer_strerror( rc )) ? msg : "" );
}
if (0 != rc) {
@@ -1495,14 +1495,14 @@ idl_old_delete_key(
rc = idl_store( be, db, key, idl, txn );
if ( rc != 0 && rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug( LDAP_DEBUG_ANY, "idl_delete_key: idl_store(%s) BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_delete_key: idl_store(%s) BAD %d
%s\n",
key->dptr, rc, (msg = dblayer_strerror( rc )) ? msg : "" );
}
} else { /* This index is entirely empty. Delete the header: */
rc = db->del( db, txn, key, 0 );
if ( rc != 0 && rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug( LDAP_DEBUG_ANY, "idl_delete_key: db->del(%s) BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_delete_key: db->del(%s) BAD %d
%s\n",
key->dptr, rc, (msg = dblayer_strerror( rc )) ? msg : "" );
if (rc == DB_RUNRECOVERY) {
ldbm_nasty("",75,rc);
@@ -1514,7 +1514,7 @@ idl_old_delete_key(
rc = db->del( db, txn, &contkey, 0 );
if ( rc != 0 && rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug( LDAP_DEBUG_ANY, "idl_delete_key: db->del(%s) BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_delete_key: db->del(%s) BAD %d
%s\n",
contkey.dptr, rc, (msg = dblayer_strerror( rc )) ? msg : "" );
if (rc == DB_RUNRECOVERY) {
ldbm_nasty("",76,rc);
@@ -1529,7 +1529,7 @@ idl_old_delete_key(
idl_check_indirect( idl, i, didl, NULL, "idl_delete_key", "3", key,
id );
break;
case 4: /* all ids block - should not happen */
- LDAPDebug( LDAP_DEBUG_ANY, "idl_delete_key: cont block (%s) is allids\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_delete_key: cont block (%s) is
allids\n",
contkey.dptr, 0, 0 );
rc = 0;
break;
@@ -1540,10 +1540,10 @@ idl_old_delete_key(
idl_unlock_list(a->ai_idl,key);
if ( rc != 0 && rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug( LDAP_DEBUG_ANY, "idl_delete_key(%s) 9 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_delete_key(%s) 9 BAD %d %s\n",
key->dptr, rc, (msg = dblayer_strerror( rc )) ? msg : "" );
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= idl_delete_key(%s,%lu) %d (indirect)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= idl_delete_key(%s,%lu) %d
(indirect)\n",
key->dptr, (u_long)id, rc );
return( rc );
}
diff --git a/ldap/servers/slapd/back-ldbm/idl_new.c
b/ldap/servers/slapd/back-ldbm/idl_new.c
index e05f577..a20587e 100644
--- a/ldap/servers/slapd/back-ldbm/idl_new.c
+++ b/ldap/servers/slapd/back-ldbm/idl_new.c
@@ -207,7 +207,7 @@ idl_new_fetch(
if (DB_NOTFOUND != ret) {
#ifdef DB_USE_BULK_FETCH
if (ret == DB_BUFFER_SMALL) {
- LDAPDebug(LDAP_DEBUG_ANY, "database index is corrupt; "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "database index is corrupt;
"
"data item for key %s is too large for our buffer "
"(need=%d actual=%d)\n",
key.data, data.size, data.ulen);
@@ -238,7 +238,7 @@ idl_new_fetch(
break;
}
if (dataret.size != sizeof(ID)) {
- LDAPDebug(LDAP_DEBUG_ANY, "database index is corrupt; "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "database index is corrupt;
"
"key %s has a data item with the wrong size (%d)\n",
key.data, dataret.size, 0);
goto error;
@@ -255,7 +255,7 @@ idl_new_fetch(
/* we got another ID, add it to our IDL */
idl_rc = idl_append_extend(&idl, id);
if (idl_rc) {
- LDAPDebug(LDAP_DEBUG_ANY, "unable to extend id list
(err=%d)\n", idl_rc, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "unable to extend id list
(err=%d)\n", idl_rc, 0, 0);
idl_free(&idl);
goto error;
}
@@ -263,7 +263,7 @@ idl_new_fetch(
count++;
}
- LDAPDebug(LDAP_DEBUG_TRACE, "bulk fetch buffer nids=%d\n", count, 0,
0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "bulk fetch buffer nids=%d\n",
count, 0, 0);
#if defined(DB_ALLIDS_ON_READ)
/* enforce the allids read limit */
if ((NEW_IDL_NO_ALLID != *flag_err) && (NULL != a) &&
@@ -271,7 +271,7 @@ idl_new_fetch(
idl->b_nids = 1;
idl->b_ids[0] = ALLID;
ret = DB_NOTFOUND; /* fool the code below into thinking that we finished the
dups */
- LDAPDebug(LDAP_DEBUG_BACKLDBM, "search for key for attribute index %s
"
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "search for key for attribute
index %s "
"exceeded allidslimit %d - count is %d\n",
a->ai_type, allidslimit, count);
break;
@@ -321,10 +321,10 @@ idl_new_fetch(
if (idl != NULL && idl->b_nids == 1 && idl->b_ids[0] == ALLID)
{
idl_free(&idl);
idl = idl_allids(be);
- LDAPDebug(LDAP_DEBUG_TRACE, "idl_new_fetch %s returns allids\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "idl_new_fetch %s returns
allids\n",
key.data, 0, 0);
} else {
- LDAPDebug(LDAP_DEBUG_TRACE, "idl_new_fetch %s returns nids=%lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "idl_new_fetch %s returns
nids=%lu\n",
key.data, (u_long)IDL_NIDS(idl), 0);
}
@@ -465,7 +465,7 @@ idl_new_range_fetch(
if (DB_NOTFOUND != ret) {
#ifdef DB_USE_BULK_FETCH
if (ret == DB_BUFFER_SMALL) {
- LDAPDebug(LDAP_DEBUG_ANY, "database index is corrupt; "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "database index is corrupt;
"
"data item for key %s is too large for our buffer "
"(need=%d actual=%d)\n",
cur_key.data, data.size, data.ulen);
@@ -532,7 +532,7 @@ idl_new_range_fetch(
break;
}
if (dataret.size != sizeof(ID)) {
- LDAPDebug(LDAP_DEBUG_ANY, "database index is corrupt; "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "database index is corrupt;
"
"key %s has a data item with the wrong size (%d)\n",
cur_key.data, dataret.size, 0);
goto error;
@@ -580,7 +580,7 @@ idl_new_range_fetch(
count++;
}
- LDAPDebug(LDAP_DEBUG_TRACE, "bulk fetch buffer nids=%d\n", count, 0,
0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "bulk fetch buffer nids=%d\n",
count, 0, 0);
#if defined(DB_ALLIDS_ON_READ)
/* enforce the allids read limit */
if ((NEW_IDL_NO_ALLID != *flag_err) && ai && (idl != NULL)
&&
@@ -827,12 +827,12 @@ int idl_new_insert_key(
} else {
/* check for allidslimit exceeded in database */
if (cursor->c_count(cursor, &count, 0) != 0) {
- LDAPDebug(LDAP_DEBUG_ANY, "could not obtain count for key %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "could not obtain count for key
%s\n",
key->data, 0, 0);
goto error;
}
if ((size_t)count > idl_new_get_allidslimit(a, 0)) {
- LDAPDebug(LDAP_DEBUG_TRACE, "allidslimit exceeded for key %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "allidslimit exceeded for key
%s\n",
key->data, 0, 0);
cursor->c_close(cursor);
cursor = NULL;
@@ -987,7 +987,7 @@ static int idl_new_store_allids(backend *be, DB *db, DBT *key, DB_TXN
*txn)
goto error;
}
- LDAPDebug(LDAP_DEBUG_TRACE, "key %s has been set to allids\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "key %s has been set to allids\n",
key->data, 0, 0);
error:
@@ -1082,12 +1082,12 @@ int idl_new_store_block(
#if defined(DB_ALLIDS_ON_WRITE)
/* check for allidslimit exceeded in database */
if (cursor->c_count(cursor, &count, 0) != 0) {
- LDAPDebug(LDAP_DEBUG_ANY, "could not obtain count for key %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "could not obtain count for key
%s\n",
key->data, 0, 0);
goto error;
}
if ((size_t)count > idl_new_get_allidslimit(a, 0)) {
- LDAPDebug(LDAP_DEBUG_TRACE, "allidslimit exceeded for key %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "allidslimit exceeded for key
%s\n",
key->data, 0, 0);
cursor->c_close(cursor);
cursor = NULL;
diff --git a/ldap/servers/slapd/back-ldbm/import-threads.c
b/ldap/servers/slapd/back-ldbm/import-threads.c
index c3fca2b..62daa7c 100644
--- a/ldap/servers/slapd/back-ldbm/import-threads.c
+++ b/ldap/servers/slapd/back-ldbm/import-threads.c
@@ -68,7 +68,7 @@ static int import_generate_uniqueid(ImportJob *job, Slapi_Entry *e)
if (rc == UID_SUCCESS) {
slapi_entry_set_uniqueid (e, newuniqueid);
} else {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"import_generate_uniqueid: failed to generate "
"uniqueid for %s; error=%d.\n",
slapi_entry_get_dn_const(e), rc, 0 );
@@ -930,7 +930,7 @@ index_producer(void *param)
/* get a cursor to we can walk over the table */
db_rval = db->cursor(db, NULL, &dbc, 0);
if ( db_rval || !dbc ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Failed to get cursor for reindexing\n", 0, 0, 0 );
dblayer_release_id2entry(be, db);
goto error;
@@ -966,7 +966,7 @@ index_producer(void *param)
if (0 != db_rval) {
if (DB_NOTFOUND != db_rval) {
- LDAPDebug(LDAP_DEBUG_ANY, "%s: Failed to read database, "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: Failed to read database,
"
"errno=%d (%s)\n", inst->inst_name, db_rval,
dblayer_strerror(db_rval));
if (job->task) {
@@ -1090,7 +1090,7 @@ index_producer(void *param)
"%s: WARNING: skipping badly formatted entry (id
%lu)",
inst->inst_name, (u_long)temp_id);
}
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: WARNING: skipping badly formatted entry (id %lu)\n",
inst->inst_name, (u_long)temp_id, 0);
continue;
@@ -1528,7 +1528,7 @@ upgradedn_producer(void *param)
"%s: Finished to read database", inst->inst_name);
}
} else {
- LDAPDebug(LDAP_DEBUG_ANY, "%s: Failed to read database, "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: Failed to read database,
"
"errno=%d (%s)\n", inst->inst_name, db_rval,
dblayer_strerror(db_rval));
if (job->task) {
@@ -1662,7 +1662,7 @@ upgradedn_producer(void *param)
"%s: WARNING: skipping badly formatted entry (id
%lu)",
inst->inst_name, (u_long)temp_id);
}
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: WARNING: skipping badly formatted entry (id
%lu)\n",
inst->inst_name, (u_long)temp_id, 0);
continue;
@@ -1782,7 +1782,7 @@ upgradedn_producer(void *param)
char *newrdn = slapi_create_dn_string("%s %u", rdn,
temp_id);
char *parentdn = slapi_dn_parent(normdn);
/* This entry is a conflict of alt_id */
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Entry %s (%lu) is a conflict of (%lu)\n",
normdn, temp_id, alt_id);
LDAPDebug2Args(LDAP_DEBUG_ANY, "Renaming \"%s\" to
\"%s\"\n",
@@ -1804,7 +1804,7 @@ upgradedn_producer(void *param)
slapi_ch_strdup(rdn), 0);
rc = slapi_entry_add_rdn_values(e);
if (rc) {
- LDAPDebug(LDAP_DEBUG_ANY, "%s: Failed to add rdn
values"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: Failed to add rdn
values"
" to an entry: %s (id %lu)\n",
inst->inst_name, normdn, (u_long)temp_id);
goto error;
@@ -1834,7 +1834,7 @@ upgradedn_producer(void *param)
rdnp = PL_strchr(rdn, '=');
if (NULL == rdnp) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: WARNING: skipping an entry with corrupted RDN
\"%s\" "
"(id %lu)\n",
inst->inst_name, rdn, (u_long)temp_id);
@@ -1865,7 +1865,7 @@ upgradedn_producer(void *param)
*/
rc = slapi_entry_add_rdn_values(e);
if (rc) {
- LDAPDebug(LDAP_DEBUG_ANY, "%s: Failed to add rdn values "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: Failed to add rdn values
"
"to an entry: %s (id %lu)\n",
inst->inst_name, normdn, (u_long)temp_id);
slapi_entry_free(e); e = NULL;
@@ -1928,7 +1928,7 @@ upgradedn_producer(void *param)
slapi_ch_strdup(a->a_type),
slapi_ch_strdup(*ud_valp),
isentrydn?0:OLD_DN_NORMALIZE);
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"%s: Found upgradedn candidate: %s (id
%lu)\n",
inst->inst_name, valueptr, (u_long)temp_id);
if (!entryrdn_get_switch() && isentrydn) {
@@ -1940,7 +1940,7 @@ upgradedn_producer(void *param)
*/
rc = slapi_entry_add_rdn_values(e);
if (rc) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: Failed to add rdn values "
"to an entry: %s (id %lu)\n",
inst->inst_name, normdn,
(u_long)temp_id);
@@ -1969,7 +1969,7 @@ upgradedn_producer(void *param)
charray_free(ud_vals);
ud_vals = NULL;
if (skipit) {
- LDAPDebug(LDAP_DEBUG_ANY, "%s: WARNING: skipping an entry
"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: WARNING: skipping an
entry "
"with a corrupted dn (syntax value): %s "
"(id %lu)\n",
inst->inst_name,
@@ -3034,7 +3034,7 @@ import_worker(void *param)
error:
if (ret == DB_RUNRECOVERY) {
- LDAPDebug(LDAP_DEBUG_ANY,"cannot import; database recovery needed\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"cannot import; database recovery
needed\n",
0,0,0);
} else if (ret == DB_LOCK_DEADLOCK) {
/* can this occur? */
@@ -3082,7 +3082,7 @@ static int bulk_import_start(Slapi_PBlock *pb)
PR_Lock(job->inst->inst_config_mutex);
if (job->inst->inst_flags & INST_FLAG_BUSY) {
PR_Unlock(job->inst->inst_config_mutex);
- LDAPDebug(LDAP_DEBUG_ANY, "ldbm: '%s' is already in the middle of
"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm: '%s' is already in the
middle of "
"another task and cannot be disturbed.\n",
job->inst->inst_name, 0, 0);
FREE(job);
@@ -3152,7 +3152,7 @@ static int bulk_import_start(Slapi_PBlock *pb)
SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, "unable to spawn import thread, "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "unable to spawn import thread, "
SLAPI_COMPONENT_NAME_NSPR " error %d
(%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
PR_Unlock(job->wire_lock);
@@ -3381,7 +3381,7 @@ void factory_destructor(void *extension, void *object, void
*parent)
* aborted!
*/
thread = job->main_thread;
- LDAPDebug(LDAP_DEBUG_ANY, "ERROR bulk import abandoned\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR bulk import abandoned\n",
0, 0, 0);
import_abort_all(job, 1);
/* wait for import_main to finish... */
@@ -3468,7 +3468,7 @@ int ldbm_back_wire_import(Slapi_PBlock *pb)
}
/* ??? unknown state */
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: ldbm_back_wire_import: unknown state %d\n",
state, 0, 0);
return -1;
@@ -3508,14 +3508,14 @@ dse_conf_backup_core(struct ldbminfo *li, char *dest_dir, char
*file_name, char
{
filename = slapi_ch_smprintf("%s/%s", dest_dir, file_name);
}
- LDAPDebug(LDAP_DEBUG_TRACE, "dse_conf_backup(%s): backup file %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "dse_conf_backup(%s): backup file
%s\n",
filter, filename, 0);
/* Open the file to write */
if ((prfd = PR_Open(filename, PR_RDWR | PR_CREATE_FILE | PR_TRUNCATE,
SLAPD_DEFAULT_FILE_MODE)) == NULL)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"dse_conf_backup(%s): open %s failed: (%s)\n",
filter, filename, slapd_pr_strerror(PR_GetError()));
rval = -1;
@@ -3524,7 +3524,7 @@ dse_conf_backup_core(struct ldbminfo *li, char *dest_dir, char
*file_name, char
srch_pb = slapi_pblock_new();
if (!srch_pb) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"dse_conf_backup(%s): out of memory\n",
filter, 0, 0);
rval = -1;
@@ -3538,7 +3538,7 @@ dse_conf_backup_core(struct ldbminfo *li, char *dest_dir, char
*file_name, char
for (ep = entries; ep != NULL && *ep != NULL; ep++)
{
size_t l = strlen(slapi_entry_get_dn_const(*ep)) + 5 /* "dn: \n" */;
- LDAPDebug(LDAP_DEBUG_TRACE, "\ndn: %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "\ndn: %s\n",
slapi_entry_get_dn_const(*ep), 0, 0);
if (l <= sizeof(tmpbuf))
@@ -3549,7 +3549,7 @@ dse_conf_backup_core(struct ldbminfo *li, char *dest_dir, char
*file_name, char
prrval = PR_Write(prfd, tp, l);
if ((size_t)prrval != l)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"dse_conf_backup(%s): write %s failed: %d (%s)\n",
filter, PR_GetError(), slapd_pr_strerror(PR_GetError()));
rval = -1;
@@ -3578,7 +3578,7 @@ dse_conf_backup_core(struct ldbminfo *li, char *dest_dir, char
*file_name, char
{
attr_val = slapi_value_get_berval(sval);
l = strlen(attr_val->bv_val) + attr_name_len + 3; /* : \n" */
- LDAPDebug(LDAP_DEBUG_TRACE, "%s: %s\n", attr_name,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "%s: %s\n", attr_name,
attr_val->bv_val, 0);
if (l <= sizeof(tmpbuf))
tp = tmpbuf;
@@ -3588,7 +3588,7 @@ dse_conf_backup_core(struct ldbminfo *li, char *dest_dir, char
*file_name, char
prrval = PR_Write(prfd, tp, l);
if ((size_t)prrval != l)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"dse_conf_backup(%s): write %s failed: %d (%s)\n",
filter, PR_GetError(), slapd_pr_strerror(PR_GetError()));
rval = -1;
@@ -3605,7 +3605,7 @@ dse_conf_backup_core(struct ldbminfo *li, char *dest_dir, char
*file_name, char
prrval = PR_Write(prfd, "\n", 1);
if ((int)prrval != 1)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"dse_conf_backup(%s): write %s failed: %d (%s)\n",
filter, PR_GetError(), slapd_pr_strerror(PR_GetError()));
rval = -1;
@@ -3631,7 +3631,7 @@ out:
prrval = PR_Close(prfd);
if (PR_SUCCESS != prrval)
{
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Fatal Error---Failed to back up dse indexes %d (%s)\n",
PR_GetError(), slapd_pr_strerror(PR_GetError()), 0);
rval = -1;
@@ -3677,7 +3677,7 @@ dse_conf_verify_core(struct ldbminfo *li, char *src_dir, char
*file_name, char *
if (PR_SUCCESS != PR_Access(filename, PR_ACCESS_READ_OK))
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: config backup file %s not found in backup\n",
file_name, 0, 0);
rval = 0;
@@ -3687,7 +3687,7 @@ dse_conf_verify_core(struct ldbminfo *li, char *src_dir, char
*file_name, char *
fd = dblayer_open_huge_file(filename, O_RDONLY, 0);
if (fd < 0)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: can't open config backup file: %s\n", filename, 0,
0);
rval = -1;
goto out;
@@ -3717,7 +3717,7 @@ dse_conf_verify_core(struct ldbminfo *li, char *src_dir, char
*file_name, char *
e = slapi_str2entry(estr, 0);
slapi_ch_free_string(&estr);
if (!e) {
- LDAPDebug(LDAP_DEBUG_ANY, "WARNING: skipping bad LDIF entry "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "WARNING: skipping bad LDIF entry
"
"ending line %d of file \"%s\"", curr_lineno,
filename, 0);
continue;
}
@@ -3753,7 +3753,7 @@ dse_conf_verify_core(struct ldbminfo *li, char *src_dir, char
*file_name, char *
if (0 != slapi_entries_diff(backup_entries, curr_entries, 1 /* test_all */,
log_str, 1 /* force_update */, li->li_identity))
{
- LDAPDebug(LDAP_DEBUG_ANY, "WARNING!!: current %s is "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "WARNING!!: current %s is "
"different from backed up configuration; "
"The backup is restored.\n", log_str, 0, 0);
}
diff --git a/ldap/servers/slapd/back-ldbm/import.c
b/ldap/servers/slapd/back-ldbm/import.c
index 8ddbf70..0853bba 100644
--- a/ldap/servers/slapd/back-ldbm/import.c
+++ b/ldap/servers/slapd/back-ldbm/import.c
@@ -212,13 +212,13 @@ void import_log_notice(ImportJob *job, char *format, ...)
}
/* also save it in the logs for posterity */
if (job->flags & (FLAG_UPGRADEDNFORMAT|FLAG_UPGRADEDNFORMAT_V1)) {
- LDAPDebug(LDAP_DEBUG_ANY, "upgradedn %s: %s\n",
job->inst->inst_name,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "upgradedn %s: %s\n",
job->inst->inst_name,
buffer, 0);
} else if (job->flags & FLAG_REINDEXING) {
- LDAPDebug(LDAP_DEBUG_ANY, "reindex %s: %s\n",
job->inst->inst_name,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "reindex %s: %s\n",
job->inst->inst_name,
buffer, 0);
} else {
- LDAPDebug(LDAP_DEBUG_ANY, "import %s: %s\n",
job->inst->inst_name,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "import %s: %s\n",
job->inst->inst_name,
buffer, 0);
}
}
@@ -482,7 +482,7 @@ static int import_start_threads(ImportJob *job)
PR_PRIORITY_NORMAL, PR_GLOBAL_BOUND_THREAD,
PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE)) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, "unable to spawn import foreman thread, "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "unable to spawn import foreman thread,
"
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
FREE(foreman);
@@ -512,7 +512,7 @@ static int import_start_threads(ImportJob *job)
PR_UNJOINABLE_THREAD,
SLAPD_DEFAULT_THREAD_STACKSIZE)) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, "unable to spawn import worker thread, "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "unable to spawn import worker
thread, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
FREE(worker);
@@ -1251,7 +1251,7 @@ int import_main_offline(void *arg)
producer, PR_PRIORITY_NORMAL, PR_GLOBAL_BOUND_THREAD,
PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE)) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"unable to spawn upgrade dn producer thread, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
@@ -1265,7 +1265,7 @@ int import_main_offline(void *arg)
PR_UNJOINABLE_THREAD,
SLAPD_DEFAULT_THREAD_STACKSIZE)) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"unable to spawn index producer thread, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
@@ -1280,7 +1280,7 @@ int import_main_offline(void *arg)
PR_UNJOINABLE_THREAD,
SLAPD_DEFAULT_THREAD_STACKSIZE)) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"unable to spawn import producer thread, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
@@ -1734,7 +1734,7 @@ int ldbm_back_ldif2ldbm_deluxe(Slapi_PBlock *pb)
SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, "unable to spawn import thread, "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "unable to spawn import thread,
"
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
import_free_job(job);
diff --git a/ldap/servers/slapd/back-ldbm/index.c b/ldap/servers/slapd/back-ldbm/index.c
index 81d6621..7b454c5 100644
--- a/ldap/servers/slapd/back-ldbm/index.c
+++ b/ldap/servers/slapd/back-ldbm/index.c
@@ -353,7 +353,7 @@ index_addordel_entry(
int rc, result;
Slapi_Attr *attr;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> index_%s_entry( \"%s\", %lu
)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> index_%s_entry( \"%s\",
%lu )\n",
(flags & BE_INDEX_ADD) ? "add" : "del",
backentry_get_ndn(e), (u_long)e->ep_id );
@@ -472,7 +472,7 @@ index_addordel_entry(
}
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= index_%s_entry%s %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= index_%s_entry%s %d\n",
(flags & BE_INDEX_ADD) ? "add" : "del",
(flags & BE_INDEX_TOMBSTONE) ? " (tombstone)" :
"", result );
return( result );
@@ -903,7 +903,7 @@ index_read_ext_allids(
LDAPDebug0Args( LDAP_DEBUG_ANY, "index_read_ext: NULL prefix\n" );
return NULL;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "=> index_read( \"%s\" %s
\"%s\" )\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> index_read( \"%s\" %s
\"%s\" )\n",
type, prefix, encode (val, buf));
basetype = typebuf;
@@ -919,7 +919,7 @@ index_read_ext_allids(
return NULL;
}
- LDAPDebug( LDAP_DEBUG_ARGS, " indextype: \"%s\" indexmask:
0x%x\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " indextype: \"%s\" indexmask:
0x%x\n",
indextype, ai->ai_indexmask, 0 );
/* If entryrdn switch is on AND the type is entrydn AND the prefix is '=',
@@ -954,7 +954,7 @@ index_read_ext_allids(
if ( !is_indexed( indextype, ai->ai_indexmask, ai->ai_index_rules ) ) {
idl = idl_allids( be );
if (unindexed != NULL) *unindexed = 1;
- LDAPDebug( LDAP_DEBUG_TRACE, "<= index_read %lu candidates "
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= index_read %lu candidates "
"(allids - not indexed)\n", (u_long)IDL_NIDS(idl), 0, 0 );
index_free_prefix( prefix );
slapi_ch_free_string( &basetmp );
@@ -973,7 +973,7 @@ index_read_ext_allids(
if (unindexed != NULL) *unindexed = 1;
LDAPDebug1Arg( LDAP_DEBUG_BACKLDBM, "<= index_read %lu candidates "
"(do not use index)\n", (u_long)IDL_NIDS(idl) );
- LDAPDebug( LDAP_DEBUG_BACKLDBM, "<= index_read index attr %s type %s "
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "<= index_read index attr %s type %s
"
"for value %s does not use index\n", basetype, indextype,
(val && val->bv_val) ? val->bv_val : "ALL" );
index_free_prefix( prefix );
@@ -981,7 +981,7 @@ index_read_ext_allids(
return( idl );
}
if ( (*err = dblayer_get_index_file( be, ai, &db, DBOPEN_CREATE )) != 0 ) {
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= index_read NULL (index file open for attr %s)\n",
basetype, 0, 0 );
index_free_prefix (prefix);
@@ -997,7 +997,7 @@ index_read_ext_allids(
/* If necessary, encrypt this index key */
ret = attrcrypt_encrypt_index_key(be, ai, val, &encrypted_val);
if (ret) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"index_read failed to encrypt index key for %s\n",
basetype, 0, 0 );
}
@@ -1054,7 +1054,7 @@ index_read_ext_allids(
ber_bvfree(encrypted_val);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= index_read %lu candidates\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= index_read %lu candidates\n",
(u_long)IDL_NIDS(idl), 0, 0 );
return( idl );
}
@@ -1235,7 +1235,7 @@ index_range_read_ext(
int coreop = operator & SLAPI_OP_RANGE;
if (!pb) {
- LDAPDebug(LDAP_DEBUG_ANY, "index_range_read: NULL pblock\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "index_range_read: NULL pblock\n",
0, 0, 0);
return NULL;
}
@@ -1286,7 +1286,7 @@ index_range_read_ext(
case SLAPI_OP_GREATER:
break;
default:
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"<= index_range_read(%s,%s) NULL (operator %i)\n",
type, prefix, coreop );
index_free_prefix(prefix);
@@ -1297,18 +1297,18 @@ index_range_read_ext(
index_free_prefix(prefix);
return NULL;
}
- LDAPDebug( LDAP_DEBUG_ARGS, " indextype: \"%s\" indexmask:
0x%x\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " indextype: \"%s\" indexmask:
0x%x\n",
indextype, ai->ai_indexmask, 0 );
if ( !is_indexed( indextype, ai->ai_indexmask, ai->ai_index_rules )) {
idl = idl_allids( be );
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= index_range_read(%s,%s) %lu candidates (allids)\n",
type, prefix, (u_long)IDL_NIDS(idl) );
index_free_prefix(prefix);
return( idl );
}
if ( (*err = dblayer_get_index_file( be, ai, &db, DBOPEN_CREATE )) != 0 ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"<= index_range_read(%s,%s) NULL (could not open index
file)\n",
type, prefix, 0 );
index_free_prefix(prefix);
@@ -1321,7 +1321,7 @@ index_range_read_ext(
*err = db->cursor(db,db_txn,&dbc,0);
if (0 != *err ) {
ldbm_nasty(errmsg, 1060, *err);
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"<= index_range_read(%s,%s) NULL: db->cursor() == %i\n",
type, prefix, *err );
dblayer_release_index_file( be, ai, db );
@@ -1379,7 +1379,7 @@ index_range_read_ext(
goto error;
} else {
ldbm_nasty(errmsg, 1070, *err);
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"index_range_read(%s,%s) seek to end of index file err
%i\n",
type, prefix, *err );
}
@@ -1411,9 +1411,9 @@ index_range_read_ext(
}
/* if (LDAP_DEBUG_FILTER) {
char encbuf [BUFSIZ];
- LDAPDebug( LDAP_DEBUG_FILTER, " lowerkey=%s(%li bytes)\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " lowerkey=%s(%li bytes)\n",
encoded (&lowerkey, encbuf), (long)lowerkey.dsize, 0 );
- LDAPDebug( LDAP_DEBUG_FILTER, " upperkey=%s(%li bytes)\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " upperkey=%s(%li bytes)\n",
encoded (&upperkey, encbuf), (long)upperkey.dsize, 0 );
} */
data.flags = DB_DBT_MALLOC;
@@ -1437,7 +1437,7 @@ index_range_read_ext(
} else {
idl = idl_allids( be );
ldbm_nasty(errmsg, 1080, *err);
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"<= index_range_read(%s,%s) allids (seek to lower key in index
file err %i)\n",
type, prefix, *err );
}
@@ -1456,7 +1456,7 @@ index_range_read_ext(
if (coreop == SLAPI_OP_GREATER) {
*err = index_range_next_key(db, &cur_key, db_txn);
if (*err) {
- LDAPDebug(LDAP_DEBUG_ANY, "<= index_range_read(%s,%s) op==GREATER, no
next key: %i)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "<= index_range_read(%s,%s)
op==GREATER, no next key: %i)\n",
type, prefix, *err );
goto error;
}
@@ -1481,7 +1481,7 @@ index_range_read_ext(
IDList *tmp;
/*
char encbuf [BUFSIZ];
- LDAPDebug( LDAP_DEBUG_FILTER, " cur_key=%s(%li bytes)\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " cur_key=%s(%li
bytes)\n",
encoded (&cur_key, encbuf), (long)cur_key.dsize, 0 );
*/
/* lookthrough limit and size limit check */
@@ -1624,7 +1624,7 @@ error:
DBT_FREE_PAYLOAD(upperkey);
dblayer_release_index_file( be, ai, db );
- LDAPDebug( LDAP_DEBUG_TRACE, "<= index_range_read(%s,%s) %lu
candidates\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= index_range_read(%s,%s) %lu
candidates\n",
type, prefix, (u_long)IDL_NIDS(idl) );
return( idl );
}
@@ -1673,13 +1673,13 @@ addordel_values(
char *realbuf;
char *prefix;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> %s_values\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> %s_values\n",
(flags & BE_INDEX_ADD) ? "add" : "del", 0, 0);
prefix = index_index2prefix( indextype );
if (prefix == NULL) {
- LDAPDebug( LDAP_DEBUG_ANY, "<= %s_values: NULL prefix\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "<= %s_values: NULL prefix\n",
(flags & BE_INDEX_ADD) ? "add" : "del", 0, 0 );
return( -1 );
}
@@ -1709,7 +1709,7 @@ addordel_values(
index_free_prefix (prefix);
if (NULL != key.dptr && prefix != key.dptr)
slapi_ch_free( (void**)&key.dptr );
- LDAPDebug( LDAP_DEBUG_TRACE, "<= %s_values %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= %s_values %d\n",
(flags & BE_INDEX_ADD) ? "add" : "del", rc, 0 );
return( rc );
}
@@ -1743,7 +1743,7 @@ addordel_values(
{
char encbuf[BUFSIZ];
- LDAPDebug (LDAP_DEBUG_TRACE, " %s_value(\"%s\")\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, " %s_value(\"%s\")\n",
(flags & BE_INDEX_ADD) ? "add" : "del",
encoded (&key, encbuf), 0);
}
@@ -1787,7 +1787,7 @@ addordel_values(
{
ldbm_nasty(errmsg, 1110, rc);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= %s_values %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= %s_values %d\n",
(flags & BE_INDEX_ADD) ? "add" : "del", rc, 0 );
return( rc );
}
@@ -1820,7 +1820,7 @@ addordel_values_sv(
const struct berval *bvp;
struct berval *encrypted_bvp = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> %s_values\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> %s_values\n",
(flags & BE_INDEX_ADD) ? "add" : "del", 0, 0);
prefix = index_index2prefix( indextype );
@@ -1856,7 +1856,7 @@ addordel_values_sv(
slapi_ch_free( (void**)&key.dptr );
}
index_free_prefix (prefix);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= %s_values %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= %s_values %d\n",
(flags & BE_INDEX_ADD) ? "add" : "del", rc, 0
);
return( rc );
}
@@ -1872,7 +1872,7 @@ addordel_values_sv(
rc = attrcrypt_encrypt_index_key(be,a,bvp,&encrypted_bvp);
if (rc)
{
- LDAPDebug (LDAP_DEBUG_ANY, "Failed to encrypt index key for %s\n",
a->ai_type ,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to encrypt index key for %s\n",
a->ai_type ,0,0);
} else {
bvp = encrypted_bvp;
}
@@ -1912,7 +1912,7 @@ addordel_values_sv(
{
char encbuf[BUFSIZ];
- LDAPDebug (LDAP_DEBUG_TRACE, " %s_value(\"%s\")\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "
%s_value(\"%s\")\n",
(flags & BE_INDEX_ADD) ? "add" : "del",
encoded (&key, encbuf), 0);
}
@@ -1956,7 +1956,7 @@ addordel_values_sv(
{
ldbm_nasty(errmsg, 1140, rc);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= %s_values %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= %s_values %d\n",
(flags & BE_INDEX_ADD) ? "add" : "del", rc, 0 );
return( rc );
}
@@ -2012,7 +2012,7 @@ index_addordel_values_ext_sv(
char buf[SLAPD_TYPICAL_ATTRIBUTE_NAME_MAX_LENGTH];
char *basetmp, *basetype;
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"=> index_addordel_values_ext_sv( \"%s\", %lu )\n",
type, (u_long)id, 0 );
basetype = buf;
@@ -2027,10 +2027,10 @@ index_addordel_values_ext_sv(
slapi_ch_free_string( &basetmp );
return( 0 );
}
- LDAPDebug( LDAP_DEBUG_ARGS, " index_addordel_values_ext_sv indexmask
0x%x\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " index_addordel_values_ext_sv indexmask
0x%x\n",
ai->ai_indexmask, 0, 0 );
if ( (err = dblayer_get_index_file( be, ai, &db, DBOPEN_CREATE )) != 0 ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"<= index_read NULL (could not open index attr %s)\n",
basetype, 0, 0 );
slapi_ch_free_string( &basetmp );
@@ -2183,7 +2183,7 @@ index_addordel_values_ext_sv(
slapi_ch_free( (void**)&basetmp );
}
- LDAPDebug (LDAP_DEBUG_TRACE, "<= index_addordel_values_ext_sv\n", 0, 0,
0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
index_addordel_values_ext_sv\n", 0, 0, 0 );
return( 0 );
bad:
diff --git a/ldap/servers/slapd/back-ldbm/init.c b/ldap/servers/slapd/back-ldbm/init.c
index 04cc936..c2f462a 100644
--- a/ldap/servers/slapd/back-ldbm/init.c
+++ b/ldap/servers/slapd/back-ldbm/init.c
@@ -54,7 +54,7 @@ ldbm_back_init( Slapi_PBlock *pb )
struct slapdplugin *p;
static int interface_published = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> ldbm_back_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ldbm_back_init\n", 0, 0, 0 );
slapi_pblock_get(pb, SLAPI_PLUGIN, &p);
@@ -76,7 +76,7 @@ ldbm_back_init( Slapi_PBlock *pb )
/* initialize dblayer */
if (dblayer_init(li)) {
- LDAPDebug( LDAP_DEBUG_ANY, "ldbm_back_init: dblayer_init failed\n",0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_back_init: dblayer_init failed\n",0,
0, 0 );
goto fail;
}
@@ -90,7 +90,7 @@ ldbm_back_init( Slapi_PBlock *pb )
if (slapi_register_object_extension(p->plg_name, SLAPI_EXT_CONNECTION,
factory_constructor, factory_destructor,
&li->li_bulk_import_object, &li->li_bulk_import_handle) != 0)
{
- LDAPDebug(LDAP_DEBUG_ANY, "ldbm_back_init: "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_back_init: "
"slapi_register_object_extension failed.\n", 0, 0, 0);
goto fail;
}
@@ -102,25 +102,25 @@ ldbm_back_init( Slapi_PBlock *pb )
rc = slapi_pblock_set( pb, SLAPI_PLUGIN_PRIVATE, (void *) li );
if ((li->li_dbcache_mutex = PR_NewLock()) == NULL ) {
- LDAPDebug( LDAP_DEBUG_ANY, "ldbm_back_init: PR_NewLock failed\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_back_init: PR_NewLock
failed\n",
0, 0, 0 );
goto fail;
}
if ((li->li_shutdown_mutex = PR_NewLock()) == NULL ) {
- LDAPDebug( LDAP_DEBUG_ANY, "ldbm_back_init: PR_NewLock failed\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_back_init: PR_NewLock
failed\n",
0, 0, 0 );
goto fail;
}
if ((li->li_config_mutex = PR_NewLock()) == NULL ) {
- LDAPDebug( LDAP_DEBUG_ANY, "ldbm_back_init: PR_NewLock failed\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_back_init: PR_NewLock
failed\n",
0, 0, 0 );
goto fail;
}
if ((li->li_dbcache_cv = PR_NewCondVar( li->li_dbcache_mutex )) == NULL ) {
- LDAPDebug( LDAP_DEBUG_ANY, "ldbm_back_init: PR_NewCondVar
failed\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_back_init: PR_NewCondVar
failed\n", 0, 0, 0 );
goto fail;
}
@@ -208,7 +208,7 @@ ldbm_back_init( Slapi_PBlock *pb )
(void *) ldbm_back_ctrl_info );
if ( rc != 0 ) {
- LDAPDebug( LDAP_DEBUG_ANY, "ldbm_back_init failed\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_back_init failed\n", 0, 0, 0 );
goto fail;
}
@@ -221,14 +221,14 @@ ldbm_back_init( Slapi_PBlock *pb )
if( slapi_apib_register(IDL_v1_0_GUID, IDL_api) )
{
- LDAPDebug( LDAP_DEBUG_ANY, "ldbm_back_init: failed to publish IDL
interface\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_back_init: failed to publish IDL
interface\n", 0, 0, 0);
goto fail;
}
interface_published = 1;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= ldbm_back_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ldbm_back_init\n", 0, 0, 0 );
return( 0 );
diff --git a/ldap/servers/slapd/back-ldbm/instance.c
b/ldap/servers/slapd/back-ldbm/instance.c
index f059e8a..1f99c3e 100644
--- a/ldap/servers/slapd/back-ldbm/instance.c
+++ b/ldap/servers/slapd/back-ldbm/instance.c
@@ -37,7 +37,7 @@ int ldbm_instance_create(backend *be, char *name)
/* initialize the entry cache */
if (! cache_init(&(inst->inst_cache), DEFAULT_CACHE_SIZE,
DEFAULT_CACHE_ENTRIES, CACHE_TYPE_ENTRY)) {
- LDAPDebug(LDAP_DEBUG_ANY, "ldbm_instance_create: cache_init failed\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_instance_create: cache_init
failed\n",
0, 0, 0);
rc = -1;
goto error;
@@ -59,7 +59,7 @@ int ldbm_instance_create(backend *be, char *name)
/* Lock for the list of open db handles */
inst->inst_handle_list_mutex = PR_NewLock();
if (NULL == inst->inst_handle_list_mutex) {
- LDAPDebug(LDAP_DEBUG_ANY, "ldbm_instance_create: PR_NewLock failed\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_instance_create: PR_NewLock
failed\n",
0, 0, 0);
rc = -1;
goto error;
@@ -68,28 +68,28 @@ int ldbm_instance_create(backend *be, char *name)
/* Lock used to synchronize modify operations. */
inst->inst_db_mutex = PR_NewMonitor();
if (NULL == inst->inst_db_mutex) {
- LDAPDebug(LDAP_DEBUG_ANY, "ldbm_instance_create: PR_NewMonitor
failed\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_instance_create: PR_NewMonitor
failed\n",
0, 0, 0);
rc = -1;
goto error;
}
if ((inst->inst_config_mutex = PR_NewLock()) == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "ldbm_instance_create: PR_NewLock failed\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_instance_create: PR_NewLock
failed\n",
0, 0, 0);
rc = -1;
goto error;
}
if ((inst->inst_nextid_mutex = PR_NewLock()) == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "ldbm_instance_create: PR_NewLock failed\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_instance_create: PR_NewLock
failed\n",
0, 0, 0);
rc = -1;
goto error;
}
if ((inst->inst_indexer_cv = PR_NewCondVar(inst->inst_nextid_mutex)) == NULL)
{
- LDAPDebug(LDAP_DEBUG_ANY, "ldbm_instance_create: PR_NewCondVar
failed\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_instance_create: PR_NewCondVar
failed\n", 0, 0, 0 );
rc = -1;
goto error;
}
@@ -254,7 +254,7 @@ ldbm_instance_start(backend *be)
if (be->be_state != BE_STATE_STOPPED &&
be->be_state != BE_STATE_DELETED) {
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"ldbm_instance_start: warning - backend is in a wrong state -
%d\n",
be->be_state, 0, 0 );
PR_Unlock (be->be_state_lock);
@@ -280,7 +280,7 @@ ldbm_instance_stop(backend *be)
PR_Lock (be->be_state_lock);
if (be->be_state != BE_STATE_STARTED) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_back_close: warning - backend %s is in the wrong state -
%d\n",
inst ? inst->inst_name : "", be->be_state, 0 );
PR_Unlock (be->be_state_lock);
@@ -392,7 +392,7 @@ ldbm_instance_destructor(void **arg)
{
ldbm_instance *inst = (ldbm_instance *) *arg;
- LDAPDebug(LDAP_DEBUG_ANY, "Destructor for instance %s called\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Destructor for instance %s called\n",
inst->inst_name, 0, 0);
slapi_counter_destroy(&(inst->inst_ref_count));
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_add.c
b/ldap/servers/slapd/back-ldbm/ldbm_add.c
index f462376..ba15f5a 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_add.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_add.c
@@ -393,7 +393,7 @@ ldbm_back_add( Slapi_PBlock *pb )
slapi_sdn_set_dn_byval(&parentsdn,
slapi_entry_get_dn_const(parententry->ep_entry));
}
} else {
- LDAPDebug(LDAP_DEBUG_BACKLDBM, "find_entry2modify_only returned NULL
parententry pdn: %s, uniqueid: %s\n",
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "find_entry2modify_only returned NULL
parententry pdn: %s, uniqueid: %s\n",
slapi_sdn_get_dn(&parentsdn), slapi_sdn_get_dn(&parentsdn),
addr.uniqueid?addr.uniqueid:"none");
}
modify_init(&parent_modify_c,parententry);
@@ -477,7 +477,7 @@ ldbm_back_add( Slapi_PBlock *pb )
if ((operation_is_flag_set(operation,OP_FLAG_ACTION_SCHEMA_CHECK))
&& (slapi_entry_schema_check(pb, e) != 0))
{
- LDAPDebug(LDAP_DEBUG_TRACE, "entry failed schema check\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "entry failed schema check\n", 0,
0, 0);
ldap_result_code = LDAP_OBJECT_CLASS_VIOLATION;
slapi_pblock_get(pb, SLAPI_PB_RESULT_TEXT, &ldap_result_message);
goto error_return;
@@ -486,7 +486,7 @@ ldbm_back_add( Slapi_PBlock *pb )
/* Check attribute syntax */
if (slapi_entry_syntax_check(pb, e, 0) != 0)
{
- LDAPDebug(LDAP_DEBUG_TRACE, "entry failed syntax check\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "entry failed syntax check\n", 0,
0, 0);
ldap_result_code = LDAP_INVALID_SYNTAX;
slapi_pblock_get(pb, SLAPI_PB_RESULT_TEXT, &ldap_result_message);
goto error_return;
@@ -541,7 +541,7 @@ ldbm_back_add( Slapi_PBlock *pb )
slapi_entry_attr_delete(addingentry->ep_entry, SLAPI_ATTR_TOMBSTONE_CSN);
/* Now also remove the nscpEntryDN */
if (slapi_entry_attr_delete(addingentry->ep_entry, SLAPI_ATTR_NSCP_ENTRYDN) !=
0){
- LDAPDebug(LDAP_DEBUG_REPL, "Resurrection of %s - Couldn't remove
%s\n", dn, SLAPI_ATTR_NSCP_ENTRYDN, 0);
+ LDAPDebug(LDAP_DEBUG_REPL, LOG_DEBUG, "Resurrection of %s - Couldn't remove
%s\n", dn, SLAPI_ATTR_NSCP_ENTRYDN, 0);
}
/* And copy the reason from e */
@@ -549,7 +549,7 @@ ldbm_back_add( Slapi_PBlock *pb )
if (reason) {
if (!slapi_entry_attr_hasvalue(addingentry->ep_entry,
"nsds5ReplConflict", reason)) {
slapi_entry_add_string(addingentry->ep_entry, "nsds5ReplConflict",
reason);
- LDAPDebug(LDAP_DEBUG_REPL, "Resurrection of %s - Added Conflict reason
%s\n", dn, reason, 0);
+ LDAPDebug(LDAP_DEBUG_REPL, LOG_DEBUG, "Resurrection of %s - Added Conflict
reason %s\n", dn, reason, 0);
}
slapi_ch_free((void **)&reason);
}
@@ -602,7 +602,7 @@ ldbm_back_add( Slapi_PBlock *pb )
*/
addingentry = backentry_init( e );
if ( ( addingentry->ep_id = next_id( be ) ) >= MAXID ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"add: maximum ID reached, cannot add entry to "
"backend '%s'", be->be_name, 0, 0 );
ldap_result_code = LDAP_OPERATIONS_ERROR;
@@ -865,12 +865,12 @@ ldbm_back_add( Slapi_PBlock *pb )
retval = id2entry_add_ext(be, addingentry, &txn, 1, &myrc);
if (DB_LOCK_DEADLOCK == retval)
{
- LDAPDebug( LDAP_DEBUG_ARGS, "add 1 DEADLOCK\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "add 1 DEADLOCK\n", 0, 0, 0 );
/* Retry txn */
continue;
}
if (retval) {
- LDAPDebug(LDAP_DEBUG_TRACE, "id2entry_add(%s) failed, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "id2entry_add(%s) failed, err=%d
%s\n",
slapi_entry_get_dn_const(addingentry->ep_entry),
retval, (msg = dblayer_strerror( retval )) ? msg : "");
ADD_SET_ERROR(ldap_result_code, LDAP_OPERATIONS_ERROR, retry_count);
@@ -887,12 +887,12 @@ ldbm_back_add( Slapi_PBlock *pb )
retval = index_addordel_string(be,SLAPI_ATTR_OBJECTCLASS, SLAPI_ATTR_VALUE_TOMBSTONE,
addingentry->ep_id, BE_INDEX_DEL|BE_INDEX_EQUALITY, &txn);
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug( LDAP_DEBUG_ARGS, "add 2 DB_LOCK_DEADLOCK\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "add 2 DB_LOCK_DEADLOCK\n", 0, 0, 0
);
/* Retry txn */
continue;
}
if (retval) {
- LDAPDebug(LDAP_DEBUG_TRACE, "index_addordel_string TOMBSTONE (%s), err=%d
%s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "index_addordel_string TOMBSTONE (%s),
err=%d %s\n",
slapi_entry_get_dn_const(addingentry->ep_entry),
retval, (msg = dblayer_strerror( retval )) ? msg : "");
ADD_SET_ERROR(ldap_result_code, LDAP_OPERATIONS_ERROR, retry_count);
@@ -909,12 +909,12 @@ ldbm_back_add( Slapi_PBlock *pb )
retval = index_addordel_string(be, SLAPI_ATTR_TOMBSTONE_CSN, deletion_csn_str,
tombstoneentry->ep_id, BE_INDEX_DEL|BE_INDEX_EQUALITY, &txn);
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug( LDAP_DEBUG_ARGS, "add 3 DB_LOCK_DEADLOCK\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "add 3 DB_LOCK_DEADLOCK\n", 0, 0, 0
);
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug(LDAP_DEBUG_TRACE, "index_addordel_string TOMBSTONE csn(%s), err=%d
%s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "index_addordel_string TOMBSTONE
csn(%s), err=%d %s\n",
slapi_entry_get_dn_const(tombstoneentry->ep_entry),
retval, (msg = dblayer_strerror( retval )) ? msg : "");
ADD_SET_ERROR(ldap_result_code, LDAP_OPERATIONS_ERROR, retry_count);
@@ -928,12 +928,12 @@ ldbm_back_add( Slapi_PBlock *pb )
retval =
index_addordel_string(be,SLAPI_ATTR_UNIQUEID,slapi_entry_get_uniqueid(addingentry->ep_entry),addingentry->ep_id,BE_INDEX_DEL|BE_INDEX_EQUALITY,&txn);
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug( LDAP_DEBUG_ARGS, "add 4 DB_LOCK_DEADLOCK\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "add 4 DB_LOCK_DEADLOCK\n", 0, 0, 0
);
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug(LDAP_DEBUG_TRACE, "index_addordel_string UNIQUEID (%s), err=%d
%s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "index_addordel_string UNIQUEID (%s),
err=%d %s\n",
slapi_entry_get_dn_const(addingentry->ep_entry),
retval, (msg = dblayer_strerror( retval )) ? msg : "");
ADD_SET_ERROR(ldap_result_code, LDAP_OPERATIONS_ERROR, retry_count);
@@ -949,12 +949,12 @@ ldbm_back_add( Slapi_PBlock *pb )
addingentry->ep_id,
BE_INDEX_DEL|BE_INDEX_EQUALITY, &txn);
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug( LDAP_DEBUG_ARGS, "add 5 DB_LOCK_DEADLOCK\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "add 5 DB_LOCK_DEADLOCK\n", 0, 0, 0
);
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug(LDAP_DEBUG_TRACE, "index_addordel_string ENTRYDN (%s), err=%d
%s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "index_addordel_string ENTRYDN (%s),
err=%d %s\n",
slapi_entry_get_dn_const(addingentry->ep_entry),
retval, (msg = dblayer_strerror( retval )) ? msg : "");
ADD_SET_ERROR(ldap_result_code, LDAP_OPERATIONS_ERROR, retry_count);
@@ -969,7 +969,7 @@ ldbm_back_add( Slapi_PBlock *pb )
if (tombstoneentry) {
retval = entryrdn_index_entry(be, tombstoneentry, BE_INDEX_DEL, &txn);
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, "Resurrecting %s: failed to remove entryrdn index,
err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Resurrecting %s: failed to remove entryrdn
index, err=%d %s\n",
slapi_entry_get_dn_const(tombstoneentry->ep_entry),
retval, (msg = dblayer_strerror( retval )) ? msg : "");
goto error_return;
@@ -987,7 +987,7 @@ ldbm_back_add( Slapi_PBlock *pb )
}
if (DB_LOCK_DEADLOCK == retval)
{
- LDAPDebug( LDAP_DEBUG_ARGS, "add 5 DEADLOCK\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "add 5 DEADLOCK\n", 0, 0, 0 );
/* retry txn */
continue;
}
@@ -1009,12 +1009,12 @@ ldbm_back_add( Slapi_PBlock *pb )
conn_id, op_id, parent_modify_c.old_entry, parent_modify_c.new_entry,
retval);
if (DB_LOCK_DEADLOCK == retval)
{
- LDAPDebug( LDAP_DEBUG_ARGS, "add 6 DEADLOCK\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "add 6 DEADLOCK\n", 0, 0, 0 );
/* Retry txn */
continue;
}
if (retval) {
- LDAPDebug(LDAP_DEBUG_BACKLDBM, "modify_update_all: %s (%lu) failed;
rc=%d\n",
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "modify_update_all: %s (%lu) failed;
rc=%d\n",
slapi_entry_get_dn(addingentry->ep_entry),
(u_long)addingentry->ep_id, retval);
ADD_SET_ERROR(ldap_result_code, LDAP_OPERATIONS_ERROR, retry_count);
if (LDBM_OS_ERR_IS_DISKFULL(retval)) {
@@ -1031,7 +1031,7 @@ ldbm_back_add( Slapi_PBlock *pb )
{
retval= vlv_update_all_indexes(&txn, be, pb, NULL, addingentry);
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug(LDAP_DEBUG_ARGS,
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG,
"add DEADLOCK vlv_update_index\n", 0, 0, 0 );
/* Retry txn */
continue;
@@ -1052,7 +1052,7 @@ ldbm_back_add( Slapi_PBlock *pb )
if (!is_ruv && !is_fixup_operation && !NO_RUV_UPDATE(li)) {
ruv_c_init = ldbm_txn_ruv_modify_context( pb, &ruv_c );
if (-1 == ruv_c_init) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_back_add: ldbm_txn_ruv_modify_context "
"failed to construct RUV modify context\n",
0, 0, 0);
@@ -1069,7 +1069,7 @@ ldbm_back_add( Slapi_PBlock *pb )
continue;
}
if (0 != retval) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"modify_update_all failed, err=%d %s\n", retval,
(msg = dblayer_strerror( retval )) ? msg : "", 0 );
if (LDBM_OS_ERR_IS_DISKFULL(retval))
@@ -1085,7 +1085,7 @@ ldbm_back_add( Slapi_PBlock *pb )
}
if (retry_count == RETRY_TIMES) {
/* Failed */
- LDAPDebug( LDAP_DEBUG_ANY, "Retry count exceeded in add\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Retry count exceeded in add\n", 0, 0, 0
);
ldap_result_code= LDAP_BUSY;
goto error_return;
}
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_attr.c
b/ldap/servers/slapd/back-ldbm/ldbm_attr.c
index 7e44cfe..57898c6 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_attr.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_attr.c
@@ -664,7 +664,7 @@ attr_index_config(
slapi_attr_first_value(attr, &sval);
attrValue = slapi_value_get_berval(sval);
} else {
- LDAPDebug(LDAP_DEBUG_ANY, "attr_index_config: Missing indexing arguments\n",
0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "attr_index_config: Missing indexing
arguments\n", 0, 0, 0);
return -1;
}
@@ -701,7 +701,7 @@ attr_index_config(
a->ai_indexmask |= INDEX_SUB;
} else if ( strcasecmp( attrValue->bv_val, "none" ) == 0 ) {
if ( a->ai_indexmask != 0 ) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: line %d: index type \"none\" cannot be combined with other
types\n",
fname, lineno, 0);
}
@@ -717,7 +717,7 @@ attr_index_config(
}
if(hasIndexType == 0){
/* indexType missing, error out */
- LDAPDebug(LDAP_DEBUG_ANY, "attr_index_config: Missing index type\n", 0, 0,
0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "attr_index_config: Missing index
type\n", 0, 0, 0);
attrinfo_delete(&a);
return -1;
}
@@ -841,12 +841,12 @@ attr_index_config(
official_rules[k++] = slapi_ch_strdup (officialOID);
} else {
char* preamble = slapi_ch_smprintf("%s: line %d", fname, lineno);
- LDAPDebug (LDAP_DEBUG_ANY, "%s: use \"%s\" instead of
\"%s\" (ignored)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: use \"%s\" instead of
\"%s\" (ignored)\n",
preamble, officialOID, attrValue->bv_val);
slapi_ch_free((void**)&preamble);
}
} else { /* we don't know what this is */
- LDAPDebug (LDAP_DEBUG_ANY, "%s: line %d: "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: line %d: "
"unknown or invalid matching rule \"%s\" in index configuration
(ignored)\n",
fname, lineno, attrValue->bv_val);
}
@@ -876,7 +876,7 @@ attr_index_config(
}
if ((return_value = attr_index_idlistsize_config(e, a, myreturntext))) {
- LDAPDebug(LDAP_DEBUG_ANY,"attr_index_config: %s: Failed to parse idscanlimit info:
%d:%s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"attr_index_config: %s: Failed to parse
idscanlimit info: %d:%s\n",
fname, return_value, myreturntext);
}
@@ -884,7 +884,7 @@ attr_index_config(
return_value = idl_init_private(be, a);
if (0 != return_value) {
/* fatal error, exit */
- LDAPDebug(LDAP_DEBUG_ANY,"%s: line %d:Fatal Error: Failed to initialize attribute
structure\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"%s: line %d:Fatal Error: Failed to initialize
attribute structure\n",
fname, lineno, 0);
exit( 1 );
}
@@ -898,7 +898,7 @@ attr_index_config(
if (need_compare_fn) {
int rc = attr_get_value_cmp_fn( &a->ai_sattr, &a->ai_key_cmp_fn );
if (rc != LDAP_SUCCESS) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"The attribute [%s] does not have a valid ORDERING matching rule - error
%d:s\n",
a->ai_type, rc, ldap_err2string(rc));
a->ai_key_cmp_fn = NULL;
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c
b/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c
index a6bdc5c..fa94d1d 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c
@@ -153,12 +153,12 @@ attrcrypt_keymgmt_get_key(ldbm_instance *li, attrcrypt_cipher_state
*acs, SECKEY
char *instance_name = li->inst_name;
char *dn_string = NULL;
- LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_keymgmt_get_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_keymgmt_get_key\n", 0,
0, 0);
dn_string = slapi_create_dn_string(dn_template,
acs->ace->cipher_display_name, instance_name,
li->inst_li->li_plugin->plg_name);
if (NULL == dn_string) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"attrcrypt_keymgmt_get_key: "
"failed create attrcrypt key dn for plugin %s, "
"instance %s, cypher %s\n",
@@ -171,7 +171,7 @@ attrcrypt_keymgmt_get_key(ldbm_instance *li, attrcrypt_cipher_state
*acs, SECKEY
(const char *)dn_string);
bail:
slapi_ch_free_string(&dn_string);
- LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_keymgmt_get_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_keymgmt_get_key\n", 0,
0, 0);
return ret;
}
@@ -181,7 +181,7 @@ attrcrypt_keymgmt_store_key(ldbm_instance *li, attrcrypt_cipher_state
*acs, SECK
{
int ret = 0;
SECItem wrapped_symmetric_key = {0};
- LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_keymgmt_store_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_keymgmt_store_key\n",
0, 0, 0);
/* Wrap the key and then store it in the right place in dse.ldif */
ret = attrcrypt_wrap_key(acs, key_to_store, public_key, &wrapped_symmetric_key);
if (!ret) {
@@ -214,13 +214,13 @@ attrcrypt_keymgmt_store_key(ldbm_instance *li,
attrcrypt_cipher_state *acs, SECK
if (rc != LDAP_SUCCESS) {
char *resulttext = NULL;
slapi_pblock_get(pb, SLAPI_PB_RESULT_TEXT, &resulttext);
- LDAPDebug(LDAP_DEBUG_ANY, "attrcrypt_keymgmt_store_key: failed to add config key
entries to the DSE: %d: %s: %s\n", rc, ldap_err2string(rc), resulttext ? resulttext :
"unknown");
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "attrcrypt_keymgmt_store_key: failed to add
config key entries to the DSE: %d: %s: %s\n", rc, ldap_err2string(rc), resulttext ?
resulttext : "unknown");
ret = -1;
}
slapi_ch_free((void**)&entry_string);
slapi_pblock_destroy(pb);
}
- LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_keymgmt_store_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_keymgmt_store_key\n",
0, 0, 0);
return ret;
}
@@ -238,13 +238,13 @@ attrcrypt_wrap_key(attrcrypt_cipher_state *acs, PK11SymKey
*symmetric_key, SECKE
SECKEYPublicKey *wrapping_key = public_key;
wrapped_symmetric_key->len = slapd_SECKEY_PublicKeyStrength(public_key);
wrapped_symmetric_key->data = (unsigned char
*)slapi_ch_malloc(wrapped_symmetric_key->len);
- LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_wrap_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_wrap_key\n", 0, 0, 0);
s = slapd_pk11_PubWrapSymKey(wrap_mechanism, wrapping_key, symmetric_key,
wrapped_symmetric_key);
if (SECSuccess != s) {
ret = -1;
- LDAPDebug(LDAP_DEBUG_ANY,"attrcrypt_wrap_key: failed to wrap key for cipher
%s\n", acs->ace->cipher_display_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"attrcrypt_wrap_key: failed to wrap key for
cipher %s\n", acs->ace->cipher_display_name, 0, 0);
}
- LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_wrap_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_wrap_key\n", 0, 0, 0);
return ret;
}
@@ -337,7 +337,7 @@ attrcrypt_fetch_public_key(SECKEYPublicKey **public_key)
PRErrorCode errorCode = 0;
char *default_cert_name = "server-cert";
char *cert_name = NULL;
- LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_fetch_public_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_fetch_public_key\n", 0,
0, 0);
*public_key = NULL;
/* Try to grok the server cert name from the SSL config */
ret = attrcrypt_get_ssl_cert_name(&cert_name);
@@ -348,14 +348,14 @@ attrcrypt_fetch_public_key(SECKEYPublicKey **public_key)
cert = slapd_pk11_findCertFromNickname(cert_name, NULL);
if (cert == NULL) {
errorCode = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY,"Can't find certificate %s in
attrcrypt_fetch_public_key: %d - %s\n", cert_name, errorCode,
slapd_pr_strerror(errorCode));
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Can't find certificate %s in
attrcrypt_fetch_public_key: %d - %s\n", cert_name, errorCode,
slapd_pr_strerror(errorCode));
}
if( cert != NULL ) {
key = slapd_CERT_ExtractPublicKey(cert);
}
if (key == NULL) {
errorCode = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY,"Can't get private key from cert %s in
attrcrypt_fetch_public_key: %d - %s\n", cert_name, errorCode,
slapd_pr_strerror(errorCode));
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Can't get private key from
cert %s in attrcrypt_fetch_public_key: %d - %s\n", cert_name, errorCode,
slapd_pr_strerror(errorCode));
ret = -1;
}
if (cert) {
@@ -369,7 +369,7 @@ attrcrypt_fetch_public_key(SECKEYPublicKey **public_key)
if (cert_name != default_cert_name) {
slapi_ch_free_string(&cert_name);
}
- LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_fetch_public_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_fetch_public_key\n", 0,
0, 0);
return ret;
}
@@ -382,7 +382,7 @@ attrcrypt_fetch_private_key(SECKEYPrivateKey **private_key)
PRErrorCode errorCode = 0;
char *default_cert_name = "server-cert";
char *cert_name = NULL;
- LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_fetch_private_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_fetch_private_key\n",
0, 0, 0);
*private_key = NULL;
/* Try to grok the server cert name from the SSL config */
ret = attrcrypt_get_ssl_cert_name(&cert_name);
@@ -393,14 +393,14 @@ attrcrypt_fetch_private_key(SECKEYPrivateKey **private_key)
cert = slapd_pk11_findCertFromNickname(cert_name, NULL);
if (cert == NULL) {
errorCode = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY,"Can't find certificate %s in
attrcrypt_fetch_private_key: %d - %s\n", cert_name, errorCode,
slapd_pr_strerror(errorCode));
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Can't find certificate %s in
attrcrypt_fetch_private_key: %d - %s\n", cert_name, errorCode,
slapd_pr_strerror(errorCode));
}
if( cert != NULL ) {
key = slapd_get_unlocked_key_for_cert(cert, NULL);
}
if (key == NULL) {
errorCode = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY,"Can't get private key from cert %s in
attrcrypt_fetch_private_key: %d - %s\n", cert_name, errorCode,
slapd_pr_strerror(errorCode));
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Can't get private key from
cert %s in attrcrypt_fetch_private_key: %d - %s\n", cert_name, errorCode,
slapd_pr_strerror(errorCode));
ret = -1;
}
if (cert) {
@@ -414,7 +414,7 @@ attrcrypt_fetch_private_key(SECKEYPrivateKey **private_key)
if (cert_name != default_cert_name) {
slapi_ch_free_string(&cert_name);
}
- LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_fetch_private_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_fetch_private_key\n",
0, 0, 0);
return ret;
}
@@ -510,7 +510,7 @@ attrcrypt_init(ldbm_instance *li)
attrcrypt_cipher_entry *ace = NULL;
SECKEYPrivateKey *private_key = NULL;
SECKEYPublicKey *public_key = NULL;
- LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_init\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_init\n", 0, 0, 0);
if (slapd_security_library_is_initialized()) {
/* In case the backend instance is restarted,
* inst_attrcrypt_state_private in li could have memory containing
@@ -561,10 +561,10 @@ attrcrypt_init(ldbm_instance *li)
private_key = NULL;
} else {
if (li->attrcrypt_configured) {
- LDAPDebug(LDAP_DEBUG_ANY,"Warning: encryption is configured in backend %s, but
because SSL is not enabled, database encryption is not available and the configuration
will be overridden.\n", li->inst_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Warning: encryption is configured in backend
%s, but because SSL is not enabled, database encryption is not available and the
configuration will be overridden.\n", li->inst_name, 0, 0);
}
}
- LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_init : %d\n", ret, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_init : %d\n", ret, 0,
0);
return ret;
}
@@ -578,22 +578,22 @@ attrcrypt_init(ldbm_instance *li)
int attrcrypt_check_enable_cipher(attrcrypt_cipher_entry *ace)
{
int ret = 0;
- LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_check_enable_cipher\n", 0, 0, 0);
- LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_check_enable_cipher\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_check_enable_cipher\n",
0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_check_enable_cipher\n",
0, 0, 0);
return ret;
}
int
attrcrypt_cleanup(attrcrypt_cipher_state *acs)
{
- LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_cleanup\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_cleanup\n", 0, 0,
0);
if (acs->key) {
slapd_pk11_FreeSymKey(acs->key);
}
if (acs->slot) {
slapd_pk11_FreeSlot(acs->slot);
}
- LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_cleanup\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_cleanup\n", 0, 0,
0);
return 0;
}
@@ -604,11 +604,11 @@ attrcrypt_cleanup(attrcrypt_cipher_state *acs)
int
attrcrypt_cleanup_private(ldbm_instance *li)
{
- LDAPDebug(LDAP_DEBUG_TRACE, "-> attrcrypt_cleanup_private\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-> attrcrypt_cleanup_private\n", 0,
0, 0);
if (li && li->inst_attrcrypt_state_private) {
_back_crypt_cleanup_private(&(li->inst_attrcrypt_state_private));
}
- LDAPDebug(LDAP_DEBUG_TRACE, "<- attrcrypt_cleanup_private\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<- attrcrypt_cleanup_private\n", 0,
0, 0);
return 0;
}
@@ -647,7 +647,7 @@ static void log_bytes(char* format_string, unsigned char *bytes,
size_t length)
print_ptr += sprintf(print_ptr, "%02x ", bytes[x]);
}
- LDAPDebug(LDAP_DEBUG_ANY,format_string, print_buffer, length, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,format_string, print_buffer, length, 0);
slapi_ch_free((void**)&print_buffer);
}
@@ -660,7 +660,7 @@ attrcrypt_crypto_op(attrcrypt_private *priv, backend *be, struct
attrinfo *ai, c
int ret = -1;
attrcrypt_cipher_state *acs = NULL;
- LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_crypto_op\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_crypto_op\n", 0, 0,
0);
acs = attrcrypt_get_acs(be,ai->ai_attrcrypt);
if (NULL == acs) {
/* This happens if SSL/NSS has not been enabled */
@@ -668,14 +668,14 @@ attrcrypt_crypto_op(attrcrypt_private *priv, backend *be, struct
attrinfo *ai, c
}
#if defined(DEBUG_ATTRCRYPT)
if (encrypt) {
- LDAPDebug(LDAP_DEBUG_ANY,"attrcrypt_crypto_op encrypt '%s' (%d)\n",
in_data, in_size, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"attrcrypt_crypto_op encrypt '%s'
(%d)\n", in_data, in_size, 0);
} else {
log_bytes("attrcrypt_crypto_op decrypt '%s' (%d)\n", (unsigned char
*)in_data, in_size);
}
#endif
ret = _back_crypt_crypto_op(priv, acs, in_data, in_size,
out_data, out_size, encrypt, be, ai);
- LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_crypto_op\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_crypto_op\n", 0, 0,
0);
return ret;
}
@@ -689,7 +689,7 @@ attrcrypt_crypto_op_value(attrcrypt_private *priv, backend *be, struct
attrinfo
size_t out_size = 0;
struct berval *bval = NULL;
- LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_crypto_op_value\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_crypto_op_value\n", 0,
0, 0);
bval = (struct berval *) slapi_value_get_berval(invalue);
in_data = bval->bv_val;
@@ -706,7 +706,7 @@ attrcrypt_crypto_op_value(attrcrypt_private *priv, backend *be, struct
attrinfo
slapi_ch_free((void**)&out_data);
}
- LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_crypto_op_value: %d\n", ret, 0,
0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_crypto_op_value: %d\n",
ret, 0, 0);
return ret;
}
@@ -720,7 +720,7 @@ attrcrypt_crypto_op_value_replace(attrcrypt_private *priv, backend
*be, struct a
size_t out_size = 0;
struct berval *bval = NULL;
- LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_crypto_op_value_replace\n", 0, 0,
0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"->
attrcrypt_crypto_op_value_replace\n", 0, 0, 0);
bval = (struct berval *) slapi_value_get_berval(inoutvalue);
in_data = bval->bv_val;
@@ -737,7 +737,7 @@ attrcrypt_crypto_op_value_replace(attrcrypt_private *priv, backend
*be, struct a
slapi_ch_free((void**)&out_data);
}
- LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_crypto_op_value_replace: %d\n",
ret, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_crypto_op_value_replace:
%d\n", ret, 0, 0);
return ret;
}
@@ -748,7 +748,7 @@ attrcrypt_crypto_op_values(attrcrypt_private *priv, backend *be,
struct attrinf
int i = 0;
Slapi_Value **encrypted_values = NULL;
- LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_crypto_op_values\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_crypto_op_values\n", 0,
0, 0);
encrypted_values = (Slapi_Value **) slapi_ch_calloc(sizeof(Slapi_Value
*),local_valuearray_count(invalues) + 1);
for ( i = 0; (invalues[i] != NULL) && (ret == 0); i++ ) {
Slapi_Value *encrypted_value = NULL;
@@ -762,7 +762,7 @@ attrcrypt_crypto_op_values(attrcrypt_private *priv, backend *be,
struct attrinf
}
}
*outvalues = encrypted_values;
- LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_crypto_op_values: %d\n", ret, 0,
0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_crypto_op_values:
%d\n", ret, 0, 0);
return ret;
}
@@ -772,7 +772,7 @@ attrcrypt_crypto_op_values_replace(attrcrypt_private *priv, backend
*be, struct
int ret = 0;
int i = 0;
- LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_crypto_op_values_replace\n", 0, 0,
0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"->
attrcrypt_crypto_op_values_replace\n", 0, 0, 0);
for ( i = 0; (invalues[i] != NULL) && (ret == 0); i++ ) {
ret = attrcrypt_crypto_op_value_replace(priv,be,ai,invalues[i],encrypt);
@@ -780,7 +780,7 @@ attrcrypt_crypto_op_values_replace(attrcrypt_private *priv, backend
*be, struct
break;
}
}
- LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_crypto_op_values_replace\n", 0, 0,
0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<-
attrcrypt_crypto_op_values_replace\n", 0, 0, 0);
return ret;
}
@@ -802,7 +802,7 @@ attrcrypt_decrypt_entry(backend *be, struct backentry *e)
return ret;
}
- LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_decrypt_entry\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_decrypt_entry\n", 0, 0,
0);
/* Scan through the entry's attributes, looking to see if any are configured for
crypto */
for ( rc = slapi_entry_first_attr( e->ep_entry, &attr ); rc == 0 && attr
; rc = slapi_entry_next_attr( e->ep_entry, attr, &attr )) {
@@ -820,7 +820,7 @@ attrcrypt_decrypt_entry(backend *be, struct backentry *e)
/* Now decrypt the attribute values in place on the original entry */
ret = attrcrypt_crypto_op_value_replace(ai->ai_attrcrypt,be,ai,value,0);
if (ret) {
- LDAPDebug(LDAP_DEBUG_ANY,"attrcrypt_decrypt_entry: FAILING because decryption
operation failed\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"attrcrypt_decrypt_entry: FAILING because
decryption operation failed\n", 0, 0, 0);
return ret;
}
i = slapi_attr_next_value(attr,i,&value);
@@ -832,14 +832,14 @@ attrcrypt_decrypt_entry(backend *be, struct backentry *e)
/* Now decrypt the attribute values in place on the original entry */
ret = attrcrypt_crypto_op_value_replace(ai->ai_attrcrypt,be,ai,value,0);
if (ret) {
- LDAPDebug(LDAP_DEBUG_ANY,"attrcrypt_decrypt_entry: FAILING because decryption
operation failed\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"attrcrypt_decrypt_entry: FAILING because
decryption operation failed\n", 0, 0, 0);
return ret;
}
i = attr_next_deleted_value(attr,i,&value);
}
}
}
- LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_decrypt_entry\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_decrypt_entry\n", 0, 0,
0);
return ret;
}
@@ -863,7 +863,7 @@ attrcrypt_encrypt_entry_inplace(backend *be, const struct backentry
*inout)
return ret;
}
- LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_encrypt_entry_inplace\n", 0, 0,
0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"->
attrcrypt_encrypt_entry_inplace\n", 0, 0, 0);
/* Scan the entry's attributes looking for any that are configured for encryption
*/
for ( rc = slapi_entry_first_attr( inout->ep_entry, &attr ); rc == 0;
rc = slapi_entry_next_attr( inout->ep_entry, attr, &attr ) ) {
@@ -882,7 +882,7 @@ attrcrypt_encrypt_entry_inplace(backend *be, const struct backentry
*inout)
}
}
}
- LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_encrypt_entry_inplace\n", 0, 0,
0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<-
attrcrypt_encrypt_entry_inplace\n", 0, 0, 0);
return ret;
}
@@ -908,7 +908,7 @@ attrcrypt_encrypt_entry(backend *be, const struct backentry *in,
struct backentr
return ret;
}
- LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_encrypt_entry\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_encrypt_entry\n", 0, 0,
0);
*out = NULL;
/* Scan the entry's attributes looking for any that are configured for encryption
*/
for ( rc = slapi_entry_first_attr( in->ep_entry, &attr ); rc == 0;
@@ -932,7 +932,7 @@ attrcrypt_encrypt_entry(backend *be, const struct backentry *in,
struct backentr
/* Now encrypt the attribute values in place on the new entry */
ret = attrcrypt_crypto_op_values(ai->ai_attrcrypt,be,ai,svals,&new_vals,1);
if (ret) {
- LDAPDebug(LDAP_DEBUG_ANY,"Error: attrcrypt_crypto_op_values failed in
attrcrypt_encrypt_entry\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Error: attrcrypt_crypto_op_values failed in
attrcrypt_encrypt_entry\n", 0, 0, 0);
break;
}
/* DBDB does this call free the old value memory ? */
@@ -943,7 +943,7 @@ attrcrypt_encrypt_entry(backend *be, const struct backentry *in,
struct backentr
}
}
*out = new_entry;
- LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_encrypt_entry\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_encrypt_entry\n", 0, 0,
0);
return ret;
}
@@ -968,7 +968,7 @@ attrcrypt_encrypt_index_key(backend *be, struct attrinfo *ai, const
struct berva
}
if (ai->ai_attrcrypt) {
- LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_encrypt_index_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_encrypt_index_key\n",
0, 0, 0);
ret = attrcrypt_crypto_op(ai->ai_attrcrypt,be,ai,
in_data,in_size,&out_data,&out_size, 1);
if (0 == ret) {
out_berval = (struct berval *)ber_alloc();
@@ -981,7 +981,7 @@ attrcrypt_encrypt_index_key(backend *be, struct attrinfo *ai, const
struct berva
out_berval->bv_val = out_data;
*out = out_berval;
}
- LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_encrypt_index_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_encrypt_index_key\n",
0, 0, 0);
}
return ret;
}
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt_config.c
b/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt_config.c
index 0fe9e8b..6059cd9 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt_config.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt_config.c
@@ -66,7 +66,7 @@ ldbm_attrcrypt_parse_entry(ldbm_instance *inst, Slapi_Entry *e,
/* Get the name of the attribute to index which will be the value
* of the cn attribute. */
if (slapi_entry_attr_find(e, "cn", &attr) != 0) {
- LDAPDebug(LDAP_DEBUG_ANY, "Warning: malformed attribute encryption entry
%s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Warning: malformed attribute encryption
entry %s\n",
slapi_entry_get_dn(e), 0, 0);
return LDAP_OPERATIONS_ERROR;
}
@@ -82,7 +82,7 @@ ldbm_attrcrypt_parse_entry(ldbm_instance *inst, Slapi_Entry *e,
attrValue = slapi_value_get_berval(sval);
*cipher = ldbm_attrcrypt_parse_cipher(attrValue->bv_val);
if (0 == *cipher)
- LDAPDebug(LDAP_DEBUG_ANY, "Warning: attempt to configure unrecognized cipher %s
in encrypted attribute config entry %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Warning: attempt to configure unrecognized
cipher %s in encrypted attribute config entry %s\n",
attrValue->bv_val, slapi_entry_get_dn(e), 0);
}
}
@@ -161,7 +161,7 @@ ldbm_instance_attrcrypt_config_add_callback(Slapi_PBlock *pb,
Slapi_Entry* e, Sl
/* Remember that we have some encryption enabled, so we can be intelligent about
warning when SSL is not enabled */
inst->attrcrypt_configured = 1;
} else {
- LDAPDebug(LDAP_DEBUG_ANY, "Warning: attempt to encryption on a non-existent
attribute: %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Warning: attempt to encryption on a
non-existent attribute: %s\n",
attribute_name, 0, 0);
returntext = "attribute does not exist";
*returncode = LDAP_UNWILLING_TO_PERFORM;
@@ -215,7 +215,7 @@ ldbm_instance_attrcrypt_config_delete_callback(Slapi_PBlock *pb,
Slapi_Entry* e,
ainfo_get(inst->inst_be, attribute_name, &ai);
if (ai == NULL || (0 == strcmp(LDBM_PSEUDO_ATTR_DEFAULT, ai->ai_type)) ) {
- LDAPDebug(LDAP_DEBUG_ANY, "Warning: attempt to delete encryption for non-existant
attribute: %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Warning: attempt to delete encryption for
non-existant attribute: %s\n",
attribute_name, 0, 0);
} else {
ldbm_instance_attrcrypt_disable(ai);
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_config.c
b/ldap/servers/slapd/back-ldbm/ldbm_config.c
index ef849d8..181c2f5 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_config.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_config.c
@@ -77,7 +77,7 @@ int ldbm_config_add_dse_entries(struct ldbminfo *li, char **entries,
char *strin
} else if (result == LDAP_ALREADY_EXISTS) {
LDAPDebug1Arg(LDAP_DEBUG_TRACE, "Database config entry [%s] already
exists - skipping\n", ebuf);
} else {
- LDAPDebug(LDAP_DEBUG_ANY, "Unable to add config entry [%s] to the DSE:
%d %d\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Unable to add config entry [%s] to
the DSE: %d %d\n",
ebuf, result, rc);
}
slapi_pblock_destroy(util_pb);
@@ -305,12 +305,12 @@ static int ldbm_config_directory_set(void *arg, void *value, char
*errorbuf, int
slapi_ch_free((void **) &(li->li_new_directory));
li->li_new_directory = rel2abspath(val); /* normalize the path;
strdup'ed in rel2abspath */
- LDAPDebug(LDAP_DEBUG_ANY, "New db directory location will not take affect
until the server is restarted\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "New db directory location will not take
affect until the server is restarted\n", 0, 0, 0);
} else {
slapi_ch_free((void **) &(li->li_new_directory));
slapi_ch_free((void **) &(li->li_directory));
if (NULL == val || '\0' == *val) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: db directory is not set; check %s in the db config:
%s\n",
CONFIG_DIRECTORY, CONFIG_LDBM_DN, 0);
retval = LDAP_PARAM_ERROR;
@@ -335,7 +335,7 @@ static int ldbm_config_directory_set(void *arg, void *value, char
*errorbuf, int
slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_RESULT, &res);
if (res != LDAP_SUCCESS) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: ldbm plugin unable to read %s\n",
CONFIG_LDBM_DN, 0, 0);
retval = res;
@@ -344,7 +344,7 @@ static int ldbm_config_directory_set(void *arg, void *value, char
*errorbuf, int
slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES,
&entries);
if (NULL == entries) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: ldbm plugin unable to read %s\n",
CONFIG_LDBM_DN, 0, 0);
retval = LDAP_OPERATIONS_ERROR;
@@ -353,7 +353,7 @@ static int ldbm_config_directory_set(void *arg, void *value, char
*errorbuf, int
res = slapi_entry_attr_find(entries[0], "nsslapd-directory",
&attr);
if (res != 0 || attr == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: ldbm plugin unable to read attribute
nsslapd-directory from %s\n",
CONFIG_LDBM_DN, 0, 0);
retval = LDAP_OPERATIONS_ERROR;
@@ -363,7 +363,7 @@ static int ldbm_config_directory_set(void *arg, void *value, char
*errorbuf, int
if ( slapi_attr_first_value(attr,&v) != 0
|| ( NULL == v )
|| ( NULL == ( s = slapi_value_get_string( v )))) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: ldbm plugin unable to read attribute
nsslapd-directory from %s\n",
CONFIG_LDBM_DN, 0, 0);
retval = LDAP_OPERATIONS_ERROR;
@@ -371,7 +371,7 @@ static int ldbm_config_directory_set(void *arg, void *value, char
*errorbuf, int
}
slapi_pblock_destroy(search_pb);
if (NULL == s || '\0' == s || 0 == PL_strcmp(s,
"(null)")) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: db directory is not set; check %s in the db config:
%s\n",
CONFIG_DIRECTORY, CONFIG_LDBM_DN, 0);
retval = LDAP_PARAM_ERROR;
@@ -419,7 +419,7 @@ static int ldbm_config_dbcachesize_set(void *arg, void *value, char
*errorbuf, i
/* min: 8KB (page size) * def thrd cnts (threadnumber==20). */
#define DBDEFMINSIZ 500000
if (val < DBDEFMINSIZ) {
- LDAPDebug( LDAP_DEBUG_ANY,"WARNING: cache too small, increasing to %dK
bytes\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"WARNING: cache too small, increasing
to %dK bytes\n",
DBDEFMINSIZ/1000, 0, 0);
val = DBDEFMINSIZ;
} else if (val > li->li_dbcachesize) {
@@ -432,7 +432,7 @@ static int ldbm_config_dbcachesize_set(void *arg, void *value, char
*errorbuf, i
}
if (CONFIG_PHASE_RUNNING == phase) {
li->li_new_dbcachesize = val;
- LDAPDebug(LDAP_DEBUG_ANY, "New db cache size will not take affect until
the server is restarted\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "New db cache size will not take
affect until the server is restarted\n",
0, 0, 0);
} else {
li->li_new_dbcachesize = val;
@@ -458,7 +458,7 @@ static int ldbm_config_maxpassbeforemerge_set(void *arg, void *value,
char *erro
if (apply) {
if (val < 0) {
- LDAPDebug( LDAP_DEBUG_ANY,"WARNING: maxpassbeforemerge will not take
negative value\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"WARNING: maxpassbeforemerge will not
take negative value\n", 0, 0, 0);
val = 100;
}
@@ -486,7 +486,7 @@ static int ldbm_config_dbncache_set(void *arg, void *value, char
*errorbuf, int
if (CONFIG_PHASE_RUNNING == phase) {
li->li_new_dbncache = val;
- LDAPDebug(LDAP_DEBUG_ANY, "New nsslapd-dbncache will not take affect
until the server is restarted\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "New nsslapd-dbncache will not take
affect until the server is restarted\n", 0, 0, 0);
} else {
li->li_new_dbncache = val;
li->li_dbncache = val;
@@ -1022,7 +1022,7 @@ static int ldbm_config_db_lock_set(void *arg, void *value, char
*errorbuf, int p
if (apply) {
if (CONFIG_PHASE_RUNNING == phase) {
li->li_dblayer_private->dblayer_lock_config = val;
- LDAPDebug(LDAP_DEBUG_ANY, "New db max lock count will not take affect
until the server is restarted\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "New db max lock count will not take
affect until the server is restarted\n", 0, 0, 0);
} else {
li->li_dblayer_private->dblayer_lock_config = val;
}
@@ -1455,7 +1455,7 @@ static int ldbm_config_db_deadlock_policy_set(void *arg, void
*value, char *erro
slapi_create_errormsg(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE,
"Error: Invalid value for %s (%d). Must be between %d and %d
inclusive",
CONFIG_DB_DEADLOCK_POLICY, val, DB_LOCK_DEFAULT, DB_LOCK_YOUNGEST);
- LDAPDebug(LDAP_DEBUG_ANY, "Error: Invalid value for deadlock policy (%d). Must
be between %d and %d inclusive",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: Invalid value for deadlock policy
(%d). Must be between %d and %d inclusive",
val, DB_LOCK_DEFAULT, DB_LOCK_YOUNGEST);
return LDAP_UNWILLING_TO_PERFORM;
}
@@ -1627,7 +1627,7 @@ int ldbm_config_load_dse_info(struct ldbminfo *li)
search_pb = slapi_pblock_new();
if (!search_pb) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_config_load_dse_info: Out of memory\n",
0, 0, 0);
rval = 1;
@@ -1644,7 +1644,7 @@ int ldbm_config_load_dse_info(struct ldbminfo *li)
ldbm_config_add_dse_entries(li, ldbm_skeleton_entries,
li->li_plugin->plg_name, NULL, NULL, 0);
} else if (rval != LDAP_SUCCESS) {
- LDAPDebug(LDAP_DEBUG_ANY, "Error accessing the ldbm config DSE\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error accessing the ldbm config
DSE\n",
0, 0, 0);
rval = 1;
goto bail;
@@ -1654,13 +1654,13 @@ int ldbm_config_load_dse_info(struct ldbminfo *li)
slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES,
&entries);
if (NULL == entries || entries[0] == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "Error accessing the ldbm config DSE\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error accessing the ldbm config
DSE\n",
0, 0, 0);
rval = 1;
goto bail;
}
if (0 != parse_ldbm_config_entry(li, entries[0], ldbm_config)) {
- LDAPDebug(LDAP_DEBUG_ANY, "Error parsing the ldbm config DSE\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error parsing the ldbm config
DSE\n",
0, 0, 0);
rval = 1;
goto bail;
@@ -1882,7 +1882,7 @@ int ldbm_config_set(void *arg, char *attr_name, config_info
*config_array, struc
config = get_config_info(config_array, attr_name);
if (NULL == config) {
- LDAPDebug(LDAP_DEBUG_CONFIG, "Unknown config attribute %s\n",
attr_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_CONFIG, LOG_DEBUG, "Unknown config attribute
%s\n", attr_name, 0, 0);
slapi_create_errormsg(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "Unknown config
attribute %s\n", attr_name);
return LDAP_SUCCESS; /* Ignore unknown attributes */
}
@@ -1944,14 +1944,14 @@ int ldbm_config_set(void *arg, char *attr_name, config_info
*config_array, struc
} else if (LL_CMP(llval, >, llmaxint)) {
slapi_create_errormsg(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: value
%s for attr %s is greater than the maximum %d\n",
str_val, attr_name, maxint);
- LDAPDebug(LDAP_DEBUG_ANY, "Error: value %s for attr %s is greater than
the maximum %d\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: value %s for attr %s is
greater than the maximum %d\n",
str_val, attr_name, maxint);
return LDAP_UNWILLING_TO_PERFORM;
/* check for underflow */
} else if (LL_CMP(llval, <, llminint)) {
slapi_create_errormsg(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: value
%s for attr %s is less than the minimum %d\n",
str_val, attr_name, minint);
- LDAPDebug(LDAP_DEBUG_ANY, "Error: value %s for attr %s is less than the
minimum %d\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: value %s for attr %s is less
than the minimum %d\n",
str_val, attr_name, minint);
return LDAP_UNWILLING_TO_PERFORM;
}
@@ -1986,14 +1986,14 @@ int ldbm_config_set(void *arg, char *attr_name, config_info
*config_array, struc
} else if (LL_CMP(llval, >, llmaxint)) {
slapi_create_errormsg(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: value
%s for attr %s is greater than the maximum %d\n",
str_val, attr_name, maxint);
- LDAPDebug(LDAP_DEBUG_ANY, "Error: value %s for attr %s is greater than
the maximum %d\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: value %s for attr %s is
greater than the maximum %d\n",
str_val, attr_name, maxint);
return LDAP_UNWILLING_TO_PERFORM;
/* check for underflow */
} else if (LL_CMP(llval, <, llminint)) {
slapi_create_errormsg(err_buf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: value
%s for attr %s is less than the minimum %d\n",
str_val, attr_name, minint);
- LDAPDebug(LDAP_DEBUG_ANY, "Error: value %s for attr %s is less than the
minimum %d\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: value %s for attr %s is less
than the minimum %d\n",
str_val, attr_name, minint);
return LDAP_UNWILLING_TO_PERFORM;
}
@@ -2083,7 +2083,7 @@ static int parse_ldbm_config_entry(struct ldbminfo *li, Slapi_Entry
*e, config_i
bval = (struct berval *) slapi_value_get_berval(sval);
if (ldbm_config_set(li, attr_name, config_array, bval, err_buf,
CONFIG_PHASE_STARTUP, 1 /* apply */, LDAP_MOD_REPLACE) != LDAP_SUCCESS) {
- LDAPDebug(LDAP_DEBUG_ANY, "Error with config attribute %s : %s\n",
attr_name, err_buf, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error with config attribute %s :
%s\n", attr_name, err_buf, 0);
return 1;
}
}
@@ -2203,7 +2203,7 @@ void ldbm_config_internal_set(struct ldbminfo *li, char *attrname,
char *value)
if (ldbm_config_set((void *) li, attrname, ldbm_config, &bval,
err_buf, CONFIG_PHASE_INTERNAL, 1 /* apply */,
LDAP_MOD_REPLACE) != LDAP_SUCCESS) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Internal Error: Error setting instance config attr %s to %s:
%s\n",
attrname, value, err_buf);
exit(1);
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_delete.c
b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
index f801e01..4350ae6 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_delete.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
@@ -729,12 +729,12 @@ ldbm_back_delete( Slapi_PBlock *pb )
}
retval = id2entry_add( be, tombstone, &txn );
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug( LDAP_DEBUG_BACKLDBM, "delete 1 DB_LOCK_DEADLOCK\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "delete 1 DB_LOCK_DEADLOCK\n", 0,
0, 0 );
/* Abort and re-try */
continue;
}
if (retval) {
- LDAPDebug( LDAP_DEBUG_ANY, "id2entry_add failed, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "id2entry_add failed, err=%d %s\n",
retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
DEL_SET_ERROR(ldap_result_code, LDAP_OPERATIONS_ERROR, retry_count);
@@ -774,7 +774,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
continue;
}
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, "index_del_entry(%s, 0x%x) failed (%d)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "index_del_entry(%s, 0x%x) failed
(%d)\n",
slapi_entry_get_dn(e->ep_entry), addordel_flags, retval);
DEL_SET_ERROR(ldap_result_code, LDAP_OPERATIONS_ERROR, retry_count);
goto error_return;
@@ -792,14 +792,14 @@ ldbm_back_delete( Slapi_PBlock *pb )
SLAPI_ATTR_VALUE_TOMBSTONE,
tombstone->ep_id,BE_INDEX_ADD, &txn);
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug( LDAP_DEBUG_BACKLDBM,
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"delete (adding %s) DB_LOCK_DEADLOCK\n",
SLAPI_ATTR_VALUE_TOMBSTONE, 0, 0 );
/* Retry txn */
continue;
}
if (retval) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"delete (adding %s) failed, err=%d %s\n",
SLAPI_ATTR_VALUE_TOMBSTONE, retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
@@ -816,14 +816,14 @@ ldbm_back_delete( Slapi_PBlock *pb )
deletion_csn_str, tombstone->ep_id,
BE_INDEX_ADD, &txn);
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug( LDAP_DEBUG_BACKLDBM,
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"delete tombstone csn(adding %s) DB_LOCK_DEADLOCK\n",
deletion_csn_str, 0, 0 );
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"delete tombsone csn(adding %s) failed, err=%d %s\n",
deletion_csn_str,
retval,
@@ -840,14 +840,14 @@ ldbm_back_delete( Slapi_PBlock *pb )
slapi_entry_get_uniqueid(tombstone->ep_entry),
tombstone->ep_id,BE_INDEX_ADD,&txn);
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug( LDAP_DEBUG_BACKLDBM,
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"delete (adding %s) DB_LOCK_DEADLOCK\n",
SLAPI_ATTR_UNIQUEID, 0, 0 );
/* Retry txn */
continue;
}
if (retval) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"delete (adding %s) failed, err=%d %s\n",
SLAPI_ATTR_UNIQUEID, retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
@@ -860,14 +860,14 @@ ldbm_back_delete( Slapi_PBlock *pb )
slapi_sdn_get_ndn(&nscpEntrySDN),
tombstone->ep_id, BE_INDEX_ADD, &txn);
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug( LDAP_DEBUG_BACKLDBM,
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"delete (adding %s) DB_LOCK_DEADLOCK\n",
SLAPI_ATTR_NSCP_ENTRYDN, 0, 0 );
/* Retry txn */
continue;
}
if (retval) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"delete (adding %s) failed, err=%d %s\n",
SLAPI_ATTR_NSCP_ENTRYDN, retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
@@ -884,14 +884,14 @@ ldbm_back_delete( Slapi_PBlock *pb )
entryusn_str, tombstone->ep_id, BE_INDEX_ADD, &txn);
slapi_ch_free_string(&entryusn_str);
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug( LDAP_DEBUG_BACKLDBM,
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"delete (adding %s) DB_LOCK_DEADLOCK\n",
SLAPI_ATTR_ENTRYUSN, 0, 0 );
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"delete (adding %s) failed, err=%d %s\n",
SLAPI_ATTR_ENTRYUSN, retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
@@ -921,7 +921,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
continue;
}
if ( retval ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"delete (deleting %s) failed, err=%d %s\n",
LDBM_PARENTID_STR, retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
@@ -958,7 +958,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
continue;
}
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"adding (adding tombstone entryrdn %s) failed, err=%d %s\n",
slapi_entry_get_dn(tombstone->ep_entry),
retval, (msg = dblayer_strerror( retval )) ? msg : "" );
@@ -980,14 +980,14 @@ ldbm_back_delete( Slapi_PBlock *pb )
SLAPI_ATTR_VALUE_TOMBSTONE, e->ep_id,
BE_INDEX_DEL|BE_INDEX_EQUALITY, &txn);
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug( LDAP_DEBUG_BACKLDBM,
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"delete (deleting %s) DB_LOCK_DEADLOCK\n",
SLAPI_ATTR_VALUE_TOMBSTONE, 0, 0 );
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"delete (deleting %s) failed, err=%d %s\n",
SLAPI_ATTR_VALUE_TOMBSTONE, retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
@@ -1004,14 +1004,14 @@ ldbm_back_delete( Slapi_PBlock *pb )
deletion_csn_str, e->ep_id,
BE_INDEX_DEL|BE_INDEX_EQUALITY, &txn);
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug( LDAP_DEBUG_BACKLDBM,
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"delete tombstone csn(deleting %s) DB_LOCK_DEADLOCK\n",
deletion_csn_str, 0, 0 );
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"delete tombsone csn(deleting %s) failed, err=%d %s\n",
deletion_csn_str,
retval,
@@ -1028,14 +1028,14 @@ ldbm_back_delete( Slapi_PBlock *pb )
slapi_entry_get_uniqueid(e->ep_entry),
e->ep_id, BE_INDEX_DEL|BE_INDEX_EQUALITY, &txn);
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug( LDAP_DEBUG_BACKLDBM,
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"delete (deleting %s) DB_LOCK_DEADLOCK\n",
SLAPI_ATTR_UNIQUEID, 0, 0 );
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"delete (deleting %s) failed, err=%d %s\n",
SLAPI_ATTR_UNIQUEID, retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
@@ -1052,14 +1052,14 @@ ldbm_back_delete( Slapi_PBlock *pb )
nscpedn, e->ep_id, BE_INDEX_DEL|BE_INDEX_EQUALITY, &txn);
slapi_ch_free((void **)&nscpedn);
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug( LDAP_DEBUG_BACKLDBM,
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"delete (deleting %s) DB_LOCK_DEADLOCK\n",
SLAPI_ATTR_NSCP_ENTRYDN, 0, 0 );
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"delete (deleting %s) failed, err=%d %s\n",
SLAPI_ATTR_NSCP_ENTRYDN, retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
@@ -1078,14 +1078,14 @@ ldbm_back_delete( Slapi_PBlock *pb )
BE_INDEX_DEL|BE_INDEX_EQUALITY, &txn);
slapi_ch_free_string(&entryusn_str);
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug( LDAP_DEBUG_BACKLDBM,
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"delete (deleting %s) DB_LOCK_DEADLOCK\n",
SLAPI_ATTR_ENTRYUSN, 0, 0 );
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"delete (deleting %s) failed, err=%d %s\n",
SLAPI_ATTR_ENTRYUSN, retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
@@ -1125,12 +1125,12 @@ ldbm_back_delete( Slapi_PBlock *pb )
conn_id, op_id, parent_modify_c.old_entry, parent_modify_c.new_entry,
retval);
if (DB_LOCK_DEADLOCK == retval)
{
- LDAPDebug( LDAP_DEBUG_BACKLDBM, "del 4 DEADLOCK\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "del 4 DEADLOCK\n", 0, 0, 0 );
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug( LDAP_DEBUG_ANY, "delete 3 BAD, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "delete 3 BAD, err=%d %s\n",
retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
DEL_SET_ERROR(ldap_result_code,
@@ -1148,7 +1148,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
if (DB_LOCK_DEADLOCK == retval)
{
- LDAPDebug( LDAP_DEBUG_BACKLDBM, "delete DEADLOCK vlv_update_index\n", 0, 0,
0 );
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "delete DEADLOCK
vlv_update_index\n", 0, 0, 0 );
/* Retry txn */
continue;
}
@@ -1163,7 +1163,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
if (!is_ruv && !is_fixup_operation && !delete_tombstone_entry
&& !NO_RUV_UPDATE(li)) {
ruv_c_init = ldbm_txn_ruv_modify_context( pb, &ruv_c );
if (-1 == ruv_c_init) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_back_delete: ldbm_txn_ruv_modify_context "
"failed to construct RUV modify context\n",
0, 0, 0);
@@ -1180,7 +1180,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
continue;
}
if (0 != retval) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"modify_update_all failed, err=%d %s\n", retval,
(msg = dblayer_strerror( retval )) ? msg : "", 0 );
if (LDBM_OS_ERR_IS_DISKFULL(retval))
@@ -1196,7 +1196,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
}
if (retry_count == RETRY_TIMES) {
/* Failed */
- LDAPDebug( LDAP_DEBUG_ANY, "Retry count exceeded in delete\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Retry count exceeded in delete\n", 0, 0,
0 );
ldap_result_code= LDAP_BUSY;
retval = -1;
goto error_return;
@@ -1204,7 +1204,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
if (create_tombstone_entry) {
retval = cache_replace(&inst->inst_cache, e, tombstone);
if (retval) {
- LDAPDebug(LDAP_DEBUG_CACHE, "ldbm_back_delete: cache_replace failed (%d): %s
--> %s\n",
+ LDAPDebug(LDAP_DEBUG_CACHE, LOG_DEBUG, "ldbm_back_delete: cache_replace failed
(%d): %s --> %s\n",
retval, slapi_entry_get_dn(e->ep_entry),
slapi_entry_get_dn(tombstone->ep_entry));
retval= -1;
goto error_return;
@@ -1293,7 +1293,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
if (ruv_c_init) {
if (modify_switch_entries(&ruv_c, be) != 0 ) {
ldap_result_code= LDAP_OPERATIONS_ERROR;
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_back_delete: modify_switch_entries failed\n", 0, 0, 0);
retval = -1;
goto error_return;
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c
b/ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c
index f66ae68..ea49556 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c
@@ -25,7 +25,7 @@ static int entryrdn_noancestorid = 0;
#ifdef ENTRYRDN_DEBUG
#define ASSERT(_x) do { \
if (!(_x)) { \
- LDAPDebug(LDAP_DEBUG_ANY, "BAD ASSERTION at %s/%d: %s\n", \
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "BAD ASSERTION at %s/%d: %s\n", \
__FILE__, __LINE__, #_x); \
*(char *)0L = 23; \
} \
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_index_config.c
b/ldap/servers/slapd/back-ldbm/ldbm_index_config.c
index c5ceacf..5d7aa2a 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_index_config.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_index_config.c
@@ -34,7 +34,7 @@ static int ldbm_index_parse_entry(ldbm_instance *inst, Slapi_Entry *e,
/* Get the name of the attribute to index which will be the value
* of the cn attribute. */
if (slapi_entry_attr_find(e, "cn", &attr) != 0) {
- LDAPDebug(LDAP_DEBUG_ANY, "Warning: malformed index entry %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Warning: malformed index entry
%s\n",
slapi_entry_get_dn(e), 0, 0);
return LDAP_OPERATIONS_ERROR;
}
@@ -42,7 +42,7 @@ static int ldbm_index_parse_entry(ldbm_instance *inst, Slapi_Entry *e,
slapi_attr_first_value(attr, &sval);
attrValue = slapi_value_get_berval(sval);
if (NULL == attrValue->bv_val || 0 == attrValue->bv_len) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: malformed index entry %s -- empty index name\n",
slapi_entry_get_dn(e), 0, 0);
return LDAP_OPERATIONS_ERROR;
@@ -58,7 +58,7 @@ static int ldbm_index_parse_entry(ldbm_instance *inst, Slapi_Entry *e,
attrValue = slapi_value_get_berval(sval);
if (NULL == attrValue->bv_val || attrValue->bv_len == 0) {
/* missing the index type, error out */
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: malformed index entry %s -- empty
nsIndexType\n",
slapi_entry_get_dn(e), 0, 0);
slapi_ch_free_string(index_name);
@@ -198,7 +198,7 @@ ldbm_instance_index_config_modify_callback(Slapi_PBlock *pb,
Slapi_Entry *e,
*returncode = LDAP_SUCCESS;
if(slapi_entry_attr_find(entryAfter, "cn", &attr) != 0){
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: malformed index entry %s - missing cn attribute\n",
slapi_entry_get_dn(entryAfter), 0, 0);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
@@ -208,7 +208,7 @@ ldbm_instance_index_config_modify_callback(Slapi_PBlock *pb,
Slapi_Entry *e,
attrValue = slapi_value_get_berval(sval);
if (NULL == attrValue->bv_val || 0 == attrValue->bv_len) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: malformed index entry %s, missing index name\n",
slapi_entry_get_dn(e), 0, 0);
*returncode = LDAP_UNWILLING_TO_PERFORM;
@@ -217,7 +217,7 @@ ldbm_instance_index_config_modify_callback(Slapi_PBlock *pb,
Slapi_Entry *e,
ainfo_get(inst->inst_be, attrValue->bv_val, &ainfo);
if (NULL == ainfo) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: malformed index entry %s - missing cn attribute info\n",
slapi_entry_get_dn(e), 0, 0);
*returncode = LDAP_UNWILLING_TO_PERFORM;
@@ -225,7 +225,7 @@ ldbm_instance_index_config_modify_callback(Slapi_PBlock *pb,
Slapi_Entry *e,
}
if(slapi_entry_attr_find(entryAfter, "nsIndexType", &attr) != 0){
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: malformed index entry %s - missing nsIndexType attribute\n",
slapi_entry_get_dn(entryAfter), 0, 0);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
@@ -259,7 +259,7 @@ int ldbm_instance_config_add_index_entry(
/* get the cn value */
if (slapi_entry_attr_find(e, "cn", &attr) != 0) {
- LDAPDebug(LDAP_DEBUG_ANY, "Warning: malformed index entry %s, missing cn
attrbiute\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Warning: malformed index entry %s,
missing cn attrbiute\n",
slapi_entry_get_dn(e), 0, 0);
return -1;
}
@@ -267,7 +267,7 @@ int ldbm_instance_config_add_index_entry(
slapi_attr_first_value(attr, &sval);
attrValue = slapi_value_get_berval(sval);
if (NULL == attrValue->bv_val || 0 == attrValue->bv_len) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: malformed index entry %s, missing index name\n",
slapi_entry_get_dn(e), 0, 0);
return -1;
@@ -277,7 +277,7 @@ int ldbm_instance_config_add_index_entry(
dn =
slapi_create_dn_string("cn=%s,cn=index,cn=%s,cn=%s,cn=plugins,cn=config",
basetype, inst->inst_name,
li->li_plugin->plg_name);
if (NULL == dn) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_instance_config_add_index_entry: "
"failed create index dn with type %s for plugin %s, "
"instance %s\n",
@@ -304,7 +304,7 @@ int ldbm_instance_config_add_index_entry(
eBuf = PR_sprintf_append(eBuf, "nsIndexType: %s\n", attrValue->bv_val);
}
} else {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_instance_config_add_index_entry: "
"failed create index dn with type %s for plugin %s, "
"instance %s. Missing nsIndexType\n",
@@ -377,7 +377,7 @@ int ldbm_instance_create_default_user_indexes(ldbm_instance *inst)
int flags = LDBM_INSTANCE_CONFIG_DONT_WRITE;
if (NULL == inst) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: can't initialize default user indexes (invalid instance).\n",
0,0,0);
return -1;
}
@@ -409,7 +409,7 @@ int ldbm_instance_create_default_user_indexes(ldbm_instance *inst)
* of the cn attribute.
*/
if (slapi_entry_attr_find(entries[i], "cn", &attr) != 0) {
- LDAPDebug(LDAP_DEBUG_ANY,"Warning: malformed index entry %s.
Index ignored.\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Warning: malformed index
entry %s. Index ignored.\n",
slapi_entry_get_dn(entries[i]), 0, 0);
continue;
}
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c
b/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c
index 698be66..cd7e820 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c
@@ -469,7 +469,7 @@ parse_ldbm_instance_config_entry(ldbm_instance *inst, Slapi_Entry *e,
config_inf
if (ldbm_config_set((void *) inst, attr_name, config_array, bval,
err_buf, CONFIG_PHASE_STARTUP, 1 /* apply */, LDAP_MOD_REPLACE) !=
LDAP_SUCCESS) {
- LDAPDebug(LDAP_DEBUG_ANY, "Error with config attribute %s : %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error with config attribute %s :
%s\n",
attr_name, err_buf, 0);
return 1;
}
@@ -521,7 +521,7 @@ ldbm_instance_config_load_dse_info(ldbm_instance *inst)
search_pb = slapi_pblock_new();
if (!search_pb) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_instance_config_load_dse_info: Out of memory\n",
0, 0, 0);
rval = 1;
@@ -535,7 +535,7 @@ ldbm_instance_config_load_dse_info(ldbm_instance *inst)
slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_RESULT, &rval);
if (rval != LDAP_SUCCESS) {
- LDAPDebug(LDAP_DEBUG_ANY, "Error accessing the config DSE\n", 0, 0,
0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error accessing the config DSE\n",
0, 0, 0);
rval = 1;
goto bail;
} else {
@@ -544,14 +544,14 @@ ldbm_instance_config_load_dse_info(ldbm_instance *inst)
slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES,
&entries);
if ((!entries) || (!entries[0])) {
- LDAPDebug(LDAP_DEBUG_ANY, "Error accessing the config DSE\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error accessing the config
DSE\n",
0, 0, 0);
rval = 1;
goto bail;
}
if (0 != parse_ldbm_instance_config_entry(inst, entries[0],
ldbm_instance_config)) {
- LDAPDebug(LDAP_DEBUG_ANY, "Error parsing the config DSE\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error parsing the config
DSE\n",
0, 0, 0);
rval = 1;
goto bail;
@@ -759,7 +759,7 @@ ldbm_instance_modify_config_entry_callback(Slapi_PBlock *pb,
Slapi_Entry* entryB
if (!returntext) {
rc = LDAP_OPERATIONS_ERROR;
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_instance_modify_config_entry_callback: "
"NULL return text\n",
0, 0, 0);
@@ -781,7 +781,7 @@ ldbm_instance_modify_config_entry_callback(Slapi_PBlock *pb,
Slapi_Entry* entryB
rc = LDAP_UNWILLING_TO_PERFORM;
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE,
"Can't change the root suffix of a backend");
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm: modify attempted to change the root suffix "
"of a backend (which is not allowed)\n",
0, 0, 0);
@@ -836,7 +836,7 @@ ldbm_instance_config_internal_set(ldbm_instance *inst, char *attrname,
char *val
if (ldbm_config_set((void *) inst, attrname, ldbm_instance_config, &bval,
err_buf, CONFIG_PHASE_INTERNAL, 1 /* apply */, LDAP_MOD_REPLACE) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Internal Error: Error setting instance config attr %s to %s:
%s\n",
attrname, value, err_buf);
exit(1);
@@ -902,7 +902,7 @@ ldbm_instance_postadd_instance_entry_callback(Slapi_PBlock *pb,
Slapi_Entry* ent
parse_ldbm_instance_entry(entryBefore, &instance_name);
rval = ldbm_instance_generate(li, instance_name, &be);
if (rval) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_instance_postadd_instance_entry_callback: "
"ldbm_instance_generate (%s) failed (%d)\n",
instance_name, rval, 0);
@@ -922,7 +922,7 @@ ldbm_instance_postadd_instance_entry_callback(Slapi_PBlock *pb,
Slapi_Entry* ent
rval = ldbm_instance_start(be);
if (0 != rval)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_instance_postadd_instance_entry_callback: "
"ldbm_instnace_start (%s) failed (%d)\n",
instance_name, rval, 0);
@@ -949,7 +949,7 @@ ldbm_instance_add_instance_entry_callback(Slapi_PBlock *pb,
Slapi_Entry* entryBe
/* Make sure we don't create two instances with the same name. */
inst = ldbm_instance_find_by_name(li, instance_name);
if (inst != NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "WARNING: ldbm instance %s already
exists\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "WARNING: ldbm instance %s already
exists\n",
instance_name, 0, 0);
if (returntext != NULL)
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "An ldbm instance
with the name %s already exists\n",
@@ -1092,7 +1092,7 @@ ldbm_instance_post_delete_instance_entry_callback(Slapi_PBlock *pb,
Slapi_Entry*
inst = ldbm_instance_find_by_name(li, instance_name);
if (inst == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "ldbm: instance '%s' does not exist!
(2)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm: instance '%s' does not
exist! (2)\n",
instance_name, 0, 0);
if (returntext) {
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "No ldbm instance
exists with the name '%s' (2)\n",
@@ -1105,7 +1105,7 @@ ldbm_instance_post_delete_instance_entry_callback(Slapi_PBlock *pb,
Slapi_Entry*
return SLAPI_DSE_CALLBACK_ERROR;
}
- LDAPDebug(LDAP_DEBUG_ANY, "ldbm: removing '%s'.\n", instance_name,
0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm: removing '%s'.\n",
instance_name, 0, 0);
cache_destroy_please(&inst->inst_cache, CACHE_TYPE_ENTRY);
if (entryrdn_get_switch()) { /* subtree-rename: on */
@@ -1140,7 +1140,7 @@ ldbm_instance_post_delete_instance_entry_callback(Slapi_PBlock *pb,
Slapi_Entry*
dbp = PR_smprintf("%s/%s", inst_dirp,
direntry->name);
if (NULL == dbp) {
- LDAPDebug (LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_instance_post_delete_instance_entry_callback:"
" failed to generate db path: %s/%s\n",
inst_dirp, direntry->name, 0);
@@ -1201,7 +1201,7 @@ ldbm_instance_delete_instance_entry_callback(Slapi_PBlock *pb,
Slapi_Entry* entr
parse_ldbm_instance_entry(entryBefore, &instance_name);
inst = ldbm_instance_find_by_name(li, instance_name);
if (inst == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "ldbm: instance '%s' does not
exist!\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm: instance '%s' does not
exist!\n",
instance_name, 0, 0);
if (returntext) {
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "No ldbm instance
exists with the name '%s'\n",
@@ -1217,7 +1217,7 @@ ldbm_instance_delete_instance_entry_callback(Slapi_PBlock *pb,
Slapi_Entry* entr
/* check if some online task is happening */
if ((instance_set_busy(inst) != 0) ||
(slapi_counter_get_value(inst->inst_ref_count) > 0)) {
- LDAPDebug(LDAP_DEBUG_ANY, "ldbm: '%s' is in the middle of a task.
"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm: '%s' is in the middle of a
task. "
"Cancel the task or wait for it to finish, "
"then try again.\n", instance_name, 0, 0);
if (returntext) {
@@ -1233,7 +1233,7 @@ ldbm_instance_delete_instance_entry_callback(Slapi_PBlock *pb,
Slapi_Entry* entr
}
/* okay, we're gonna delete this database instance. take it offline. */
- LDAPDebug(LDAP_DEBUG_ANY, "ldbm: Bringing %s offline...\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm: Bringing %s offline...\n",
instance_name, 0, 0);
slapi_mtn_be_stopping(inst->inst_be);
dblayer_instance_close(inst->inst_be);
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modify.c
b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
index 34d9861..1398797 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modify.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
@@ -88,7 +88,7 @@ int modify_switch_entries(modify_context *mc,backend *be)
if (mc->old_entry && mc->new_entry) {
ret = cache_replace(&(inst->inst_cache), mc->old_entry, mc->new_entry);
if (ret) {
- LDAPDebug(LDAP_DEBUG_CACHE, "modify_switch_entries: replacing %s with %s failed
(%d)\n",
+ LDAPDebug(LDAP_DEBUG_CACHE, LOG_DEBUG, "modify_switch_entries: replacing %s with
%s failed (%d)\n",
slapi_entry_get_dn(mc->old_entry->ep_entry),
slapi_entry_get_dn(mc->new_entry->ep_entry), ret);
}
@@ -133,7 +133,7 @@ modify_unswitch_entries(modify_context *mc,backend *be)
cache_unlock_entry(&inst->inst_cache, mc->new_entry);
cache_lock_entry(&inst->inst_cache, mc->old_entry);
} else {
- LDAPDebug(LDAP_DEBUG_CACHE, "modify_unswitch_entries: replacing %s with %s failed
(%d)\n",
+ LDAPDebug(LDAP_DEBUG_CACHE, LOG_DEBUG, "modify_unswitch_entries: replacing %s
with %s failed (%d)\n",
slapi_entry_get_dn(mc->old_entry->ep_entry),
slapi_entry_get_dn(mc->new_entry->ep_entry), ret);
}
@@ -708,7 +708,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
continue;
}
if (0 != retval) {
- LDAPDebug( LDAP_DEBUG_ANY, "id2entry_add failed, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "id2entry_add failed, err=%d %s\n",
retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
MOD_SET_ERROR(ldap_result_code, LDAP_OPERATIONS_ERROR, retry_count);
@@ -721,7 +721,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
continue;
}
if (0 != retval) {
- LDAPDebug( LDAP_DEBUG_ANY, "index_add_mods failed, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "index_add_mods failed, err=%d %s\n",
retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
MOD_SET_ERROR(ldap_result_code, LDAP_OPERATIONS_ERROR, retry_count);
@@ -740,7 +740,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
continue;
}
if (0 != retval) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"vlv_update_index failed, err=%d %s\n",
retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
@@ -754,7 +754,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
if (!is_ruv && !is_fixup_operation && !NO_RUV_UPDATE(li)) {
ruv_c_init = ldbm_txn_ruv_modify_context( pb, &ruv_c );
if (-1 == ruv_c_init) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_back_modify: ldbm_txn_ruv_modify_context "
"failed to construct RUV modify context\n",
0, 0, 0);
@@ -771,7 +771,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
continue;
}
if (0 != retval) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"modify_update_all failed, err=%d %s\n", retval,
(msg = dblayer_strerror( retval )) ? msg : "", 0 );
if (LDBM_OS_ERR_IS_DISKFULL(retval))
@@ -786,7 +786,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
}
}
if (retry_count == RETRY_TIMES) {
- LDAPDebug( LDAP_DEBUG_ANY, "Retry count exceeded in modify\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Retry count exceeded in modify\n", 0, 0,
0 );
ldap_result_code= LDAP_BUSY;
goto error_return;
}
@@ -794,7 +794,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
if (ruv_c_init) {
if (modify_switch_entries(&ruv_c, be) != 0 ) {
ldap_result_code= LDAP_OPERATIONS_ERROR;
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_back_modify: modify_switch_entries failed\n", 0, 0, 0);
goto error_return;
}
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
index 2af1f3a..413de52 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
@@ -586,7 +586,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
CACHE_RETURN( &inst->inst_cache, &ancestorentry );
ldap_result_matcheddn= slapi_ch_strdup((char *)
slapi_sdn_get_dn(&ancestorsdn));
ldap_result_code= LDAP_NO_SUCH_OBJECT;
- LDAPDebug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: New superior
"
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ldbm_back_modrdn:
New superior "
"does not exist matched %s, newsuperior =
%s\n",
ldap_result_matcheddn == NULL ? "NULL" :
ldap_result_matcheddn,
@@ -603,7 +603,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
ldap_result_code = plugin_call_acl_plugin(pb,
newparententry->ep_entry, NULL, NULL, SLAPI_ACL_MODDN, ACLPLUGIN_ACCESS_DEFAULT,
&errbuf);
if (ldap_result_code != LDAP_SUCCESS) {
ldap_result_message = errbuf;
- LDAPDebug(LDAP_DEBUG_TRACE, "No 'moddn' access
to new superior.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "No
'moddn' access to new superior.\n", 0, 0, 0);
goto error_return;
}
} else {
@@ -611,7 +611,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
ldap_result_code = plugin_call_acl_plugin (pb,
newparententry->ep_entry, NULL, NULL, SLAPI_ACL_ADD, ACLPLUGIN_ACCESS_DEFAULT,
&errbuf );
if (ldap_result_code != LDAP_SUCCESS) {
ldap_result_message = errbuf;
- LDAPDebug(LDAP_DEBUG_TRACE, "No 'add' access
to new superior.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "No
'add' access to new superior.\n", 0, 0, 0);
goto error_return;
}
}
@@ -626,7 +626,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
/* Here means that we didn't find the parent */
ldap_result_matcheddn = "NULL";
ldap_result_code= LDAP_NO_SUCH_OBJECT;
- LDAPDebug( LDAP_DEBUG_TRACE, "Parent does not exist matched %s,
parentdn = %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "Parent does not exist
matched %s, parentdn = %s\n",
ldap_result_matcheddn, slapi_sdn_get_ndn(&dn_parentdn), 0 );
goto error_return;
}
@@ -687,7 +687,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
slapi_entry_delete_string(ec->ep_entry, SLAPI_ATTR_OBJECTCLASS,
SLAPI_ATTR_VALUE_TOMBSTONE);
/* Now also remove the nscpEntryDN */
if (slapi_entry_attr_delete(ec->ep_entry, SLAPI_ATTR_NSCP_ENTRYDN) !=
0){
- LDAPDebug(LDAP_DEBUG_REPL, "Resurrection of %s - Couldn't
remove %s\n",
+ LDAPDebug(LDAP_DEBUG_REPL, LOG_DEBUG, "Resurrection of %s -
Couldn't remove %s\n",
slapi_entry_get_dn(ec->ep_entry),
SLAPI_ATTR_NSCP_ENTRYDN, 0);
}
@@ -808,7 +808,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
if ( entry_apply_mods( ec->ep_entry,
slapi_mods_get_ldapmods_byref(&smods_generated) ) != 0 )
{
ldap_result_code= LDAP_OPERATIONS_ERROR;
- LDAPDebug( LDAP_DEBUG_TRACE, "ldbm_modrdn: entry_apply_mods failed
for entry %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ldbm_modrdn:
entry_apply_mods failed for entry %s\n",
slapi_entry_get_dn_const(ec->ep_entry), 0, 0);
goto error_return;
}
@@ -821,7 +821,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
if (entry_apply_mods_wsi(ec->ep_entry, &smods_generated_wsi,
operation_get_csn(operation), is_replicated_operation)!=0)
{
ldap_result_code= LDAP_OPERATIONS_ERROR;
- LDAPDebug( LDAP_DEBUG_TRACE, "ldbm_modrdn: entry_apply_mods_wsi
failed for entry %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ldbm_modrdn:
entry_apply_mods_wsi failed for entry %s\n",
slapi_entry_get_dn_const(ec->ep_entry), 0, 0);
goto error_return;
}
@@ -839,7 +839,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
if (entry_apply_mods_wsi(ec->ep_entry, &smods_operation_wsi,
operation_get_csn(operation), is_replicated_operation)!=0)
{
ldap_result_code= LDAP_OPERATIONS_ERROR;
- LDAPDebug( LDAP_DEBUG_TRACE, "ldbm_modrdn: entry_apply_mods_wsi
(operational attributes) failed for entry %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ldbm_modrdn:
entry_apply_mods_wsi (operational attributes) failed for entry %s\n",
slapi_entry_get_dn_const(ec->ep_entry), 0, 0);
goto error_return;
}
@@ -939,7 +939,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
}
}
}
- LDAPDebug(LDAP_DEBUG_ANY, "parent_update_on_childchange
parent %s of %s numsub=%d\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"parent_update_on_childchange parent %s of %s numsub=%d\n",
slapi_entry_get_dn_const(parent_modify_context.old_entry->ep_entry),
slapi_entry_get_dn_const(e->ep_entry), sub_count);
#endif
@@ -1016,7 +1016,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
}
if (retval)
{
- LDAPDebug(LDAP_DEBUG_ANY, "modrdn_rename_entry_update_indexes %s -->
%s failed, err=%d\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "modrdn_rename_entry_update_indexes
%s --> %s failed, err=%d\n",
slapi_entry_get_dn(e->ep_entry),
slapi_entry_get_dn(ec->ep_entry), retval);
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
MOD_SET_ERROR(ldap_result_code, LDAP_OPERATIONS_ERROR, retry_count);
@@ -1039,7 +1039,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
memset(&sv,0,sizeof(Slapi_Value));
if ( slapi_rdn2typeval( rdns[i], &type, &sv.bv ) != 0 )
{
- LDAPDebug( LDAP_DEBUG_ANY, "modrdn: rdn2typeval (%s)
failed\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "modrdn: rdn2typeval (%s)
failed\n",
rdns[i], 0, 0 );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
MOD_SET_ERROR(ldap_result_code,
@@ -1056,7 +1056,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
}
else if (retval != 0 )
{
- LDAPDebug( LDAP_DEBUG_ANY, "modrdn: could not add new value
to index, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "modrdn: could not add
new value to index, err=%d %s\n",
retval, (msg = dblayer_strerror( retval )) ? msg :
"", 0 );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
MOD_SET_ERROR(ldap_result_code,
@@ -1083,7 +1083,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
}
else if (0 != retval)
{
- LDAPDebug( LDAP_DEBUG_ANY, "modrdn: "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "modrdn: "
"could not update parent, err=%d %s\n", retval,
(msg = dblayer_strerror( retval )) ? msg : "", 0 );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
@@ -1105,7 +1105,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
}
if (0 != retval)
{
- LDAPDebug( LDAP_DEBUG_ANY, "modrdn: "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "modrdn: "
"could not update parent, err=%d %s\n", retval,
(msg = dblayer_strerror( retval )) ? msg : "",
0 );
@@ -1179,7 +1179,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
if (!is_ruv && !is_fixup_operation && !NO_RUV_UPDATE(li)) {
ruv_c_init = ldbm_txn_ruv_modify_context( pb, &ruv_c );
if (-1 == ruv_c_init) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_back_modrdn: ldbm_txn_ruv_modify_context "
"failed to construct RUV modify context\n",
0, 0, 0);
@@ -1196,7 +1196,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
continue;
}
if (0 != retval) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"modify_update_all failed, err=%d %s\n", retval,
(msg = dblayer_strerror( retval )) ? msg : "", 0 );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) {
@@ -1212,7 +1212,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
if (retry_count == RETRY_TIMES)
{
/* Failed */
- LDAPDebug( LDAP_DEBUG_ANY, "Retry count exceeded in modrdn\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Retry count exceeded in modrdn\n",
0, 0, 0 );
ldap_result_code= LDAP_BUSY;
goto error_return;
}
@@ -1310,7 +1310,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
if (ruv_c_init) {
if (modify_switch_entries(&ruv_c, be) != 0 ) {
ldap_result_code= LDAP_OPERATIONS_ERROR;
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm_back_modrdn: modify_switch_entries failed\n", 0, 0, 0);
goto error_return;
}
@@ -1736,7 +1736,7 @@ moddn_newrdn_mods(Slapi_PBlock *pb, const char *olddn, struct
backentry *ec, Sla
if ( baddn || badrdn )
{
- LDAPDebug( LDAP_DEBUG_TRACE, "moddn_newrdn_mods failed: olddn=%s baddn=%d
badrdn=%d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "moddn_newrdn_mods failed: olddn=%s
baddn=%d badrdn=%d\n",
olddn, baddn, badrdn);
return LDAP_OPERATIONS_ERROR;
}
@@ -1766,7 +1766,7 @@ moddn_newrdn_mods(Slapi_PBlock *pb, const char *olddn, struct
backentry *ec, Sla
}
else
{
- LDAPDebug( LDAP_DEBUG_TRACE, "moddn_newrdn_mods failed: could not parse new
rdn %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "moddn_newrdn_mods failed: could not
parse new rdn %s\n",
newrdn, 0, 0);
return LDAP_OPERATIONS_ERROR;
}
@@ -1817,7 +1817,7 @@ modrdn_rename_entry_update_indexes(back_txn *ptxn, Slapi_PBlock *pb,
struct ldbm
*/
retval = id2entry_add_ext(be, *ec, ptxn, 1, &cache_rc);
if (cache_rc) {
- LDAPDebug(LDAP_DEBUG_CACHE,
+ LDAPDebug(LDAP_DEBUG_CACHE, LOG_DEBUG,
"modrdn_rename_entry_update_indexes: adding %s failed to add to
the cache (rc: %d, cache_rc: %d)\n",
slapi_entry_get_dn(e->ep_entry), retval, cache_rc);
}
@@ -1829,7 +1829,7 @@ modrdn_rename_entry_update_indexes(back_txn *ptxn, Slapi_PBlock *pb,
struct ldbm
}
if (retval != 0)
{
- LDAPDebug( LDAP_DEBUG_ANY, "modrdn_rename_entry_update_indexes: id2entry_add
failed, err=%d %s\n", retval, (msg = dblayer_strerror( retval )) ? msg :
"", 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "modrdn_rename_entry_update_indexes:
id2entry_add failed, err=%d %s\n", retval, (msg = dblayer_strerror( retval )) ? msg :
"", 0 );
goto error_return;
}
if(smods1!=NULL && slapi_mods_get_num_mods(smods1)>0)
@@ -1846,7 +1846,7 @@ modrdn_rename_entry_update_indexes(back_txn *ptxn, Slapi_PBlock *pb,
struct ldbm
}
if (retval != 0)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "index_add_mods 1 failed, err=%d
%s\n", retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "index_add_mods 1 failed, err=%d
%s\n", retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
goto error_return;
}
}
@@ -1870,7 +1870,7 @@ modrdn_rename_entry_update_indexes(back_txn *ptxn, Slapi_PBlock *pb,
struct ldbm
}
if (retval != 0)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "index_add_mods 2 failed, err=%d
%s\n", retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "index_add_mods 2 failed, err=%d
%s\n", retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
goto error_return;
}
}
@@ -1888,7 +1888,7 @@ modrdn_rename_entry_update_indexes(back_txn *ptxn, Slapi_PBlock *pb,
struct ldbm
}
if (retval != 0)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "index_add_mods 3 failed, err=%d
%s\n", retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "index_add_mods 3 failed, err=%d
%s\n", retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
goto error_return;
}
}
@@ -1908,7 +1908,7 @@ modrdn_rename_entry_update_indexes(back_txn *ptxn, Slapi_PBlock *pb,
struct ldbm
}
if (retval != 0)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "vlv_update_all_indexes failed, err=%d
%s\n", retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "vlv_update_all_indexes failed,
err=%d %s\n", retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
goto error_return;
}
}
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_search.c
b/ldap/servers/slapd/back-ldbm/ldbm_search.c
index cda1714..3a1eecc 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_search.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_search.c
@@ -257,12 +257,12 @@ ldbm_search_compile_filter(Slapi_Filter *f, void *arg)
p = bigpat ? bigpat : pat;
re = slapi_re_comp(p, &re_result);
if (NULL == re) {
- LDAPDebug(LDAP_DEBUG_ANY, "ldbm_search_compile_filter: re_comp (%s)
failed (%s): %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_search_compile_filter: re_comp
(%s) failed (%s): %s\n",
pat, p, re_result?re_result:"unknown" );
rc = SLAPI_FILTER_SCAN_ERROR;
} else {
char ebuf[BUFSIZ];
- LDAPDebug(LDAP_DEBUG_TRACE, "ldbm_search_compile_filter: re_comp
(%s)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ldbm_search_compile_filter:
re_comp (%s)\n",
escape_string(p, ebuf), 0, 0);
f->f_un.f_un_sub.sf_private = (void *)re;
}
@@ -406,7 +406,7 @@ ldbm_back_search( Slapi_PBlock *pb )
slapi_pblock_get(pb, SLAPI_CONN_ID, &conn_id);
slapi_pblock_get(pb, SLAPI_OPERATION_ID, &op_id);
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: Sort control ignored for conn=%d
op=%d\n",
conn_id, op_id, 0);
}
@@ -441,7 +441,7 @@ ldbm_back_search( Slapi_PBlock *pb )
slapi_pblock_get(pb, SLAPI_CONN_ID, &conn_id);
slapi_pblock_get(pb, SLAPI_OPERATION_ID, &op_id);
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: VLV control ignored for conn=%d
op=%d\n",
conn_id, op_id, 0);
}
@@ -511,7 +511,7 @@ ldbm_back_search( Slapi_PBlock *pb )
if (print_once)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: %s "
"when more than one backend is involved. "
"VLV indexes that will never be used should be
removed.\n",
@@ -1021,7 +1021,7 @@ build_candidate_list( Slapi_PBlock *pb, backend *be, struct
backentry *e,
r = SLAPI_FAIL_GENERAL;
}
if ( 0 != err && DB_NOTFOUND != err ) {
- LDAPDebug( LDAP_DEBUG_ANY, "database error %d\n", err, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "database error %d\n", err, 0, 0 );
slapi_send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL, NULL,
0, NULL );
if (LDBM_OS_ERR_IS_DISKFULL(err)) r = return_on_disk_full(li);
@@ -1044,7 +1044,7 @@ bail:
}
}
- LDAPDebug(LDAP_DEBUG_TRACE, "candidate list has %lu ids\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "candidate list has %lu ids\n",
*candidates ? (*candidates)->b_nids : 0L, 0, 0);
return r;
@@ -1632,7 +1632,7 @@ ldbm_back_next_search_entry_ext( Slapi_PBlock *pb, int use_extension
)
{
if ( err != 0 && err != DB_NOTFOUND )
{
- LDAPDebug( LDAP_DEBUG_ANY, "next_search_entry db err %d\n",
err, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "next_search_entry db err
%d\n", err, 0, 0 );
if (LDBM_OS_ERR_IS_DISKFULL(err))
{
/* disk full in the middle of returning search results
@@ -1643,7 +1643,7 @@ ldbm_back_next_search_entry_ext( Slapi_PBlock *pb, int use_extension
)
goto bail;
}
}
- LDAPDebug( LDAP_DEBUG_ARGS, "candidate %lu not found\n",
(u_long)id, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "candidate %lu not found\n",
(u_long)id, 0, 0 );
if ( err == DB_NOTFOUND )
{
/* Since we didn't really look at this entry, we should
@@ -1670,7 +1670,7 @@ ldbm_back_next_search_entry_ext( Slapi_PBlock *pb, int use_extension
)
Slapi_Value **refs= attr_get_present_values(attr);
if ( refs == NULL || refs[0] == NULL )
{
- LDAPDebug( LDAP_DEBUG_ANY, "null ref in (%s)\n",
backentry_get_ndn(e), 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "null ref in (%s)\n",
backentry_get_ndn(e), 0, 0 );
}
else if ( slapi_sdn_scope_test( backentry_get_sdn(e), basesdn, scope ))
{
@@ -1721,7 +1721,7 @@ ldbm_back_next_search_entry_ext( Slapi_PBlock *pb, int use_extension
)
/* it's a regular entry, check if it matches the filter, and passes the
ACL check */
if ( 0 != ( sr->sr_flags & SR_FLAG_CAN_SKIP_FILTER_TEST )) {
/* Since we do access control checking in the filter test (?Why?) we
need to check access now */
- LDAPDebug( LDAP_DEBUG_FILTER, "Bypassing filter test\n", 0,
0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "Bypassing filter
test\n", 0, 0, 0 );
if ( ACL_CHECK_FLAG ) {
filter_test = slapi_vattr_filter_test_ext( pb, e->ep_entry,
filter, ACL_CHECK_FLAG, 1 /* Only perform access checking, thank you */);
} else {
@@ -1730,12 +1730,12 @@ ldbm_back_next_search_entry_ext( Slapi_PBlock *pb, int
use_extension )
if (li->li_filter_bypass_check) {
int ft_rc;
- LDAPDebug( LDAP_DEBUG_FILTER, "Checking bypass\n", 0, 0,
0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "Checking
bypass\n", 0, 0, 0 );
ft_rc = slapi_vattr_filter_test( pb, e->ep_entry, filter,
ACL_CHECK_FLAG );
if (filter_test != ft_rc) {
/* Oops ! This means that we thought we could bypass the filter
test, but noooo... */
- LDAPDebug( LDAP_DEBUG_ANY, "Filter bypass ERROR on entry
%s\n", backentry_get_ndn(e), 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Filter bypass ERROR on
entry %s\n", backentry_get_ndn(e), 0, 0 );
filter_test = ft_rc; /* Fix the error */
}
}
diff --git a/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
b/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
index 7aae93d..855277e 100644
--- a/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
+++ b/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
@@ -663,7 +663,7 @@ int ldbm_back_ldif2ldbm( Slapi_PBlock *pb )
0 /* use single thread mode */);
slapi_sdn_free (&sdn);
if (rc != UID_SUCCESS) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Fatal Error---Failed to initialize uniqueid generator; error
= %d. "
"Exiting now.\n", rc, 0, 0 );
return -1;
@@ -676,7 +676,7 @@ int ldbm_back_ldif2ldbm( Slapi_PBlock *pb )
/* Find the instance that the ldif2db will be done on. */
inst = ldbm_instance_find_by_name(li, instance_name);
if (NULL == inst) {
- LDAPDebug(LDAP_DEBUG_ANY, "Unknown ldbm instance %s\n", instance_name,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Unknown ldbm instance %s\n",
instance_name,
0, 0);
return -1;
}
@@ -684,7 +684,7 @@ int ldbm_back_ldif2ldbm( Slapi_PBlock *pb )
/* check if an import/restore is already ongoing... */
if ((instance_set_busy(inst) != 0) ||
(slapi_counter_get_value(inst->inst_ref_count) > 0)) {
- LDAPDebug(LDAP_DEBUG_ANY, "ldbm: '%s' is already in the middle of
"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm: '%s' is already in the
middle of "
"another task and cannot be disturbed.\n",
inst->inst_name, 0, 0);
return -1;
@@ -702,7 +702,7 @@ int ldbm_back_ldif2ldbm( Slapi_PBlock *pb )
if (! (task_flags & SLAPI_TASK_RUNNING_FROM_COMMANDLINE)) {
/* shutdown this instance of the db */
- LDAPDebug(LDAP_DEBUG_ANY, "Bringing %s offline...\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Bringing %s offline...\n",
instance_name, 0, 0);
slapi_mtn_be_disable(inst->inst_be);
@@ -740,17 +740,17 @@ int ldbm_back_ldif2ldbm( Slapi_PBlock *pb )
if (0 != (ret = dblayer_start(li, DBLAYER_IMPORT_MODE)) ) {
if (LDBM_OS_ERR_IS_DISKFULL(ret)) {
- LDAPDebug(LDAP_DEBUG_ANY, "ERROR: Failed to init database. "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: Failed to init database.
"
"There is either insufficient disk space or "
"insufficient memory available to initialize the "
"database.\n", 0, 0, 0);
- LDAPDebug(LDAP_DEBUG_ANY,"Please check that\n"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Please check that\n"
"1) disks are not full,\n"
"2) no file exceeds the file size limit,\n"
"3) the configured dbcachesize is not too large for the
available memory on this machine.\n",
0, 0, 0);
} else {
- LDAPDebug(LDAP_DEBUG_ANY, "ERROR: Failed to init database "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: Failed to init database
"
"(error %d: %s)\n", ret, dblayer_strerror(ret), 0);
}
goto fail;
@@ -925,7 +925,7 @@ static IDList *ldbm_fetch_subtrees(backend *be, char **include, int
*err)
id,
entryrdn_get_noancestorid()?"entryrdn":"ancestorid");
*err = 0; /* not a problem */
} else {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"warning: %s not indexed on %lu\n",
entryrdn_get_noancestorid()?"entryrdn":"ancestorid",
id, 0);
@@ -994,7 +994,7 @@ export_one_entry(struct ldbminfo *li,
/* Decrypt in place */
rc = attrcrypt_decrypt_entry(be, expargs->ep);
if (rc) {
- LDAPDebug(LDAP_DEBUG_ANY,"Failed to decrypt entry [%s] : %d\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Failed to decrypt entry [%s] :
%d\n",
slapi_sdn_get_dn(&expargs->ep->ep_entry->e_sdn), rc,
0);
}
}
@@ -1056,7 +1056,7 @@ export_one_entry(struct ldbminfo *li,
"%s: Processed %d entries (%d%%).",
inst->inst_name, *expargs->cnt, percent);
}
- LDAPDebug(LDAP_DEBUG_ANY, "export %s: Processed %d entries (%d%%).\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "export %s: Processed %d entries
(%d%%).\n",
inst->inst_name, *expargs->cnt, percent);
*expargs->lastcnt = *expargs->cnt;
}
@@ -1115,7 +1115,7 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
int server_running;
export_args eargs = {0};
- LDAPDebug( LDAP_DEBUG_TRACE, "=> ldbm_back_ldbm2ldif\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ldbm_back_ldbm2ldif\n", 0, 0,
0 );
slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &li );
slapi_pblock_get( pb, SLAPI_TASK_FLAGS, &task_flags );
@@ -1147,7 +1147,7 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
if (run_from_cmdline && li->li_dblayer_private->dblayer_private_mem
&& server_running)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Cannot export the database while the server is running and "
"nsslapd-db-private-mem option is used, "
"please use ldif2db.pl\n", 0, 0, 0);
@@ -1162,7 +1162,7 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
slapi_pblock_get(pb, SLAPI_BACKEND_INSTANCE_NAME, &instance_name);
inst = ldbm_instance_find_by_name(li, instance_name);
if (NULL == inst) {
- LDAPDebug(LDAP_DEBUG_ANY, "Unknown ldbm instance %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Unknown ldbm instance %s\n",
instance_name, 0, 0);
return_value = -1;
goto bye;
@@ -1170,7 +1170,7 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
/* [605974] command db2ldif should not be able to run when on-line
* import is running */
if (dblayer_in_import(inst)) {
- LDAPDebug(LDAP_DEBUG_ANY, "instance %s is busy\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "instance %s is busy\n",
instance_name, 0, 0);
return_value = -1;
goto bye;
@@ -1195,7 +1195,7 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
/* check if an import/restore is already ongoing... */
if (instance_set_busy(inst) != 0) {
- LDAPDebug(LDAP_DEBUG_ANY, "ldbm: '%s' is already in the
middle"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm: '%s' is already in the
middle"
" of another task and cannot be disturbed.\n",
inst->inst_name, 0, 0);
return_value = LDBM2LDIF_BUSY;
@@ -1239,7 +1239,7 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
options |= SLAPI_DUMP_STATEINFO;
if (fname == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "db2ldif: no LDIF filename supplied\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "db2ldif: no LDIF filename
supplied\n",
0, 0, 0);
return_value = -1;
goto bye;
@@ -1260,7 +1260,7 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
SLAPD_DEFAULT_FILE_MODE);
}
if (fd < 0) {
- LDAPDebug(LDAP_DEBUG_ANY, "db2ldif: can't open %s: %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "db2ldif: can't open %s: %d
(%s)\n",
fname, errno, dblayer_strerror(errno));
return_value = -1;
goto bye;
@@ -1271,14 +1271,14 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
if ( we_start_the_backends ) {
if (0 != dblayer_start(li,DBLAYER_EXPORT_MODE)) {
- LDAPDebug( LDAP_DEBUG_ANY, "db2ldif: Failed to init database\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "db2ldif: Failed to init
database\n",
0, 0, 0 );
return_value = -1;
goto bye;
}
/* dblayer_instance_start will init the id2entry index. */
if (0 != dblayer_instance_start(be, DBLAYER_EXPORT_MODE)) {
- LDAPDebug(LDAP_DEBUG_ANY, "db2ldif: Failed to init instance\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "db2ldif: Failed to init
instance\n",
0, 0, 0);
return_value = -1;
goto bye;
@@ -1290,7 +1290,7 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
get_ids_from_disk(be);
if ((( dblayer_get_id2entry( be, &db )) != 0) || (db == NULL)) {
- LDAPDebug( LDAP_DEBUG_ANY, "Could not open/create id2entry\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Could not open/create id2entry\n",
0, 0, 0 );
return_value = -1;
goto bye;
@@ -1407,7 +1407,7 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
if (return_value != DB_LOCK_DEADLOCK) break;
}
if (return_value) {
- LDAPDebug(LDAP_DEBUG_ANY, "db2ldif: failed to read "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "db2ldif: failed to read "
"entry %lu, err %d\n", (u_long)idl->b_ids[idindex],
return_value, 0);
return_value = -1;
@@ -1603,7 +1603,7 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
"%s: Processed %d entries (100%%).",
inst->inst_name, cnt);
}
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"export %s: Processed %d entries (100%%).\n",
inst->inst_name, cnt, 0);
}
@@ -1621,7 +1621,7 @@ bye:
close(fd);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= ldbm_back_ldbm2ldif\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ldbm_back_ldbm2ldif\n", 0, 0,
0 );
if (we_start_the_backends && NULL != li) {
if (0 != dblayer_flush(li)) {
@@ -1659,9 +1659,9 @@ static void ldbm2index_bad_vlv(Slapi_Task *task, ldbm_instance
*inst,
slapi_task_log_notice(task, "%s: Known VLV indexes are: %s",
inst->inst_name, text);
}
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm2index: Unknown VLV Index named '%s'\n", index, 0,
0);
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm2index: Known VLV Indexes are: %s\n", text, 0, 0);
slapi_ch_free_string(&text);
}
@@ -1705,7 +1705,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
Slapi_Value **nstombstone_vals = NULL;
int istombstone = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> ldbm_back_ldbm2index\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ldbm_back_ldbm2index\n", 0,
0, 0 );
if ( g_get_shutdown() || c_get_shutdown() ) {
return return_value;
}
@@ -1728,7 +1728,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
slapi_task_log_notice(task, "Unknown ldbm instance %s",
instance_name);
}
- LDAPDebug(LDAP_DEBUG_ANY, "Unknown ldbm instance %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Unknown ldbm instance %s\n",
instance_name, 0, 0);
return return_value;
}
@@ -1743,14 +1743,14 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
ldbm_config_internal_set(li, CONFIG_DB_TRANSACTION_LOGGING, "off");
if (0 != dblayer_start(li,DBLAYER_INDEX_MODE)) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm2index: Failed to init database\n", 0, 0, 0 );
return return_value;
}
/* dblayer_instance_start will init the id2entry index. */
if (0 != dblayer_instance_start(be, DBLAYER_INDEX_MODE)) {
- LDAPDebug(LDAP_DEBUG_ANY, "db2ldif: Failed to init instance\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "db2ldif: Failed to init
instance\n",
0, 0, 0);
return return_value;
}
@@ -1761,14 +1761,14 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
/* make sure no other tasks are going, and set the backend readonly */
if (instance_set_busy_and_readonly(inst) != 0) {
- LDAPDebug(LDAP_DEBUG_ANY, "ldbm: '%s' is already in the middle of
"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm: '%s' is already in the
middle of "
"another task and cannot be disturbed.\n",
inst->inst_name, 0, 0);
return return_value;
}
if ((( dblayer_get_id2entry( be, &db )) != 0 ) || (db == NULL)) {
- LDAPDebug( LDAP_DEBUG_ANY, "Could not open/create id2entry\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Could not open/create id2entry\n",
0, 0, 0 );
goto err_min;
}
@@ -1776,7 +1776,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
/* get a cursor to we can walk over the table */
rc = db->cursor(db, NULL, &dbc, 0);
if (0 != rc) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Failed to get cursor for ldbm2index\n", 0, 0, 0 );
goto err_min;
}
@@ -1794,7 +1794,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
slapi_ch_free(&(data.data));
isfirst = 1;
} else {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Failed to seek within id2entry (BAD %d)\n",
return_value, 0 ,0);
goto err_out;
@@ -1845,7 +1845,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
inst->inst_name, LDBM_ENTRYRDN_STR,
CONFIG_ENTRYRDN_SWITCH);
}
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: Requested to index %s, but %s is off\n",
inst->inst_name, LDBM_ENTRYRDN_STR,
CONFIG_ENTRYRDN_SWITCH);
@@ -1859,7 +1859,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
inst->inst_name, LDBM_ENTRYDN_STR,
CONFIG_ENTRYRDN_SWITCH);
}
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: Requested to index %s, but %s is on\n",
inst->inst_name, LDBM_ENTRYDN_STR,
CONFIG_ENTRYRDN_SWITCH);
@@ -1941,7 +1941,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
if (! idl) {
/* most likely, indexes are bad if err is set. */
if (0 != err) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: WARNING: Failed to fetch subtree lists: (%d) %s\n",
inst->inst_name, err, dblayer_strerror(err));
LDAPDebug1Arg(LDAP_DEBUG_ANY,
@@ -1984,7 +1984,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
rc = db->get(db, NULL, &key, &data, 0);
if (rc) {
- LDAPDebug(LDAP_DEBUG_ANY, "%s: Failed "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: Failed "
"to read database, errno=%d (%s)\n",
inst->inst_name, rc, dblayer_strerror(rc));
if (task) {
@@ -2009,7 +2009,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
if (DB_NOTFOUND == rc) {
break;
} else if (0 != rc) {
- LDAPDebug(LDAP_DEBUG_ANY, "%s: Failed to read database, "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: Failed to read database,
"
"errno=%d (%s)\n", inst->inst_name, rc,
dblayer_strerror(rc));
if (task) {
@@ -2107,7 +2107,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
if (rc) {
LDAPDebug1Arg(LDAP_DEBUG_ANY,
"ldbm2index: Skip ID %d\n", pid);
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Parent entry (ID %d) of entry. "
"(ID %d, rdn: %s) does not exist.\n",
pid, temp_id, rdn);
@@ -2174,7 +2174,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
"%s: WARNING: skipping badly formatted entry (id %lu)",
inst->inst_name, (u_long)temp_id);
}
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: WARNING: skipping badly formatted entry (id
%lu)\n",
inst->inst_name, (u_long)temp_id, 0);
backentry_free( &ep );
@@ -2285,11 +2285,11 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
if (!run_from_cmdline) {
rc = dblayer_txn_begin(be, NULL, &txn);
if (0 != rc) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: ERROR: failed to begin txn for update
"
"index '%s'\n",
inst->inst_name, indexAttrs[j], 0);
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: Error %d: %s\n", inst->inst_name,
rc,
dblayer_strerror(rc));
if (task) {
@@ -2309,10 +2309,10 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
rc = index_addordel_values_sv(be, indexAttrs[j], svals, NULL,
ep->ep_id, BE_INDEX_ADD, &txn);
}
if (rc) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: ERROR: failed to update index
'%s'\n",
inst->inst_name, indexAttrs[j], 0);
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: Error %d: %s\n", inst->inst_name, rc,
dblayer_strerror(rc));
if (task) {
@@ -2330,11 +2330,11 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
if (!run_from_cmdline) {
rc = dblayer_txn_commit(be, &txn);
if (0 != rc) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: ERROR: failed to commit txn for "
"update index '%s'\n",
inst->inst_name, indexAttrs[j], 0);
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: Error %d: %s\n", inst->inst_name,
rc,
dblayer_strerror(rc));
if (task) {
@@ -2369,10 +2369,10 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
rc = dblayer_txn_begin(be, NULL, &txn);
if (0 != rc) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: ERROR: failed to begin txn for update index
'%s'\n",
inst->inst_name, ai, 0);
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: Error %d: %s\n", inst->inst_name, rc,
dblayer_strerror(rc));
if (task) {
@@ -2396,10 +2396,10 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
{
rc = dblayer_txn_commit(be, &txn);
if (0 != rc) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: ERROR: failed to commit txn for update index
'%s'\n",
inst->inst_name, ai, 0);
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: Error %d: %s\n", inst->inst_name, rc,
dblayer_strerror(rc));
if (task) {
@@ -2420,10 +2420,10 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
if (!entryrdn_get_noancestorid() && (index_ext &
DB2INDEX_ANCESTORID)) {
rc = ldbm_ancestorid_index_entry(be, ep, BE_INDEX_ADD, NULL);
if (rc != 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: ERROR: failed to update index
'ancestorid'\n",
inst->inst_name, 0, 0);
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: Error %d: %s\n", inst->inst_name, rc,
dblayer_strerror(rc));
if (task) {
@@ -2445,7 +2445,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
"%s: ERROR: failed to begin txn for update
"
"index 'entryrdn'\n",
inst->inst_name);
- LDAPDebug(LDAP_DEBUG_ANY, "%s: Error %d: %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: Error %d:
%s\n",
inst->inst_name, rc, dblayer_strerror(rc));
if (task) {
slapi_task_log_notice(task,
@@ -2459,10 +2459,10 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
}
rc = entryrdn_index_entry(be, ep, BE_INDEX_ADD, &txn);
if (rc) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: ERROR: failed to update index
'entryrdn'\n",
inst->inst_name, 0, 0);
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: Error %d: %s\n", inst->inst_name, rc,
dblayer_strerror(rc));
if (task) {
@@ -2484,7 +2484,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
"%s: ERROR: failed to commit txn for "
"update index 'entryrdn'\n",
inst->inst_name);
- LDAPDebug(LDAP_DEBUG_ANY, "%s: Error %d: %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: Error %d:
%s\n",
inst->inst_name, rc, dblayer_strerror(rc));
if (task) {
slapi_task_log_notice(task,
@@ -2519,7 +2519,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
slapi_task_log_notice(task, "%s: Indexed %d entries (%d%%).",
inst->inst_name, count, percent);
}
- LDAPDebug(LDAP_DEBUG_ANY, "%s: Indexed %d entries (%d%%).\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: Indexed %d entries
(%d%%).\n",
inst->inst_name, count, percent);
}
@@ -2546,7 +2546,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
slapi_task_log_notice(task, "%s: Finished indexing.",
inst->inst_name);
}
- LDAPDebug(LDAP_DEBUG_ANY, "%s: Finished indexing.\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: Finished indexing.\n",
inst->inst_name, 0, 0);
return_value = 0; /* success */
err_out:
@@ -2571,12 +2571,12 @@ err_min:
if (run_from_cmdline) {
if (0 != dblayer_flush(li)) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: Failed to flush database\n", inst->inst_name, 0,
0);
}
dblayer_instance_close(be);
if (0 != dblayer_close(li,DBLAYER_INDEX_MODE)) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: Failed to close database\n", inst->inst_name, 0,
0);
}
}
@@ -2589,7 +2589,7 @@ err_min:
slapi_ch_free((void **)&pvlv);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= ldbm_back_ldbm2index\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ldbm_back_ldbm2index\n", 0,
0, 0 );
return return_value;
}
diff --git a/ldap/servers/slapd/back-ldbm/misc.c b/ldap/servers/slapd/back-ldbm/misc.c
index 516b32d..d43f411 100644
--- a/ldap/servers/slapd/back-ldbm/misc.c
+++ b/ldap/servers/slapd/back-ldbm/misc.c
@@ -24,7 +24,7 @@ void ldbm_nasty(const char* str, int c, int err)
char buffer[200];
if (err == DB_LOCK_DEADLOCK) {
PR_snprintf(buffer,200,"%s WARNING %d",str,c);
- LDAPDebug(LDAP_DEBUG_BACKLDBM,"%s, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,"%s, err=%d %s\n",
buffer,err,(msg = dblayer_strerror( err )) ? msg : "");
} else if (err == DB_RUNRECOVERY) {
LDAPDebug2Args(LDAP_DEBUG_ANY, "FATAL ERROR at %s (%d); "
@@ -32,7 +32,7 @@ void ldbm_nasty(const char* str, int c, int err)
exit(1);
} else {
PR_snprintf(buffer,200,"%s BAD %d",str,c);
- LDAPDebug(LDAP_DEBUG_ANY, "%s, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s, err=%d %s\n",
buffer, err, (msg = dblayer_strerror( err )) ? msg : "");
}
}
@@ -328,7 +328,7 @@ mkdir_p(char *dir, unsigned int mode)
PR_Delete(dir);
if (PR_SUCCESS != PR_MkDir(dir, mode))
{
- LDAPDebug(LDAP_DEBUG_ANY, "mkdir_p %s: error %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "mkdir_p %s: error %d
(%s)\n",
dir, PR_GetError(),slapd_pr_strerror(PR_GetError()));
return -1;
}
@@ -364,7 +364,7 @@ mkdir_p(char *dir, unsigned int mode)
return rval;
if (PR_SUCCESS != PR_MkDir(dir, mode))
{
- LDAPDebug(LDAP_DEBUG_ANY, "mkdir_p %s: error %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "mkdir_p %s: error %d (%s)\n",
dir, PR_GetError(),slapd_pr_strerror(PR_GetError()));
return -1;
}
@@ -416,7 +416,7 @@ ldbm_txn_ruv_modify_context( Slapi_PBlock *pb, modify_context *mc )
if (NULL == bentry) {
/* Uh oh, we couldn't find and lock the RUV entry! */
- LDAPDebug( LDAP_DEBUG_ANY, "Error: ldbm_txn_ruv_modify_context failed to
retrieve and lock RUV entry\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: ldbm_txn_ruv_modify_context
failed to retrieve and lock RUV entry\n",
0, 0, 0 );
rc = -1;
goto done;
@@ -425,7 +425,7 @@ ldbm_txn_ruv_modify_context( Slapi_PBlock *pb, modify_context *mc )
modify_init( mc, bentry );
if (modify_apply_mods_ignore_error( mc, smods, LDAP_TYPE_OR_VALUE_EXISTS )) {
- LDAPDebug( LDAP_DEBUG_ANY, "Error: ldbm_txn_ruv_modify_context failed to
apply updates to RUV entry\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: ldbm_txn_ruv_modify_context
failed to apply updates to RUV entry\n",
0, 0, 0 );
rc = -1;
modify_term( mc, be );
diff --git a/ldap/servers/slapd/back-ldbm/nextid.c
b/ldap/servers/slapd/back-ldbm/nextid.c
index 69f41bb..c5d2573 100644
--- a/ldap/servers/slapd/back-ldbm/nextid.c
+++ b/ldap/servers/slapd/back-ldbm/nextid.c
@@ -26,7 +26,7 @@ next_id(backend *be)
/*Test if nextid hasn't been initialized. */
if (inst->inst_nextid < 1) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm backend instance: nextid not initialized... exiting.\n", 0,0,0);
exit(1);
}
@@ -42,13 +42,13 @@ next_id(backend *be)
/* if ID is above the threshold, the database may need rebuilding soon */
if (id >= ID_WARNING_THRESHOLD) {
if ( id >= MAXID ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm backend instance: FATAL ERROR: backend '%s' has no"
"IDs left. DATABASE MUST BE REBUILT.\n", be->be_name, 0,
0);
id = MAXID;
} else {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm backend instance: WARNING: backend '%s' may run out "
"of IDs. Please, rebuild database.\n", be->be_name, 0, 0);
}
@@ -66,7 +66,7 @@ next_id_return( backend *be, ID id )
/*Test if nextid hasn't been initialized. */
if (inst->inst_nextid < 1) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm backend instance: nextid not initialized... exiting\n", 0,0,0);
exit(1);
}
@@ -94,7 +94,7 @@ next_id_get( backend *be )
/*Test if nextid hasn't been initialized.*/
if (inst->inst_nextid < 1) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm backend instance: nextid not initialized... exiting\n", 0,0,0);
exit(1);
}
diff --git a/ldap/servers/slapd/back-ldbm/parents.c
b/ldap/servers/slapd/back-ldbm/parents.c
index 11ad17f..42f7b3e 100644
--- a/ldap/servers/slapd/back-ldbm/parents.c
+++ b/ldap/servers/slapd/back-ldbm/parents.c
@@ -99,7 +99,7 @@ parent_update_on_childchange(modify_context *mc,int op, size_t
*new_sub_count )
if (!already_present) {
/* This means that there was a conflict. Before coming to this point,
* the entry to be deleted was deleted... */
- LDAPDebug(LDAP_DEBUG_ANY, "Parent %s has no children. (op 0x%x, repl_op
0x%x)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Parent %s has no children. (op 0x%x, repl_op
0x%x)\n",
slapi_entry_get_dn(mc->old_entry->ep_entry), op, repl_op);
slapi_mods_free(&smods);
return -1;
diff --git a/ldap/servers/slapd/back-ldbm/rmdb.c b/ldap/servers/slapd/back-ldbm/rmdb.c
index 0f532c4..bd0930a 100644
--- a/ldap/servers/slapd/back-ldbm/rmdb.c
+++ b/ldap/servers/slapd/back-ldbm/rmdb.c
@@ -32,7 +32,7 @@ ldbm_back_rmdb( Slapi_PBlock *pb )
if (be->be_state != BE_STATE_STOPPED)
{
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"ldbm_back_cleanup: warning - backend is in a wrong state - %d\n",
be->be_state, 0, 0 );
return 0;
@@ -42,7 +42,7 @@ ldbm_back_rmdb( Slapi_PBlock *pb )
if (be->be_state != BE_STATE_STOPPED)
{
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"ldbm_back_cleanup: warning - backend is in a wrong state - %d\n",
be->be_state, 0, 0 );
PR_Unlock (be->be_state_lock);
diff --git a/ldap/servers/slapd/back-ldbm/seq.c b/ldap/servers/slapd/back-ldbm/seq.c
index 1cc7d19..faed008 100644
--- a/ldap/servers/slapd/back-ldbm/seq.c
+++ b/ldap/servers/slapd/back-ldbm/seq.c
@@ -87,11 +87,11 @@ ldbm_back_seq( Slapi_PBlock *pb )
/* get a database */
ainfo_get( be, attrname, &ai );
- LDAPDebug( LDAP_DEBUG_ARGS,
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG,
" seq: indextype: %s indexmask: 0x%x seek type: %d\n",
ai->ai_type, ai->ai_indexmask, type );
if ( ! (INDEX_EQUALITY & ai->ai_indexmask) ) {
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"seq: caller specified un-indexed attribute %s\n",
attrname ? attrname : "", 0, 0 );
slapi_send_ldap_result( pb, LDAP_UNWILLING_TO_PERFORM, NULL,
@@ -100,7 +100,7 @@ ldbm_back_seq( Slapi_PBlock *pb )
}
if ( (return_value = dblayer_get_index_file( be, ai, &db, DBOPEN_CREATE )) != 0 ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"<= ldbm_back_seq NULL (could not open index file for attribute
%s)\n",
attrname, 0, 0 );
slapi_send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL, NULL, 0, NULL );
@@ -275,9 +275,9 @@ retry:
{
if ( err != LDAP_SUCCESS )
{
- LDAPDebug( LDAP_DEBUG_ANY, "seq id2entry err %d\n", err, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "seq id2entry err %d\n", err, 0, 0
);
}
- LDAPDebug( LDAP_DEBUG_ARGS,
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG,
"ldbm_back_seq: candidate %lu not found\n",
(u_long)id, 0, 0 );
continue;
diff --git a/ldap/servers/slapd/back-ldbm/sort.c b/ldap/servers/slapd/back-ldbm/sort.c
index 3cd587b..e3ebe07 100644
--- a/ldap/servers/slapd/back-ldbm/sort.c
+++ b/ldap/servers/slapd/back-ldbm/sort.c
@@ -150,7 +150,7 @@ int sort_candidates(backend *be,int lookthrough_limit,time_t time_up,
Slapi_PBlo
}
/* we refuse to sort a candidate list which is vast */
if (ALLIDS(candidates)) {
- LDAPDebug( LDAP_DEBUG_TRACE, "Asked to sort ALLIDS candidate list,
refusing\n",0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "Asked to sort ALLIDS candidate list,
refusing\n",0, 0, 0 );
return LDAP_UNWILLING_TO_PERFORM;
}
@@ -160,7 +160,7 @@ int sort_candidates(backend *be,int lookthrough_limit,time_t time_up,
Slapi_PBlo
int return_value = 0;
return_value = attr_get_value_cmp_fn( &this_s->sattr,
&(this_s->compare_fn) );
if (return_value != 0 ) {
- LDAPDebug( LDAP_DEBUG_TRACE, "Attempting to sort a non-ordered attribute
(%s)\n",this_s->type, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "Attempting to sort a non-ordered
attribute (%s)\n",this_s->type, 0, 0 );
/* DBDB we should set the error type here */
return_value = LDAP_UNWILLING_TO_PERFORM;
*sort_error_type = this_s->type;
@@ -189,7 +189,7 @@ int sort_candidates(backend *be,int lookthrough_limit,time_t time_up,
Slapi_PBlo
bc.check_counter = 1;
return_value = slapd_qsort(&bc,candidates,s);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= Sorting done\n",0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= Sorting done\n",0, 0, 0 );
return return_value;
}
@@ -463,7 +463,7 @@ static int compare_entries_sv(ID *id_a, ID *id_b, sort_spec
*s,baggage_carrier *
a = id2entry(be,*id_a,&txn,&err);
if (NULL == a) {
if (0 != err ) {
- LDAPDebug(LDAP_DEBUG_TRACE,"compare_entries_sv db err %d\n",err,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"compare_entries_sv db err
%d\n",err,0,0);
}
/* Were up a creek without paddle here */
/* Best to log error and set some flag */
@@ -472,7 +472,7 @@ static int compare_entries_sv(ID *id_a, ID *id_b, sort_spec
*s,baggage_carrier *
b = id2entry(be,*id_b,&txn,&err);
if (NULL == b) {
if (0 != err ) {
- LDAPDebug(LDAP_DEBUG_TRACE,"compare_entries_sv db err %d\n",err,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"compare_entries_sv db err
%d\n",err,0,0);
}
CACHE_RETURN(&inst->inst_cache,&a);
return 0;
diff --git a/ldap/servers/slapd/back-ldbm/start.c b/ldap/servers/slapd/back-ldbm/start.c
index 299e5f0..99a1b53 100644
--- a/ldap/servers/slapd/back-ldbm/start.c
+++ b/ldap/servers/slapd/back-ldbm/start.c
@@ -61,13 +61,13 @@ ldbm_back_start( Slapi_PBlock *pb )
PRUint64 memsize = pages * pagesize;
#endif
- LDAPDebug( LDAP_DEBUG_TRACE, "ldbm backend starting\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ldbm backend starting\n", 0, 0, 0 );
slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &li );
/* parse the config file here */
if (0 != ldbm_config_load_dse_info(li)) {
- LDAPDebug( LDAP_DEBUG_ANY, "start: Loading database configuration
failed\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "start: Loading database configuration
failed\n",
0, 0, 0 );
return SLAPI_FAIL_GENERAL;
}
@@ -77,7 +77,7 @@ ldbm_back_start( Slapi_PBlock *pb )
if ( slapi_reslimit_register( SLAPI_RESLIMIT_TYPE_INT,
LDBM_LOOKTHROUGHLIMIT_AT, &li->li_reslimit_lookthrough_handle )
!= SLAPI_RESLIMIT_STATUS_SUCCESS ) {
- LDAPDebug( LDAP_DEBUG_ANY, "start: Resource limit registration failed for
lookthroughlimit\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "start: Resource limit registration failed
for lookthroughlimit\n",
0, 0, 0 );
return SLAPI_FAIL_GENERAL;
}
@@ -87,7 +87,7 @@ ldbm_back_start( Slapi_PBlock *pb )
if ( slapi_reslimit_register( SLAPI_RESLIMIT_TYPE_INT,
LDBM_ALLIDSLIMIT_AT, &li->li_reslimit_allids_handle )
!= SLAPI_RESLIMIT_STATUS_SUCCESS ) {
- LDAPDebug( LDAP_DEBUG_ANY, "start: Resource limit registration failed for
allidslimit\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "start: Resource limit registration failed
for allidslimit\n",
0, 0, 0 );
return SLAPI_FAIL_GENERAL;
}
@@ -97,7 +97,7 @@ ldbm_back_start( Slapi_PBlock *pb )
if ( slapi_reslimit_register( SLAPI_RESLIMIT_TYPE_INT,
LDBM_PAGEDLOOKTHROUGHLIMIT_AT,
&li->li_reslimit_pagedlookthrough_handle )
!= SLAPI_RESLIMIT_STATUS_SUCCESS ) {
- LDAPDebug( LDAP_DEBUG_ANY, "start: Resource limit registration failed for
pagedlookthroughlimit\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "start: Resource limit registration failed
for pagedlookthroughlimit\n",
0, 0, 0 );
return SLAPI_FAIL_GENERAL;
}
@@ -107,7 +107,7 @@ ldbm_back_start( Slapi_PBlock *pb )
if ( slapi_reslimit_register( SLAPI_RESLIMIT_TYPE_INT,
LDBM_PAGEDALLIDSLIMIT_AT, &li->li_reslimit_pagedallids_handle )
!= SLAPI_RESLIMIT_STATUS_SUCCESS ) {
- LDAPDebug( LDAP_DEBUG_ANY, "start: Resource limit registration failed for
pagedallidslimit\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "start: Resource limit registration failed
for pagedallidslimit\n",
0, 0, 0 );
return SLAPI_FAIL_GENERAL;
}
@@ -116,7 +116,7 @@ ldbm_back_start( Slapi_PBlock *pb )
if ( slapi_reslimit_register( SLAPI_RESLIMIT_TYPE_INT,
LDBM_RANGELOOKTHROUGHLIMIT_AT,
&li->li_reslimit_rangelookthrough_handle )
!= SLAPI_RESLIMIT_STATUS_SUCCESS ) {
- LDAPDebug( LDAP_DEBUG_ANY, "start: Resource limit registration failed for
rangelookthroughlimit\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "start: Resource limit registration failed
for rangelookthroughlimit\n",
0, 0, 0 );
return SLAPI_FAIL_GENERAL;
}
@@ -138,11 +138,11 @@ ldbm_back_start( Slapi_PBlock *pb )
(li->li_import_cache_autosize > 100) ||
((li->li_cache_autosize > 0) && (li->li_import_cache_autosize >
0) &&
(li->li_cache_autosize + li->li_import_cache_autosize > 100))) {
- LDAPDebug( LDAP_DEBUG_ANY, "cache autosizing: bad settings, "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cache autosizing: bad settings, "
"value or sum of values can not larger than 100.\n", 0, 0, 0 );
} else {
if (util_info_sys_pages(&pagesize, &pages, &procpages, &availpages)
!= 0) {
- LDAPDebug( LDAP_DEBUG_ANY, "start: Unable to determine system page
limits\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "start: Unable to determine system page
limits\n",
0, 0, 0 );
return SLAPI_FAIL_GENERAL;
}
@@ -157,25 +157,25 @@ ldbm_back_start( Slapi_PBlock *pb )
cache_size = (PRUint64)cache_get_max_size(&(inst->inst_cache));
db_size = dblayer_get_id2entry_size(inst);
if (cache_size < db_size) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"WARNING: %s: entry cache size %llu B is "
"less than db size %llu B; "
"We recommend to increase the entry cache size
"
"nsslapd-cachememsize.\n",
inst->inst_name, cache_size, db_size);
} else {
- LDAPDebug(LDAP_DEBUG_BACKLDBM,
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"%s: entry cache size: %llu B; db size: %llu
B\n",
inst->inst_name, cache_size, db_size);
}
/* Get the dn_cachesize */
dncache_size =
(PRUint64)cache_get_max_size(&(inst->inst_dncache));
total_cache_size += cache_size + dncache_size;
- LDAPDebug(LDAP_DEBUG_BACKLDBM,
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"total cache size: %llu B; \n",
total_cache_size, 0 ,0 );
}
- LDAPDebug(LDAP_DEBUG_BACKLDBM,
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"Total entry cache size: %llu B; "
"dbcache size: %llu B; "
"available memory size: %llu B; \n",
@@ -195,8 +195,8 @@ ldbm_back_start( Slapi_PBlock *pb )
/* In the case it is not, this will *reduce* the allocation */
issane = util_is_cachesize_sane(&zone_size);
if (!issane) {
- LDAPDebug(LDAP_DEBUG_ANY, "Your autosized cache values have been
reduced. Likely your nsslapd-cache-autosize percentage is too high.\n", 0,0,0);
- LDAPDebug(LDAP_DEBUG_ANY, msg, 0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Your autosized cache values
have been reduced. Likely your nsslapd-cache-autosize percentage is too high.\n",
0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, msg, 0,0,0);
}
/* It's valid, lets divide it up and set according to user prefs */
zone_pages = zone_size / pagesize;
@@ -205,11 +205,11 @@ ldbm_back_start( Slapi_PBlock *pb )
/* We update this for the is-sane check below. */
total_cache_size = (zone_pages - db_pages) * pagesize;
- LDAPDebug(LDAP_DEBUG_ANY, "cache autosizing. found %dk physical
memory\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cache autosizing. found %dk
physical memory\n",
pages*(pagesize/1024), 0, 0);
- LDAPDebug(LDAP_DEBUG_ANY, "cache autosizing. found %dk
avaliable\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cache autosizing. found %dk
avaliable\n",
zone_pages*(pagesize/1024), 0, 0);
- LDAPDebug(LDAP_DEBUG_ANY, "cache autosizing: db cache: %dk, "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cache autosizing: db cache: %dk,
"
"each entry cache (%d total): %dk\n",
db_pages*(pagesize/1024), objset_size(li->li_instance_set),
entry_pages*(pagesize/1024));
@@ -247,11 +247,11 @@ ldbm_back_start( Slapi_PBlock *pb )
import_size = import_pages * pagesize;
issane = util_is_cachesize_sane(&import_size);
if (!issane) {
- LDAPDebug(LDAP_DEBUG_ANY, "Your autosized import cache values have
been reduced. Likely your nsslapd-import-cache-autosize percentage is too high.\n",
0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Your autosized import cache
values have been reduced. Likely your nsslapd-import-cache-autosize percentage is too
high.\n", 0,0,0);
}
/* We just accept the reduced allocation here. */
import_pages = import_size / pagesize;
- LDAPDebug(LDAP_DEBUG_ANY, "cache autosizing: import cache: %dk
\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cache autosizing: import cache:
%dk \n",
import_pages*(pagesize/1024), NULL, NULL);
sprintf(s, "%lu", (unsigned long)(import_pages * pagesize));
@@ -266,9 +266,9 @@ ldbm_back_start( Slapi_PBlock *pb )
issane = util_is_cachesize_sane(&total_size);
if (!issane) {
/* Right, it's time to panic */
- LDAPDebug( LDAP_DEBUG_ANY, "CRITICAL: It is highly likely your memory
configuration of all backends will EXCEED your systems memory.\n", 0, 0, 0 );
- LDAPDebug( LDAP_DEBUG_ANY, "CRITICAL: In a future release this WILL prevent
server start up. You MUST alter your configuration.\n", 0, 0, 0 );
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "CRITICAL: It is highly likely your memory
configuration of all backends will EXCEED your systems memory.\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "CRITICAL: In a future release this WILL
prevent server start up. You MUST alter your configuration.\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Total entry cache size: %llu B; "
"dbcache size: %llu B; "
"available memory size: %llu B; \n",
@@ -278,7 +278,7 @@ ldbm_back_start( Slapi_PBlock *pb )
(PRUint64)total_cache_size, (PRUint64)li->li_dbcachesize, memsize
#endif
);
- LDAPDebug(LDAP_DEBUG_ANY, msg, 0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, msg, 0,0,0);
/* WB 2016 - This should be UNCOMMENTED in a future release */
/* return SLAPI_FAIL_GENERAL; */
}
@@ -288,7 +288,7 @@ ldbm_back_start( Slapi_PBlock *pb )
retval = check_db_version(li, &action);
if (0 != retval)
{
- LDAPDebug( LDAP_DEBUG_ANY, "start: db version is not supported\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "start: db version is not
supported\n",
0, 0, 0);
return SLAPI_FAIL_GENERAL;
}
@@ -304,7 +304,7 @@ ldbm_back_start( Slapi_PBlock *pb )
}
if (0 != retval) {
char *msg;
- LDAPDebug( LDAP_DEBUG_ANY, "start: Failed to init database, err=%d
%s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "start: Failed to init database, err=%d
%s\n",
retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) return return_on_disk_full(li);
else return SLAPI_FAIL_GENERAL;
@@ -314,12 +314,12 @@ ldbm_back_start( Slapi_PBlock *pb )
retval = ldbm_instance_startall(li);
if (0 != retval) {
char *msg;
- LDAPDebug( LDAP_DEBUG_ANY, "start: Failed to start databases, err=%d
%s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "start: Failed to start databases, err=%d
%s\n",
retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) return return_on_disk_full(li);
else {
if ((li->li_cache_autosize > 0) && (li->li_cache_autosize <=
100)) {
- LDAPDebug( LDAP_DEBUG_ANY, "Failed to allocate %d byte dbcache. "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to allocate %d byte dbcache.
"
"Please reduce the value of %s and restart the server.\n",
li->li_dbcachesize, CONFIG_CACHE_AUTOSIZE, 0);
}
@@ -348,7 +348,7 @@ ldbm_back_start( Slapi_PBlock *pb )
/* initialize the USN counter */
ldbm_usn_init(li);
- LDAPDebug( LDAP_DEBUG_TRACE, "ldbm backend done starting\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ldbm backend done starting\n", 0, 0,
0 );
return( 0 );
diff --git a/ldap/servers/slapd/back-ldbm/uniqueid2entry.c
b/ldap/servers/slapd/back-ldbm/uniqueid2entry.c
index 84d8c4e..00972ca 100644
--- a/ldap/servers/slapd/back-ldbm/uniqueid2entry.c
+++ b/ldap/servers/slapd/back-ldbm/uniqueid2entry.c
@@ -35,7 +35,7 @@ uniqueid2entry(
IDList *idl = NULL;
struct backentry *e = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> uniqueid2entry \"%s\"\n",
uniqueid,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> uniqueid2entry
\"%s\"\n", uniqueid,
0, 0 );
#ifdef UUIDCACHE_ON
e = cache_find_uuid(&inst->inst_cache, uniqueid);
@@ -78,6 +78,6 @@ ext:
slapi_ch_free( (void**)&idl);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= uniqueid2entry %p\n", e, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= uniqueid2entry %p\n", e, 0, 0
);
return( e );
}
diff --git a/ldap/servers/slapd/back-ldbm/upgrade.c
b/ldap/servers/slapd/back-ldbm/upgrade.c
index 6953117..762065b 100644
--- a/ldap/servers/slapd/back-ldbm/upgrade.c
+++ b/ldap/servers/slapd/back-ldbm/upgrade.c
@@ -147,7 +147,7 @@ check_db_version( struct ldbminfo *li, int *action )
value = lookup_dbversion( ldbmversion, DBVERSION_TYPE | DBVERSION_ACTION );
if ( !value )
{
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: Database version mismatch (expecting "
"'%s' but found '%s' in directory %s)\n",
LDBM_VERSION, ldbmversion, li->li_directory );
@@ -231,7 +231,7 @@ check_db_inst_version( ldbm_instance *inst )
value = lookup_dbversion( ldbmversion, DBVERSION_TYPE | DBVERSION_ACTION );
if ( !value )
{
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: Database version mismatch (expecting "
"'%s' but found '%s' in directory %s)\n",
LDBM_VERSION, ldbmversion, inst->inst_dir_name );
@@ -307,7 +307,7 @@ adjust_idl_switch(char *ldbmversion, struct ldbminfo *li)
if (!idl_get_idl_new()) /* config: old idl */
{
replace_ldbm_config_value(CONFIG_IDL_SWITCH, "new", li);
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: Dbversion %s does not meet nsslapd-idl-switch:
\"old\"; "
"nsslapd-idl-switch is updated to \"new\"\n",
ldbmversion, 0, 0);
}
@@ -320,7 +320,7 @@ adjust_idl_switch(char *ldbmversion, struct ldbminfo *li)
if (idl_get_idl_new()) /* config: new */
{
replace_ldbm_config_value(CONFIG_IDL_SWITCH, "old", li);
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: Dbversion %s does not meet nsslapd-idl-switch:
\"new\"; "
"nsslapd-idl-switch is updated to \"old\"\n",
ldbmversion, 0, 0);
@@ -328,7 +328,7 @@ adjust_idl_switch(char *ldbmversion, struct ldbminfo *li)
}
else
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: Dbversion %s is not supported\n",
ldbmversion, 0, 0);
rval = -1;
@@ -357,7 +357,7 @@ int ldbm_upgrade(ldbm_instance *inst, int action)
rval = dblayer_update_db_ext(inst, LDBM_SUFFIX_OLD, LDBM_SUFFIX);
if (0 == rval)
{
- LDAPDebug(LDAP_DEBUG_ANY, "ldbm_upgrade: "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_upgrade: "
"Upgrading instance %s supporting bdb %d.%d "
"was successfully done.\n",
inst->inst_name, DB_VERSION_MAJOR, DB_VERSION_MINOR);
@@ -390,7 +390,7 @@ static int upgrade_db_3x_40(backend *be)
static char* indexes_modified[] = {"parentid", "numsubordinates",
NULL};
- LDAPDebug( LDAP_DEBUG_ANY, "WARNING: Detected a database older than this server,
upgrading data...\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "WARNING: Detected a database older than this
server, upgrading data...\n",0,0,0);
dblayer_txn_init(li,&txn);
ret = dblayer_txn_begin(li,NULL,&txn);
@@ -430,9 +430,9 @@ error:
}
}
if (0 == ret) {
- LDAPDebug( LDAP_DEBUG_ANY, "...upgrade complete.\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "...upgrade complete.\n",0,0,0);
} else {
- LDAPDebug( LDAP_DEBUG_ANY, "ERROR: Attempt to upgrade the older database
FAILED.\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: Attempt to upgrade the older
database FAILED.\n",0,0,0);
}
return ret;
}
diff --git a/ldap/servers/slapd/back-ldbm/vlv.c b/ldap/servers/slapd/back-ldbm/vlv.c
index 7f210e3..2f5ace4 100644
--- a/ldap/servers/slapd/back-ldbm/vlv.c
+++ b/ldap/servers/slapd/back-ldbm/vlv.c
@@ -107,7 +107,7 @@ int vlv_DeleteSearchEntry(Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entr
if (instance_set_busy(inst) != 0)
{
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Backend instance: '%s' is already in the middle of "
"another task and cannot be disturbed.\n",
inst->inst_name, 0, 0);
@@ -118,7 +118,7 @@ int vlv_DeleteSearchEntry(Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entr
p = vlvSearch_finddn((struct vlvSearch *)be->vlvSearchList,
slapi_entry_get_sdn(entryBefore));
if(p!=NULL)
{
- LDAPDebug( LDAP_DEBUG_ANY, "Deleted Virtual List View Search (%s).\n",
p->vlv_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Deleted Virtual List View Search
(%s).\n", p->vlv_name, 0, 0);
vlvSearch_removefromlist((struct vlvSearch
**)&be->vlvSearchList,p->vlv_dn);
vlvSearch_delete(&p);
}
@@ -134,13 +134,13 @@ int vlv_DeleteIndexEntry(Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry
{
ldbm_instance *inst = (ldbm_instance*)arg;
if (inst && is_instance_busy(inst)) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Backend instance: '%s' is already in the middle of
"
"another task and cannot be disturbed.\n",
inst->inst_name, 0, 0);
return SLAPI_DSE_CALLBACK_ERROR;
} else {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Deleted Virtual List View Index.\n", 0, 0, 0);
return SLAPI_DSE_CALLBACK_OK;
}
@@ -158,7 +158,7 @@ int vlv_ModifySearchEntry(Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entr
p= vlvSearch_finddn((struct vlvSearch *)be->vlvSearchList,
slapi_entry_get_sdn(entryBefore));
if(p!=NULL)
{
- LDAPDebug( LDAP_DEBUG_ANY, "Modified Virtual List View Search (%s), which
will be enabled when the database is rebuilt.\n", p->vlv_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Modified Virtual List View Search (%s),
which will be enabled when the database is rebuilt.\n", p->vlv_name, 0, 0);
}
slapi_rwlock_unlock(be->vlvSearchList_lock);
return SLAPI_DSE_CALLBACK_DO_NOT_APPLY;
@@ -169,7 +169,7 @@ int vlv_ModifySearchEntry(Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entr
int vlv_ModifyIndexEntry(Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
entryAfter, int *returncode, char *returntext, void *arg)
{
- LDAPDebug( LDAP_DEBUG_ANY, "Modified Virtual List View Index.\n", 0, 0,
0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Modified Virtual List View Index.\n",
0, 0, 0);
return SLAPI_DSE_CALLBACK_DO_NOT_APPLY;
}
@@ -185,7 +185,7 @@ int vlv_ModifyRDNSearchEntry(Slapi_PBlock *pb, Slapi_Entry*
entryBefore, Slapi_E
p= vlvSearch_finddn((struct vlvSearch *)be->vlvSearchList,
slapi_entry_get_sdn(entryBefore));
if(p!=NULL)
{
- LDAPDebug( LDAP_DEBUG_ANY, "Modified Virtual List View Search (%s), which
will be enabled when the database is rebuilt.\n", p->vlv_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Modified Virtual List View Search (%s),
which will be enabled when the database is rebuilt.\n", p->vlv_name, 0, 0);
}
slapi_rwlock_unlock(be->vlvSearchList_lock);
return SLAPI_DSE_CALLBACK_DO_NOT_APPLY;
@@ -196,7 +196,7 @@ int vlv_ModifyRDNSearchEntry(Slapi_PBlock *pb, Slapi_Entry*
entryBefore, Slapi_E
int vlv_ModifyRDNIndexEntry(Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
entryAfter, int *returncode, char *returntext, void *arg)
{
- LDAPDebug( LDAP_DEBUG_ANY, "Modified Virtual List View Index.\n", 0, 0,
0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Modified Virtual List View Index.\n",
0, 0, 0);
return SLAPI_DSE_CALLBACK_DO_NOT_APPLY;
}
@@ -244,7 +244,7 @@ vlv_init_index_entry(Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry* en
slapi_sdn_get_parent(slapi_entry_get_sdn(entryBefore),&parentdn);
pSearch= vlvSearch_finddn((struct vlvSearch *)be->vlvSearchList,
&parentdn);
if (pSearch == NULL) {
- LDAPDebug( LDAP_DEBUG_ANY, "Parent doesn't exist for entry %s.\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Parent doesn't exist for entry
%s.\n",
slapi_entry_get_dn(entryBefore), 0, 0);
vlvIndex_delete(&newVlvIndex);
}
@@ -339,7 +339,7 @@ vlv_init(ldbm_instance *inst)
backend *be = NULL;
if (!inst) {
- LDAPDebug(LDAP_DEBUG_ANY, "vlv_init: invalid instance.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "vlv_init: invalid instance.\n", 0,
0, 0);
return_value = LDAP_OPERATIONS_ERROR;
goto out;
}
@@ -738,7 +738,7 @@ do_vlv_update_index(back_txn *txn, struct ldbminfo *li, Slapi_PBlock
*pb, struct
rc = dblayer_get_index_file(be, pIndex->vlv_attrinfo, &db, DBOPEN_CREATE);
if (rc != 0) {
if(rc != DB_LOCK_DEADLOCK)
- LDAPDebug(LDAP_DEBUG_ANY, "VLV: can't get index file '%s' (err
%d)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "VLV: can't get index file
'%s' (err %d)\n",
pIndex->vlv_attrinfo->ai_type, rc, 0);
return rc;
}
@@ -756,7 +756,7 @@ do_vlv_update_index(back_txn *txn, struct ldbminfo *li, Slapi_PBlock
*pb, struct
data.data = &entry->ep_id;
rc = db->put(db, db_txn, &key->key, &data, 0);
if (rc == 0) {
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"vlv_update_index: %s Insert %s ID=%lu\n",
pIndex->vlv_name, key->key.data, (u_long)entry->ep_id);
vlvIndex_increment_indexlength(pIndex, db, txn);
@@ -765,12 +765,12 @@ do_vlv_update_index(back_txn *txn, struct ldbminfo *li, Slapi_PBlock
*pb, struct
} else if(rc != DB_LOCK_DEADLOCK) {
/* jcm: This error is valid if the key already exists.
* Identical multi valued attr values could do this. */
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"vlv_update_index: %s Insert %s ID=%lu FAILED\n",
pIndex->vlv_name, key->key.data, (u_long)entry->ep_id);
}
} else {
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"vlv_update_index: %s Delete %s\n",
pIndex->vlv_name, key->key.data, 0);
rc = db->del(db, db_txn, &key->key, 0);
@@ -779,7 +779,7 @@ do_vlv_update_index(back_txn *txn, struct ldbminfo *li, Slapi_PBlock
*pb, struct
} else if (rc == DB_RUNRECOVERY) {
ldbm_nasty(pIndex->vlv_name,78,rc);
} else if (rc != DB_LOCK_DEADLOCK) {
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"vlv_update_index: %s Delete %s FAILED\n",
pIndex->vlv_name, key->key.data, 0);
}
@@ -916,7 +916,7 @@ determine_result_range(const struct vlv_request *vlv_request_control,
PRUint32 i
*pstop= length - 1;
}
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= vlv_determine_result_range: Result Range
%lu-%lu\n", *pstart, *pstop, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= vlv_determine_result_range: Result
Range %lu-%lu\n", *pstart, *pstop, 0 );
}
/*
@@ -1016,7 +1016,7 @@ vlv_build_candidate_list_byvalue( struct vlvIndex* p, DBC *dbc,
PRUint32 length,
/* Records are numbered from one. */
si--;
slapi_ch_free(&(data.data));
- LDAPDebug( LDAP_DEBUG_TRACE, "<= vlv_build_candidate_list_byvalue:
Found. Index=%lu\n",si,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
vlv_build_candidate_list_byvalue: Found. Index=%lu\n",si,0,0);
}
else
{
@@ -1037,7 +1037,7 @@ vlv_build_candidate_list_byvalue( struct vlvIndex* p, DBC *dbc,
PRUint32 length,
{
si = length - 1;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= vlv_build_candidate_list_byvalue: Not
Found. Index=%lu\n",si,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
vlv_build_candidate_list_byvalue: Not Found. Index=%lu\n",si,0,0);
}
if (key.data != typedown_value[0]->bv_val) { /* in case new key is set
in dbc->c_get(DB_SET_RANGE) */
@@ -1086,10 +1086,10 @@ int vlv_build_idl(PRUint32 start, PRUint32 stop, DB *db, DBC
*dbc,
}
if (err != 0) {
/* some db error...? */
- LDAPDebug(LDAP_DEBUG_ANY, "vlv_build_idl: can't follow db cursor "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "vlv_build_idl: can't follow db
cursor "
"(err %d)\n", err, 0, 0);
if (err == ENOMEM)
- LDAPDebug(LDAP_DEBUG_ANY, " nomem: wants %d key, %d data\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, " nomem: wants %d key, %d
data\n",
key.size, data.size, 0);
rc = LDAP_OPERATIONS_ERROR;
goto error;
@@ -1195,7 +1195,7 @@ vlv_build_candidate_list( backend *be, struct vlvIndex* p, const
struct vlv_requ
int do_trim= 1;
DB_TXN *db_txn = NULL;
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"=> vlv_build_candidate_list: %s %s Using VLV Index %s\n",
slapi_sdn_get_dn(vlvIndex_getBase(p)), p->vlv_search->vlv_filter,
vlvIndex_getName(p));
@@ -1208,7 +1208,7 @@ vlv_build_candidate_list( backend *be, struct vlvIndex* p, const
struct vlv_requ
rc = dblayer_get_index_file(be, p->vlv_attrinfo, &db, 0);
if (rc != 0) {
/* shouldn't happen */
- LDAPDebug(LDAP_DEBUG_ANY, "VLV: can't get index file '%s' (err
%d)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "VLV: can't get index file
'%s' (err %d)\n",
p->vlv_attrinfo->ai_type, rc, 0);
if (is_srchlist_locked) {
slapi_rwlock_unlock(be->vlvSearchList_lock);
@@ -1230,7 +1230,7 @@ vlv_build_candidate_list( backend *be, struct vlvIndex* p, const
struct vlv_requ
err = db->cursor(db, db_txn, &dbc, 0);
if (err != 0) {
/* shouldn't happen */
- LDAPDebug(LDAP_DEBUG_ANY, "VLV: couldn't get cursor (err %d)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "VLV: couldn't get cursor (err
%d)\n",
rc, 0, 0);
return -1;
}
@@ -1304,7 +1304,7 @@ vlv_filter_candidates(backend *be, Slapi_PBlock *pb, const IDList
*candidates, c
return LDAP_UNWILLING_TO_PERFORM;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "=> vlv_filter_candidates: Filtering %lu
Candidates\n",(u_long)candidates->b_nids, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> vlv_filter_candidates: Filtering %lu
Candidates\n",(u_long)candidates->b_nids, 0, 0 );
if (0 == return_value && candidates->b_nids>0)
{
@@ -1335,7 +1335,7 @@ vlv_filter_candidates(backend *be, Slapi_PBlock *pb, const IDList
*candidates, c
*/
if(!(ALLIDS(candidates) && err==DB_NOTFOUND))
{
- LDAPDebug( LDAP_DEBUG_ANY, "vlv_filter_candidates: Candidate
%lu not found err=%d\n", (u_long)id, err, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "vlv_filter_candidates:
Candidate %lu not found err=%d\n", (u_long)id, err, 0 );
}
}
else
@@ -1346,7 +1346,7 @@ vlv_filter_candidates(backend *be, Slapi_PBlock *pb, const IDList
*candidates, c
if ( slapi_filter_test( pb, e->ep_entry, filter, 0 /* No ACL
Check */) == 0 )
{
/* The entry passed the filter test, add the id to the list
*/
- LDAPDebug( LDAP_DEBUG_TRACE, "vlv_filter_candidates:
Candidate %lu Passed Filter\n", (u_long)id, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"vlv_filter_candidates: Candidate %lu Passed Filter\n", (u_long)id, 0, 0 );
idl_append(resultIdl,id);
}
}
@@ -1377,7 +1377,7 @@ vlv_filter_candidates(backend *be, Slapi_PBlock *pb, const IDList
*candidates, c
}
*filteredCandidates= resultIdl;
- LDAPDebug( LDAP_DEBUG_TRACE, "<= vlv_filter_candidates: Filtering
done\n",0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= vlv_filter_candidates: Filtering
done\n",0, 0, 0 );
return return_value;
}
@@ -1449,12 +1449,12 @@ vlv_trim_candidates_txn(backend *be, const IDList *candidates,
const sort_spec*
PRUint32 cursor= 0;
for(cursor=start;cursor<=stop;cursor++)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "vlv_trim_candidates: Include ID
%lu\n",(u_long)candidates->b_ids[cursor], 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "vlv_trim_candidates: Include ID
%lu\n",(u_long)candidates->b_ids[cursor], 0, 0 );
idl_append(resultIdl,candidates->b_ids[cursor]);
}
}
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= vlv_trim_candidates: Trimmed list contains
%lu entries.\n", (u_long)(resultIdl ? resultIdl->b_nids : 0), 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= vlv_trim_candidates: Trimmed list
contains %lu entries.\n", (u_long)(resultIdl ? resultIdl->b_nids : 0), 0, 0 );
*trimmedCandidates= resultIdl;
return return_value;
}
@@ -1476,7 +1476,7 @@ static PRUint32
vlv_trim_candidates_byindex(PRUint32 length, const struct vlv_request
*vlv_request_control)
{
PRUint32 si= 0; /* The Selected Index */
- LDAPDebug( LDAP_DEBUG_TRACE, "=> vlv_trim_candidates_byindex: length=%u index=%d
size=%d\n",length, vlv_request_control->index,
vlv_request_control->contentCount );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> vlv_trim_candidates_byindex:
length=%u index=%d size=%d\n",length, vlv_request_control->index,
vlv_request_control->contentCount );
if(vlv_request_control->index==0)
{
/* Always select the first entry in the list */
@@ -1523,7 +1523,7 @@ vlv_trim_candidates_byindex(PRUint32 length, const struct
vlv_request *vlv_reque
}
}
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= vlv_trim_candidates_byindex: Selected Index
%lu\n",si, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= vlv_trim_candidates_byindex: Selected
Index %lu\n",si, 0, 0 );
return si;
}
@@ -1565,7 +1565,7 @@ vlv_trim_candidates_byvalue(backend *be, const IDList *candidates,
const sort_sp
invalue[1]= NULL;
slapi_attr_values2keys(&sort_control->sattr,invalue,&typedown_value,LDAP_FILTER_EQUALITY);
/* JCM SLOW FUNCTION */
if (compare_fn == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "vlv_trim_candidates_byvalue: "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "vlv_trim_candidates_byvalue:
"
"attempt to compare an unordered attribute",
0, 0, 0);
compare_fn = slapi_berval_cmp;
@@ -1582,7 +1582,7 @@ retry:
* Perform a binary search over the candidate list
*/
if (0 == candidates->b_nids) { /* idlist is empty */
- LDAPDebug( LDAP_DEBUG_ANY, "vlv_trim_candidates_byvalue: Candidate ID List
is empty.\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "vlv_trim_candidates_byvalue: Candidate
ID List is empty.\n", 0, 0, 0 );
ber_bvecfree((struct berval**)typedown_value);
return candidates->b_nids; /* not found */
}
@@ -1604,7 +1604,7 @@ retry:
if ( e == NULL )
{
int rval;
- LDAPDebug( LDAP_DEBUG_ANY, "vlv_trim_candidates_byvalue: "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "vlv_trim_candidates_byvalue: "
"Candidate ID %lu not found err=%d\n", (u_long)id, err, 0
);
rval = idl_delete((IDList **)&candidates, id);
if (0 == rval || 1 == rval || 2 == rval) {
@@ -1698,12 +1698,12 @@ retry:
if(si==candidates->b_nids && !match)
{
/* Couldn't find an entry which matches the value, so return
contentCount */
- LDAPDebug( LDAP_DEBUG_TRACE, "<= vlv_trim_candidates_byvalue:
Not Found. Index %lu\n",si, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
vlv_trim_candidates_byvalue: Not Found. Index %lu\n",si, 0, 0 );
si= candidates->b_nids;
}
else
{
- LDAPDebug( LDAP_DEBUG_TRACE, "<= vlv_trim_candidates_byvalue:
Found. Index %lu\n",si, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
vlv_trim_candidates_byvalue: Found. Index %lu\n",si, 0, 0 );
}
}
CACHE_RETURN(&(((ldbm_instance
*)be->be_instance_info)->inst_cache),
@@ -1771,7 +1771,7 @@ vlv_make_response_control (Slapi_PBlock *pb, const struct
vlv_response* vlvp)
ber_bvfree(bvp);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= vlv_make_response_control: Index=%d Size=%d
Result=%d\n", vlvp->targetPosition, vlvp->contentCount, vlvp->result );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= vlv_make_response_control: Index=%d
Size=%d Result=%d\n", vlvp->targetPosition, vlvp->contentCount, vlvp->result
);
return (rc==-1?LDAP_OPERATIONS_ERROR:LDAP_SUCCESS);
}
@@ -1877,7 +1877,7 @@ vlv_parse_request_control( backend *be, struct berval
*vlv_spec_ber,struct vlv_r
}
else
{
- LDAPDebug( LDAP_DEBUG_TRACE, "vlv_parse_request_control: Before=%d
After=%d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "vlv_parse_request_control: Before=%d
After=%d\n",
vlvp->beforeCount, vlvp->afterCount, 0 );
if (ber_scanf(ber,"t",&vlvp->tag) == LBER_ERROR)
{
@@ -1905,7 +1905,7 @@ vlv_parse_request_control( backend *be, struct berval
*vlv_spec_ber,struct vlv_r
{
vlvp->index--;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "vlv_parse_request_control:
Index=%d Content=%d\n", vlvp->index, vlvp->contentCount, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"vlv_parse_request_control: Index=%d Content=%d\n", vlvp->index,
vlvp->contentCount, 0 );
}
break;
case LDAP_TAG_VLV_BY_VALUE:
@@ -1924,7 +1924,7 @@ vlv_parse_request_control( backend *be, struct berval
*vlv_spec_ber,struct vlv_r
char *p= slapi_ch_malloc(vlvp->value.bv_len+1);
strncpy(p,vlvp->value.bv_val,vlvp->value.bv_len);
p[vlvp->value.bv_len]= '\0';
- LDAPDebug( LDAP_DEBUG_TRACE, "vlv_parse_request_control:
Value=%s\n", p, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"vlv_parse_request_control: Value=%s\n", p, 0, 0 );
slapi_ch_free( (void**)&p);
}
break;
@@ -1988,7 +1988,7 @@ IDList *vlv_find_index_by_filter_txn(struct backend *be, const char
*base,
}
if (!vi) {
/* no match */
- LDAPDebug(LDAP_DEBUG_TRACE, "vlv: no index online for %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "vlv: no index online for %s\n",
t->vlv_filter, 0, 0);
slapi_rwlock_unlock(be->vlvSearchList_lock);
return NULL;
@@ -2001,7 +2001,7 @@ IDList *vlv_find_index_by_filter_txn(struct backend *be, const char
*base,
if (err == 0) {
if (length == 0) /* 609377: index size could be 0 */
{
- LDAPDebug(LDAP_DEBUG_TRACE, "vlv: index %s is empty\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "vlv: index %s is empty\n",
t->vlv_filter, 0, 0);
idl = NULL;
}
@@ -2015,7 +2015,7 @@ IDList *vlv_find_index_by_filter_txn(struct backend *be, const char
*base,
if (err == 0) {
return idl;
} else {
- LDAPDebug(LDAP_DEBUG_ANY, "vlv find index: err %d\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "vlv find index: err %d\n",
err, 0, 0);
return NULL;
}
@@ -2077,7 +2077,7 @@ int vlv_delete_search_entry(Slapi_PBlock *pb, Slapi_Entry* e,
ldbm_instance *ins
if (instance_set_busy(inst) != 0)
{
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Backend instance: '%s' is already in the middle of "
"another task and cannot be disturbed.\n",
inst->inst_name, 0, 0);
@@ -2087,7 +2087,7 @@ int vlv_delete_search_entry(Slapi_PBlock *pb, Slapi_Entry* e,
ldbm_instance *ins
base1 = slapi_create_dn_string("cn=MCC %s,cn=%s,cn=%s,cn=plugins,cn=config",
tag1, inst->inst_name, inst->inst_li->li_plugin->plg_name);
if (NULL == base1) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"vlv_delete_search_entry: "
"failed to craete vlv search entry dn (rdn: cn=MCC %s) for "
"plugin %s, instance %s\n",
@@ -2101,11 +2101,11 @@ int vlv_delete_search_entry(Slapi_PBlock *pb, Slapi_Entry* e,
ldbm_instance *ins
p = vlvSearch_finddn((struct vlvSearch *)be->vlvSearchList, newdn);
if(p!=NULL)
{
- LDAPDebug( LDAP_DEBUG_ANY, "Deleted Virtual List View Search (%s).\n",
p->vlv_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Deleted Virtual List View Search
(%s).\n", p->vlv_name, 0, 0);
tag2=create_vlv_search_tag(dn);
base2 = slapi_create_dn_string("cn=by MCC %s,%s", tag2, base1);
if (NULL == base2) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"vlv_delete_search_entry: failed to create "
"vlv search entry dn (rdn: cn=by MCC %s) for "
"plugin %s, instance %s\n",
@@ -2125,7 +2125,7 @@ int vlv_delete_search_entry(Slapi_PBlock *pb, Slapi_Entry* e,
ldbm_instance *ins
slapi_delete_internal_pb(tmppb);
slapi_pblock_get (tmppb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if(rc != LDAP_SUCCESS) {
- LDAPDebug(LDAP_DEBUG_ANY, "vlv_delete_search_entry:can't delete dse entry
'%s'\n", base2, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "vlv_delete_search_entry:can't delete dse
entry '%s'\n", base2, 0, 0);
}
pblock_done(tmppb);
pblock_init(tmppb);
@@ -2134,7 +2134,7 @@ int vlv_delete_search_entry(Slapi_PBlock *pb, Slapi_Entry* e,
ldbm_instance *ins
slapi_delete_internal_pb(tmppb);
slapi_pblock_get (tmppb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if(rc != LDAP_SUCCESS) {
- LDAPDebug(LDAP_DEBUG_ANY, "vlv_delete_search_entry:can't delete dse entry
'%s'\n", base1, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "vlv_delete_search_entry:can't delete
dse entry '%s'\n", base1, 0, 0);
}
slapi_pblock_destroy(tmppb);
slapi_ch_free((void **)&tag2);
@@ -2153,13 +2153,13 @@ bail:
void
vlv_acquire_lock(backend *be)
{
- LDAPDebug(LDAP_DEBUG_TRACE, "vlv_acquire_lock => trying to acquire the
lock\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "vlv_acquire_lock => trying to acquire
the lock\n", 0, 0, 0);
slapi_rwlock_wrlock(be->vlvSearchList_lock);
}
void
vlv_release_lock(backend *be)
{
- LDAPDebug(LDAP_DEBUG_TRACE, "vlv_release_lock => trying to release the
lock\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "vlv_release_lock => trying to release
the lock\n", 0, 0, 0);
slapi_rwlock_unlock(be->vlvSearchList_lock);
}
diff --git a/ldap/servers/slapd/back-ldbm/vlv_srch.c
b/ldap/servers/slapd/back-ldbm/vlv_srch.c
index df37821..b9ea148 100644
--- a/ldap/servers/slapd/back-ldbm/vlv_srch.c
+++ b/ldap/servers/slapd/back-ldbm/vlv_srch.c
@@ -896,7 +896,7 @@ vlvIndex_createfilename(struct vlvIndex* pIndex, char **ppc)
*p= '\0';
if(strlen(filename)==0)
{
- LDAPDebug( LDAP_DEBUG_ANY, "Couldn't generate valid filename from
Virtual List View Index Name (%s). Need some alphabetical characters.\n",
pIndex->vlv_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Couldn't generate valid filename
from Virtual List View Index Name (%s). Need some alphabetical characters.\n",
pIndex->vlv_name, 0, 0);
filenameValid= 0;
}
/* JCM: Check if this file clashes with another VLV Index filename */
diff --git a/ldap/servers/slapd/back-ldif/add.c b/ldap/servers/slapd/back-ldif/add.c
index c95041f..7ffa29e 100644
--- a/ldap/servers/slapd/back-ldif/add.c
+++ b/ldap/servers/slapd/back-ldif/add.c
@@ -46,7 +46,7 @@ ldif_back_add( Slapi_PBlock *pb )
tprev = NULL;
/*Turn on tracing to see this printed out*/
- LDAPDebug( LDAP_DEBUG_TRACE, "=> ldif_back_add\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ldif_back_add\n", 0, 0, 0 );
/*Get the database, the dn and the entry to add*/
if (slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &db ) < 0 ||
@@ -58,14 +58,14 @@ ldif_back_add( Slapi_PBlock *pb )
/*Check to make sure the entry passes the schema check*/
if ( slapi_entry_schema_check( pb, e ) != 0 ) {
- LDAPDebug( LDAP_DEBUG_TRACE, "entry failed schema check\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "entry failed schema check\n", 0, 0,
0 );
slapi_send_ldap_result( pb, LDAP_OBJECT_CLASS_VIOLATION, NULL, NULL, 0, NULL );
return( -1 );
}
/* Check if the attribute values in the entry obey the syntaxes */
if ( slapi_entry_syntax_check( pb, e, 0 ) != 0 ) {
- LDAPDebug( LDAP_DEBUG_TRACE, "entry failed syntax_check\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "entry failed syntax_check\n", 0, 0,
0 );
slapi_send_ldap_result( pb, LDAP_INVALID_SYNTAX, NULL, NULL, 0, NULL );
return( -1 );
}
@@ -102,12 +102,12 @@ ldif_back_add( Slapi_PBlock *pb )
int rc;
if ((old = (ldif_Entry *)ldif_find_entry( pb, db, parentdn, &tprev)) == NULL ) {
slapi_send_ldap_result( pb, LDAP_NO_SUCH_OBJECT, NULL, NULL, 0, NULL );
- LDAPDebug( LDAP_DEBUG_TRACE, "parent does not exist\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "parent does not exist\n", 0, 0, 0
);
goto error_return;
}
rc= slapi_access_allowed( pb, e, NULL, NULL, SLAPI_ACL_ADD );
if ( rc!=LDAP_SUCCESS ) {
- LDAPDebug( LDAP_DEBUG_TRACE, "no access to parent\n", 0,0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "no access to parent\n", 0,0, 0
);
slapi_send_ldap_result( pb, rc, NULL, NULL, 0, NULL );
goto error_return;
}
@@ -115,7 +115,7 @@ ldif_back_add( Slapi_PBlock *pb )
int isroot;
slapi_pblock_get( pb, SLAPI_REQUESTOR_ISROOT, &isroot );
if ( !isroot ) {
- LDAPDebug( LDAP_DEBUG_TRACE, "no parent & not root\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "no parent & not root\n", 0,
0, 0 );
slapi_send_ldap_result( pb, LDAP_INSUFFICIENT_ACCESS, NULL, NULL, 0, NULL );
goto error_return;
}
@@ -159,7 +159,7 @@ ldif_back_add( Slapi_PBlock *pb )
if ( parentdn != NULL ){
free( (void *)parentdn );
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= ldif_back_add\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ldif_back_add\n", 0, 0, 0 );
return( 0 );
error_return:;
diff --git a/ldap/servers/slapd/back-ldif/bind.c b/ldap/servers/slapd/back-ldif/bind.c
index 3e5feab..26ad44f 100644
--- a/ldap/servers/slapd/back-ldif/bind.c
+++ b/ldap/servers/slapd/back-ldif/bind.c
@@ -41,7 +41,7 @@ ldif_back_bind( Slapi_PBlock *pb )
int rc, syntax; /*Storage for error return values*/
Slapi_Attr *attr;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> ldif_back_bind\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ldif_back_bind\n", 0, 0, 0 );
prev = NULL;
@@ -109,7 +109,7 @@ ldif_back_bind( Slapi_PBlock *pb )
PR_Unlock( db->ldif_lock );
- LDAPDebug( LDAP_DEBUG_TRACE, "<= ldif_back_bind\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ldif_back_bind\n", 0, 0, 0 );
/* success: front end will send result */
return( SLAPI_BIND_SUCCESS );
diff --git a/ldap/servers/slapd/back-ldif/close.c b/ldap/servers/slapd/back-ldif/close.c
index 15ee884..617c9ec 100644
--- a/ldap/servers/slapd/back-ldif/close.c
+++ b/ldap/servers/slapd/back-ldif/close.c
@@ -63,10 +63,10 @@ ldif_back_close( Slapi_PBlock *pb )
{
LDIF *db;
- LDAPDebug( LDAP_DEBUG_TRACE, "ldif backend syncing\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ldif backend syncing\n", 0, 0, 0 );
slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &db );
ldif_free_db(db);
- LDAPDebug( LDAP_DEBUG_TRACE, "ldif backend done syncing\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ldif backend done syncing\n", 0, 0, 0
);
}
/*
@@ -79,8 +79,8 @@ ldif_back_close( Slapi_PBlock *pb )
void
ldif_back_flush( Slapi_PBlock *pb )
{
- LDAPDebug( LDAP_DEBUG_TRACE, "ldif backend flushing\n", 0, 0, 0 );
- LDAPDebug( LDAP_DEBUG_TRACE, "ldif backend done flushing\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ldif backend flushing\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ldif backend done flushing\n", 0, 0,
0 );
return;
}
diff --git a/ldap/servers/slapd/back-ldif/compare.c
b/ldap/servers/slapd/back-ldif/compare.c
index 272adc0..3d22371 100644
--- a/ldap/servers/slapd/back-ldif/compare.c
+++ b/ldap/servers/slapd/back-ldif/compare.c
@@ -39,7 +39,7 @@ ldif_back_compare( Slapi_PBlock *pb )
Slapi_Attr *attr;
int rc;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> ldif_back_compare\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ldif_back_compare\n", 0, 0, 0
);
prev = NULL;
if (slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &db ) < 0 ||
@@ -84,7 +84,7 @@ ldif_back_compare( Slapi_PBlock *pb )
slapi_send_ldap_result( pb, LDAP_COMPARE_FALSE, NULL, NULL, 0, NULL );
PR_Unlock( db->ldif_lock );
- LDAPDebug( LDAP_DEBUG_TRACE, "<= ldif_back_compare\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ldif_back_compare\n", 0, 0, 0
);
return( 0 );
}
diff --git a/ldap/servers/slapd/back-ldif/config.c
b/ldap/servers/slapd/back-ldif/config.c
index f5678af..adccb05 100644
--- a/ldap/servers/slapd/back-ldif/config.c
+++ b/ldap/servers/slapd/back-ldif/config.c
@@ -51,7 +51,7 @@ ldif_back_config( Slapi_PBlock *pb )
Slapi_Entry *tmp; /*Used for initialization purposes*/
- LDAPDebug( LDAP_DEBUG_TRACE, "=> ldif_back_config\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ldif_back_config\n", 0, 0, 0
);
/*
* Get the private_info structure you created in ldif_back_init().
@@ -63,7 +63,7 @@ ldif_back_config( Slapi_PBlock *pb )
slapi_pblock_get( pb, SLAPI_CONFIG_LINENO, &lineno ) < 0 ||
slapi_pblock_get( pb, SLAPI_CONFIG_ARGC, &argc ) < 0 ||
slapi_pblock_get( pb, SLAPI_CONFIG_ARGV, &argv ) < 0 ){
- LDAPDebug(LDAP_DEBUG_ANY, "Ldif Backend: unable to get data from front
end\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Ldif Backend: unable to get data from front
end\n", 0, 0, 0);
return(-1);
}
@@ -80,14 +80,14 @@ ldif_back_config( Slapi_PBlock *pb )
/*Check for the correct number of arguments*/
if (argc != 2){
- LDAPDebug(LDAP_DEBUG_ANY, "Ldif Backend: Unable to configure; invalid ldif input
file specification line format (file: %s, line: %d)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Ldif Backend: Unable to configure; invalid
ldif input file specification line format (file: %s, line: %d)\n",
fname, lineno, 0);
return(-1);
}
/*Check for the right format*/
if (strcmp(argv[0], "file") != 0){
- LDAPDebug(LDAP_DEBUG_ANY, "Ldif Backend: unable to configure; invalid parameter
\"%s\" in config file (file: %s, line: %d)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Ldif Backend: unable to configure; invalid
parameter \"%s\" in config file (file: %s, line: %d)\n",
argv[0], fname, lineno );
return(-1);
}
@@ -95,10 +95,10 @@ ldif_back_config( Slapi_PBlock *pb )
/*Now we fopen the file and grab up the contents*/
fp = fopen (argv[1], "r");
if (fp == NULL){
- LDAPDebug(LDAP_DEBUG_ANY, "Ldif Backend: unable to read ldif file %s\n",
argv[1], 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Ldif Backend: unable to read ldif file
%s\n", argv[1], 0, 0);
fp = fopen (argv[1], "w");
if(fp == NULL){
- LDAPDebug(LDAP_DEBUG_ANY, "Ldif Backend: unable to create ldif file
%s\n", argv[1], 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Ldif Backend: unable to create ldif file
%s\n", argv[1], 0, 0);
return -1;
}
}
@@ -110,7 +110,7 @@ ldif_back_config( Slapi_PBlock *pb )
/*Save the filename, for modifications to the file later*/
if ((db->ldif_file = strdup(argv[1])) == NULL){
- LDAPDebug(LDAP_DEBUG_ANY, "Ldif Backend: out of memory\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Ldif Backend: out of memory\n", 0, 0,
0);
PR_Unlock( db->ldif_lock );
fclose(fp);
return(-1);
@@ -127,7 +127,7 @@ ldif_back_config( Slapi_PBlock *pb )
SLAPI_STR2ENTRY_NOT_WELL_FORMED_LDIF);
new = (ldif_Entry *) ldifentry_init(tmp);
if (new == NULL){
- LDAPDebug(LDAP_DEBUG_ANY, "Ldif Backend: unable to read in ldif file; out of
memory\n",0 ,0 ,0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Ldif Backend: unable to read in ldif file;
out of memory\n",0 ,0 ,0 );
PR_Unlock( db->ldif_lock );
fclose(fp);
return(-1);
@@ -159,7 +159,7 @@ ldif_back_config( Slapi_PBlock *pb )
PR_Unlock( db->ldif_lock );
fclose(fp);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= ldif_back_config\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ldif_back_config\n", 0, 0, 0
);
return( 0 );
}
diff --git a/ldap/servers/slapd/back-ldif/delete.c
b/ldap/servers/slapd/back-ldif/delete.c
index 0060214..52da14c 100644
--- a/ldap/servers/slapd/back-ldif/delete.c
+++ b/ldap/servers/slapd/back-ldif/delete.c
@@ -38,7 +38,7 @@ ldif_back_delete( Slapi_PBlock *pb )
char *dn; /*Storage for the dn*/
int rc;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> ldif_back_delete\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ldif_back_delete\n", 0, 0, 0
);
prev = NULL;
@@ -56,7 +56,7 @@ ldif_back_delete( Slapi_PBlock *pb )
bye = (ldif_Entry *) ldif_find_entry(pb, db, dn, &prev);
if (bye == NULL) {
slapi_send_ldap_result( pb, LDAP_NO_SUCH_OBJECT, NULL, NULL, 0, NULL );
- LDAPDebug( LDAP_DEBUG_TRACE, "entry for delete does not exist\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "entry for delete does not exist\n",
0, 0, 0 );
PR_Unlock( db->ldif_lock );
return(-1);
}
@@ -87,7 +87,7 @@ ldif_back_delete( Slapi_PBlock *pb )
/*Success*/
slapi_send_ldap_result( pb, LDAP_SUCCESS, NULL, NULL, 0, NULL );
PR_Unlock( db->ldif_lock );
- LDAPDebug( LDAP_DEBUG_TRACE, "<= ldif_back_delete\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ldif_back_delete\n", 0, 0, 0
);
return( 0 );
}
@@ -106,7 +106,7 @@ has_children(LDIF *db, ldif_Entry *p)
ldif_Entry *cur; /*Used to walk down the list*/
int has_kid = 0; /*Flag to return*/
- LDAPDebug( LDAP_DEBUG_TRACE, "=> has_children\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> has_children\n", 0, 0, 0);
/*If there is no p or db, then there can be no children*/
if (p == NULL || db == NULL){
@@ -135,7 +135,7 @@ has_children(LDIF *db, ldif_Entry *p)
free( (void *) parentdn );
- LDAPDebug( LDAP_DEBUG_TRACE, "<= has_children %d\n", has_kid, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= has_children %d\n", has_kid, 0,
0);
return( has_kid );
}
diff --git a/ldap/servers/slapd/back-ldif/init.c b/ldap/servers/slapd/back-ldif/init.c
index 2564684..31eabee 100644
--- a/ldap/servers/slapd/back-ldif/init.c
+++ b/ldap/servers/slapd/back-ldif/init.c
@@ -39,7 +39,7 @@ ldif_back_init( Slapi_PBlock *pb )
LDIF *db; /*This will hold the ldif file in memory*/
int rc;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> ldif_back_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ldif_back_init\n", 0, 0, 0 );
/*
* Allocate and initialize db with everything we
@@ -52,7 +52,7 @@ ldif_back_init( Slapi_PBlock *pb )
/*Allocate memory for our database and check if success*/
db = (LDIF *) malloc( sizeof(LDIF) );
if (db == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "Ldif Backend: unable to initialize; out of
memory\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Ldif Backend: unable to initialize; out of
memory\n", 0, 0, 0);
return(-1);
}
@@ -64,7 +64,7 @@ ldif_back_init( Slapi_PBlock *pb )
db->ldif_file = NULL;
db->ldif_lock = PR_NewLock();
if (&db->ldif_lock == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "Ldif Backend: Lock creation failed\n", 0, 0,
0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Ldif Backend: Lock creation failed\n",
0, 0, 0);
return(-1);
}
@@ -102,11 +102,11 @@ ldif_back_init( Slapi_PBlock *pb )
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_START_FN,
(void *) ldif_back_start );
if (rc != 0) {
- LDAPDebug(LDAP_DEBUG_ANY, "Ldif Backend: unable to pass database information to
front end\n",0 ,0 ,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Ldif Backend: unable to pass database
information to front end\n",0 ,0 ,0);
return(-1);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= ldif_back_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ldif_back_init\n", 0, 0, 0 );
return( 0 );
}
diff --git a/ldap/servers/slapd/back-ldif/modify.c
b/ldap/servers/slapd/back-ldif/modify.c
index 45d52fb..73c51e9 100644
--- a/ldap/servers/slapd/back-ldif/modify.c
+++ b/ldap/servers/slapd/back-ldif/modify.c
@@ -53,7 +53,7 @@ ldif_back_modify( Slapi_PBlock *pb )
char *dn; /*Storage for the dn*/
char *errbuf = NULL; /* To get error back */
- LDAPDebug( LDAP_DEBUG_TRACE, "=> ldif_back_modify\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ldif_back_modify\n", 0, 0, 0
);
prev = NULL;
/*Get the database, the dn and the mods*/
@@ -134,7 +134,7 @@ ldif_back_modify( Slapi_PBlock *pb )
slapi_send_ldap_result( pb, LDAP_SUCCESS, NULL, NULL, 0, NULL );
PR_Unlock( db->ldif_lock );
- LDAPDebug( LDAP_DEBUG_TRACE, "<= ldif_back_modify\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ldif_back_modify\n", 0, 0, 0
);
return( 0 );
error_return:;
@@ -528,27 +528,27 @@ apply_mods( Slapi_Entry *e, LDAPMod **mods )
{
int err, i, j;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> apply_mods\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> apply_mods\n", 0, 0, 0 );
err = LDAP_SUCCESS;
for ( j = 0; (mods != NULL) && (mods[j] != NULL); j++ ) {
switch ( mods[j]->mod_op & ~LDAP_MOD_BVALUES ) {
case LDAP_MOD_ADD:
- LDAPDebug( LDAP_DEBUG_ARGS, " add: %s\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " add: %s\n",
mods[j]->mod_type, 0, 0 );
err = slapi_entry_add_values( e, mods[j]->mod_type,
mods[j]->mod_bvalues );
break;
case LDAP_MOD_DELETE:
- LDAPDebug( LDAP_DEBUG_ARGS, " delete: %s\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " delete: %s\n",
mods[j]->mod_type, 0, 0 );
err = slapi_entry_delete_values( e, mods[j]->mod_type,
mods[j]->mod_bvalues );
break;
case LDAP_MOD_REPLACE:
- LDAPDebug( LDAP_DEBUG_ARGS, " replace: %s\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " replace: %s\n",
mods[j]->mod_type, 0, 0 );
err = entry_replace_values( e, mods[j]->mod_type,
mods[j]->mod_bvalues );
@@ -556,17 +556,17 @@ apply_mods( Slapi_Entry *e, LDAPMod **mods )
}
for ( i = 0; mods[j]->mod_bvalues != NULL &&
mods[j]->mod_bvalues[i] != NULL; i++ ) {
- LDAPDebug( LDAP_DEBUG_ARGS, " %s: %s\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " %s: %s\n",
mods[j]->mod_type, mods[j]->mod_bvalues[i]->bv_val,
0 );
}
- LDAPDebug( LDAP_DEBUG_ARGS, " -\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " -\n", 0, 0, 0 );
if ( err != LDAP_SUCCESS ) {
break;
}
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= apply_mods %d\n", err, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= apply_mods %d\n", err, 0, 0 );
return( err );
}
diff --git a/ldap/servers/slapd/back-ldif/modrdn.c
b/ldap/servers/slapd/back-ldif/modrdn.c
index ae79834..720e97e 100644
--- a/ldap/servers/slapd/back-ldif/modrdn.c
+++ b/ldap/servers/slapd/back-ldif/modrdn.c
@@ -48,7 +48,7 @@ ldif_back_modrdn( Slapi_PBlock *pb )
LDAPMod **mods; /*Holds the list of modifications*/
int rc;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> ldif_back_modrdn\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ldif_back_modrdn\n", 0, 0, 0 );
prev = NULL;
@@ -106,7 +106,7 @@ ldif_back_modrdn( Slapi_PBlock *pb )
/* parent + rdn + separator(s) + null */
newdn = (char *) malloc( strlen( pdn ) + strlen( newrdn ) + 3 );
if (newdn == NULL){
- LDAPDebug( LDAP_DEBUG_ANY,"malloc failed", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"malloc failed", 0, 0, 0 );
exit(1);
}
@@ -197,7 +197,7 @@ ldif_back_modrdn( Slapi_PBlock *pb )
/*Unlock the database, and tell the user the good news*/
PR_Unlock( db->ldif_lock );
slapi_send_ldap_result( pb, LDAP_SUCCESS, NULL, NULL, 0, NULL );
- LDAPDebug( LDAP_DEBUG_TRACE, "<= ldif_back_modrdn\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ldif_back_modrdn\n", 0, 0, 0 );
return( 0 );
error_return:;
@@ -254,19 +254,19 @@ ldif_add_mod( LDAPMod ***modlist, int modtype, char *type, struct
berval **bvps
(i + 2) * sizeof(LDAPMod *) );
if (*modlist == NULL){
- LDAPDebug( LDAP_DEBUG_ANY, "realloc failed", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "realloc failed", 0, 0, 0 );
exit(1);
}
(*modlist)[i] = (LDAPMod *) malloc( sizeof(LDAPMod) );
if ((*modlist)[i] == NULL){
- LDAPDebug( LDAP_DEBUG_ANY,"malloc failed", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"malloc failed", 0, 0, 0 );
exit(1);
}
(*modlist)[i]->mod_type = (char *) strdup( type );
if ((*modlist)[i]->mod_type == NULL){
- LDAPDebug( LDAP_DEBUG_ANY,"strdup failed", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"strdup failed", 0, 0, 0 );
exit(1);
}
@@ -274,7 +274,7 @@ ldif_add_mod( LDAPMod ***modlist, int modtype, char *type, struct
berval **bvps
(*modlist)[i]->mod_op = modtype;
(*modlist)[i]->mod_bvalues = (struct berval **) malloc(2*sizeof(struct berval *));
if ((*modlist)[i]->mod_bvalues == NULL){
- LDAPDebug( LDAP_DEBUG_ANY,"malloc failed",0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"malloc failed",0, 0, 0 );
exit(1);
}
(*modlist)[i]->mod_bvalues[0] = ber_bvdup( bvps[0] );
diff --git a/ldap/servers/slapd/back-ldif/search.c
b/ldap/servers/slapd/back-ldif/search.c
index 70c4d44..07a0936 100644
--- a/ldap/servers/slapd/back-ldif/search.c
+++ b/ldap/servers/slapd/back-ldif/search.c
@@ -50,7 +50,7 @@ ldif_back_search( Slapi_PBlock *pb )
char *freeme; /*Tmp storage for monitordn*/
time_t currtime; /*The current time*/
- LDAPDebug( LDAP_DEBUG_TRACE, "=> ldif_back_search\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ldif_back_search\n", 0, 0, 0
);
/*
* Get private information created in the init routine.
@@ -199,7 +199,7 @@ ldif_back_search( Slapi_PBlock *pb )
/* Search is done, send LDAP_SUCCESS */
slapi_send_ldap_result( pb, LDAP_SUCCESS, NULL, NULL, nentries, NULL );
PR_Unlock( db->ldif_lock );
- LDAPDebug( LDAP_DEBUG_TRACE, "<= ldif_back_search\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ldif_back_search\n", 0, 0, 0
);
return( -1 );
}
diff --git a/ldap/servers/slapd/backend_manager.c b/ldap/servers/slapd/backend_manager.c
index 9084d95..e8ea06f 100644
--- a/ldap/servers/slapd/backend_manager.c
+++ b/ldap/servers/slapd/backend_manager.c
@@ -155,7 +155,7 @@ slapi_get_next_backend (char *cookie)
int i, last_be;
if (cookie == NULL)
{
- LDAPDebug( LDAP_DEBUG_ARGS, "slapi_get_next_backend: NULL argument\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "slapi_get_next_backend: NULL
argument\n",
0, 0, 0 );
return NULL;
}
@@ -164,7 +164,7 @@ slapi_get_next_backend (char *cookie)
if ( last_be < 0 || last_be >= maxbackends)
{
- LDAPDebug( LDAP_DEBUG_ARGS, "slapi_get_next_backend: argument out of
range\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "slapi_get_next_backend: argument out of
range\n",
0, 0, 0 );
return NULL;
}
diff --git a/ldap/servers/slapd/bind.c b/ldap/servers/slapd/bind.c
index 3054c1f..5c4a53c 100644
--- a/ldap/servers/slapd/bind.c
+++ b/ldap/servers/slapd/bind.c
@@ -109,7 +109,7 @@ do_bind( Slapi_PBlock *pb )
int minssf_exclude_rootdse = 0;
Slapi_DN *original_sdn = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "do_bind\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "do_bind\n", 0, 0, 0 );
/*
* Parse the bind request. It looks like this:
@@ -133,7 +133,7 @@ do_bind( Slapi_PBlock *pb )
ber_rc = ber_scanf( ber, "{iat", &version, &rawdn, &method );
if ( ber_rc == LBER_ERROR ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ber_scanf failed (op=Bind; params=Version,DN,Method)\n",
0, 0, 0 );
log_bind_access (pb, "???", method, version, saslmech, "decoding
error");
@@ -165,7 +165,7 @@ do_bind( Slapi_PBlock *pb )
slapi_sdn_free(&sdn);
return;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "BIND dn=\"%s\" method=%" BERTAG_T
" version=%d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "BIND dn=\"%s\" method=%"
BERTAG_T " version=%d\n",
dn?dn:"empty", method, version );
/* target spec is used to decide which plugins are applicable for the operation */
@@ -174,7 +174,7 @@ do_bind( Slapi_PBlock *pb )
switch ( method ) {
case LDAP_AUTH_SASL:
if ( version < LDAP_VERSION3 ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"got SASL credentials from LDAPv2 client\n",
0, 0, 0 );
log_bind_access (pb, dn?dn:"empty", method, version, saslmech,
"SASL credentials only in LDAPv3");
@@ -205,7 +205,7 @@ do_bind( Slapi_PBlock *pb )
static char *kmsg =
"LDAPv2-style kerberos authentication received "
"on LDAPv3 connection.";
- LDAPDebug( LDAP_DEBUG_ANY, kmsg, 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, kmsg, 0, 0, 0 );
log_bind_access (pb, dn?dn:"empty", method, version, saslmech,
kmsg);
send_ldap_result( pb, LDAP_PROTOCOL_ERROR, NULL,
kmsg, 0, NULL );
@@ -225,7 +225,7 @@ do_bind( Slapi_PBlock *pb )
goto free_and_return;
}
if ( ber_rc == LBER_ERROR ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ber_scanf failed (op=Bind; params=Credentials)\n",
0, 0, 0 );
log_bind_access (pb, dn?dn:"empty", method, version, saslmech,
"decoding error");
@@ -324,14 +324,14 @@ do_bind( Slapi_PBlock *pb )
}
break;
default:
- LDAPDebug( LDAP_DEBUG_TRACE, "bind: unknown LDAP protocol version
%d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "bind: unknown LDAP protocol version
%d\n",
version, 0, 0 );
send_ldap_result( pb, LDAP_PROTOCOL_ERROR, NULL,
"version not supported", 0, NULL );
goto free_and_return;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "do_bind: version %d method 0x%x dn %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "do_bind: version %d method 0x%x dn
%s\n",
version, method, dn );
pb->pb_conn->c_ldapversion = version;
diff --git a/ldap/servers/slapd/compare.c b/ldap/servers/slapd/compare.c
index 3977452..d206ba8 100644
--- a/ldap/servers/slapd/compare.c
+++ b/ldap/servers/slapd/compare.c
@@ -43,7 +43,7 @@ do_compare( Slapi_PBlock *pb )
Slapi_Entry *referral = NULL;
char errorbuf[SLAPI_DSE_RETURNTEXT_SIZE];
- LDAPDebug( LDAP_DEBUG_TRACE, "do_compare\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "do_compare\n", 0, 0, 0 );
/* count the compare request */
slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsCompareOps);
@@ -65,7 +65,7 @@ do_compare( Slapi_PBlock *pb )
if ( ber_scanf( ber, "{a{ao}}", &rawdn, &ava.ava_type,
&ava.ava_value ) == LBER_ERROR ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ber_scanf failed (op=Compare; params=DN,Type,Value)\n",
0, 0, 0 );
send_ldap_result( pb, LDAP_PROTOCOL_ERROR, NULL, NULL, 0,
@@ -108,7 +108,7 @@ do_compare( Slapi_PBlock *pb )
/* target spec is used to decide which plugins are applicable for the operation */
operation_set_target_spec (pb->pb_op, &sdn);
- LDAPDebug( LDAP_DEBUG_ARGS, "do_compare: dn (%s) attr (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "do_compare: dn (%s) attr (%s)\n",
rawdn, ava.ava_type, 0 );
slapi_log_access( LDAP_DEBUG_STATS,
diff --git a/ldap/servers/slapd/config.c b/ldap/servers/slapd/config.c
index fd31b7b..0da897a 100644
--- a/ldap/servers/slapd/config.c
+++ b/ldap/servers/slapd/config.c
@@ -210,7 +210,7 @@ slapd_bootstrap_config(const char *configdir)
SLAPI_STR2ENTRY_NOT_WELL_FORMED_LDIF);
if (e == NULL)
{
- LDAPDebug(LDAP_DEBUG_ANY, "The entry [%s] in the configfile %s was empty or
could not be parsed\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "The entry [%s] in the configfile %s was
empty or could not be parsed\n",
entrystr, configfile, 0);
continue;
}
@@ -224,7 +224,7 @@ slapd_bootstrap_config(const char *configdir)
maxdescriptors, errorbuf, CONFIG_APPLY)
!= LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s\n", configfile,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
CONFIG_MAXDESCRIPTORS_ATTRIBUTE, errorbuf);
}
}
@@ -240,7 +240,7 @@ slapd_bootstrap_config(const char *configdir)
logenabled, SLAPD_ERROR_LOG, errorbuf, CONFIG_APPLY)
!= LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s\n", configfile,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
CONFIG_ERRORLOG_LOGGING_ENABLED_ATTRIBUTE, errorbuf);
}
}
@@ -253,7 +253,7 @@ slapd_bootstrap_config(const char *configdir)
if (config_set_localuser(CONFIG_LOCALUSER_ATTRIBUTE,
_localuser, errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s. \n", configfile,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s. \n", configfile,
CONFIG_LOCALUSER_ATTRIBUTE, errorbuf);
}
}
@@ -267,7 +267,7 @@ slapd_bootstrap_config(const char *configdir)
if (config_set_errorlog(CONFIG_ERRORLOG_ATTRIBUTE,
workpath, errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s. \n", configfile,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s. \n", configfile,
CONFIG_ERRORLOG_ATTRIBUTE, errorbuf);
}
}
@@ -281,13 +281,13 @@ slapd_bootstrap_config(const char *configdir)
if (config_set_errorlog_level(CONFIG_LOGLEVEL_ATTRIBUTE,
loglevel, errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s. \n", configfile,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s. \n", configfile,
CONFIG_LOGLEVEL_ATTRIBUTE, errorbuf);
}
}
else
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%s: ignoring %s (since -d %d was given on "
"the command line)\n",
CONFIG_LOGLEVEL_ATTRIBUTE, loglevel,
@@ -303,7 +303,7 @@ slapd_bootstrap_config(const char *configdir)
if (config_set_certdir(CONFIG_CERTDIR_ATTRIBUTE,
workpath, errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s. \n", configfile,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s. \n", configfile,
CONFIG_CERTDIR_ATTRIBUTE, errorbuf);
}
}
@@ -316,7 +316,7 @@ slapd_bootstrap_config(const char *configdir)
if (config_set_saslpath(CONFIG_SASLPATH_ATTRIBUTE,
workpath, errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s. \n", configfile,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s. \n", configfile,
CONFIG_SASLPATH_ATTRIBUTE, errorbuf);
}
}
@@ -329,7 +329,7 @@ slapd_bootstrap_config(const char *configdir)
if (config_set_ldapi_filename(CONFIG_LDAPI_FILENAME_ATTRIBUTE,
workpath, errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s. \n", configfile,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s. \n", configfile,
CONFIG_LDAPI_FILENAME_ATTRIBUTE, errorbuf);
}
}
@@ -342,7 +342,7 @@ slapd_bootstrap_config(const char *configdir)
if (config_set_ldapi_switch(CONFIG_LDAPI_SWITCH_ATTRIBUTE,
workpath, errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s. \n", configfile,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s. \n", configfile,
CONFIG_LDAPI_SWITCH_ATTRIBUTE, errorbuf);
}
}
@@ -361,7 +361,7 @@ slapd_bootstrap_config(const char *configdir)
/* add the syntax/matching scheme rule plugin */
if (plugin_setup(e, 0, 0, 1, returntext))
{
- LDAPDebug(LDAP_DEBUG_ANY, "The plugin entry [%s] in the configfile %s was
invalid. %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "The plugin entry [%s] in the configfile
%s was invalid. %s\n",
slapi_entry_get_dn(e), configfile, returntext);
rc = 0;
slapi_sdn_done(&plug_dn);
@@ -384,7 +384,7 @@ slapd_bootstrap_config(const char *configdir)
/* add the pwd storage scheme rule plugin */
if (plugin_setup(e, 0, 0, 1, returntext))
{
- LDAPDebug(LDAP_DEBUG_ANY, "The plugin entry [%s] in the configfile %s was
invalid. %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "The plugin entry [%s] in the configfile
%s was invalid. %s\n",
slapi_entry_get_dn(e), configfile, returntext);
rc = 0;
slapi_sdn_done(&plug_dn);
@@ -402,7 +402,7 @@ slapd_bootstrap_config(const char *configdir)
schemacheck, errorbuf, CONFIG_APPLY)
!= LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s\n", configfile,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
CONFIG_SCHEMACHECK_ATTRIBUTE, errorbuf);
}
}
@@ -416,7 +416,7 @@ slapd_bootstrap_config(const char *configdir)
plugintracking, errorbuf, CONFIG_APPLY)
!= LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s\n", configfile,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
CONFIG_PLUGIN_BINDDN_TRACKING_ATTRIBUTE, errorbuf);
}
}
@@ -430,7 +430,7 @@ slapd_bootstrap_config(const char *configdir)
moddn_aci, errorbuf, CONFIG_APPLY)
!= LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s\n", configfile,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
CONFIG_MODDN_ACI_ATTRIBUTE, errorbuf);
}
}
@@ -444,7 +444,7 @@ slapd_bootstrap_config(const char *configdir)
syntaxcheck, errorbuf, CONFIG_APPLY)
!= LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s\n", configfile,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
CONFIG_SYNTAXCHECK_ATTRIBUTE, errorbuf);
}
}
@@ -458,7 +458,7 @@ slapd_bootstrap_config(const char *configdir)
syntaxlogging, errorbuf, CONFIG_APPLY)
!= LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s\n", configfile,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
CONFIG_SYNTAXLOGGING_ATTRIBUTE, errorbuf);
}
}
@@ -472,7 +472,7 @@ slapd_bootstrap_config(const char *configdir)
dn_validate_strict, errorbuf, CONFIG_APPLY)
!= LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s\n", configfile,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
CONFIG_DN_VALIDATE_STRICT_ATTRIBUTE, errorbuf);
}
}
@@ -485,7 +485,7 @@ slapd_bootstrap_config(const char *configdir)
CONFIG_ENQUOTE_SUP_OC_ATTRIBUTE, val, errorbuf,
CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s\n", configfile,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
CONFIG_ENQUOTE_SUP_OC_ATTRIBUTE, errorbuf);
}
val[0] = 0;
@@ -499,7 +499,7 @@ slapd_bootstrap_config(const char *configdir)
CONFIG_RETURN_EXACT_CASE_ATTRIBUTE, val,
errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s\n", configfile,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
CONFIG_RETURN_EXACT_CASE_ATTRIBUTE, errorbuf);
}
val[0] = 0;
@@ -514,7 +514,7 @@ slapd_bootstrap_config(const char *configdir)
CONFIG_ATTRIBUTE_NAME_EXCEPTION_ATTRIBUTE, val,
errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s\n", configfile,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
CONFIG_ATTRIBUTE_NAME_EXCEPTION_ATTRIBUTE,
errorbuf);
}
@@ -529,7 +529,7 @@ slapd_bootstrap_config(const char *configdir)
CONFIG_DS4_COMPATIBLE_SCHEMA_ATTRIBUTE, val,
errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s\n", configfile,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
CONFIG_DS4_COMPATIBLE_SCHEMA_ATTRIBUTE,
errorbuf);
}
@@ -544,7 +544,7 @@ slapd_bootstrap_config(const char *configdir)
CONFIG_SCHEMA_IGNORE_TRAILING_SPACES, val,
errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s\n", configfile,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
CONFIG_SCHEMA_IGNORE_TRAILING_SPACES,
errorbuf);
}
@@ -558,7 +558,7 @@ slapd_bootstrap_config(const char *configdir)
if (config_set_rewrite_rfc1274(
CONFIG_REWRITE_RFC1274_ATTRIBUTE, val,
errorbuf, CONFIG_APPLY) != LDAP_SUCCESS) {
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n",
configfile,
CONFIG_REWRITE_RFC1274_ATTRIBUTE,
errorbuf);
@@ -574,7 +574,7 @@ slapd_bootstrap_config(const char *configdir)
CONFIG_LOCALHOST_ATTRIBUTE, val, errorbuf,
CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s\n", configfile,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
CONFIG_LOCALHOST_ATTRIBUTE, errorbuf);
}
val[0] = 0;
diff --git a/ldap/servers/slapd/connection.c b/ldap/servers/slapd/connection.c
index de27d81..14bafa3 100644
--- a/ldap/servers/slapd/connection.c
+++ b/ldap/servers/slapd/connection.c
@@ -250,7 +250,7 @@ connection_reset(Connection* conn, int ns, PRNetAddr * from, int
fromLen, int is
char *str_unknown = "unknown";
int in_referral_mode = config_check_referral_mode();
- LDAPDebug( LDAP_DEBUG_CONNS, "new %sconnection on %d\n", pTmp,
conn->c_sd, 0 );
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG, "new %sconnection on %d\n", pTmp,
conn->c_sd, 0 );
/* bump our count of connections and update SNMP stats */
conn->c_connid = slapi_counter_increment(num_conns);
@@ -431,7 +431,7 @@ init_op_threads()
if ((work_q_lock = PR_NewLock()) == NULL ) {
errorCode = PR_GetError();
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"init_op_threads: PR_NewLock failed for work_q_lock, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
errorCode, slapd_pr_strerror(errorCode), 0 );
exit(-1);
@@ -439,7 +439,7 @@ init_op_threads()
if ((work_q_cv = PR_NewCondVar( work_q_lock )) == NULL) {
errorCode = PR_GetError();
- LDAPDebug( LDAP_DEBUG_ANY, "init_op_threads: PR_NewCondVar failed for work_q_cv,
" SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "init_op_threads: PR_NewCondVar failed for
work_q_cv, " SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
errorCode, slapd_pr_strerror(errorCode), 0 );
exit(-1);
}
@@ -458,7 +458,7 @@ init_op_threads()
SLAPD_DEFAULT_THREAD_STACKSIZE ) == NULL )
{
int prerr = PR_GetError();
- LDAPDebug( LDAP_DEBUG_ANY, "PR_CreateThread failed, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "PR_CreateThread failed, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror( prerr ), 0 );
} else {
g_incr_active_threadcnt();
@@ -643,7 +643,7 @@ connection_dispatch_operation(Connection *conn, Operation *op,
Slapi_PBlock *pb)
int i = 1;
int ret = setsockopt(conn->c_sd,IPPROTO_TCP,TCP_CORK,&i,sizeof(i));
if (ret < 0) {
- LDAPDebug(LDAP_DEBUG_ANY, "Failed to set TCP_CORK on connection %" NSPRIu64
"\n",conn->c_connid, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to set TCP_CORK on connection %"
NSPRIu64 "\n",conn->c_connid, 0, 0);
}
pop_cork = 1;
}
@@ -656,7 +656,7 @@ connection_dispatch_operation(Connection *conn, Operation *op,
Slapi_PBlock *pb)
int i = 0;
int ret = setsockopt(conn->c_sd,IPPROTO_TCP,TCP_CORK,&i,sizeof(i));
if (ret < 0) {
- LDAPDebug(LDAP_DEBUG_ANY, "Failed to clear TCP_CORK on connection %"
NSPRIu64 "\n",conn->c_connid, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to clear TCP_CORK on connection
%" NSPRIu64 "\n",conn->c_connid, 0, 0);
}
}
#endif
@@ -681,7 +681,7 @@ connection_dispatch_operation(Connection *conn, Operation *op,
Slapi_PBlock *pb)
break;
default:
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ignoring unknown LDAP request (conn=%" NSPRIu64 ",
tag=0x%lx)\n",
conn->c_connid, op->o_tag, 0 );
break;
@@ -1061,7 +1061,7 @@ get_next_from_buffer( void *buffer, size_t buffer_size, ber_len_t
*lenp,
}
syserr = errno;
/* Bad stuff happened, like the client sent us some junk */
- LDAPDebug( LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"ber_get_next failed for connection %" NSPRIu64 "\n",
conn->c_connid, 0, 0 );
/* reset private buffer */
conn->c_private->c_buffer_bytes = conn->c_private->c_buffer_offset = 0;
@@ -1223,7 +1223,7 @@ int connection_read_operation(Connection *conn, Operation *op,
ber_tag_t *tag, i
} else {
/* Otherwise we loop, unless we exceeded the ioblock timeout */
if (waits_done > ioblocktimeout_waits) {
- LDAPDebug( LDAP_DEBUG_CONNS,"ioblock timeout expired on connection %"
NSPRIu64 "\n", conn->c_connid, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,"ioblock timeout expired on connection
%" NSPRIu64 "\n", conn->c_connid, 0, 0 );
disconnect_server_nomutex( conn, conn->c_connid, -1,
SLAPD_DISCONNECT_IO_TIMEOUT, 0 );
ret = CONN_DONE;
@@ -1243,19 +1243,19 @@ int connection_read_operation(Connection *conn, Operation *op,
ber_tag_t *tag, i
/* PR_Poll call failed */
err = PR_GetError();
syserr = PR_GetOSError();
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"PR_Poll for connection %" NSPRIu64 " returns %d (%s)\n",
conn->c_connid, err, slapd_pr_strerror( err ) );
/* If this happens we should close the connection */
disconnect_server_nomutex( conn, conn->c_connid, -1, err, syserr );
ret = CONN_DONE;
goto done;
}
- LDAPDebug( LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"connection %" NSPRIu64 " waited %d times for read to be
ready\n", conn->c_connid, waits_done, 0 );
} else {
/* Some other error, typically meaning bad stuff */
syserr = PR_GetOSError();
- LDAPDebug( LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"PR_Recv for connection %" NSPRIu64 " returns %d (%s)\n",
conn->c_connid, err, slapd_pr_strerror( err ) );
/* If this happens we should close the connection */
disconnect_server_nomutex( conn, conn->c_connid, -1, err, syserr );
@@ -1276,7 +1276,7 @@ int connection_read_operation(Connection *conn, Operation *op,
ber_tag_t *tag, i
goto done;
}
}
- LDAPDebug( LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"connection %" NSPRIu64 " read %d bytes\n", conn->c_connid,
ret, 0 );
new_operation = 0;
@@ -1297,7 +1297,7 @@ int connection_read_operation(Connection *conn, Operation *op,
ber_tag_t *tag, i
/*
* We received a non-LDAP message. Log and close connection.
*/
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"conn=%" NSPRIu64 " received a non-LDAP message (tag 0x%lx, expected
0x%lx)\n",
conn->c_connid, *tag, LDAP_TAG_MESSAGE );
disconnect_server_nomutex( conn, conn->c_connid, -1,
@@ -1309,7 +1309,7 @@ int connection_read_operation(Connection *conn, Operation *op,
ber_tag_t *tag, i
if ( (*tag = ber_get_int( op->o_ber, &msgid ))
!= LDAP_TAG_MSGID ) {
/* log, close and send error */
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"conn=%" NSPRIu64 " unable to read tag for incoming request\n",
conn->c_connid, 0, 0 );
disconnect_server_nomutex( conn, conn->c_connid, -1, SLAPD_DISCONNECT_BAD_BER_TAG,
EPROTO );
ret = CONN_DONE;
@@ -1327,7 +1327,7 @@ int connection_read_operation(Connection *conn, Operation *op,
ber_tag_t *tag, i
case LBER_ERROR:
case LDAP_TAG_LDAPDN: /* optional username, for CLDAP */
/* log, close and send error */
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"conn=%" NSPRIu64 " ber_peek_tag returns 0x%lx\n",
conn->c_connid, *tag, 0 );
disconnect_server_nomutex( conn, conn->c_connid, -1, SLAPD_DISCONNECT_BER_PEEK,
EPROTO );
ret = CONN_DONE;
@@ -1379,7 +1379,7 @@ void connection_check_activity_level(Connection *conn)
/* update the last checked time */
conn->c_private->previous_count_check_time = current_time();
PR_ExitMonitor(conn->c_mutex);
- LDAPDebug(LDAP_DEBUG_CONNS,"conn %" NSPRIu64 " activity level =
%d\n",conn->c_connid,delta_count,0);
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,"conn %" NSPRIu64 " activity level
= %d\n",conn->c_connid,delta_count,0);
}
typedef struct table_iterate_info_struct {
@@ -1440,7 +1440,7 @@ void connection_enter_leave_turbo(Connection *conn, int
current_turbo_flag, int
} else {
double activet = 0.0;
connection_find_our_rank(conn,&connection_count, &our_rank);
- LDAPDebug(LDAP_DEBUG_CONNS,"conn %" NSPRIu64 " turbo rank = %d out of
%d conns\n",conn->c_connid,our_rank,connection_count);
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,"conn %" NSPRIu64 " turbo rank =
%d out of %d conns\n",conn->c_connid,our_rank,connection_count);
activet = (double)g_get_active_threadcnt();
threshold_rank = (int)(activet * ((double)CONN_TURBO_PERCENTILE / 100.0));
@@ -1481,9 +1481,9 @@ void connection_enter_leave_turbo(Connection *conn, int
current_turbo_flag, int
PR_ExitMonitor(conn->c_mutex);
if (current_mode != new_mode) {
if (current_mode) {
- LDAPDebug(LDAP_DEBUG_CONNS,"conn %" NSPRIu64 " leaving turbo
mode\n",conn->c_connid,0,0);
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,"conn %" NSPRIu64 " leaving turbo
mode\n",conn->c_connid,0,0);
} else {
- LDAPDebug(LDAP_DEBUG_CONNS,"conn %" NSPRIu64 " entering turbo
mode\n",conn->c_connid,0,0);
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,"conn %" NSPRIu64 " entering
turbo mode\n",conn->c_connid,0,0);
}
}
*new_turbo_flag = new_mode;
@@ -1523,7 +1523,7 @@ connection_threadmain()
time_t curtime = 0;
if( op_shutdown ) {
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"op_thread received shutdown signal\n", 0, 0, 0 );
g_decr_active_threadcnt();
return;
@@ -1540,7 +1540,7 @@ connection_threadmain()
PR_ASSERT(interval != PR_INTERVAL_NO_TIMEOUT); /* this should never happen with
PR_INTERVAL_NO_TIMEOUT */
continue;
case CONN_SHUTDOWN:
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"op_thread received shutdown signal\n", 0, 0, 0 );
g_decr_active_threadcnt();
return;
@@ -1661,11 +1661,11 @@ connection_threadmain()
* should call connection_make_readable after the op is removed
* connection_make_readable(conn);
*/
- LDAPDebug(LDAP_DEBUG_CONNS,"conn %" NSPRIu64 " leaving turbo mode due
to %d\n",
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,"conn %" NSPRIu64 " leaving
turbo mode due to %d\n",
conn->c_connid,ret,0);
goto done;
case CONN_SHUTDOWN:
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"op_thread received shutdown signal\n", 0, 0, 0 );
g_decr_active_threadcnt();
doshutdown = 1;
@@ -1718,7 +1718,7 @@ connection_threadmain()
*/
conn->c_idlesince = curtime;
connection_activity(conn, maxthreads);
- LDAPDebug(LDAP_DEBUG_CONNS,"conn %" NSPRIu64 " queued because
more_data\n",
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,"conn %" NSPRIu64 " queued
because more_data\n",
conn->c_connid,0,0);
} else {
/* keep count of how many times maxthreads has blocked an operation */
@@ -1744,7 +1744,7 @@ connection_threadmain()
if (conn->c_flags & CONN_FLAG_IMPORT) {
if ((tag != LDAP_REQ_ADD) && (tag != LDAP_REQ_EXTENDED)) {
/* no cookie for you. */
- LDAPDebug(LDAP_DEBUG_ANY, "Attempted operation %d "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Attempted operation %d "
"from within bulk import\n",
tag, 0, 0);
slapi_send_ldap_result(pb, LDAP_PROTOCOL_ERROR, NULL,
@@ -1801,7 +1801,7 @@ done:
/* If we're in turbo mode, we keep our reference to the connection alive */
/* can't use the more_data var because connection could have changed in another
thread */
more_data = conn_buffered_data_avail_nolock(conn, &conn_closed) ? 1 : 0;
- LDAPDebug(LDAP_DEBUG_CONNS,"conn %" NSPRIu64 " check more_data %d
thread_turbo_flag %d\n",
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,"conn %" NSPRIu64 " check
more_data %d thread_turbo_flag %d\n",
conn->c_connid,more_data,thread_turbo_flag);
if (!more_data) {
if (!thread_turbo_flag) {
@@ -1849,7 +1849,7 @@ connection_activity(Connection *conn, int maxthreads)
struct Slapi_op_stack *op_stack_obj;
if (connection_acquire_nolock (conn) == -1) {
- LDAPDebug(LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"could not acquire lock in connection_activity as conn %" NSPRIu64
" closing fd=%d\n",
conn->c_connid,conn->c_sd,0);
/* XXX how to handle this error? */
@@ -1889,7 +1889,7 @@ add_work_q( work_q_item *wqitem, struct Slapi_op_stack *op_stack_obj
)
{
struct Slapi_work_q *new_work_q=NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "add_work_q \n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "add_work_q \n", 0, 0, 0 );
new_work_q = create_work_q();
new_work_q->work_item = wqitem;
@@ -1953,7 +1953,7 @@ get_work_q(struct Slapi_op_stack **op_stack_obj)
void
op_thread_cleanup()
{
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"slapd shutting down - signaling operation threads - op stack size %d max work
q size %d max work q stack size %d\n",
op_stack_size, work_q_size_max, work_q_stack_size_max);
@@ -2033,7 +2033,7 @@ connection_remove_operation( Connection *conn, Operation *op )
if ( *tmp == NULL )
{
- LDAPDebug( LDAP_DEBUG_ANY, "connection_remove_operation: can't find op %d for
conn %" NSPRIu64 "\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "connection_remove_operation: can't find op
%d for conn %" NSPRIu64 "\n",
(int)op->o_msgid, conn->c_connid, 0 );
}
else
@@ -2211,7 +2211,7 @@ disconnect_server_nomutex_ext( Connection *conn, PRUint64 opconnid,
int opid, PR
if ( ( conn->c_sd != SLAPD_INVALID_SOCKET &&
conn->c_connid == opconnid ) && !(conn->c_flags &
CONN_FLAG_CLOSING) )
{
- LDAPDebug(LDAP_DEBUG_CONNS, "setting conn %" NSPRIu64 " fd=%d "
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG, "setting conn %" NSPRIu64 " fd=%d
"
"to be disconnected: reason %d\n", conn->c_connid, conn->c_sd,
reason);
/*
* PR_Close must be called before anything else is done because
diff --git a/ldap/servers/slapd/conntable.c b/ldap/servers/slapd/conntable.c
index b5cd47a..15ca71c 100644
--- a/ldap/servers/slapd/conntable.c
+++ b/ldap/servers/slapd/conntable.c
@@ -146,7 +146,7 @@ connection_table_get_connection(Connection_Table *ct, int sd)
{
c->c_mutex = NULL;
c->c_pdumutex = NULL;
- LDAPDebug( LDAP_DEBUG_ANY,"PR_NewLock failed\n",0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"PR_NewLock failed\n",0, 0, 0 );
exit(1);
}
}
@@ -164,7 +164,7 @@ connection_table_get_connection(Connection_Table *ct, int sd)
else
{
/* couldn't find a Connection */
- LDAPDebug( LDAP_DEBUG_CONNS, "max open connections reached\n", 0, 0,
0);
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG, "max open connections
reached\n", 0, 0, 0);
}
return c;
}
@@ -473,7 +473,7 @@ connection_table_dump_activity_to_errors_log(Connection_Table *ct)
int r = ct->fd[j].out_flags & SLAPD_POLL_FLAGS;
if ( r )
{
- LDAPDebug( LDAP_DEBUG_CONNS,"activity on %d%s\n", i, r ? "r" :
"",0 );
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,"activity on %d%s\n", i, r ?
"r" : "",0 );
}
}
PR_ExitMonitor(c->c_mutex);
diff --git a/ldap/servers/slapd/control.c b/ldap/servers/slapd/control.c
index 79a639d..dd435ba 100644
--- a/ldap/servers/slapd/control.c
+++ b/ldap/servers/slapd/control.c
@@ -197,10 +197,10 @@ get_ldapmessage_controls_ext(
* }
*/
- LDAPDebug( LDAP_DEBUG_TRACE, "=> get_ldapmessage_controls\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> get_ldapmessage_controls\n", 0,
0, 0 );
if (!pb) {
- LDAPDebug( LDAP_DEBUG_ANY, "<= get_ldapmessage_controls NULL PBlock\n", 0,
0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "<= get_ldapmessage_controls NULL
PBlock\n", 0, 0, 0 );
return( LDAP_OPERATIONS_ERROR ); /* unexpected error */
}
@@ -215,19 +215,19 @@ get_ldapmessage_controls_ext(
* check to see if controls were included
*/
if ( ber_get_option( ber, LBER_OPT_REMAINING_BYTES, &len ) != 0 ) {
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= get_ldapmessage_controls LDAP_OPERATIONS_ERROR\n",
0, 0, 0 );
return( LDAP_OPERATIONS_ERROR ); /* unexpected error */
}
if ( len == 0 ) {
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= get_ldapmessage_controls no controls\n", 0, 0, 0 );
return( LDAP_SUCCESS ); /* no controls */
}
if (( tag = ber_peek_tag( ber, &len )) != LDAP_TAG_CONTROLS ) {
if ( tag == LBER_ERROR ) {
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= get_ldapmessage_controls LDAP_PROTOCOL_ERROR\n",
0, 0, 0 );
return( LDAP_PROTOCOL_ERROR ); /* decoding error */
@@ -237,7 +237,7 @@ get_ldapmessage_controls_ext(
* happen in LDAPv3, but we don't treat this is a hard error --
* we just ignore the extra stuff.
*/
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= get_ldapmessage_controls ignoring unrecognized data in request (tag
0x%x)\n",
tag, 0, 0 );
return( LDAP_SUCCESS );
@@ -376,13 +376,13 @@ get_ldapmessage_controls_ext(
}
#endif /* SLAPD_ECHO_CONTROL */
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= get_ldapmessage_controls %d controls\n", curcontrols, 0, 0 );
return( LDAP_SUCCESS );
free_and_return:;
ldap_controls_free( ctrls );
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= get_ldapmessage_controls %i\n", rc, 0, 0 );
return( rc );
}
@@ -402,7 +402,7 @@ slapi_control_present( LDAPControl **controls, char *oid, struct
berval **val, i
{
int i;
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"=> slapi_control_present (looking for %s)\n", oid, 0, 0 );
if ( val != NULL ) {
@@ -410,7 +410,7 @@ slapi_control_present( LDAPControl **controls, char *oid, struct
berval **val, i
}
if ( controls == NULL ) {
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= slapi_control_present 0 (NO CONTROLS)\n", 0, 0, 0 );
return( 0 );
}
@@ -423,13 +423,13 @@ slapi_control_present( LDAPControl **controls, char *oid, struct
berval **val, i
*iscritical = (int) controls[i]->ldctl_iscritical;
}
}
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= slapi_control_present 1 (FOUND)\n", 0, 0, 0 );
return( 1 );
}
}
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= slapi_control_present 0 (NOT FOUND)\n", 0, 0, 0 );
return( 0 );
}
diff --git a/ldap/servers/slapd/counters.c b/ldap/servers/slapd/counters.c
index 1d4ac89..1aa3390 100644
--- a/ldap/servers/slapd/counters.c
+++ b/ldap/servers/slapd/counters.c
@@ -146,13 +146,13 @@ counters_to_errors_log(const char *text)
#if defined(DEBUG)
int i;
fetch_counters();
- LDAPDebug( LDAP_DEBUG_ANY, "Counter Dump - %s\n",text, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Counter Dump - %s\n",text, 0, 0);
for(i=0;i<num_counters;i++)
{
char value[40];
char *type= (char*)malloc(counter_size(&counters[i])+4);
counter_dump(type,value,i);
- LDAPDebug( LDAP_DEBUG_ANY, "%s %s\n",type, value, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s %s\n",type, value, 0);
free(type);
}
#endif
diff --git a/ldap/servers/slapd/daemon.c b/ldap/servers/slapd/daemon.c
index a3d55e0..fce22ef 100644
--- a/ldap/servers/slapd/daemon.c
+++ b/ldap/servers/slapd/daemon.c
@@ -140,7 +140,7 @@ accept_and_configure(int s, PRFileDesc *pr_acceptfd, PRNetAddr
*pr_netaddr,
(*pr_clonefd) = PR_Accept(pr_acceptfd, pr_netaddr, pr_timeout);
if( !(*pr_clonefd) ) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug( LDAP_DEBUG_ANY, "PR_Accept() failed, "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "PR_Accept() failed, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0 );
return(SLAPD_INVALID_SOCKET);
@@ -570,7 +570,7 @@ disk_monitoring_thread(void *nothing)
*/
if(passed_threshold){
if(logs_disabled){
- LDAPDebug(LDAP_DEBUG_ANY, "Disk space is now within acceptable levels.
"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Disk space is now within
acceptable levels. "
"Restoring the log settings.\n",0,0,0);
if(using_accesslog){
config_set_accesslog_enabled(LOGGING_ON);
@@ -582,7 +582,7 @@ disk_monitoring_thread(void *nothing)
config_set_auditfaillog_enabled(LOGGING_ON);
}
} else {
- LDAPDebug(LDAP_DEBUG_ANY, "Disk space is now within acceptable
levels.\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Disk space is now within
acceptable levels.\n",0,0,0);
}
deleted_rotated_logs = 0;
passed_threshold = 0;
@@ -597,7 +597,7 @@ disk_monitoring_thread(void *nothing)
* Check if we are already critical
*/
if(disk_space < 4096){ /* 4 k */
- LDAPDebug(LDAP_DEBUG_ANY, "Disk space is critically low on disk (%s),
remaining space: %" NSPRIu64 " Kb. "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Disk space is critically low on disk
(%s), remaining space: %" NSPRIu64 " Kb. "
"Signaling slapd for shutdown...\n", dirstr , (disk_space /
1024), 0);
g_set_shutdown( SLAPI_SHUTDOWN_EXIT );
return;
@@ -607,7 +607,7 @@ disk_monitoring_thread(void *nothing)
* if logging is not critical
*/
if(verbose_logging != 0 && verbose_logging != LDAP_DEBUG_ANY){
- LDAPDebug(LDAP_DEBUG_ANY, "Disk space is low on disk (%s), remaining
space: %" NSPRIu64 " Kb, "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Disk space is low on disk (%s),
remaining space: %" NSPRIu64 " Kb, "
"temporarily setting error loglevel to the default
level(%d).\n", dirstr,
(disk_space / 1024), SLAPD_DEFAULT_ERRORLOG_LEVEL);
/* Setting the log level back to zero, actually sets the value to
LDAP_DEBUG_ANY */
@@ -621,7 +621,7 @@ disk_monitoring_thread(void *nothing)
* access/audit logs, log another error, and continue.
*/
if(!logs_disabled && !logging_critical){
- LDAPDebug(LDAP_DEBUG_ANY, "Disk space is too low on disk (%s), remaining
space: %" NSPRIu64 " Kb, "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Disk space is too low on disk (%s),
remaining space: %" NSPRIu64 " Kb, "
"disabling access and audit logging.\n", dirstr, (disk_space /
1024), 0);
config_set_accesslog_enabled(LOGGING_OFF);
config_set_auditlog_enabled(LOGGING_OFF);
@@ -634,7 +634,7 @@ disk_monitoring_thread(void *nothing)
* access/audit logging, then delete the rotated logs, log another error, and
continue.
*/
if(!deleted_rotated_logs && !logging_critical){
- LDAPDebug(LDAP_DEBUG_ANY, "Disk space is too low on disk (%s), remaining
space: %" NSPRIu64 " Kb, "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Disk space is too low on disk (%s),
remaining space: %" NSPRIu64 " Kb, "
"deleting rotated logs.\n", dirstr, (disk_space / 1024), 0);
log__delete_rotated_logs();
deleted_rotated_logs = 1;
@@ -644,7 +644,7 @@ disk_monitoring_thread(void *nothing)
* Ok, we've done what we can, log a message if we continue to lose
available disk space
*/
if(disk_space < previous_mark){
- LDAPDebug(LDAP_DEBUG_ANY, "Disk space is too low on disk (%s), remaining
space: %" NSPRIu64 " Kb\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Disk space is too low on disk (%s),
remaining space: %" NSPRIu64 " Kb\n",
dirstr, (disk_space / 1024), 0);
}
/*
@@ -656,7 +656,7 @@ disk_monitoring_thread(void *nothing)
*
*/
if(disk_space < halfway){
- LDAPDebug(LDAP_DEBUG_ANY, "Disk space on (%s) is too far below the
threshold(%" NSPRIu64 " bytes). "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Disk space on (%s) is too far below
the threshold(%" NSPRIu64 " bytes). "
"Waiting %d minutes for disk space to be cleaned up before shutting
slapd down...\n",
dirstr, threshold, (grace_period / 60));
time(&start);
@@ -678,7 +678,7 @@ disk_monitoring_thread(void *nothing)
/*
* Excellent, we are back to acceptable levels, reset everything...
*/
- LDAPDebug(LDAP_DEBUG_ANY, "Available disk space is now
acceptable (%" NSPRIu64 " bytes). Aborting"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Available disk space is now
acceptable (%" NSPRIu64 " bytes). Aborting"
" shutdown, and restoring the log
settings.\n",disk_space,0,0);
if(logs_disabled && using_accesslog){
config_set_accesslog_enabled(LOGGING_ON);
@@ -701,7 +701,7 @@ disk_monitoring_thread(void *nothing)
/*
* Disk space is critical, log an error, and shut it down now!
*/
- LDAPDebug(LDAP_DEBUG_ANY, "Disk space is critically low on disk
(%s), remaining space: %" NSPRIu64 " Kb."
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Disk space is critically low
on disk (%s), remaining space: %" NSPRIu64 " Kb."
" Signaling slapd for shutdown...\n", dirstr,
(disk_space / 1024), 0);
g_set_shutdown( SLAPI_SHUTDOWN_DISKFULL );
return;
@@ -718,7 +718,7 @@ disk_monitoring_thread(void *nothing)
/*
* If disk space was freed up we would of detected in the above while loop.
So shut it down.
*/
- LDAPDebug(LDAP_DEBUG_ANY, "Disk space is still too low (%" NSPRIu64
" Kb). Signaling slapd for shutdown...\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Disk space is still too low (%"
NSPRIu64 " Kb). Signaling slapd for shutdown...\n",
(disk_space / 1024), 0, 0);
g_set_shutdown( SLAPI_SHUTDOWN_DISKFULL );
@@ -1051,7 +1051,7 @@ void slapd_daemon( daemon_ports_t *ports )
(i_unix == NULL) &&
#endif /* ENABLE_LDAPI */
(s_tcps == NULL) ) { /* nothing to do */
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"no port to listen on\n", 0, 0, 0 );
exit( 1 );
}
@@ -1066,7 +1066,7 @@ void slapd_daemon( daemon_ports_t *ports )
SLAPD_DEFAULT_THREAD_STACKSIZE);
if ( NULL == time_thread_p ) {
PRErrorCode errorCode = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, "Unable to create time thread - Shutting Down ("
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Unable to create time thread - Shutting Down
("
SLAPI_COMPONENT_NAME_NSPR " error %d - %s)\n",
errorCode, slapd_pr_strerror(errorCode), 0);
g_set_shutdown( SLAPI_SHUTDOWN_EXIT );
@@ -1101,7 +1101,7 @@ void slapd_daemon( daemon_ports_t *ports )
SLAPD_DEFAULT_THREAD_STACKSIZE);
if ( NULL == disk_thread_p ) {
PRErrorCode errorCode = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, "Unable to create disk monitoring thread -
Shutting Down ("
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Unable to create disk monitoring
thread - Shutting Down ("
SLAPI_COMPONENT_NAME_NSPR " error %d - %s)\n",
errorCode, slapd_pr_strerror(errorCode), 0);
g_set_shutdown( SLAPI_SHUTDOWN_EXIT );
@@ -1227,7 +1227,7 @@ void slapd_daemon( daemon_ports_t *ports )
#ifdef ENABLE_NUNC_STANS
if (enable_nunc_stans && ns_thrpool_wait(tp)) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ns_thrpool_wait failed errno %d (%s)\n", errno,
slapd_system_strerror(errno), 0 );
}
@@ -1246,7 +1246,7 @@ void slapd_daemon( daemon_ports_t *ports )
break;
case -1: /* Error */
prerr = PR_GetError();
- LDAPDebug( LDAP_DEBUG_TRACE, "PR_Poll() failed, "
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "PR_Poll() failed, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_system_strerror(prerr), 0 );
break;
@@ -1318,7 +1318,7 @@ void slapd_daemon( daemon_ports_t *ports )
threads = g_get_active_threadcnt();
if ( threads > 0 ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"slapd shutting down - waiting for %d thread%s to terminate\n",
threads, ( threads > 1 ) ? "s" : "", 0 );
}
@@ -1340,14 +1340,14 @@ void slapd_daemon( daemon_ports_t *ports )
spe = PR_Read(signalpipe[0], &x, 1);
if (spe < 0) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug( LDAP_DEBUG_ANY, "listener could not clear signal pipe, "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "listener could not clear signal pipe,
"
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_system_strerror(prerr), 0 );
break;
}
} else if (spe == -1) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug( LDAP_DEBUG_ANY, "PR_Poll() failed, "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "PR_Poll() failed, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_system_strerror(prerr), 0 );
break;
@@ -1357,21 +1357,21 @@ void slapd_daemon( daemon_ports_t *ports )
}
DS_Sleep(PR_INTERVAL_NO_WAIT);
if ( threads != g_get_active_threadcnt() ) {
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"slapd shutting down - waiting for %d threads to terminate\n",
g_get_active_threadcnt(), 0, 0 );
threads = g_get_active_threadcnt();
}
}
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"slapd shutting down - closing down internal subsystems and plugins\n",
0, 0, 0 );
log_access_flush();
/* let backends do whatever cleanup they need to do */
- LDAPDebug( LDAP_DEBUG_TRACE,"slapd shutting down - waiting for backends to close
down\n", 0, 0,0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"slapd shutting down - waiting for backends
to close down\n", 0, 0,0 );
eq_stop();
if ( ! in_referral_mode ) {
@@ -1412,7 +1412,7 @@ void slapd_daemon( daemon_ports_t *ports )
be_cleanupall ();
plugin_dependency_freeall();
connection_post_shutdown_cleanup();
- LDAPDebug( LDAP_DEBUG_TRACE, "slapd shutting down - backends closed down\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "slapd shutting down - backends closed
down\n",
0, 0, 0 );
referrals_free();
schema_destroy_dse_lock();
@@ -1424,7 +1424,7 @@ void slapd_daemon( daemon_ports_t *ports )
if ( g_get_shutdown() == SLAPI_SHUTDOWN_DISKFULL ){
/* This is a server-induced shutdown, we need to manually remove the pid file */
if( unlink(get_pid_file()) ){
- LDAPDebug( LDAP_DEBUG_ANY, "Failed to remove pid file %s\n", get_pid_file(),
0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to remove pid file %s\n",
get_pid_file(), 0, 0 );
}
}
}
@@ -1439,7 +1439,7 @@ int signal_listner()
/* this now means that the pipe is full
* this is not a problem just go-on
*/
- LDAPDebug( LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"listener could not write to signal pipe %d\n",
errno, 0, 0 );
}
@@ -1454,9 +1454,9 @@ static int clear_signal(struct POLL_STRUCT *fds)
if ( fds[FDS_SIGNAL_PIPE].out_flags & SLAPD_POLL_FLAGS ) {
char buf[200];
- LDAPDebug( LDAP_DEBUG_CONNS, "listener got signaled\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG, "listener got signaled\n", 0, 0, 0 );
if ( read( readsignalpipe, buf, 200 ) < 1 ) {
- LDAPDebug( LDAP_DEBUG_ANY, "listener could not clear signal pipe\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "listener could not clear signal
pipe\n",
0, 0, 0 );
}
}
@@ -1483,7 +1483,7 @@ setup_pr_read_pds(Connection_Table *ct, PRFileDesc **n_tcps,
PRFileDesc **s_tcps
slapdFrontendConfig->reservedescriptors);
if ( !
accept_new_connections ) {
if ( last_accept_new_connections ) {
- LDAPDebug( LDAP_DEBUG_ANY, "Not listening for new "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Not listening for new "
"connections - too many fds open\n", 0, 0, 0 );
/* reinitialize n_tcps and s_tcps to the pds */
first_time_setup_pr_read_pds = 1;
@@ -1491,7 +1491,7 @@ setup_pr_read_pds(Connection_Table *ct, PRFileDesc **n_tcps,
PRFileDesc **s_tcps
} else {
if ( ! last_accept_new_connections &&
last_accept_new_connections != -1 ) {
- LDAPDebug( LDAP_DEBUG_ANY, "Listening for new "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Listening for new "
"connections again\n", 0, 0, 0 );
/* reinitialize n_tcps and s_tcps to the pds */
first_time_setup_pr_read_pds = 1;
@@ -1529,7 +1529,7 @@ setup_pr_read_pds(Connection_Table *ct, PRFileDesc **n_tcps,
PRFileDesc **s_tcps
listener_idxs[n_listeners].listenfd = *fdesc;
listener_idxs[n_listeners].idx = count;
n_listeners++;
- LDAPDebug( LDAP_DEBUG_HOUSE,
+ LDAPDebug(LDAP_DEBUG_HOUSE, LOG_DEBUG,
"listening for connections on %d\n", socketdesc, 0, 0 );
}
} else {
@@ -1551,7 +1551,7 @@ setup_pr_read_pds(Connection_Table *ct, PRFileDesc **n_tcps,
PRFileDesc **s_tcps
listener_idxs[n_listeners].idx = count;
listener_idxs[n_listeners].secure = 1;
n_listeners++;
- LDAPDebug( LDAP_DEBUG_HOUSE,
+ LDAPDebug(LDAP_DEBUG_HOUSE, LOG_DEBUG,
"listening for SSL connections on %d\n", socketdesc, 0, 0 );
}
} else {
@@ -1575,7 +1575,7 @@ setup_pr_read_pds(Connection_Table *ct, PRFileDesc **n_tcps,
PRFileDesc **s_tcps
listener_idxs[n_listeners].idx = count;
listener_idxs[n_listeners].local = 1;
n_listeners++;
- LDAPDebug( LDAP_DEBUG_HOUSE,
+ LDAPDebug(LDAP_DEBUG_HOUSE, LOG_DEBUG,
"listening for LDAPI connections on %d\n", socketdesc, 0, 0 );
}
} else {
@@ -1770,7 +1770,7 @@ handle_pr_read_ready(Connection_Table *ct, PRIntn num_poll)
if ( !readready && out_flags )
{
/* some error occured */
- LDAPDebug( LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"POLL_FN() says connection on sd %d is bad "
"(closing)\n", c->c_sd, 0, 0 );
disconnect_server_nomutex( c, c->c_connid, -1,
@@ -1779,7 +1779,7 @@ handle_pr_read_ready(Connection_Table *ct, PRIntn num_poll)
else if ( readready )
{
/* read activity */
- LDAPDebug( LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"read activity on %d\n", c->c_ci, 0, 0 );
c->c_idlesince = curtime;
@@ -1789,7 +1789,7 @@ handle_pr_read_ready(Connection_Table *ct, PRIntn num_poll)
/* This might happen as a result of
* trying to acquire a closing connection
*/
- LDAPDebug (LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"connection_activity: abandoning conn %" NSPRIu64 " as fd=%d is
already closing\n",
c->c_connid,c->c_sd,0);
/* The call disconnect_server should do nothing,
@@ -1967,7 +1967,7 @@ ns_handle_pr_read_ready(struct ns_job_t *job)
LDAPDebug2Args(LDAP_DEBUG_CONNS, "socket has no data available conn %"
NSPRIu64 " for fd=%d\n",
c->c_connid, c->c_sd);
} else {
- LDAPDebug(LDAP_DEBUG_CONNS, "socket has error [%d] conn %" NSPRIu64 "
for fd=%d\n",
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG, "socket has error [%d] conn %"
NSPRIu64 " for fd=%d\n",
errno, c->c_connid, c->c_sd);
}
}
@@ -2032,7 +2032,7 @@ slapd_poll( void *handle, int output )
if (rc < 0) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, "slapd_poll(%d) "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "slapd_poll(%d) "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
handle, prerr, slapd_pr_strerror(prerr));
if ( prerr == PR_PENDING_INTERRUPT_ERROR ||
@@ -2043,7 +2043,7 @@ slapd_poll( void *handle, int output )
} else if (rc == 0 && ioblock_timeout > 0) {
PRIntn ihandle;
ihandle = PR_FileDesc2NativeHandle((PRFileDesc *)handle);
- LDAPDebug(LDAP_DEBUG_ANY, "slapd_poll(%d) timed out\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "slapd_poll(%d) timed out\n",
ihandle, 0, 0);
PR_SetError(PR_IO_TIMEOUT_ERROR, EAGAIN); /* timeout */
rc = -1;
@@ -2080,18 +2080,18 @@ write_function( int ignore, const void *buffer, int count, struct
lextiof_socket
sentbytes += bytes;
} else if (bytes < 0) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_CONNS, "PR_Write(%d) "
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG, "PR_Write(%d) "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
fd, prerr, slapd_pr_strerror( prerr ));
if ( !SLAPD_PR_WOULD_BLOCK_ERROR(prerr)) {
if (prerr != PR_CONNECT_RESET_ERROR) {
/* 'TCP connection reset by peer': no need to log */
- LDAPDebug(LDAP_DEBUG_ANY, "PR_Write(%d) "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "PR_Write(%d) "
SLAPI_COMPONENT_NAME_NSPR " error %d
(%s)\n",
fd, prerr, slapd_pr_strerror( prerr ));
}
if (sentbytes < count) {
- LDAPDebug(LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"PR_Write(%d) - wrote only %d bytes (expected %d
bytes) - 0 (EOF)\n", /* disconnected */
fd, sentbytes, count);
}
@@ -2099,7 +2099,7 @@ write_function( int ignore, const void *buffer, int count, struct
lextiof_socket
}
} else if (bytes == 0) { /* disconnect */
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"PR_Write(%d) - 0 (EOF) %d:%s\n", /* disconnected */
fd, prerr, slapd_pr_strerror(prerr));
PR_SetError(PR_PIPE_ERROR, EPIPE);
@@ -2109,7 +2109,7 @@ write_function( int ignore, const void *buffer, int count, struct
lextiof_socket
if (sentbytes == count) { /* success */
return count;
} else if (sentbytes > count) { /* too many bytes */
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"PR_Write(%d) overflow - sent %d bytes (expected %d bytes)
- error\n",
fd, sentbytes, count);
PR_SetError(PR_BUFFER_OVERFLOW_ERROR, EMSGSIZE);
@@ -2560,7 +2560,7 @@ handle_new_connection(Connection_Table *ct, int tcps, PRFileDesc
*pr_acceptfd, i
if (rv < 0) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug (LDAP_DEBUG_ANY, "SSL_HandshakeCallback() %d "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "SSL_HandshakeCallback() %d "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
rv, prerr, slapd_pr_strerror( prerr ));
}
@@ -2568,7 +2568,7 @@ handle_new_connection(Connection_Table *ct, int tcps, PRFileDesc
*pr_acceptfd, i
if (rv < 0) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug (LDAP_DEBUG_ANY, "SSL_BadCertHook(%i) %i "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "SSL_BadCertHook(%i) %i "
SLAPI_COMPONENT_NAME_NSPR " error %d\n",
conn->c_sd, rv, prerr);
}
@@ -2641,7 +2641,7 @@ ns_handle_new_connection(struct ns_job_t *job)
*/
ns_disable_listener(li);
} else {
- LDAPDebug(LDAP_DEBUG_CONNS, "Error accepting new connection listenfd=%d
[%d:%s]\n",
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG, "Error accepting new connection
listenfd=%d [%d:%s]\n",
PR_FileDesc2NativeHandle(li->listenfd), prerr,
slapd_pr_strerror(prerr));
}
@@ -2671,10 +2671,10 @@ static int init_shutdown_detect(void)
int rc;
sigset_t proc_mask;
- LDAPDebug( LDAP_DEBUG_TRACE, "Reseting signal mask....\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "Reseting signal mask....\n", 0, 0,
0);
(void)sigemptyset( &proc_mask );
rc = pthread_sigmask( SIG_SETMASK, &proc_mask, NULL );
- LDAPDebug( LDAP_DEBUG_TRACE, " %s \n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, " %s \n",
rc ? "Failed to reset signal mask":"....Done (signal mask
reset)!!", 0, 0 );
}
@@ -2722,7 +2722,7 @@ unfurl_banners(Connection_Table *ct,daemon_ports_t *ports,
PRFileDesc **n_tcps,
int isfirsttime = 1;
if ( ct->size <= slapdFrontendConfig->reservedescriptors ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: Not enough descriptors to accept any connections. "
"This may be because the maxdescriptors configuration "
"directive is too small, the hard limit on descriptors is "
@@ -2748,13 +2748,13 @@ unfurl_banners(Connection_Table *ct,daemon_ports_t *ports,
PRFileDesc **n_tcps,
for (nap = ports->n_listenaddr; nap && *nap; nap++) {
if (isfirsttime) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"slapd started. Listening on %s port %d for LDAP requests\n",
netaddr2string(*nap, addrbuf, sizeof(addrbuf)),
ports->n_port, 0 );
isfirsttime = 0;
} else {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Listening on %s port %d for LDAP requests\n",
netaddr2string(*nap, addrbuf, sizeof(addrbuf)),
ports->n_port, 0 );
@@ -2767,13 +2767,13 @@ unfurl_banners(Connection_Table *ct,daemon_ports_t *ports,
PRFileDesc **n_tcps,
for (sap = ports->s_listenaddr; sap && *sap; sap++) {
if (isfirsttime) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"slapd started. Listening on %s port %d for LDAPS requests\n",
netaddr2string(*sap, addrbuf, sizeof(addrbuf)),
ports->s_port, 0 );
isfirsttime = 0;
} else {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Listening on %s port %d for LDAPS requests\n",
netaddr2string(*sap, addrbuf, sizeof(addrbuf)),
ports->s_port, 0 );
@@ -2785,7 +2785,7 @@ unfurl_banners(Connection_Table *ct,daemon_ports_t *ports,
PRFileDesc **n_tcps,
if ( i_unix != NULL ) { /* LDAPI */
PRNetAddr **iap = ports->i_listenaddr;
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"%sListening on %s for LDAPI requests\n", isfirsttime?"slapd started.
":"",
(*iap)->local.path, 0 );
}
@@ -2823,7 +2823,7 @@ set_shutdown (int sig)
* yourself).
*/
#if 0
- LDAPDebug( LDAP_DEBUG_ANY, "slapd got shutdown signal\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "slapd got shutdown signal\n", 0, 0, 0
);
#endif
g_set_shutdown( SLAPI_SHUTDOWN_SIGNAL );
#ifndef LINUX
@@ -2868,7 +2868,7 @@ slapd_do_nothing (int sig)
* yourself).
*/
#if 0
- LDAPDebug( LDAP_DEBUG_TRACE, "slapd got SIGUSR1\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "slapd got SIGUSR1\n", 0, 0, 0 );
#endif
(void) SIGNAL( SIGUSR1, slapd_do_nothing );
@@ -2893,7 +2893,7 @@ slapd_wait4child(int sig)
* yourself).
*/
#if 0
- LDAPDebug( LDAP_DEBUG_ARGS, "listener: catching SIGCHLD\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "listener: catching SIGCHLD\n",
0, 0, 0 );
#endif
#ifdef USE_WAITPID
while (waitpid ((pid_t) -1, 0, WAIT_FLAGS) > 0)
@@ -3168,7 +3168,7 @@ createsignalpipe( void )
}
if ( PR_CreatePipe( &signalpipe[0], &signalpipe[1] ) != 0 ) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug( LDAP_DEBUG_ANY, "PR_CreatePipe() failed, "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "PR_CreatePipe() failed, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), SLAPD_DEFAULT_THREAD_STACKSIZE );
return( -1 );
@@ -3176,11 +3176,11 @@ createsignalpipe( void )
writesignalpipe = PR_FileDesc2NativeHandle(signalpipe[1]);
readsignalpipe = PR_FileDesc2NativeHandle(signalpipe[0]);
if(fcntl(writesignalpipe, F_SETFD, O_NONBLOCK) == -1){
- LDAPDebug( LDAP_DEBUG_ANY,"createsignalpipe: failed to set FD for write pipe
(%d).\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"createsignalpipe: failed to set FD for write
pipe (%d).\n",
errno, 0, 0 );
}
if(fcntl(readsignalpipe, F_SETFD, O_NONBLOCK) == -1){
- LDAPDebug( LDAP_DEBUG_ANY,"createsignalpipe: failed to set FD for read pipe
(%d).\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"createsignalpipe: failed to set FD for read
pipe (%d).\n",
errno, 0, 0);
}
return( 0 );
@@ -3215,11 +3215,11 @@ catch_signals()
(void)sigprocmask( SIG_BLOCK, &caught_signals, NULL );
if (( sig = sigwait( &caught_signals )) < 0 ) {
- LDAPDebug( LDAP_DEBUG_ANY, "catch_signals: sigwait returned -1\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "catch_signals: sigwait returned
-1\n",
0, 0, 0 );
continue;
} else {
- LDAPDebug( LDAP_DEBUG_TRACE, "catch_signals: detected signal
%d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "catch_signals: detected signal
%d\n",
sig, 0, 0 );
switch ( sig ) {
case SIGUSR1:
@@ -3233,7 +3233,7 @@ catch_signals()
slapd_wait4child( sig );
break;
default:
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"catch_signals: unknown signal (%d) received\n",
sig, 0, 0 );
}
@@ -3316,7 +3316,7 @@ int configure_pr_socket( PRFileDesc **pr_socket, int secure, int
local )
pr_socketoption.value.keep_alive = 1;
if ( PR_SetSocketOption( *pr_socket, &pr_socketoption ) == PR_FAILURE ) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"PR_SetSocketOption(PR_SockOpt_Keepalive failed, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0 );
@@ -3327,7 +3327,7 @@ int configure_pr_socket( PRFileDesc **pr_socket, int secure, int
local )
pr_socketoption.value.non_blocking = 0;
if ( PR_SetSocketOption( *pr_socket, &pr_socketoption ) == PR_FAILURE ) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"PR_SetSocketOption(PR_SockOpt_Nonblocking) failed, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0 );
@@ -3338,7 +3338,7 @@ int configure_pr_socket( PRFileDesc **pr_socket, int secure, int
local )
pr_socketoption.value.non_blocking = 1;
if ( PR_SetSocketOption( *pr_socket, &pr_socketoption ) == PR_FAILURE ) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"PR_SetSocketOption(PR_SockOpt_Nonblocking) failed, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0 );
@@ -3350,7 +3350,7 @@ int configure_pr_socket( PRFileDesc **pr_socket, int secure, int
local )
pr_socketoption.value.no_delay = 1;
if ( PR_SetSocketOption( *pr_socket, &pr_socketoption ) == PR_FAILURE) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"PR_SetSocketOption(PR_SockOpt_NoDelay) failed, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror( prerr ), 0 );
@@ -3360,7 +3360,7 @@ int configure_pr_socket( PRFileDesc **pr_socket, int secure, int
local )
pr_socketoption.value.no_delay = 0;
if ( PR_SetSocketOption( *pr_socket, &pr_socketoption ) == PR_FAILURE) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"PR_SetSocketOption(PR_SockOpt_NoDelay) failed, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror( prerr ), 0 );
@@ -3389,7 +3389,7 @@ void configure_ns_socket( int * ns )
}
/* check for errors */
if((rc = setsockopt( *ns, IPPROTO_TCP, TCP_NODELAY, (char * ) &on, sizeof(on) ) !=
0)){
- LDAPDebug( LDAP_DEBUG_ANY,"configure_ns_socket: Failed to configure socket
(%d).\n", rc, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"configure_ns_socket: Failed to configure socket
(%d).\n", rc, 0, 0);
}
return;
diff --git a/ldap/servers/slapd/defbackend.c b/ldap/servers/slapd/defbackend.c
index da4a701..120a35f 100644
--- a/ldap/servers/slapd/defbackend.c
+++ b/ldap/servers/slapd/defbackend.c
@@ -60,7 +60,7 @@ defbackend_init( void )
char *errmsg;
Slapi_PBlock pb;
- LDAPDebug( LDAP_DEBUG_TRACE, "defbackend_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "defbackend_init\n", 0, 0, 0 );
/*
* create a new backend
@@ -119,7 +119,7 @@ defbackend_init( void )
cleanup_and_return:
if ( rc != 0 ) {
- LDAPDebug( LDAP_DEBUG_ANY, "defbackend_init: failed (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "defbackend_init: failed (%s)\n",
errmsg, 0, 0 );
exit( 1 );
}
@@ -144,7 +144,7 @@ defbackend_get_backend( void )
static int
defbackend_default( Slapi_PBlock *pb )
{
- LDAPDebug( LDAP_DEBUG_TRACE, "defbackend_default\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "defbackend_default\n", 0, 0, 0 );
send_nobackend_ldap_result( pb );
@@ -155,7 +155,7 @@ defbackend_default( Slapi_PBlock *pb )
static int
defbackend_noop( Slapi_PBlock *pb )
{
- LDAPDebug( LDAP_DEBUG_TRACE, "defbackend_noop\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "defbackend_noop\n", 0, 0, 0 );
return( DEFBACKEND_OP_HANDLED );
}
@@ -164,7 +164,7 @@ defbackend_noop( Slapi_PBlock *pb )
static int
defbackend_abandon( Slapi_PBlock *pb )
{
- LDAPDebug( LDAP_DEBUG_TRACE, "defbackend_abandon\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "defbackend_abandon\n", 0, 0, 0 );
/* nothing to do */
return( DEFBACKEND_OP_HANDLED );
@@ -223,7 +223,7 @@ defbackend_bind( Slapi_PBlock *pb )
ber_tag_t method;
struct berval *cred;
- LDAPDebug( LDAP_DEBUG_TRACE, "defbackend_bind\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "defbackend_bind\n", 0, 0, 0 );
/*
* Accept simple binds that do not contain passwords (but do not
@@ -277,7 +277,7 @@ defbackend_bind( Slapi_PBlock *pb )
static int
defbackend_next_search_entry( Slapi_PBlock *pb )
{
- LDAPDebug( LDAP_DEBUG_TRACE, "defbackend_next_search_entry\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "defbackend_next_search_entry\n", 0,
0, 0 );
return( 0 ); /* no entries and no error */
}
diff --git a/ldap/servers/slapd/delete.c b/ldap/servers/slapd/delete.c
index 6b7488d..da236fd 100644
--- a/ldap/servers/slapd/delete.c
+++ b/ldap/servers/slapd/delete.c
@@ -43,7 +43,7 @@ do_delete( Slapi_PBlock *pb )
char *rawdn = NULL;
int err = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "do_delete\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "do_delete\n", 0, 0, 0 );
slapi_pblock_get( pb, SLAPI_OPERATION, &operation);
ber = operation->o_ber;
@@ -58,7 +58,7 @@ do_delete( Slapi_PBlock *pb )
*/
if ( ber_scanf( pb->pb_op->o_ber, "a", &rawdn ) == LBER_ERROR ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ber_scanf failed (op=Delete; params=DN)\n", 0, 0, 0 );
op_shared_log_error_access (pb, "DEL", "???", "decoding
error");
send_ldap_result( pb, LDAP_PROTOCOL_ERROR, NULL, NULL, 0,
diff --git a/ldap/servers/slapd/detach.c b/ldap/servers/slapd/detach.c
index 102ce33..a6f4ec4 100644
--- a/ldap/servers/slapd/detach.c
+++ b/ldap/servers/slapd/detach.c
@@ -225,7 +225,7 @@ static void raise_process_fd_limits(void)
if ( getrlimit( RLIMIT_NOFILE, &rl ) != 0 ) {
int oserr = errno;
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"getrlimit of descriptor limit failed - error %d (%s)\n",
oserr, slapd_system_strerror( oserr ), 0 );
return;
@@ -247,7 +247,7 @@ static void raise_process_fd_limits(void)
if ( setrlimit( RLIMIT_NOFILE, &setrl ) != 0 ) {
int oserr = errno;
- LDAPDebug( LDAP_DEBUG_ANY, "setrlimit of descriptor "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "setrlimit of descriptor "
"limit to %d failed - error %d (%s)\n",
setrl.rlim_cur, oserr,
slapd_system_strerror(oserr));
@@ -256,7 +256,7 @@ static void raise_process_fd_limits(void)
}
(void)getrlimit( RLIMIT_NOFILE, &rl );
- LDAPDebug( LDAP_DEBUG_TRACE, "descriptor limit changed from %d to %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "descriptor limit changed from %d to
%d\n",
curlim, rl.rlim_cur, 0 );
}
@@ -274,11 +274,11 @@ raise_process_limits()
if (getrlimit(RLIMIT_DATA,&rl) == 0) {
rl.rlim_cur = rl.rlim_max;
if (setrlimit(RLIMIT_DATA,&rl) != 0) {
- LDAPDebug(LDAP_DEBUG_TRACE,"setrlimit(RLIMIT_DATA) failed %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"setrlimit(RLIMIT_DATA) failed
%d\n",
errno,0,0);
}
} else {
- LDAPDebug(LDAP_DEBUG_TRACE,"getrlimit(RLIMIT_DATA) failed %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"getrlimit(RLIMIT_DATA) failed
%d\n",
errno,0,0);
}
#endif
@@ -287,11 +287,11 @@ raise_process_limits()
if (getrlimit(RLIMIT_VMEM,&rl) == 0) {
rl.rlim_cur = rl.rlim_max;
if (setrlimit(RLIMIT_VMEM,&rl) != 0) {
- LDAPDebug(LDAP_DEBUG_TRACE,"setrlimit(RLIMIT_VMEM) failed %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"setrlimit(RLIMIT_VMEM) failed
%d\n",
errno,0,0);
}
} else {
- LDAPDebug(LDAP_DEBUG_TRACE,"getrlimit(RLIMIT_VMEM) failed %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"getrlimit(RLIMIT_VMEM) failed
%d\n",
errno,0,0);
}
#endif /* RLIMIT_VMEM */
diff --git a/ldap/servers/slapd/dn.c b/ldap/servers/slapd/dn.c
index 445c3c2..1767073 100644
--- a/ldap/servers/slapd/dn.c
+++ b/ldap/servers/slapd/dn.c
@@ -340,7 +340,7 @@ substr_dn_normalize_orig( char *dn, char *end )
} else if ( *s == '"' ) {
state = B4SEPARATOR;
if (!value) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"slapi_dn_normalize - missing value\n", 0, 0, 0 );
break;
}
@@ -390,7 +390,7 @@ substr_dn_normalize_orig( char *dn, char *end )
}
break;
default:
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"slapi_dn_normalize - unknown state %d\n", state, 0, 0 );
break;
}
@@ -1073,7 +1073,7 @@ slapi_dn_normalize_ext(char *src, size_t src_len, char **dest,
size_t *dest_len)
}
break;
default:
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"slapi_dn_normalize_ext - unknown state %d\n", state, 0, 0 );
break;
}
@@ -1365,9 +1365,9 @@ rdn_av_swap( struct berval *av1, struct berval *av2, int escape )
char *
slapi_dn_normalize_original( char *dn )
{
- /* LDAPDebug( LDAP_DEBUG_TRACE, "=> slapi_dn_normalize \"%s\"\n",
dn, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> slapi_dn_normalize
\"%s\"\n", dn, 0, 0 ); */
*(substr_dn_normalize_orig( dn, dn + strlen( dn ))) = '\0';
- /* LDAPDebug( LDAP_DEBUG_TRACE, "<= slapi_dn_normalize \"%s\"\n",
dn, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= slapi_dn_normalize
\"%s\"\n", dn, 0, 0 ); */
return( dn );
}
@@ -1376,9 +1376,9 @@ slapi_dn_normalize_original( char *dn )
char *
slapi_dn_normalize_case_original( char *dn )
{
- /* LDAPDebug( LDAP_DEBUG_TRACE, "=> slapi_dn_normalize \"%s\"\n",
dn, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> slapi_dn_normalize
\"%s\"\n", dn, 0, 0 ); */
*(substr_dn_normalize_orig( dn, dn + strlen( dn ))) = '\0';
- /* LDAPDebug( LDAP_DEBUG_TRACE, "<= slapi_dn_normalize \"%s\"\n",
dn, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= slapi_dn_normalize
\"%s\"\n", dn, 0, 0 ); */
/* normalize case */
return( slapi_dn_ignore_case( dn ));
@@ -1392,9 +1392,9 @@ slapi_dn_normalize_case_original( char *dn )
char *
slapi_dn_normalize( char *dn )
{
- /* LDAPDebug( LDAP_DEBUG_TRACE, "=> slapi_dn_normalize \"%s\"\n",
dn, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> slapi_dn_normalize
\"%s\"\n", dn, 0, 0 ); */
*(substr_dn_normalize( dn, dn + strlen( dn ))) = '\0';
- /* LDAPDebug( LDAP_DEBUG_TRACE, "<= slapi_dn_normalize \"%s\"\n",
dn, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= slapi_dn_normalize
\"%s\"\n", dn, 0, 0 ); */
return dn;
}
@@ -2730,7 +2730,7 @@ slapi_moddn_get_newdn(Slapi_DN *dn_olddn, const char *newrdn, const
char *newsup
static void
sdn_dump( const Slapi_DN *sdn, const char *text)
{
- LDAPDebug( LDAP_DEBUG_ANY, "SDN %s ptr=%lx dn=%s\n", text, sdn,
(sdn->dn==NULL?"NULL":sdn->dn));
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "SDN %s ptr=%lx dn=%s\n", text, sdn,
(sdn->dn==NULL?"NULL":sdn->dn));
}
#endif
diff --git a/ldap/servers/slapd/dse.c b/ldap/servers/slapd/dse.c
index 3541e1c..9317108 100644
--- a/ldap/servers/slapd/dse.c
+++ b/ldap/servers/slapd/dse.c
@@ -2332,7 +2332,7 @@ dse_add(Slapi_PBlock *pb) /* JCM There should only be one exit point
from this f
if(dse_call_callback(pdse, pb, SLAPI_OPERATION_ADD, DSE_FLAG_PREOP, e,
NULL, &returncode, returntext)!=SLAPI_DSE_CALLBACK_OK) {
if (!returncode) {
- LDAPDebug( LDAP_DEBUG_ANY, "dse_add: DSE PREOP callback returned error
but did not set returncode\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dse_add: DSE PREOP callback returned
error but did not set returncode\n", 0, 0, 0 );
returncode = LDAP_OPERATIONS_ERROR;
}
rc = returncode;
diff --git a/ldap/servers/slapd/dynalib.c b/ldap/servers/slapd/dynalib.c
index e3d00ee..d112564 100644
--- a/ldap/servers/slapd/dynalib.c
+++ b/ldap/servers/slapd/dynalib.c
@@ -124,17 +124,17 @@ symload_report_error( const char *libpath, char *symbol, char
*plugin, int libop
if ( errlen > 0 ) {
errtext = slapi_ch_malloc( errlen+1 );
if ( PR_GetErrorText( errtext ) > 0 ) {
- LDAPDebug( LDAP_DEBUG_ANY, SLAPI_COMPONENT_NAME_NSPR " error %d: %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, SLAPI_COMPONENT_NAME_NSPR " error %d:
%s\n",
PR_GetError(), errtext, 0 );
}
slapi_ch_free( (void **)&errtext );
}
if ( libopen ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Could not load symbol \"%s\" from \"%s\" for plugin
%s\n",
symbol, libpath, plugin );
} else {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Could not open library \"%s\" for plugin %s\n",
libpath, plugin, 0 );
}
diff --git a/ldap/servers/slapd/entry.c b/ldap/servers/slapd/entry.c
index 0abfde8..8bbf0c4 100644
--- a/ldap/servers/slapd/entry.c
+++ b/ldap/servers/slapd/entry.c
@@ -245,7 +245,7 @@ str2entry_fast( const char *rawdn, const Slapi_RDN *srdn, char *s, int
flags, in
* In case an entry starts with rdn:, dn must be provided.
*/
- LDAPDebug( LDAP_DEBUG_TRACE, "=> str2entry_fast\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> str2entry_fast\n", 0, 0, 0 );
e = slapi_entry_alloc();
slapi_entry_init(e,NULL,NULL);
@@ -375,7 +375,7 @@ str2entry_fast( const char *rawdn, const Slapi_RDN *srdn, char *s, int
flags, in
if ( type.bv_len == SLAPI_ATTR_DN_LENGTH && PL_strncasecmp( type.bv_val,
SLAPI_ATTR_DN, type.bv_len ) == 0 ) {
if ( slapi_entry_get_dn_const(e)!=NULL ) {
char ebuf[ BUFSIZ ];
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"str2entry_fast: entry has multiple dns \"%s\" and "
"\"%s\" (second ignored)\n",
slapi_entry_get_dn_const(e),
@@ -427,7 +427,7 @@ str2entry_fast( const char *rawdn, const Slapi_RDN *srdn, char *s, int
flags, in
/* retrieve uniqueid */
if ((type.bv_len == SLAPI_ATTR_UNIQUEID_LENGTH) && (PL_strcasecmp (type.bv_val,
SLAPI_ATTR_UNIQUEID) == 0)) {
if (e->e_uniqueid != NULL){
- LDAPDebug (LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"str2entry_fast: entry has multiple uniqueids %s "
"and %s (second ignored)\n",
e->e_uniqueid, value.bv_val, 0);
@@ -459,7 +459,7 @@ str2entry_fast( const char *rawdn, const Slapi_RDN *srdn, char *s, int
flags, in
case ATTRIBUTE_PRESENT:
if(attrlist_append_nosyntax_init(&e->e_attrs, type.bv_val, &a)==0 /*
Found */)
{
- LDAPDebug (LDAP_DEBUG_ANY, "str2entry_fast: Error. Non-contiguous attribute
values for %s\n", type.bv_val, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "str2entry_fast: Error. Non-contiguous
attribute values for %s\n", type.bv_val, 0, 0);
PR_ASSERT(0);
continue;
}
@@ -467,13 +467,13 @@ str2entry_fast( const char *rawdn, const Slapi_RDN *srdn, char *s,
int flags, in
case ATTRIBUTE_DELETED:
if(attrlist_append_nosyntax_init(&e->e_deleted_attrs, type.bv_val, &a)==0
/* Found */)
{
- LDAPDebug (LDAP_DEBUG_ANY, "str2entry_fast: Error. Non-contiguous deleted
attribute values for %s\n", type.bv_val, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "str2entry_fast: Error. Non-contiguous
deleted attribute values for %s\n", type.bv_val, 0, 0);
PR_ASSERT(0);
continue;
}
break;
case ATTRIBUTE_NOTFOUND:
- LDAPDebug (LDAP_DEBUG_ANY, "str2entry_fast: Error. Non-contiguous deleted
attribute values for %s\n", type.bv_val, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "str2entry_fast: Error. Non-contiguous
deleted attribute values for %s\n", type.bv_val, 0, 0);
PR_ASSERT(0);
continue;
/* break; ??? */
@@ -560,7 +560,7 @@ str2entry_fast( const char *rawdn, const Slapi_RDN *srdn, char *s, int
flags, in
slapi_ch_free_string(&ptype);
if ( attr_val_cnt >= ENTRY_MAX_ATTRIBUTE_VALUE_COUNT )
{
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"str2entry_fast: entry %s exceeded max attribute value cound %ld\n",
slapi_entry_get_dn_const(e)?slapi_entry_get_dn_const(e):"unknown",
attr_val_cnt, 0 );
@@ -591,7 +591,7 @@ str2entry_fast( const char *rawdn, const Slapi_RDN *srdn, char *s, int
flags, in
/* check to make sure there was a dn: line */
if ( slapi_entry_get_dn_const(e)==NULL ) {
if (!(SLAPI_STR2ENTRY_INCLUDE_VERSION_STR & flags))
- LDAPDebug( LDAP_DEBUG_ANY, "str2entry_fast: entry has no dn\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "str2entry_fast: entry has no dn\n",
0, 0, 0 );
slapi_entry_free( e );
e = NULL;
@@ -601,7 +601,7 @@ done:
csnset_free(&valuecsnset);
csn_free(&attributedeletioncsn);
csn_free(&maxcsn);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= str2entry_fast 0x%x\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= str2entry_fast 0x%x\n",
e, 0, 0 );
return( e );
}
@@ -825,7 +825,7 @@ str2entry_dupcheck( const char *rawdn, char *s, int flags, int
read_stateinfo )
bvtype = bv_null;
bvvalue = bv_null;
if ( slapi_ldif_parse_line( s, &bvtype, &bvvalue, &freeval ) < 0 ) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: Entry (%s), ignoring invalid line
\"%s\"...\n",
rawdn ? rawdn : "", s, 0);
continue;
@@ -908,7 +908,7 @@ str2entry_dupcheck( const char *rawdn, char *s, int flags, int
read_stateinfo )
if ( strcasecmp( type, "dn" ) == 0 ) {
if ( slapi_entry_get_dn_const(e)!=NULL ) {
char ebuf[ BUFSIZ ];
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"str2entry_dupcheck: entry has multiple dns \"%s\" "
"and \"%s\" (second ignored)\n",
slapi_entry_get_dn_const(e),
@@ -951,7 +951,7 @@ str2entry_dupcheck( const char *rawdn, char *s, int flags, int
read_stateinfo )
/* retrieve uniqueid */
if ((bvtype.bv_len == SLAPI_ATTR_UNIQUEID_LENGTH) && (PL_strcasecmp (type,
SLAPI_ATTR_UNIQUEID) == 0)) {
if (e->e_uniqueid != NULL){
- LDAPDebug (LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"str2entry_dupcheck: entry has multiple uniqueids %s "
"and %s (second ignored)\n",
e->e_uniqueid, valuecharptr, 0);
@@ -1138,7 +1138,7 @@ str2entry_dupcheck( const char *rawdn, char *s, int flags, int
read_stateinfo )
else
{
/* Failure adding to value tree */
- LDAPDebug( LDAP_DEBUG_ANY, "str2entry_dupcheck: unexpected failure %d adding
value\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "str2entry_dupcheck: unexpected failure %d
adding value\n", rc, 0, 0 );
slapi_value_free(&value); /* value not consumed - free it */
slapi_entry_free( e ); e = NULL;
goto free_and_return;
@@ -1152,7 +1152,7 @@ str2entry_dupcheck( const char *rawdn, char *s, int flags, int
read_stateinfo )
if ( slapi_entry_get_dn_const(e)==NULL )
{
if (!(SLAPI_STR2ENTRY_INCLUDE_VERSION_STR & flags))
- LDAPDebug( LDAP_DEBUG_ANY, "str2entry_dupcheck: entry has no dn\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "str2entry_dupcheck: entry has no
dn\n",
0, 0, 0 );
slapi_entry_free( e ); e = NULL;
goto free_and_return;
@@ -1173,11 +1173,11 @@ str2entry_dupcheck( const char *rawdn, char *s, int flags, int
read_stateinfo )
if ( sa->sa_numdups > 0 )
{
if ( sa->sa_numdups > 1 ) {
- LDAPDebug( LDAP_DEBUG_ANY, "str2entry_dupcheck: %d duplicate values for
attribute "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "str2entry_dupcheck: %d duplicate values for
attribute "
"type %s detected in entry %s. Extra values ignored.\n",
sa->sa_numdups, sa->sa_type, slapi_entry_get_dn_const(e) );
} else {
- LDAPDebug( LDAP_DEBUG_ANY, "str2entry_dupcheck: Duplicate value for attribute
"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "str2entry_dupcheck: Duplicate value for
attribute "
"type %s detected in entry %s. Extra value ignored.\n",
sa->sa_type, slapi_entry_get_dn_const(e), 0 );
}
@@ -1249,7 +1249,7 @@ str2entry_dupcheck( const char *rawdn, char *s, int flags, int
read_stateinfo )
/* Add the RDN values, if asked, and if not already present */
if ( flags & SLAPI_STR2ENTRY_ADDRDNVALS ) {
if ( slapi_entry_add_rdn_values( e ) != LDAP_SUCCESS ) {
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"str2entry_dupcheck: entry has badly formatted dn\n",
0, 0, 0 );
slapi_entry_free( e ); e = NULL;
@@ -1281,7 +1281,7 @@ free_and_return:
csn_free(&attributedeletioncsn);
csn_free(&maxcsn);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= str2entry_dupcheck 0x%x
\"%s\"\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= str2entry_dupcheck 0x%x
\"%s\"\n",
e, slapi_sdn_get_dn (slapi_entry_get_sdn_const(e)), 0 );
return e;
}
@@ -1332,7 +1332,7 @@ slapi_str2entry( char *s, int flags )
Slapi_Entry *e;
int read_stateinfo= ~( flags & SLAPI_STR2ENTRY_IGNORE_STATE );
- LDAPDebug( LDAP_DEBUG_ARGS,
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG,
"slapi_str2entry: flags=0x%x, entry=\"%.50s...\"\n",
flags, s, 0 );
@@ -1393,7 +1393,7 @@ slapi_str2entry_ext( const char *normdn, const Slapi_RDN *srdn, char
*s, int fla
return slapi_str2entry( s, flags );
}
- LDAPDebug( LDAP_DEBUG_ARGS,
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG,
"slapi_str2entry_ext: flags=0x%x, dn=\"%s\",
entry=\"%.50s...\"\n",
flags, normdn, s );
@@ -2173,7 +2173,7 @@ static void
entry_dump( const Slapi_Entry *e, const char *text)
{
const char *dn= slapi_entry_get_dn_const(e);
- LDAPDebug( LDAP_DEBUG_ANY, "Entry %s ptr=%lx dn=%s\n", text, e,
(dn==NULL?"NULL":dn));
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Entry %s ptr=%lx dn=%s\n", text, e,
(dn==NULL?"NULL":dn));
}
#endif
@@ -3281,7 +3281,7 @@ slapi_entry_add_rdn_values( Slapi_Entry *e )
if ((ava.ava_value.bv_len != bv->bv_len) ||
(memcmp(ava.ava_value.bv_val, bv->bv_val, bv->bv_len) != 0)) {
/* bytes not identical so reject */
- LDAPDebug(LDAP_DEBUG_TRACE, "RDN value is not identical to entry
value for type %s in entry %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "RDN value is not
identical to entry value for type %s in entry %s\n",
type, dn ? dn : "<null>", 0 );
#if 0
/*
@@ -3327,7 +3327,7 @@ slapi_entry_has_children_ext(const Slapi_Entry *entry, int
include_tombstone)
Slapi_Attr *attr;
int count = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> slapi_has_children( %s )\n",
slapi_entry_get_dn_const(entry), 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> slapi_has_children( %s )\n",
slapi_entry_get_dn_const(entry), 0, 0);
/*If the subordinatecount exists, and it's nonzero, then return 1.*/
if (slapi_entry_attr_find( entry, "numsubordinates", &attr) == 0)
@@ -3367,7 +3367,7 @@ slapi_entry_has_children_ext(const Slapi_Entry *entry, int
include_tombstone)
}
}
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= slapi_has_children 0\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= slapi_has_children 0\n", 0, 0, 0
);
return(0);
}
@@ -3388,7 +3388,7 @@ slapi_entry_rename(Slapi_Entry *e, const char *newrdn, int
deleteoldrdn, Slapi_D
Slapi_Mods *smods = NULL;
Slapi_DN newsrdn;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> slapi_entry_rename\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> slapi_entry_rename\n", 0, 0,
0 );
slapi_sdn_init(&newsrdn);
/* Check if entry or newrdn are NULL. */
@@ -3462,7 +3462,7 @@ done:
slapi_mods_free(&smods);
slapi_sdn_done(&newsrdn);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= slapi_entry_rename\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= slapi_entry_rename\n", 0, 0,
0 );
return err;
}
@@ -3495,7 +3495,7 @@ entry_apply_mods_ignore_error( Slapi_Entry *e, LDAPMod **mods, int
ignore_error
int err;
LDAPMod **mp = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> entry_apply_mods\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> entry_apply_mods\n", 0, 0, 0 );
err = LDAP_SUCCESS;
for ( mp = mods; mp && *mp; mp++ )
@@ -3508,7 +3508,7 @@ entry_apply_mods_ignore_error( Slapi_Entry *e, LDAPMod **mods, int
ignore_error
}
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= entry_apply_mods %d\n", err, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= entry_apply_mods %d\n", err, 0,
0 );
return( err );
}
@@ -3660,7 +3660,7 @@ entry_apply_mod( Slapi_Entry *e, const LDAPMod *mod )
if((strcasecmp(mod->mod_type,"objectclass") == 0)
&& (strncasecmp((const char
*)mod->mod_bvalues[i]->bv_val,"ldapsubentry",mod->mod_bvalues[i]->bv_len)
== 0))
sawsubentry=PR_TRUE;
- LDAPDebug( LDAP_DEBUG_ARGS, " %s: %s\n", mod->mod_type,
mod->mod_bvalues[i]->bv_val, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " %s: %s\n", mod->mod_type,
mod->mod_bvalues[i]->bv_val, 0 );
}
bvcnt = i;
@@ -3682,24 +3682,24 @@ entry_apply_mod( Slapi_Entry *e, const LDAPMod *mod )
switch ( mod->mod_op & ~LDAP_MOD_BVALUES )
{
case LDAP_MOD_ADD:
- LDAPDebug( LDAP_DEBUG_ARGS, " add: %s\n", mod->mod_type, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " add: %s\n", mod->mod_type, 0, 0
);
if(sawsubentry) e->e_flags |= SLAPI_ENTRY_LDAPSUBENTRY;
err = slapi_entry_add_values( e, mod->mod_type, mod->mod_bvalues );
break;
case LDAP_MOD_DELETE:
- LDAPDebug( LDAP_DEBUG_ARGS, " delete: %s\n", mod->mod_type, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " delete: %s\n", mod->mod_type, 0,
0 );
if(sawsubentry) e->e_flags |= 0;
err = slapi_entry_delete_values( e, mod->mod_type, mod->mod_bvalues );
break;
case LDAP_MOD_REPLACE:
- LDAPDebug( LDAP_DEBUG_ARGS, " replace: %s\n", mod->mod_type, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " replace: %s\n", mod->mod_type,
0, 0 );
err = entry_replace_values( e, mod->mod_type, mod->mod_bvalues );
break;
}
done:
- LDAPDebug( LDAP_DEBUG_ARGS, " -\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " -\n", 0, 0, 0 );
return( err );
}
@@ -3823,7 +3823,7 @@ delete_values_sv_internal(
/* delete the entire attribute */
if ( valuestodelete == NULL || valuestodelete[0] == NULL ){
- LDAPDebug( LDAP_DEBUG_ARGS, "removing entire attribute %s\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "removing entire attribute %s\n",
type, 0, 0 );
retVal = attrlist_delete( &e->e_attrs, type);
if (flags & SLAPI_VALUE_FLAG_IGNOREERROR) {
@@ -3835,7 +3835,7 @@ delete_values_sv_internal(
/* delete specific values - find the attribute first */
a= attrlist_find(e->e_attrs, type);
if ( a == NULL ) {
- LDAPDebug( LDAP_DEBUG_ARGS, "could not find attribute %s\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "could not find attribute %s\n",
type, 0, 0 );
if (flags & SLAPI_VALUE_FLAG_IGNOREERROR) {
return LDAP_SUCCESS;
@@ -3864,7 +3864,7 @@ delete_values_sv_internal(
*/
if ( retVal==LDAP_OPERATIONS_ERROR )
{
- LDAPDebug( LDAP_DEBUG_ANY, "Possible existing duplicate "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Possible existing duplicate "
"value for attribute type %s found in "
"entry %s\n", a->a_type, slapi_entry_get_dn_const(e), 0 );
}
@@ -4031,7 +4031,7 @@ slapi_entry_diff(Slapi_Mods *smods, Slapi_Entry *e1, Slapi_Entry
*e2, int diff_c
slapi_value_get_berval(e1_val)))
{
/* attr-value e1_val not found in e2_attr; add it */
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"slapi_entry_diff: attr-val of %s is not in e2; "
"add it\n",
e1_attr_name, 0, 0);
@@ -4043,7 +4043,7 @@ slapi_entry_diff(Slapi_Mods *smods, Slapi_Entry *e1, Slapi_Entry
*e2, int diff_c
else
{
/* attr e1_attr_names not found in e2 */
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"slapi_entry_diff: attr %s is not in e2; add it\n",
e1_attr_name, 0, 0);
slapi_mods_add_mod_values(smods, LDAP_MOD_ADD,
@@ -4077,7 +4077,7 @@ slapi_entry_diff(Slapi_Mods *smods, Slapi_Entry *e1, Slapi_Entry
*e2, int diff_c
slapi_value_get_berval(e2_val)))
{
/* attr-value e2_val not found in e1_attr; delete it */
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"slapi_entry_diff: attr-val of %s is not in e1; "
"delete it\n",
e2_attr_name, 0, 0);
@@ -4089,7 +4089,7 @@ slapi_entry_diff(Slapi_Mods *smods, Slapi_Entry *e1, Slapi_Entry
*e2, int diff_c
else
{
/* attr e2_attr_names not in e1 */
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"slapi_entry_diff: attr %s is not in e1; delete it\n",
e2_attr_name, 0, 0);
slapi_mods_add_mod_values(smods, LDAP_MOD_DELETE, e2_attr_name, NULL);
@@ -4184,7 +4184,7 @@ slapi_entries_diff(Slapi_Entry **old_entries, Slapi_Entry
**curr_entries,
rval = 1;
if (isfirst)
{
- LDAPDebug(LDAP_DEBUG_ANY, "%sEntry %s\n",
my_logging_prestr,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%sEntry %s\n",
my_logging_prestr,
slapi_entry_get_dn_const(*oep), 0);
isfirst = 0;
}
@@ -4192,23 +4192,23 @@ slapi_entries_diff(Slapi_Entry **old_entries, Slapi_Entry
**curr_entries,
switch (mod->mod_op & ~LDAP_MOD_BVALUES)
{
case LDAP_MOD_DELETE:
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
" Del Attribute %s Value %s\n",
mod->mod_type, mod->mod_bvalues?
mod->mod_bvalues[0]->bv_val:"N/A", 0);
break;
case LDAP_MOD_ADD:
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
" Add Attribute %s Value %s\n",
mod->mod_type, mod->mod_bvalues[0]->bv_val,
0);
break;
case LDAP_MOD_REPLACE:
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
" Rep Attribute %s Value %s\n",
mod->mod_type, mod->mod_bvalues[0]->bv_val,
0);
break;
default:
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
" Unknown op %d Attribute %s\n",
mod->mod_op & ~LDAP_MOD_BVALUES,
mod->mod_type, 0);
@@ -4245,7 +4245,7 @@ slapi_entries_diff(Slapi_Entry **old_entries, Slapi_Entry
**curr_entries,
slapi_entry_clear_flag(*oep, SLAPI_ENTRY_FLAG_DIFF_IN_BOTH);
} else {
rval = 1;
- LDAPDebug(LDAP_DEBUG_ANY, "Add %sEntry %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Add %sEntry %s\n",
my_logging_prestr, slapi_entry_get_dn_const(*oep), 0);
if (testall)
{
@@ -4274,7 +4274,7 @@ slapi_entries_diff(Slapi_Entry **old_entries, Slapi_Entry
**curr_entries,
} else {
rval = 1;
- LDAPDebug(LDAP_DEBUG_ANY, "Del %sEntry %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Del %sEntry %s\n",
my_logging_prestr, slapi_entry_get_dn_const(*cep), 0);
if (testall)
diff --git a/ldap/servers/slapd/entrywsi.c b/ldap/servers/slapd/entrywsi.c
index a8f8455..3f53521 100644
--- a/ldap/servers/slapd/entrywsi.c
+++ b/ldap/servers/slapd/entrywsi.c
@@ -676,7 +676,7 @@ entry_delete_present_values_wsi_single_valued(Slapi_Entry *e, const
char *type,
if ( vals == NULL || vals[0] == NULL )
{
/* delete the entire attribute */
- LDAPDebug( LDAP_DEBUG_ARGS, "removing entire attribute %s\n", type, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "removing entire attribute %s\n", type,
0, 0 );
attr_set_deletion_csn(a,csn);
if(urp)
{
@@ -746,7 +746,7 @@ entry_delete_present_values_wsi_single_valued(Slapi_Entry *e, const
char *type,
*/
if ( retVal==LDAP_OPERATIONS_ERROR )
{
- LDAPDebug( LDAP_DEBUG_ANY, "Possible existing duplicate "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Possible existing duplicate "
"value for attribute type %s found in "
"entry %s\n", a->a_type, slapi_entry_get_dn_const(e), 0 );
}
@@ -766,7 +766,7 @@ entry_delete_present_values_wsi_multi_valued(Slapi_Entry *e, const
char *type, s
if ( vals == NULL || vals[0] == NULL )
{
/* delete the entire attribute */
- LDAPDebug( LDAP_DEBUG_ARGS, "removing entire attribute %s\n", type, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "removing entire attribute %s\n",
type, 0, 0 );
attr_set_deletion_csn(a,csn);
if(urp)
{
@@ -855,7 +855,7 @@ entry_delete_present_values_wsi_multi_valued(Slapi_Entry *e, const
char *type, s
*/
if ( retVal==LDAP_OPERATIONS_ERROR )
{
- LDAPDebug( LDAP_DEBUG_ANY, "Possible existing duplicate "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Possible existing duplicate "
"value for attribute type %s found in "
"entry %s\n", a->a_type, slapi_entry_get_dn_const(e), 0 );
}
@@ -902,17 +902,17 @@ entry_apply_mod_wsi(Slapi_Entry *e, const LDAPMod *mod, const CSN
*csn, int urp)
switch ( mod->mod_op & ~LDAP_MOD_BVALUES )
{
case LDAP_MOD_ADD:
- LDAPDebug( LDAP_DEBUG_ARGS, " add: %s\n", mod->mod_type, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " add: %s\n", mod->mod_type, 0, 0
);
retVal = entry_add_present_values_wsi( e, mod->mod_type, mod->mod_bvalues, csn,
urp, 0 );
break;
case LDAP_MOD_DELETE:
- LDAPDebug( LDAP_DEBUG_ARGS, " delete: %s\n", mod->mod_type, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " delete: %s\n", mod->mod_type, 0,
0 );
retVal = entry_delete_present_values_wsi( e, mod->mod_type, mod->mod_bvalues,
csn, urp, mod->mod_op, NULL );
break;
case LDAP_MOD_REPLACE:
- LDAPDebug( LDAP_DEBUG_ARGS, " replace: %s\n", mod->mod_type, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " replace: %s\n", mod->mod_type,
0, 0 );
retVal = entry_replace_present_values_wsi( e, mod->mod_type, mod->mod_bvalues,
csn, urp );
break;
}
@@ -920,10 +920,10 @@ entry_apply_mod_wsi(Slapi_Entry *e, const LDAPMod *mod, const CSN
*csn, int urp)
for ( i = 0;
mod->mod_bvalues != NULL && mod->mod_bvalues[i] != NULL;
i++ ) {
- LDAPDebug( LDAP_DEBUG_ARGS, " %s: %s\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " %s: %s\n",
mod->mod_type, mod->mod_bvalues[i]->bv_val, 0 );
}
- LDAPDebug( LDAP_DEBUG_ARGS, " -\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " -\n", 0, 0, 0 );
}
/*
@@ -976,7 +976,7 @@ entry_apply_mods_wsi(Slapi_Entry *e, Slapi_Mods *smods, const CSN
*csn, int urp)
localcsn = *csn; /* make a copy */
}
- LDAPDebug( LDAP_DEBUG_TRACE, "=> entry_apply_mods_wsi\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> entry_apply_mods_wsi\n", 0, 0, 0
);
mod = slapi_mods_get_first_mod(smods);
while(NULL!=mod && retVal==LDAP_SUCCESS)
@@ -1000,7 +1000,7 @@ entry_apply_mods_wsi(Slapi_Entry *e, Slapi_Mods *smods, const CSN
*csn, int urp)
mod = slapi_mods_get_next_mod(smods);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= entry_apply_mods_wsi %d\n", retVal, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= entry_apply_mods_wsi %d\n",
retVal, 0, 0 );
return retVal;
}
diff --git a/ldap/servers/slapd/errormap.c b/ldap/servers/slapd/errormap.c
index efc39df..250d7d6 100644
--- a/ldap/servers/slapd/errormap.c
+++ b/ldap/servers/slapd/errormap.c
@@ -153,11 +153,11 @@ SECU_Strerror(PRErrorCode errNum) {
for (i = low + 1; i <= high; ++i) {
num = errStrings[i].errNum;
if (num <= lastNum) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"sequence error in error strings at item %d\n"
"error %d (%s)\n",
i, lastNum, errStrings[i-1].errString );
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"should come after \n"
"error %d (%s)\n",
num, errStrings[i].errString, 0 );
diff --git a/ldap/servers/slapd/extendop.c b/ldap/servers/slapd/extendop.c
index 978c92f..d67ef2c 100644
--- a/ldap/servers/slapd/extendop.c
+++ b/ldap/servers/slapd/extendop.c
@@ -32,7 +32,7 @@ static void extop_handle_import_start(Slapi_PBlock *pb, char *extoid,
int ret;
if (extval == NULL || extval->bv_val == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"extop_handle_import_start: no data supplied\n", 0, 0, 0);
send_ldap_result(pb, LDAP_OPERATIONS_ERROR, NULL,
"no data supplied", 0, NULL);
@@ -56,7 +56,7 @@ static void extop_handle_import_start(Slapi_PBlock *pb, char *extoid,
}
sdn = slapi_sdn_new_dn_passin(orig);
if (!sdn) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"extop_handle_import_start: out of memory\n", 0, 0, 0);
send_ldap_result(pb, LDAP_OPERATIONS_ERROR, NULL, NULL, 0, NULL);
return;
@@ -69,7 +69,7 @@ static void extop_handle_import_start(Slapi_PBlock *pb, char *extoid,
be = slapi_be_select_by_instance_name(suffix);
}
if (be == NULL || be == defbackend_get_backend()) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"bulk import: invalid suffix or instance name
'%s'\n",
suffix, 0, 0);
send_ldap_result(pb, LDAP_NO_SUCH_OBJECT, NULL,
@@ -112,7 +112,7 @@ static void extop_handle_import_start(Slapi_PBlock *pb, char *extoid,
if (be->be_wire_import == NULL) {
/* not supported by this backend */
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"bulk import attempted on '%s' (not supported)\n",
suffix, 0, 0);
send_ldap_result(pb, LDAP_NOT_SUPPORTED, NULL, NULL, 0, NULL);
@@ -125,7 +125,7 @@ static void extop_handle_import_start(Slapi_PBlock *pb, char *extoid,
slapi_pblock_set(pb, SLAPI_BULK_IMPORT_STATE, &ret);
ret = (*be->be_wire_import)(pb);
if (ret != 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"extop_handle_import_start: error starting import (%d)\n",
ret, 0, 0);
send_ldap_result(pb, LDAP_OPERATIONS_ERROR, NULL, NULL, 0, NULL);
@@ -145,7 +145,7 @@ static void extop_handle_import_start(Slapi_PBlock *pb, char *extoid,
bv.bv_len = 0;
slapi_pblock_set(pb, SLAPI_EXT_OP_RET_VALUE, &bv);
send_ldap_result(pb, LDAP_SUCCESS, NULL, NULL, 0, NULL);
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Bulk import: begin import on '%s'.\n", suffix, 0, 0);
out:
@@ -168,7 +168,7 @@ static void extop_handle_import_done(Slapi_PBlock *pb, char *extoid,
if ((be == NULL) || (be->be_wire_import == NULL)) {
/* can this even happen? */
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"extop_handle_import_done: backend not supported\n",
0, 0, 0);
send_ldap_result(pb, LDAP_NOT_SUPPORTED, NULL, NULL, 0, NULL);
@@ -182,7 +182,7 @@ static void extop_handle_import_done(Slapi_PBlock *pb, char *extoid,
slapi_pblock_set(pb, SLAPI_BULK_IMPORT_STATE, &ret);
ret = (*be->be_wire_import)(pb);
if (ret != 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"bulk import: error ending import (%d)\n",
ret, 0, 0);
send_ldap_result(pb, LDAP_OPERATIONS_ERROR, NULL, NULL, 0, NULL);
@@ -195,7 +195,7 @@ static void extop_handle_import_done(Slapi_PBlock *pb, char *extoid,
bv.bv_len = 0;
slapi_pblock_set(pb, SLAPI_EXT_OP_RET_VALUE, &bv);
send_ldap_result(pb, LDAP_SUCCESS, NULL, NULL, 0, NULL);
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Bulk import completed successfully.\n", 0, 0, 0);
return;
}
@@ -212,7 +212,7 @@ do_extended( Slapi_PBlock *pb )
ber_tag_t tag;
const char *name;
- LDAPDebug( LDAP_DEBUG_TRACE, "do_extended\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "do_extended\n", 0, 0, 0 );
/*
* Parse the extended request. It looks like this:
@@ -225,7 +225,7 @@ do_extended( Slapi_PBlock *pb )
if ( ber_scanf( pb->pb_op->o_ber, "{a", &extoid )
== LBER_ERROR ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ber_scanf failed (op=extended; params=OID)\n",
0, 0, 0 );
op_shared_log_error_access (pb, "EXT", "???", "decoding
error: fail to get extension OID");
@@ -251,12 +251,12 @@ do_extended( Slapi_PBlock *pb )
}
}
if ( NULL == ( name = extended_op_oid2string( extoid ))) {
- LDAPDebug( LDAP_DEBUG_ARGS, "do_extended: oid (%s)\n", extoid, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "do_extended: oid (%s)\n",
extoid, 0, 0 );
slapi_log_access( LDAP_DEBUG_STATS, "conn=%" NSPRIu64 " op=%d EXT
oid=\"%s\"\n",
pb->pb_conn->c_connid, pb->pb_op->o_opid, extoid );
} else {
- LDAPDebug( LDAP_DEBUG_ARGS, "do_extended: oid (%s-%s)\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "do_extended: oid (%s-%s)\n",
extoid, name, 0 );
slapi_log_access( LDAP_DEBUG_STATS,
diff --git a/ldap/servers/slapd/factory.c b/ldap/servers/slapd/factory.c
index 7237f0c..146e7a4 100644
--- a/ldap/servers/slapd/factory.c
+++ b/ldap/servers/slapd/factory.c
@@ -170,9 +170,9 @@ factory_type_add_extension(struct factory_type *ft, struct
factory_extension *fe
}
else
{
- LDAPDebug( LDAP_DEBUG_ANY, "ERROR: factory.c: Registration of %s extension
by %s failed.\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: factory.c: Registration of %s
extension by %s failed.\n",
ft->name, fe->pluginname, 0);
- LDAPDebug( LDAP_DEBUG_ANY, "ERROR: factory.c: %d extensions already
registered. Max is %d\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: factory.c: %d extensions already
registered. Max is %d\n",
ft->extension_count, MAX_EXTENSIONS, 0);
}
@@ -193,7 +193,7 @@ factory_type_decrement_existence(struct factory_type *ft)
if(ft->existence_count<0)
{
/* This just shouldn't happen */
- LDAPDebug( LDAP_DEBUG_ANY, "ERROR: factory.c: %lu %s object extensions in
existence.\n", ft->extension_count, ft->name, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: factory.c: %lu %s object extensions
in existence.\n", ft->extension_count, ft->name, 0);
}
}
@@ -274,8 +274,8 @@ factory_register_type(const char *name, size_t offset)
}
else
{
- LDAPDebug( LDAP_DEBUG_ANY, "ERROR: factory.c: Registration of %s object
failed.\n", name, 0, 0);
- LDAPDebug( LDAP_DEBUG_ANY, "ERROR: factory.c: %d objects already registered.
Max is %d\n", number_of_types, MAX_TYPES, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: factory.c: Registration of %s object
failed.\n", name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: factory.c: %d objects already
registered. Max is %d\n", number_of_types, MAX_TYPES, 0);
type= -1;
}
PR_Unlock(factory_type_store_lock);
@@ -323,7 +323,7 @@ factory_create_extension(int type,void *object,void *parent)
else
{
/* The type wasn't registered. Programming error? */
- LDAPDebug( LDAP_DEBUG_ANY, "ERROR: factory.c: Object type handle %d not valid.
Object not registered?\n", type, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: factory.c: Object type handle %d not
valid. Object not registered?\n", type, 0, 0);
}
return (void*)extension;
}
@@ -364,7 +364,7 @@ factory_destroy_extension(int type,void *object,void *parent,void
**extension)
else
{
/* The type wasn't registered. Programming error? */
- LDAPDebug( LDAP_DEBUG_ANY, "ERROR: factory.c: Object type handle %d not valid.
Object not registered?\n", type, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: factory.c: Object type handle %d not
valid. Object not registered?\n", type, 0, 0);
}
slapi_ch_free(extension);
}
@@ -429,7 +429,7 @@ slapi_register_object_extension(
}
else
{
- LDAPDebug( LDAP_DEBUG_ANY, "ERROR: factory.c: Plugin %s failed to register
extension for object %s.\n", pluginname, objectname, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: factory.c: Plugin %s failed to
register extension for object %s.\n", pluginname, objectname, 0);
rc= -1;
delete_factory_extension(&fe);
}
diff --git a/ldap/servers/slapd/filter.c b/ldap/servers/slapd/filter.c
index 03636ba..ca4224e 100644
--- a/ldap/servers/slapd/filter.c
+++ b/ldap/servers/slapd/filter.c
@@ -153,7 +153,7 @@ get_filter_internal( Connection *conn, BerElement *ber,
struct slapi_filter *f;
char *ftmp, *type = NULL;
- LDAPDebug( LDAP_DEBUG_FILTER, "=> get_filter_internal\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> get_filter_internal\n", 0, 0, 0
);
/*
* Track and check the depth of nesting. Use post-increment on
@@ -164,7 +164,7 @@ get_filter_internal( Connection *conn, BerElement *ber,
*filt = NULL;
*fstr = NULL;
err = LDAP_UNWILLING_TO_PERFORM;
- LDAPDebug( LDAP_DEBUG_FILTER, "<= get_filter_internal %d"
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= get_filter_internal %d"
" (maximum nesting level of %d exceeded)\n",
err, maxdepth, 0 );
return( err );
@@ -211,7 +211,7 @@ get_filter_internal( Connection *conn, BerElement *ber,
f->f_choice = ber_peek_tag( ber, &len );
switch ( f->f_choice ) {
case LDAP_FILTER_EQUALITY:
- LDAPDebug( LDAP_DEBUG_FILTER, "EQUALITY\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "EQUALITY\n", 0, 0, 0 );
if ( (err = get_ava( ber, &f->f_ava )) == 0 ) {
if ( 0 == strcasecmp ( f->f_avtype, "objectclass")) {
@@ -260,26 +260,26 @@ get_filter_internal( Connection *conn, BerElement *ber,
break;
case LDAP_FILTER_SUBSTRINGS:
- LDAPDebug( LDAP_DEBUG_FILTER, "SUBSTRINGS\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "SUBSTRINGS\n", 0, 0, 0 );
err = get_substring_filter( conn, ber, f, fstr );
break;
case LDAP_FILTER_GE:
- LDAPDebug( LDAP_DEBUG_FILTER, "GE\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "GE\n", 0, 0, 0 );
if ( (err = get_ava( ber, &f->f_ava )) == 0 ) {
*fstr=filter_escape_filter_value(f, FILTER_GE_FMT, FILTER_GE_LEN);
}
break;
case LDAP_FILTER_LE:
- LDAPDebug( LDAP_DEBUG_FILTER, "LE\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "LE\n", 0, 0, 0 );
if ( (err = get_ava( ber, &f->f_ava )) == 0 ) {
*fstr=filter_escape_filter_value(f, FILTER_LE_FMT, FILTER_LE_LEN);
}
break;
case LDAP_FILTER_PRESENT:
- LDAPDebug( LDAP_DEBUG_FILTER, "PRESENT\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "PRESENT\n", 0, 0, 0 );
if ( ber_scanf( ber, "a", &type ) == LBER_ERROR ) {
slapi_ch_free_string(&type);
err = LDAP_PROTOCOL_ERROR;
@@ -293,22 +293,22 @@ get_filter_internal( Connection *conn, BerElement *ber,
break;
case LDAP_FILTER_APPROX:
- LDAPDebug( LDAP_DEBUG_FILTER, "APPROX\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "APPROX\n", 0, 0, 0 );
if ( (err = get_ava( ber, &f->f_ava )) == 0 ) {
*fstr=filter_escape_filter_value(f, FILTER_APROX_FMT, FILTER_APROX_LEN);
}
break;
case LDAP_FILTER_EXTENDED:
- LDAPDebug( LDAP_DEBUG_FILTER, "EXTENDED\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "EXTENDED\n", 0, 0, 0 );
if ( conn->c_ldapversion < 3 ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"extensible filter received from v2 client\n",
0, 0, 0 );
err = LDAP_PROTOCOL_ERROR;
} else if ( (err = get_extensible_filter( ber, &f->f_mr )) == LDAP_SUCCESS
) {
*fstr=filter_escape_filter_value_extended(f);
- LDAPDebug (LDAP_DEBUG_FILTER, "%s\n", *fstr, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "%s\n", *fstr, 0, 0);
if(f->f_mr_oid==NULL) {
/*
* We accept:
@@ -323,7 +323,7 @@ get_filter_internal( Connection *conn, BerElement *ber,
break;
case LDAP_FILTER_AND:
- LDAPDebug( LDAP_DEBUG_FILTER, "AND\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "AND\n", 0, 0, 0 );
if ( (err = get_filter_list( conn, ber, &f->f_and, &ftmp, maxdepth,
curdepth, subentry_dont_rewrite,
has_tombstone_filter, has_ruv_filter ))
@@ -335,7 +335,7 @@ get_filter_internal( Connection *conn, BerElement *ber,
break;
case LDAP_FILTER_OR:
- LDAPDebug( LDAP_DEBUG_FILTER, "OR\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "OR\n", 0, 0, 0 );
if ( (err = get_filter_list( conn, ber, &f->f_or, &ftmp, maxdepth,
curdepth, subentry_dont_rewrite,
has_tombstone_filter, has_ruv_filter ))
@@ -347,7 +347,7 @@ get_filter_internal( Connection *conn, BerElement *ber,
break;
case LDAP_FILTER_NOT:
- LDAPDebug( LDAP_DEBUG_FILTER, "NOT\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "NOT\n", 0, 0, 0 );
(void) ber_skip_tag( ber, &len );
if ( (err = get_filter_internal( conn, ber, &f->f_not, &ftmp, maxdepth,
curdepth, subentry_dont_rewrite,
@@ -360,7 +360,7 @@ get_filter_internal( Connection *conn, BerElement *ber,
break;
default:
- LDAPDebug( LDAP_DEBUG_ANY, "get_filter_internal: unknown type 0x%lX\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "get_filter_internal: unknown type
0x%lX\n",
f->f_choice, 0, 0 );
err = LDAP_PROTOCOL_ERROR;
break;
@@ -372,7 +372,7 @@ get_filter_internal( Connection *conn, BerElement *ber,
slapi_ch_free( (void**)fstr );
}
*filt = f;
- LDAPDebug( LDAP_DEBUG_FILTER, "<= get_filter_internal %d\n", err, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= get_filter_internal %d\n", err,
0, 0 );
return( err );
}
@@ -388,7 +388,7 @@ get_filter_list( Connection *conn, BerElement *ber,
ber_len_t len = LBER_ERROR;
char *last;
- LDAPDebug( LDAP_DEBUG_FILTER, "=> get_filter_list\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> get_filter_list\n", 0, 0, 0 );
*fstr = NULL;
new = f;
@@ -423,11 +423,11 @@ get_filter_list( Connection *conn, BerElement *ber,
len if it has reached the end, and -1 is not a valid value
for a real len */
if ( (tag != LBER_END_OF_SEQORSET) && (len != -1) && (*fstr != NULL) )
{
- LDAPDebug( LDAP_DEBUG_ANY, " error parsing filter list\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, " error parsing filter list\n", 0, 0, 0
);
slapi_ch_free((void**)fstr );
}
- LDAPDebug( LDAP_DEBUG_FILTER, "<= get_filter_list\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= get_filter_list\n", 0, 0, 0 );
return(( *fstr == NULL ) ? LDAP_PROTOCOL_ERROR : 0 );
}
@@ -444,7 +444,7 @@ get_substring_filter(
char *val, *eval, *last, *type = NULL;
size_t fstr_len;
- LDAPDebug( LDAP_DEBUG_FILTER, "=> get_substring_filter\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> get_substring_filter\n", 0, 0,
0 );
if ( ber_scanf( ber, "{a", &type ) == LBER_ERROR ) {
slapi_ch_free_string(&type);
@@ -480,7 +480,7 @@ get_substring_filter(
switch ( tag ) {
case LDAP_SUBSTRING_INITIAL:
- LDAPDebug( LDAP_DEBUG_FILTER, " INITIAL\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " INITIAL\n", 0, 0, 0 );
if ( f->f_sub_initial != NULL ) {
return( LDAP_PROTOCOL_ERROR );
}
@@ -497,7 +497,7 @@ get_substring_filter(
break;
case LDAP_SUBSTRING_ANY:
- LDAPDebug( LDAP_DEBUG_FILTER, " ANY\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " ANY\n", 0, 0, 0 );
charray_add(&f->f_sub_any, val);
eval = (char*)slapi_escape_filter_value(val, -1);
if(eval){
@@ -512,7 +512,7 @@ get_substring_filter(
break;
case LDAP_SUBSTRING_FINAL:
- LDAPDebug( LDAP_DEBUG_FILTER, " FINAL\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " FINAL\n", 0, 0, 0 );
if ( f->f_sub_final != NULL ) {
return( LDAP_PROTOCOL_ERROR );
}
@@ -530,13 +530,13 @@ get_substring_filter(
break;
default:
- LDAPDebug( LDAP_DEBUG_FILTER, " unknown tag 0x%lX\n", tag, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " unknown tag 0x%lX\n", tag, 0, 0
);
return( LDAP_PROTOCOL_ERROR );
}
}
if ( (tag != LBER_END_OF_SEQORSET) && (len != -1) ) {
- LDAPDebug( LDAP_DEBUG_ANY, " error reading substring filter\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, " error reading substring filter\n", 0,
0, 0 );
return( LDAP_PROTOCOL_ERROR );
}
if ( f->f_sub_initial == NULL && f->f_sub_any == NULL &&
@@ -554,7 +554,7 @@ get_substring_filter(
}
strcat( *fstr, ")" );
- LDAPDebug( LDAP_DEBUG_FILTER, "<= get_substring_filter\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= get_substring_filter\n", 0, 0,
0 );
return( 0 );
}
@@ -567,7 +567,7 @@ get_extensible_filter( BerElement *ber, mr_filter_t* mrf )
char *last;
int rc = LDAP_SUCCESS;
- LDAPDebug( LDAP_DEBUG_FILTER, "=> get_extensible_filter\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> get_extensible_filter\n", 0, 0,
0 );
memset (mrf, 0, sizeof (mr_filter_t));
gotelem = gotoid = gotvalue = 0;
@@ -642,11 +642,11 @@ get_extensible_filter( BerElement *ber, mr_filter_t* mrf )
goto parsing_error;
}
- LDAPDebug( LDAP_DEBUG_FILTER, "<= get_extensible_filter %i\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= get_extensible_filter %i\n",
rc, 0, 0 );
return rc;
parsing_error:;
- LDAPDebug( LDAP_DEBUG_ANY, "error parsing extensible filter\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "error parsing extensible filter\n",
0, 0, 0 );
return( LDAP_PROTOCOL_ERROR );
}
@@ -666,7 +666,7 @@ slapi_filter_dup(Slapi_Filter *f)
out = (struct slapi_filter*)slapi_ch_calloc(1, sizeof(struct slapi_filter));
if ( out == NULL ) {
- LDAPDebug(LDAP_DEBUG_ANY, "slapi_filter_dup: memory allocation error\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "slapi_filter_dup: memory allocation
error\n",
0, 0, 0 );
return NULL;
}
@@ -675,7 +675,7 @@ slapi_filter_dup(Slapi_Filter *f)
out->f_hash = f->f_hash;
out->f_flags = f->f_flags;
- LDAPDebug( LDAP_DEBUG_FILTER, "slapi_filter_dup type 0x%lX\n", f->f_choice,
0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "slapi_filter_dup type 0x%lX\n",
f->f_choice, 0, 0 );
switch ( f->f_choice ) {
case LDAP_FILTER_EQUALITY:
case LDAP_FILTER_GE:
@@ -723,7 +723,7 @@ slapi_filter_dup(Slapi_Filter *f)
break;
default:
- LDAPDebug(LDAP_DEBUG_FILTER, "slapi_filter_dup: unknown type 0x%lX\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "slapi_filter_dup: unknown type
0x%lX\n",
f->f_choice, 0, 0 );
break;
}
@@ -738,7 +738,7 @@ slapi_filter_free( struct slapi_filter *f, int recurse )
return;
}
- LDAPDebug( LDAP_DEBUG_FILTER, "slapi_filter_free type 0x%lX\n",
f->f_choice, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "slapi_filter_free type 0x%lX\n",
f->f_choice, 0, 0 );
switch ( f->f_choice ) {
case LDAP_FILTER_EQUALITY:
case LDAP_FILTER_GE:
@@ -787,7 +787,7 @@ slapi_filter_free( struct slapi_filter *f, int recurse )
break;
default:
- LDAPDebug( LDAP_DEBUG_ANY, "slapi_filter_free: unknown type 0x%lX\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "slapi_filter_free: unknown type
0x%lX\n",
f->f_choice, 0, 0 );
break;
}
diff --git a/ldap/servers/slapd/filtercmp.c b/ldap/servers/slapd/filtercmp.c
index 31670ed..fe8c2ee 100644
--- a/ldap/servers/slapd/filtercmp.c
+++ b/ldap/servers/slapd/filtercmp.c
@@ -195,7 +195,7 @@ void filter_compute_hash(struct slapi_filter *f)
/* get the normalized value (according to the matching rule) */
pb = get_mr_normval(f->f_mr_oid, f->f_mr_type, inval, &outval);
if (!pb) {
- LDAPDebug(LDAP_DEBUG_ANY, "$$$ out of memory !\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "$$$ out of memory !\n", 0, 0, 0);
return;
}
if (outval && outval[0]) {
@@ -207,7 +207,7 @@ void filter_compute_hash(struct slapi_filter *f)
STIR(h);
break;
default:
- LDAPDebug(LDAP_DEBUG_ANY, "$$$ can't handle filter type %d !\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "$$$ can't handle filter type %d !\n",
f->f_choice, 0, 0);
}
@@ -328,7 +328,7 @@ int slapi_filter_compare(struct slapi_filter *f1, struct slapi_filter
*f2)
int ret;
Slapi_Attr sattr;
- LDAPDebug(LDAP_DEBUG_TRACE, "=> filter compare\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> filter compare\n", 0, 0, 0);
/* allow for the possibility that one of the filters hasn't had a hash
* computed (and is therefore 0). this means that a filter node whose
@@ -410,12 +410,12 @@ int slapi_filter_compare(struct slapi_filter *f1, struct
slapi_filter *f2)
done_mr_normval(pb2);
break;
default:
- LDAPDebug(LDAP_DEBUG_ANY, "ERR can't handle filter %d\n",
f1->f_choice,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERR can't handle filter %d\n",
f1->f_choice,
0, 0);
ret = 1;
}
done:
- LDAPDebug(LDAP_DEBUG_TRACE, "<= filter compare: %d\n", ret, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= filter compare: %d\n", ret,
0, 0);
return ret;
}
diff --git a/ldap/servers/slapd/filterentry.c b/ldap/servers/slapd/filterentry.c
index fe8dc28..657b4a8 100644
--- a/ldap/servers/slapd/filterentry.c
+++ b/ldap/servers/slapd/filterentry.c
@@ -115,7 +115,7 @@ slapi_filter_test_ext_internal(
{
int rc;
- LDAPDebug( LDAP_DEBUG_FILTER, "=> slapi_filter_test_ext\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> slapi_filter_test_ext\n", 0, 0,
0 );
/*
* RJP: Not sure if this is semantically right, but we have to
@@ -128,58 +128,58 @@ slapi_filter_test_ext_internal(
switch ( f->f_choice ) {
case LDAP_FILTER_EQUALITY:
- LDAPDebug( LDAP_DEBUG_FILTER, " EQUALITY\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " EQUALITY\n", 0, 0, 0 );
rc = test_ava_filter( pb, e, e->e_attrs, &f->f_ava, LDAP_FILTER_EQUALITY,
verify_access , only_check_access, access_check_done);
break;
case LDAP_FILTER_SUBSTRINGS:
- LDAPDebug( LDAP_DEBUG_FILTER, " SUBSTRINGS\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " SUBSTRINGS\n", 0, 0, 0 );
rc = test_substring_filter( pb, e, f, verify_access , only_check_access,
access_check_done);
break;
case LDAP_FILTER_GE:
- LDAPDebug( LDAP_DEBUG_FILTER, " GE\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " GE\n", 0, 0, 0 );
rc = test_ava_filter( pb, e, e->e_attrs, &f->f_ava, LDAP_FILTER_GE,
verify_access , only_check_access, access_check_done);
break;
case LDAP_FILTER_LE:
- LDAPDebug( LDAP_DEBUG_FILTER, " LE\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " LE\n", 0, 0, 0 );
rc = test_ava_filter( pb, e, e->e_attrs, &f->f_ava, LDAP_FILTER_LE,
verify_access , only_check_access, access_check_done);
break;
case LDAP_FILTER_PRESENT:
- LDAPDebug( LDAP_DEBUG_FILTER, " PRESENT\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " PRESENT\n", 0, 0, 0 );
rc = test_presence_filter( pb, e, f->f_type, verify_access , only_check_access,
access_check_done);
break;
case LDAP_FILTER_APPROX:
- LDAPDebug( LDAP_DEBUG_FILTER, " APPROX\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " APPROX\n", 0, 0, 0 );
rc = test_ava_filter( pb, e, e->e_attrs, &f->f_ava, LDAP_FILTER_APPROX,
verify_access , only_check_access, access_check_done);
break;
case LDAP_FILTER_EXTENDED:
- LDAPDebug( LDAP_DEBUG_FILTER, " EXTENDED\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " EXTENDED\n", 0, 0, 0 );
rc = test_extensible_filter( pb, e, &f->f_mr, verify_access , only_check_access,
access_check_done);
break;
case LDAP_FILTER_AND:
- LDAPDebug( LDAP_DEBUG_FILTER, " AND\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " AND\n", 0, 0, 0 );
rc = test_filter_list( pb, e, f->f_and,
LDAP_FILTER_AND , verify_access, only_check_access, access_check_done);
break;
case LDAP_FILTER_OR:
- LDAPDebug( LDAP_DEBUG_FILTER, " OR\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " OR\n", 0, 0, 0 );
rc = test_filter_list( pb, e, f->f_or,
LDAP_FILTER_OR , verify_access, only_check_access, access_check_done);
break;
case LDAP_FILTER_NOT:
- LDAPDebug( LDAP_DEBUG_FILTER, " NOT\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " NOT\n", 0, 0, 0 );
rc = slapi_filter_test_ext_internal( pb, e, f->f_not , verify_access,
only_check_access, access_check_done);
if(!(verify_access && only_check_access)) /* dont play with access control
return codes */
{
@@ -202,12 +202,12 @@ slapi_filter_test_ext_internal(
break;
default:
- LDAPDebug( LDAP_DEBUG_ANY, " unknown filter type 0x%lX\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, " unknown filter type 0x%lX\n",
f->f_choice, 0, 0 );
rc = -1;
}
- LDAPDebug( LDAP_DEBUG_FILTER, "<= slapi_filter_test %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= slapi_filter_test %d\n", rc, 0,
0 );
return( rc );
}
@@ -275,7 +275,7 @@ int test_ava_filter(
{
int rc;
- LDAPDebug( LDAP_DEBUG_FILTER, "=> test_ava_filter\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> test_ava_filter\n", 0, 0, 0 );
*access_check_done = 0;
@@ -314,7 +314,7 @@ int test_ava_filter(
SLAPI_ACL_SEARCH, ACLPLUGIN_ACCESS_DEFAULT, NULL );
*access_check_done = -1;
if ( only_check_access || rc != LDAP_SUCCESS ) {
- LDAPDebug( LDAP_DEBUG_FILTER, "<= test_ava_filter %d\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= test_ava_filter %d\n",
rc, 0, 0 );
return( rc );
}
@@ -331,7 +331,7 @@ int test_ava_filter(
}
}
- LDAPDebug( LDAP_DEBUG_FILTER, "<= test_ava_filter %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= test_ava_filter %d\n", rc, 0, 0
);
return( rc );
}
@@ -462,7 +462,7 @@ test_extensible_filter(
*/
int rc;
- LDAPDebug( LDAP_DEBUG_FILTER, "=> test_extensible_filter\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> test_extensible_filter\n", 0,
0, 0 );
*access_check_done = 0;
@@ -580,7 +580,7 @@ test_extensible_filter(
}
}
- LDAPDebug( LDAP_DEBUG_FILTER, "<= test_extensible_filter %d\n", rc, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= test_extensible_filter
%d\n", rc, 0, 0 );
return( rc );
}
@@ -600,7 +600,7 @@ test_filter_list(
struct slapi_filter *f;
int access_check_tmp = -1;
- LDAPDebug( LDAP_DEBUG_FILTER, "=> test_filter_list\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> test_filter_list\n", 0, 0, 0
);
*access_check_done = -1;
@@ -627,7 +627,7 @@ test_filter_list(
*access_check_done = 0;
}
- LDAPDebug( LDAP_DEBUG_FILTER, "<= test_filter_list %d\n", nomatch, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= test_filter_list %d\n",
nomatch, 0, 0 );
return( nomatch );
}
@@ -683,7 +683,7 @@ int test_substring_filter(
Slapi_Attr *a;
int rc;
- LDAPDebug( LDAP_DEBUG_FILTER, "=> test_substring_filter\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> test_substring_filter\n", 0, 0,
0 );
*access_check_done = 0;
@@ -737,7 +737,7 @@ int test_substring_filter(
}
}
- LDAPDebug( LDAP_DEBUG_FILTER, "<= test_substring_filter %d\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= test_substring_filter %d\n",
rc, 0, 0 );
return( rc );
}
@@ -844,7 +844,7 @@ slapi_vattr_filter_test_ext_internal(
{
int rc = LDAP_SUCCESS;
- LDAPDebug( LDAP_DEBUG_FILTER, "=> slapi_vattr_filter_test_ext\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> slapi_vattr_filter_test_ext\n",
0, 0, 0 );
/*
* RJP: Not sure if this is semantically right, but we have to
@@ -855,11 +855,11 @@ slapi_vattr_filter_test_ext_internal(
return(0);
}
- LDAPDebug( LDAP_DEBUG_FILTER, "=> test_substring_filter\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> test_substring_filter\n", 0, 0,
0 );
switch ( f->f_choice ) {
case LDAP_FILTER_EQUALITY:
- LDAPDebug( LDAP_DEBUG_FILTER, " EQUALITY\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " EQUALITY\n", 0, 0, 0 );
if ( verify_access ) {
rc = test_filter_access( pb, e, f->f_ava.ava_type,
&f->f_ava.ava_value);
@@ -872,7 +872,7 @@ slapi_vattr_filter_test_ext_internal(
break;
case LDAP_FILTER_SUBSTRINGS:
- LDAPDebug( LDAP_DEBUG_FILTER, " SUBSTRINGS\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " SUBSTRINGS\n", 0, 0, 0 );
if ( verify_access ) {
rc = test_filter_access( pb, e, f->f_sub_type, NULL);
*access_check_done = 1;
@@ -884,7 +884,7 @@ slapi_vattr_filter_test_ext_internal(
break;
case LDAP_FILTER_GE:
- LDAPDebug( LDAP_DEBUG_FILTER, " GE\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " GE\n", 0, 0, 0 );
if ( verify_access ) {
rc = test_filter_access( pb, e, f->f_ava.ava_type,
&f->f_ava.ava_value);
@@ -897,7 +897,7 @@ slapi_vattr_filter_test_ext_internal(
break;
case LDAP_FILTER_LE:
- LDAPDebug( LDAP_DEBUG_FILTER, " LE\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " LE\n", 0, 0, 0 );
if ( verify_access ) {
rc = test_filter_access( pb, e, f->f_ava.ava_type,
&f->f_ava.ava_value);
@@ -910,7 +910,7 @@ slapi_vattr_filter_test_ext_internal(
break;
case LDAP_FILTER_PRESENT:
- LDAPDebug( LDAP_DEBUG_FILTER, " PRESENT\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " PRESENT\n", 0, 0, 0 );
if ( verify_access ) {
rc = test_filter_access( pb, e, f->f_type, NULL);
*access_check_done = 1;
@@ -922,7 +922,7 @@ slapi_vattr_filter_test_ext_internal(
break;
case LDAP_FILTER_APPROX:
- LDAPDebug( LDAP_DEBUG_FILTER, " APPROX\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " APPROX\n", 0, 0, 0 );
if ( verify_access ) {
rc = test_filter_access( pb, e, f->f_ava.ava_type,
&f->f_ava.ava_value);
@@ -935,25 +935,25 @@ slapi_vattr_filter_test_ext_internal(
break;
case LDAP_FILTER_EXTENDED:
- LDAPDebug( LDAP_DEBUG_FILTER, " EXTENDED\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " EXTENDED\n", 0, 0, 0 );
rc = test_extensible_filter( pb, e, &f->f_mr, verify_access ,
only_check_access, access_check_done);
break;
case LDAP_FILTER_AND:
- LDAPDebug( LDAP_DEBUG_FILTER, " AND\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " AND\n", 0, 0, 0 );
rc = vattr_test_filter_list_and( pb, e, f->f_and,
LDAP_FILTER_AND , verify_access, only_check_access, access_check_done);
break;
case LDAP_FILTER_OR:
- LDAPDebug( LDAP_DEBUG_FILTER, " OR\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " OR\n", 0, 0, 0 );
rc = vattr_test_filter_list_or( pb, e, f->f_or,
LDAP_FILTER_OR , verify_access, only_check_access, access_check_done);
break;
case LDAP_FILTER_NOT:
- LDAPDebug( LDAP_DEBUG_FILTER, " NOT\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " NOT\n", 0, 0, 0 );
rc = slapi_vattr_filter_test_ext_internal( pb, e, f->f_not , verify_access,
only_check_access, access_check_done);
if(verify_access && only_check_access)
{
@@ -993,13 +993,13 @@ slapi_vattr_filter_test_ext_internal(
break;
default:
- LDAPDebug( LDAP_DEBUG_ANY, " unknown filter type 0x%lX\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, " unknown filter type 0x%lX\n",
f->f_choice, 0, 0 );
rc = -1;
}
- LDAPDebug( LDAP_DEBUG_FILTER, "<= slapi_vattr_filter_test %d\n", rc, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= slapi_vattr_filter_test %d\n",
rc, 0, 0 );
return( rc );
}
@@ -1037,7 +1037,7 @@ vattr_test_filter_list_and(
int rc = 0;
struct slapi_filter *f;
- LDAPDebug( LDAP_DEBUG_FILTER, "=> vattr_test_filter_list_and\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> vattr_test_filter_list_and\n",
0, 0, 0 );
for ( f = flist; f != NULL; f = f->f_next ) {
rc = slapi_vattr_filter_test_ext_internal( pb, e, f, verify_access, only_check_access,
access_check_done );
@@ -1058,7 +1058,7 @@ vattr_test_filter_list_and(
}
}
- LDAPDebug( LDAP_DEBUG_FILTER, "<= test_filter_list_and %d\n", nomatch, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= test_filter_list_and %d\n",
nomatch, 0, 0 );
if (undefined) return undefined;
return( nomatch );
}
@@ -1079,7 +1079,7 @@ vattr_test_filter_list_or(
int rc = 0;
struct slapi_filter *f;
- LDAPDebug( LDAP_DEBUG_FILTER, "=> vattr_test_filter_list_or\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> vattr_test_filter_list_or\n",
0, 0, 0 );
for ( f = flist; f != NULL; f = f->f_next ) {
if ( verify_access) {
@@ -1107,7 +1107,7 @@ vattr_test_filter_list_or(
}
}
- LDAPDebug( LDAP_DEBUG_FILTER, "<= test_filter_list_or %d\n", nomatch, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= test_filter_list_or %d\n",
nomatch, 0, 0 );
if (nomatch == 1) return undefined;
return( nomatch );
diff --git a/ldap/servers/slapd/init.c b/ldap/servers/slapd/init.c
index 5567d60..5ccdea8 100644
--- a/ldap/servers/slapd/init.c
+++ b/ldap/servers/slapd/init.c
@@ -35,7 +35,7 @@ slapd_init()
if ( g_get_current_conn_count_mutex() == NULL )
{
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"init: PR_NewLock failed\n", 0, 0, 0 );
exit( -1 );
}
@@ -44,7 +44,7 @@ slapd_init()
set_attr_to_protected_list(PSEUDO_ATTR_UNHASHEDUSERPASSWORD, 0);
#ifndef HAVE_TIME_R
if ((time_func_mutex = PR_NewLock()) == NULL ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"init: PR_NewLock failed\n", 0, 0, 0 );
exit(-1);
}
diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c
index 538a167..9a114a0 100644
--- a/ldap/servers/slapd/libglobs.c
+++ b/ldap/servers/slapd/libglobs.c
@@ -1434,13 +1434,13 @@ FrontendConfig_init(void) {
#if SLAPI_CFG_USE_RWLOCK == 1
/* initialize the read/write configuration lock */
if ( (cfg->cfg_rwlock = slapi_new_rwlock()) == NULL ) {
- LDAPDebug ( LDAP_DEBUG_ANY, "FrontendConfig_init: "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "FrontendConfig_init: "
"failed to initialize cfg_rwlock. Exiting now.",0,0,0);
exit(-1);
}
#else
if ((cfg->cfg_lock = PR_NewLock()) == NULL){
- LDAPDebug(LDAP_DEBUG_ANY, "FrontendConfig_init: "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "FrontendConfig_init: "
"failed to initialize cfg_lock. Exiting now.",0,0,0);
exit(-1);
}
@@ -2037,7 +2037,7 @@ config_set_port( const char *attrname, char *port, char *errorbuf,
int apply ) {
}
if ( nPort == 0 ) {
- LDAPDebug( LDAP_DEBUG_ANY, "Information: Non-Secure Port Disabled\n", 0,
0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Information: Non-Secure Port
Disabled\n", 0, 0, 0 );
}
if ( apply ) {
@@ -7181,7 +7181,7 @@ config_set_allowed_sasl_mechs(const char *attrname, char *value,
char *errorbuf,
remove_commas(value);
if(invalid_sasl_mech(value)){
- LDAPDebug(LDAP_DEBUG_ANY,"Invalid value/character for sasl mechanism (%s).
Use ASCII "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Invalid value/character for sasl
mechanism (%s). Use ASCII "
"characters, upto 20 characters, that are
upper-case letters, "
"digits, hyphens, or underscores\n", value, 0,
0);
return LDAP_UNWILLING_TO_PERFORM;
@@ -7628,7 +7628,7 @@ config_set(const char *attr, struct berval **values, char *errorbuf,
int apply)
(char *)values[ii]->bv_val, cgas->whichlog,
errorbuf, apply);
} else {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"config_set: the attribute %s is read only; ignoring new value %s\n",
attr, values[ii]->bv_val, 0);
}
diff --git a/ldap/servers/slapd/localhost.c b/ldap/servers/slapd/localhost.c
index b5df93f..2e2a75a 100644
--- a/ldap/servers/slapd/localhost.c
+++ b/ldap/servers/slapd/localhost.c
@@ -64,7 +64,7 @@ find_localhost_DNS(void)
if (gethostname (hostname, MAXHOSTNAMELEN)) {
int oserr = errno;
- LDAPDebug (LDAP_DEBUG_ANY, "gethostname() failed, error %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "gethostname() failed, error %d
(%s)\n",
oserr, slapd_system_strerror( oserr ), 0 );
return NULL;
}
@@ -72,23 +72,23 @@ find_localhost_DNS(void)
if (hp == NULL) {
int oserr = errno;
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"gethostbyname(\"%s\") failed, error %d (%s)\n",
hostname, oserr, slapd_system_strerror( oserr ));
return NULL;
}
if (hp->h_name == NULL) {
- LDAPDebug (LDAP_DEBUG_ANY, "gethostbyname(\"%s\")->h_name ==
NULL\n", hostname, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"gethostbyname(\"%s\")->h_name == NULL\n", hostname, 0, 0);
return NULL;
}
if (strchr (hp->h_name, '.') != NULL) {
- LDAPDebug (LDAP_DEBUG_CONFIG, "h_name == %s\n", hp->h_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_CONFIG, LOG_DEBUG, "h_name == %s\n",
hp->h_name, 0, 0);
return slapi_ch_strdup (hp->h_name);
} else if (hp->h_aliases != NULL) {
for (alias = hp->h_aliases; *alias != NULL; ++alias) {
if (strchr (*alias, '.') != NULL &&
strncmp (*alias, hp->h_name, strlen (hp->h_name))) {
- LDAPDebug (LDAP_DEBUG_CONFIG, "h_alias == %s\n", *alias, 0,
0);
+ LDAPDebug(LDAP_DEBUG_CONFIG, LOG_DEBUG, "h_alias == %s\n",
*alias, 0, 0);
return slapi_ch_strdup (*alias);
}
}
@@ -100,7 +100,7 @@ find_localhost_DNS(void)
if (f != NULL) {
while (fgets (line, sizeof(line), f)) {
if (strncasecmp (line, "domain", 6) == 0 && isspace
(line[6])) {
- LDAPDebug (LDAP_DEBUG_CONFIG, "%s: %s\n", _PATH_RESCONF, line,
0);
+ LDAPDebug(LDAP_DEBUG_CONFIG, LOG_DEBUG, "%s: %s\n",
_PATH_RESCONF, line, 0);
for (cp = &line[7]; *cp && isspace(*cp); ++cp);
if (*cp) {
domain = cp;
@@ -138,7 +138,7 @@ find_localhost_DNS(void)
PL_strcatn (hostname, sizeof(hostname), ".");
PL_strcatn (hostname, sizeof(hostname), domain);
}
- LDAPDebug (LDAP_DEBUG_CONFIG, "hostname == %s\n", hostname, 0, 0);
+ LDAPDebug(LDAP_DEBUG_CONFIG, LOG_DEBUG, "hostname == %s\n", hostname, 0,
0);
return slapi_ch_strdup (hostname);
}
@@ -192,7 +192,7 @@ set_localhost_DN(void)
if (localhost_DNS != NULL) {
localhost_DN = convert_DNS_to_DN (localhost_DNS);
- LDAPDebug (LDAP_DEBUG_CONFIG, "DNS %s -> DN %s\n", localhost_DNS,
localhost_DN, 0);
+ LDAPDebug(LDAP_DEBUG_CONFIG, LOG_DEBUG, "DNS %s -> DN %s\n",
localhost_DNS, localhost_DN, 0);
}
slapi_ch_free_string(&localhost_DNS);
}
@@ -224,7 +224,7 @@ get_config_DN()
if ( host )
c = slapi_ch_malloc (20 + strlen (host));
else {
- LDAPDebug (LDAP_DEBUG_CONFIG, "get_locahost_DN() returned
\"\"\n",
+ LDAPDebug(LDAP_DEBUG_CONFIG, LOG_DEBUG, "get_locahost_DN() returned
\"\"\n",
0, 0, 0);
c = slapi_ch_malloc (20);
}
diff --git a/ldap/servers/slapd/lock.c b/ldap/servers/slapd/lock.c
index 0cc4694..b74c420 100644
--- a/ldap/servers/slapd/lock.c
+++ b/ldap/servers/slapd/lock.c
@@ -33,7 +33,7 @@ lock_fopen( char *fname, char *type, FILE **lfp )
/* open the lock file */
PR_snprintf( buf, MAXPATHLEN, "%s%s", fname, ".lock" );
if ( (*lfp = fopen( buf, "w" )) == NULL ) {
- LDAPDebug( LDAP_DEBUG_ANY, "could not open \"%s\"\n", buf, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "could not open \"%s\"\n", buf,
0, 0 );
return( NULL );
}
@@ -48,7 +48,7 @@ lock_fopen( char *fname, char *type, FILE **lfp )
/* open the log file */
if ( (fp = fopen( fname, type )) == NULL ) {
- LDAPDebug( LDAP_DEBUG_ANY, "could not open \"%s\"\n", fname, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "could not open \"%s\"\n",
fname, 0, 0 );
#ifdef USE_LOCKF
lockf( fileno( *lfp ), F_ULOCK, 0 );
#else
diff --git a/ldap/servers/slapd/log.c b/ldap/servers/slapd/log.c
index e5c6e11..18884b6 100644
--- a/ldap/servers/slapd/log.c
+++ b/ldap/servers/slapd/log.c
@@ -474,7 +474,7 @@ log_update_accesslogdir(char *pathname, int apply)
/* try to open the file, we may have a incorrect path */
if (! LOG_OPEN_APPEND(fp, pathname, loginfo.log_access_mode)) {
- LDAPDebug(LDAP_DEBUG_ANY, "WARNING: can't open file %s. "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "WARNING: can't open file %s. "
"errno %d (%s)\n",
pathname, errno, slapd_system_strerror(errno));
/* stay with the current log file */
@@ -495,7 +495,7 @@ log_update_accesslogdir(char *pathname, int apply)
if (loginfo.log_access_fdes) {
LogFileInfo *logp, *d_logp;
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"LOGINFO:Closing the access log file. "
"Moving to a new access log file (%s)\n", pathname,0,0);
@@ -629,7 +629,7 @@ log_update_auditlogdir(char *pathname, int apply)
/* try to open the file, we may have a incorrect path */
if (! LOG_OPEN_APPEND(fp, pathname, loginfo.log_audit_mode)) {
- LDAPDebug(LDAP_DEBUG_ANY, "WARNING: can't open file %s. "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "WARNING: can't open file %s. "
"errno %d (%s)\n",
pathname, errno, slapd_system_strerror(errno));
/* stay with the current log file */
@@ -649,7 +649,7 @@ log_update_auditlogdir(char *pathname, int apply)
LOG_AUDIT_LOCK_WRITE ();
if (loginfo.log_audit_fdes) {
LogFileInfo *logp, *d_logp;
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"LOGINFO:Closing the audit log file. "
"Moving to a new audit file (%s)\n", pathname,0,0);
@@ -707,7 +707,7 @@ log_update_auditfaillogdir(char *pathname, int apply)
/* try to open the file, we may have a incorrect path */
if (! LOG_OPEN_APPEND(fp, pathname, loginfo.log_auditfail_mode)) {
- LDAPDebug(LDAP_DEBUG_ANY, "WARNING: can't open file %s. "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "WARNING: can't open file %s. "
"errno %d (%s)\n",
pathname, errno, slapd_system_strerror(errno));
/* stay with the current log file */
@@ -727,7 +727,7 @@ log_update_auditfaillogdir(char *pathname, int apply)
LOG_AUDITFAIL_LOCK_WRITE ();
if (loginfo.log_auditfail_fdes) {
LogFileInfo *logp, *d_logp;
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"LOGINFO:Closing the auditfail log file. "
"Moving to a new auditfail file (%s)\n", pathname,0,0);
@@ -880,7 +880,7 @@ log_set_numlogsperdir(const char *attrname, char *numlogs_str, int
logtype, char
break;
default:
rv = LDAP_OPERATIONS_ERROR;
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"log_set_numlogsperdir: invalid log type %d", logtype,0,0 );
}
}
@@ -976,7 +976,7 @@ log_set_logsize(const char *attrname, char *logsize_str, int logtype,
char *retu
}
/* logsize is in MB */
if (rv == 2) {
- LDAPDebug (LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Invalid value for Maximum log size:"
"Maxlogsize:%d (MB) exceeds Maxdisksize:%d (MB)\n",
logsize, mdiskspace/LOG_MB_IN_BYTES,0);
@@ -2013,7 +2013,7 @@ slapd_log_audit_internal (
if (log__needrotation(loginfo.log_audit_fdes,
SLAPD_AUDIT_LOG) == LOG_ROTATE) {
if (log__open_auditlogfile(LOGFILE_NEW, 1) != LOG_SUCCESS) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"LOGINFO: Unable to open audit file:%s\n",
loginfo.log_audit_file,0,0);
LOG_AUDIT_UNLOCK_WRITE();
@@ -2072,7 +2072,7 @@ slapd_log_auditfail_internal (
if (log__needrotation(loginfo.log_auditfail_fdes,
SLAPD_AUDITFAIL_LOG) == LOG_ROTATE) {
if (log__open_auditfaillogfile(LOGFILE_NEW, 1) != LOG_SUCCESS) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"LOGINFO: Unable to open auditfail file:%s\n",
loginfo.log_auditfail_file,0,0);
LOG_AUDITFAIL_UNLOCK_WRITE();
@@ -2650,7 +2650,7 @@ log__open_accesslogfile(int logfile_state, int locked)
int oserr = errno;
loginfo.log_access_fdes = NULL;
if (!locked) LOG_ACCESS_UNLOCK_WRITE();
- LDAPDebug(LDAP_DEBUG_ANY, "access file open %s failed errno %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "access file open %s failed errno %d
(%s)\n",
loginfo.log_access_file, oserr, slapd_system_strerror(oserr));
return LOG_UNABLE_TO_OPENFILE;
}
@@ -2667,7 +2667,7 @@ log__open_accesslogfile(int logfile_state, int locked)
if (! LOG_OPEN_WRITE(fpinfo, loginfo.log_accessinfo_file, loginfo.log_access_mode)) {
int oserr = errno;
if (!locked) LOG_ACCESS_UNLOCK_WRITE();
- LDAPDebug( LDAP_DEBUG_ANY, "accessinfo file open %s failed errno %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "accessinfo file open %s failed errno %d
(%s)\n",
loginfo.log_accessinfo_file,
oserr, slapd_system_strerror(oserr));
return LOG_UNABLE_TO_OPENFILE;
@@ -2820,12 +2820,12 @@ log_rotate:
if (logtype!=SLAPD_ERROR_LOG)
{
if (type == LOG_SIZE_EXCEEDED) {
- LDAPDebug (LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"LOGINFO:End of Log because size exceeded(Max:%"
NSPRI64 "d bytes) (Is:%" NSPRI64 "d bytes)\n",
maxlogsize, f_size, 0);
} else if ( type == LOG_EXPIRED) {
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"LOGINFO:End of Log because time exceeded(Max:%d secs) (Is:%ld
secs)\n",
rotationtime_secs, curr_time - log_createtime,0);
}
@@ -3024,7 +3024,7 @@ log__delete_rotated_logs()
log_convert_time (logp->l_ctime, tbuf, 1);
PR_snprintf (buffer, sizeof(buffer), "%s.%s", loginfo.log_access_file,
tbuf);
- LDAPDebug(LDAP_DEBUG_ANY,"Deleted Rotated Log: %s\n",buffer,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Deleted Rotated Log: %s\n",buffer,0,0);
if (PR_Delete(buffer) != PR_SUCCESS) {
logp = logp->l_next;
@@ -3737,7 +3737,7 @@ delete_logfile:
if (!locked) {
/* if locked, we should not call LDAPDebug,
which tries to get a lock internally. */
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"LOGINFO:Removing file:%s.%s because of (%s)\n",
loginfo.log_error_file, tbuf,
logstr);
@@ -4633,7 +4633,7 @@ log__open_auditlogfile(int logfile_state, int locked)
/* open a new log file */
if (! LOG_OPEN_APPEND(fp, loginfo.log_audit_file, loginfo.log_audit_mode)) {
- LDAPDebug(LDAP_DEBUG_ANY, "WARNING: can't open file %s. "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "WARNING: can't open file %s. "
"errno %d (%s)\n",
loginfo.log_audit_file, errno, slapd_system_strerror(errno));
if (!locked) LOG_AUDIT_UNLOCK_WRITE();
@@ -4654,7 +4654,7 @@ log__open_auditlogfile(int logfile_state, int locked)
loginfo.log_audit_state |= LOGGING_NEED_TITLE;
if (! LOG_OPEN_WRITE(fpinfo, loginfo.log_auditinfo_file, loginfo.log_audit_mode)) {
- LDAPDebug(LDAP_DEBUG_ANY, "WARNING: can't open file %s. "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "WARNING: can't open file %s. "
"errno %d (%s)\n",
loginfo.log_auditinfo_file, errno, slapd_system_strerror(errno));
if (!locked) LOG_AUDIT_UNLOCK_WRITE();
@@ -4759,7 +4759,7 @@ log__open_auditfaillogfile(int logfile_state, int locked)
/* open a new log file */
if (! LOG_OPEN_APPEND(fp, loginfo.log_auditfail_file, loginfo.log_auditfail_mode)) {
- LDAPDebug(LDAP_DEBUG_ANY, "WARNING: can't open file %s. "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "WARNING: can't open file %s. "
"errno %d (%s)\n",
loginfo.log_auditfail_file, errno, slapd_system_strerror(errno));
if (!locked) LOG_AUDITFAIL_UNLOCK_WRITE();
@@ -4780,7 +4780,7 @@ log__open_auditfaillogfile(int logfile_state, int locked)
loginfo.log_auditfail_state |= LOGGING_NEED_TITLE;
if (! LOG_OPEN_WRITE(fpinfo, loginfo.log_auditfailinfo_file,
loginfo.log_auditfail_mode)) {
- LDAPDebug(LDAP_DEBUG_ANY, "WARNING: can't open file %s. "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "WARNING: can't open file %s. "
"errno %d (%s)\n",
loginfo.log_auditfailinfo_file, errno, slapd_system_strerror(errno));
if (!locked) LOG_AUDITFAIL_UNLOCK_WRITE();
@@ -4927,7 +4927,7 @@ static void log_flush_buffer(LogBufferInfo *lbi, int type, int
sync_now)
if (log__needrotation(loginfo.log_access_fdes,
SLAPD_ACCESS_LOG) == LOG_ROTATE) {
if (log__open_accesslogfile(LOGFILE_NEW, 1) != LOG_SUCCESS) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"LOGINFO: Unable to open access file:%s\n",
loginfo.log_access_file,0,0);
lbi->current = lbi->top; /* reset counter to prevent overwriting rest of lbi
struct */
diff --git a/ldap/servers/slapd/main.c b/ldap/servers/slapd/main.c
index e9e5ab9..4b77fbb 100644
--- a/ldap/servers/slapd/main.c
+++ b/ldap/servers/slapd/main.c
@@ -94,10 +94,10 @@ static int init_cmd_shutdown_detect(void)
int rc;
sigset_t proc_mask;
- LDAPDebug( LDAP_DEBUG_TRACE, "Reseting signal mask....\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "Reseting signal mask....\n", 0, 0,
0);
(void)sigemptyset( &proc_mask );
rc = pthread_sigmask( SIG_SETMASK, &proc_mask, NULL );
- LDAPDebug( LDAP_DEBUG_TRACE, " %s \n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, " %s \n",
rc ? "Failed to reset signal mask":"....Done (signal mask
reset)!!", 0, 0 );
}
@@ -182,14 +182,14 @@ chown_dir_files(char *name, struct passwd *pw, PRBool strip_fn,
PRBool both)
{
if((ptr=strrchr(log,'/'))==NULL)
{
- LDAPDebug(LDAP_DEBUG_ANY, "Caution changing ownership of ./%s
\n",name,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Caution changing ownership of ./%s
\n",name,0,0);
if(slapd_chown_if_not_owner(log, pw->pw_uid, -1 )){
- LDAPDebug(LDAP_DEBUG_ANY, "chown_dir_files: file (%s) chown failed (%d)
%s.\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "chown_dir_files: file (%s) chown
failed (%d) %s.\n",
log, errno, slapd_system_strerror(errno));
}
rc=1;
} else if(log==ptr) {
- LDAPDebug(LDAP_DEBUG_ANY, "Caution changing ownership of / directory and its
contents to %s\n",pw->pw_name,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Caution changing ownership of / directory
and its contents to %s\n",pw->pw_name,0,0);
*(++ptr)='\0';
} else {
*ptr='\0';
@@ -207,7 +207,7 @@ chown_dir_files(char *name, struct passwd *pw, PRBool strip_fn, PRBool
both)
gid = -1;
}
if(slapd_chown_if_not_owner( file, pw->pw_uid, gid )){
- LDAPDebug(LDAP_DEBUG_ANY, "chown_dir_files: file (%s) chown failed (%d)
%s.\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "chown_dir_files: file (%s) chown failed
(%d) %s.\n",
file, errno, slapd_system_strerror(errno));
}
}
@@ -228,7 +228,7 @@ fix_ownership(void)
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
if (slapdFrontendConfig->localuser == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Local user missing from frontend configuration\n",
0, 0, 0);
return;
@@ -237,7 +237,7 @@ fix_ownership(void)
if (slapdFrontendConfig->localuserinfo == NULL) {
pw = getpwnam( slapdFrontendConfig->localuser );
if ( NULL == pw ) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Unable to find user %s in system account database, "
"errno %d (%s)\n",
slapdFrontendConfig->localuser, errno, strerror(errno));
@@ -283,20 +283,20 @@ static int main_setuid(char *username)
if (pw == NULL) {
int oserr = errno;
- LDAPDebug (LDAP_DEBUG_ANY, "getpwnam(%s) == NULL, error %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "getpwnam(%s) == NULL, error %d (%s)\n",
username, oserr, slapd_system_strerror(oserr));
} else {
if (setgid (pw->pw_gid) != 0) {
int oserr = errno;
- LDAPDebug (LDAP_DEBUG_ANY, "setgid(%li) != 0, error %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "setgid(%li) != 0, error %d (%s)\n",
(long)pw->pw_gid, oserr, slapd_system_strerror(oserr));
return -1;
}
if (setuid (pw->pw_uid) != 0) {
int oserr = errno;
- LDAPDebug (LDAP_DEBUG_ANY, "setuid(%li) != 0, error %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "setuid(%li) != 0, error %d (%s)\n",
(long)pw->pw_uid, oserr, slapd_system_strerror(oserr));
return -1;
}
@@ -757,7 +757,7 @@ main( int argc, char **argv)
/* do it before splitting off to other modes too -robey */
/* -richm: must be done before reading config files */
if (0 != (return_value = compute_init())) {
- LDAPDebug(LDAP_DEBUG_ANY, "Initialization Failed 0 %d\n",return_value,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Initialization Failed 0
%d\n",return_value,0,0);
exit (1);
}
entry_computed_attr_init();
@@ -777,7 +777,7 @@ main( int argc, char **argv)
#ifdef PUMPKIN_HOUR
if ( time( NULL ) > (PUMPKIN_HOUR - 10) ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: ** This beta software has expired **\n", 0, 0, 0 );
exit( 1 );
}
@@ -842,7 +842,7 @@ main( int argc, char **argv)
return_value = daemon_pre_setuid_init(&ports_info);
if (0 != return_value) {
- LDAPDebug( LDAP_DEBUG_ANY, "Failed to init daemon\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to init daemon\n",
0, 0, 0 );
exit(1);
}
@@ -851,7 +851,7 @@ main( int argc, char **argv)
/* Now, sockets are open, so we can safely change identity now */
return_value = main_setuid(slapdFrontendConfig->localuser);
if (0 != return_value) {
- LDAPDebug( LDAP_DEBUG_ANY, "Failed to change user and group identity to that of
%s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to change user and group identity to
that of %s\n",
slapdFrontendConfig->localuser, 0, 0 );
exit(1);
}
@@ -899,7 +899,7 @@ main( int argc, char **argv)
case SLAPD_EXEMODE_REFERRAL:
/* check that all the necessary info was given, then go on */
if (! config_check_referral_mode()) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: No referral URL supplied\n", 0, 0, 0);
usage( myname, extraname );
exit(1);
@@ -937,12 +937,12 @@ main( int argc, char **argv)
/* Ensure that we can read from and write to our rundir */
if (access(rundir, R_OK | W_OK)) {
- LDAPDebug(LDAP_DEBUG_ANY, "Unable to access " CONFIG_RUNDIR_ATTRIBUTE
": %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Unable to access "
CONFIG_RUNDIR_ATTRIBUTE ": %s\n",
slapd_system_strerror(errno), 0, 0);
- LDAPDebug(LDAP_DEBUG_ANY, "Ensure that user \"%s\" has read and write
"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Ensure that user \"%s\" has read
and write "
"permissions on %s\n",
slapdFrontendConfig->localuser, rundir, 0);
- LDAPDebug(LDAP_DEBUG_ANY, "Shutting down.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Shutting down.\n", 0, 0, 0);
slapi_ch_free_string(&rundir);
return_value = 1;
goto cleanup;
@@ -988,7 +988,7 @@ main( int argc, char **argv)
if ((slapd_exemode != SLAPD_EXEMODE_REFERRAL) &&
( add_new_slapd_process(slapd_exemode, db2ldif_dump_replica,
skip_db_protect_check) == -1 )) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Shutting down due to possible conflicts with other slapd processes\n",
0, 0, 0 );
return_value = 1;
@@ -1004,7 +1004,7 @@ main( int argc, char **argv)
if (1) {
char *versionstring = config_get_versionstring();
char *buildnum = config_get_buildnum();
- LDAPDebug( LDAP_DEBUG_ANY, "%s B%s starting up\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s B%s starting up\n",
versionstring, buildnum, 0 );
slapi_ch_free((void **)&buildnum);
slapi_ch_free((void **)&versionstring);
@@ -1032,7 +1032,7 @@ main( int argc, char **argv)
if (mapping_tree_init())
{
- LDAPDebug( LDAP_DEBUG_ANY, "Failed to init mapping tree\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to init mapping tree\n",
0, 0, 0 );
return_value = 1;
goto cleanup;
@@ -1047,7 +1047,7 @@ main( int argc, char **argv)
slapi_sdn_free (&sdn);
if (rc != UID_SUCCESS)
{
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Fatal Error---Failed to initialize uniqueid generator; error = %d. "
"Exiting now.\n", rc, 0, 0 );
return_value = 1;
@@ -1057,11 +1057,11 @@ main( int argc, char **argv)
/* --ugaston: register the start-tls plugin */
if ( slapd_security_library_is_initialized() != 0 ) {
start_tls_register_plugin();
- LDAPDebug( LDAP_DEBUG_PLUGIN, "Start TLS plugin registered.\n",
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Start TLS plugin registered.\n",
0, 0, 0 );
}
passwd_modify_register_plugin();
- LDAPDebug( LDAP_DEBUG_PLUGIN,
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG,
"Password Modify plugin registered.\n", 0, 0, 0 );
/* Cleanup old tasks that may still be in the DSE from a previous
@@ -1107,7 +1107,7 @@ main( int argc, char **argv)
} else if (i_port) {
} else if ( config_get_security()) {
} else {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Fatal Error---No ports specified. "
"Exiting now.\n", 0, 0, 0 );
@@ -1125,7 +1125,7 @@ main( int argc, char **argv)
pw_init();
/* Initialize the sasl mapping code */
if (sasl_map_init()) {
- LDAPDebug( LDAP_DEBUG_ANY, "Failed to initialize sasl mapping code\n", 0, 0,
0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to initialize sasl mapping
code\n", 0, 0, 0 );
}
}
@@ -1148,7 +1148,7 @@ main( int argc, char **argv)
time( &starttime );
slapd_daemon(&ports_info);
}
- LDAPDebug( LDAP_DEBUG_ANY, "slapd stopped.\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "slapd stopped.\n", 0, 0, 0 );
reslimit_cleanup();
compute_terminate();
vattr_cleanup();
@@ -2012,7 +2012,7 @@ slapd_exemode_ldif2db(void)
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
if ( ldif_file == NULL ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: Required argument -i <ldiffile> missing\n",
0, 0, 0 );
usage( myname, extraname );
@@ -2034,7 +2034,7 @@ slapd_exemode_ldif2db(void)
if (lookup_instance_name_by_suffixes(db2ldif_include, db2ldif_exclude,
&instances) < 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: backend instances name [-n <name>] or "
"included suffix [-s <suffix>] need to be specified.\n",
0, 0, 0);
@@ -2046,26 +2046,26 @@ slapd_exemode_ldif2db(void)
;
if (counter == 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR 1: There is no backend instance to import to.\n",
0, 0, 0);
return 1;
} else if (counter > 1) {
int i;
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: There are multiple backend instances specified:\n",
0, 0, 0);
for (i = 0; i < counter; i++)
- LDAPDebug(LDAP_DEBUG_ANY, " : %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, " : %s\n",
instances[i], 0, 0);
return 1;
} else {
- LDAPDebug(LDAP_DEBUG_ANY, "Backend Instance: %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Backend Instance: %s\n",
*instances, 0, 0);
cmd_line_instance_name = *instances;
}
} else {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR 2: There is no backend instance to import to.\n",
0, 0, 0);
return 1;
@@ -2074,7 +2074,7 @@ slapd_exemode_ldif2db(void)
plugin = lookup_plugin_by_instance_name(cmd_line_instance_name);
if (plugin == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: Could not find backend '%s'.\n",
cmd_line_instance_name, 0, 0);
return 1;
@@ -2087,14 +2087,14 @@ slapd_exemode_ldif2db(void)
if ( add_new_slapd_process(slapd_exemode, db2ldif_dump_replica,
skip_db_protect_check) == -1 ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Shutting down due to possible conflicts with other slapd
processes\n",
0, 0, 0 );
return 1;
}
/* check for slapi v2 support */
if (! SLAPI_PLUGIN_IS_V2(plugin)) {
- LDAPDebug(LDAP_DEBUG_ANY, "ERROR: %s is too old to reindex all.\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: %s is too old to reindex
all.\n",
plugin->plg_name, 0, 0);
return 1;
}
@@ -2121,7 +2121,7 @@ slapd_exemode_ldif2db(void)
if ( plugin->plg_ldif2db != NULL ) {
return_value = (*plugin->plg_ldif2db)( &pb );
} else {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: no ldif2db function defined for "
"%s\n", plugin->plg_name, 0, 0 );
return_value = -1;
@@ -2157,7 +2157,7 @@ slapd_exemode_db2ldif(int argc, char** argv)
if (lookup_instance_name_by_suffixes(db2ldif_include, db2ldif_exclude,
&instances) < 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: backend instances name [-n <name>] or "
"included suffix [-s <suffix>] need to be specified.\n",
0, 0, 0);
@@ -2169,19 +2169,19 @@ slapd_exemode_db2ldif(int argc, char** argv)
;
if (counter == 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR 1: There is no backend instance to export from.\n",
0, 0, 0);
return 1;
} else {
- LDAPDebug(LDAP_DEBUG_ANY, "Backend Instance(s): \n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Backend Instance(s): \n", 0, 0, 0);
for (ip = instances, counter = 0; ip && *ip; ip++, counter++) {
- LDAPDebug(LDAP_DEBUG_ANY, "\t%s\n", *ip, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "\t%s\n", *ip, 0, 0);
}
cmd_line_instance_names = instances;
}
} else {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR 2: There is no backend instance to export from.\n",
0, 0, 0);
return 1;
@@ -2196,14 +2196,14 @@ slapd_exemode_db2ldif(int argc, char** argv)
plugin = lookup_plugin_by_instance_name(*instp);
if (plugin == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: Could not find backend '%s'.\n",
*instp, 0, 0);
return 1;
}
if (plugin->plg_db2ldif == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "ERROR: no db2ldif function defined for "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: no db2ldif function defined for
"
"backend %s - cannot export\n", *instp, 0, 0);
return 1;
}
@@ -2214,7 +2214,7 @@ slapd_exemode_db2ldif(int argc, char** argv)
*/
if ( add_new_slapd_process(slapd_exemode, db2ldif_dump_replica,
skip_db_protect_check) == -1 ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Shutting down due to possible conflicts "
"with other slapd processes\n",
0, 0, 0 );
@@ -2222,7 +2222,7 @@ slapd_exemode_db2ldif(int argc, char** argv)
}
if (! (SLAPI_PLUGIN_IS_V2(plugin))) {
- LDAPDebug(LDAP_DEBUG_ANY, "ERROR: %s is too old to do exports.\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: %s is too old to do
exports.\n",
plugin->plg_name, 0, 0);
return 1;
}
@@ -2374,7 +2374,7 @@ static int slapd_exemode_db2index(void)
if (lookup_instance_name_by_suffixes(db2ldif_include, db2ldif_exclude,
&instances) < 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: backend instances name [-n <name>] or "
"included suffix [-s <suffix>] need to be
specified.\n",
0, 0, 0);
@@ -2386,26 +2386,26 @@ static int slapd_exemode_db2index(void)
;
if (counter == 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR 1: There is no backend instance to import
to.\n",
0, 0, 0);
return 1;
} else if (counter > 1) {
int i;
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: There are multiple backend instances
specified:\n",
0, 0, 0);
for (i = 0; i < counter; i++)
- LDAPDebug(LDAP_DEBUG_ANY, " : %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, " : %s\n",
instances[i], 0, 0);
return 1;
} else {
- LDAPDebug(LDAP_DEBUG_ANY, "Backend Instance: %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Backend Instance: %s\n",
*instances, 0, 0);
cmd_line_instance_name = *instances;
}
} else {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR 2: There is no backend instance to import to.\n",
0, 0, 0);
return 1;
@@ -2414,7 +2414,7 @@ static int slapd_exemode_db2index(void)
plugin = lookup_plugin_by_instance_name(cmd_line_instance_name);
if (plugin == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: Could not find backend '%s'.\n",
cmd_line_instance_name, 0, 0);
return 1;
@@ -2423,7 +2423,7 @@ static int slapd_exemode_db2index(void)
/* make sure nothing else is running */
if (add_new_slapd_process(slapd_exemode, db2ldif_dump_replica,
skip_db_protect_check) == -1) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Shutting down due to possible conflicts with other "
"slapd processes.\n", 0, 0, 0);
return 1;
@@ -2456,13 +2456,13 @@ slapd_exemode_db2archive(void)
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
if ((backend_plugin = plugin_get_by_name("ldbm database")) == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: Could not find the ldbm backend plugin.\n",
0, 0, 0);
return 1;
}
if (NULL == archive_name) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: no archive directory supplied\n",
0, 0, 0 );
return 1;
@@ -2474,13 +2474,13 @@ slapd_exemode_db2archive(void)
*/
if ( add_new_slapd_process(slapd_exemode, db2ldif_dump_replica,
skip_db_protect_check) == -1 ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Shutting down due to possible conflicts with other slapd
processes\n",
0, 0, 0 );
return 1;
}
if (compute_init()) {
- LDAPDebug(LDAP_DEBUG_ANY, "Initialization Failed 0 %d\n",return_value,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Initialization Failed 0
%d\n",return_value,0,0);
return 1;
}
if (!is_quiet) {
@@ -2510,13 +2510,13 @@ slapd_exemode_archive2db(void)
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
if ((backend_plugin = plugin_get_by_name("ldbm database")) == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: Could not find the ldbm backend plugin.\n",
0, 0, 0);
return 1;
}
if (NULL == archive_name) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: no archive directory supplied\n",
0, 0, 0 );
return 1;
@@ -2528,13 +2528,13 @@ slapd_exemode_archive2db(void)
*/
if ( add_new_slapd_process(slapd_exemode, db2ldif_dump_replica,
skip_db_protect_check) == -1 ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Shutting down due to possible conflicts with other slapd
processes\n",
0, 0, 0 );
return 1;
}
if (compute_init()) {
- LDAPDebug(LDAP_DEBUG_ANY, "Initialization Failed 0 %d\n",return_value,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Initialization Failed 0
%d\n",return_value,0,0);
return 1;
}
@@ -2569,7 +2569,7 @@ slapd_exemode_upgradedb(void)
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
if ( archive_name == NULL ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: Required argument -a <backup_dir> missing\n",
0, 0, 0 );
usage( myname, extraname );
@@ -2582,7 +2582,7 @@ slapd_exemode_upgradedb(void)
mapping_tree_init();
if ((backend_plugin = plugin_get_by_name("ldbm database")) == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: Could not find the ldbm backend plugin.\n",
0, 0, 0);
return 1;
@@ -2593,14 +2593,14 @@ slapd_exemode_upgradedb(void)
* slapd processes that are currently running
*/
if (add_new_slapd_process(slapd_exemode, 0, skip_db_protect_check) == -1) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Shutting down due to possible conflicts with other slapd
processes\n",
0, 0, 0 );
return 1;
}
/* check for slapi v2 support */
if (! SLAPI_PLUGIN_IS_V2(backend_plugin)) {
- LDAPDebug(LDAP_DEBUG_ANY, "ERROR: %s is too old to do convert idl.\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: %s is too old to do convert
idl.\n",
backend_plugin->plg_name, 0, 0);
return 1;
}
@@ -2620,7 +2620,7 @@ slapd_exemode_upgradedb(void)
if ( backend_plugin->plg_upgradedb != NULL ) {
return_value = (*backend_plugin->plg_upgradedb)( &pb );
} else {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: no upgradedb function defined for "
"%s\n", backend_plugin->plg_name, 0, 0 );
return_value = -1;
@@ -2695,7 +2695,7 @@ slapd_exemode_upgradednformat(void)
if ( backend_plugin->plg_upgradednformat != NULL ) {
rc = (*backend_plugin->plg_upgradednformat)( &pb );
} else {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: no upgradednformat function defined for "
"%s\n", backend_plugin->plg_name, 0, 0 );
}
@@ -2719,7 +2719,7 @@ slapd_exemode_dbverify(void)
*/
mapping_tree_init();
if ((backend_plugin = plugin_get_by_name("ldbm database")) == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: Could not find the ldbm backend plugin.\n",
0, 0, 0);
return 1;
@@ -2727,7 +2727,7 @@ slapd_exemode_dbverify(void)
/* 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",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: %s is too old to do
dbverify.\n",
backend_plugin->plg_name, 0, 0);
return 1;
}
@@ -2743,7 +2743,7 @@ slapd_exemode_dbverify(void)
if ( backend_plugin->plg_dbverify != NULL ) {
return_value = (*backend_plugin->plg_dbverify)( &pb );
} else {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: no db verify function defined for "
"%s\n", backend_plugin->plg_name, 0, 0 );
return_value = -1;
diff --git a/ldap/servers/slapd/mapping_tree.c b/ldap/servers/slapd/mapping_tree.c
index 8d98275..8dbf111 100644
--- a/ldap/servers/slapd/mapping_tree.c
+++ b/ldap/servers/slapd/mapping_tree.c
@@ -429,7 +429,7 @@ mtn_state_to_int(const char * state_string, Slapi_Entry *entry)
} else if (!strcasecmp(state_string, "container")) {
return MTN_CONTAINER;
} else {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: Unknown state, %s, for mapping tree node %s."
" Defaulting to DISABLED\n",
state_string, slapi_entry_get_dn(entry), 0);
@@ -452,7 +452,7 @@ mtn_get_referral_from_entry(Slapi_Entry * entry)
slapi_attr_get_numvalues(attr, &nb);
hint = slapi_attr_first_value(attr, &val);
if (NULL == val) {
- LDAPDebug(LDAP_DEBUG_ANY, "Warning: The nsslapd-referral attribute has no
value for the mapping tree node %s\n", slapi_entry_get_dn(entry), 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Warning: The nsslapd-referral attribute
has no value for the mapping tree node %s\n", slapi_entry_get_dn(entry), 0, 0);
return NULL;
}
@@ -517,7 +517,7 @@ get_backends_from_attr(Slapi_Attr *attr, backend ***be_list, char
***be_names,
tmp_backend_name);
if (new_node && (new_node != node))
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: backend %s is already pointed to by a mapping tree"
" node. Only one mapping tree node can point to a backend\n",
tmp_backend_name, 0, 0);
@@ -613,7 +613,7 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node
**newnodep )
subtree = get_subtree_from_entry(entry);
/* Make sure we know the root dn of the subtree for this node. */
if (NULL == subtree) {
- LDAPDebug(LDAP_DEBUG_ANY, "Warning: Unable to determine the subtree
represented by the mapping tree node %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Warning: Unable to determine the subtree
represented by the mapping tree node %s\n",
slapi_entry_get_dn(entry), 0, 0);
return lderr;
}
@@ -633,7 +633,7 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node
**newnodep )
/* Make sure a node does not already exist for this subtree */
if ( parent_node != NULL && NULL !=
mtn_get_mapping_tree_node_by_entry(mapping_tree_root,
subtree)) {
- LDAPDebug(LDAP_DEBUG_ANY, "Warning: a mapping tree node for the"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Warning: a mapping tree node for
the"
" subtree %s already exists; unable to add the node %s\n",
slapi_sdn_get_dn(subtree), slapi_entry_get_dn(entry), 0);
slapi_sdn_free(&subtree);
@@ -665,7 +665,7 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node
**newnodep )
if (NULL == be_list)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: The nsslapd-backend attribute has no value for the mapping
tree node %s\n",
slapi_entry_get_dn(entry), 0, 0);
continue;
@@ -679,7 +679,7 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node
**newnodep )
slapi_attr_first_value(attr, &val);
if (NULL == val) {
- LDAPDebug(LDAP_DEBUG_ANY, "Warning: Can't determine the state of
the mapping tree node %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Warning: Can't determine the
state of the mapping tree node %s\n",
slapi_entry_get_dn(entry), 0, 0);
continue;
}
@@ -690,7 +690,7 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node
**newnodep )
} else if (!strcasecmp(type, "nsslapd-distribution-plugin")) {
slapi_attr_first_value(attr, &val);
if (NULL == val) {
- LDAPDebug(LDAP_DEBUG_ANY, "Warning: The nsslapd-distribution-plugin
attribute has no value for the mapping tree node %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Warning: The
nsslapd-distribution-plugin attribute has no value for the mapping tree node %s\n",
slapi_entry_get_dn(entry), 0, 0);
continue;
}
@@ -698,7 +698,7 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node
**newnodep )
} else if (!strcasecmp(type, "nsslapd-distribution-funct")) {
slapi_attr_first_value(attr, &val);
if (NULL == val) {
- LDAPDebug(LDAP_DEBUG_ANY, "Warning: The nsslapd-distribution-plugin
attribute has no value for the mapping tree node %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Warning: The
nsslapd-distribution-plugin attribute has no value for the mapping tree node %s\n",
slapi_entry_get_dn(entry), 0, 0);
continue;
}
@@ -707,7 +707,7 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node
**newnodep )
const char *sval;
slapi_attr_first_value(attr, &val);
if (NULL == val) {
- LDAPDebug(LDAP_DEBUG_ANY, "Warning: The nsslapd-distribution-plugin
attribute has no value for the mapping tree node %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Warning: The
nsslapd-distribution-plugin attribute has no value for the mapping tree node %s\n",
slapi_entry_get_dn(entry), 0, 0);
continue;
}
@@ -719,7 +719,7 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node
**newnodep )
else if (strcmp(sval,"referral") == 0)
plugin_rootmode = CHAIN_ROOT_UPDATE_REFERRAL;
else
- LDAPDebug(LDAP_DEBUG_ANY, "Warning: The
nsslapd-distribution-root-update attribute has undefined value (%s) for the mapping tree
node %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Warning: The
nsslapd-distribution-root-update attribute has undefined value (%s) for the mapping tree
node %s\n",
sval, slapi_entry_get_dn(entry), 0);
} else if (!strcasecmp(type, MAPPING_TREE_PARENT_ATTRIBUTE)) {
Slapi_DN *parent_node_dn = get_parent_from_entry(entry);
@@ -729,7 +729,7 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node
**newnodep )
if (parent_node == NULL)
{
parent_node = mapping_tree_root;
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: could not find parent for %s defaulting to
root\n",
slapi_entry_get_dn(entry), 0, 0);
}
@@ -745,7 +745,7 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node
**newnodep )
be = defbackend_get_backend();
if(be == NULL)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: default container has not been created for the NULL
SUFFIX node.\n",
0, 0, 0);
slapi_sdn_free(&subtree);
@@ -778,7 +778,7 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node
**newnodep )
if (((state == MTN_BACKEND) || (state == MTN_REFERRAL_ON_UPDATE))
&& (be_names == NULL))
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: node %s must define a backend\n",
slapi_entry_get_dn(entry), 0, 0);
slapi_sdn_free(&subtree);
@@ -788,7 +788,7 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node
**newnodep )
if (((state == MTN_REFERRAL) || (state == MTN_REFERRAL_ON_UPDATE))
&& (referral == NULL))
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: node %s must define referrals to be in referral state\n",
slapi_entry_get_dn(entry), 0, 0);
slapi_sdn_free(&subtree);
@@ -802,7 +802,7 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node
**newnodep )
"Entry Distribution", 1);
if (plugin == NULL)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: node %s cannot find distribution plugin. "
SLAPI_COMPONENT_NAME_NSPR " %d (%s)\n",
slapi_entry_get_dn(entry), PR_GetError(),
slapd_pr_strerror(PR_GetError()));
@@ -821,7 +821,7 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node
**newnodep )
else
{
/* only one parameter configured -> ERROR */
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: node %s must define both lib and funct"
" for distribution plugin\n",
slapi_entry_get_dn(entry), 0, 0);
@@ -930,7 +930,7 @@ mapping_tree_node_get_children(mapping_tree_node *target, int
is_root)
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &res);
if (res != LDAP_SUCCESS) {
- LDAPDebug(LDAP_DEBUG_ANY, "WARNING: Mapping tree unable to read %s:
%d\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "WARNING: Mapping tree unable to read %s:
%d\n",
MAPPING_TREE_BASE_DN, res, 0);
result = -1;
goto done;
@@ -940,7 +940,7 @@ mapping_tree_node_get_children(mapping_tree_node *target, int
is_root)
* of the target's children. */
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries);
if (NULL == entries) {
- LDAPDebug(LDAP_DEBUG_ANY, "WARNING: No mapping tree node entries found under
%s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "WARNING: No mapping tree node entries
found under %s\n",
MAPPING_TREE_BASE_DN, 0, 0);
result = -1;
goto done;
@@ -950,7 +950,7 @@ mapping_tree_node_get_children(mapping_tree_node *target, int
is_root)
mapping_tree_node *child = NULL;
if (LDAP_SUCCESS != mapping_tree_entry_add(entries[x], &child)) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: could not add mapping tree node %s\n",
slapi_entry_get_dn(entries[x]), 0, 0);
result = -1;
@@ -1009,7 +1009,7 @@ mapping_tree_node_validate(mapping_tree_node *node)
if (node->mtn_parent) {
if (!slapi_sdn_issuffix(node->mtn_subtree,
node->mtn_parent->mtn_subtree)) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: Invalid mapping tree. %s can not be a child of
%s\n",
slapi_sdn_get_ndn(node->mtn_subtree),
slapi_sdn_get_ndn(node->mtn_parent->mtn_subtree), 0);
@@ -1099,7 +1099,7 @@ int mapping_tree_entry_modify_callback(Slapi_PBlock *pb,
Slapi_Entry* entryBefor
if (parent_node == NULL)
{
parent_node = mapping_tree_root;
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Error: could not find parent for %s\n",
slapi_entry_get_dn(entryAfter), 0, 0);
slapi_sdn_free(&subtree);
@@ -1300,7 +1300,7 @@ int mapping_tree_entry_modify_callback(Slapi_PBlock *pb,
Slapi_Entry* entryBefor
slapi_attr_first_value(attr, &val);
slapi_ch_free_string(&plugin_fct);
if (NULL == val) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: The nsslapd-distribution-funct attribute"
" has no value for the mapping tree node %s\n",
slapi_entry_get_dn(entryAfter), 0, 0);
@@ -1324,7 +1324,7 @@ int mapping_tree_entry_modify_callback(Slapi_PBlock *pb,
Slapi_Entry* entryBefor
slapi_attr_first_value(attr, &val);
slapi_ch_free_string(&plugin_lib);
if (NULL == val) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: The nsslapd-distribution-plugin attribute"
" has no value for the mapping tree node %s\n",
slapi_entry_get_dn(entryAfter), 0, 0);
@@ -1348,7 +1348,7 @@ int mapping_tree_entry_modify_callback(Slapi_PBlock *pb,
Slapi_Entry* entryBefor
"nsslapd-distribution-root-update", &attr);
slapi_attr_first_value(attr, &val);
if (NULL == val) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: The nsslapd-distribution-root-update attribute"
" has no value for the mapping tree node %s\n",
slapi_entry_get_dn(entryAfter), 0, 0);
@@ -1483,7 +1483,7 @@ int mapping_tree_entry_add_callback(Slapi_PBlock *pb, Slapi_Entry*
entryBefore,
CONFIG_DEFAULT_NAMING_CONTEXT,
escaped);
if (rc) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"mapping_tree_entry_add_callback: "
"setting %s to %s failed: RC=%d\n",
escaped, CONFIG_DEFAULT_NAMING_CONTEXT, rc);
@@ -2572,7 +2572,7 @@ mtn_get_be_distributed(Slapi_PBlock *pb, mapping_tree_node *
target_node,
/* paranoid check, never trust another programmer */
else if ((index >= target_node->mtn_be_count) || (index < 0))
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: distribution plugin returned wrong backend"
" : %d for entry %s at node %s\n",
index, slapi_sdn_get_ndn(target_sdn),
@@ -2592,7 +2592,7 @@ mtn_get_be_distributed(Slapi_PBlock *pb, mapping_tree_node *
target_node,
/* there is several backends but no distribution function
* return the first backend
*/
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Warning: distribution plugin not configured at node : %s\n",
slapi_sdn_get_ndn(target_node->mtn_subtree), 0, 0);
index = 0;
@@ -2712,7 +2712,7 @@ static int mtn_get_be(mapping_tree_node *target_node, Slapi_PBlock
*pb,
target_node->mtn_backend_names[*index]);
*be = target_node->mtn_be[*index];
if(*be==NULL) {
- LDAPDebug(LDAP_DEBUG_BACKLDBM,
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
"Warning: Mapping tree node entry for %s "
"point to an unknown backend : %s\n",
slapi_sdn_get_dn(target_node->mtn_subtree),
@@ -2727,7 +2727,7 @@ static int mtn_get_be(mapping_tree_node *target_node, Slapi_PBlock
*pb,
}
if ((target_node->mtn_be_states) &&
(target_node->mtn_be_states[*index] == SLAPI_BE_STATE_OFFLINE)) {
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"Warning: Operation attempted on backend in OFFLINE "
"state : %s\n",
target_node->mtn_backend_names[*index], 0, 0);
@@ -3596,7 +3596,7 @@ mtn_internal_be_set_state(Slapi_Backend *be, int state)
node = get_mapping_tree_node_by_name(mapping_tree_root, be_name);
if (node == NULL)
{
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"Warning: backend %s is not declared in mapping tree\n",
be_name, 0 ,0);
goto done;
@@ -3619,7 +3619,7 @@ mtn_internal_be_set_state(Slapi_Backend *be, int state)
/* backend is not declared in the mapping tree node
* print out a warning
*/
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"Warning: backend %s is not declared in mapping node entry\n",
be_name, 0 ,0);
goto done;
@@ -3757,7 +3757,7 @@ void mtn_wlock(void)
slapi_rwlock_wrlock(myLock);
#ifdef DEBUG
lock_count--;
- LDAPDebug(LDAP_DEBUG_ARGS, "mtn_wlock : lock count : %d\n", lock_count, 0,
0);
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "mtn_wlock : lock count : %d\n",
lock_count, 0, 0);
#endif
}
@@ -3766,7 +3766,7 @@ void mtn_lock(void)
slapi_rwlock_rdlock(myLock);
#ifdef DEBUG
lock_count++;
- LDAPDebug(LDAP_DEBUG_ARGS, "mtn_lock : lock count : %d\n", lock_count, 0,
0);
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "mtn_lock : lock count : %d\n",
lock_count, 0, 0);
#endif
}
@@ -3780,7 +3780,7 @@ void mtn_unlock(void)
lock_count++;
else
lock_count = (int) 11111111; /* this happening means problems */
- LDAPDebug(LDAP_DEBUG_ARGS, "mtn_unlock : lock count : %d\n", lock_count, 0,
0);
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "mtn_unlock : lock count : %d\n",
lock_count, 0, 0);
#endif
slapi_rwlock_unlock(myLock);
}
@@ -3820,7 +3820,7 @@ static void dump_mapping_tree(mapping_tree_node *parent, int depth)
if (depth == 0)
{
- LDAPDebug(LDAP_DEBUG_ANY, "dump_mapping_tree\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dump_mapping_tree\n", 0, 0, 0);
}
dump_indent[0] = '\0';
for (i = 0; i < depth; i++)
@@ -3830,12 +3830,12 @@ static void dump_mapping_tree(mapping_tree_node *parent, int
depth)
{
if (strlen(current->mtn_subtree->dn) == 0)
{
- LDAPDebug(LDAP_DEBUG_ANY, "MT_DUMP: %s%s (0x%x)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "MT_DUMP: %s%s (0x%x)\n",
dump_indent, "none", current);
}
else
{
- LDAPDebug(LDAP_DEBUG_ANY, "MT_DUMP: %s%s (0x%x)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "MT_DUMP: %s%s (0x%x)\n",
dump_indent, current->mtn_subtree->dn, current);
}
dump_mapping_tree(current, depth+1);
diff --git a/ldap/servers/slapd/modify.c b/ldap/servers/slapd/modify.c
index 2be6930..60d1f65 100644
--- a/ldap/servers/slapd/modify.c
+++ b/ldap/servers/slapd/modify.c
@@ -114,7 +114,7 @@ do_modify( Slapi_PBlock *pb )
int pw_change = 0; /* 0 = no password change */
int err;
- LDAPDebug( LDAP_DEBUG_TRACE, "do_modify\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "do_modify\n", 0, 0, 0 );
slapi_pblock_get( pb, SLAPI_OPERATION, &operation);
ber = operation->o_ber;
@@ -145,7 +145,7 @@ do_modify( Slapi_PBlock *pb )
int rc = 0;
if ( ber_scanf( ber, "{a", &rawdn ) == LBER_ERROR )
{
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ber_scanf failed (op=Modify; params=DN)\n", 0, 0, 0 );
op_shared_log_error_access (pb, "MOD", "???", "decoding
error");
send_ldap_result( pb, LDAP_PROTOCOL_ERROR, NULL, NULL, 0, NULL );
@@ -167,7 +167,7 @@ do_modify( Slapi_PBlock *pb )
}
}
- LDAPDebug( LDAP_DEBUG_ARGS, "do_modify: dn (%s)\n", rawdn, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "do_modify: dn (%s)\n", rawdn, 0, 0 );
/*
* If nsslapd-minssf-exclude-rootdse is on, the minssf check has been
@@ -285,7 +285,7 @@ do_modify( Slapi_PBlock *pb )
int connid, opid;
slapi_pblock_get(pb, SLAPI_CONN_ID, &connid);
slapi_pblock_get(pb, SLAPI_OPERATION_ID, &opid);
- LDAPDebug( LDAP_DEBUG_ANY,"Rejecting replicated password policy
operation(conn=%d op=%d) for "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Rejecting replicated password policy
operation(conn=%d op=%d) for "
"entry %s. To allow these changes to be accepted, set passwordIsGlobalPolicy
to 'on' in "
"cn=config.\n", connid, opid, rawdn);
}
@@ -358,11 +358,11 @@ do_modify( Slapi_PBlock *pb )
}
#ifdef LDAP_DEBUG
- LDAPDebug( LDAP_DEBUG_ARGS, "modifications:\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "modifications:\n", 0, 0, 0 );
for (mod = slapi_mods_get_first_mod(&smods); mod != NULL;
mod = slapi_mods_get_next_mod(&smods))
{
- LDAPDebug( LDAP_DEBUG_ARGS, "\t%s: %s\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "\t%s: %s\n",
mod_op_image( mod->mod_op ), mod->mod_type, 0 );
}
#endif
diff --git a/ldap/servers/slapd/modrdn.c b/ldap/servers/slapd/modrdn.c
index 992700a..31cb5d9 100644
--- a/ldap/servers/slapd/modrdn.c
+++ b/ldap/servers/slapd/modrdn.c
@@ -52,7 +52,7 @@ do_modrdn( Slapi_PBlock *pb )
Slapi_DN snewdn;
Slapi_DN *snewsuperior = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "do_modrdn\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "do_modrdn\n", 0, 0, 0 );
/* count the modrdn request */
slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsModifyRDNOps);
@@ -75,7 +75,7 @@ do_modrdn( Slapi_PBlock *pb )
*/
if (ber_scanf(ber, "{aab", &rawdn, &newrdn, &deloldrdn) ==
LBER_ERROR) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ber_scanf failed (op=ModRDN; params=DN,newRDN,deleteOldRDN)\n",
0, 0, 0 );
op_shared_log_error_access (pb, "MODRDN", "???", "decoding
error");
@@ -88,7 +88,7 @@ do_modrdn( Slapi_PBlock *pb )
if ( ber_peek_tag( ber, &len ) == LDAP_TAG_NEWSUPERIOR ) {
/* This "len" is not used... */
if ( pb->pb_conn->c_ldapversion < LDAP_VERSION3 ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"got newSuperior in LDAPv2 modrdn op\n", 0, 0, 0 );
op_shared_log_error_access (pb, "MODRDN",
rawdn?rawdn:"", "decoding error");
@@ -99,7 +99,7 @@ do_modrdn( Slapi_PBlock *pb )
goto free_and_return;
}
if ( ber_scanf( ber, "a", &rawnewsuperior ) == LBER_ERROR ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ber_scanf failed (op=ModRDN; params=newSuperior)\n",
0, 0, 0 );
op_shared_log_error_access (pb, "MODRDN", rawdn, "decoding
error");
@@ -209,7 +209,7 @@ do_modrdn( Slapi_PBlock *pb )
goto free_and_return;
}
- LDAPDebug( LDAP_DEBUG_ARGS,
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG,
"do_modrdn: dn (%s) newrdn (%s) deloldrdn (%d)\n", dn, newrdn,
deloldrdn );
@@ -552,7 +552,7 @@ op_shared_rename(Slapi_PBlock *pb, int passin_args)
if (newsuperior != NULL)
{
- LDAPDebug(LDAP_DEBUG_ARGS, "do_moddn: newsuperior (%s)\n", newsuperior, 0,
0);
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "do_moddn: newsuperior (%s)\n",
newsuperior, 0, 0);
}
/* target spec is used to decide which plugins are applicable for the operation */
@@ -718,14 +718,14 @@ static int check_rdn_for_created_attrs(const char *newrdn)
slapi_rdn_init_dn(rdn, newrdn);
for (i = 0; type[i] != NULL; i++) {
if (slapi_rdn_contains_attr(rdn, type[i], &value)) {
- LDAPDebug(LDAP_DEBUG_TRACE, "Invalid DN. RDN contains %s attribute\n",
type[i], 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "Invalid DN. RDN contains %s
attribute\n", type[i], 0, 0);
rc = 1;
break;
}
}
slapi_rdn_free(&rdn);
} else {
- LDAPDebug(LDAP_DEBUG_TRACE, "check_rdn_for_created_attrs: Error allocating
RDN\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "check_rdn_for_created_attrs: Error
allocating RDN\n", 0, 0, 0);
rc = -1;
}
diff --git a/ldap/servers/slapd/modutil.c b/ldap/servers/slapd/modutil.c
index a50f329..dd00e18 100644
--- a/ldap/servers/slapd/modutil.c
+++ b/ldap/servers/slapd/modutil.c
@@ -528,7 +528,7 @@ void
slapi_mods_dump(const Slapi_Mods *smods, const char *text)
{
int i;
- LDAPDebug( LDAP_DEBUG_ANY, "smod - %s\n", text, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "smod - %s\n", text, 0, 0);
for(i=0;i<smods->num_mods;i++)
{
slapi_mod_dump(smods->mods[i],i);
@@ -819,19 +819,19 @@ slapi_mod_dump(LDAPMod *mod, int n)
switch ( operationtype )
{
case LDAP_MOD_ADD:
- LDAPDebug( LDAP_DEBUG_ANY, "smod %d - add: %s\n", n, mod->mod_type, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "smod %d - add: %s\n", n,
mod->mod_type, 0);
break;
case LDAP_MOD_DELETE:
- LDAPDebug( LDAP_DEBUG_ANY, "smod %d - delete: %s\n", n, mod->mod_type,
0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "smod %d - delete: %s\n", n,
mod->mod_type, 0);
break;
case LDAP_MOD_REPLACE:
- LDAPDebug( LDAP_DEBUG_ANY, "smod %d - replace: %s\n", n, mod->mod_type,
0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "smod %d - replace: %s\n", n,
mod->mod_type, 0);
break;
case LDAP_MOD_IGNORE:
- LDAPDebug( LDAP_DEBUG_ANY, "smod %d - ignore: %s\n", n, mod->mod_type,
0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "smod %d - ignore: %s\n", n,
mod->mod_type, 0);
break;
}
if(operationtype!=LDAP_MOD_IGNORE)
@@ -846,13 +846,13 @@ slapi_mod_dump(LDAPMod *mod, int n)
bufp = buf;
slapi_ldif_put_type_and_value_with_options( &bufp, mod->mod_type,
mod->mod_bvalues[i]->bv_val, mod->mod_bvalues[i]->bv_len, 0 );
*bufp = '\0';
- LDAPDebug( LDAP_DEBUG_ANY, "smod %d - value: %s", n, buf, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "smod %d - value: %s", n, buf, 0);
slapi_ch_free( (void**)&buf );
}
}
}
else
{
- LDAPDebug( LDAP_DEBUG_ANY, "smod - null\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "smod - null\n", 0, 0, 0);
}
}
diff --git a/ldap/servers/slapd/operation.c b/ldap/servers/slapd/operation.c
index 6c95552..9866eac 100644
--- a/ldap/servers/slapd/operation.c
+++ b/ldap/servers/slapd/operation.c
@@ -53,8 +53,8 @@ slapi_op_internal( Slapi_PBlock *pb )
void
operation_out_of_disk_space()
{
- LDAPDebug(LDAP_DEBUG_ANY, "*** DISK FULL ***\n", 0, 0, 0);
- LDAPDebug(LDAP_DEBUG_ANY, "Attempting to shut down gracefully.\n", 0, 0,
0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "*** DISK FULL ***\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Attempting to shut down gracefully.\n",
0, 0, 0);
g_set_shutdown( SLAPI_SHUTDOWN_DISKFULL );
}
@@ -602,10 +602,10 @@ slapi_connection_remove_operation( Slapi_PBlock *pb,
Slapi_Connection *conn, Sla
; /* NULL */
if ( *tmp == NULL ) {
if (op) {
- LDAPDebug( LDAP_DEBUG_ANY, "connection_remove_operation: can't find op %d for
conn %" NSPRIu64 "\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "connection_remove_operation: can't find
op %d for conn %" NSPRIu64 "\n",
(int)op->o_msgid, conn->c_connid, 0 );
} else {
- LDAPDebug( LDAP_DEBUG_ANY, "connection_remove_operation: no operation
provided\n",0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "connection_remove_operation: no operation
provided\n",0, 0, 0);
}
} else {
*tmp = (*tmp)->o_next;
diff --git a/ldap/servers/slapd/opshared.c b/ldap/servers/slapd/opshared.c
index 15207a5..db8c596 100644
--- a/ldap/servers/slapd/opshared.c
+++ b/ldap/servers/slapd/opshared.c
@@ -113,7 +113,7 @@ modify_update_last_modified_attr(Slapi_PBlock *pb, Slapi_Mods *smods)
struct slapi_componentid *cid = NULL;
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
- LDAPDebug(LDAP_DEBUG_TRACE, "modify_update_last_modified_attr\n", 0, 0,
0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"modify_update_last_modified_attr\n", 0, 0, 0);
slapi_pblock_get(pb, SLAPI_OPERATION, &op);
bvals[0] = &bv;
@@ -1379,7 +1379,7 @@ iterate(Slapi_PBlock *pb, Slapi_Backend *be, int send_result,
if ( rc != LDAP_SUCCESS ) {
/* Send error result and
abort op if the control is critical */
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Failed to get effective rights for entry (%s), rc=%d\n",
slapi_entry_get_dn_const(e), rc, 0 );
send_ldap_result( pb, rc, NULL, errbuf, 0, NULL );
@@ -1669,7 +1669,7 @@ compute_limits (Slapi_PBlock *pb)
}
slapi_pblock_set(pb, SLAPI_SEARCH_SIZELIMIT, &sizelimit);
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"=> compute_limits: sizelimit=%d, timelimit=%d\n",
sizelimit, timelimit, 0 );
}
diff --git a/ldap/servers/slapd/passwd_extop.c b/ldap/servers/slapd/passwd_extop.c
index ad5b8da..4726fc5 100644
--- a/ldap/servers/slapd/passwd_extop.c
+++ b/ldap/servers/slapd/passwd_extop.c
@@ -68,7 +68,7 @@ static int passwd_check_pwd(Slapi_Entry *targetEntry, const char *pwd){
Slapi_Value cv;
Slapi_Value **bvals;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> passwd_check_pwd\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> passwd_check_pwd\n", 0, 0, 0 );
slapi_value_init_string(&cv,pwd);
@@ -82,7 +82,7 @@ static int passwd_check_pwd(Slapi_Entry *targetEntry, const char *pwd){
}
value_done(&cv);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= passwd_check_pwd: %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= passwd_check_pwd: %d\n", rc, 0,
0 );
/* if the userPassword attribute is absent then rc is -1 */
return rc;
@@ -97,16 +97,16 @@ static int
passwd_modify_getEntry( const char *dn, Slapi_Entry **e2 ) {
int search_result = 0;
Slapi_DN sdn;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> passwd_modify_getEntry\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> passwd_modify_getEntry\n", 0, 0,
0 );
slapi_sdn_init_dn_byref( &sdn, dn );
if ((search_result = slapi_search_internal_get_entry( &sdn, NULL, e2,
plugin_get_default_component_id())) != LDAP_SUCCESS ){
- LDAPDebug (LDAP_DEBUG_TRACE, "passwd_modify_getEntry: No such entry-(%s), err
(%d)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "passwd_modify_getEntry: No such
entry-(%s), err (%d)\n",
dn, search_result, 0);
}
slapi_sdn_done( &sdn );
- LDAPDebug( LDAP_DEBUG_TRACE, "<= passwd_modify_getEntry: %d\n",
search_result, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= passwd_modify_getEntry: %d\n",
search_result, 0, 0 );
return search_result;
}
@@ -123,7 +123,7 @@ passwd_apply_mods(Slapi_PBlock *pb_orig, const Slapi_DN *sdn,
Slapi_Mods *mods,
LDAPControl **pb_resp_controls = NULL;
int ret=0;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> passwd_apply_mods\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> passwd_apply_mods\n", 0, 0, 0
);
if (mods && (slapi_mods_get_num_mods(mods) > 0))
{
@@ -164,14 +164,14 @@ passwd_apply_mods(Slapi_PBlock *pb_orig, const Slapi_DN *sdn,
Slapi_Mods *mods,
}
if (ret != LDAP_SUCCESS){
- LDAPDebug(LDAP_DEBUG_TRACE, "WARNING: passwordPolicy modify error %d on entry
'%s'\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "WARNING: passwordPolicy modify error %d
on entry '%s'\n",
ret, slapi_sdn_get_dn(sdn), 0);
}
pblock_done(&pb);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= passwd_apply_mods: %d\n", ret, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= passwd_apply_mods: %d\n", ret,
0, 0 );
return ret;
}
@@ -185,7 +185,7 @@ static int passwd_modify_userpassword(Slapi_PBlock *pb_orig,
Slapi_Entry *target
int ret = 0;
Slapi_Mods smods;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> passwd_modify_userpassword\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
passwd_modify_userpassword\n", 0, 0, 0 );
slapi_mods_init (&smods, 0);
slapi_mods_add_string(&smods, LDAP_MOD_REPLACE, SLAPI_USERPWD_ATTR, newPasswd);
@@ -196,7 +196,7 @@ static int passwd_modify_userpassword(Slapi_PBlock *pb_orig,
Slapi_Entry *target
slapi_mods_done(&smods);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= passwd_modify_userpassword: %d\n", ret,
0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= passwd_modify_userpassword:
%d\n", ret, 0, 0 );
return ret;
}
@@ -302,7 +302,7 @@ static int passwd_modify_generate_policy_passwd( passwdPolicy
*pwpolicy,
}
if ( categories > 0 ) {
/* password generator does not support passwordMin8Bit */
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Unable to generate a password that meets the current "
"password syntax rules. A minimum categories setting "
"of %d is not supported with random password generation.\n",
@@ -379,7 +379,7 @@ static int passwd_modify_generate_passwd( passwdPolicy *pwpolicy,
return LDAP_OPERATIONS_ERROR;
}
if ( pwpolicy->pw_min8bit > 0 ) {
- LDAPDebug( LDAP_DEBUG_ANY, "Unable to generate a password that meets "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Unable to generate a password that meets
"
"the current password syntax rules. 8-bit syntax "
"restrictions are not supported with random password "
"generation.\n", 0, 0, 0 );
@@ -445,7 +445,7 @@ passwd_modify_extop( Slapi_PBlock *pb )
Slapi_Entry *referrals = NULL;
/* Slapi_DN sdn; */
- LDAPDebug( LDAP_DEBUG_TRACE, "=> passwd_modify_extop\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> passwd_modify_extop\n", 0,
0, 0 );
/* Before going any further, we'll make sure that the right extended operation
plugin
* has been called: i.e., the OID shipped whithin the extended operation request must
@@ -551,7 +551,7 @@ passwd_modify_extop( Slapi_PBlock *pb )
int rc = 0;
if ( ber_scanf( ber, "a", &rawdn) == LBER_ERROR ) {
slapi_ch_free_string(&rawdn);
- LDAPDebug( LDAP_DEBUG_ANY, "ber_scanf failed :{\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ber_scanf failed :{\n", 0, 0, 0 );
errMesg = "ber_scanf failed at userID parse.\n";
rc = LDAP_PROTOCOL_ERROR;
goto free_and_return;
@@ -577,7 +577,7 @@ passwd_modify_extop( Slapi_PBlock *pb )
if (tag == LDAP_EXTOP_PASSMOD_TAG_OLDPWD ) {
if ( ber_scanf( ber, "a", &oldPasswd ) == LBER_ERROR ) {
slapi_ch_free_string(&oldPasswd);
- LDAPDebug( LDAP_DEBUG_ANY, "ber_scanf failed :{\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ber_scanf failed :{\n", 0, 0, 0 );
errMesg = "ber_scanf failed at oldPasswd parse.\n";
rc = LDAP_PROTOCOL_ERROR;
goto free_and_return;
@@ -590,7 +590,7 @@ passwd_modify_extop( Slapi_PBlock *pb )
{
if ( ber_scanf( ber, "a", &newPasswd ) == LBER_ERROR ) {
slapi_ch_free_string(&newPasswd);
- LDAPDebug( LDAP_DEBUG_ANY, "ber_scanf failed :{\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ber_scanf failed :{\n", 0, 0, 0 );
errMesg = "ber_scanf failed at newPasswd parse.\n";
rc = LDAP_PROTOCOL_ERROR;
goto free_and_return;
@@ -599,7 +599,7 @@ passwd_modify_extop( Slapi_PBlock *pb )
parse_req_done:
/* Uncomment for debugging, otherwise we don't want to leak the password values into
the log... */
- /* LDAPDebug( LDAP_DEBUG_ARGS, "passwd: dn (%s), oldPasswd (%s) ,newPasswd
(%s)\n",
+ /* LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "passwd: dn (%s), oldPasswd (%s)
,newPasswd (%s)\n",
dn, oldPasswd, newPasswd); */
/* Get Bind DN */
@@ -806,7 +806,7 @@ parse_req_done:
slapi_pblock_set(pb, SLAPI_EXT_OP_RET_VALUE, gen_passwd);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= passwd_modify_extop: %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= passwd_modify_extop: %d\n", rc,
0, 0 );
/* Free anything that we allocated above */
free_and_return:
diff --git a/ldap/servers/slapd/pblock.c b/ldap/servers/slapd/pblock.c
index db5a9e7..2916aa9 100644
--- a/ldap/servers/slapd/pblock.c
+++ b/ldap/servers/slapd/pblock.c
@@ -157,7 +157,7 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value )
break;
case SLAPI_CONN_ID:
if (pblock->pb_conn == NULL) {
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"Connection is NULL and hence cannot access SLAPI_CONN_ID \n", 0,
0, 0 );
return (-1);
}
@@ -170,7 +170,7 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value )
* a pointer that could be freed out from under them.
*/
if (pblock->pb_conn == NULL) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Connection is NULL and hence cannot access SLAPI_CONN_DN \n", 0,
0, 0 );
return (-1);
}
@@ -181,7 +181,7 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value )
break;
case SLAPI_CONN_AUTHTYPE:/* deprecated */
if (pblock->pb_conn == NULL) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Connection is NULL and hence cannot access SLAPI_CONN_AUTHTYPE
\n", 0, 0, 0 );
return (-1);
}
@@ -208,7 +208,7 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value )
case SLAPI_CONN_AUTHMETHOD:
/* returns a copy */
if (pblock->pb_conn == NULL) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Connection is NULL and hence cannot access SLAPI_CONN_AUTHMETHOD
\n", 0, 0, 0 );
return (-1);
}
@@ -296,7 +296,7 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value )
break;
case SLAPI_CONN_IS_REPLICATION_SESSION:
if (pblock->pb_conn == NULL) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Connection is NULL and hence cannot access
SLAPI_CONN_IS_REPLICATION_SESSION \n", 0, 0, 0 );
return (-1);
}
@@ -306,7 +306,7 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value )
break;
case SLAPI_CONN_IS_SSL_SESSION:
if (pblock->pb_conn == NULL) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Connection is NULL and hence cannot access SLAPI_CONN_IS_SSL_SESSION
\n", 0, 0, 0 );
return (-1);
}
@@ -316,7 +316,7 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value )
break;
case SLAPI_CONN_SASL_SSF:
if (pblock->pb_conn == NULL) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Connection is NULL and hence cannot access SLAPI_CONN_SASL_SSF \n", 0, 0,
0 );
return (-1);
}
@@ -326,7 +326,7 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value )
break;
case SLAPI_CONN_SSL_SSF:
if (pblock->pb_conn == NULL) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Connection is NULL and hence cannot access SLAPI_CONN_SSL_SSF \n", 0, 0,
0 );
return (-1);
}
@@ -336,7 +336,7 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value )
break;
case SLAPI_CONN_LOCAL_SSF:
if (pblock->pb_conn == NULL) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Connection is NULL and hence cannot access SLAPI_CONN_LOCAL_SSF \n", 0,
0, 0 );
return (-1);
}
@@ -346,7 +346,7 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value )
break;
case SLAPI_CONN_CERT:
if (pblock->pb_conn == NULL) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Connection is NULL and hence cannot access SLAPI_CONN_CERT \n", 0,
0, 0 );
return (-1);
}
@@ -357,7 +357,7 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value )
break;
case SLAPI_OPERATION_TYPE:
if (pblock->pb_op == NULL) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Operation is NULL and hence cannot access SLAPI_OPERATION_TYPE
\n", 0, 0, 0 );
return (-1);
}
@@ -365,7 +365,7 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value )
break;
case SLAPI_OPINITIATED_TIME:
if (pblock->pb_op == NULL) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Operation is NULL and hence cannot access SLAPI_OPINITIATED_TIME
\n", 0, 0, 0 );
return (-1);
}
@@ -1830,7 +1830,7 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value )
case SLAPI_CLIENT_DNS:
if (pblock->pb_conn == NULL) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Connection is NULL and hence cannot access SLAPI_CLIENT_DNS \n",
0, 0, 0 );
return (-1);
}
@@ -1972,7 +1972,7 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value )
break;
default:
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Unknown parameter block argument %d\n", arg, 0, 0 );
return( -1 );
}
@@ -2021,7 +2021,7 @@ slapi_pblock_set( Slapi_PBlock *pblock, int arg, void *value )
break;
case SLAPI_CONN_ID:
if (pblock->pb_conn == NULL) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Connection is NULL and hence cannot access SLAPI_CONN_ID \n", 0,
0, 0 );
return (-1);
}
@@ -2034,7 +2034,7 @@ slapi_pblock_set( Slapi_PBlock *pblock, int arg, void *value )
* free the current authtype.
*/
if (pblock->pb_conn == NULL) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Connection is NULL and hence cannot access SLAPI_CONN_DN \n", 0,
0, 0 );
return (-1);
}
@@ -2046,7 +2046,7 @@ slapi_pblock_set( Slapi_PBlock *pblock, int arg, void *value )
case SLAPI_CONN_AUTHTYPE: /* deprecated */
case SLAPI_CONN_AUTHMETHOD:
if (pblock->pb_conn == NULL) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Connection is NULL and hence cannot access SLAPI_CONN_AUTHMETHOD
\n", 0, 0, 0 );
return (-1);
}
@@ -2057,7 +2057,7 @@ slapi_pblock_set( Slapi_PBlock *pblock, int arg, void *value )
break;
case SLAPI_CONN_IS_REPLICATION_SESSION:
if (pblock->pb_conn == NULL) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Connection is NULL and hence cannot access
SLAPI_CONN_IS_REPLICATION_SESSION \n", 0, 0, 0 );
return (-1);
}
@@ -3452,7 +3452,7 @@ slapi_pblock_set( Slapi_PBlock *pblock, int arg, void *value )
break;
case SLAPI_CLIENT_DNS:
if (pblock->pb_conn == NULL) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Connection is NULL and hence cannot access SLAPI_CLIENT_DNS \n",
0, 0, 0 );
return (-1);
}
@@ -3587,7 +3587,7 @@ slapi_pblock_set( Slapi_PBlock *pblock, int arg, void *value )
break;
default:
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Unknown parameter block argument %d\n", arg, 0, 0 );
return( -1 );
}
diff --git a/ldap/servers/slapd/plugin.c b/ldap/servers/slapd/plugin.c
index e1b0987..a550e90 100644
--- a/ldap/servers/slapd/plugin.c
+++ b/ldap/servers/slapd/plugin.c
@@ -774,7 +774,7 @@ slapi_send_ldap_result( Slapi_PBlock *pb, int err, char *matched, char
*text,
{
if (urls || nentries)
{
- LDAPDebug( LDAP_DEBUG_ANY, "ERROR : urls or nentries set"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR : urls or nentries set"
"in sendldap_result while NO_SUCH_OBJECT returned\n",0,0,0);
}
@@ -1281,7 +1281,7 @@ plugin_start(Slapi_Entry *entry, char *returntext)
if (enabled){
if(plugin_index == plugin_idx){
/* finally, perform the op on the plugin */
- LDAPDebug( LDAP_DEBUG_PLUGIN, "Starting %s plugin %s\n" ,
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Starting %s plugin %s\n" ,
config[plugin_index].type, config[plugin_index].name, 0 );
/*
* Put the plugin into the temporary pblock so the startup functions have
@@ -1297,7 +1297,7 @@ plugin_start(Slapi_Entry *entry, char *returntext)
* Delete the plugin(undo everything), as we don't know how far the start
* function got.
*/
- LDAPDebug( LDAP_DEBUG_ANY, "Failed to start %s plugin %s\n" ,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to start %s plugin %s\n" ,
config[plugin_index].type, config[plugin_index].name, 0 );
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE,"Failed to start plugin
\"%s\". See errors log.",
config[plugin_index].name);
@@ -1343,14 +1343,14 @@ plugin_start(Slapi_Entry *entry, char *returntext)
if(plugins_started == 0){
/* a dependency was not resolved - error */
- LDAPDebug( LDAP_DEBUG_ANY, "Error: Failed to resolve plugin dependencies\n" ,
0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: Failed to resolve plugin
dependencies\n" , 0, 0, 0 );
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE,"Failed to resolve plugin
dependencies.");
/* list the plugins yet to perform op */
i = 0;
while(i < total_plugins){
if(config[i].op_done == 0){
- LDAPDebug( LDAP_DEBUG_ANY, "Error: %s plugin %s is not started\n" ,
config[i].type, config[i].name, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: %s plugin %s is not started\n" ,
config[i].type, config[i].name, 0 );
plugin_remove_plugins(config[i].plugin, config[i].type);
}
i++;
@@ -1774,7 +1774,7 @@ plugin_dependency_startall(int argc, char** argv, char *errmsg, int
operation, c
{
/* finally, perform the op on the plugin */
- LDAPDebug( LDAP_DEBUG_PLUGIN, "Starting %s plugin %s\n" ,
config[plugin_index].type, config[plugin_index].name, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Starting %s plugin %s\n" ,
config[plugin_index].type, config[plugin_index].name, 0 );
/*
* Put the plugin into the temporary pblock so the startup functions have
* access to the real plugin for registering callbacks, tasks, etc.
@@ -1793,7 +1793,7 @@ plugin_dependency_startall(int argc, char** argv, char *errmsg, int
operation, c
* problem then the plugin will never start and eventually it will
* trigger an exit anyway.
*/
- LDAPDebug( LDAP_DEBUG_ANY, "Failed to start %s plugin %s\n" ,
config[plugin_index].type, config[plugin_index].name, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to start %s plugin %s\n" ,
config[plugin_index].type, config[plugin_index].name, 0 );
continue;
} else {
/* now set the plugin and all its registered plugin functions as started */
@@ -1841,7 +1841,7 @@ plugin_dependency_startall(int argc, char** argv, char *errmsg, int
operation, c
if(plugins_started == 0)
{
/* a dependency was not resolved - error */
- LDAPDebug( LDAP_DEBUG_ANY, "Error: Failed to resolve plugin dependencies\n" ,
0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: Failed to resolve plugin
dependencies\n" , 0, 0, 0 );
/* list the plugins yet to perform op */
i = 0;
@@ -1849,7 +1849,7 @@ plugin_dependency_startall(int argc, char** argv, char *errmsg, int
operation, c
{
if(config[i].op_done == 0)
{
- LDAPDebug( LDAP_DEBUG_ANY, "Error: %s plugin %s is not started\n" ,
config[i].type, config[i].name, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: %s plugin %s is not started\n" ,
config[i].type, config[i].name, 0 );
}
i++;
}
@@ -2422,7 +2422,7 @@ plugin_restart(Slapi_Entry *pentryBefore, Slapi_Entry *pentryAfter)
* be allowed
*/
if(plugin_is_critical(pentryBefore)){
- LDAPDebug(LDAP_DEBUG_ANY, "plugin_restart: Plugin (%s) is critical "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "plugin_restart: Plugin (%s) is critical
"
"to server operation. Server requires restart for changes to "
"take effect.\n", slapi_entry_get_dn(pentryBefore),0,0);
return 0;
@@ -2433,21 +2433,21 @@ plugin_restart(Slapi_Entry *pentryBefore, Slapi_Entry
*pentryAfter)
if(plugin_delete(pentryBefore, returntext, 1) == LDAP_SUCCESS){
if(plugin_add(pentryAfter, returntext, 1) == LDAP_SUCCESS){
- LDAPDebug(LDAP_DEBUG_PLUGIN, "plugin_restart: Plugin (%s) has been successfully
"
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "plugin_restart: Plugin (%s) has been
successfully "
"restarted after configuration change.\n",
slapi_entry_get_dn(pentryAfter),0,0);
} else {
- LDAPDebug(LDAP_DEBUG_ANY, "plugin_restart: Plugin (%s) failed to restart after
"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "plugin_restart: Plugin (%s) failed to restart
after "
"configuration change (%s). Reverting to original plugin entry.\n",
slapi_entry_get_dn(pentryAfter), returntext, 0);
if(plugin_add(pentryBefore, returntext, 1) != LDAP_SUCCESS){
- LDAPDebug(LDAP_DEBUG_ANY, "plugin_restart: Plugin (%s) failed to reload "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "plugin_restart: Plugin (%s) failed to reload
"
"original plugin (%s)\n",slapi_entry_get_dn(pentryBefore), returntext,
0);
}
rc = 1;
}
} else {
- LDAPDebug(LDAP_DEBUG_ANY,"plugin_restart: failed to disable/stop the plugin (%s):
%s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"plugin_restart: failed to disable/stop the
plugin (%s): %s\n",
slapi_entry_get_dn(pentryBefore), returntext, 0);
rc = 1;
}
@@ -2504,7 +2504,7 @@ set_plugin_config_from_entry(
{
if (plugin_config_set_action(&config->plgc_schema_check, value))
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, "Error: invalid value %s for attribute %s "
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Error: invalid value %s for attribute %s
"
"from entry %s\n", value, ATTR_PLUGIN_SCHEMA_CHECK,
slapi_entry_get_dn_const(plugin_entry));
status = 1;
@@ -2517,7 +2517,7 @@ set_plugin_config_from_entry(
{
if (plugin_config_set_action(&config->plgc_log_access, value))
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, "Error: invalid value %s for attribute %s "
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Error: invalid value %s for attribute %s
"
"from entry %s\n", value, ATTR_PLUGIN_LOG_ACCESS,
slapi_entry_get_dn_const(plugin_entry));
status = 1;
@@ -2530,7 +2530,7 @@ set_plugin_config_from_entry(
{
if (plugin_config_set_action(&config->plgc_log_audit, value))
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, "Error: invalid value %s for attribute %s "
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Error: invalid value %s for attribute %s
"
"from entry %s\n", value, ATTR_PLUGIN_LOG_AUDIT,
slapi_entry_get_dn_const(plugin_entry));
status = 1;
@@ -2543,7 +2543,7 @@ set_plugin_config_from_entry(
{
if (plugin_config_set_action(&config->plgc_invoke_for_replop, value))
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, "Error: invalid value %s for attribute %s "
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Error: invalid value %s for attribute %s
"
"from entry %s\n", value, ATTR_PLUGIN_INVOKE_FOR_REPLOP,
slapi_entry_get_dn_const(plugin_entry));
status = 1;
@@ -2557,7 +2557,7 @@ set_plugin_config_from_entry(
{
if (plugin_set_subtree_config(&(config->plgc_target_subtrees), values[i]))
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, "Error: invalid value %s for attribute %s "
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Error: invalid value %s for attribute %s
"
"from entry %s\n", values[i], ATTR_PLUGIN_TARGET_SUBTREE,
slapi_entry_get_dn_const(plugin_entry));
status = 1;
@@ -2576,7 +2576,7 @@ set_plugin_config_from_entry(
{
if (plugin_set_subtree_config(&(config->plgc_excluded_target_subtrees),
values[i]))
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, "Error: invalid value %s for attribute %s "
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Error: invalid value %s for attribute %s
"
"from entry %s\n", values[i], ATTR_PLUGIN_EXCLUDE_TARGET_SUBTREE,
slapi_entry_get_dn_const(plugin_entry));
status = 1;
@@ -2591,7 +2591,7 @@ set_plugin_config_from_entry(
{
if (plugin_set_subtree_config(&(config->plgc_bind_subtrees), values[i]))
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, "Error: invalid value %s for attribute %s "
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Error: invalid value %s for attribute %s
"
"from entry %s\n", values[i], ATTR_PLUGIN_BIND_SUBTREE,
slapi_entry_get_dn_const(plugin_entry));
status = 1;
@@ -2610,7 +2610,7 @@ set_plugin_config_from_entry(
{
if (plugin_set_subtree_config(&(config->plgc_excluded_bind_subtrees),
values[i]))
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, "Error: invalid value %s for attribute %s "
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Error: invalid value %s for attribute %s
"
"from entry %s\n", values[i], ATTR_PLUGIN_EXCLUDE_BIND_SUBTREE,
slapi_entry_get_dn_const(plugin_entry));
status = 1;
@@ -2650,7 +2650,7 @@ add_plugin_description(Slapi_Entry *e, const char *attrname, char
*val)
newval[0] = &desc;
if ((status = entry_replace_values(e, attrname, newval)) != 0)
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, "Error: failed to add value %s to "
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Error: failed to add value %s to
"
"attribute %s of entry %s\n", val, attrname,
slapi_entry_get_dn_const(e));
status = 1;
@@ -2697,7 +2697,7 @@ plugin_add_descriptive_attributes( Slapi_Entry *e, struct
slapdplugin *plugin )
/* This can happen for things such as disabled syntax plug-ins. We
* just treat this as a warning to allow the description attributes
* to be set to a default value to avoid an objectclass violation. */
- LDAPDebug(LDAP_DEBUG_PLUGIN,
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG,
"Warning: couldn't find plugin %s in global list. "
"Adding default descriptive values.\n",
slapi_entry_get_dn_const(e), 0, 0 );
@@ -2835,7 +2835,7 @@ plugin_setup(Slapi_Entry *plugin_entry, struct slapi_componentid
*group,
if ((existname = plugin_exists(slapi_entry_get_sdn_const(plugin_entry))) != NULL)
{
- LDAPDebug(LDAP_DEBUG_ANY, "plugin_setup: the plugin named %s already exists,
"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "plugin_setup: the plugin named %s already
exists, "
"or is already setup.\n", existname, 0, 0);
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE,
"the plugin named %s already exists, or is already setup.",
existname);
@@ -2856,7 +2856,7 @@ plugin_setup(Slapi_Entry *plugin_entry, struct slapi_componentid
*group,
ATTR_PLUGIN_TYPE)))
{
/* error: required attribute %s missing */
- LDAPDebug(LDAP_DEBUG_ANY, "Error: required attribute %s is missing from entry
\"%s\"\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: required attribute %s is missing from
entry \"%s\"\n",
ATTR_PLUGIN_TYPE, slapi_entry_get_dn_const(plugin_entry), 0);
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE,"required attribute %s is
missing from entry",
ATTR_PLUGIN_TYPE);
@@ -2870,7 +2870,7 @@ plugin_setup(Slapi_Entry *plugin_entry, struct slapi_componentid
*group,
if ( status != 0 ) {
/* error: unknown plugin type */
- LDAPDebug(LDAP_DEBUG_ANY, "Error: unknown plugin type \"%s\" in entry
\"%s\"\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: unknown plugin type \"%s\"
in entry \"%s\"\n",
value, slapi_entry_get_dn_const(plugin_entry), 0);
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "unknown plugin type
\"%s\" in entry", value);
slapi_ch_free_string(&value);
@@ -2884,7 +2884,7 @@ plugin_setup(Slapi_Entry *plugin_entry, struct slapi_componentid
*group,
!(value = slapi_entry_attr_get_charptr(plugin_entry, "cn")))
{
/* error: required attribute %s missing */
- LDAPDebug(LDAP_DEBUG_ANY, "Error: required attribute %s is missing from entry
\"%s\"\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: required attribute %s is missing from
entry \"%s\"\n",
"cn", slapi_entry_get_dn_const(plugin_entry), 0);
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "required attribute
\"cn\" is missing from entry");
status = -1;
@@ -2916,7 +2916,7 @@ plugin_setup(Slapi_Entry *plugin_entry, struct slapi_componentid
*group,
if ((*value == '\0') || (*endptr != '\0') ||
(precedence < PLUGIN_MIN_PRECEDENCE) || (precedence > PLUGIN_MAX_PRECEDENCE))
{
- LDAPDebug(LDAP_DEBUG_ANY, "Error: value for attribute %s must be "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: value for attribute %s must be "
"an integer between %d and %d\n", ATTR_PLUGIN_PRECEDENCE,
PLUGIN_MIN_PRECEDENCE, PLUGIN_MAX_PRECEDENCE);
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "value for attribute %s must
be "
@@ -2938,7 +2938,7 @@ plugin_setup(Slapi_Entry *plugin_entry, struct slapi_componentid
*group,
if (!initfunc)
{
/* error: required attribute %s missing */
- LDAPDebug(LDAP_DEBUG_ANY, "Error: required attribute %s is missing from entry
\"%s\"\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: required attribute %s is missing from
entry \"%s\"\n",
ATTR_PLUGIN_INITFN, slapi_entry_get_dn_const(plugin_entry), 0);
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE,"required attribute %s is
missing from entry.",
ATTR_PLUGIN_INITFN);
@@ -2960,7 +2960,7 @@ plugin_setup(Slapi_Entry *plugin_entry, struct slapi_componentid
*group,
ATTR_PLUGIN_PATH)))
{
/* error: required attribute %s missing */
- LDAPDebug(LDAP_DEBUG_ANY, "Error: required attribute %s is missing from entry
\"%s\"\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: required attribute %s is missing from
entry \"%s\"\n",
ATTR_PLUGIN_PATH, slapi_entry_get_dn_const(plugin_entry), 0);
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "required attribute %s is
missing from entry.",
ATTR_PLUGIN_PATH);
@@ -3071,7 +3071,7 @@ plugin_setup(Slapi_Entry *plugin_entry, struct slapi_componentid
*group,
if (enabled && (*initfunc)(&pb) != 0)
{
- LDAPDebug(LDAP_DEBUG_ANY, "Init function \"%s\" for
\"%s\" plugin in library \"%s\" failed\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Init function \"%s\" for
\"%s\" plugin in library \"%s\" failed\n",
plugin->plg_initfunc, plugin->plg_name, plugin->plg_libpath);
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE,"Init function
\"%s\" for \"%s\" plugin in "
"library \"%s\"
failed.",plugin->plg_initfunc, plugin->plg_name, plugin->plg_libpath);
@@ -3132,12 +3132,12 @@ plugin_add(Slapi_Entry *entry, char *returntext, int locked)
}
if((rc = plugin_setup(entry, 0, 0, 1, returntext)) != LDAP_SUCCESS){
- LDAPDebug(LDAP_DEBUG_PLUGIN, "plugin_add: plugin_setup failed for
(%s)\n",slapi_entry_get_dn(entry), rc, 0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "plugin_add: plugin_setup failed for
(%s)\n",slapi_entry_get_dn(entry), rc, 0);
goto done;
}
if((rc = plugin_start(entry, returntext)) != LDAP_SUCCESS){
- LDAPDebug(LDAP_DEBUG_PLUGIN, "plugin_add: plugin_start failed for
(%s)\n",slapi_entry_get_dn(entry), rc, 0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "plugin_add: plugin_start failed for
(%s)\n",slapi_entry_get_dn(entry), rc, 0);
goto done;
}
@@ -3275,7 +3275,7 @@ next:
for(i = 0; list && list[i]; i++){
if(strcasecmp(list[i], plugin_name) == 0){
/* We have a dependency, we can not disable this pluign */
- LDAPDebug(LDAP_DEBUG_ANY, "plugin_delete_check_dependency:
can not disable plugin(%s) due "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"plugin_delete_check_dependency: can not disable plugin(%s) due "
"to dependency name issues with plugin
(%s)\n",
plugin_name, config[index].plugin->plg_name, 0);
rc = -1;
@@ -3331,7 +3331,7 @@ next:
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Plugin (%s) type
(%s) is needed "
"by other plugins(%s), it can not be dynamically
disabled/removed at this time.",
plugin_name, plugin_type, plugins);
- LDAPDebug(LDAP_DEBUG_ANY, "plugin_delete_check_dependency: %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "plugin_delete_check_dependency:
%s\n",
returntext, 0, 0);
slapi_ch_free_string(&plugins);
@@ -3506,7 +3506,7 @@ plugin_delete(Slapi_Entry *plugin_entry, char *returntext, int
locked)
/* Critical server plugins can not be disabled */
if(plugin_is_critical(plugin_entry)){
- LDAPDebug(LDAP_DEBUG_ANY, "plugin_delete: plugin \"%s\" is
critical to server operations, and can not be disabled\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "plugin_delete: plugin \"%s\"
is critical to server operations, and can not be disabled\n",
slapi_entry_get_dn_const(plugin_entry), 0, 0);
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Plugin \"%s\"
is critical to server operations, and can not "
"be disabled.\n",slapi_entry_get_dn_const(plugin_entry));
@@ -3516,7 +3516,7 @@ plugin_delete(Slapi_Entry *plugin_entry, char *returntext, int
locked)
if (!(value = slapi_entry_attr_get_charptr(plugin_entry, ATTR_PLUGIN_TYPE))){
/* error: required attribute %s missing */
- LDAPDebug(LDAP_DEBUG_ANY, "plugin_delete: required attribute %s is missing
from entry \"%s\"\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "plugin_delete: required attribute %s is
missing from entry \"%s\"\n",
ATTR_PLUGIN_TYPE, slapi_entry_get_dn_const(plugin_entry), 0);
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Plugin delete failed:
required attribute %s "
"is missing from entry.",ATTR_PLUGIN_TYPE);
@@ -3533,7 +3533,7 @@ plugin_delete(Slapi_Entry *plugin_entry, char *returntext, int
locked)
rc = plugin_get_type_and_list(value, &type, &plugin_list);
if ( rc != 0 ) {
/* error: unknown plugin type */
- LDAPDebug(LDAP_DEBUG_ANY, "plugin_delete: unknown plugin type
\"%s\" in entry \"%s\"\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "plugin_delete: unknown plugin
type \"%s\" in entry \"%s\"\n",
value, slapi_entry_get_dn_const(plugin_entry), 0);
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Plugin delete
failed: unknown plugin type "
"\"%s\" in entry.",value);
@@ -3560,7 +3560,7 @@ plugin_delete(Slapi_Entry *plugin_entry, char *returntext, int
locked)
* Make sure there are no other plugins that depend on this one
before removing it
*/
if(plugin_delete_check_dependency(plugin, CHECK_ALL, returntext) !=
LDAP_SUCCESS){
- LDAPDebug(LDAP_DEBUG_ANY, "plugin_delete: failed to
disable/delete plugin (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "plugin_delete: failed to
disable/delete plugin (%s)\n",
plugin->plg_dn,0,0);
rc = -1;
break;
@@ -3583,7 +3583,7 @@ done:
if(!removed && rc == 0){
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE,"Plugin delete failed:
could not find plugin "
"in the global list.");
- LDAPDebug(LDAP_DEBUG_ANY, "plugin_delete: did not find plugin(%s) in the
global list.\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "plugin_delete: did not find plugin(%s)
in the global list.\n",
slapi_entry_get_dn_const(plugin_entry),0,0);
rc = -1;
}
@@ -3724,7 +3724,7 @@ plugin_invoke_plugin_sdn (struct slapdplugin *plugin, int operation,
Slapi_PBloc
PR_ASSERT (plugin);
if (!pb) {
- LDAPDebug(LDAP_DEBUG_ANY, "plugin_invoke_plugin_sdn: NULL pblock.\n", 0, 0,
0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "plugin_invoke_plugin_sdn: NULL
pblock.\n", 0, 0, 0);
return PR_FALSE;
}
diff --git a/ldap/servers/slapd/plugin_acl.c b/ldap/servers/slapd/plugin_acl.c
index b250d29..61aa67f 100644
--- a/ldap/servers/slapd/plugin_acl.c
+++ b/ldap/servers/slapd/plugin_acl.c
@@ -194,7 +194,7 @@ plugin_call_acl_verify_syntax ( Slapi_PBlock *pb, Slapi_Entry *e, char
**errbuf
}
if ( !plugin_called ) {
- LDAPDebug ( LDAP_DEBUG_ANY, "The ACL plugin is not initialized. The aci syntax
cannot be verified\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "The ACL plugin is not initialized. The aci
syntax cannot be verified\n",0,0,0);
}
return rc;
}
diff --git a/ldap/servers/slapd/plugin_mr.c b/ldap/servers/slapd/plugin_mr.c
index a930c3c..996dbc0 100644
--- a/ldap/servers/slapd/plugin_mr.c
+++ b/ldap/servers/slapd/plugin_mr.c
@@ -122,11 +122,11 @@ plugin_mr_find_registered (char* oid)
{
if (!strcasecmp (oid, i->oi_oid))
{
- LDAPDebug (LDAP_DEBUG_FILTER, "plugin_mr_find_registered(%s) != NULL\n",
oid, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "plugin_mr_find_registered(%s) !=
NULL\n", oid, 0, 0);
return i->oi_plugin;
}
}
- LDAPDebug (LDAP_DEBUG_FILTER, "plugin_mr_find_registered(%s) == NULL\n",
oid, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "plugin_mr_find_registered(%s) ==
NULL\n", oid, 0, 0);
return NULL;
}
@@ -134,7 +134,7 @@ static void
plugin_mr_bind (char* oid, struct slapdplugin* plugin)
{
oid_item_t* i = (oid_item_t*) slapi_ch_malloc (sizeof (oid_item_t));
- LDAPDebug (LDAP_DEBUG_FILTER, "=> plugin_mr_bind(%s)\n", oid, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> plugin_mr_bind(%s)\n", oid,
0, 0);
init_global_mr_lock();
i->oi_oid = slapi_ch_strdup (oid);
i->oi_plugin = plugin;
@@ -142,7 +142,7 @@ plugin_mr_bind (char* oid, struct slapdplugin* plugin)
i->oi_next = global_mr_oids;
global_mr_oids = i;
PR_Unlock (global_mr_oids_lock);
- LDAPDebug (LDAP_DEBUG_FILTER, "<= plugin_mr_bind\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= plugin_mr_bind\n", 0, 0, 0);
}
int /* an LDAP error code, hopefully LDAP_SUCCESS */
@@ -529,7 +529,7 @@ default_mr_filter_create(Slapi_PBlock *pb)
slapi_pblock_set(pb, SLAPI_PLUGIN_DESTROY_FN, default_mr_filter_destroy);
rc = 0; /* success */
} else {
- LDAPDebug(LDAP_DEBUG_FILTER,
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
"default_mr_filter_create: missing parameter: %s%s%s\n",
mrOID ? "" : " oid",
mrTYPE ? "" : " attribute type",
diff --git a/ldap/servers/slapd/plugin_syntax.c b/ldap/servers/slapd/plugin_syntax.c
index 76f5720..fb5a581 100644
--- a/ldap/servers/slapd/plugin_syntax.c
+++ b/ldap/servers/slapd/plugin_syntax.c
@@ -25,13 +25,13 @@ plugin_syntax_find( const char *nameoroid )
{
struct slapdplugin *pi;
- /* LDAPDebug( LDAP_DEBUG_FILTER, "=> plugin_syntax_find (%s)\n", nameoroid,
0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> plugin_syntax_find (%s)\n",
nameoroid, 0, 0 ); */
for ( pi = get_plugin_list(PLUGIN_LIST_SYNTAX); pi != NULL; pi = pi->plg_next ) {
if ( charray_inlist( pi->plg_syntax_names, (char *)nameoroid ) ) {
break;
}
}
- /* LDAPDebug( LDAP_DEBUG_FILTER, "<= plugin_syntax_find %d\n", pi, 0, 0 );
*/
+ /* LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= plugin_syntax_find %d\n",
pi, 0, 0 ); */
return ( pi );
}
@@ -60,7 +60,7 @@ slapi_get_global_syntax_plugins()
char *
plugin_syntax2oid( struct slapdplugin *pi )
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"the function plugin_syntax2oid is deprecated - please use
attr_get_syntax_oid instead\n", 0, 0, 0);
PR_ASSERT(0);
return( NULL );
@@ -72,7 +72,7 @@ plugin_call_syntax_get_compare_fn(
value_compare_fn_type *compare_fn
)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"the function plugin_call_syntax_get_compare_fn is deprecated - please
use attr_get_value_cmp_fn instead\n", 0, 0, 0);
PR_ASSERT(0);
return( 0 );
@@ -101,7 +101,7 @@ plugin_call_syntax_filter_ava_sv(
Slapi_PBlock pipb;
IFP ava_fn = NULL;
- LDAPDebug( LDAP_DEBUG_FILTER,
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
"=> plugin_call_syntax_filter_ava %s=%s\n", ava->ava_type,
ava->ava_value.bv_val, 0 );
@@ -112,7 +112,7 @@ plugin_call_syntax_filter_ava_sv(
}
if ( ( a->a_mr_eq_plugin == NULL ) && ( a->a_mr_ord_plugin == NULL )
&& ( a->a_plugin == NULL ) ) {
- LDAPDebug( LDAP_DEBUG_FILTER,
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
"<= plugin_call_syntax_filter_ava no plugin for attr (%s)\n",
a->a_type, 0, 0 );
return( LDAP_PROTOCOL_ERROR ); /* syntax unkonwn */
@@ -135,7 +135,7 @@ plugin_call_syntax_filter_ava_sv(
if ((a->a_mr_ord_plugin == NULL) &&
((a->a_plugin->plg_syntax_flags &
SLAPI_PLUGIN_SYNTAX_FLAG_ORDERING) == 0)) {
- LDAPDebug( LDAP_DEBUG_FILTER,
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
"<= plugin_call_syntax_filter_ava: attr (%s) has no ordering matching
rule, and syntax does not define a compare function\n",
a->a_type, 0, 0 );
rc = LDAP_PROTOCOL_ERROR;
@@ -177,19 +177,19 @@ plugin_call_syntax_filter_ava_sv(
rc = (*ava_fn)( &pipb, &ava->ava_value, va, ftype, retVal );
}
} else {
- LDAPDebug( LDAP_DEBUG_FILTER,
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
"<= plugin_call_syntax_filter_ava: attr (%s) has no ava filter
function\n",
a->a_type, 0, 0 );
}
break;
default:
- LDAPDebug( LDAP_DEBUG_ANY, "plugin_call_syntax_filter_ava: "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "plugin_call_syntax_filter_ava: "
"unknown filter type %d\n", ftype, 0, 0 );
rc = LDAP_PROTOCOL_ERROR;
break;
}
- LDAPDebug( LDAP_DEBUG_FILTER,
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
"<= plugin_call_syntax_filter_ava %d\n", rc, 0, 0 );
return( rc );
}
@@ -216,7 +216,7 @@ plugin_call_syntax_filter_sub_sv(
IFP sub_fn = NULL;
int filter_normalized = 0;
- LDAPDebug( LDAP_DEBUG_FILTER,
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
"=> plugin_call_syntax_filter_sub_sv\n", 0, 0, 0 );
if ( ( a->a_mr_sub_plugin == NULL ) && ( a->a_plugin == NULL ) ) {
@@ -224,7 +224,7 @@ plugin_call_syntax_filter_sub_sv(
slapi_attr_init_syntax(a);
}
if ( ( a->a_mr_sub_plugin == NULL ) && ( a->a_plugin == NULL ) ) {
- LDAPDebug( LDAP_DEBUG_FILTER,
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
"<= plugin_call_syntax_filter_sub_sv attribute (%s) has no substring
matching rule or syntax plugin\n",
a->a_type, 0, 0 );
return( -1 ); /* syntax unkonwn - does not match */
@@ -262,7 +262,7 @@ plugin_call_syntax_filter_sub_sv(
rc = -1;
}
- LDAPDebug( LDAP_DEBUG_FILTER, "<= plugin_call_syntax_filter_sub_sv %d\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= plugin_call_syntax_filter_sub_sv
%d\n",
rc, 0, 0 );
return( rc );
}
@@ -562,7 +562,7 @@ slapi_call_syntax_values2keys_sv(
Slapi_PBlock pipb;
struct slapdplugin *pi = vpi;
- LDAPDebug( LDAP_DEBUG_FILTER, "=> slapi_call_syntax_values2keys\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=>
slapi_call_syntax_values2keys\n",
0, 0, 0 );
pblock_init( &pipb );
@@ -574,7 +574,7 @@ slapi_call_syntax_values2keys_sv(
rc = pi->plg_syntax_values2keys( &pipb, vals, ivals, ftype );
}
- LDAPDebug( LDAP_DEBUG_FILTER,
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
"<= slapi_call_syntax_values2keys %d\n", rc, 0, 0 );
return( rc );
}
@@ -592,7 +592,7 @@ slapi_attr_values2keys_sv_pb(
struct slapdplugin *pi = NULL;
IFP v2k_fn = NULL;
- LDAPDebug( LDAP_DEBUG_FILTER, "=> slapi_attr_values2keys_sv\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> slapi_attr_values2keys_sv\n",
0, 0, 0 );
if ( ( sattr->a_plugin == NULL ) ) {
/* could be lazy plugin initialization, get it now */
@@ -620,7 +620,7 @@ slapi_attr_values2keys_sv_pb(
}
break;
default:
- LDAPDebug( LDAP_DEBUG_ANY, "<= slapi_attr_values2keys_sv: ERROR: unsupported
filter type %d\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "<= slapi_attr_values2keys_sv: ERROR:
unsupported filter type %d\n",
ftype, 0, 0 );
rc = LDAP_PROTOCOL_ERROR;
goto done;
@@ -635,7 +635,7 @@ slapi_attr_values2keys_sv_pb(
}
done:
- LDAPDebug( LDAP_DEBUG_FILTER,
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
"<= slapi_call_syntax_values2keys %d\n", rc, 0, 0 );
return( rc );
}
@@ -688,7 +688,7 @@ slapi_call_syntax_values2keys_sv_pb(
int rc;
struct slapdplugin *pi = vpi;
- LDAPDebug( LDAP_DEBUG_FILTER, "=> slapi_call_syntax_values2keys\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=>
slapi_call_syntax_values2keys\n",
0, 0, 0 );
slapi_pblock_set( pb, SLAPI_PLUGIN, vpi );
@@ -699,7 +699,7 @@ slapi_call_syntax_values2keys_sv_pb(
rc = pi->plg_syntax_values2keys( pb, vals, ivals, ftype );
}
- LDAPDebug( LDAP_DEBUG_FILTER,
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
"<= slapi_call_syntax_values2keys %d\n", rc, 0, 0 );
return( rc );
}
@@ -735,7 +735,7 @@ slapi_call_syntax_assertion2keys_ava_sv(
Slapi_PBlock pipb;
struct slapdplugin *pi = vpi;
- LDAPDebug( LDAP_DEBUG_FILTER,
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
"=> slapi_call_syntax_assertion2keys_ava\n", 0, 0, 0 );
pblock_init( &pipb );
@@ -746,7 +746,7 @@ slapi_call_syntax_assertion2keys_ava_sv(
rc = pi->plg_syntax_assertion2keys_ava( &pipb, val, ivals, ftype );
}
- LDAPDebug( LDAP_DEBUG_FILTER,
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
"<= slapi_call_syntax_assertion2keys_ava %d\n", rc, 0, 0 );
return( rc );
}
@@ -764,7 +764,7 @@ slapi_attr_assertion2keys_ava_sv(
struct slapdplugin *pi = NULL;
IFP a2k_fn = NULL;
- LDAPDebug( LDAP_DEBUG_FILTER,
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
"=> slapi_attr_assertion2keys_ava_sv\n", 0, 0, 0 );
if ( ( sattr->a_plugin == NULL ) ) {
/* could be lazy plugin initialization, get it now */
@@ -784,7 +784,7 @@ slapi_attr_assertion2keys_ava_sv(
}
break;
default:
- LDAPDebug( LDAP_DEBUG_ANY, "<= slapi_attr_assertion2keys_ava_sv: ERROR:
unsupported filter type %d\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "<= slapi_attr_assertion2keys_ava_sv: ERROR:
unsupported filter type %d\n",
ftype, 0, 0 );
rc = LDAP_PROTOCOL_ERROR;
goto done;
@@ -798,7 +798,7 @@ slapi_attr_assertion2keys_ava_sv(
rc = (*a2k_fn)( &pipb, val, ivals, ftype );
}
done:
- LDAPDebug( LDAP_DEBUG_FILTER,
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
"<= slapi_attr_assertion2keys_ava_sv %d\n", rc, 0, 0 );
return( rc );
}
@@ -852,7 +852,7 @@ slapi_call_syntax_assertion2keys_sub_sv(
Slapi_PBlock pipb;
struct slapdplugin *pi = vpi;
- LDAPDebug( LDAP_DEBUG_FILTER,
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
"=> slapi_call_syntax_assertion2keys_sub\n", 0, 0, 0 );
pblock_init( &pipb );
@@ -865,7 +865,7 @@ slapi_call_syntax_assertion2keys_sub_sv(
final, ivals );
}
- LDAPDebug( LDAP_DEBUG_FILTER,
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
"<= slapi_call_syntax_assertion2keys_sub %d\n", rc, 0, 0 );
return( rc );
}
@@ -898,7 +898,7 @@ slapi_attr_assertion2keys_sub_sv_pb(
struct slapdplugin *origpi = NULL;
IFP a2k_fn = NULL;
- LDAPDebug( LDAP_DEBUG_FILTER,
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
"=> slapi_attr_assertion2keys_sub_sv\n", 0, 0, 0 );
if ( ( sattr->a_plugin == NULL ) ) {
/* could be lazy plugin initialization, get it now */
@@ -932,7 +932,7 @@ slapi_attr_assertion2keys_sub_sv_pb(
slapi_pblock_set(pb, SLAPI_PLUGIN, origpi);
}
- LDAPDebug( LDAP_DEBUG_FILTER,
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
"<= slapi_attr_assertion2keys_sub_sv %d\n", rc, 0, 0 );
return( rc );
}
diff --git a/ldap/servers/slapd/poll_using_select.c
b/ldap/servers/slapd/poll_using_select.c
index 203dce1..8c22847 100644
--- a/ldap/servers/slapd/poll_using_select.c
+++ b/ldap/servers/slapd/poll_using_select.c
@@ -40,7 +40,7 @@ poll_using_select(struct my_pollfd *filed, int nfds, int timeout)
int a, b, retval;
#ifdef DEBUG_POLL_AS_SELECT
- LDAPDebug(LDAP_DEBUG_ANY, "poll convert nfds=%d, timeout=%d\n", nfds,
timeout,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "poll convert nfds=%d, timeout=%d\n",
nfds, timeout,0);
#endif /* DEBUG_POLL_AS_SELECT */
FD_ZERO( &rd );
@@ -61,7 +61,7 @@ poll_using_select(struct my_pollfd *filed, int nfds, int timeout)
#ifdef DEBUG_POLL_AS_SELECT
if (filed[a].events != 0) {
- LDAPDebug(LDAP_DEBUG_ANY, "poll events = %d for fd=%d\n", filed[a].events,
filed[a].fd,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "poll events = %d for fd=%d\n",
filed[a].events, filed[a].fd,0);
}
#endif /* DEBUG_POLL_AS_SELECT */
@@ -77,7 +77,7 @@ poll_using_select(struct my_pollfd *filed, int nfds, int timeout)
#ifdef DEBUG_POLL_AS_SELECT
if( temp_events != 0 ){
- LDAPDebug(LDAP_DEBUG_ANY, "Unhandled poll event type=0x%x on
FD(%d)\n",filed[a].events,filed[a].fd,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Unhandled poll event type=0x%x on
FD(%d)\n",filed[a].events,filed[a].fd,0);
}
#endif /* DEBUG_POLL_AS_SELECT */
@@ -98,7 +98,7 @@ poll_using_select(struct my_pollfd *filed, int nfds, int timeout)
if( retval <= 0 ) return( retval );
#ifdef DEBUG_POLL_AS_SELECT
- LDAPDebug(LDAP_DEBUG_ANY, "For\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "For\n",0,0,0);
#endif /* DEBUG_POLL_AS_SELECT */
for( b=0; b<nfds;b++){
@@ -112,7 +112,7 @@ poll_using_select(struct my_pollfd *filed, int nfds, int timeout)
#ifdef DEBUG_POLL_AS_SELECT
if ((filed[b].events != 0) || (filed[b].revents != 0)) {
- LDAPDebug(LDAP_DEBUG_ANY, " file des=%d, events=0x%x, revents=0x%x\n",
filed[b].fd, filed[b].events ,filed[b].revents);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, " file des=%d, events=0x%x,
revents=0x%x\n", filed[b].fd, filed[b].events ,filed[b].revents);
}
#endif /* DEBUG_POLL_AS_SELECT */
}
@@ -123,7 +123,7 @@ poll_using_select(struct my_pollfd *filed, int nfds, int timeout)
}
#ifdef DEBUG_POLL_AS_SELECT
- LDAPDebug(LDAP_DEBUG_ANY, "poll returns %d (converted
poll)\n",retval,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "poll returns %d (converted
poll)\n",retval,0,0);
#endif /* DEBUG_POLL_AS_SELECT */
return( retval );
diff --git a/ldap/servers/slapd/protect_db.c b/ldap/servers/slapd/protect_db.c
index 238f943..12507a1 100644
--- a/ldap/servers/slapd/protect_db.c
+++ b/ldap/servers/slapd/protect_db.c
@@ -164,7 +164,7 @@ make_sure_dir_exists(char *dir)
if (PR_MkDir(dir, 0755) != PR_SUCCESS) {
PRErrorCode prerr = PR_GetError();
if (prerr != PR_FILE_EXISTS_ERROR) {
- LDAPDebug(LDAP_DEBUG_ANY, FILE_CREATE_ERROR, dir, prerr,
slapd_pr_strerror(prerr));
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, FILE_CREATE_ERROR, dir, prerr,
slapd_pr_strerror(prerr));
return 1;
}
}
@@ -175,10 +175,10 @@ make_sure_dir_exists(char *dir)
pw = slapdFrontendConfig->localuserinfo;
if (chown(dir, pw->pw_uid, -1) == -1) {
if ((stat(dir, &stat_buffer) == 0) && (stat_buffer.st_uid !=
pw->pw_uid)) {
- LDAPDebug(LDAP_DEBUG_ANY, CHOWN_WARNING, dir, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, CHOWN_WARNING, dir, 0, 0);
return 1;
} else {
- LDAPDebug(LDAP_DEBUG_ANY, STAT_ERROR, dir, errno, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, STAT_ERROR, dir, errno, 0);
return 1;
}
}
@@ -203,7 +203,7 @@ add_this_process_to(char *dir_name)
file_name[sizeof(file_name)-1] = (char)0;
if ((prfd = PR_Open(file_name, PR_RDWR | PR_CREATE_FILE, 0644)) == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, FILE_CREATE_WARNING, file_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, FILE_CREATE_WARNING, file_name, 0, 0);
return;
}
@@ -214,7 +214,7 @@ add_this_process_to(char *dir_name)
pw = slapdFrontendConfig->localuserinfo;
if (chown(file_name, pw->pw_uid, -1) == -1) {
if ((stat(file_name, &stat_buffer) == 0) && (stat_buffer.st_uid
!= pw->pw_uid)) {
- LDAPDebug(LDAP_DEBUG_ANY, CHOWN_WARNING, file_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, CHOWN_WARNING, file_name, 0, 0);
}
}
}
@@ -388,10 +388,10 @@ add_new_slapd_process(int exec_mode, int r_flag, int skip_flag)
case SLAPD_EXEMODE_SLAPD:
if (running) {
result = -1;
- LDAPDebug(LDAP_DEBUG_ANY, NO_SERVER_DUE_TO_SERVER, running, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, NO_SERVER_DUE_TO_SERVER, running, 0, 0);
} else if (importing) {
result = -1;
- LDAPDebug(LDAP_DEBUG_ANY, NO_SERVER_DUE_TO_IMPORT, importing, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, NO_SERVER_DUE_TO_IMPORT, importing, 0, 0);
} else {
add_this_process_to(server_dir);
result = 0;
@@ -404,7 +404,7 @@ add_new_slapd_process(int exec_mode, int r_flag, int skip_flag)
* it needs to run by itself, so no other slapd process can
* change the database while it is running. */
if (running || importing) {
- LDAPDebug(LDAP_DEBUG_ANY, NO_DB2LDIFR_DUE_TO_USE, 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, NO_DB2LDIFR_DUE_TO_USE, 0, 0, 0);
result = -1;
} else {
/* Even though this is really going to export code, we will
@@ -415,7 +415,7 @@ add_new_slapd_process(int exec_mode, int r_flag, int skip_flag)
}
} else {
if (importing) {
- LDAPDebug(LDAP_DEBUG_ANY, NO_DB2LDIF_DUE_TO_IMPORT, importing, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, NO_DB2LDIF_DUE_TO_IMPORT, importing, 0,
0);
result = -1;
} else {
add_this_process_to(export_dir);
@@ -425,7 +425,7 @@ add_new_slapd_process(int exec_mode, int r_flag, int skip_flag)
break;
case SLAPD_EXEMODE_DB2ARCHIVE:
if (importing) {
- LDAPDebug(LDAP_DEBUG_ANY, NO_DB2BAK_DUE_TO_IMPORT, importing, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, NO_DB2BAK_DUE_TO_IMPORT, importing, 0, 0);
result = -1;
} else {
add_this_process_to(export_dir);
@@ -435,7 +435,7 @@ add_new_slapd_process(int exec_mode, int r_flag, int skip_flag)
case SLAPD_EXEMODE_ARCHIVE2DB:
case SLAPD_EXEMODE_LDIF2DB:
if (running || importing || exporting) {
- LDAPDebug(LDAP_DEBUG_ANY, NO_IMPORT_DUE_TO_USE, 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, NO_IMPORT_DUE_TO_USE, 0, 0, 0);
result = -1;
} else {
add_this_process_to(import_dir);
@@ -444,7 +444,7 @@ add_new_slapd_process(int exec_mode, int r_flag, int skip_flag)
break;
case SLAPD_EXEMODE_DB2INDEX:
if (running || importing || exporting) {
- LDAPDebug(LDAP_DEBUG_ANY, NO_DB2INDEX_DUE_TO_USE, 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, NO_DB2INDEX_DUE_TO_USE, 0, 0, 0);
result = -1;
} else {
add_this_process_to(import_dir);
@@ -453,7 +453,7 @@ add_new_slapd_process(int exec_mode, int r_flag, int skip_flag)
break;
case SLAPD_EXEMODE_UPGRADEDB:
if (running || importing || exporting) {
- LDAPDebug(LDAP_DEBUG_ANY, NO_UPGRADEDB_DUE_TO_USE, 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, NO_UPGRADEDB_DUE_TO_USE, 0, 0, 0);
result = -1;
} else {
add_this_process_to(import_dir);
@@ -462,7 +462,7 @@ add_new_slapd_process(int exec_mode, int r_flag, int skip_flag)
break;
case SLAPD_EXEMODE_UPGRADEDNFORMAT:
if (running || importing || exporting) {
- LDAPDebug(LDAP_DEBUG_ANY, NO_UPGRADEDNFORMAT_DUE_TO_USE, 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, NO_UPGRADEDNFORMAT_DUE_TO_USE, 0, 0, 0);
result = -1;
} else {
add_this_process_to(import_dir);
@@ -471,7 +471,7 @@ add_new_slapd_process(int exec_mode, int r_flag, int skip_flag)
break;
case SLAPD_EXEMODE_DBTEST:
if (running || importing || exporting) {
- LDAPDebug(LDAP_DEBUG_ANY, NO_DBTEST_DUE_TO_USE, 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, NO_DBTEST_DUE_TO_USE, 0, 0, 0);
result = -1;
} else {
add_this_process_to(import_dir);
diff --git a/ldap/servers/slapd/psearch.c b/ldap/servers/slapd/psearch.c
index e88bcb9..d2ee5c8 100644
--- a/ldap/servers/slapd/psearch.c
+++ b/ldap/servers/slapd/psearch.c
@@ -101,17 +101,17 @@ ps_init_psearch_system()
if ( !PS_IS_INITIALIZED()) {
psearch_list = (PSearch_List *) slapi_ch_calloc( 1, sizeof( PSearch_List ));
if (( psearch_list->pl_rwlock = slapi_new_rwlock()) == NULL ) {
- LDAPDebug( LDAP_DEBUG_ANY, "init_psearch_list: cannot initialize lock
structure. "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "init_psearch_list: cannot initialize lock
structure. "
"The server is terminating.\n", 0, 0, 0 );
exit( -1 );
}
if (( psearch_list->pl_cvarlock = PR_NewLock()) == NULL ) {
- LDAPDebug( LDAP_DEBUG_ANY, "init_psearch_list: cannot create new lock. "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "init_psearch_list: cannot create new lock.
"
"The server is terminating.\n", 0, 0, 0 );
exit( -1 );
}
if (( psearch_list->pl_cvar = PR_NewCondVar( psearch_list->pl_cvarlock )) == NULL
) {
- LDAPDebug( LDAP_DEBUG_ANY, "init_psearch_list: cannot create new condition
variable. "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "init_psearch_list: cannot create new
condition variable. "
"The server is terminating.\n", 0, 0, 0 );
exit( -1 );
}
@@ -182,7 +182,7 @@ ps_add( Slapi_PBlock *pb, ber_int_t changetypes, int
send_entchg_controls )
if(NULL == ps_tid){
int prerr;
prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY,"persistent search PR_CreateThread()failed in
the "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"persistent search
PR_CreateThread()failed in the "
"ps_add function: " SLAPI_COMPONENT_NAME_NSPR " error
%d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
@@ -438,7 +438,7 @@ psearch_alloc(void)
ps->ps_pblock = NULL;
if (( ps->ps_lock = PR_NewLock()) == NULL ) {
- LDAPDebug( LDAP_DEBUG_ANY, "psearch_add: cannot create new lock. "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "psearch_add: cannot create new lock. "
"Persistent search abandoned.\n", 0, 0, 0 );
slapi_ch_free((void **)&ps);
return( NULL );
@@ -582,7 +582,7 @@ ps_service_persistent_searches( Slapi_Entry *e, Slapi_Entry *eprev,
ber_int_t ch
eprev ? slapi_entry_get_dn_const(eprev) : NULL,
&ctrl );
if ( rc != LDAP_SUCCESS ) {
- LDAPDebug( LDAP_DEBUG_ANY, "ps_service_persistent_searches:"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ps_service_persistent_searches:"
" unable to create EntryChangeNotification control for"
" entry \"%s\" -- control won't be sent.\n",
slapi_entry_get_dn_const(e), 0, 0 );
@@ -614,10 +614,10 @@ ps_service_persistent_searches( Slapi_Entry *e, Slapi_Entry *eprev,
ber_int_t ch
ldap_control_free( ctrl );
/* Turn 'em loose */
ps_wakeup_all();
- LDAPDebug( LDAP_DEBUG_TRACE, "ps_service_persistent_searches: enqueued entry
"
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ps_service_persistent_searches: enqueued
entry "
"\"%s\" on %d persistent search lists\n",
slapi_entry_get_dn_const(e), matched, 0 );
} else {
- LDAPDebug( LDAP_DEBUG_TRACE, "ps_service_persistent_searches: entry "
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ps_service_persistent_searches: entry
"
"\"%s\" not enqueued on any persistent search lists\n",
slapi_entry_get_dn_const(e), 0, 0 );
}
diff --git a/ldap/servers/slapd/pw.c b/ldap/servers/slapd/pw.c
index ed83ded..f040893 100644
--- a/ldap/servers/slapd/pw.c
+++ b/ldap/servers/slapd/pw.c
@@ -112,7 +112,7 @@ slapi_pw_find_sv(
char *valpwd;
int i;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> slapi_pw_find value: \"%s\"\n",
slapi_value_get_string(v), 0, 0 ); /* JCM Innards */
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> slapi_pw_find value:
\"%s\"\n", slapi_value_get_string(v), 0, 0 ); /* JCM Innards */
for ( i = 0; vals && vals[i]; i++ )
{
@@ -120,7 +120,7 @@ slapi_pw_find_sv(
if ( pwsp != NULL &&
(*(pwsp->pws_cmp))( (char*)slapi_value_get_string(v), valpwd ) == 0 ) /* JCM
Innards*/
{
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"<= slapi_pw_find matched \"%s\" using scheme
\"%s\"\n",
valpwd, pwsp->pws_name, 0 );
free_pw_scheme( pwsp );
@@ -129,7 +129,7 @@ slapi_pw_find_sv(
free_pw_scheme( pwsp );
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= slapi_pw_find no matching password\n", 0,
0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= slapi_pw_find no matching
password\n", 0, 0, 0 );
return( 1 ); /* no match */
}
@@ -1324,7 +1324,7 @@ slapi_add_pwd_control ( Slapi_PBlock *pb, char *arg, long time) {
LDAPControl new_ctrl;
char buf[12];
- LDAPDebug( LDAP_DEBUG_TRACE, "=> slapi_add_pwd_control\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> slapi_add_pwd_control\n", 0, 0,
0 );
sprintf( buf, "%ld", time );
new_ctrl.ldctl_oid = arg;
@@ -1597,7 +1597,7 @@ pw_get_admin_users(passwdPolicy *pwp)
if (res != LDAP_SUCCESS) {
slapi_free_search_results_internal(pb);
slapi_pblock_destroy(pb);
- LDAPDebug(LDAP_DEBUG_ANY, "pw_get_admin_users: search failed for %s: error %d -
"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "pw_get_admin_users: search failed for %s:
error %d - "
"Password Policy Administrators can not be set\n",
slapi_sdn_get_dn(sdn), res, 0);
return;
@@ -2077,7 +2077,7 @@ slapi_pwpolicy_make_response_control (Slapi_PBlock *pb, int seconds,
int logins,
passwordInHistory (8) } }
*/
- LDAPDebug( LDAP_DEBUG_TRACE, "=> slapi_pwpolicy_make_response_control", 0,
0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=>
slapi_pwpolicy_make_response_control", 0, 0, 0 );
if ( ( ber = ber_alloc()) == NULL )
{
return rc;
@@ -2123,7 +2123,7 @@ slapi_pwpolicy_make_response_control (Slapi_PBlock *pb, int seconds,
int logins,
ber_bvfree(bvp);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= slapi_pwpolicy_make_response_control
(%d)", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= slapi_pwpolicy_make_response_control
(%d)", rc, 0, 0 );
return (rc==-1?LDAP_OPERATIONS_ERROR:LDAP_SUCCESS);
}
diff --git a/ldap/servers/slapd/referral.c b/ldap/servers/slapd/referral.c
index 555e39a..a7e799e 100644
--- a/ldap/servers/slapd/referral.c
+++ b/ldap/servers/slapd/referral.c
@@ -46,7 +46,7 @@ g_get_global_referrals(void)
global_referrals.ra_rwlock = slapi_new_rwlock();
if (global_referrals.ra_rwlock == NULL) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ref_array_init: new lock creation failed\n", 0, 0, 0);
exit (-1);
}
@@ -238,7 +238,7 @@ ref_adjust( Slapi_PBlock *pb, struct berval **urls, const Slapi_DN
*refsdn,
*/
if ( LDAPDebugLevelIsSet( LDAP_DEBUG_ARGS )) {
for ( i = 0; urlscopy[i] != NULL; ++i ) {
- LDAPDebug( LDAP_DEBUG_ARGS, "ref_adjust: \"%s\" ->
\"%s\"\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "ref_adjust: \"%s\" ->
\"%s\"\n",
urls[i]->bv_val, urlscopy[i]->bv_val, 0 );
}
}
diff --git a/ldap/servers/slapd/result.c b/ldap/servers/slapd/result.c
index 9a0b217..ad8983e 100644
--- a/ldap/servers/slapd/result.c
+++ b/ldap/servers/slapd/result.c
@@ -204,7 +204,7 @@ int send_ldap_intermediate( Slapi_PBlock *pb, LDAPControl **ectrls,
int rc = 0;
int logit = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> send_ldap_intermediate\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> send_ldap_intermediate\n", 0, 0,
0 );
slapi_pblock_get (pb, SLAPI_OPERATION, &operation);
slapi_pblock_get (pb, SLAPI_CONNECTION, &connection);
@@ -213,7 +213,7 @@ int send_ldap_intermediate( Slapi_PBlock *pb, LDAPControl **ectrls,
}
tag = LDAP_RES_INTERMEDIATE;
if ( (ber = der_alloc()) == NULL ) {
- LDAPDebug( LDAP_DEBUG_ANY, "ber_alloc failed\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ber_alloc failed\n", 0, 0, 0 );
goto log_and_return;
}
/* add the intermediate message */
@@ -239,7 +239,7 @@ int send_ldap_intermediate( Slapi_PBlock *pb, LDAPControl **ectrls,
rc = ber_put_seq( ber );
}
if ( rc == LBER_ERROR ) {
- LDAPDebug( LDAP_DEBUG_ANY, "ber_printf failed 0\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ber_printf failed 0\n", 0, 0, 0 );
ber_free( ber, 1 /* freebuf */ );
goto log_and_return;
}
@@ -266,7 +266,7 @@ log_and_return:
log_result( pb, operation, rc, tag, 0 );
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= send_ldap_intermediate\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= send_ldap_intermediate\n", 0, 0,
0 );
return rc;
}
@@ -385,7 +385,7 @@ send_ldap_result_ext(
}
- LDAPDebug( LDAP_DEBUG_TRACE, "=> send_ldap_result %d:%s:%s\n", err,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> send_ldap_result %d:%s:%s\n",
err,
matched ? matched : "", text ? text : "" );
switch ( operation->o_tag ) {
@@ -444,7 +444,7 @@ send_ldap_result_ext(
if ( ber == NULL ) {
if ( (ber = der_alloc()) == NULL ) {
- LDAPDebug( LDAP_DEBUG_ANY, "ber_alloc failed\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ber_alloc failed\n", 0, 0, 0 );
goto log_and_return;
}
}
@@ -598,7 +598,7 @@ send_ldap_result_ext(
}
if ( rc == LBER_ERROR ) {
- LDAPDebug( LDAP_DEBUG_ANY, "ber_printf failed 1\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ber_printf failed 1\n", 0, 0, 0 );
if (flush_ber_element == 1) {
/* we alloced the ber */
ber_free( ber, 1 /* freebuf */ );
@@ -622,7 +622,7 @@ log_and_return:
log_result( pb, operation, err, tag, nentries );
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<= send_ldap_result\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= send_ldap_result\n", 0, 0, 0 );
}
/*
@@ -665,7 +665,7 @@ process_read_entry_controls(Slapi_PBlock *pb, char *oid)
slapi_pblock_get(pb, SLAPI_ENTRY_PRE_OP, &e);
} else {
/* Ok, read control not used for this type of operation */
- LDAPDebug( LDAP_DEBUG_ANY, "process_read_entry_controls: Read Entry
Controls "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "process_read_entry_controls: Read
Entry Controls "
"can not be used for a %s operation.\n",
op_to_string(op->o_tag), 0, 0);
rc = -1;
goto done;
@@ -677,14 +677,14 @@ process_read_entry_controls(Slapi_PBlock *pb, char *oid)
slapi_pblock_get(pb, SLAPI_ENTRY_POST_OP, &e);
} else {
/* Ok, read control not used for this type of operation */
- LDAPDebug( LDAP_DEBUG_ANY, "process_read_entry_controls: Read Entry
Controls "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "process_read_entry_controls: Read
Entry Controls "
"can not be used for a %s operation.\n",
op_to_string(op->o_tag), 0, 0);
rc = -1;
goto done;
}
}
if(e == NULL){
- LDAPDebug( LDAP_DEBUG_ANY, "process_read_entry_controls: unable to
retrieve entry\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "process_read_entry_controls: unable
to retrieve entry\n",0,0,0);
rc = -1;
goto done;
}
@@ -694,7 +694,7 @@ process_read_entry_controls(Slapi_PBlock *pb, char *oid)
if ( plugin_call_acl_plugin (pb, e, attrs, NULL, SLAPI_ACL_READ,
ACLPLUGIN_ACCESS_READ_ON_ENTRY, NULL ) != LDAP_SUCCESS )
{
- LDAPDebug( LDAP_DEBUG_ACL, "process_read_entry_controls: access to entry
not allowed (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ACL, LOG_DEBUG, "process_read_entry_controls:
access to entry not allowed (%s)\n",
slapi_entry_get_dn_const(e), 0, 0 );
rc = -1;
goto done;
@@ -734,7 +734,7 @@ process_read_entry_controls(Slapi_PBlock *pb, char *oid)
}
if(no_attrs && (all_attrs || attr_count)){
/* Can't have both no attrs and some attributes */
- LDAPDebug( LDAP_DEBUG_ANY, "process_read_entry_controls: Error, both
no attributes \"1.1\" and "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "process_read_entry_controls:
Error, both no attributes \"1.1\" and "
"specific attributes were requeseted.\n", 0, 0, 0 );
rc = -1;
goto free;
@@ -746,7 +746,7 @@ process_read_entry_controls(Slapi_PBlock *pb, char *oid)
}
} else {
/* this is a problem, malformed request control value */
- LDAPDebug( LDAP_DEBUG_ANY, "process_read_entry_controls: invalid control
value.\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "process_read_entry_controls: invalid
control value.\n",0,0,0);
rc = -1;
goto free;
}
@@ -765,7 +765,7 @@ process_read_entry_controls(Slapi_PBlock *pb, char *oid)
ber_bvfree(res_value);
} else {
/* failed to encode the result entry */
- LDAPDebug( LDAP_DEBUG_ANY, "Failed to process READ ENTRY Control (%s),
error encoding result entry\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to process READ ENTRY Control
(%s), error encoding result entry\n",
oid, 0, 0 );
rc = -1;
}
@@ -776,7 +776,7 @@ free:
}
if(rc != 0){
/* log an error */
- LDAPDebug( LDAP_DEBUG_ANY, "Failed to process READ ENTRY Control (%s)
ber decoding error\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to process READ ENTRY Control
(%s) ber decoding error\n",
oid, 0, 0 );
}
}
@@ -818,7 +818,7 @@ send_ldapv3_referral(
slapi_pblock_get (pb, SLAPI_OPERATION, &operation);
- LDAPDebug( LDAP_DEBUG_TRACE, "=> send_ldapv3_referral\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> send_ldapv3_referral\n", 0, 0, 0
);
if ( conn == NULL ) {
if ( operation->o_search_referral_handler != NULL ) {
@@ -835,7 +835,7 @@ send_ldapv3_referral(
}
if ( (ber = der_alloc()) == NULL ) {
- LDAPDebug( LDAP_DEBUG_ANY, "ber_alloc failed\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ber_alloc failed\n", 0, 0, 0 );
send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL,
"ber_alloc", 0, NULL );
return( -1 );
@@ -860,13 +860,13 @@ send_ldapv3_referral(
rc = ber_printf( ber, "s", urls[i]->bv_val );
}
if ( rc == LBER_ERROR ) {
- LDAPDebug( LDAP_DEBUG_ANY, "ber_printf failed 2\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ber_printf failed 2\n", 0, 0, 0 );
send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL,
"ber_printf", 0, NULL );
return( -1 );
}
if ( ber_printf( ber, "}}" ) == LBER_ERROR ) {
- LDAPDebug( LDAP_DEBUG_ANY, "ber_printf failed 3\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ber_printf failed 3\n", 0, 0, 0 );
send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL,
"ber_printf", 0, NULL );
return( -1 );
@@ -983,7 +983,7 @@ encode_attr_2(
#endif
if (ber_printf(ber, "{s[", returned_type?returned_type:attribute_type) == -1)
{
- LDAPDebug( LDAP_DEBUG_ANY, "ber_printf failed 4\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ber_printf failed 4\n", 0, 0, 0 );
ber_free( ber, 1 );
send_ldap_result(pb, LDAP_OPERATIONS_ERROR, NULL,
"ber_printf type", 0, NULL);
@@ -996,7 +996,7 @@ encode_attr_2(
{
if ( ber_printf( ber, "o", v->bv.bv_val,v->bv.bv_len ) == -1 )
{
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ber_printf failed 5\n", 0, 0, 0 );
ber_free( ber, 1 );
send_ldap_result( pb, LDAP_OPERATIONS_ERROR,
@@ -1008,7 +1008,7 @@ encode_attr_2(
}
if ( ber_printf( ber, "]}" ) == -1 ) {
- LDAPDebug( LDAP_DEBUG_ANY, "ber_printf failed 6\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ber_printf failed 6\n", 0, 0, 0 );
ber_free( ber, 1 );
send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL,
"ber_printf type end", 0, NULL );
@@ -1491,7 +1491,7 @@ send_ldap_search_entry_ext(
slapi_pblock_get (pb, SLAPI_OPERATION, &operation);
- LDAPDebug( LDAP_DEBUG_TRACE, "=> send_ldap_search_entry (%s)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> send_ldap_search_entry (%s)\n",
e ? slapi_entry_get_dn_const(e) : "null", 0, 0 );
/* set current entry */
@@ -1502,7 +1502,7 @@ send_ldap_search_entry_ext(
/* call pre entry fn */
rc = plugin_call_plugins(pb, SLAPI_PLUGIN_PRE_ENTRY_FN);
if (rc) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"error returned by pre entry plugins for entry %s\n",
e?slapi_entry_get_dn_const(e):"null", 0, 0 );
goto cleanup;
@@ -1531,7 +1531,7 @@ send_ldap_search_entry_ext(
#if !defined(DISABLE_ACL_CHECK)
if ( e && plugin_call_acl_plugin (pb, e, attrs, NULL,
SLAPI_ACL_READ, ACLPLUGIN_ACCESS_READ_ON_ENTRY, NULL ) != LDAP_SUCCESS ) {
- LDAPDebug( LDAP_DEBUG_ACL, "acl: access to entry not allowed\n",
+ LDAPDebug(LDAP_DEBUG_ACL, LOG_DEBUG, "acl: access to entry not allowed\n",
0, 0, 0 );
rc = 1;
goto cleanup;
@@ -1544,7 +1544,7 @@ send_ldap_search_entry_ext(
}
if ( (ber = der_alloc()) == NULL ) {
- LDAPDebug( LDAP_DEBUG_ANY, "ber_alloc failed\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ber_alloc failed\n", 0, 0, 0 );
send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL,
"ber_alloc", 0, NULL );
rc = -1;
@@ -1555,7 +1555,7 @@ send_ldap_search_entry_ext(
LDAP_RES_SEARCH_ENTRY, slapi_entry_get_dn_const(e) );
if ( rc == -1 ) {
- LDAPDebug( LDAP_DEBUG_ANY, "ber_printf failed 7\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ber_printf failed 7\n", 0, 0, 0 );
send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL,
"ber_printf dn", 0, NULL );
goto cleanup;
@@ -1594,7 +1594,7 @@ send_ldap_search_entry_ext(
* and some other stuff. this is not allowed, but
* what should we do? we'll allow them to keep going.
*/
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"Accepting illegal other attributes specified with "
"special \"1.1\" attribute\n", 0, 0, 0 );
}
@@ -1673,7 +1673,7 @@ send_ldap_search_entry_ext(
}
if ( rc == -1 ) {
- LDAPDebug( LDAP_DEBUG_ANY, "ber_printf failed 8\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ber_printf failed 8\n", 0, 0, 0 );
send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL,
"ber_printf entry end", 0, NULL );
goto cleanup;
@@ -1736,7 +1736,7 @@ cleanup:
ldap_controls_free(searchctrlp);
}
ber_free( ber, 1 );
- LDAPDebug( LDAP_DEBUG_TRACE, "<= send_ldap_search_entry\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= send_ldap_search_entry\n", 0, 0,
0 );
return( rc );
}
@@ -1776,7 +1776,7 @@ flush_ber(
}
if ((conn->c_flags & CONN_FLAG_CLOSING) || slapi_op_abandoned(pb)) {
- LDAPDebug(LDAP_DEBUG_CONNS, "ber_flush skipped because the "
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG, "ber_flush skipped because the "
"connection was marked to be closed or abandoned\n", 0, 0, 0);
ber_free( ber, 1 );
/* One of the failure can be because the client has reset the connection ( closed )
@@ -1796,7 +1796,7 @@ flush_ber(
* and the status needs to be updated to reflect it */
op->o_status = SLAPI_OP_STATUS_ABANDONED;
- LDAPDebug( LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"ber_flush failed, error %d (%s)\n",
oserr, slapd_system_strerror( oserr ), 0 );
if (op->o_flags & OP_FLAG_PS) {
@@ -1811,7 +1811,7 @@ flush_ber(
ber_free( ber, 1 );
} else {
PRUint64 b;
- LDAPDebug( LDAP_DEBUG_BER,
+ LDAPDebug(LDAP_DEBUG_BER, LOG_DEBUG,
"flush_ber() wrote %u bytes to socket %d\n",
bytes, conn->c_sd, 0 );
LL_I2L ( b, bytes ) ;
@@ -2221,7 +2221,7 @@ encode_read_entry (Slapi_PBlock *pb, Slapi_Entry *e, char **attrs,
int alluserat
real_attrs_only = SLAPI_SEND_VATTR_FLAG_VIRTUALONLY;
} else {
/* we cannot service a request for virtual only and real only */
- LDAPDebug( LDAP_DEBUG_ANY,"encode_read_entry: Error, both real and
virtual attributes "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"encode_read_entry: Error, both real
and virtual attributes "
"only controls requested.\n", 0, 0, 0 );
rc = -1;
goto cleanup;
diff --git a/ldap/servers/slapd/sasl_io.c b/ldap/servers/slapd/sasl_io.c
index 12fec85..0748a63 100644
--- a/ldap/servers/slapd/sasl_io.c
+++ b/ldap/servers/slapd/sasl_io.c
@@ -80,7 +80,7 @@ debug_print_layers(PRFileDesc *fd)
LDAPDebug2Args( LDAP_DEBUG_CONNS,
"debug_print_layers: fd %d sasl_io_recv = %p\n",
PR_FileDesc2NativeHandle(fd), sasl_io_recv );
- LDAPDebug( LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"debug_print_layers: fd name %s type = %d recv = %p\n",
PR_GetNameForIdentity(fd->identity),
PR_GetDescType(fd),
@@ -197,7 +197,7 @@ sasl_io_start_packet(PRFileDesc *fd, PRIntn flags, PRIntervalTime
timeout, PRInt
debug_print_layers(fd);
/* first we need the length bytes */
ret = PR_Recv(fd->lower, buffer, amount, flags, timeout);
- LDAPDebug( LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_io_start_packet: read sasl packet length returned %d on connection
%" NSPRIu64 "\n",
ret, c->c_connid, 0 );
if (ret <= 0) {
@@ -207,7 +207,7 @@ sasl_io_start_packet(PRFileDesc *fd, PRIntn flags, PRIntervalTime
timeout, PRInt
"sasl_io_start_packet: connection closed while reading sasl
packet length on connection %" NSPRIu64 "\n",
c->c_connid );
} else {
- LDAPDebug( LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_io_start_packet: error reading sasl packet length on
connection %" NSPRIu64 " %d:%s\n",
c->c_connid, *err, slapd_pr_strerror(*err) );
}
@@ -303,7 +303,7 @@ sasl_io_start_packet(PRFileDesc *fd, PRIntn flags, PRIntervalTime
timeout, PRInt
PR_SetError(PR_WOULD_BLOCK_ERROR, errno);
return PR_FAILURE;
} else if (ret > 0) {
- LDAPDebug( LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"Continued: read sasl packet length returned %d on
connection %" NSPRIu64 "\n",
ret, c->c_connid, 0 );
if((ret + sp->encrypted_buffer_offset) >
sp->encrypted_buffer_size){
@@ -313,7 +313,7 @@ sasl_io_start_packet(PRFileDesc *fd, PRIntn flags, PRIntervalTime
timeout, PRInt
sp->encrypted_buffer_offset += ret;
} else if (ret < 0){
*err = PR_GetError();
- LDAPDebug( LDAP_DEBUG_CONNS, "sasl_io_start_packet: error reading
sasl packet length on connection "
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG, "sasl_io_start_packet: error
reading sasl packet length on connection "
"%" NSPRIu64 " %d:%s\n", c->c_connid,
*err, slapd_pr_strerror(*err) );
return ret;
}
@@ -440,7 +440,7 @@ sasl_io_read_packet(PRFileDesc *fd, PRIntn flags, PRIntervalTime
timeout, PRInt3
LDAPDebug1Arg( LDAP_DEBUG_CONNS,
"sasl_io_read_packet: connection closed while reading sasl
packet on connection %" NSPRIu64 "\n", c->c_connid );
} else {
- LDAPDebug( LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_io_read_packet: error reading sasl packet on connection
%" NSPRIu64 " %d:%s\n", c->c_connid, *err, slapd_pr_strerror(*err) );
}
return ret;
@@ -461,9 +461,9 @@ sasl_io_recv(PRFileDesc *fd, void *buf, PRInt32 len, PRIntn flags,
/* Do we have decrypted data buffered from 'before' ? */
bytes_in_buffer = sp->decrypted_buffer_count - sp->decrypted_buffer_offset;
- LDAPDebug( LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_io_recv for connection %" NSPRIu64 " len %d
bytes_in_buffer %d\n", c->c_connid, len, bytes_in_buffer );
- LDAPDebug( LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_io_recv for connection %" NSPRIu64 " len %d encrypted
buffer count %d\n", c->c_connid, len, sp->encrypted_buffer_count );
if (0 == bytes_in_buffer) {
/* If there wasn't buffered decrypted data, we need to get some... */
@@ -497,7 +497,7 @@ sasl_io_recv(PRFileDesc *fd, void *buf, PRInt32 len, PRIntn flags,
* when more data arrives
*/
if (!sasl_io_finished_packet(sp)) {
- LDAPDebug( LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_io_recv for connection %" NSPRIu64 " - not
finished reading packet yet\n", c->c_connid, 0, 0 );
#if defined(EWOULDBLOCK)
errno = EWOULDBLOCK;
@@ -551,7 +551,7 @@ sasl_io_recv(PRFileDesc *fd, void *buf, PRInt32 len, PRIntn flags,
"sasl_io_recv all decrypted data returned for connection
%" NSPRIu64 "\n", c->c_connid );
} else {
sp->decrypted_buffer_offset += bytes_to_return;
- LDAPDebug( LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_io_recv returning %d bytes to caller %d bytes left to
return for connection %" NSPRIu64 "\n",
bytes_to_return,
sp->decrypted_buffer_count - sp->decrypted_buffer_offset,
@@ -769,10 +769,10 @@ sasl_io_enable(Connection *c, void *data /* UNUSED */)
sp->conn = c;
rv = PR_PushIOLayer(c->c_prfd, PR_TOP_IO_LAYER, layer);
if (rv) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"sasl_io_enable: error enabling sasl io on connection %"
NSPRIu64 " %d:%s\n", c->c_connid, rv, slapd_pr_strerror(rv) );
} else {
- LDAPDebug( LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_io_enable: enabled sasl io on connection %"
NSPRIu64 " \n", c->c_connid, 0, 0 );
debug_print_layers(c->c_prfd);
}
@@ -790,7 +790,7 @@ sasl_io_cleanup(Connection *c, void *data /* UNUSED */)
{
int ret = 0;
- LDAPDebug( LDAP_DEBUG_CONNS,
+ LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
"sasl_io_cleanup for connection %" NSPRIu64 "\n",
c->c_connid, 0, 0 );
ret = sasl_pop_IO_layer(c->c_prfd, 0 /* do not close */);
diff --git a/ldap/servers/slapd/sasl_map.c b/ldap/servers/slapd/sasl_map.c
index 7cc07ca..6b67e1d 100644
--- a/ldap/servers/slapd/sasl_map.c
+++ b/ldap/servers/slapd/sasl_map.c
@@ -367,10 +367,10 @@ sasl_map_config_parse_entry(Slapi_Entry *entry, sasl_map_data
**new_dp)
desc.bv_len = strlen(desc.bv_val);
newval[0] = &desc;
if (entry_replace_values(entry, "nsSaslMapPriority", newval) != 0){
- LDAPDebug( LDAP_DEBUG_ANY, "sasl_map_config_parse_entry: failed to reset entry
"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "sasl_map_config_parse_entry: failed to reset
entry "
"priority to (%d) - previous value (%s)\n", LOW_PRIORITY, priority_str,
0);
} else {
- LDAPDebug( LDAP_DEBUG_ANY, "sasl_map_config_parse_entry: resetting invalid
nsSaslMapPriority "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "sasl_map_config_parse_entry: resetting
invalid nsSaslMapPriority "
" value (%s) to the lowest priority (%d)\n",
priority_str, LOW_PRIORITY, 0);
}
@@ -402,34 +402,34 @@ sasl_map_read_config_startup(sasl_map_private *priv)
char **map_entry_list = NULL;
int ret = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "-> sasl_map_read_config_startup\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-> sasl_map_read_config_startup\n",
0, 0, 0 );
if((map_entry_list = getChildren(configDN))) {
char **map_entry = NULL;
Slapi_Entry *entry = NULL;
sasl_map_data *dp = NULL;
for (map_entry = map_entry_list; *map_entry && !ret; map_entry++) {
- LDAPDebug( LDAP_DEBUG_CONFIG, "sasl_map_read_config_startup - proceesing
[%s]\n", *map_entry, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_CONFIG, LOG_DEBUG, "sasl_map_read_config_startup -
proceesing [%s]\n", *map_entry, 0, 0 );
getConfigEntry( *map_entry, &entry );
if ( entry == NULL ) {
continue;
}
ret = sasl_map_config_parse_entry(entry,&dp);
if (ret) {
- LDAPDebug( LDAP_DEBUG_ANY, "sasl_map_read_config_startup failed to parse
entry\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "sasl_map_read_config_startup failed to
parse entry\n", 0, 0, 0 );
} else {
ret = sasl_map_insert_list_entry(priv,dp);
if (ret) {
- LDAPDebug( LDAP_DEBUG_ANY, "sasl_map_read_config_startup failed to insert
entry\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "sasl_map_read_config_startup failed to
insert entry\n", 0, 0, 0 );
} else {
- LDAPDebug( LDAP_DEBUG_CONFIG, "sasl_map_read_config_startup - processed
[%s]\n", *map_entry, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_CONFIG, LOG_DEBUG, "sasl_map_read_config_startup -
processed [%s]\n", *map_entry, 0, 0 );
}
}
freeConfigEntry( &entry );
}
freeChildren( map_entry_list );
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<- sasl_map_read_config_startup\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<- sasl_map_read_config_startup\n",
0, 0, 0 );
return ret;
}
@@ -439,7 +439,7 @@ sasl_map_config_add(Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry* e,
int ret = 0;
sasl_map_data *dp = NULL;
sasl_map_private *priv = sasl_map_get_global_priv();
- LDAPDebug( LDAP_DEBUG_TRACE, "-> sasl_map_config_add\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-> sasl_map_config_add\n", 0, 0, 0
);
ret = sasl_map_config_parse_entry(entryBefore,&dp);
if (!ret && dp) {
ret = sasl_map_insert_list_entry(priv,dp);
@@ -451,7 +451,7 @@ sasl_map_config_add(Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry* e,
*returncode = LDAP_UNWILLING_TO_PERFORM;
ret = SLAPI_DSE_CALLBACK_ERROR;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<- sasl_map_config_add\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<- sasl_map_config_add\n", 0, 0, 0
);
return ret;
}
@@ -464,7 +464,7 @@ sasl_map_config_modify(Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry*
int ret = SLAPI_DSE_CALLBACK_ERROR;
if((map_name = slapi_entry_attr_get_charptr( entryBefore, "cn" )) == NULL){
- LDAPDebug( LDAP_DEBUG_TRACE, "sasl_map_config_modify: could not find name of
map\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl_map_config_modify: could not find
name of map\n",0,0,0);
return ret;
}
if(sasl_map_remove_list_entry(priv, map_name) == 0){
@@ -477,7 +477,7 @@ sasl_map_config_modify(Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry*
}
}
if(ret == SLAPI_DSE_CALLBACK_ERROR){
- LDAPDebug( LDAP_DEBUG_TRACE, "sasl_map_config_modify: failed to update
map(%s)\n",map_name,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl_map_config_modify: failed to update
map(%s)\n",map_name,0,0);
}
slapi_ch_free_string(&map_name);
@@ -491,7 +491,7 @@ sasl_map_config_delete(Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry*
sasl_map_private *priv = sasl_map_get_global_priv();
char *entry_name = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "-> sasl_map_config_delete\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-> sasl_map_config_delete\n", 0, 0,
0 );
entry_name = slapi_entry_attr_get_charptr( entryBefore, "cn" );
if (entry_name) {
/* remove this entry from the list */
@@ -505,7 +505,7 @@ sasl_map_config_delete(Slapi_PBlock *pb, Slapi_Entry* entryBefore,
Slapi_Entry*
} else {
ret = SLAPI_DSE_CALLBACK_OK;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<- sasl_map_config_delete\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<- sasl_map_config_delete\n", 0, 0,
0 );
return ret;
}
@@ -561,17 +561,17 @@ sasl_map_check(sasl_map_data *dp, char *sasl_user_and_realm, char
**ldap_search_
int matched = 0;
const char *recomp_result = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "-> sasl_map_check\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-> sasl_map_check\n", 0, 0, 0 );
/* Compiles the regex */
re = slapi_re_comp(dp->regular_expression, &recomp_result);
if (NULL == re) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"sasl_map_check: slapi_re_comp failed for expression (%s): %s\n",
dp->regular_expression, recomp_result?recomp_result:"unknown", 0 );
} else {
/* Matches the compiled regex against sasl_user_and_realm */
matched = slapi_re_exec(re, sasl_user_and_realm, -1 /* no timelimit */);
- LDAPDebug( LDAP_DEBUG_TRACE, "regex: %s, id: %s, %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "regex: %s, id: %s, %s\n",
dp->regular_expression, sasl_user_and_realm,
matched ? "matched" : "didn't match" );
}
@@ -598,7 +598,7 @@ sasl_map_check(sasl_map_data *dp, char *sasl_user_and_realm, char
**ldap_search_
rc = slapi_re_subs(re, sasl_user_and_realm, dp->template_base_dn,
ldap_search_base, ldap_search_base_len);
if (0 != rc) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"sasl_map_check: slapi_re_subs failed: "
"subject: %s, subst str: %s (%d)\n",
sasl_user_and_realm, dp->template_base_dn, rc);
@@ -610,7 +610,7 @@ sasl_map_check(sasl_map_data *dp, char *sasl_user_and_realm, char
**ldap_search_
dp->template_search_filter, ldap_search_filter,
ldap_search_filter_len, 1);
if (0 != rc) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"sasl_map_check: slapi_re_subs failed: "
"subject: %s, subst str: %s (%d)\n",
sasl_user_and_realm, dp->template_search_filter, rc);
@@ -619,7 +619,7 @@ sasl_map_check(sasl_map_data *dp, char *sasl_user_and_realm, char
**ldap_search_
} else {
/* these values are internal regex representations with
* lots of unprintable control chars - escape for logging */
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"mapped base dn: %s, filter: %s\n",
escape_string( *ldap_search_base, escape_base ),
escape_string( *ldap_search_filter, escape_filt ), 0 );
@@ -627,14 +627,14 @@ sasl_map_check(sasl_map_data *dp, char *sasl_user_and_realm, char
**ldap_search_
}
}
} else {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"sasl_map_check: slapi_re_exec failed: "
"regex: %s, subject: %s (%d)\n",
dp->regular_expression, sasl_user_and_realm, matched);
}
}
slapi_re_free(re);
- LDAPDebug( LDAP_DEBUG_TRACE, "<- sasl_map_check\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<- sasl_map_check\n", 0, 0, 0 );
return ret;
}
@@ -660,9 +660,9 @@ sasl_map_domap(sasl_map_data **map, char *sasl_user, char *sasl_realm,
char **ld
char *sasl_user_and_realm = NULL;
int ret = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "-> sasl_map_domap\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-> sasl_map_domap\n", 0, 0, 0 );
if(map == NULL){
- LDAPDebug( LDAP_DEBUG_TRACE, "<- sasl_map_domap: Internal error, mapping is
NULL\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<- sasl_map_domap: Internal error,
mapping is NULL\n",0,0,0);
return ret;
}
*ldap_search_base = NULL;
@@ -673,7 +673,7 @@ sasl_map_domap(sasl_map_data **map, char *sasl_user, char *sasl_realm,
char **ld
*map = priv->map_data_list;
while (*map) {
/* If one matches, then make the search params */
- LDAPDebug( LDAP_DEBUG_TRACE, "sasl_map_domap - trying map [%s]\n",
(*map)->name, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl_map_domap - trying map [%s]\n",
(*map)->name, 0, 0 );
if((ret = sasl_map_check(*map, sasl_user_and_realm, ldap_search_base,
ldap_search_filter))){
*map = sasl_map_next(*map);
break;
@@ -683,7 +683,7 @@ sasl_map_domap(sasl_map_data **map, char *sasl_user, char *sasl_realm,
char **ld
if (sasl_user_and_realm) {
slapi_ch_free((void**)&sasl_user_and_realm);
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<- sasl_map_domap (%s)\n", (1 == ret) ?
"mapped" : "not mapped", 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<- sasl_map_domap (%s)\n", (1 ==
ret) ? "mapped" : "not mapped", 0, 0 );
return ret;
}
diff --git a/ldap/servers/slapd/saslbind.c b/ldap/servers/slapd/saslbind.c
index 0914b97..c84fafc 100644
--- a/ldap/servers/slapd/saslbind.c
+++ b/ldap/servers/slapd/saslbind.c
@@ -150,7 +150,7 @@ static int ids_sasl_getopt(
{
unsigned tmplen;
- LDAPDebug(LDAP_DEBUG_TRACE, "ids_sasl_getopt: plugin=%s option=%s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ids_sasl_getopt: plugin=%s
option=%s\n",
plugin_name ? plugin_name : "", option, 0);
if (len == NULL) len = &tmplen;
@@ -195,7 +195,7 @@ static int ids_sasl_log(
case SASL_LOG_TRACE: /* traces of internal protocols */
case SASL_LOG_PASS: /* traces of internal protocols, including
* passwords */
- LDAPDebug(LDAP_DEBUG_TRACE, "sasl(%d): %s\n", level, message, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl(%d): %s\n", level,
message, 0);
break;
case SASL_LOG_NONE: /* don't log anything */
@@ -220,12 +220,12 @@ static void ids_sasl_user_search(
Slapi_PBlock *pb = NULL;
int i, ret;
- LDAPDebug(LDAP_DEBUG_TRACE, "sasl user search basedn=\"%s\"
filter=\"%s\"\n", basedn, filter, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl user search basedn=\"%s\"
filter=\"%s\"\n", basedn, filter, 0);
/* TODO: set size and time limits */
pb = slapi_pblock_new();
if (!pb) {
- LDAPDebug(LDAP_DEBUG_TRACE, "null pblock for search_internal_pb\n", 0,
0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "null pblock for
search_internal_pb\n", 0, 0, 0);
goto out;
}
@@ -236,7 +236,7 @@ static void ids_sasl_user_search(
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &ret);
if (ret != LDAP_SUCCESS) {
- LDAPDebug(LDAP_DEBUG_TRACE, "sasl user search failed basedn=\"%s\"
"
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl user search failed
basedn=\"%s\" "
"filter=\"%s\": %s\n",
basedn, filter, ldap_err2string(ret));
goto out;
@@ -244,7 +244,7 @@ static void ids_sasl_user_search(
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries);
if ((entries == NULL) || (entries[0] == NULL)) {
- LDAPDebug(LDAP_DEBUG_TRACE, "sasl user search found no entries\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl user search found no
entries\n",
0, 0, 0);
goto out;
}
@@ -255,7 +255,7 @@ static void ids_sasl_user_search(
slapi_entry_free(*ep);
}
*ep = slapi_entry_dup(entries[i]);
- LDAPDebug(LDAP_DEBUG_TRACE, "sasl user search found dn=%s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl user search found
dn=%s\n",
slapi_entry_get_dn(*ep), 0, 0);
}
@@ -292,11 +292,11 @@ static Slapi_Entry *ids_sasl_user_to_entry(
/* Check for wildcards in the authid and realm. If we encounter one,
* just fail the mapping without performing a costly internal search. */
if (user && strchr(user, '*')) {
- LDAPDebug(LDAP_DEBUG_TRACE, "sasl user search encountered a wildcard in
"
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl user search encountered a
wildcard in "
"the authid. Not attempting to map to entry. (authid=%s)\n", user,
0, 0);
return NULL;
} else if (user_realm && strchr(user_realm, '*')) {
- LDAPDebug(LDAP_DEBUG_TRACE, "sasl user search encountered a wildcard in
"
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl user search encountered a
wildcard in "
"the realm. Not attempting to map to entry. (realm=%s)\n",
user_realm, 0, 0);
return NULL;
}
@@ -310,13 +310,13 @@ static Slapi_Entry *ids_sasl_user_to_entry(
ctrls, attrs, attrsonly,
&entry, &found);
if (found == 1) {
- LDAPDebug(LDAP_DEBUG_TRACE, "sasl user search found this entry:
dn:%s, "
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl user search found this
entry: dn:%s, "
"matching filter=%s\n", entry->e_sdn.dn, filter, 0);
} else if (found == 0) {
- LDAPDebug(LDAP_DEBUG_TRACE, "sasl user search found no entries
matching "
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl user search found no
entries matching "
"filter=%s\n", filter, 0, 0);
} else {
- LDAPDebug(LDAP_DEBUG_TRACE, "sasl user search found more than one
entry "
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl user search found more
than one entry "
"matching filter=%s\n", filter, 0, 0);
if (entry) {
slapi_entry_free(entry);
@@ -378,7 +378,7 @@ static int ids_sasl_canon_user(
if (user == NULL) {
goto fail;
}
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"ids_sasl_canon_user(user=%s, realm=%s)\n",
user, user_realm ? user_realm : "", 0);
@@ -425,11 +425,11 @@ static int ids_sasl_canon_user(
* property determines what the bind identity will be if authentication succeeds. */
if (strcasecmp(mech, "ANONYMOUS") == 0) {
if (prop_set(propctx, "dn", "", -1) != 0) {
- LDAPDebug(LDAP_DEBUG_TRACE, "prop_set(dn) failed\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "prop_set(dn) failed\n", 0,
0, 0);
goto fail;
}
} else if (prop_set(propctx, "dn", dn, -1) != 0) {
- LDAPDebug(LDAP_DEBUG_TRACE, "prop_set(dn) failed\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "prop_set(dn) failed\n", 0, 0,
0);
goto fail;
}
@@ -442,7 +442,7 @@ static int ids_sasl_canon_user(
* Any SASL mechanism that actually needs the
* password is going to fail. We should print a warning
* to aid in troubleshooting. */
- LDAPDebug(LDAP_DEBUG_TRACE, "Warning: Detected a sasl bind attempt by an
"
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "Warning: Detected a sasl bind
attempt by an "
"entry whose password is stored in a non-cleartext format.
This "
"will not work for mechanisms which require a cleartext
password "
"such as DIGEST-MD5 and CRAM-MD5.\n", 0, 0, 0);
@@ -463,13 +463,13 @@ static int ids_sasl_canon_user(
#ifdef SASL_AUX_PASSWORD_PROP
if (prop_set(propctx, SASL_AUX_PASSWORD_PROP, clear, -1) != 0) {
/* Failure is benign here because some mechanisms don't support this
property */
- /*LDAPDebug(LDAP_DEBUG_TRACE, "prop_set(userpassword) failed\n", 0,
0, 0);
+ /*LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "prop_set(userpassword)
failed\n", 0, 0, 0);
goto fail */ ;
}
#endif /* SASL_AUX_PASSWORD_PROP */
if (prop_set(propctx, SASL_AUX_PASSWORD, clear, -1) != 0) {
/* Failure is benign here because some mechanisms don't support this
property */
- /*LDAPDebug(LDAP_DEBUG_TRACE, "prop_set(userpassword) failed\n", 0,
0, 0);
+ /*LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "prop_set(userpassword)
failed\n", 0, 0, 0);
goto fail */ ;
}
}
@@ -544,7 +544,7 @@ int ids_sasl_init(void)
static int inited = 0;
int result;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> ids_sasl_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ids_sasl_init\n", 0, 0, 0 );
PR_ASSERT(inited == 0);
if (inited != 0) {
@@ -554,7 +554,7 @@ int ids_sasl_init(void)
serverfqdn = get_localhost_DNS();
- LDAPDebug(LDAP_DEBUG_TRACE, "sasl service fqdn is: %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl service fqdn is: %s\n",
serverfqdn, 0, 0);
/* get component ID for internal operations */
@@ -577,14 +577,14 @@ int ids_sasl_init(void)
result = sasl_server_init(ids_sasl_callbacks, "iDS");
if (result != SASL_OK) {
- LDAPDebug(LDAP_DEBUG_TRACE, "failed to initialize sasl library\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "failed to initialize sasl
library\n",
0, 0, 0);
return result;
}
result = sasl_auxprop_add_plugin("iDS", ids_auxprop_plug_init);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= ids_sasl_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ids_sasl_init\n", 0, 0, 0 );
return result;
}
@@ -599,7 +599,7 @@ void ids_sasl_server_new(Connection *conn)
struct propctx *propctx;
sasl_security_properties_t secprops = {0};
- LDAPDebug( LDAP_DEBUG_TRACE, "=> ids_sasl_server_new (%s)\n",
serverfqdn, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ids_sasl_server_new (%s)\n",
serverfqdn, 0, 0 );
rc = sasl_server_new("ldap",
serverfqdn,
@@ -611,7 +611,7 @@ void ids_sasl_server_new(Connection *conn)
&sasl_conn);
if (rc != SASL_OK) {
- LDAPDebug(LDAP_DEBUG_ANY, "sasl_server_new: %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "sasl_server_new: %s\n",
sasl_errstring(rc, NULL, NULL), 0, 0);
}
@@ -634,14 +634,14 @@ void ids_sasl_server_new(Connection *conn)
rc = sasl_setprop(sasl_conn, SASL_SEC_PROPS, &secprops);
if (rc != SASL_OK) {
- LDAPDebug(LDAP_DEBUG_ANY, "sasl_setprop: %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "sasl_setprop: %s\n",
sasl_errstring(rc, NULL, NULL), 0, 0);
}
conn->c_sasl_conn = sasl_conn;
conn->c_sasl_ssf = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "<= ids_sasl_server_new\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ids_sasl_server_new\n", 0, 0,
0 );
return;
}
@@ -657,7 +657,7 @@ char **ids_sasl_listmech(Slapi_PBlock *pb)
char *dupstr;
sasl_conn_t *sasl_conn;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> ids_sasl_listmech\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ids_sasl_listmech\n", 0, 0, 0
);
PR_ASSERT(pb);
@@ -675,7 +675,7 @@ char **ids_sasl_listmech(Slapi_PBlock *pb)
NULL, /* username */
"", ",", "",
&str, NULL, NULL) == SASL_OK) {
- LDAPDebug(LDAP_DEBUG_TRACE, "sasl library mechs: %s\n", str, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl library mechs: %s\n", str,
0, 0);
/* merge into result set */
dupstr = slapi_ch_strdup(str);
others = slapi_str2charray_ext(dupstr, ",", 0 /* don't list
duplicate mechanisms */);
@@ -685,7 +685,7 @@ char **ids_sasl_listmech(Slapi_PBlock *pb)
}
PR_ExitMonitor(pb->pb_conn->c_mutex);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= ids_sasl_listmech\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ids_sasl_listmech\n", 0, 0, 0
);
return ret;
}
@@ -705,7 +705,7 @@ ids_sasl_mech_supported(Slapi_PBlock *pb, const char *mech)
int sasl_result = 0;
sasl_conn_t *sasl_conn = (sasl_conn_t *)pb->pb_conn->c_sasl_conn;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> ids_sasl_mech_supported\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ids_sasl_mech_supported\n", 0,
0, 0 );
/* sasl_listmech is not thread-safe - caller must lock pb_conn */
@@ -730,7 +730,7 @@ ids_sasl_mech_supported(Slapi_PBlock *pb, const char *mech)
charray_free(mechs);
slapi_ch_free((void**)&dupstr);
- LDAPDebug( LDAP_DEBUG_TRACE, "<= ids_sasl_mech_supported\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ids_sasl_mech_supported\n", 0,
0, 0 );
return ret;
}
@@ -760,7 +760,7 @@ void ids_sasl_check_bind(Slapi_PBlock *pb)
Slapi_Entry *bind_target_entry = NULL, *referral = NULL;
Slapi_Backend *be = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "=> ids_sasl_check_bind\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ids_sasl_check_bind\n", 0, 0,
0 );
PR_ASSERT(pb);
PR_ASSERT(pb->pb_conn);
@@ -810,11 +810,11 @@ void ids_sasl_check_bind(Slapi_PBlock *pb)
*/
sasl_getprop(sasl_conn, SASL_MECHNAME, (const void**)&activemech);
if (activemech == NULL) {
- LDAPDebug(LDAP_DEBUG_TRACE, "could not get active sasl
mechanism\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "could not get active sasl
mechanism\n", 0, 0, 0);
goto sasl_start;
}
if (strcasecmp(activemech, mech) != 0) {
- LDAPDebug(LDAP_DEBUG_TRACE, "sasl mechanisms differ: active=%s
current=%s\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl mechanisms differ:
active=%s current=%s\n", 0, 0, 0);
goto sasl_start;
}
@@ -874,7 +874,7 @@ sasl_check_result:
break;
}
- LDAPDebug(LDAP_DEBUG_TRACE, "sasl authenticated mech=%s user=%s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl authenticated mech=%s
user=%s\n",
mech, username, 0);
/*
@@ -906,7 +906,7 @@ sasl_check_result:
if ((sasl_getprop(sasl_conn, SASL_SSF,
(const void**)&ssfp) == SASL_OK) && (*ssfp > 0))
{
- LDAPDebug(LDAP_DEBUG_TRACE, "sasl ssf=%u\n", (unsigned)*ssfp, 0,
0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl ssf=%u\n",
(unsigned)*ssfp, 0, 0);
} else {
*ssfp = 0;
}
@@ -961,7 +961,7 @@ sasl_check_result:
if (slapi_mapping_tree_select(pb, &be, &referral, NULL, 0) !=
LDAP_SUCCESS) {
send_nobackend_ldap_result( pb );
be = NULL;
- LDAPDebug( LDAP_DEBUG_TRACE, "<= ids_sasl_check_bind\n", 0, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<=
ids_sasl_check_bind\n", 0, 0, 0 );
return;
}
@@ -1064,7 +1064,7 @@ sasl_check_result:
if (bind_target_entry)
slapi_entry_free(bind_target_entry);
- LDAPDebug( LDAP_DEBUG_TRACE, "=> ids_sasl_check_bind\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ids_sasl_check_bind\n", 0, 0,
0 );
return;
}
diff --git a/ldap/servers/slapd/schema.c b/ldap/servers/slapd/schema.c
index 32a2bd6..8421244 100644
--- a/ldap/servers/slapd/schema.c
+++ b/ldap/servers/slapd/schema.c
@@ -745,7 +745,7 @@ slapi_entry_schema_check_ext( Slapi_PBlock *pb, Slapi_Entry *e, int
repl_check )
/* find the object class attribute - could error out here */
if ( (aoc = attrlist_find( e->e_attrs, "objectclass" )) == NULL ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Entry \"%s\" required attribute \"objectclass\"
missing\n",
slapi_entry_get_dn_const(e), 0, 0 );
if (pb) {
@@ -782,7 +782,7 @@ slapi_entry_schema_check_ext( Slapi_PBlock *pb, Slapi_Entry *e, int
repl_check )
ocname = slapi_value_get_string(v);
if ( !ocname ) {
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Entry \"%s\" \"objectclass\" value missing\n",
slapi_entry_get_dn_const(e), 0, 0 );
if (pb) {
@@ -820,7 +820,7 @@ slapi_entry_schema_check_ext( Slapi_PBlock *pb, Slapi_Entry *e, int
repl_check )
}
}
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Entry \"%s\" has unknown object class \"%s\"%s\n",
slapi_entry_get_dn_const(e),
escape_string(ocname, ebuf), extra_msg );
@@ -883,7 +883,7 @@ slapi_entry_schema_check_ext( Slapi_PBlock *pb, Slapi_Entry *e, int
repl_check )
if ( slapi_attr_flag_is_set( a, SLAPI_ATTR_FLAG_SINGLE ) ) {
if (slapi_valueset_count(&a->a_present_values) > 1)
{
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Entry \"%s\" single-valued attribute \"%s\" has
multiple values\n",
slapi_entry_get_dn_const(e),
a->a_type, 0 );
@@ -937,7 +937,7 @@ oc_check_required( Slapi_PBlock *pb, Slapi_Entry *e, struct objclass
*oc )
/* not there => schema violation */
if ( a == NULL ) {
char errtext[ BUFSIZ ];
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Entry \"%s\" missing attribute \"%s\"
required"
" by object class \"%s\"\n",
slapi_entry_get_dn_const(e),
@@ -1008,7 +1008,7 @@ oc_check_allowed_sv(Slapi_PBlock *pb, Slapi_Entry *e, const char
*type, struct o
if ( 0 != rc ) {
char errtext[ BUFSIZ ];
char ebuf[ BUFSIZ ];
- LDAPDebug( LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Entry \"%s\" -- attribute \"%s\" not allowed\n",
slapi_entry_get_dn_const(e),
escape_string( type, ebuf ),
@@ -1558,7 +1558,7 @@ schema_attr_enum_callback(struct asyntaxinfo *asip, void *arg)
vals[0] = &val;
if (!asip) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Error: no attribute types in schema_attr_enum_callback\n",
0, 0, 0);
return ATTR_SYNTAX_ENUM_NEXT;
@@ -1719,7 +1719,7 @@ schema_syntax_enum_callback(char **names, Slapi_PluginDesc
*plugindesc,
}
if ( oid == NULL ) { /* must have an OID */
- LDAPDebug(LDAP_DEBUG_ANY, "Error: no OID found in"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: no OID found in"
" schema_syntax_enum_callback for syntax %s\n",
( names == NULL ) ? "unknown" : names[0], 0, 0);
return 1;
@@ -1781,7 +1781,7 @@ schema_list_attributes_callback(struct asyntaxinfo *asi, void *arg)
struct listargs *aew = (struct listargs *)arg;
if (!asi) {
- LDAPDebug(LDAP_DEBUG_ANY, "Error: no attribute types in
schema_list_attributes_callback\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: no attribute types in
schema_list_attributes_callback\n",
0, 0, 0);
return ATTR_SYNTAX_ENUM_NEXT;
}
@@ -2941,7 +2941,7 @@ schema_replace_attributes ( Slapi_PBlock *pb, LDAPMod *mod, char
*errorbuf,
if ( NULL == ( oldasip =
attr_syntax_get_by_oid( newasip->asi_oid, 0 ))) {
/* new attribute type */
- LDAPDebug( LDAP_DEBUG_TRACE, "schema_replace_attributes:"
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "schema_replace_attributes:"
" new type %s (OID %s)\n",
newasip->asi_name, newasip->asi_oid, 0 );
} else {
@@ -2953,7 +2953,7 @@ schema_replace_attributes ( Slapi_PBlock *pb, LDAPMod *mod, char
*errorbuf,
newasip = NULL;
} else {
/* modified attribute type */
- LDAPDebug( LDAP_DEBUG_TRACE, "schema_replace_attributes:"
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "schema_replace_attributes:"
" replacing type %s (OID %s)\n",
newasip->asi_name, newasip->asi_oid, 0 );
/* flag for deletion */
@@ -3115,7 +3115,7 @@ schema_replace_objectclasses ( Slapi_PBlock *pb, LDAPMod *mod, char
*errorbuf,
} else {
/* some differences: discard old and keep the new one */
oc_free( &tmpocp );
- LDAPDebug( LDAP_DEBUG_TRACE, "schema_replace_objectclasses:"
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "schema_replace_objectclasses:"
" replacing object class %s (OID %s)\n",
newocp->oc_name, newocp->oc_oid, 0 );
addocp = newocp;
@@ -3127,7 +3127,7 @@ schema_replace_objectclasses ( Slapi_PBlock *pb, LDAPMod *mod, char
*errorbuf,
}
if ( NULL == addocp ) {
- LDAPDebug( LDAP_DEBUG_TRACE, "schema_replace_objectclasses:"
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "schema_replace_objectclasses:"
" new object class %s (OID %s)\n",
newocp->oc_name, newocp->oc_oid, 0 );
addocp = newocp;
@@ -3382,7 +3382,7 @@ read_oc_ldif ( const char *input, struct objclass **oc, char
*errorbuf,
schema_create_errormsg( errorbuf, errorbufsize, schema_errprefix_oc, NULL,
"One or more values are required for the objectClasses attribute" );
- LDAPDebug ( LDAP_DEBUG_ANY, "NULL args passed to read_oc_ldif\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "NULL args passed to
read_oc_ldif\n",0,0,0);
return read_oc_ldif_return( LDAP_OPERATIONS_ERROR, pOcOid, psbOcName,
pOcSup, pOcDesc );
}
@@ -3921,7 +3921,7 @@ read_at_ldif(const char *input, struct asyntaxinfo **asipp, char
*errorbuf,
asi_parent = attr_syntax_get_by_name(pSuperior, schema_flags);
/* if we find no match then server won't start or add the attribute type */
if (asi_parent == NULL) {
- LDAPDebug (LDAP_DEBUG_PARSE,
+ LDAPDebug(LDAP_DEBUG_PARSE, LOG_DEBUG,
"Cannot find parent attribute type
\"%s\"\n",pSuperior,
NULL,NULL);
schema_create_errormsg( errorbuf, errorbufsize,
@@ -3936,7 +3936,7 @@ read_at_ldif(const char *input, struct asyntaxinfo **asipp, char
*errorbuf,
if (pso && (NULL == pSyntax)) {
pSyntax = slapi_ch_strdup(pso);
- LDAPDebug (LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"Inheriting syntax %s from parent type %s\n",
pSyntax, pSuperior,NULL);
} else if (NULL == pSyntax) {
@@ -4171,7 +4171,7 @@ parse_attr_str(const char *input, struct asyntaxinfo **asipp, char
*errorbuf,
if(input == NULL || '\0' == input[0]){
schema_create_errormsg( errorbuf, errorbufsize, schema_errprefix_at, NULL,
"One or more values are required for the attributeTypes attribute"
);
- LDAPDebug ( LDAP_DEBUG_ANY, "NULL args passed to
parse_attr_str\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "NULL args passed to
parse_attr_str\n",0,0,0);
return invalid_syntax_error;
}
/*
@@ -4243,7 +4243,7 @@ parse_attr_str(const char *input, struct asyntaxinfo **asipp, char
*errorbuf,
asi_parent = attr_syntax_get_by_name(atype->at_sup_oid, schema_flags);
/* if we find no match then server won't start or add the attribute type */
if (asi_parent == NULL) {
- LDAPDebug (LDAP_DEBUG_ANY, "Cannot find parent attribute type
\"%s\"\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Cannot find parent attribute type
\"%s\"\n",
atype->at_sup_oid, NULL, NULL);
schema_create_errormsg( errorbuf, errorbufsize, schema_errprefix_at,
first_attr_name,
"Missing parent attribute syntax OID");
@@ -4261,7 +4261,7 @@ parse_attr_str(const char *input, struct asyntaxinfo **asipp, char
*errorbuf,
if (pso && (NULL == atype->at_syntax_oid)) {
atype->at_syntax_oid = slapi_ch_strdup(pso);
- LDAPDebug (LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"Inheriting syntax %s from parent type %s\n",
atype->at_syntax_oid, atype->at_sup_oid,NULL);
} else if (NULL == atype->at_syntax_oid) {
@@ -4550,7 +4550,7 @@ parse_objclass_str ( const char *input, struct objclass **oc, char
*errorbuf,
if ( NULL == input || '\0' == input[0] ) {
schema_create_errormsg( errorbuf, errorbufsize, schema_errprefix_oc, NULL,
"One or more values are required for the objectClasses attribute"
);
- LDAPDebug ( LDAP_DEBUG_ANY, "NULL args passed to
read_oc_ldif\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "NULL args passed to
read_oc_ldif\n",0,0,0);
return LDAP_OPERATIONS_ERROR;
}
/*
@@ -4795,7 +4795,7 @@ schema_check_oc_attrs ( struct objclass *poc,
if ( errorbuf == NULL || poc == NULL || poc->oc_name == NULL) {
/* error */
- LDAPDebug (LDAP_DEBUG_PARSE,
+ LDAPDebug(LDAP_DEBUG_PARSE, LOG_DEBUG,
"Null args passed to schema_check_oc_attrs\n",
NULL, NULL, NULL);
return -1;
@@ -4929,7 +4929,7 @@ schema_check_oid( const char *name, const char *oid, PRBool
isAttribute,
if ( name == NULL || oid == NULL) {
/* this is bad */
- LDAPDebug (LDAP_DEBUG_ANY, "NULL passed to schema_check_oid\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "NULL passed to
schema_check_oid\n",0,0,0);
return 0;
}
@@ -5062,7 +5062,7 @@ strip_oc_options( struct objclass *poc ) {
for ( i = 0; poc->oc_allowed && poc->oc_allowed[i]; i++ ) {
if ( (mod = stripOption( poc->oc_allowed[i] )) != NULL ){
- LDAPDebug (LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Removed option \"%s\" from allowed attribute type "
"\"%s\" in object class \"%s\".\n",
mod, poc->oc_allowed[i], poc->oc_name );
@@ -5072,7 +5072,7 @@ strip_oc_options( struct objclass *poc ) {
for ( i = 0; poc->oc_required && poc->oc_required[i]; i++ ) {
if ( (mod = stripOption( poc->oc_required[i] )) != NULL ){
- LDAPDebug (LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Removed option \"%s\" from required attribute type "
"\"%s\" in object class \"%s\".\n",
mod, poc->oc_required[i], poc->oc_name );
@@ -5476,7 +5476,7 @@ parse_xstring_list( const char *schema_value, const char *name,
size_t namelen,
/* for debugging
if ( xvals == NULL || xvals[0] == NULL ) {
- LDAPDebug( LDAP_DEBUG_ANY, "no xstring values for xstring (%s) in (%s)\n",
name, schema_value, 0 );
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "no xstring values for xstring (%s) in
(%s)\n", name, schema_value, 0 );
}
*/
@@ -6040,7 +6040,7 @@ va_expand_one_oc( const char *dn, const Slapi_Attr *a,
Slapi_ValueSet *vs, const
slapi_valueset_add_attr_value_ext(a, vs, slapi_value_new_string(sup_oc->oc_name),
SLAPI_VALUE_FLAG_PASSIN);
- LDAPDebug( LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"Entry \"%s\": added missing objectClass value %s\n",
dn, sup_oc->oc_name, 0 );
}
diff --git a/ldap/servers/slapd/schemaparse.c b/ldap/servers/slapd/schemaparse.c
index 276e0d0..b0968ea 100644
--- a/ldap/servers/slapd/schemaparse.c
+++ b/ldap/servers/slapd/schemaparse.c
@@ -206,7 +206,7 @@ normalize_oc( void )
oc_lock_write();
for ( oc = g_get_global_oc_nolock(); oc != NULL; oc = oc->oc_next ) {
- LDAPDebug (LDAP_DEBUG_PARSE,
+ LDAPDebug(LDAP_DEBUG_PARSE, LOG_DEBUG,
"normalize_oc: normalizing '%s'\n", oc->oc_name, 0, 0);
/* required attributes */
normalize_list( oc->oc_required );
@@ -226,7 +226,7 @@ normalize_oc_nolock( void )
struct objclass *oc;
for ( oc = g_get_global_oc_nolock(); oc != NULL; oc = oc->oc_next ) {
- LDAPDebug (LDAP_DEBUG_PARSE,
+ LDAPDebug(LDAP_DEBUG_PARSE, LOG_DEBUG,
"normalize_oc: normalizing '%s'\n", oc->oc_name, 0, 0);
/* required attributes */
normalize_list( oc->oc_required );
diff --git a/ldap/servers/slapd/search.c b/ldap/servers/slapd/search.c
index aca335e..afd5d09 100644
--- a/ldap/servers/slapd/search.c
+++ b/ldap/servers/slapd/search.c
@@ -55,7 +55,7 @@ do_search( Slapi_PBlock *pb )
int minssf_exclude_rootdse = 0;
int filter_normalized = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "do_search\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "do_search\n", 0, 0, 0 );
slapi_pblock_get( pb, SLAPI_OPERATION, &operation);
ber = operation->o_ber;
diff --git a/ldap/servers/slapd/snmp_collator.c b/ldap/servers/slapd/snmp_collator.c
index 1111a0e..98cae86 100644
--- a/ldap/servers/slapd/snmp_collator.c
+++ b/ldap/servers/slapd/snmp_collator.c
@@ -457,20 +457,20 @@ snmp_collator_create_semaphore(void)
/* It appears that we didn't exit cleanly last time and left the
semaphore
* around. Recreate it since we don't know what state it is in. */
if (sem_unlink(stats_sem_name) != 0) {
- LDAPDebug( LDAP_DEBUG_ANY, "Failed to delete old semaphore for stats
file (%s). "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to delete old semaphore
for stats file (%s). "
"Error %d (%s).\n", szStatsFile, errno,
slapd_system_strerror(errno) );
exit(1);
}
if ((stats_sem = sem_open(stats_sem_name, O_CREAT | O_EXCL,
SLAPD_DEFAULT_FILE_MODE, 1)) == SEM_FAILED) {
/* No dice */
- LDAPDebug( LDAP_DEBUG_ANY, "Failed to create semaphore for stats
file (%s). Error %d (%s).\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to create semaphore for
stats file (%s). Error %d (%s).\n",
szStatsFile, errno, slapd_system_strerror(errno) );
exit(1);
}
} else {
/* Some other problem occurred creating the semaphore. */
- LDAPDebug( LDAP_DEBUG_ANY, "Failed to create semaphore for stats file
(%s). Error %d.(%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to create semaphore for stats
file (%s). Error %d.(%s)\n",
szStatsFile, errno, slapd_system_strerror(errno) );
exit(1);
}
diff --git a/ldap/servers/slapd/ssl.c b/ldap/servers/slapd/ssl.c
index ca19983..2b35c5e 100644
--- a/ldap/servers/slapd/ssl.c
+++ b/ldap/servers/slapd/ssl.c
@@ -267,7 +267,7 @@ slapd_SSL_report(int degree, char *fmt, va_list args)
{
char buf[2048];
PR_vsnprintf( buf, sizeof(buf), fmt, args );
- LDAPDebug( LDAP_DEBUG_ANY, "SSL %s: %s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "SSL %s: %s\n",
(degree == LOG_FAILURE) ? "failure" : "alert",
buf, 0 );
}
@@ -1260,15 +1260,15 @@ slapd_nss_init(int init_ssl, int config_available)
keydb_file_name = slapi_ch_smprintf("%s/key3.db", certdir);
secmoddb_file_name = slapi_ch_smprintf("%s/secmod.db", certdir);
if(chmod(certdb_file_name, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP )){
- LDAPDebug(LDAP_DEBUG_ANY, "slapd_nss_init: chmod failed for file %s error (%d)
%s.\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "slapd_nss_init: chmod failed for file %s
error (%d) %s.\n",
certdb_file_name, errno, slapd_system_strerror(errno));
}
if(chmod(keydb_file_name, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP )){
- LDAPDebug(LDAP_DEBUG_ANY, "slapd_nss_init: chmod failed for file %s error (%d)
%s.\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "slapd_nss_init: chmod failed for file %s
error (%d) %s.\n",
keydb_file_name, errno, slapd_system_strerror(errno));
}
if(chmod(secmoddb_file_name, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP )){
- LDAPDebug(LDAP_DEBUG_ANY, "slapd_nss_init: chmod failed for file %s error (%d)
%s.\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "slapd_nss_init: chmod failed for file %s
error (%d) %s.\n",
secmoddb_file_name, errno, slapd_system_strerror(errno));
}
}
@@ -2168,7 +2168,7 @@ slapd_ssl_init2(PRFileDesc **fd, int startTLS)
#ifdef SSL_REQUIRE_CERTIFICATE /* new feature */
if ((err = SSL_OptionSet (pr_sock, SSL_REQUIRE_CERTIFICATE, PR_FALSE)) <
0) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug (LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"SSL_OptionSet(SSL_REQUIRE_CERTIFICATE,PR_FALSE) %d "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
err, prerr, slapd_pr_strerror(prerr));
@@ -2178,7 +2178,7 @@ slapd_ssl_init2(PRFileDesc **fd, int startTLS)
case SLAPD_SSLCLIENTAUTH_REQUIRED:
if ((err = SSL_OptionSet (pr_sock, SSL_REQUEST_CERTIFICATE, PR_TRUE)) < 0)
{
PRErrorCode prerr = PR_GetError();
- LDAPDebug (LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"SSL_OptionSet(SSL_REQUEST_CERTIFICATE,PR_TRUE) %d "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
err, prerr, slapd_pr_strerror(prerr));
@@ -2454,7 +2454,7 @@ slapd_SSL_client_auth (LDAP* ld)
slapi_ch_free_string(&pw);
slapi_ch_free_string(&finalpersonality);
- LDAPDebug (LDAP_DEBUG_TRACE, "slapd_SSL_client_auth() %i\n", rc, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "slapd_SSL_client_auth() %i\n", rc,
0, 0);
return rc;
}
diff --git a/ldap/servers/slapd/str2filter.c b/ldap/servers/slapd/str2filter.c
index 8117796..ae5a577 100644
--- a/ldap/servers/slapd/str2filter.c
+++ b/ldap/servers/slapd/str2filter.c
@@ -30,7 +30,7 @@ slapi_str2filter( char *str )
struct slapi_filter *f = NULL;
char *end;
- LDAPDebug( LDAP_DEBUG_FILTER, "slapi_str2filter \"%s\"\n", str, 0, 0
);
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "slapi_str2filter \"%s\"\n",
str, 0, 0 );
if ( str == NULL || *str == '\0' ) {
return( NULL );
@@ -98,7 +98,7 @@ str2list( char *str, unsigned long ftype )
char *next;
char save;
- LDAPDebug( LDAP_DEBUG_FILTER, "str2list \"%s\"\n", str, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "str2list \"%s\"\n", str, 0,
0 );
f = (struct slapi_filter *) slapi_ch_calloc( 1, sizeof(struct slapi_filter) );
f->f_choice = ftype;
@@ -312,7 +312,7 @@ str2simple( char *str , int unescape_filter)
char *s;
char *value, savechar;
- LDAPDebug( LDAP_DEBUG_FILTER, "str2simple \"%s\"\n", str, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "str2simple \"%s\"\n", str,
0, 0 );
PR_ASSERT(str);
@@ -433,7 +433,7 @@ str2subvals( char *val, struct slapi_filter *f, int unescape_filter )
int gotstar;
size_t len, outlen;
- LDAPDebug( LDAP_DEBUG_FILTER, "str2subvals \"%s\"\n", val, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "str2subvals \"%s\"\n", val,
0, 0 );
gotstar = 0;
while ( val != NULL && *val ) {
diff --git a/ldap/servers/slapd/stubs.c b/ldap/servers/slapd/stubs.c
index cb960ac..778552a 100644
--- a/ldap/servers/slapd/stubs.c
+++ b/ldap/servers/slapd/stubs.c
@@ -29,7 +29,7 @@ void *PT_Lock( PRLock *x_mutex )
int lcache_init(LDAP *ld, void *arg)
{
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"lcache_init: Shouldn't have been called\n", 0,0,0);
return -1;
}
diff --git a/ldap/servers/slapd/task.c b/ldap/servers/slapd/task.c
index 405f0bf..08a6247 100644
--- a/ldap/servers/slapd/task.c
+++ b/ldap/servers/slapd/task.c
@@ -508,7 +508,7 @@ slapi_plugin_task_register_handler(const char *name, dseCallbackFn
func, Slapi_P
slapi_add_internal_pb(add_pb);
slapi_pblock_get(add_pb, SLAPI_PLUGIN_INTOP_RESULT, &x);
if ((x != LDAP_SUCCESS) && (x != LDAP_ALREADY_EXISTS)) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Can't create task node '%s' (error %d)\n",
name, x, 0);
ret = x;
@@ -686,14 +686,14 @@ static Slapi_Entry *get_internal_entry(Slapi_PBlock *pb, char *dn)
slapi_search_internal_pb(pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &ret);
if (ret != LDAP_SUCCESS) {
- LDAPDebug(LDAP_DEBUG_ANY, "WARNING: can't find task entry
'%s'\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "WARNING: can't find task entry
'%s'\n",
dn, 0, 0);
return NULL;
}
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries);
if ((NULL == entries) || (NULL == entries[0])) {
- LDAPDebug(LDAP_DEBUG_ANY, "WARNING: can't find task entry
'%s'\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "WARNING: can't find task entry
'%s'\n",
dn, 0, 0);
return NULL;
}
@@ -733,7 +733,7 @@ static void modify_internal_entry(char *dn, LDAPMod **mods)
*/
tries++;
if (tries == 3) {
- LDAPDebug(LDAP_DEBUG_ANY, "WARNING: can't modify task "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "WARNING: can't modify task
"
"entry '%s'; %s (%d)\n", dn,
ldap_err2string(ret), ret);
pblock_done(&pb);
return;
@@ -815,7 +815,7 @@ static int task_modify(Slapi_PBlock *pb, Slapi_Entry *e,
task->task_state = SLAPI_TASK_CANCELLED;
if (task->cancel) {
(*task->cancel)(task);
- LDAPDebug(LDAP_DEBUG_ANY, "Cancelling task '%s'\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Cancelling task
'%s'\n",
fetch_attr(eAfter, "cn", "?"), 0, 0);
}
}
@@ -886,7 +886,7 @@ static int task_import_add(Slapi_PBlock *pb, Slapi_Entry *e,
if (slapi_lookup_instance_name_by_suffixes(include, exclude,
&instances) < 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: No backend instance is specified.\n", 0, 0, 0);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
return SLAPI_DSE_CALLBACK_ERROR;
@@ -902,12 +902,12 @@ static int task_import_add(Slapi_PBlock *pb, Slapi_Entry *e,
}
else if (counter == 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: No backend instance is specified.\n", 0, 0,
0);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
return SLAPI_DSE_CALLBACK_ERROR;
} else {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: Multiple backend instances are specified: "
"%s, %s, ...\n", instances[0], instances[1], 0);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
@@ -922,7 +922,7 @@ static int task_import_add(Slapi_PBlock *pb, Slapi_Entry *e,
/* lookup the backend */
be = slapi_be_select_by_instance_name(instance_name);
if (be == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "can't import to nonexistent backend
%s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "can't import to nonexistent backend
%s\n",
instance_name, 0, 0);
slapi_ch_free_string(&nameFrombe_name);
*returncode = LDAP_NO_SUCH_OBJECT;
@@ -933,14 +933,14 @@ static int task_import_add(Slapi_PBlock *pb, Slapi_Entry *e,
* for DS 5.0 where the import/export stuff changed a lot.
*/
if (! SLAPI_PLUGIN_IS_V3(be->be_database)) {
- LDAPDebug(LDAP_DEBUG_ANY, "can't perform an import with pre-V3 "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "can't perform an import with pre-V3
"
"backend plugin %s\n", be->be_database->plg_name, 0,
0);
*returncode = LDAP_UNWILLING_TO_PERFORM;
slapi_ch_free_string(&nameFrombe_name);
return SLAPI_DSE_CALLBACK_ERROR;
}
if (be->be_database->plg_ldif2db == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "ERROR: no ldif2db function defined for "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: no ldif2db function defined for
"
"backend %s\n", be->be_database->plg_name, 0, 0);
*returncode = LDAP_UNWILLING_TO_PERFORM;
slapi_ch_free_string(&nameFrombe_name);
@@ -974,7 +974,7 @@ static int task_import_add(Slapi_PBlock *pb, Slapi_Entry *e,
/* allocate new task now */
task = slapi_new_task(slapi_entry_get_ndn(e));
if (task == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "unable to allocate new task!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "unable to allocate new task!\n", 0,
0, 0);
rv = LDAP_OPERATIONS_ERROR;
goto out;
}
@@ -1044,7 +1044,7 @@ static void task_export_thread(void *arg)
be = slapi_be_select_by_instance_name((const char *)*inp);
if (be == NULL) {
/* shouldn't happen */
- LDAPDebug(LDAP_DEBUG_ANY, "ldbm2ldif: backend '%s' is
AWOL!\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm2ldif: backend '%s' is
AWOL!\n",
(const char *)*inp, 0, 0);
continue;
}
@@ -1085,13 +1085,13 @@ static void task_export_thread(void *arg)
}
slapi_task_log_notice(task, "Beginning export of '%s'", *inp);
- LDAPDebug(LDAP_DEBUG_ANY, "Beginning export of '%s'\n", *inp,
0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Beginning export of
'%s'\n", *inp, 0, 0);
rv = (*pb->pb_plugin->plg_db2ldif)(pb);
if (rv != 0) {
slapi_task_log_notice(task, "backend '%s' export failed
(%d)",
*inp, rv);
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ldbm2ldif: backend '%s' export failed (%d)\n",
(const char *)*inp, rv, 0);
}
@@ -1115,10 +1115,10 @@ static void task_export_thread(void *arg)
if (rv == 0) {
slapi_task_log_notice(task, "Export finished.");
- LDAPDebug(LDAP_DEBUG_ANY, "Export finished.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Export finished.\n", 0, 0, 0);
} else {
slapi_task_log_notice(task, "Export failed.");
- LDAPDebug(LDAP_DEBUG_ANY, "Export failed.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Export failed.\n", 0, 0, 0);
}
slapi_task_finish(task, rv);
@@ -1199,7 +1199,7 @@ static int task_export_add(Slapi_PBlock *pb, Slapi_Entry *e,
if (slapi_lookup_instance_name_by_suffixes(include, exclude,
&instance_names) < 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: No backend instance is specified.\n", 0, 0, 0);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -1212,14 +1212,14 @@ static int task_export_add(Slapi_PBlock *pb, Slapi_Entry *e,
;
if (instance_cnt == 0) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: No backend instance is specified.\n", 0, 0,
0);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
} else {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: No backend instance is specified.\n", 0, 0, 0);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -1280,7 +1280,7 @@ static int task_export_add(Slapi_PBlock *pb, Slapi_Entry *e,
/* lookup the backend */
be = slapi_be_select_by_instance_name((const char *)*inp);
if (be == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"can't export to nonexistent backend %s\n", *inp, 0,
0);
*returncode = LDAP_NO_SUCH_OBJECT;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -1291,14 +1291,14 @@ static int task_export_add(Slapi_PBlock *pb, Slapi_Entry *e,
* for DS 5.0 where the import/export stuff changed a lot.
*/
if (! SLAPI_PLUGIN_IS_V3(be->be_database)) {
- LDAPDebug(LDAP_DEBUG_ANY, "can't perform an export with pre-V3
"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "can't perform an export with
pre-V3 "
"backend plugin %s\n", be->be_database->plg_name,
0, 0);
*returncode = LDAP_UNWILLING_TO_PERFORM;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
if (be->be_database->plg_db2ldif == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "ERROR: no db2ldif function defined for
"
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: no db2ldif function defined
for "
"backend %s\n", be->be_database->plg_name, 0, 0);
*returncode = LDAP_UNWILLING_TO_PERFORM;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -1309,7 +1309,7 @@ static int task_export_add(Slapi_PBlock *pb, Slapi_Entry *e,
/* allocate new task now */
task = slapi_new_task(slapi_entry_get_ndn(e));
if (task == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "unable to allocate new task!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "unable to allocate new task!\n", 0,
0, 0);
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1340,7 +1340,7 @@ static int task_export_add(Slapi_PBlock *pb, Slapi_Entry *e,
(void *)mypb, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"unable to create ldbm2ldif thread!\n", 0, 0, 0);
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -1377,18 +1377,18 @@ static void task_backup_thread(void *arg)
slapi_task_log_notice(task, "Beginning backup of '%s'",
pb->pb_plugin->plg_name);
- LDAPDebug(LDAP_DEBUG_ANY, "Beginning backup of '%s'\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Beginning backup of '%s'\n",
pb->pb_plugin->plg_name, 0, 0);
rv = (*pb->pb_plugin->plg_db2archive)(pb);
if (rv != 0) {
slapi_task_log_notice(task, "Backup failed (error %d)", rv);
slapi_task_log_status(task, "Backup failed (error %d)", rv);
- LDAPDebug(LDAP_DEBUG_ANY, "Backup failed (error %d)\n", rv, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Backup failed (error %d)\n", rv, 0,
0);
} else {
slapi_task_log_notice(task, "Backup finished.");
slapi_task_log_status(task, "Backup finished.");
- LDAPDebug(LDAP_DEBUG_ANY, "Backup finished.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Backup finished.\n", 0, 0, 0);
}
slapi_task_finish(task, rv);
@@ -1440,7 +1440,7 @@ static int task_backup_add(Slapi_PBlock *pb, Slapi_Entry *e,
}
slapi_ch_free_string(&cookie);
if (NULL == be || NULL == be->be_database->plg_db2archive) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: no db2archive function defined.\n", 0, 0, 0);
*returncode = LDAP_UNWILLING_TO_PERFORM;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -1448,7 +1448,7 @@ static int task_backup_add(Slapi_PBlock *pb, Slapi_Entry *e,
}
if (! SLAPI_PLUGIN_IS_V3(be->be_database)) {
- LDAPDebug(LDAP_DEBUG_ANY, "can't perform an backup with pre-V3 "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "can't perform an backup with pre-V3
"
"backend plugin %s\n", be->be_database->plg_name, 0,
0);
*returncode = LDAP_UNWILLING_TO_PERFORM;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -1458,7 +1458,7 @@ static int task_backup_add(Slapi_PBlock *pb, Slapi_Entry *e,
/* allocate new task now */
task = slapi_new_task(slapi_entry_get_ndn(e));
if (task == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "unable to allocate new task!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "unable to allocate new task!\n", 0,
0, 0);
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1480,7 +1480,7 @@ static int task_backup_add(Slapi_PBlock *pb, Slapi_Entry *e,
(void *)mypb, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"unable to create backup thread!\n", 0, 0, 0);
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -1511,18 +1511,18 @@ static void task_restore_thread(void *arg)
slapi_task_log_notice(task, "Beginning restore to '%s'",
pb->pb_plugin->plg_name);
- LDAPDebug(LDAP_DEBUG_ANY, "Beginning restore to '%s'\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Beginning restore to '%s'\n",
pb->pb_plugin->plg_name, 0, 0);
rv = (*pb->pb_plugin->plg_archive2db)(pb);
if (rv != 0) {
slapi_task_log_notice(task, "Restore failed (error %d)", rv);
slapi_task_log_status(task, "Restore failed (error %d)", rv);
- LDAPDebug(LDAP_DEBUG_ANY, "Restore failed (error %d)\n", rv, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Restore failed (error %d)\n", rv,
0, 0);
} else {
slapi_task_log_notice(task, "Restore finished.");
slapi_task_log_status(task, "Restore finished.");
- LDAPDebug(LDAP_DEBUG_ANY, "Restore finished.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Restore finished.\n", 0, 0, 0);
}
slapi_task_finish(task, rv);
@@ -1578,7 +1578,7 @@ static int task_restore_add(Slapi_PBlock *pb, Slapi_Entry *e,
}
slapi_ch_free_string(&cookie);
if (NULL == be || NULL == be->be_database->plg_archive2db) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: no archive2db function defined.\n", 0, 0, 0);
*returncode = LDAP_UNWILLING_TO_PERFORM;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -1589,7 +1589,7 @@ static int task_restore_add(Slapi_PBlock *pb, Slapi_Entry *e,
* for DS 5.0 where the import/export stuff changed a lot.
*/
if (! SLAPI_PLUGIN_IS_V3(be->be_database)) {
- LDAPDebug(LDAP_DEBUG_ANY, "can't perform an restore with pre-V3 "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "can't perform an restore with pre-V3
"
"backend plugin %s\n", be->be_database->plg_name, 0,
0);
*returncode = LDAP_UNWILLING_TO_PERFORM;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -1599,7 +1599,7 @@ static int task_restore_add(Slapi_PBlock *pb, Slapi_Entry *e,
/* allocate new task now */
task = slapi_new_task(slapi_entry_get_ndn(e));
if (task == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "unable to allocate new task!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "unable to allocate new task!\n", 0,
0, 0);
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1623,7 +1623,7 @@ static int task_restore_add(Slapi_PBlock *pb, Slapi_Entry *e,
(void *)mypb, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"unable to create restore thread!\n", 0, 0, 0);
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -1657,7 +1657,7 @@ static void task_index_thread(void *arg)
if (rv != 0) {
slapi_task_log_notice(task, "Index failed (error %d)", rv);
slapi_task_log_status(task, "Index failed (error %d)", rv);
- LDAPDebug(LDAP_DEBUG_ANY, "Index failed (error %d)\n", rv, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Index failed (error %d)\n", rv, 0,
0);
}
slapi_task_finish(task, rv);
@@ -1696,13 +1696,13 @@ static int task_index_add(Slapi_PBlock *pb, Slapi_Entry *e,
/* lookup the backend */
be = slapi_be_select_by_instance_name(instance_name);
if (be == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "can't import to nonexistent backend
%s\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "can't import to nonexistent backend
%s\n",
instance_name, 0, 0);
*returncode = LDAP_NO_SUCH_OBJECT;
return SLAPI_DSE_CALLBACK_ERROR;
}
if (be->be_database->plg_db2index == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "ERROR: no db2index function defined for "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: no db2index function defined for
"
"backend %s\n", be->be_database->plg_name, 0, 0);
*returncode = LDAP_UNWILLING_TO_PERFORM;
return SLAPI_DSE_CALLBACK_ERROR;
@@ -1735,7 +1735,7 @@ static int task_index_add(Slapi_PBlock *pb, Slapi_Entry *e,
}
if (NULL == indexlist) {
- LDAPDebug(LDAP_DEBUG_ANY, "no index is specified!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "no index is specified!\n", 0, 0,
0);
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_OK;
goto out;
@@ -1744,7 +1744,7 @@ static int task_index_add(Slapi_PBlock *pb, Slapi_Entry *e,
/* allocate new task now */
task = slapi_new_task(slapi_entry_get_ndn(e));
if (task == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "unable to allocate new task!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "unable to allocate new task!\n", 0,
0, 0);
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1768,7 +1768,7 @@ static int task_index_add(Slapi_PBlock *pb, Slapi_Entry *e,
(void *)mypb, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"unable to create index thread!\n", 0, 0, 0);
rv = SLAPI_DSE_CALLBACK_ERROR;
slapi_ch_free((void **)&mypb->pb_instance_name);
@@ -1835,7 +1835,7 @@ task_upgradedb_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry
*eAfter,
}
slapi_ch_free_string(&cookie);
if (NULL == be) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: no upgradedb is defined.\n", 0, 0, 0);
*returncode = LDAP_UNWILLING_TO_PERFORM;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -1843,7 +1843,7 @@ task_upgradedb_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry
*eAfter,
}
if (NULL == be->be_database->plg_upgradedb ||
strcasecmp(database_type, be->be_database->plg_name)) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"ERROR: no upgradedb is defined in %s.\n",
be->be_database->plg_name, 0, 0);
*returncode = LDAP_UNWILLING_TO_PERFORM;
@@ -1854,7 +1854,7 @@ task_upgradedb_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry
*eAfter,
/* allocate new task now */
task = slapi_new_task(slapi_entry_get_ndn(e));
if (task == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "unable to allocate new task!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "unable to allocate new task!\n", 0,
0, 0);
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1931,7 +1931,7 @@ task_sysconfig_reload_add(Slapi_PBlock *pb, Slapi_Entry *e,
Slapi_Entry *eAfter,
*returncode = LDAP_OPERATIONS_ERROR;
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "missing required
attribute \"%s\".",
TASK_SYSCONFIG_FILE_ATTR);
- LDAPDebug(LDAP_DEBUG_ANY, "sysconfig reload task: %s\n", returntext, 0,
0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "sysconfig reload task: %s\n",
returntext, 0, 0);
rc = SLAPI_DSE_CALLBACK_ERROR;
goto done;
}
@@ -1946,7 +1946,7 @@ task_sysconfig_reload_add(Slapi_PBlock *pb, Slapi_Entry *e,
Slapi_Entry *eAfter,
char *end_of_line = line + sizeof(line) - 1;
if(logchanges){
- LDAPDebug(LDAP_DEBUG_ANY, "sysconfig reload task: processing file
(%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "sysconfig reload task: processing
file (%s)\n",
filename, 0 , 0);
}
@@ -2059,12 +2059,12 @@ task_sysconfig_reload_add(Slapi_PBlock *pb, Slapi_Entry *e,
Slapi_Entry *eAfter,
if(setenv(env_var, env_value, 1) != 0){
*returncode = LDAP_OPERATIONS_ERROR;
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE,"failed
to set (%s)", env_var);
- LDAPDebug(LDAP_DEBUG_ANY, "sysconfig reload task:
%s\n",returntext,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "sysconfig reload task:
%s\n",returntext,0,0);
rc = SLAPI_DSE_CALLBACK_ERROR;
break;
}
if(logchanges){
- LDAPDebug(LDAP_DEBUG_ANY, "sysconfig reload task: set (%s)
to (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "sysconfig reload task:
set (%s) to (%s)\n",
env_var, env_value , 0);
}
}
@@ -2075,7 +2075,7 @@ task_sysconfig_reload_add(Slapi_PBlock *pb, Slapi_Entry *e,
Slapi_Entry *eAfter,
*returncode = LDAP_OPERATIONS_ERROR;
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE,"failed to open file
\"%s\" (%s)",
filename, strerror(errno));
- LDAPDebug(LDAP_DEBUG_ANY, "sysconfig reload task: %s\n", returntext, 0,
0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "sysconfig reload task: %s\n",
returntext, 0, 0);
rc = SLAPI_DSE_CALLBACK_ERROR;
}
@@ -2389,7 +2389,7 @@ task_fixup_tombstones_add(Slapi_PBlock *pb, Slapi_Entry *e,
Slapi_Entry *eAfter,
(void *)task_data, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"task_fixup_tombstones_add: unable to create index
thread!\n", 0, 0, 0);
*returncode = LDAP_OPERATIONS_ERROR;
slapi_task_finish(task, *returncode);
@@ -2785,7 +2785,7 @@ void task_cleanup(void)
slapi_search_internal_pb(pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &ret);
if (ret != LDAP_SUCCESS) {
- LDAPDebug(LDAP_DEBUG_ANY, "WARNING: entire cn=tasks tree seems to "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "WARNING: entire cn=tasks tree seems to
"
"be AWOL!\n", 0, 0, 0);
slapi_pblock_destroy(pb);
return;
@@ -2793,7 +2793,7 @@ void task_cleanup(void)
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries);
if (NULL == entries) {
- LDAPDebug(LDAP_DEBUG_ANY, "WARNING: entire cn=tasks tree seems to "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "WARNING: entire cn=tasks tree seems to
"
"be AWOL!\n", 0, 0, 0);
slapi_pblock_destroy(pb);
return;
@@ -2836,7 +2836,7 @@ void task_init(void)
{
global_task_lock = PR_NewLock();
if (global_task_lock == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, "unable to create global tasks lock! "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "unable to create global tasks lock!
"
"(that's bad)\n", 0, 0, 0);
return;
}
@@ -2866,7 +2866,7 @@ void task_shutdown(void)
(task->task_state != SLAPI_TASK_FINISHED)) {
task->task_state = SLAPI_TASK_CANCELLED;
if (task->cancel) {
- LDAPDebug(LDAP_DEBUG_ANY, "Cancelling task '%s'\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Cancelling task
'%s'\n",
task->task_dn, 0, 0);
(*task->cancel)(task);
found_any = 1;
diff --git a/ldap/servers/slapd/tools/mmldif.c b/ldap/servers/slapd/tools/mmldif.c
index ddfaf6c..35c594a 100644
--- a/ldap/servers/slapd/tools/mmldif.c
+++ b/ldap/servers/slapd/tools/mmldif.c
@@ -320,11 +320,11 @@ int mm_diff(stats_t *statsp)
for (i = 0; i < ndirectories; i++) {
pindex = i / 32;
pmask = 1 << (i % 32);
- LDAPDebug(LDAP_DEBUG_TRACE, "finger printing directory %d\n", i, 0,
0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "finger printing directory
%d\n", i, 0, 0);
while (TRUE) {
stat = readrec(&edfin[i], &attrib);
if (stat == IDDS_MM_ABSENT) {
- LDAPDebug(LDAP_DEBUG_TRACE, "ignored: %s: %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ignored: %s: %s\n",
attrib->name, attrib->value, 0);
continue;
}
@@ -335,7 +335,7 @@ int mm_diff(stats_t *statsp)
return stat;
}
records++;
- LDAPDebug(LDAP_DEBUG_TRACE, "db%d: %s: %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "db%d: %s: %s\n",
i, attrib->name, attrib->value);
hashname(seed, attrib, hashkey.data);
key = hashkey.key & hashmask;
@@ -348,7 +348,7 @@ int mm_diff(stats_t *statsp)
hashentry = hashentry->overflow;
if (hashentry != NULL) {
if (hashentry->present[pindex] & pmask) {
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"duplicate DN <%s=%s>
(ignored)\n",
attrib->name, attrib->value, 0);
if (emitchanges) {
@@ -364,14 +364,14 @@ int mm_diff(stats_t *statsp)
hashentry->present[pindex] |= pmask;
hashvalue(seed, attrib, fingerprint);
if (memcmp(fingerprint, hashentry->fingerprint, 16)) {
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"...data modified\n", key, 0, 0);
hashentry->flags = MODIFIED;
}
}
continue;
}
- LDAPDebug(LDAP_DEBUG_TRACE, "overflow in key %u\n", key, 0,
0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "overflow in key %u\n",
key, 0, 0);
hashentry2 = entryalloc();
hashentry2->overflow = hashtable[key];
hashentry = hashtable[key] = hashentry2;
@@ -406,12 +406,12 @@ int mm_diff(stats_t *statsp)
rewind(edfin[i].fp);
edfin[i].end = FALSE;
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"loading authoritative data from directory %d\n", i, 0, 0);
while (TRUE) {
stat = readrec(&edfin[i], &attrib);
if (stat == IDDS_MM_ABSENT) {
- LDAPDebug(LDAP_DEBUG_TRACE, "ignored: %s: %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ignored: %s: %s\n",
attrib->name, attrib->value, 0);
continue;
}
@@ -421,7 +421,7 @@ int mm_diff(stats_t *statsp)
free(hashtable);
return stat;
}
- LDAPDebug(LDAP_DEBUG_TRACE, "db%d: %s: %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "db%d: %s: %s\n",
i, attrib->name, attrib->value);
hashname(seed, attrib, hashkey.data);
key = hashkey.key & hashmask;
@@ -430,14 +430,14 @@ int mm_diff(stats_t *statsp)
memcmp(hashentry->key, hashkey.data, 16))
hashentry = hashentry->overflow;
if (hashentry == NULL) {
- LDAPDebug(LDAP_DEBUG_TRACE, "...hash entry not found\n", 0, 0,
0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "...hash entry not
found\n", 0, 0, 0);
continue;
}
if (!(hashentry->flags & LOADED))
{
hashentry->first = newrecord(attrib);
hashentry->flags |= LOADED;
- LDAPDebug(LDAP_DEBUG_TRACE, " ...data loaded\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, " ...data loaded\n", 0,
0, 0);
hashentry->db = i;
continue;
}
@@ -445,7 +445,7 @@ int mm_diff(stats_t *statsp)
continue;
if (mm_get_winner(hashentry->first, attrib)) {
hashentry->flags |= LOADED;
- LDAPDebug(LDAP_DEBUG_TRACE, " ...winner data loaded\n", 0, 0,
0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, " ...winner data
loaded\n", 0, 0, 0);
hashentry->db = i;
free(hashentry->first);
hashentry->first = newrecord(attrib);
@@ -473,12 +473,12 @@ int mm_diff(stats_t *statsp)
rewind(edfin[i].fp);
edfin[i].end = FALSE;
- LDAPDebug(LDAP_DEBUG_TRACE,
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
"generating differences for directory %d\n", i, 0, 0);
while (TRUE) {
stat = readrec(&edfin[i], &attrib);
if (stat == IDDS_MM_ABSENT) {
- LDAPDebug(LDAP_DEBUG_TRACE, "ignored: %s: %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ignored: %s: %s\n",
attrib->name, attrib->value, 0);
continue;
}
@@ -488,7 +488,7 @@ int mm_diff(stats_t *statsp)
free(hashtable);
return stat;
}
- LDAPDebug(LDAP_DEBUG_TRACE, "db%d: %s: %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "db%d: %s: %s\n",
i, attrib->name, attrib->value);
hashname(seed, attrib, hashkey.data);
key = hashkey.key & hashmask;
@@ -497,7 +497,7 @@ int mm_diff(stats_t *statsp)
memcmp(hashentry->key, hashkey.data, 16))
hashentry = hashentry->overflow;
if (hashentry == NULL) {
- LDAPDebug(LDAP_DEBUG_TRACE, "...hash entry not found\n", 0, 0,
0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "...hash entry not
found\n", 0, 0, 0);
continue;
}
if (hashentry->flags & IDENTITY)
@@ -507,10 +507,10 @@ int mm_diff(stats_t *statsp)
hashvalue(seed, attrib, fingerprint);
if (memcmp(fingerprint, hashentry->fingerprint, 16)) {
if (mm_is_deleted(hashentry->first, attrib, 0)) {
- LDAPDebug(LDAP_DEBUG_TRACE, " ...deleted\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, " ...deleted\n", 0,
0, 0);
adddelete(edfout[i], attrib);
} else {
- LDAPDebug(LDAP_DEBUG_TRACE, " ...modified\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, " ...modified\n", 0,
0, 0);
addmodified(edfout[i], attrib, hashentry->first);
}
}
@@ -525,7 +525,7 @@ int mm_diff(stats_t *statsp)
* no action is needed here. Otherwise we emit an add.
* we take this opportunity to free the memory.
*/
- LDAPDebug(LDAP_DEBUG_TRACE, "scanning db for new entries\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "scanning db for new entries\n", 0,
0, 0);
for (h = 0; h < 0x1000; h++) {
for (hashentry = hashtable[h]; hashentry; hashentry = overflow) {
if (!hashentry->flags)
@@ -539,7 +539,7 @@ int mm_diff(stats_t *statsp)
if (mm_is_deleted(hashentry->first, NULL, 0)) continue;
added++;
if (!emitchanges) continue;
- LDAPDebug(LDAP_DEBUG_TRACE, " ...add new\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, " ...add new\n", 0, 0,
0);
addnew(edfout[i], "add", hashentry->first);
}
@@ -737,7 +737,7 @@ readrec(edfFILE * edf1, attrib1_t ** attrib)
}
vptr = strchr(line, ':');
if (!vptr) {
- LDAPDebug(LDAP_DEBUG_TRACE, "%s\n invalid input line\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "%s\n invalid input line\n",
line, 0, 0);
continue; /* invalid line, but we'll just skip it */
}
@@ -766,7 +766,7 @@ readrec(edfFILE * edf1, attrib1_t ** attrib)
while (*vptr == ' ') vptr++; /* skip optional spaces */
b64 = initDec64((unsigned char *)att->value, 0x20000);
if (Dec64(b64, (unsigned char *) vptr)) {
- LDAPDebug(LDAP_DEBUG_TRACE, "%s\n invalid input line\n", line,
0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "%s\n invalid input
line\n", line, 0, 0);
continue; /* invalid line, but we'll just skip it */
}
toolong = FALSE;
@@ -788,14 +788,14 @@ readrec(edfFILE * edf1, attrib1_t ** attrib)
rc = Dec64(b64, (unsigned char *)line);
if (rc == -1)
{
- LDAPDebug(LDAP_DEBUG_TRACE, "%s\n invalid input line\n",
line, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "%s\n invalid input
line\n", line, 0, 0);
continue; /* invalid line, but we'll just skip it */
}
if (rc) {
if (!toolong) {
toolong = TRUE;
- LDAPDebug(LDAP_DEBUG_TRACE, "%s\n line too long\n",
line, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "%s\n line too
long\n", line, 0, 0);
}
continue;
}
diff --git a/ldap/servers/slapd/unbind.c b/ldap/servers/slapd/unbind.c
index c0dec9d..580dfba 100644
--- a/ldap/servers/slapd/unbind.c
+++ b/ldap/servers/slapd/unbind.c
@@ -39,7 +39,7 @@ do_unbind( Slapi_PBlock *pb )
int err;
int ignore_criticality = 1;
- LDAPDebug( LDAP_DEBUG_TRACE, "do_unbind\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "do_unbind\n", 0, 0, 0 );
slapi_pblock_get( pb, SLAPI_OPERATION, &operation);
ber = operation->o_ber;
diff --git a/ldap/servers/slapd/util.c b/ldap/servers/slapd/util.c
index 0a37862..94e46ab 100644
--- a/ldap/servers/slapd/util.c
+++ b/ldap/servers/slapd/util.c
@@ -333,7 +333,7 @@ filter_stuff_func(void *arg, const char *val, PRUint32 slen)
raw_filter.bv_val = (char *)buf;
raw_filter.bv_len = filter_len;
if(ldap_bv2escaped_filter_value(&raw_filter, &escaped_filter) != 0){
- LDAPDebug(LDAP_DEBUG_TRACE, "slapi_filter_sprintf: failed to escape
filter value(%s)\n",val,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "slapi_filter_sprintf: failed
to escape filter value(%s)\n",val,0,0);
ctx->next_arg_needs_esc_norm = 0;
return -1;
} else {
@@ -345,7 +345,7 @@ filter_stuff_func(void *arg, const char *val, PRUint32 slen)
buf = slapi_ch_calloc(sizeof(char), filter_len*3 + 1);
val2 = (char *)do_escape_string(val, filter_len, buf, special_filter);
if(val2 == NULL){
- LDAPDebug(LDAP_DEBUG_TRACE, "slapi_filter_sprintf: failed to escape
filter value(%s)\n",val,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "slapi_filter_sprintf: failed
to escape filter value(%s)\n",val,0,0);
ctx->next_arg_needs_esc_norm = 0;
slapi_ch_free_string(&buf);
return -1;
@@ -473,7 +473,7 @@ slapi_escape_filter_value(char* filter_str, int len)
raw_filter.bv_val = filter_str;
raw_filter.bv_len = filter_len;
if(ldap_bv2escaped_filter_value(&raw_filter, &escaped_filter) != 0){
- LDAPDebug(LDAP_DEBUG_TRACE, "slapi_escape_filter_value: failed to escape
filter value(%s)\n",filter_str,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "slapi_escape_filter_value: failed to
escape filter value(%s)\n",filter_str,0,0);
return NULL;
} else {
return escaped_filter.bv_val;
@@ -932,7 +932,7 @@ rel2abspath_ext( char *relpath, char *cwd )
if ( NULL == cwd ) {
if ( getcwd( abspath, MAXPATHLEN ) == NULL ) {
perror( "getcwd" );
- LDAPDebug( LDAP_DEBUG_ANY, "Cannot determine current
directory\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Cannot determine current
directory\n",
0, 0, 0 );
exit( 1 );
}
@@ -941,7 +941,7 @@ rel2abspath_ext( char *relpath, char *cwd )
}
if ( strlen( relpath ) + strlen( abspath ) + 1 > MAXPATHLEN ) {
- LDAPDebug( LDAP_DEBUG_ANY, "Pathname \"%s" _PSEP
"%s\" too long\n",
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Pathname \"%s" _PSEP
"%s\" too long\n",
abspath, relpath, 0 );
exit( 1 );
}
@@ -1003,7 +1003,7 @@ void slapd_nasty(char* str, int c, int err)
char *msg = NULL;
char buffer[100];
PR_snprintf(buffer,sizeof(buffer), "%s BAD %d",str,c);
- LDAPDebug(LDAP_DEBUG_ANY,"%s, err=%d %s\n",buffer,err,(msg = strerror( err ))
? msg : "");
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"%s, err=%d %s\n",buffer,err,(msg =
strerror( err )) ? msg : "");
}
/* ***************************************************
@@ -1648,9 +1648,9 @@ int util_info_sys_pages(size_t *pagesize, size_t *pages, size_t
*procpages, size
}
/* Pages is the total ram on the system. */
- LDAPDebug(LDAP_DEBUG_TRACE,"util_info_sys_pages pages=%lu, \n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"util_info_sys_pages pages=%lu,
\n",
(unsigned long) *pages, 0,0);
- LDAPDebug(LDAP_DEBUG_TRACE,"util_info_sys_pages using pages for pages
\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"util_info_sys_pages using pages for
pages \n",0,0,0);
/* Availpages is how much we *could* alloc. We should take the smallest:
* - pages
@@ -1658,21 +1658,21 @@ int util_info_sys_pages(size_t *pagesize, size_t *pages, size_t
*procpages, size
* - freesize
*/
if (rlimsize == RLIM_INFINITY) {
- LDAPDebug(LDAP_DEBUG_TRACE,"util_info_sys_pages pages=%lu,
getrlim=RLIM_INFINITY, freesize=%lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"util_info_sys_pages pages=%lu,
getrlim=RLIM_INFINITY, freesize=%lu\n",
(unsigned long)*pages, (unsigned long)freesize, 0);
} else {
- LDAPDebug(LDAP_DEBUG_TRACE,"util_info_sys_pages pages=%lu, getrlim=%lu,
freesize=%lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"util_info_sys_pages pages=%lu,
getrlim=%lu, freesize=%lu\n",
(unsigned long)*pages, (unsigned long)*availpages, (unsigned
long)freesize);
}
if (rlimsize != RLIM_INFINITY && rlimsize < freesize &&
rlimsize < *pages && rlimsize > 0) {
- LDAPDebug(LDAP_DEBUG_TRACE,"util_info_sys_pages using getrlim for
availpages \n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"util_info_sys_pages using getrlim
for availpages \n",0,0,0);
*availpages = rlimsize;
} else if (freesize < *pages && freesize > 0) {
- LDAPDebug(LDAP_DEBUG_TRACE,"util_info_sys_pages using freesize for
availpages \n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"util_info_sys_pages using
freesize for availpages \n",0,0,0);
*availpages = freesize;
} else {
- LDAPDebug(LDAP_DEBUG_TRACE,"util_info_sys_pages using pages for
availpages \n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"util_info_sys_pages using pages
for availpages \n",0,0,0);
*availpages = *pages;
}
@@ -1733,7 +1733,7 @@ int util_info_sys_pages(size_t *pagesize, size_t *pages, size_t
*procpages, size
#define GIGABYTE (1024*1024*1024)
size_t one_gig_pages = GIGABYTE / *pagesize;
if (*pages > (2 * one_gig_pages) ) {
- LDAPDebug(LDAP_DEBUG_TRACE,"More than 2Gbytes physical memory detected.
Since this is a 32-bit process, truncating memory size used for auto cache calculations to
2Gbytes\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"More than 2Gbytes physical memory
detected. Since this is a 32-bit process, truncating memory size used for auto cache
calculations to 2Gbytes\n",
0, 0, 0);
*pages = (2 * one_gig_pages);
}
@@ -1782,13 +1782,13 @@ int util_is_cachesize_sane(size_t *cachesize)
*/
cachepages = *cachesize / pagesize;
- LDAPDebug(LDAP_DEBUG_TRACE,"util_is_cachesize_sane cachesize=%lu / pagesize=%lu
\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"util_is_cachesize_sane cachesize=%lu /
pagesize=%lu \n",
(unsigned long)*cachesize,(unsigned long)pagesize,0);
#ifdef LINUX
/* Linux we calculate availpages correctly, so USE IT */
issane = (int)(cachepages <= availpages);
- LDAPDebug(LDAP_DEBUG_TRACE,"util_is_cachesize_sane cachepages=%lu <=
availpages=%lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"util_is_cachesize_sane cachepages=%lu
<= availpages=%lu\n",
(unsigned long)cachepages,(unsigned long)availpages,0);
if (!issane) {
@@ -1805,11 +1805,11 @@ int util_is_cachesize_sane(size_t *cachesize)
#else
size_t freepages = 0;
freepages = pages - procpages;
- LDAPDebug(LDAP_DEBUG_TRACE,"util_is_cachesize_sane pages=%lu -
procpages=%lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"util_is_cachesize_sane pages=%lu -
procpages=%lu\n",
(unsigned long)pages,(unsigned long)procpages,0);
issane = (int)(cachepages <= freepages);
- LDAPDebug(LDAP_DEBUG_TRACE,"util_is_cachesize_sane cachepages=%lu <=
freepages=%lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"util_is_cachesize_sane cachepages=%lu
<= freepages=%lu\n",
(unsigned long)cachepages,(unsigned long)freepages,0);
if (!issane) {
diff --git a/ldap/servers/slapd/value.c b/ldap/servers/slapd/value.c
index 6eaa4cf..3c9ea02 100644
--- a/ldap/servers/slapd/value.c
+++ b/ldap/servers/slapd/value.c
@@ -562,7 +562,7 @@ value_size(const Slapi_Value *v)
static void
value_dump( const Slapi_Value *value, const char *text)
{
- LDAPDebug( LDAP_DEBUG_ANY, "Slapi_Value %s ptr=%lx\n", text, value, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Slapi_Value %s ptr=%lx\n", text, value,
0);
/* JCM - Dump value contents... */
}
#endif
diff --git a/ldap/servers/slapd/valueset.c b/ldap/servers/slapd/valueset.c
index 35f02c1..909c2d9 100644
--- a/ldap/servers/slapd/valueset.c
+++ b/ldap/servers/slapd/valueset.c
@@ -894,7 +894,7 @@ valueset_value_syntax_cmp( const Slapi_Attr *a, const Slapi_Value *v1,
const Sla
* generate the keys will be found (there exists a default plugin)
* log an error and continue.
*/
- LDAPDebug( LDAP_DEBUG_ANY, "valueset_value_syntax_cmp: "
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "valueset_value_syntax_cmp: "
"slapi_attr_values2keys_sv failed for type %s\n",
a->a_type, 0, 0 );
} else {
@@ -1290,7 +1290,7 @@ valueset_remove_valuearray(Slapi_ValueSet *vs, const Slapi_Attr *a,
Slapi_Value
{
if((flags & SLAPI_VALUE_FLAG_IGNOREERROR) == 0)
{
- LDAPDebug( LDAP_DEBUG_ARGS,"could not find value %d for attr %s\n", i-1,
a->a_type, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG,"could not find value %d for attr
%s\n", i-1, a->a_type, 0 );
rc= LDAP_NO_SUCH_ATTRIBUTE;
}
}
diff --git a/ldap/servers/slapd/vattr.c b/ldap/servers/slapd/vattr.c
index 577a8e7..ecc54a1 100644
--- a/ldap/servers/slapd/vattr.c
+++ b/ldap/servers/slapd/vattr.c
@@ -623,7 +623,7 @@ slapi_vattr_values_get_sp(vattr_context *c,
if(!vattr_context_is_loop_msg_displayed(&c))
{
/* Print a handy error log message */
- LDAPDebug(LDAP_DEBUG_ANY,
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
"Detected virtual attribute loop in get on entry %s, attribute
%s\n",
slapi_entry_get_dn_const(e), type, 0);
vattr_context_set_loop_msg_displayed(&c);
@@ -831,7 +831,7 @@ int slapi_vattr_namespace_values_get_sp(vattr_context *c,
/* Print a handy error log message */
if(!vattr_context_is_loop_msg_displayed(&c))
{
- LDAPDebug(LDAP_DEBUG_ANY,"Detected virtual attribute loop in get on entry %s,
attribute %s\n", slapi_entry_get_dn_const(e), type, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Detected virtual attribute loop in get on
entry %s, attribute %s\n", slapi_entry_get_dn_const(e), type, 0);
vattr_context_set_loop_msg_displayed(&c);
}
return rc;
@@ -1060,7 +1060,7 @@ int slapi_vattr_namespace_value_compare_sp(vattr_context *c,/* Entry
we're inter
if (0 != rc) {
if(!vattr_context_is_loop_msg_displayed(&c)) {
/* Print a handy error log message */
- LDAPDebug(LDAP_DEBUG_ANY,"Detected virtual attribute loop in compare on entry %s,
attribute %s\n", slapi_entry_get_dn_const(e), type, 0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Detected virtual attribute loop in compare on
entry %s, attribute %s\n", slapi_entry_get_dn_const(e), type, 0);
vattr_context_set_loop_msg_displayed(&c);
}
return rc;
@@ -1197,7 +1197,7 @@ int slapi_vattr_list_attrs(/* Entry we're interested in */
Slapi_Entry *e,
vattr_type_list_context type_context = {0};
if (NULL == types || NULL == buffer_flags) {
- LDAPDebug(LDAP_DEBUG_ANY, "slapi_vattr_list_attrs: invalid param\n", 0, 0,
0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "slapi_vattr_list_attrs: invalid param\n",
0, 0, 0);
return -1;
}
@@ -1946,7 +1946,7 @@ int vattr_add_attrval(objAttrValue **attrval, char *val)
int ret = 0;
objAttrValue *theVal;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> vattr_add_attrval\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> vattr_add_attrval\n",0,0,0);
/* create the attrvalue */
theVal = (objAttrValue*) slapi_ch_malloc(sizeof(objAttrValue));
@@ -1961,17 +1961,17 @@ int vattr_add_attrval(objAttrValue **attrval, char *val)
else
{
slapi_ch_free((void**)&theVal);
- LDAPDebug( LDAP_DEBUG_ANY, "vattr_add_attrval: failed to allocate
memory\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "vattr_add_attrval: failed to allocate
memory\n",0,0,0);
ret = -1;
}
}
else
{
- LDAPDebug( LDAP_DEBUG_ANY, "vattr_add_attrval: failed to allocate
memory\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "vattr_add_attrval: failed to allocate
memory\n",0,0,0);
ret = -1;
}
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- vattr_add_attrval\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- vattr_add_attrval\n",0,0,0);
return ret;
}
@@ -1981,7 +1981,7 @@ objAttrValue *vattr_map_entry_build_schema(char *type_name)
objAttrValue *ret = 0;
struct objclass *oc;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> vattr_map_entry_build_schema\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-->
vattr_map_entry_build_schema\n",0,0,0);
/* this is the first opportunity to register
* with the statechange api, our init function
@@ -2000,7 +2000,7 @@ objAttrValue *vattr_map_entry_build_schema(char *type_name)
if(!config_get_schemacheck())
{
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- vattr_map_entry_build_schema - schema
off\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- vattr_map_entry_build_schema -
schema off\n",0,0,0);
return 0;
}
@@ -2038,7 +2038,7 @@ objAttrValue *vattr_map_entry_build_schema(char *type_name)
}
oc_unlock();
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- vattr_map_entry_build_schema\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<--
vattr_map_entry_build_schema\n",0,0,0);
return ret;
}
commit 051e0eb50c74d5208355253ff53b301c262c7df2
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Wed Sep 7 11:37:34 2016 -0400
Ticket 48978 - Update the logging function to accept sev level
Description: Change LDAPDebug() and slapi_log_error() to accept
a security level(syslog level).
https://fedorahosted.org/389/ticket/48978
Reviewed by: ?
diff --git a/ldap/include/ldaplog.h b/ldap/include/ldaplog.h
index f348c05..ae8d798 100644
--- a/ldap/include/ldaplog.h
+++ b/ldap/include/ldaplog.h
@@ -44,11 +44,11 @@ extern "C" {
/* debugging stuff */
/* Disable by default */
-#define LDAPDebug( level, fmt, arg1, arg2, arg3 )
+#define LDAPDebug( level, sev, fmt, arg1, arg2, arg3 )
#define LDAPDebugLevelIsSet( level ) (0)
-#define LDAPDebug0Args( level, fmt )
-#define LDAPDebug1Arg( level, fmt, arg )
-#define LDAPDebug2Args( level, fmt, arg1, arg2 )
+#define LDAPDebug0Args( level, sev, fmt )
+#define LDAPDebug1Arg( level, sev, fmt, arg )
+#define LDAPDebug2Args( level, sev, fmt, arg1, arg2 )
#ifdef LDAP_DEBUG
# undef LDAPDebug
@@ -58,28 +58,28 @@ extern "C" {
# undef LDAPDebugLevelIsSet
extern int slapd_ldap_debug;
-# define LDAPDebug( level, fmt, arg1, arg2, arg3 ) \
+# define LDAPDebug( level, sev, fmt, arg1, arg2, arg3 ) \
{ \
if ( slapd_ldap_debug & level ) { \
- slapd_log_error_proc( NULL, fmt, arg1, arg2, arg3 ); \
+ slapd_log_error_proc( NULL, sev, fmt, arg1, arg2, arg3 ); \
} \
}
-# define LDAPDebug0Args( level, fmt ) \
+# define LDAPDebug0Args( level, sev, fmt ) \
{ \
if ( slapd_ldap_debug & level ) { \
- slapd_log_error_proc( NULL, fmt ); \
+ slapd_log_error_proc( NULL, sev, fmt ); \
} \
}
-# define LDAPDebug1Arg( level, fmt, arg ) \
+# define LDAPDebug1Arg( level, sev, fmt, arg ) \
{ \
if ( slapd_ldap_debug & level ) { \
- slapd_log_error_proc( NULL, fmt, arg ); \
+ slapd_log_error_proc( NULL, sev, fmt, arg ); \
} \
}
-# define LDAPDebug2Args( level, fmt, arg1, arg2 ) \
+# define LDAPDebug2Args( level, sev, fmt, arg1, arg2 ) \
{ \
if ( slapd_ldap_debug & level ) { \
- slapd_log_error_proc( NULL, fmt, arg1, arg2 ); \
+ slapd_log_error_proc( NULL, sev, fmt, arg1, arg2 ); \
} \
}
# define LDAPDebugLevelIsSet( level ) (0 != (slapd_ldap_debug & level))
diff --git a/ldap/servers/slapd/log.c b/ldap/servers/slapd/log.c
index dece857..e5c6e11 100644
--- a/ldap/servers/slapd/log.c
+++ b/ldap/servers/slapd/log.c
@@ -91,7 +91,7 @@ static PRInt64 log__getfilesize(LOGFD fp);
static PRInt64 log__getfilesize_with_filename(char *filename);
static int log__enough_freespace(char *path);
-static int vslapd_log_error(LOGFD fp, char *subsystem, char *fmt, va_list ap, int locked
);
+static int vslapd_log_error(LOGFD fp, int sev_level, char *subsystem, char *fmt, va_list
ap, int locked );
static int vslapd_log_access(char *fmt, va_list ap );
static void log_convert_time (time_t ctime, char *tbuf, int type);
static time_t log_reverse_convert_time (char *tbuf);
@@ -104,8 +104,9 @@ static void vslapd_log_emergency_error(LOGFD fp, const char *msg, int
locked);
static int
slapd_log_error_proc_internal(
- char *subsystem, /* omitted if NULL */
- char *fmt,
+ char *subsystem, /* omitted if NULL */
+ int *sev_level,
+ char *fmt,
va_list ap_err,
va_list ap_file);
@@ -2096,8 +2097,9 @@ slapd_log_auditfail_internal (
******************************************************************************/
int
slapd_log_error_proc(
- char *subsystem, /* omitted if NULL */
- char *fmt,
+ char *subsystem, /* omitted if NULL */
+ int *sev_level,
+ char *fmt,
... )
{
int rc = LDAP_SUCCESS;
@@ -2107,7 +2109,7 @@ slapd_log_error_proc(
if (loginfo.log_backend & LOGGING_BACKEND_INTERNAL) {
va_start( ap_err, fmt );
va_start( ap_file, fmt );
- rc = slapd_log_error_proc_internal( subsystem, fmt, ap_err, ap_file );
+ rc = slapd_log_error_proc_internal( subsystem, sev_level, fmt, ap_err, ap_file
);
va_end(ap_file);
va_end(ap_err);
}
@@ -2118,7 +2120,7 @@ slapd_log_error_proc(
va_start( ap_err, fmt );
/* va_start( ap_file, fmt ); */
/* This returns void, so we hope it worked */
- vsyslog(LOG_ERROR, fmt, ap_err);
+ vsyslog(sev_level, fmt, ap_err);
/* vsyslog(LOG_ERROR, fmt, ap_file); */
/* va_end(ap_file); */
va_end(ap_err);
@@ -2128,7 +2130,7 @@ slapd_log_error_proc(
va_start( ap_err, fmt );
/* va_start( ap_file, fmt ); */
/* This isn't handling RC nicely ... */
- rc = sd_journal_printv(LOG_ERROR, fmt, ap_err);
+ rc = sd_journal_printv(sev_level, fmt, ap_err);
/* rc = sd_journal_printv(LOG_ERROR, fmt, ap_file); */
/* va_end(ap_file); */
va_end(ap_err);
@@ -2139,8 +2141,9 @@ slapd_log_error_proc(
static int
slapd_log_error_proc_internal(
- char *subsystem, /* omitted if NULL */
- char *fmt,
+ char *subsystem, /* omitted if NULL */
+ int *sev_level,
+ char *fmt,
va_list ap_err,
va_list ap_file)
{
@@ -2162,19 +2165,19 @@ slapd_log_error_proc_internal(
}
if (!(detached)) {
- rc = vslapd_log_error( NULL, subsystem, fmt, ap_err, 1 );
+ rc = vslapd_log_error( NULL, sev_level, subsystem, fmt, ap_err, 1 );
}
if ( loginfo.log_error_fdes != NULL ) {
if (loginfo.log_error_state & LOGGING_NEED_TITLE) {
log_write_title(loginfo.log_error_fdes);
loginfo.log_error_state &= ~LOGGING_NEED_TITLE;
}
- rc = vslapd_log_error( loginfo.log_error_fdes, subsystem, fmt, ap_file, 1 );
+ rc = vslapd_log_error( loginfo.log_error_fdes, sev_level, subsystem, fmt, ap_file, 1
);
}
LOG_ERROR_UNLOCK_WRITE();
} else {
/* log the problem in the stderr */
- rc = vslapd_log_error( NULL, subsystem, fmt, ap_err, 0 );
+ rc = vslapd_log_error( NULL, sev_level, subsystem, fmt, ap_err, 0 );
}
return( rc );
}
@@ -2230,6 +2233,7 @@ vslapd_log_emergency_error(LOGFD fp, const char *msg, int locked)
static int
vslapd_log_error(
LOGFD fp,
+ iont sev_level,
char *subsystem, /* omitted if NULL */
char *fmt,
va_list ap,
@@ -2291,9 +2295,11 @@ vslapd_log_error(
/* blen = strlen(buffer); */
/* This truncates again .... But we have the nice smprintf above! */
if (subsystem == NULL) {
- PR_snprintf (buffer+blen, sizeof(buffer)-blen, "%s", vbuf);
+ PR_snprintf (buffer+blen, sizeof(buffer)-blen, "%s - %s",
+ vbuf, toupper(prioritynames[sev_level].c_name));
} else {
- PR_snprintf (buffer+blen, sizeof(buffer)-blen, "%s - %s", subsystem,
vbuf);
+ PR_snprintf (buffer+blen, sizeof(buffer)-blen, "%s - %s - %s",
+ subsystem, toupper(prioritynames[sev_level].c_name), vbuf);
}
buffer[sizeof(buffer)-1] = '\0';
@@ -2330,26 +2336,32 @@ vslapd_log_error(
return( 0 );
}
+/*
+ * Log a message to the errors log
+ *
+ * loglevel - The logging level: replication, plugin, etc
+ * severity - LOG_ERR, LOG_WARNING, LOG_INFO, etc
+ */
int
-slapi_log_error( int severity, char *subsystem, char *fmt, ... )
+slapi_log_error( int loglevel, int severity, char *subsystem, char *fmt, ... )
{
va_list ap_err;
va_list ap_file;
int rc = LDAP_SUCCESS;
int lbackend = loginfo.log_backend; /* We copy this to make these next checks atomic
*/
- if ( severity < SLAPI_LOG_MIN || severity > SLAPI_LOG_MAX ) {
+ if ( loglevel < SLAPI_LOG_MIN || loglevel > SLAPI_LOG_MAX ) {
(void)slapd_log_error_proc( subsystem,
"slapi_log_error: invalid severity %d (message %s)\n",
- severity, fmt );
+ loglevel, fmt );
return( -1 );
}
- if ( slapd_ldap_debug & slapi_log_map[ severity ] ) {
+ if ( slapd_ldap_debug & slapi_log_map[ loglevel ] ) {
if (lbackend & LOGGING_BACKEND_INTERNAL) {
va_start( ap_err, fmt );
va_start( ap_file, fmt );
- rc = slapd_log_error_proc_internal( subsystem, fmt, ap_err, ap_file );
+ rc = slapd_log_error_proc_internal( subsystem, severity, fmt, ap_err, ap_file
);
va_end(ap_file);
va_end(ap_err);
}
@@ -2360,7 +2372,7 @@ slapi_log_error( int severity, char *subsystem, char *fmt, ... )
va_start( ap_err, fmt );
/* va_start( ap_file, fmt ); */
/* This returns void, so we hope it worked */
- vsyslog(LOG_ERROR, fmt, ap_err);
+ vsyslog(severity, fmt, ap_err);
/* vsyslog(LOG_ERROR, fmt, ap_file); */
/* va_end(ap_file); */
va_end(ap_err);
@@ -2370,7 +2382,7 @@ slapi_log_error( int severity, char *subsystem, char *fmt, ... )
va_start( ap_err, fmt );
/* va_start( ap_file, fmt ); */
/* This isn't handling RC nicely ... */
- rc = sd_journal_printv(LOG_ERROR, fmt, ap_err);
+ rc = sd_journal_printv(severity, fmt, ap_err);
/* rc = sd_journal_printv(LOG_ERROR, fmt, ap_file); */
/* va_end(ap_file); */
va_end(ap_err);