ldap/include ldap/servers lib/base
by Mark Reynolds
ldap/include/ldaplog.h | 74
ldap/servers/plugins/acct_usability/acct_usability.c | 48
ldap/servers/plugins/acctpolicy/acct_config.c | 16
ldap/servers/plugins/acctpolicy/acct_init.c | 34
ldap/servers/plugins/acctpolicy/acct_plugin.c | 90
ldap/servers/plugins/acctpolicy/acct_util.c | 16
ldap/servers/plugins/acl/acl.c | 370 +--
ldap/servers/plugins/acl/acl_ext.c | 112
ldap/servers/plugins/acl/aclanom.c | 44
ldap/servers/plugins/acl/acleffectiverights.c | 66
ldap/servers/plugins/acl/aclgroup.c | 14
ldap/servers/plugins/acl/aclinit.c | 98
ldap/servers/plugins/acl/acllas.c | 438 +--
ldap/servers/plugins/acl/acllist.c | 80
ldap/servers/plugins/acl/aclparse.c | 81
ldap/servers/plugins/acl/aclplugin.c | 18
ldap/servers/plugins/acl/aclutil.c | 40
ldap/servers/plugins/automember/automember.c | 353 +--
ldap/servers/plugins/bitwise/bitwise.c | 8
ldap/servers/plugins/chainingdb/cb_add.c | 18
ldap/servers/plugins/chainingdb/cb_bind.c | 8
ldap/servers/plugins/chainingdb/cb_close.c | 4
ldap/servers/plugins/chainingdb/cb_compare.c | 12
ldap/servers/plugins/chainingdb/cb_config.c | 33
ldap/servers/plugins/chainingdb/cb_conn_stateless.c | 128 -
ldap/servers/plugins/chainingdb/cb_controls.c | 8
ldap/servers/plugins/chainingdb/cb_delete.c | 16
ldap/servers/plugins/chainingdb/cb_init.c | 2
ldap/servers/plugins/chainingdb/cb_instance.c | 37
ldap/servers/plugins/chainingdb/cb_modify.c | 18
ldap/servers/plugins/chainingdb/cb_modrdn.c | 16
ldap/servers/plugins/chainingdb/cb_monitor.c | 2
ldap/servers/plugins/chainingdb/cb_schema.c | 2
ldap/servers/plugins/chainingdb/cb_search.c | 38
ldap/servers/plugins/chainingdb/cb_utils.c | 24
ldap/servers/plugins/collation/collate.c | 34
ldap/servers/plugins/collation/config.c | 14
ldap/servers/plugins/collation/orfilter.c | 36
ldap/servers/plugins/cos/cos.c | 34
ldap/servers/plugins/cos/cos_cache.c | 428 +--
ldap/servers/plugins/deref/deref.c | 74
ldap/servers/plugins/dna/dna.c | 513 ++--
ldap/servers/plugins/http/http_client.c | 58
ldap/servers/plugins/http/http_impl.c | 171 -
ldap/servers/plugins/linkedattrs/fixup_task.c | 48
ldap/servers/plugins/linkedattrs/linked_attrs.c | 266 +-
ldap/servers/plugins/memberof/memberof.c | 213 -
ldap/servers/plugins/memberof/memberof_config.c | 22
ldap/servers/plugins/mep/mep.c | 392 +--
ldap/servers/plugins/pam_passthru/pam_ptconfig.c | 68
ldap/servers/plugins/pam_passthru/pam_ptimpl.c | 36
ldap/servers/plugins/pam_passthru/pam_ptpreop.c | 114
ldap/servers/plugins/passthru/ptbind.c | 2
ldap/servers/plugins/passthru/ptconfig.c | 40
ldap/servers/plugins/passthru/ptconn.c | 26
ldap/servers/plugins/passthru/ptpreop.c | 44
ldap/servers/plugins/posix-winsync/posix-group-func.c | 122 -
ldap/servers/plugins/posix-winsync/posix-group-task.c | 60
ldap/servers/plugins/posix-winsync/posix-winsync-config.c | 54
ldap/servers/plugins/posix-winsync/posix-winsync.c | 305 +-
ldap/servers/plugins/presence/presence.c | 165 -
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 | 180 -
ldap/servers/plugins/replication/cl4_api.c | 58
ldap/servers/plugins/replication/cl4_init.c | 22
ldap/servers/plugins/replication/cl5_api.c | 1398 ++++++------
ldap/servers/plugins/replication/cl5_clcache.c | 97
ldap/servers/plugins/replication/cl5_config.c | 102
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 | 30
ldap/servers/plugins/replication/legacy_consumer.c | 20
ldap/servers/plugins/replication/llist.c | 8
ldap/servers/plugins/replication/profile.c | 4
ldap/servers/plugins/replication/repl5.h | 4
ldap/servers/plugins/replication/repl5_agmt.c | 91
ldap/servers/plugins/replication/repl5_agmtlist.c | 123 -
ldap/servers/plugins/replication/repl5_connection.c | 261 +-
ldap/servers/plugins/replication/repl5_inc_protocol.c | 311 +-
ldap/servers/plugins/replication/repl5_init.c | 174 -
ldap/servers/plugins/replication/repl5_mtnode_ext.c | 8
ldap/servers/plugins/replication/repl5_plugins.c | 94
ldap/servers/plugins/replication/repl5_protocol.c | 50
ldap/servers/plugins/replication/repl5_protocol_util.c | 88
ldap/servers/plugins/replication/repl5_replica.c | 422 +--
ldap/servers/plugins/replication/repl5_replica_config.c | 366 +--
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 | 122 -
ldap/servers/plugins/replication/repl5_schedule.c | 4
ldap/servers/plugins/replication/repl5_tot_protocol.c | 136 -
ldap/servers/plugins/replication/repl5_total.c | 39
ldap/servers/plugins/replication/repl5_updatedn_list.c | 16
ldap/servers/plugins/replication/repl_bind.c | 2
ldap/servers/plugins/replication/repl_connext.c | 45
ldap/servers/plugins/replication/repl_extop.c | 119 -
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 | 148 -
ldap/servers/plugins/replication/test_repl_session_plugin.c | 40
ldap/servers/plugins/replication/urp.c | 122 -
ldap/servers/plugins/replication/urp_glue.c | 25
ldap/servers/plugins/replication/urp_tombstone.c | 16
ldap/servers/plugins/replication/windows_connection.c | 277 +-
ldap/servers/plugins/replication/windows_inc_protocol.c | 358 +--
ldap/servers/plugins/replication/windows_private.c | 392 +--
ldap/servers/plugins/replication/windows_protocol_util.c | 567 ++--
ldap/servers/plugins/replication/windows_tot_protocol.c | 87
ldap/servers/plugins/retrocl/retrocl.c | 56
ldap/servers/plugins/retrocl/retrocl_cn.c | 4
ldap/servers/plugins/retrocl/retrocl_create.c | 64
ldap/servers/plugins/retrocl/retrocl_po.c | 40
ldap/servers/plugins/retrocl/retrocl_trim.c | 45
ldap/servers/plugins/rever/rever.c | 8
ldap/servers/plugins/roles/roles_cache.c | 225 -
ldap/servers/plugins/roles/roles_plugin.c | 28
ldap/servers/plugins/rootdn_access/rootdn_access.c | 105
ldap/servers/plugins/schema_reload/schema_reload.c | 24
ldap/servers/plugins/statechange/statechange.c | 32
ldap/servers/plugins/sync/sync_init.c | 20
ldap/servers/plugins/sync/sync_persist.c | 35
ldap/servers/plugins/sync/sync_refresh.c | 11
ldap/servers/plugins/sync/sync_util.c | 8
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 | 33
ldap/servers/plugins/syntaxes/syntax_common.c | 11
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 | 22
ldap/servers/plugins/syntaxes/value.c | 2
ldap/servers/plugins/uiduniq/7bit.c | 65
ldap/servers/plugins/uiduniq/uid.c | 112
ldap/servers/plugins/uiduniq/utils.c | 2
ldap/servers/plugins/usn/usn.c | 98
ldap/servers/plugins/usn/usn_cleanup.c | 72
ldap/servers/plugins/vattrsp_template/vattrsp.c | 32
ldap/servers/plugins/views/views.c | 58
ldap/servers/plugins/whoami/whoami.c | 10
ldap/servers/slapd/abandon.c | 16
ldap/servers/slapd/add.c | 34
ldap/servers/slapd/attr.c | 14
ldap/servers/slapd/attrlist.c | 4
ldap/servers/slapd/attrsyntax.c | 32
ldap/servers/slapd/auditlog.c | 2
ldap/servers/slapd/auth.c | 26
ldap/servers/slapd/ava.c | 5
ldap/servers/slapd/back-ldbm/ancestorid.c | 86
ldap/servers/slapd/back-ldbm/archive.c | 107
ldap/servers/slapd/back-ldbm/cache.c | 78
ldap/servers/slapd/back-ldbm/cleanup.c | 6
ldap/servers/slapd/back-ldbm/close.c | 10
ldap/servers/slapd/back-ldbm/dbhelp.c | 78
ldap/servers/slapd/back-ldbm/dblayer.c | 851 +++----
ldap/servers/slapd/back-ldbm/dbverify.c | 36
ldap/servers/slapd/back-ldbm/dbversion.c | 9
ldap/servers/slapd/back-ldbm/dn2entry.c | 26
ldap/servers/slapd/back-ldbm/filterindex.c | 94
ldap/servers/slapd/back-ldbm/findentry.c | 36
ldap/servers/slapd/back-ldbm/id2entry.c | 63
ldap/servers/slapd/back-ldbm/idl.c | 230 -
ldap/servers/slapd/back-ldbm/idl_new.c | 88
ldap/servers/slapd/back-ldbm/import-merge.c | 290 +-
ldap/servers/slapd/back-ldbm/import-threads.c | 479 ++--
ldap/servers/slapd/back-ldbm/import.c | 227 +
ldap/servers/slapd/back-ldbm/import.h | 8
ldap/servers/slapd/back-ldbm/index.c | 149 -
ldap/servers/slapd/back-ldbm/init.c | 20
ldap/servers/slapd/back-ldbm/instance.c | 24
ldap/servers/slapd/back-ldbm/ldbm_add.c | 143 -
ldap/servers/slapd/back-ldbm/ldbm_attr.c | 34
ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c | 308 +-
ldap/servers/slapd/back-ldbm/ldbm_attrcrypt_config.c | 13
ldap/servers/slapd/back-ldbm/ldbm_bind.c | 4
ldap/servers/slapd/back-ldbm/ldbm_compare.c | 6
ldap/servers/slapd/back-ldbm/ldbm_config.c | 134 -
ldap/servers/slapd/back-ldbm/ldbm_delete.c | 213 -
ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c | 854 +++----
ldap/servers/slapd/back-ldbm/ldbm_index_config.c | 58
ldap/servers/slapd/back-ldbm/ldbm_instance_config.c | 147 -
ldap/servers/slapd/back-ldbm/ldbm_modify.c | 65
ldap/servers/slapd/back-ldbm/ldbm_modrdn.c | 170 -
ldap/servers/slapd/back-ldbm/ldbm_search.c | 61
ldap/servers/slapd/back-ldbm/ldbm_usn.c | 15
ldap/servers/slapd/back-ldbm/ldif2ldbm.c | 523 ++--
ldap/servers/slapd/back-ldbm/misc.c | 24
ldap/servers/slapd/back-ldbm/nextid.c | 66
ldap/servers/slapd/back-ldbm/parents.c | 3
ldap/servers/slapd/back-ldbm/rmdb.c | 4
ldap/servers/slapd/back-ldbm/seq.c | 24
ldap/servers/slapd/back-ldbm/sort.c | 10
ldap/servers/slapd/back-ldbm/start.c | 82
ldap/servers/slapd/back-ldbm/uniqueid2entry.c | 4
ldap/servers/slapd/back-ldbm/upgrade.c | 29
ldap/servers/slapd/back-ldbm/vlv.c | 144 -
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 | 20
ldap/servers/slapd/backend_manager.c | 6
ldap/servers/slapd/bind.c | 26
ldap/servers/slapd/bulk_import.c | 22
ldap/servers/slapd/ch_malloc.c | 12
ldap/servers/slapd/charray.c | 2
ldap/servers/slapd/compare.c | 8
ldap/servers/slapd/config.c | 145 -
ldap/servers/slapd/configdse.c | 14
ldap/servers/slapd/connection.c | 120 -
ldap/servers/slapd/conntable.c | 25
ldap/servers/slapd/control.c | 34
ldap/servers/slapd/counters.c | 4
ldap/servers/slapd/csn.c | 5
ldap/servers/slapd/csngen.c | 78
ldap/servers/slapd/daemon.c | 318 +-
ldap/servers/slapd/defbackend.c | 14
ldap/servers/slapd/delete.c | 12
ldap/servers/slapd/detach.c | 42
ldap/servers/slapd/dn.c | 34
ldap/servers/slapd/dse.c | 92
ldap/servers/slapd/dynalib.c | 6
ldap/servers/slapd/entry.c | 165 -
ldap/servers/slapd/entrywsi.c | 30
ldap/servers/slapd/errormap.c | 8
ldap/servers/slapd/eventq.c | 24
ldap/servers/slapd/extendop.c | 72
ldap/servers/slapd/factory.c | 17
ldap/servers/slapd/features.c | 4
ldap/servers/slapd/fedse.c | 6
ldap/servers/slapd/filter.c | 76
ldap/servers/slapd/filtercmp.c | 12
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 | 267 +-
ldap/servers/slapd/libglobs.c | 43
ldap/servers/slapd/localhost.c | 24
ldap/servers/slapd/lock.c | 4
ldap/servers/slapd/log.c | 199 +
ldap/servers/slapd/log.h | 3
ldap/servers/slapd/main.c | 241 +-
ldap/servers/slapd/mapping_tree.c | 153 -
ldap/servers/slapd/mempool.c | 18
ldap/servers/slapd/modify.c | 22
ldap/servers/slapd/modrdn.c | 38
ldap/servers/slapd/modutil.c | 14
ldap/servers/slapd/operation.c | 12
ldap/servers/slapd/opshared.c | 12
ldap/servers/slapd/pagedresults.c | 146 -
ldap/servers/slapd/passwd_extop.c | 58
ldap/servers/slapd/pblock.c | 76
ldap/servers/slapd/plugin.c | 145 -
ldap/servers/slapd/plugin_acl.c | 6
ldap/servers/slapd/plugin_internal_op.c | 20
ldap/servers/slapd/plugin_mr.c | 34
ldap/servers/slapd/plugin_syntax.c | 74
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 | 110
ldap/servers/slapd/pw_retry.c | 8
ldap/servers/slapd/referral.c | 8
ldap/servers/slapd/resourcelimit.c | 52
ldap/servers/slapd/result.c | 88
ldap/servers/slapd/sasl_io.c | 150 -
ldap/servers/slapd/sasl_map.c | 60
ldap/servers/slapd/saslbind.c | 84
ldap/servers/slapd/schema.c | 206 -
ldap/servers/slapd/schemaparse.c | 6
ldap/servers/slapd/search.c | 6
ldap/servers/slapd/slap.h | 12
ldap/servers/slapd/slapi-plugin.h | 53
ldap/servers/slapd/snmp_collator.c | 12
ldap/servers/slapd/ssl.c | 210 -
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 | 223 -
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 | 64
ldap/servers/slapd/uuid.c | 48
ldap/servers/slapd/value.c | 2
ldap/servers/slapd/valueset.c | 4
ldap/servers/slapd/vattr.c | 24
lib/base/ereport.cpp | 6
325 files changed, 12653 insertions(+), 12432 deletions(-)
New commits:
commit fb9b9ef0a74f64abd89e52c5c90fe7dfcea6ba71
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Sep 20 16:25:51 2016 -0400
Ticket 48978 - Update error logging with new codes
Description: Updated all the error log messages to make them uniform, and
use the new precise error log levels. Also fixed copy/paste
errors, typos, and grammar.
https://fedorahosted.org/389/ticket/48978
Reviewed by: nhosoi(Thanks!)
diff --git a/ldap/include/ldaplog.h b/ldap/include/ldaplog.h
index ae8d798..1593b6b 100644
--- a/ldap/include/ldaplog.h
+++ b/ldap/include/ldaplog.h
@@ -18,37 +18,45 @@
extern "C" {
#endif
-#define LDAP_DEBUG_TRACE 0x000001 /* 1 */
-#define LDAP_DEBUG_PACKETS 0x000002 /* 2 */
-#define LDAP_DEBUG_ARGS 0x000004 /* 4 */
-#define LDAP_DEBUG_CONNS 0x000008 /* 8 */
-#define LDAP_DEBUG_BER 0x000010 /* 16 */
-#define LDAP_DEBUG_FILTER 0x000020 /* 32 */
-#define LDAP_DEBUG_CONFIG 0x000040 /* 64 */
-#define LDAP_DEBUG_ACL 0x000080 /* 128 */
-#define LDAP_DEBUG_STATS 0x000100 /* 256 */
-#define LDAP_DEBUG_STATS2 0x000200 /* 512 */
-#define LDAP_DEBUG_SHELL 0x000400 /* 1024 */
-#define LDAP_DEBUG_PARSE 0x000800 /* 2048 */
-#define LDAP_DEBUG_HOUSE 0x001000 /* 4096 */
-#define LDAP_DEBUG_REPL 0x002000 /* 8192 */
-#define LDAP_DEBUG_ANY 0x004000 /* 16384 */
-#define LDAP_DEBUG_CACHE 0x008000 /* 32768 */
-#define LDAP_DEBUG_PLUGIN 0x010000 /* 65536 */
-#define LDAP_DEBUG_TIMING 0x020000 /* 131072 */
-#define LDAP_DEBUG_ACLSUMMARY 0x040000 /* 262144 */
-#define LDAP_DEBUG_BACKLDBM 0x080000 /* 524288 */
-#define LDAP_DEBUG_NUNCSTANS 0x100000 /* 1048576 */
+#define LDAP_DEBUG_TRACE 0x00000001 /* 1 */
+#define LDAP_DEBUG_PACKETS 0x00000002 /* 2 */
+#define LDAP_DEBUG_ARGS 0x00000004 /* 4 */
+#define LDAP_DEBUG_CONNS 0x00000008 /* 8 */
+#define LDAP_DEBUG_BER 0x00000010 /* 16 */
+#define LDAP_DEBUG_FILTER 0x00000020 /* 32 */
+#define LDAP_DEBUG_CONFIG 0x00000040 /* 64 */
+#define LDAP_DEBUG_ACL 0x00000080 /* 128 */
+#define LDAP_DEBUG_STATS 0x00000100 /* 256 */
+#define LDAP_DEBUG_STATS2 0x00000200 /* 512 */
+#define LDAP_DEBUG_SHELL 0x00000400 /* 1024 */
+#define LDAP_DEBUG_PARSE 0x00000800 /* 2048 */
+#define LDAP_DEBUG_HOUSE 0x00001000 /* 4096 */
+#define LDAP_DEBUG_REPL 0x00002000 /* 8192 */
+#define LDAP_DEBUG_ANY 0x00004000 /* 16384 */
+#define LDAP_DEBUG_CACHE 0x00008000 /* 32768 */
+#define LDAP_DEBUG_PLUGIN 0x00010000 /* 65536 */
+#define LDAP_DEBUG_TIMING 0x00020000 /* 131072 */
+#define LDAP_DEBUG_ACLSUMMARY 0x00040000 /* 262144 */
+#define LDAP_DEBUG_BACKLDBM 0x00080000 /* 524288 */
+#define LDAP_DEBUG_NUNCSTANS 0x00100000 /* 1048576 */
+#define LDAP_DEBUG_EMERG 0x00200000 /* 2097152 */
+#define LDAP_DEBUG_ALERT 0x00400000 /* 4194304 */
+#define LDAP_DEBUG_CRIT 0x00800000 /* 8388608 */
+#define LDAP_DEBUG_ERR 0x01000000 /* 16777216 */
+#define LDAP_DEBUG_WARNING 0x02000000 /* 33554432 */
+#define LDAP_DEBUG_NOTICE 0x04000000 /* 67108864 */
+#define LDAP_DEBUG_INFO 0x08000000 /* 134217728 */
+#define LDAP_DEBUG_DEBUG 0x10000000 /* 268435456 */
#define LDAP_DEBUG_ALL_LEVELS 0xFFFFFF
/* debugging stuff */
/* Disable by default */
-#define LDAPDebug( level, sev, fmt, arg1, arg2, arg3 )
+#define LDAPDebug( level, fmt, arg1, arg2, arg3 )
#define LDAPDebugLevelIsSet( level ) (0)
-#define LDAPDebug0Args( level, sev, fmt )
-#define LDAPDebug1Arg( level, sev, fmt, arg )
-#define LDAPDebug2Args( level, sev, fmt, arg1, arg2 )
+#define LDAPDebug0Args( level, fmt )
+#define LDAPDebug1Arg( level, fmt, arg )
+#define LDAPDebug2Args( level, fmt, arg1, arg2 )
#ifdef LDAP_DEBUG
# undef LDAPDebug
@@ -58,28 +66,28 @@ extern "C" {
# undef LDAPDebugLevelIsSet
extern int slapd_ldap_debug;
-# define LDAPDebug( level, sev, fmt, arg1, arg2, arg3 ) \
+# define LDAPDebug( level, fmt, arg1, arg2, arg3 ) \
{ \
if ( slapd_ldap_debug & level ) { \
- slapd_log_error_proc( NULL, sev, fmt, arg1, arg2, arg3 ); \
+ slapd_log_error_proc( level, NULL, fmt, arg1, arg2, arg3 ); \
} \
}
-# define LDAPDebug0Args( level, sev, fmt ) \
+# define LDAPDebug0Args( level, fmt ) \
{ \
if ( slapd_ldap_debug & level ) { \
- slapd_log_error_proc( NULL, sev, fmt ); \
+ slapd_log_error_proc( level, NULL, fmt ); \
} \
}
-# define LDAPDebug1Arg( level, sev, fmt, arg ) \
+# define LDAPDebug1Arg( level, fmt, arg ) \
{ \
if ( slapd_ldap_debug & level ) { \
- slapd_log_error_proc( NULL, sev, fmt, arg ); \
+ slapd_log_error_proc( level, NULL, fmt, arg ); \
} \
}
-# define LDAPDebug2Args( level, sev, fmt, arg1, arg2 ) \
+# define LDAPDebug2Args( level, fmt, arg1, arg2 ) \
{ \
if ( slapd_ldap_debug & level ) { \
- slapd_log_error_proc( NULL, sev, fmt, arg1, arg2 ); \
+ slapd_log_error_proc( level, NULL, fmt, arg1, arg2 ); \
} \
}
# define LDAPDebugLevelIsSet( level ) (0 != (slapd_ldap_debug & level))
diff --git a/ldap/servers/plugins/acct_usability/acct_usability.c b/ldap/servers/plugins/acct_usability/acct_usability.c
index d1d58c7..1f958a5 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, LOG_DEBUG, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUC_PLUGIN_SUBSYSTEM,
"--> auc_init\n");
/* Store the plugin identity for later use.
@@ -102,8 +102,8 @@ 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, LOG_ERR, AUC_PLUGIN_SUBSYSTEM,
- "auc_init: failed to register plugin\n");
+ slapi_log_error(SLAPI_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, LOG_DEBUG, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUC_PLUGIN_SUBSYSTEM,
"--> auc_start\n");
- 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_PLUGIN, AUC_PLUGIN_SUBSYSTEM,
+ "auc_start - Account usability control plug-in: ready for service\n");
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUC_PLUGIN_SUBSYSTEM,
"--> auc_close\n");
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUC_PLUGIN_SUBSYSTEM,
"<-- auc_close\n");
return 0;
@@ -200,8 +200,8 @@ static LDAPControl *auc_create_response_ctrl(Slapi_Entry *e)
time_t now = slapi_current_time();
if (!e) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUC_PLUGIN_SUBSYSTEM,
- "auc_create_response_ctrl: NULL entry specified.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, AUC_PLUGIN_SUBSYSTEM,
- "The account usability control was specified more than "
+ slapi_log_error(SLAPI_LOG_ERR, AUC_PLUGIN_SUBSYSTEM,
+ "auc_pre_search - 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, LOG_ERR, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_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,9 +314,9 @@ auc_pre_search(Slapi_PBlock *pb)
}
if (aucctrl && incompatible) {
- 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);
+ slapi_log_error(SLAPI_LOG_ERR, AUC_PLUGIN_SUBSYSTEM,
+ "auc_pre_search - 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:
The semantics of the criticality field are specified in [RFC4511].
In detail, the criticality of the control determines whether the
@@ -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, LOG_DEBUG, AUC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUC_PLUGIN_SUBSYSTEM,
"<-- auc_pre_op\n");
return ldapcode;
@@ -394,16 +394,16 @@ 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, LOG_ERR, AUC_PLUGIN_SUBSYSTEM,
- "auc_pre_entry: Unable to fetch entry.\n");
+ slapi_log_error(SLAPI_LOG_ERR, AUC_PLUGIN_SUBSYSTEM,
+ "auc_pre_entry - Unable to fetch entry.\n");
goto bail;
}
/* create the respose control */
ctrl = auc_create_response_ctrl(e);
if (!ctrl) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUC_PLUGIN_SUBSYSTEM,
- "auc_pre_entry: Error creating response control for entry \"%s\".\n",
+ slapi_log_error(SLAPI_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 a139507..226d8ac 100644
--- a/ldap/servers/plugins/acctpolicy/acct_config.c
+++ b/ldap/servers/plugins/acctpolicy/acct_config.c
@@ -48,8 +48,8 @@ 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, LOG_ERR, PLUGIN_NAME,
- "Failed to retrieve configuration entry %s: %d\n",
+ slapi_log_error(SLAPI_LOG_ERR, PLUGIN_NAME,
+ "acct_policy_load_config_startup - Failed to retrieve configuration entry %s: %d\n",
PLUGIN_CONFIG_DN, rc );
return( -1 );
}
@@ -74,8 +74,8 @@ acct_policy_entry2config( Slapi_Entry *e, acctPluginCfg *newcfg ) {
int rc = 0;
if( newcfg == NULL ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PLUGIN_NAME,
- "Failed to allocate configuration structure\n" );
+ slapi_log_error(SLAPI_LOG_ERR, PLUGIN_NAME,
+ "acct_policy_entry2config - Failed to allocate configuration structure\n" );
return( -1 );
}
@@ -86,8 +86,8 @@ 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, LOG_ERR, PLUGIN_NAME,
- "The configured state attribute [%s] cannot be updated, accounts will always become inactive.\n",
+ slapi_log_error(SLAPI_LOG_ERR, PLUGIN_NAME,
+ "acct_policy_entry2config - The configured state attribute [%s] cannot be updated, accounts will always become inactive.\n",
newcfg->state_attr_name );
}
@@ -139,8 +139,8 @@ 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, LOG_ERR, PLUGIN_NAME,
- "Failed to parse [%s] from the config entry: [%s] is not a valid unsigned long value\n",
+ slapi_log_error(SLAPI_LOG_ERR, PLUGIN_NAME,
+ "acct_policy_entry2config - Failed to parse [%s] from the config entry: [%s] is not a valid unsigned long value\n",
newcfg->limit_attr_name, config_val );
rc = -1;
diff --git a/ldap/servers/plugins/acctpolicy/acct_init.c b/ldap/servers/plugins/acctpolicy/acct_init.c
index 1ae2ce6..81ee6fa 100644
--- a/ldap/servers/plugins/acctpolicy/acct_init.c
+++ b/ldap/servers/plugins/acctpolicy/acct_init.c
@@ -129,14 +129,14 @@ 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, LOG_ERR, PLUGIN_NAME,
- "acct_policy_init registration failed\n" );
+ slapi_log_error(SLAPI_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, LOG_ERR, PLUGIN_NAME,
- "acct_policy_init failed to get plugin identity\n" );
+ slapi_log_error(SLAPI_LOG_ERR, PLUGIN_NAME,
+ "acct_policy_init - Failed to get plugin identity\n" );
return( CALLBACK_ERR );
}
@@ -147,8 +147,8 @@ 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, LOG_ERR, PLUGIN_NAME,
- "acct_policy_init failed to register callbacks\n" );
+ slapi_log_error(SLAPI_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, LOG_ERR, PLUGIN_NAME,
+ slapi_log_error(SLAPI_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, LOG_DEBUG, PLUGIN_NAME, "acct_policy_start config: "
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_ERR, PRE_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_ERR, PRE_PLUGIN_NAME,
"Failed to set plugin version or description\n" );
return( CALLBACK_ERR );
}
@@ -236,8 +236,8 @@ 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, LOG_ERR, PRE_PLUGIN_NAME,
- "Failed to set plugin callback function\n" );
+ slapi_log_error(SLAPI_LOG_ERR, PRE_PLUGIN_NAME,
+ "acct_preop_init - Failed to set plugin callback function\n" );
return( CALLBACK_ERR );
}
@@ -253,8 +253,8 @@ 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, LOG_ERR, POST_PLUGIN_NAME,
- "Failed to set plugin version or name\n" );
+ slapi_log_error(SLAPI_LOG_ERR, POST_PLUGIN_NAME,
+ "acct_postop_init - Failed to set plugin version or name\n" );
return( CALLBACK_ERR );
}
@@ -263,14 +263,14 @@ 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, LOG_ERR, POST_PLUGIN_NAME,
- "Failed to set plugin callback function\n" );
+ slapi_log_error(SLAPI_LOG_ERR, POST_PLUGIN_NAME,
+ "acct_postop_init - 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, LOG_ERR, POST_PLUGIN_NAME,
- "Failed to get plugin identity\n" );
+ slapi_log_error(SLAPI_LOG_ERR, POST_PLUGIN_NAME,
+ "acct_postop_init - 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 0cc7ce3..a40c80f 100644
--- a/ldap/servers/plugins/acctpolicy/acct_plugin.c
+++ b/ldap/servers/plugins/acctpolicy/acct_plugin.c
@@ -37,8 +37,8 @@ acct_policy_dn_is_config(Slapi_DN *sdn)
{
int ret = 0;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PLUGIN_NAME,
- "--> automember_dn_is_config\n");
+ slapi_log_error(SLAPI_LOG_TRACE, PLUGIN_NAME,
+ "--> acct_policy_dn_is_config\n");
if (sdn == NULL) {
goto bail;
@@ -61,8 +61,8 @@ acct_policy_dn_is_config(Slapi_DN *sdn)
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PLUGIN_NAME,
- "<-- automember_dn_is_config\n");
+ slapi_log_error(SLAPI_LOG_TRACE, PLUGIN_NAME,
+ "<-- acct_policy_dn_is_config\n");
return ret;
}
@@ -83,18 +83,18 @@ 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, LOG_DEBUG, PRE_PLUGIN_NAME,
- "\"%s\" login timestamp is %s\n", dn, lasttimestr );
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRE_PLUGIN_NAME,
+ "acct_inact_limit - \"%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, LOG_DEBUG, PRE_PLUGIN_NAME,
- "\"%s\" alternate timestamp is %s\n", dn, lasttimestr );
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRE_PLUGIN_NAME,
+ "acct_inact_limit - \"%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, LOG_DEBUG, PRE_PLUGIN_NAME,
- "\"%s\" has no value for stateattr or altstateattr \n", dn );
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRE_PLUGIN_NAME,
+ "acct_inact_limit - \"%s\" has no value for stateattr or altstateattr \n", dn );
goto done;
}
@@ -104,14 +104,14 @@ 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, LOG_DEBUG, PRE_PLUGIN_NAME,
- "\"%s\" has exceeded inactivity limit (%ld > (%ld + %ld))\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRE_PLUGIN_NAME,
+ "acct_inact_limit - \"%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, LOG_DEBUG, PRE_PLUGIN_NAME,
- "\"%s\" is within inactivity limit (%ld < (%ld + %ld))\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRE_PLUGIN_NAME,
+ "acct_inact_limit - \"%s\" is within inactivity limit (%ld < (%ld + %ld))\n",
dn, cur_t, last_t, lim_t );
}
@@ -184,14 +184,14 @@ 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, LOG_ERR, POST_PLUGIN_NAME,
- "Recording %s=%s failed on \"%s\" err=%d\n", cfg->always_record_login_attr,
+ slapi_log_error(SLAPI_LOG_ERR, POST_PLUGIN_NAME,
+ "acct_record_login - 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, LOG_DEBUG, POST_PLUGIN_NAME,
- "Recorded %s=%s on \"%s\"\n", cfg->always_record_login_attr, timestr, dn );
+ slapi_log_error(SLAPI_LOG_PLUGIN, POST_PLUGIN_NAME,
+ "acct_record_login - Recorded %s=%s on \"%s\"\n", cfg->always_record_login_attr, timestr, dn );
}
done:
@@ -216,15 +216,15 @@ acct_bind_preop( Slapi_PBlock *pb )
acctPolicy *policy = NULL;
void *plugin_id;
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PRE_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_ERR, PRE_PLUGIN_NAME,
- "Error retrieving target DN\n" );
+ slapi_log_error(SLAPI_LOG_ERR, PRE_PLUGIN_NAME,
+ "acct_bind_preop - Error retrieving target DN\n" );
rc = -1;
goto done;
}
@@ -242,24 +242,24 @@ 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, LOG_ERR, PRE_PLUGIN_NAME,
- "Failed to retrieve entry \"%s\": %d\n", dn, ldrc );
+ slapi_log_error(SLAPI_LOG_ERR, PRE_PLUGIN_NAME,
+ "acct_bind_preop - Failed to retrieve entry \"%s\": %d\n", dn, ldrc );
rc = -1;
}
goto done;
}
if( get_acctpolicy( pb, target_entry, plugin_id, &policy ) ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PRE_PLUGIN_NAME,
- "Account Policy object for \"%s\" is missing\n", dn );
+ slapi_log_error(SLAPI_LOG_ERR, PRE_PLUGIN_NAME,
+ "acct_bind_preop - Account Policy object for \"%s\" is missing\n", dn );
rc = -1;
goto done;
}
/* Null policy means target isnt's under the influence of a policy */
if( policy == NULL ) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PRE_PLUGIN_NAME,
- "\"%s\" is not governed by an account policy\n", dn);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRE_PLUGIN_NAME,
+ "acct_bind_preop - \"%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, LOG_DEBUG, PRE_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRE_PLUGIN_NAME,
"<= acct_bind_preop\n" );
return( rc == 0 ? CALLBACK_OK : CALLBACK_ERR );
@@ -300,15 +300,15 @@ acct_bind_postop( Slapi_PBlock *pb )
acctPluginCfg *cfg;
void *plugin_id;
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POST_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_ERR, POST_PLUGIN_NAME,
- "Error retrieving bind DN\n" );
+ slapi_log_error(SLAPI_LOG_ERR, POST_PLUGIN_NAME,
+ "acct_bind_postop - Error retrieving bind DN\n" );
rc = -1;
goto done;
}
@@ -330,8 +330,8 @@ acct_bind_postop( Slapi_PBlock *pb )
plugin_id );
if( ldrc != LDAP_SUCCESS ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, POST_PLUGIN_NAME,
- "Failed to retrieve entry \"%s\": %d\n", dn, ldrc );
+ slapi_log_error(SLAPI_LOG_ERR, POST_PLUGIN_NAME,
+ "acct_bind_postop - Failed to retrieve entry \"%s\": %d\n", dn, ldrc );
rc = -1;
goto done;
} else {
@@ -360,7 +360,7 @@ done:
slapi_ch_free_string( &dn );
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POST_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PRE_PLUGIN_NAME, "--> acct_pre_op\n");
+ slapi_log_error(SLAPI_LOG_TRACE, PRE_PLUGIN_NAME, "--> acct_pre_op\n");
slapi_pblock_get(pb, SLAPI_TARGET_SDN, &sdn);
@@ -421,10 +421,10 @@ 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, LOG_ERR, PRE_PLUGIN_NAME,
- "acct_pre_op: can not delete plugin config entry [%d]\n", ret);
+ slapi_log_error(SLAPI_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);
+ errstr = slapi_ch_smprintf("acct_pre_op - Invalid op type %d", modop);
ret = LDAP_PARAM_ERROR;
goto bail;
}
@@ -441,15 +441,15 @@ static int acct_pre_op( Slapi_PBlock *pb, int modop )
slapi_entry_free(e);
if (ret) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PRE_PLUGIN_NAME,
- "acct_pre_op: operation failure [%d]\n", ret);
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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);
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &ret);
ret = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PRE_PLUGIN_NAME, "<-- acct_pre_op\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, POST_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, PLUGIN_NAME,
- "acct_policy_start failed to load configuration\n" );
+ slapi_log_error(SLAPI_LOG_ERR, PLUGIN_NAME,
+ "acct_post_op - Failed to load configuration\n" );
return( CALLBACK_ERR );
}
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, POST_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_TRACE, 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 99119fb..fa88b7d 100644
--- a/ldap/servers/plugins/acctpolicy/acct_util.c
+++ b/ldap/servers/plugins/acctpolicy/acct_util.c
@@ -106,14 +106,14 @@ 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, LOG_DEBUG, PLUGIN_NAME,
- "\"%s\" is not governed by an account inactivity "
+ slapi_log_error(SLAPI_LOG_PLUGIN, PLUGIN_NAME,
+ "get_acctpolicy - \"%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, LOG_DEBUG, PLUGIN_NAME,
- "\"%s\" is not governed by an account inactivity "
+ slapi_log_error(SLAPI_LOG_PLUGIN, PLUGIN_NAME,
+ "get_acctpolicy - \"%s\" is not governed by an account inactivity "
"global policy\n", slapi_entry_get_ndn( target_entry ) );
config_unlock();
return rc;
@@ -127,11 +127,11 @@ 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, LOG_ERR, PLUGIN_NAME,
- "Error retrieving policy entry \"%s\": %d\n", policy_dn, ldrc );
+ slapi_log_error(SLAPI_LOG_ERR, PLUGIN_NAME,
+ "get_acctpolicy - Error retrieving policy entry \"%s\": %d\n", policy_dn, ldrc );
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PLUGIN_NAME,
- "Policy entry \"%s\" is missing: %d\n", policy_dn, ldrc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, PLUGIN_NAME,
+ "get_acctpolicy - Policy entry \"%s\" is missing: %d\n", policy_dn, ldrc );
}
rc = -1;
goto done;
diff --git a/ldap/servers/plugins/acl/acl.c b/ldap/servers/plugins/acl/acl.c
index 729d8b5..5a81d7f 100644
--- a/ldap/servers/plugins/acl/acl.c
+++ b/ldap/servers/plugins/acl/acl.c
@@ -102,8 +102,8 @@ acl_access_allowed_modrdn(
SLAPI_ACL_WRITE);
if ( retCode != LDAP_SUCCESS ) {
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "modrdn:write permission to entry not allowed\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl_access_allowed_modrdn - Write permission to entry not allowed\n");
return(retCode);
}
@@ -117,8 +117,8 @@ 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, LOG_DEBUG, plugin_name,
- "modrdn:write permission to add new naming attribute not allowed\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl_access_allowed_modrdn - Write permission to add new naming attribute not allowed\n");
return(retCode);
}
@@ -128,8 +128,8 @@ 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, LOG_DEBUG, plugin_name,
- "modrdn:write permission to delete old naming attribute not allowed\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl_access_allowed_modrdn - write permission to delete old naming attribute not allowed\n");
return(retCode);
}
}
@@ -158,8 +158,8 @@ 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, LOG_DEBUG, plugin_name,
- "modrdn: rdn2typeval (%s) failed\n", rdns[i]);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "check_rdn_access - rdn2typeval (%s) failed\n", rdns[i]);
retCode = LDAP_INSUFFICIENT_ACCESS;
break;
} else {
@@ -275,8 +275,8 @@ acl_access_allowed(
privateBackend = slapi_be_private ( be );
if ( !privateBackend && (be_readonly || slapi_config_get_readonly () )){
- slapi_log_error (loglevel, LOG_DEBUG, plugin_name,
- "conn=%" NSPRIu64 " op=%d (main): Deny %s on entry(%s)"
+ slapi_log_error(loglevel, plugin_name,
+ "acl_access_allowed - conn=%" NSPRIu64 " op=%d (main): Deny %s on entry(%s)"
": readonly backend\n",
o_connid, o_opid,
acl_access2str(access),
@@ -288,8 +288,8 @@ 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, LOG_DEBUG, plugin_name,
- "conn=%" NSPRIu64 " op=%d (main): Allow %s on entry(%s)"
+ slapi_log_error(loglevel, plugin_name,
+ "acl_access_allowed - conn=%" NSPRIu64 " op=%d (main): Allow %s on entry(%s)"
": root user\n",
o_connid, o_opid,
acl_access2str(access),
@@ -312,20 +312,20 @@ acl_access_allowed(
aclpb = acl_get_aclpb ( pb, ACLPB_BINDDN_PBLOCK );
if ( !aclpb ) {
- slapi_log_error ( SLAPI_LOG_FATAL, LOG_DEBUG, plugin_name, "Missing aclpb 1 \n" );
+ slapi_log_error (SLAPI_LOG_ERR, plugin_name, "acl_access_allowed - Missing aclpb 1 \n" );
ret_val = LDAP_OPERATIONS_ERROR;
goto cleanup_and_ret;
}
if (pb != aclpb->aclpb_pblock) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
- "acl_access_allowed: Resetting aclpb_pblock %p to pblock addr %p\n",
+ slapi_log_error(SLAPI_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, LOG_ERR, plugin_name, "NULL aclpb_curr_entry_sdn \n" );
+ slapi_log_error(SLAPI_LOG_ERR ,plugin_name, "NULL aclpb_curr_entry_sdn \n" );
ret_val = LDAP_OPERATIONS_ERROR;
goto cleanup_and_ret;
}
@@ -381,8 +381,8 @@ 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, LOG_DEBUG, plugin_name,
- "acl_access_allowed unknown rights:%d\n", access);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl_access_allowed - Unknown rights:%d\n", access);
ret_val = LDAP_OPERATIONS_ERROR;
goto cleanup_and_ret;
@@ -447,8 +447,8 @@ 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, LOG_DEBUG, plugin_name,
- "#### conn=%" NSPRIu64 " op=%d binddn=\"%s\"\n",
+ slapi_log_error(loglevel, plugin_name,
+ "acl_access_allowed - #### conn=%" NSPRIu64 " op=%d binddn=\"%s\"\n",
o_connid, o_opid, clientDn);
aclpb->aclpb_stat_total_entries++;
@@ -513,8 +513,8 @@ acl_access_allowed(
DS_ATTR_ENTRY, e, 0);
if (rv < 0) {
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "Unable to set the Slapi_Entry in the Plist\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl_access_allowed - Unable to set the Slapi_Entry in the Plist\n");
ret_val = LDAP_OPERATIONS_ERROR;
goto cleanup_and_ret;
}
@@ -577,8 +577,8 @@ acl_access_allowed(
goto cleanup_and_ret;
}
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "Processed attr:%s for entry:%s\n", attr ? attr : "NULL",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl_access_allowed - 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, LOG_ERR, plugin_name, "Missing aclpb \n" );
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "print_access_control_summary - 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, LOG_DEBUG, plugin_name,
+ slapi_log_error(loglevel, plugin_name, "print_access_control_summary - "
"conn=%" NSPRIu64 " op=%d (%s): %s %s on entry(%s).attr(%s) [from %s] to proxy (%s)"
": %s\n",
o_connid, o_opid,
@@ -789,8 +789,8 @@ print_access_control_summary( char *source, int ret_val, char *clientDn,
acl_info[0] ? acl_info : access_reason);
} else {
- slapi_log_error(loglevel, LOG_DEBUG, plugin_name,
- "conn=%" NSPRIu64 " op=%d (%s): %s %s on entry(%s).attr(%s) to proxy (%s)"
+ slapi_log_error(loglevel, plugin_name,
+ "print_access_control_summary - conn=%" NSPRIu64 " op=%d (%s): %s %s on entry(%s).attr(%s) to proxy (%s)"
": %s\n",
o_connid, o_opid,
source,
@@ -804,8 +804,8 @@ 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, LOG_DEBUG, plugin_name,
- "conn=%" NSPRIu64 " op=%d (%s): %s %s on entry(%s).attr(%s) [from %s] to proxy (%s)"
+ slapi_log_error(loglevel, plugin_name,
+ "print_access_control_summary - conn=%" NSPRIu64 " op=%d (%s): %s %s on entry(%s).attr(%s) [from %s] to proxy (%s)"
": %s\n",
o_connid, o_opid,
source,
@@ -818,8 +818,8 @@ print_access_control_summary( char *source, int ret_val, char *clientDn,
acl_info[0] ? acl_info : access_reason);
} else {
- slapi_log_error(loglevel, LOG_DEBUG, plugin_name,
- "conn=%" NSPRIu64 " op=%d (%s): %s %s on entry(%s).attr(%s) to proxy (%s)"
+ slapi_log_error(loglevel, plugin_name,
+ "print_access_control_summary - conn=%" NSPRIu64 " op=%d (%s): %s %s on entry(%s).attr(%s) to proxy (%s)"
": %s\n",
o_connid, o_opid,
source,
@@ -833,8 +833,8 @@ print_access_control_summary( char *source, int ret_val, char *clientDn,
}
} else {
if (strcasecmp(right, access_str_moddn) == 0) {
- slapi_log_error(loglevel, LOG_DEBUG, plugin_name,
- "conn=%" NSPRIu64 " op=%d (%s): %s %s on entry(%s).attr(%s) [from %s] to %s"
+ slapi_log_error(loglevel, plugin_name,
+ "print_access_control_summary - conn=%" NSPRIu64 " op=%d (%s): %s %s on entry(%s).attr(%s) [from %s] to %s"
": %s\n",
o_connid, o_opid,
source,
@@ -847,8 +847,8 @@ print_access_control_summary( char *source, int ret_val, char *clientDn,
acl_info[0] ? acl_info : access_reason);
} else {
- slapi_log_error(loglevel, LOG_DEBUG, plugin_name,
- "conn=%" NSPRIu64 " op=%d (%s): %s %s on entry(%s).attr(%s) to %s"
+ slapi_log_error(loglevel, plugin_name,
+ "print_access_control_summary - conn=%" NSPRIu64 " op=%d (%s): %s %s on entry(%s).attr(%s) to %s"
": %s\n",
o_connid, o_opid,
source,
@@ -923,8 +923,8 @@ 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, LOG_DEBUG, plugin_name,
- "Root access (%s) allowed on entry(%s)\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl_read_access_allowed_on_entry - Root access (%s) allowed on entry(%s)\n",
acl_access2str(access),
n_edn);
TNF_PROBE_1_DEBUG(acl_read_access_allowed_on_entry_end ,"ACL","",
@@ -934,15 +934,15 @@ acl_read_access_allowed_on_entry (
aclpb = acl_get_aclpb ( pb, ACLPB_BINDDN_PBLOCK );
if ( !aclpb ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "Missing aclpb 2 \n" );
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "acl_read_access_allowed_on_entry - 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, LOG_DEBUG, plugin_name,
- "acl_read_access_allowed_on_entry: Resetting aclpb_pblock %p to pblock addr %p\n",
+ slapi_log_error(SLAPI_LOG_ACL, 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, LOG_DEBUG, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, 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, LOG_ERR, plugin_name, "Missing aclpb 3 \n" );
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "acl_read_access_allowed_on_attr - Missing aclpb 3 \n" );
TNF_PROBE_1_DEBUG(acl_read_access_allowed_on_attr_end ,"ACL","",
tnf_string,aclpb_error,"");
@@ -1268,8 +1268,8 @@ 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, LOG_DEBUG, plugin_name,
- "MATCHED HANDLE:dn:%s attr: %s val:%d\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl_read_access_allowed_on_attr - MATCHED HANDLE:dn:%s attr: %s val:%d\n",
n_edn, attr, ret_val );
if (ret_val == LDAP_SUCCESS) {
decision_reason.reason = ACL_REASON_EVALCONTEXT_CACHED_ALLOW;
@@ -1295,8 +1295,8 @@ acl_read_access_allowed_on_attr (
** rest of the attributes.
*/
if (aclpb->aclpb_state & ACLPB_ATTR_STAR_MATCHED) {
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "STAR Access allowed on attr:%s; entry:%s \n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl_read_access_allowed_on_attr - STAR Access allowed on attr:%s; entry:%s \n",
attr, n_edn);
decision_reason.reason = ACL_REASON_EVALCONTEXT_CACHED_ATTR_STAR_ALLOW;
ret_val = LDAP_SUCCESS;
@@ -1664,8 +1664,8 @@ 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, LOG_DEBUG, plugin_name,
- "Group Change: Invalidating entire UserGroup Cache %s\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl_modified - Group Change: Invalidating entire UserGroup Cache %s\n",
n_dn);
aclg_regen_group_signature();
if ( (optype == SLAPI_OPERATION_MODIFY) || (optype == SLAPI_OPERATION_DELETE ) ) {
@@ -1700,8 +1700,8 @@ 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, LOG_DEBUG, plugin_name,
- "Marking entry %s for removal from ACL user Group Cache\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl_modified - Marking entry %s for removal from ACL user Group Cache\n",
n_dn);
aclg_markUgroupForRemoval (ugroup);
}
@@ -1852,8 +1852,8 @@ 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, LOG_DEBUG, plugin_name,
- "acl_modified (MODRDN %s => \"no change\"\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl_modified - (MODRDN %s => \"no change\"\n",
n_dn);
break;
} else {
@@ -1870,8 +1870,8 @@ 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, LOG_DEBUG, plugin_name,
- "acl_modified (MODRDN %s => \"%s\"\n", n_dn, new_RDN);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl_modified - (MODRDN %s => \"%s\"\n", n_dn, new_RDN);
/* Change the acls */
acllist_acicache_WRITE_LOCK();
@@ -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, LOG_DEBUG, plugin_name, "Using ACL Container:%d for evaluation\n", kk);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "acl__scan_for_acis - Using ACL Container:%d for evaluation\n", kk);
kk++;
}
}
@@ -1946,8 +1946,8 @@ 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, LOG_DEBUG, plugin_name,
- "Restart the scan -- due to acl changes\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl__scan_for_acis - 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, LOG_DEBUG, plugin_name, "Num of ALLOW Handles:%d, DENY handles:%d\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "acl__scan_for_acis - 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","");
@@ -2171,85 +2171,85 @@ acl__resource_match_aci( Acl_PBlock *aclpb, aci_t *aci, int skip_attrEval, int *
* (sdn was stored in the pblock)
*/
if (aci->target_to) {
- f = aci->target_to;
- dn_matched = ACL_TRUE;
-
- /* Now check if the filter is a simple or substring filter */
- if (aci->aci_type & ACI_TARGET_MODDN_TO_PATTERN) {
- /* This is a filter with substring
- * e.g. ldap:///uid=*,cn=accounts,dc=example,dc=com
- */
- 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, LOG_DEBUG, plugin_name,
- "acl__resource_match_aci:pattern err\n");
- matches = ACL_FALSE;
- goto acl__resource_match_aci_EXIT;
- }
- }
- } else {
- /* This is a filter without substring
- * e.g. ldap:///cn=accounts,dc=example,dc=com
- */
- 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);
-
- if (!slapi_dn_issuffix(res_ndn, avaValue->bv_val)) {
- dn_matched = ACL_FALSE;
- }
-
- }
- if (aci->aci_type & ACI_TARGET_NOT) {
- matches = (dn_matched ? ACL_FALSE : ACL_TRUE);
- } else {
- matches = (dn_matched ? ACL_TRUE : ACL_FALSE);
- }
- } /* target_to */
-
- if ((matches == ACL_TRUE) && (aci->target_from) && aclpb->aclpb_moddn_source_sdn) {
- f = aci->target_from;
- dn_matched = ACL_TRUE;
- slapi_filter_get_ava ( f, &avaType, &avaValue );
-
- /* Now check if the filter is a simple or substring filter */
- if (aci->aci_type & ACI_TARGET_MODDN_FROM_PATTERN) {
- /* This is a filter with substring
- * e.g. ldap:///uid=*,cn=accounts,dc=example,dc=com
- */
- 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, LOG_DEBUG, plugin_name,
- "acl__resource_match_aci:pattern err\n");
- matches = ACL_FALSE;
- goto acl__resource_match_aci_EXIT;
- }
- }
-
- } else {
- /* This is a filter without substring
- * e.g. ldap:///cn=accounts,dc=example,dc=com
- */
- 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;
- }
-
- }
-
- if (aci->aci_type & ACI_TARGET_NOT) {
- matches = (dn_matched ? ACL_FALSE : ACL_TRUE);
- } else {
- matches = (dn_matched ? ACL_TRUE: ACL_FALSE);
- }
- }
+ f = aci->target_to;
+ dn_matched = ACL_TRUE;
+
+ /* Now check if the filter is a simple or substring filter */
+ if (aci->aci_type & ACI_TARGET_MODDN_TO_PATTERN) {
+ /* This is a filter with substring
+ * e.g. ldap:///uid=*,cn=accounts,dc=example,dc=com
+ */
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "acl__resource_match_aci - 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,
+ "acl__resource_match_aci:pattern err\n");
+ matches = ACL_FALSE;
+ goto acl__resource_match_aci_EXIT;
+ }
+ }
+ } else {
+ /* This is a filter without substring
+ * e.g. ldap:///cn=accounts,dc=example,dc=com
+ */
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "acl__resource_match_aci - moddn target_to: %s\n",
+ slapi_filter_to_string(f, logbuf, sizeof(logbuf)));
+ slapi_filter_get_ava(f, &avaType, &avaValue);
+
+ if (!slapi_dn_issuffix(res_ndn, avaValue->bv_val)) {
+ dn_matched = ACL_FALSE;
+ }
+
+ }
+ if (aci->aci_type & ACI_TARGET_NOT) {
+ matches = (dn_matched ? ACL_FALSE : ACL_TRUE);
+ } else {
+ matches = (dn_matched ? ACL_TRUE : ACL_FALSE);
+ }
+ } /* target_to */
+
+ if ((matches == ACL_TRUE) && (aci->target_from) && aclpb->aclpb_moddn_source_sdn) {
+ f = aci->target_from;
+ dn_matched = ACL_TRUE;
+ slapi_filter_get_ava ( f, &avaType, &avaValue );
+
+ /* Now check if the filter is a simple or substring filter */
+ if (aci->aci_type & ACI_TARGET_MODDN_FROM_PATTERN) {
+ /* This is a filter with substring
+ * e.g. ldap:///uid=*,cn=accounts,dc=example,dc=com
+ */
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "acl__resource_match_aci - 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,
+ "acl__resource_match_aci - pattern err\n");
+ matches = ACL_FALSE;
+ goto acl__resource_match_aci_EXIT;
+ }
+ }
+
+ } else {
+ /* This is a filter without substring
+ * e.g. ldap:///cn=accounts,dc=example,dc=com
+ */
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "acl__resource_match_aci - 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;
+ }
+
+ }
+
+ if (aci->aci_type & ACI_TARGET_NOT) {
+ matches = (dn_matched ? ACL_FALSE : ACL_TRUE);
+ } else {
+ matches = (dn_matched ? ACL_TRUE: ACL_FALSE);
+ }
+ }
}
/* No need to look further */
@@ -2265,8 +2265,8 @@ 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, LOG_DEBUG, plugin_name,
- "acl__resource_match_aci:pattern err\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl__resource_match_aci - Pattern err\n");
matches = ACL_FALSE;
goto acl__resource_match_aci_EXIT;
}
@@ -2312,8 +2312,8 @@ 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, LOG_DEBUG, plugin_name,
- "Evaluating macro aci(%d)%s for resource %s\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl__resource_match_aci - Evaluating macro aci(%d)%s for resource %s\n",
aci->aci_index, aci->aclName,
aclutil__access_str(res_right, res_right_str));
matched_val = acl_match_macro_in_target( res_ndn,
@@ -2350,15 +2350,15 @@ 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, LOG_DEBUG, plugin_name,
- "-- Added aci(%d) and matched value (%s) to macro ht\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl__resource_match_aci - 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, LOG_DEBUG, plugin_name,
- "Evaluated ACL_FALSE\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl__resource_match_aci - Evaluated ACL_FALSE\n");
}
}
}
@@ -2427,8 +2427,8 @@ acl__resource_match_aci( Acl_PBlock *aclpb, aci_t *aci, int skip_attrEval, int *
}
} else {
matches = ACL_FALSE;
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "Returning UNDEFINED for targetfilter evaluation.\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl__resource_match_aci - Returning UNDEFINED for targetfilter evaluation.\n");
}
if (matches == ACL_FALSE) {
@@ -2957,8 +2957,8 @@ acl__TestRights(Acl_PBlock *aclpb,int access, const char **right, const char **
}
k++;
index = aci->aci_index;
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "Evaluating DENY aci(%d) \"%s\"\n", index, aci->aclName);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl__TestRights - Evaluating DENY aci(%d) \"%s\"\n", index, aci->aclName);
if (access & ( SLAPI_ACL_SEARCH | SLAPI_ACL_READ)) {
@@ -2989,8 +2989,8 @@ 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, LOG_DEBUG, plugin_name,
- "DENY:Found SEARCH DENY in cache\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl__TestRights - DENY:Found SEARCH DENY in cache\n");
__acl_set_aclIndex_inResult ( aclpb, access, index );
result_reason->deciding_aci = aci;
result_reason->reason = ACL_REASON_RESULT_CACHED_DENY;
@@ -2999,8 +2999,8 @@ 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, LOG_DEBUG, plugin_name,
- "DENY:Found SEARCH SKIP in cache\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl__TestRights - DENY:Found SEARCH SKIP in cache\n");
skip_eval = 1;
break;
} else {
@@ -3008,8 +3008,8 @@ 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, LOG_DEBUG, plugin_name,
- "DENY:Found READ DENY in cache\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl__TestRights - DENY:Found READ DENY in cache\n");
__acl_set_aclIndex_inResult ( aclpb, access, index );
result_reason->deciding_aci = aci;
result_reason->reason = ACL_REASON_RESULT_CACHED_DENY;
@@ -3017,8 +3017,8 @@ 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, LOG_DEBUG, plugin_name,
- "DENY:Found READ SKIP in cache\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl__TestRights - DENY:Found READ SKIP in cache\n");
skip_eval = 1;
break;
} else {
@@ -3035,8 +3035,8 @@ 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, LOG_DEBUG, plugin_name,
- "acl__TestRights:Unable to set the DENY acllist\n");
+ slapi_log_error(SLAPI_LOG_ACL, 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, LOG_DEBUG, plugin_name, "Processed:%d DENY handles Result:%d\n",index, rights_rv);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "acl__TestRights - 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, LOG_ERR, "acl__TestRights",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "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,8 +3185,8 @@ acl__TestRights(Acl_PBlock *aclpb,int access, const char **right, const char **
}
k++;
index = aci->aci_index;
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "%d. Evaluating ALLOW aci(%d) \"%s\"\n", k, index, aci->aclName);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl__TestRights - %d. Evaluating ALLOW aci(%d) \"%s\"\n", k, index, aci->aclName);
if (access & ( SLAPI_ACL_SEARCH | SLAPI_ACL_READ)) {
@@ -3218,8 +3218,8 @@ 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, LOG_DEBUG, plugin_name,
- "Found SEARCH ALLOW in cache\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl__TestRights - Found SEARCH ALLOW in cache\n");
__acl_set_aclIndex_inResult ( aclpb, access, index );
result_reason->deciding_aci = aci;
result_reason->reason = ACL_REASON_RESULT_CACHED_ALLOW;
@@ -3227,8 +3227,8 @@ 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, LOG_DEBUG, plugin_name,
- "Found SEARCH SKIP in cache\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl__TestRights - Found SEARCH SKIP in cache\n");
skip_eval = 1;
break;
} else {
@@ -3237,8 +3237,8 @@ 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, LOG_DEBUG, plugin_name,
- "Found READ ALLOW in cache\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl__TestRights - Found READ ALLOW in cache\n");
__acl_set_aclIndex_inResult ( aclpb, access, index );
result_reason->deciding_aci = aci;
result_reason->reason = ACL_REASON_RESULT_CACHED_ALLOW;
@@ -3246,8 +3246,8 @@ 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, LOG_DEBUG, plugin_name,
- "Found READ SKIP in cache\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl__TestRights - Found READ SKIP in cache\n");
skip_eval = 1;
break;
} else {
@@ -3265,8 +3265,8 @@ 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, LOG_ERR, plugin_name,
- "acl__TestRights:Unable to set the acllist\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, "acl__TestRights",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "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,12 +3550,12 @@ 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, LOG_DEBUG, plugin_name,
- "acl__attr_cached_result:Using Context: ACLPB_ACLCB\n" );
+ slapi_log_error(SLAPI_LOG_ACL, 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, LOG_DEBUG, plugin_name,
- "acl__attr_cached_result:Using Context: ACLPB_PREV\n" );
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl__attr_cached_result - Using Context: ACLPB_PREV\n" );
}
if ( attr == NULL ) {
@@ -3739,8 +3739,8 @@ 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, LOG_DEBUG, plugin_name,
- "Found an attr Rule [Name:%s Index:%d\n", aci->aclName,
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl__scan_match_handles - Found an attr Rule [Name:%s Index:%d\n", aci->aclName,
aci->aci_index );
for ( jj =0; jj < c_evalContext->acle_numof_attrs; jj++ ) {
AclAttrEval *a_eval = &c_evalContext->acle_attrEval[jj];
@@ -4174,8 +4174,8 @@ acl__recompute_acl ( Acl_PBlock *aclpb,
goto set_result_status;
}
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "Recomputing the ACL Index:%d for entry:%s\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl__recompute_acl - Recomputing the ACL Index:%d for entry:%s\n",
aciIndex, slapi_entry_get_ndn ( aclpb->aclpb_curr_entry) );
/* First find this one ACL and then evaluate it. */
@@ -4292,9 +4292,7 @@ acl__test_filter ( Slapi_Entry *entry, struct slapi_filter *f, int filter_sense)
/* slapi_vattr_filter_test() returns 0 for match */
- filter_matched = !slapi_vattr_filter_test(NULL, entry,
- f,
- 0 /*don't do acess chk*/);
+ filter_matched = !slapi_vattr_filter_test(NULL, entry, f, 0 /*don't do acess chk*/);
if (filter_sense) {
return(filter_matched ? ACL_TRUE : ACL_FALSE);
diff --git a/ldap/servers/plugins/acl/acl_ext.c b/ldap/servers/plugins/acl/acl_ext.c
index 9e500aa..84d4e66 100644
--- a/ldap/servers/plugins/acl/acl_ext.c
+++ b/ldap/servers/plugins/acl/acl_ext.c
@@ -98,8 +98,8 @@ acl_get_ext (ext_type type, void *object)
void *data;
if ( type >= ACL_EXT_ALL ) {
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "Invalid extension type:%d\n", type );
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl_get_ext - Invalid extension type:%d\n", type );
return NULL;
}
@@ -147,8 +147,8 @@ aclext_alloc_lockarray ( )
for ( i = 0; i < ACLEXT_MAX_LOCKS; i++) {
if (NULL == (lock = PR_NewLock()) ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
- "Unable to allocate locks used for private extension\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "aclext_alloc_lockarray - Unable to allocate locks used for private extension\n");
return 1;
}
extLockArray.lockArray[i] = lock;
@@ -196,8 +196,8 @@ 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, LOG_ERR, plugin_name,
- "Unable to get Read/Write lock for CONNECTION extension\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acl_conn_ext_constructor - Unable to get Read/Write lock for CONNECTION extension\n");
slapi_ch_free ( (void **) &ext );
return NULL;
}
@@ -252,8 +252,8 @@ acl_operation_ext_constructor ( void *object, void *parent )
aclpb = acl__get_aclpb_from_pool();
if ( NULL == aclpb ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
- "Operation extension allocation Failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acl_operation_ext_constructor - Operation extension allocation Failed\n");
}
TNF_PROBE_0_DEBUG(acl_operation_ext_constructor_end ,"ACL","");
@@ -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, LOG_ERR, plugin_name, "NULL aclcb_autorization_sdn\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "acl_operation_ext_destructor - NULL aclcb_autorization_sdn\n");
goto clean_aclpb;
}
@@ -311,8 +311,8 @@ acl_operation_ext_destructor ( void *ext, void *object, void *parent )
goto clean_aclpb;
}
if ( !aclcb->aclcb_lock ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
- "aclcb lock released! aclcb cache can't be refreshed\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acl_operation_ext_destructor - aclcb lock released! aclcb cache can't be refreshed\n");
PR_Unlock ( shared_lock );
goto clean_aclpb;
}
@@ -395,8 +395,8 @@ 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, LOG_ERR, plugin_name,
- "acl_get_aclpb: Invalid aclpb type %d\n", type );
+ slapi_log_error(SLAPI_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, LOG_DEBUG, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
"Unable to find a free aclpb\n");
aclpb = acl__malloc_aclpb ();
}
@@ -635,39 +635,39 @@ 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, LOG_ERR, plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, plugin_name,
- "Unable to set the ACL PBLOCK in the Plist\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acl__malloc_aclpb - 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, LOG_ERR, plugin_name,
- "Unable to set the USER DN in the Plist\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acl__malloc_aclpb - 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, LOG_ERR, plugin_name,
- "Unable to set the AUTH TYPE in the Plist\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acl__malloc_aclpb - 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, LOG_ERR, plugin_name,
- "Unable to set the AUTH TYPE in the Plist\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acl__malloc_aclpb - 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, LOG_ERR, plugin_name,
- "Unable to set the ENTRY TYPE in the Plist\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acl__malloc_aclpb - 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, LOG_ERR, plugin_name,
- "Unable to set the SSF in the Plist\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acl__malloc_aclpb - Unable to set the SSF in the Plist\n");
goto error;
}
@@ -681,8 +681,8 @@ 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, LOG_ERR, plugin_name,
- "Unable to allocate the acleval block\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acl__malloc_aclpb - 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, LOG_ERR, plugin_name, "acl_init_aclpb:No ACLPB\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "acl_init_aclpb - No ACLPB\n");
return;
}
@@ -834,27 +834,27 @@ 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, LOG_ERR, plugin_name,
- "Unable to set the USER DN in the Plist\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acl_init_aclpb - 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, LOG_ERR, plugin_name,
- "Unable to set the AUTH TYPE in the Plist\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acl_init_aclpb - 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, LOG_ERR, plugin_name,
- "Unable to set the AUTH TYPE in the Plist\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acl_init_aclpb - 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, LOG_ERR, plugin_name,
- "Unable to set the SSF in the Plist\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acl_init_aclpb - Unable to set the SSF in the Plist\n");
return;
}
@@ -890,8 +890,8 @@ 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, LOG_DEBUG, plugin_name,
- "No CONNECTION extension\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl_init_aclpb - No CONNECTION extension\n");
} else if ( aclcb->aclcb_state == -1 ) {
/* indicate that we need to update the cache */
@@ -959,8 +959,8 @@ acl__done_aclpb ( struct acl_pblock *aclpb )
/* Check the state */
if (aclpb->aclpb_state & ~ACLPB_STATE_ALL) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
- "The aclpb.state value (%d) is incorrect. Exceeded the limit (%d)\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acl__done_aclpb - The aclpb state value (%d) is incorrect. Exceeded the limit (%d)\n",
aclpb->aclpb_state, ACLPB_STATE_ALL);
dump_aclpb_info = 1;
@@ -974,24 +974,24 @@ 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, LOG_ERR, plugin_name,
- "The aclpb res_type value (%d) has exceeded. Limit is (%d)\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acl__done_aclpb - The aclpb res_type value (%d) has exceeded. Limit is (%d)\n",
aclpb->aclpb_res_type, ACLPB_RESTYPE_ALL );
dump_aclpb_info = 1;
}
if ( dump_aclpb_info ) {
const char *ndn;
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, plugin_name, "curr_entry:%p num_entries:%d curr_dn:%p\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "acl__done_aclpb - 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, LOG_ERR, plugin_name, "Last attr:%p, Plist:%p acleval: %p\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "acl__done_aclpb - 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, LOG_DEBUG, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, 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, LOG_DEBUG, plugin_name, "\tNumber of entries scanned: %d\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "\tNumber of entries scanned: %d\n",
aclpb->aclpb_stat_total_entries);
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "\tNumber of times ACL List scanned: %d\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "\tNumber of times ACL List scanned: %d\n",
aclpb->aclpb_stat_acllist_scanned);
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "\tNumber of ACLs with target matched:%d\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "\tNumber of ACLs with target matched:%d\n",
aclpb->aclpb_stat_num_tmatched_acls);
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "\tNumber of times acl resource matched:%d\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "\tNumber of times acl resource matched:%d\n",
aclpb->aclpb_stat_aclres_matched);
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "\tNumber of times ANOM list scanned:%d\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "\tNumber of times ANOM list scanned:%d\n",
aclpb->aclpb_stat_anom_list_scanned);
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "\tNumber of times Context was copied:%d\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "\tNumber of times Context was copied:%d\n",
aclpb->aclpb_stat_num_copycontext);
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "\tNumber of times Attrs was copied:%d\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "\tNumber of times Attrs was copied:%d\n",
aclpb->aclpb_stat_num_copy_attrs);
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, " **** ACL OPERATION STAT END *******\n");
+ slapi_log_error(SLAPI_LOG_ACL, 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 c381110..792fa5e 100644
--- a/ldap/servers/plugins/acl/aclanom.c
+++ b/ldap/servers/plugins/acl/aclanom.c
@@ -61,8 +61,8 @@ aclanom_init ()
slapi_ch_calloc (1, sizeof ( struct anom_profile ) );
if (( anom_rwlock = slapi_new_rwlock()) == NULL ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
- "Failed in getting the ANOM rwlock\n" );
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "aclanom_init - Failed in getting the ANOM rwlock\n" );
return 1;
}
return 0;
@@ -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, LOG_DEBUG, plugin_name, "GENERATING ANOM USER PROFILE\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "aclanom_gen_anomProfile - 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,8 +140,8 @@ 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, LOG_DEBUG, plugin_name,
- "CANCELLING ANOM USER PROFILE BECAUSE OF DENY RULE\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "aclanom_gen_anomProfile - CANCELLING ANOM USER PROFILE BECAUSE OF DENY RULE\n");
goto cleanup;
}
@@ -158,8 +158,8 @@ 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, LOG_DEBUG, plugin_name,
- "CANCELLING ANOM USER PROFILE BECAUSE OF COMPLEX RULE\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "aclanom_gen_anomProfile - CANCELLING ANOM USER PROFILE BECAUSE OF COMPLEX RULE\n");
goto cleanup;
}
@@ -179,8 +179,8 @@ aclanom_gen_anomProfile (acl_lock_flag_t lock_flag)
continue;
} else {
/* clean up before leaving */
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "CANCELLING ANOM USER PROFILE 1\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "aclanom_gen_anomProfile - 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, LOG_DEBUG, plugin_name, "CANCELLING ANOM USER PROFILE 2\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "aclanom_gen_anomProfile - CANCELLING ANOM USER PROFILE 2\n");
goto cleanup;
}
@@ -211,8 +211,8 @@ 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, LOG_ERR, plugin_name,
- "Error: invalid filter [%s] in anonymous aci in entry [%s]\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "aclanom_gen_anomProfile - Invalid filter [%s] in anonymous aci in entry [%s]\n",
aci->targetFilterStr, dn);
goto cleanup;
}
@@ -237,8 +237,8 @@ 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, LOG_DEBUG, plugin_name,
- "CANCELLING ANOM USER PROFILE 3\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "aclanom_gen_anomProfile - CANCELLING ANOM USER PROFILE 3\n");
goto cleanup;
}
@@ -522,8 +522,8 @@ 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, LOG_DEBUG, plugin_name,
- "conn=%" NSPRIu64 " op=%d: Allow access on entry(%s).attr(%s) (from %s) to anonymous: acidn=\"%s\"\n",
+ slapi_log_error(loglevel, plugin_name,
+ "aclanom_match_profile - conn=%" NSPRIu64 " op=%d: Allow access on entry(%s).attr(%s) (from %s) to anonymous: acidn=\"%s\"\n",
o_connid, o_opid,
ndn,
attr ? attr:"NULL",
@@ -531,8 +531,8 @@ aclanom_match_profile (Slapi_PBlock *pb, struct acl_pblock *aclpb, Slapi_Entry *
aci_ndn);
} else {
- slapi_log_error(loglevel, LOG_DEBUG, plugin_name,
- "conn=%" NSPRIu64 " op=%d: Allow access on entry(%s).attr(%s) to anonymous: acidn=\"%s\"\n",
+ slapi_log_error(loglevel, plugin_name,
+ "aclanom_match_profile - conn=%" NSPRIu64 " op=%d: Allow access on entry(%s).attr(%s) to anonymous: acidn=\"%s\"\n",
o_connid, o_opid,
ndn,
attr ? attr:"NULL",
@@ -540,14 +540,14 @@ aclanom_match_profile (Slapi_PBlock *pb, struct acl_pblock *aclpb, Slapi_Entry *
}
} else {
if (access & SLAPI_ACL_MODDN) {
- slapi_log_error(loglevel, LOG_DEBUG, plugin_name,
- "conn=%" NSPRIu64 " op=%d: Deny access on entry(%s).attr(%s) (from %s) to anonymous\n",
+ slapi_log_error(loglevel, plugin_name,
+ "aclanom_match_profile - 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, LOG_DEBUG, plugin_name,
- "conn=%" NSPRIu64 " op=%d: Deny access on entry(%s).attr(%s) to anonymous\n",
+ slapi_log_error(loglevel, plugin_name,
+ "aclanom_match_profile - 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 47cbd87..0bc8345 100644
--- a/ldap/servers/plugins/acl/acleffectiverights.c
+++ b/ldap/servers/plugins/acl/acleffectiverights.c
@@ -108,8 +108,8 @@ _ger_g_permission_granted (
}
if ( slapi_sdn_get_dn (requestor_sdn) == NULL )
{
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "_ger_g_permission_granted: anonymous has no g permission\n" );
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "_ger_g_permission_granted - Anonymous has no g permission\n" );
rc = LDAP_INSUFFICIENT_ACCESS;
goto bailout;
}
@@ -144,8 +144,8 @@ _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, LOG_DEBUG, plugin_name,
- "_ger_g_permission_granted: %s\n", *errbuf);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "_ger_g_permission_granted - %s\n", *errbuf);
rc = LDAP_INSUFFICIENT_ACCESS;
bailout:
@@ -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, LOG_ERR, plugin_name, "%s\n", *errbuf );
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "_ger_parse_control - %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, LOG_ERR, plugin_name, "%s\n", *errbuf );
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "_ger_parse_control - %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, LOG_ERR, plugin_name, "%s\n", *errbuf );
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "_ger_parse_control - %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, LOG_ERR, plugin_name, "%s\n", *errbuf );
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "_ger_parse_control - %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, LOG_ERR, plugin_name, "%s\n", *errbuf);
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "_ger_parse_control - %s\n", *errbuf);
slapi_ch_free_string(&orig);
if (iscritical)
return LDAP_UNAVAILABLE_CRITICAL_EXTENSION; /* RFC 4511 4.1.11 */
@@ -403,24 +403,24 @@ _ger_get_entry_rights (
_append_gerstr(gerstr, gerstrsize, gerstrcap, "entryLevelRights: ", NULL);
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "_ger_get_entry_rights: SLAPI_ACL_READ\n" );
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "_ger_get_entry_rights - SLAPI_ACL_READ\n" );
if (acl_access_allowed(gerpb, e, "*", NULL, SLAPI_ACL_READ) == LDAP_SUCCESS)
{
/* v - view e */
entryrights |= SLAPI_ACL_READ;
_append_gerstr(gerstr, gerstrsize, gerstrcap, "v", NULL);
}
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "_ger_get_entry_rights: SLAPI_ACL_ADD\n" );
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "_ger_get_entry_rights - SLAPI_ACL_ADD\n" );
if (acl_access_allowed(gerpb, e, NULL, NULL, SLAPI_ACL_ADD) == LDAP_SUCCESS)
{
/* a - add child entry below e */
entryrights |= SLAPI_ACL_ADD;
_append_gerstr(gerstr, gerstrsize, gerstrcap, "a", NULL);
}
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "_ger_get_entry_rights: SLAPI_ACL_DELETE\n" );
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "_ger_get_entry_rights - SLAPI_ACL_DELETE\n" );
if (acl_access_allowed(gerpb, e, NULL, NULL, SLAPI_ACL_DELETE) == LDAP_SUCCESS)
{
/* d - delete e */
@@ -435,8 +435,8 @@ _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, LOG_DEBUG, plugin_name,
- "_ger_get_entry_rights: SLAPI_ACL_MODDN %s\n", slapi_entry_get_ndn(e));
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "_ger_get_entry_rights - SLAPI_ACL_MODDN %s\n", slapi_entry_get_ndn(e));
/* n - rename e */
entryrights |= SLAPI_ACL_MODDN;
_append_gerstr(gerstr, gerstrsize, gerstrcap, "n", NULL);
@@ -453,8 +453,8 @@ _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, LOG_DEBUG, plugin_name,
- "_ger_get_entry_rights: SLAPI_ACL_WRITE_DEL & _ADD %s\n", rdntype);
+ slapi_log_error(SLAPI_LOG_ACL, 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 &&
acl_access_allowed(gerpb, e, rdntype, NULL,
@@ -501,40 +501,40 @@ _ger_get_attr_rights (
}
_append_gerstr(gerstr, gerstrsize, gerstrcap, type, ":");
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "_ger_get_attr_rights: SLAPI_ACL_READ %s\n", type );
+ slapi_log_error(SLAPI_LOG_ACL, 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)
{
/* r - read the values of type */
attrrights |= SLAPI_ACL_READ;
_append_gerstr(gerstr, gerstrsize, gerstrcap, "r", NULL);
}
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "_ger_get_attr_rights: SLAPI_ACL_SEARCH %s\n", type );
+ slapi_log_error(SLAPI_LOG_ACL, 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)
{
/* s - search the values of type */
attrrights |= SLAPI_ACL_SEARCH;
_append_gerstr(gerstr, gerstrsize, gerstrcap, "s", NULL);
}
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "_ger_get_attr_rights: SLAPI_ACL_COMPARE %s\n", type );
+ slapi_log_error(SLAPI_LOG_ACL, 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)
{
/* c - compare the values of type */
attrrights |= SLAPI_ACL_COMPARE;
_append_gerstr(gerstr, gerstrsize, gerstrcap, "c", NULL);
}
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "_ger_get_attr_rights: SLAPI_ACL_WRITE_ADD %s\n", type );
+ slapi_log_error(SLAPI_LOG_ACL, 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)
{
/* w - add the values of type */
attrrights |= ACLPB_SLAPI_ACL_WRITE_ADD;
_append_gerstr(gerstr, gerstrsize, gerstrcap, "w", NULL);
}
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "_ger_get_attr_rights: SLAPI_ACL_WRITE_DEL %s\n", type );
+ slapi_log_error(SLAPI_LOG_ACL, 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)
{
/* o - delete the values of type */
@@ -856,8 +856,8 @@ _ger_generate_template_entry (
slapi_pblock_get( pb, SLAPI_SEARCH_GERATTRS, &gerattrs );
if (NULL == gerattrs)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
- "Objectclass info is expected "
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "_ger_generate_template_entry - Objectclass info is expected "
"in the attr list, e.g., \"*@person\"\n");
rc = LDAP_SUCCESS;
goto bailout;
@@ -1089,10 +1089,10 @@ bailout:
gerstr = slapi_ch_smprintf("entryLevelRights: %d\nattributeLevelRights: *:%d", rc, rc );
}
- slapi_log_error(SLAPI_LOG_ACLSUMMARY, LOG_DEBUG, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACLSUMMARY, 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, LOG_DEBUG, plugin_name, "%s\n", gerstr);
+ slapi_log_error(SLAPI_LOG_ACLSUMMARY, 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 811a9ef..1777210 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, LOG_ERR, plugin_name, "Unable to allocate RWLOCK for group cache\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "Unable to allocate RWLOCK for group cache\n");
return 1;
}
return 0;
@@ -101,8 +101,8 @@ 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, LOG_DEBUG, plugin_name,
- "In traversal group deallocation\n" );
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "aclg_init_userGroup - In traversal group deallocation\n" );
__aclg__delete_userGroup (u_group);
}
} else {
@@ -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, LOG_DEBUG, plugin_name, "acl_init_userGroup: found in cache for dn:%s\n", n_dn);
+ slapi_log_error(SLAPI_LOG_ACL, 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, LOG_DEBUG, plugin_name, "NULL acl pblock\n" );
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "aclg_get_usersGroup - 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, LOG_DEBUG, plugin_name, "ALLOCATING GROUP FOR:%s\n", n_dn );
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "aclg_get_usersGroup - 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, LOG_DEBUG, plugin_name, "DEALLOCATING GROUP FOR:%s\n", u_group->aclug_ndn );
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "__aclg__delete_userGroup - 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 4814059..2d5342e 100644
--- a/ldap/servers/plugins/acl/aclinit.c
+++ b/ldap/servers/plugins/acl/aclinit.c
@@ -56,8 +56,8 @@ aclinit_main()
/* Initialize the LIBACCESS ACL library */
if (ACL_Init() != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
- "ACL Library Initialization failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "aclinit_main - ACL Library Initialization failed\n");
return 1;
}
@@ -85,22 +85,22 @@ 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, LOG_ERR, plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, plugin_name,
- "Unable to create the mutext array\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "aclinit_main - Unable to create the mutext array\n");
return 1;
}
/* Allocate the pool */
if ( 0 != acl_create_aclpb_pool () ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
- "Unable to create the acl private pool\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "aclinit_main - Unable to create the acl private pool\n");
return 1;
}
@@ -110,8 +110,8 @@ aclinit_main()
*/
/* initialize the ACLLIST sub-system */
if ( 0 != (rv = acllist_init ( ))) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
- "Unable to initialize the plugin:%d\n", rv );
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "aclinit_main - Unable to initialize the plugin:%d\n", rv );
return 1;
}
@@ -128,8 +128,8 @@ aclinit_main()
*/
sdn = slapi_sdn_new_ndn_byval("");
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "Searching for all acis(scope base) at suffix ''\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "aclinit_main - Searching for all acis(scope base) at suffix ''\n");
aclinit_search_and_update_aci ( 0, /* thisbeonly */
sdn, /* base */
NULL, /* be name*/
@@ -140,8 +140,8 @@ aclinit_main()
sdn = slapi_get_first_suffix( &node, 1 );
while (sdn)
{
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "Searching for all acis(scope subtree) at suffix '%s'\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "aclinit_main - Searching for all acis(scope subtree) at suffix '%s'\n",
slapi_sdn_get_dn(sdn) );
aclinit_search_and_update_aci ( 0, /* thisbeonly */
sdn, /* base */
@@ -210,8 +210,8 @@ 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, LOG_ERR, plugin_name,
- "Error: This be_name must be specified.\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "aclinit_search_and_update_aci - 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, LOG_DEBUG, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
"Adding acis for entry '%s'\n", slapi_sdn_get_dn(e_sdn));
slapi_entry_attr_find ( e, aci_attr_type, &attr );
@@ -355,8 +355,8 @@ __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, LOG_ERR, plugin_name,
- "Error: This (%s) ACL will not be considered for evaluation"
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "__aclinit_handler - This (%s) ACL will not be considered for evaluation"
" because of syntax errors.\n",
attrValue->bv_val ? attrValue->bv_val: "NULL");
call_back_data->retCode = rv;
@@ -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, LOG_DEBUG, plugin_name, "Removing acis\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "__aclinit_handler - Removing acis\n");
if ( call_back_data->lock_flag == DO_TAKE_ACLCACHE_WRITELOCK) {
acllist_acicache_WRITE_LOCK();
}
@@ -378,8 +378,8 @@ __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, LOG_ERR, plugin_name,
- "Error: ACls not deleted from %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "__aclinit_handler - ACLs not deleted from %s\n",
slapi_sdn_get_dn(e_sdn));
call_back_data->retCode = rv;
}
@@ -428,31 +428,31 @@ __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, LOG_ERR, plugin_name,
- "Unable to Register the methods\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "__aclinit__RegisterAttributes - 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, LOG_ERR, plugin_name,
- "Unable to Set the default method\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "__aclinit__RegisterAttributes - Unable to Set the default method\n");
return ACL_ERR;
}
rv = ACL_AttrGetterRegister(&errp, ACL_ATTR_IP, DS_LASIpGetter,
methodinfo, ACL_DBTYPE_ANY, ACL_AT_FRONT, NULL);
if (rv < 0) {
acl_print_acllib_err(&errp, NULL);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
- "Unable to Register Attr ip\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "__aclinit__RegisterAttributes - Unable to Register Attr ip\n");
return ACL_ERR;
}
rv = ACL_AttrGetterRegister(&errp, ACL_ATTR_DNS, DS_LASDnsGetter,
methodinfo, ACL_DBTYPE_ANY, ACL_AT_FRONT, NULL);
if (rv < 0) {
acl_print_acllib_err(&errp, NULL);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
- "Unable to Register Attr dns\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "__aclinit__RegisterAttributes - Unable to Register Attr dns\n");
return ACL_ERR;
}
return ACL_OK;
@@ -482,67 +482,67 @@ __aclinit__RegisterLases(void)
if (ACL_LasRegister(NULL, DS_LAS_USER, (LASEvalFunc_t) DS_LASUserEval,
(LASFlushFunc_t) NULL) < 0) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
- "Unable to register USER Las\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "__aclinit__RegisterLases - 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, LOG_ERR, plugin_name,
- "Unable to register GROUP Las\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "__aclinit__RegisterLases - 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, LOG_ERR, plugin_name,
- "Unable to register GROUPDN Las\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "__aclinit__RegisterLases - 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, LOG_ERR, plugin_name,
- "Unable to register ROLEDN Las\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "__aclinit__RegisterLases - 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, LOG_ERR, plugin_name,
- "Unable to register USERDN Las\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "__aclinit__RegisterLases - 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, LOG_ERR, plugin_name,
- "Unable to register USERDNATTR Las\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "__aclinit__RegisterLases - 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, LOG_ERR, plugin_name,
- "Unable to register CLIENTAUTHTYPE Las\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "__aclinit__RegisterLases - 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, LOG_ERR, plugin_name,
- "Unable to register GROUPDNATTR Las\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "__aclinit__RegisterLases - 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, LOG_ERR, plugin_name,
- "Unable to register USERATTR Las\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "__aclinit__RegisterLases - 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, LOG_ERR, plugin_name,
- "Unable to register SSF Las\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "__aclinit__RegisterLases - Unable to register SSF Las\n");
return ACL_ERR;
}
return ACL_OK;
diff --git a/ldap/servers/plugins/acl/acllas.c b/ldap/servers/plugins/acl/acllas.c
index b562a49..9ed8ea4 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, LOG_DEBUG, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, 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, LOG_ERR, plugin_name, "DS_LASIpGetter: failed to allocate client_praddr\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, plugin_name, "DS_LASIpGetter: Could not get client IP.\n" );
+ slapi_log_error(SLAPI_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, LOG_DEBUG, plugin_name, "DS_LASIpGetter: "
+ slapi_log_error(SLAPI_LOG_ACL, 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, LOG_DEBUG, plugin_name, "DS_LASIpGetter: "
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "DS_LASIpGetter - "
"Returning client ip address '%s'\n", ip_str);
} else {
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "DS_LASIpGetter: "
+ slapi_log_error(SLAPI_LOG_ACL, 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, LOG_DEBUG, plugin_name,
- "DS_LASDnsGetter:Unable to get the ACLPB(%d)\n", rv);
+ slapi_log_error(SLAPI_LOG_ACL, 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, LOG_ERR, plugin_name, "Could not get client IP.\n" );
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "DS_LASDnsGetter - 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, LOG_ERR, plugin_name, "Could not get client IP.\n" );
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "DS_LASDnsGetter - 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, LOG_DEBUG, plugin_name,
- "DS_LASDnsGetter:Couldn't set the DNS property(%d)\n", rv );
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASDnsGetter - Couldn't set the DNS property(%d)\n", rv );
return LAS_EVAL_FAIL;
}
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "DNS name: %s\n", dnsName );
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "DS_LASDnsGetter - DNS name: %s\n", dnsName );
return LAS_EVAL_TRUE;
}
@@ -395,8 +395,8 @@ 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, LOG_ERR, plugin_name,
- "User LAS is not supported in the ACL\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "DS_LASUserEval - User LAS is not supported in the ACL\n");
return LAS_EVAL_INVALID;
}
@@ -407,8 +407,8 @@ 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, LOG_ERR, plugin_name,
- "Group LAS is not supported in the ACL\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "DS_LASGroupEval - Group LAS is not supported in the ACL\n");
return LAS_EVAL_INVALID;
}
@@ -513,8 +513,8 @@ 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, LOG_ERR, plugin_name,
- "DS_LASUserDnEval:Syntax error(%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "DS_LASUserDnEval - Syntax error(%s)\n",
escape_string_with_punctuation( user, ebuf ));
return LAS_EVAL_FAIL;
}
@@ -630,8 +630,8 @@ 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, LOG_DEBUG, plugin_name,
- "DS_LASUserDnEval:Error in gen. filter(%s)\n", user);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASUserDnEval - Error in gen. filter(%s)\n", user);
}
if ((rc = acl_match_substring( f,
lasinfo.clientDn,
@@ -642,8 +642,8 @@ DS_LASUserDnEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
break;
}
if (rc == ACL_ERR) {
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "DS_LASUserDnEval:Error in matching patteren(%s)\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASUserDnEval - Error in matching patteren(%s)\n",
user);
}
slapi_filter_free(f,1);
@@ -651,8 +651,8 @@ 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, LOG_ERR, plugin_name,
- "DS_LASUserDnEval:Error in normalizing dn(%s)\n", user);
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "DS_LASUserDnEval - Error in normalizing dn(%s)\n", user);
normed = user;
}
rc = slapi_utf8casecmp((ACLUCHP)lasinfo.clientDn, (ACLUCHP)normed);
@@ -689,8 +689,8 @@ DS_LASUserDnEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
}
} else {
rc = LAS_EVAL_FAIL;
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "Returning UNDEFINED for userdn evaluation.\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASUserDnEval - Returning UNDEFINED for userdn evaluation.\n");
}
return rc;
@@ -773,8 +773,8 @@ 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, LOG_ERR, plugin_name,
- "DS_LASGroupDnEval:Syntax error(%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "DS_LASGroupDnEval - Syntax error(%s)\n",
escape_string_with_punctuation( groupName, ebuf ));
}
@@ -822,8 +822,8 @@ 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, LOG_DEBUG, plugin_name,
- "Group not evaluated(%s)\n", groupName);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASGroupDnEval - Group not evaluated(%s)\n", groupName);
break;
} else {
if ((PL_strcasestr (groupName, ACL_RULE_MACRO_DN_KEY) != NULL) ||
@@ -831,8 +831,8 @@ 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, LOG_DEBUG, plugin_name,
- "DS_LASGroupDnEval: Param group name:%s\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASGroupDnEval - Param group name:%s\n",
groupName);
} else {
LDAPURLDesc *ludp = NULL;
@@ -882,8 +882,8 @@ DS_LASGroupDnEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
} else {
if (urlerr) {
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "DS_LASGroupDnEval: Groupname [%s] not a valid ldap url: %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASGroupDnEval - Groupname [%s] not a valid ldap url: %d (%s)\n",
groupNameOrig, urlerr, slapi_urlparse_err2string(urlerr));
}
/* normal evaluation */
@@ -919,8 +919,8 @@ DS_LASGroupDnEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
}
} else {
rc = LAS_EVAL_FAIL;
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "Returning UNDEFINED for groupdn evaluation.\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASGroupDnEval - Returning UNDEFINED for groupdn evaluation.\n");
}
slapi_ch_free ((void**) &groups);
@@ -999,8 +999,8 @@ 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, LOG_ERR, plugin_name,
- "DS_LASRoleDnEval:Syntax error(%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "DS_LASRoleDnEval - Syntax error(%s)\n",
escape_string_with_punctuation( role, ebuf ));
}
@@ -1039,8 +1039,8 @@ 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, LOG_DEBUG, plugin_name,
- "Role not evaluated(%s) for anon user\n", role);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASRoleDnEval - Role not evaluated(%s) for anon user\n", role);
break;
} else {
@@ -1051,8 +1051,8 @@ 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, LOG_DEBUG, plugin_name,
- "DS_LASRoleDnEval: Param role name:%s\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASRoleDnEval - Param role name:%s\n",
role);
} else {/* normal evaluation */
@@ -1085,8 +1085,8 @@ DS_LASRoleDnEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
}
} else {
rc = LAS_EVAL_FAIL;
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "Returning UNDEFINED for roledn evaluation.\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASRoleDnEval - Returning UNDEFINED for roledn evaluation.\n");
}
slapi_ch_free ((void**) &roles);
@@ -1144,8 +1144,8 @@ 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, LOG_ERR, plugin_name,
- "DS_LASUserDnattr: invalid attr_name (should be %s or %s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "DS_LASUserDnAttrEval - Invalid attr_name (should be %s or %s)\n",
DS_LAS_SELFDNATTR, DS_LAS_USERDNATTR);
return LAS_EVAL_FAIL;
}
@@ -1212,8 +1212,8 @@ 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, LOG_ERR, plugin_name,
- "DS_LASUserDnattr: Exceeded the ATTR LIMIT:%d: Ignoring extra levels\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "DS_LASUserDnAttrEval - Exceeded the ATTR LIMIT:%d: Ignoring extra levels\n",
ACLLAS_MAX_LEVELS);
}
} else {
@@ -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, LOG_DEBUG, plugin_name,"Attr:%s\n" , attrName);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,"Attr:%s\n" , attrName);
matched = ACL_FALSE;
for (i=0; i < numOflevels; i++) {
if ( levels[i] == 0 ) {
@@ -1262,11 +1262,11 @@ 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, LOG_DEBUG, plugin_name,
- "ACL info: %s DOES allow ADD permission at level 0.\n", attr_name);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASUserDnAttrEval - ACL info: %s DOES allow ADD permission at level 0.\n", attr_name);
} else {
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "ACL info: %s does not allow ADD permission at level 0.\n", attr_name);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASUserDnAttrEval - ACL info: %s does not allow ADD permission at level 0.\n", attr_name);
got_undefined = 1;
continue;
}
@@ -1280,8 +1280,8 @@ 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, LOG_DEBUG, plugin_name,
- "DS_LASSelfDnAttrEval: fail because the retrieved %s in resource has more than one value (%d)\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASUserDnAttrEval - Failed because the retrieved %s in resource has more than one value (%d)\n",
attrName, numValues);
got_undefined = 1;
continue;
@@ -1293,8 +1293,8 @@ 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, LOG_ERR, plugin_name,
- "DS_LASUserDnAttrEval: Invalid syntax: %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "DS_LASUserDnAttrEval - Invalid syntax: %s\n",
attrVal->bv_val );
slapi_ch_free ( (void**) &s_attrName);
return LAS_EVAL_FAIL;
@@ -1303,8 +1303,8 @@ 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, LOG_DEBUG, plugin_name,
- "%s matches(%s, %s) level (%d)\n", attr_name,
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASUserDnAttrEval - %s matches(%s, %s) level (%d)\n", attr_name,
val, ACL_ESCAPE_STRING_WITH_PUNCTUATION (lasinfo.clientDn, ebuf), 0);
matched = ACL_TRUE;
slapi_ch_free ( (void **) &val);
@@ -1353,8 +1353,8 @@ DS_LASUserDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
*/
if (info.result) {
matched = ACL_TRUE;
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "%s matches at level (%d)\n", attr_name, levels[i]);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASUserDnAttrEval - %s matches at level (%d)\n", attr_name, levels[i]);
}
}
if (matched == ACL_TRUE) {
@@ -1377,8 +1377,8 @@ DS_LASUserDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
}
} else {
rc = LAS_EVAL_FAIL;
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "Returning UNDEFINED for %s evaluation.\n", attr_name);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASUserDnAttrEval - Returning UNDEFINED for %s evaluation.\n", attr_name);
}
return rc;
@@ -1476,8 +1476,8 @@ 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, LOG_ERR, plugin_name,
- "DS_LASLdapUrlattr: Exceeded the ATTR LIMIT:%d: Ignoring extra levels\n",
+ slapi_log_error(SLAPI_LOG_WARNING, plugin_name,
+ "DS_LASLdapUrlAttrEval - Exceeded the ATTR LIMIT:%d: Ignoring extra levels\n",
ACLLAS_MAX_LEVELS);
}
} else {
@@ -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, LOG_DEBUG, plugin_name,"Attr:%s\n" , attrName);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "DS_LASLdapUrlAttrEval - Attr:%s\n", attrName);
matched = ACL_FALSE;
for (i = 0; i < numOflevels; i++) {
if ( levels[i] == 0 ) { /* parent[0] or the target itself */
@@ -1583,8 +1583,8 @@ DS_LASLdapUrlAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
*/
if (info.result) {
matched = ACL_TRUE;
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "userdnAttr matches at level (%d)\n", levels[i]);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASLdapUrlAttrEval - userdnAttr matches at level (%d)\n", levels[i]);
}
}
if (matched == ACL_TRUE) {
@@ -1607,8 +1607,8 @@ DS_LASLdapUrlAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
}
} else {
rc = LAS_EVAL_FAIL;
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "Returning UNDEFINED for userdnattr evaluation.\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASLdapUrlAttrEval - Returning UNDEFINED for userdnattr evaluation.\n");
}
return rc;
@@ -1676,8 +1676,8 @@ DS_LASAuthMethodEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
LDAP_UTF8DEC(ptr);
}
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "DS_LASAuthMethodEval:authtype:%s authmethod:%s\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASAuthMethodEval - authtype:%s authmethod:%s\n",
lasinfo.authType, attr);
/* None method means, we don't care -- otherwise we care */
@@ -1756,24 +1756,24 @@ 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, LOG_DEBUG, plugin_name,
- "Error parsing numeric SSF from bind rule.\n");
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "Returning UNDEFINED for ssf evaluation.\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASSSFEval - Error parsing numeric SSF from bind rule.\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASSSFEval - 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, LOG_DEBUG, plugin_name,
- "SSF \"%s\" is invalid. Value must range from 0 to %d",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASSSFEval - SSF \"%s\" is invalid. Value must range from 0 to %d",
attr, INT_MAX);
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "Returning UNDEFINED for ssf evaluation.\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASSSFEval - Returning UNDEFINED for ssf evaluation.\n");
}
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "DS_LASSSFEval: aclssf:%d, ssf:%d\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASSSFEval - aclssf:%d, ssf:%d\n",
aclssf, lasinfo.ssf);
switch ((int)comparator) {
@@ -1824,17 +1824,16 @@ 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, LOG_DEBUG, plugin_name,
- "Invalid comparator \"%d\" evaluating SSF.\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASSSFEval - Invalid comparator \"%d\" evaluating SSF.\n",
(int)comparator);
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "Returning UNDEFINED for ssf evaluation.\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASSSFEval - Returning UNDEFINED for ssf evaluation.\n");
}
return rc;
}
-
/****************************************************************************
* Struct to evaluate and keep the current members being evaluated
*
@@ -1912,7 +1911,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, LOG_ERR, NULL, "\n======== candidate member info in eval_info ========%s\n\n", buf );
+ slapi_log_error(SLAPI_LOG_DEBUG, plugin_name, "\n======== candidate member info in eval_info ========%s\n\n", buf );
}
else
{
@@ -1934,7 +1933,6 @@ 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, LOG_ERR, NULL, "%s\n", buf );
}
}
#endif
@@ -1989,33 +1987,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, LOG_DEBUG, plugin_name,
- "Failed to find/allocate a usergroup--aborting evaluation\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllas__user_ismember_of_group - Failed to find/allocate a usergroup--aborting evaluation\n");
return(ACL_DONT_KNOW);
}
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "Evaluating user %s in group %s?\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "acllas__user_ismember_of_group - 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, LOG_DEBUG, plugin_name, "-- In %s\n",
+ slapi_log_error(SLAPI_LOG_ACL, 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, LOG_DEBUG, plugin_name, "Evaluated ACL_TRUE\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "acllas__user_ismember_of_group - 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, LOG_DEBUG, plugin_name, "-- Not in %s\n",
+ slapi_log_error(SLAPI_LOG_ACL, 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, LOG_DEBUG, plugin_name, "Evaluated ACL_FALSE\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "acllas__user_ismember_of_group - Evaluated ACL_FALSE\n");
return ACL_FALSE;
}
}
@@ -2100,9 +2098,9 @@ eval_another_member:
NULL /* referral_callback */);
if ( info.result == ACL_TRUE )
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,"-- In %s\n", info.memberInfo[info.c_idx]->member );
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,"acllas__user_ismember_of_group - In %s\n", info.memberInfo[info.c_idx]->member );
else if ( info.result == ACL_FALSE )
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,"-- Not in %s\n", info.memberInfo[info.c_idx]->member );
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,"acllas__user_ismember_of_group - Not in %s\n", info.memberInfo[info.c_idx]->member );
slapi_pblock_destroy (aPb);
}
@@ -2113,7 +2111,7 @@ eval_another_member:
** group or one of the nested groups. We are done.
*/
result = ACL_TRUE;
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, "Evaluated ACL_TRUE\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "acllas__user_ismember_of_group - Evaluated ACL_TRUE\n");
goto free_and_return;
}
numOfMembersVisited++;
@@ -2134,8 +2132,8 @@ eval_another_member:
}
if ((nesting_level > max_nestlevel)) {
- 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",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllas__user_ismember_of_group - Member not found within the allowed nesting level (Allowed:%d Looked at:%d)\n",
max_nestlevel, nesting_level);
result = ACL_DONT_KNOW; /* don't try to cache info based on this result */
@@ -2145,8 +2143,8 @@ eval_another_member:
/* limit of -1 means "no limit */
if (info.c_idx > max_memberlimit &&
max_memberlimit != -1 ) {
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "GroupEval:Looked at too many entries:(%d, %d)\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllas__user_ismember_of_group - 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 */
goto free_and_return;
@@ -2274,8 +2272,8 @@ free_and_return:
ACLUG_INCR_GROUPS_LIST;
}
u_group->aclug_member_groups[ngr] = slapi_ch_strdup ( groupMember->member );
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "Adding Group (%s) ParentGroup (%s) to the IN GROUP List\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllas__user_ismember_of_group - Adding Group (%s) ParentGroup (%s) to the IN GROUP List\n",
groupMember->member , parentGroup ? parentGroup->member: "NULL");
groupMember = parentGroup;
@@ -2319,8 +2317,8 @@ free_and_return:
ACLUG_INCR_GROUPS_LIST;
}
u_group->aclug_notmember_groups[ngr] = slapi_ch_strdup ( groupMember->member );
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "Adding Group (%s) ParentGroup (%s) to the NOT IN GROUP List\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllas__user_ismember_of_group - Adding Group (%s) ParentGroup (%s) to the NOT IN GROUP List\n",
groupMember->member , parentGroup ? parentGroup->member: "NULL");
groupMember = parentGroup;
@@ -2332,7 +2330,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, LOG_DEBUG, plugin_name, "Evaluated ACL_DONT_KNOW\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "acllas__user_ismember_of_group - Evaluated ACL_DONT_KNOW\n");
}
/* Unlock the group cache, we are done with updating */
@@ -2401,15 +2399,15 @@ 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, LOG_ERR, plugin_name,
- "acllas__handle_group_entry: Invalid syntax: %s\n",
+ slapi_log_error(SLAPI_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, LOG_ERR, plugin_name,
- "acllas__handle_group_entry: last member index lu_idx is overflown:%d: Too many group ACL members\n", n);
+ slapi_log_error(SLAPI_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,8 +2418,8 @@ 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, LOG_ERR, plugin_name,
- "acllas__handle_group_entry: out of memory - could not allocate space for %d group members\n",
+ slapi_log_error(SLAPI_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;
slapi_ch_free_string(&n_dn);
@@ -2465,13 +2463,13 @@ 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, LOG_ERR, plugin_name,
- "acllas__handle_group_entry: Invalid syntax: %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acllas__handle_group_entry - Invalid syntax: %s\n",
attrVal->bv_val );
return 0;
}
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "ACL Group Eval:MemberURL:%s\n", memberURL);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllas__handle_group_entry - MemberURL:%s\n", memberURL);
info->result = acllas__client_match_URL (
info->aclpb,
info->userDN,
@@ -2481,8 +2479,8 @@ 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, LOG_DEBUG, plugin_name,
- "ACL Group Eval:Badly Formed MemberURL:%s\n", attrVal->bv_val);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllas__handle_group_entry - Badly Formed MemberURL:%s\n", attrVal->bv_val);
}
i = slapi_attr_next_value ( currAttr, i, &sval );
}
@@ -2490,8 +2488,8 @@ 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, LOG_DEBUG, plugin_name,
- " acllas__handle_group_entry:Client Cert missing\n" );
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllas__handle_group_entry - Client Cert missing\n" );
/* cannot evaulate cert membership without cert - go to next attribute */
goto nextattr;
}
@@ -2622,7 +2620,7 @@ DS_LASGroupDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
LDAP_UTF8DEC(ptr);
}
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,"Attr:%s\n" , attrName);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,"DS_LASGroupDnAttrEval - Attr:%s\n" , attrName);
/* See if we have a parent[2].attr" rule */
if (strstr(attrName, "parent[") != NULL) {
@@ -2646,8 +2644,8 @@ 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, LOG_ERR, plugin_name,
- "DS_LASGroupDnattr: Exceeded the ATTR LIMIT:%d: Ignoring extra levels\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "DS_LASGroupDnAttrEval - Exceeded the ATTR LIMIT:%d: Ignoring extra levels\n",
ACLLAS_MAX_LEVELS);
}
} else {
@@ -2683,8 +2681,8 @@ 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, LOG_DEBUG, plugin_name,
- "ACL info: groupdnAttr does not allow ADD permission at level 0.\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASGroupDnAttrEval - ACL info: groupdnAttr does not allow ADD permission at level 0.\n");
got_undefined = 1;
continue;
}
@@ -2695,8 +2693,8 @@ 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, LOG_ERR, plugin_name,
- "DS_LASGroupDnAttrEval: Invalid syntax: %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "DS_LASGroupDnAttrEval - Invalid syntax: %s\n",
attrVal->bv_val );
slapi_ch_free_string(&s_attrName);
return 0;
@@ -2707,8 +2705,8 @@ 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, LOG_DEBUG, plugin_name,
- "groupdnattr matches at level (%d)\n", levels[i]);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASGroupDnAttrEval - groupdnattr matches at level (%d)\n", levels[i]);
break;
} else if ( matched == ACL_DONT_KNOW ) {
/* record this but keep going--maybe another group will evaluate to TRUE */
@@ -2784,8 +2782,8 @@ 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, LOG_DEBUG, plugin_name,
- "groupdnattr matches at level (%d)\n", levels[i]);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASGroupDnAttrEval - groupdnattr matches at level (%d)\n", levels[i]);
break;
} else if ( matched == ACL_DONT_KNOW ) {
/* record this but keep going--maybe another group at another level
@@ -2810,8 +2808,8 @@ DS_LASGroupDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
}
} else {
rc = LAS_EVAL_FAIL;
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "Returning UNDEFINED for groupdnattr evaluation.\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASGroupDnAttrEval - Returning UNDEFINED for groupdnattr evaluation.\n");
}
return rc;
@@ -2867,8 +2865,8 @@ acllas__eval_memberGroupDnAttr (char *attrName, Slapi_Entry *e,
}
if ( (u_group = aclg_get_usersGroup ( aclpb , n_clientdn )) == NULL) {
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "Failed to find/allocate a usergroup--aborting evaluation\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllas__eval_memberGroupDnAttr - Failed to find/allocate a usergroup--aborting evaluation\n");
slapi_ch_free ( (void **)&s_str );
return(ACL_DONT_KNOW);
}
@@ -2909,8 +2907,8 @@ acllas__eval_memberGroupDnAttr (char *attrName, Slapi_Entry *e,
}
normed = slapi_create_dn_string("%s", base);
if (NULL == normed) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
- "acllas__eval_memberGroupDnAttr: Invalid syntax: %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acllas__eval_memberGroupDnAttr - Invalid syntax: %s\n",
base );
slapi_ch_free ( (void **)&s_str );
return ACL_FALSE;
@@ -2966,12 +2964,12 @@ 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, LOG_DEBUG, plugin_name, "currDn:(%s) \n\tNO MEMBER ADDED\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "acllas__eval_memberGroupDnAttr - 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, LOG_DEBUG, plugin_name,
- "currDn:(%s) \n\tADDED MEMBER[%d]=%s\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllas__eval_memberGroupDnAttr - currDn:(%s) \n\tADDED MEMBER[%d]=%s\n",
ACL_ESCAPE_STRING_WITH_PUNCTUATION (curMemberDn, ebuf), i, info.member[i]);
}
}
@@ -3022,8 +3020,8 @@ 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, LOG_DEBUG, plugin_name,
- "acllas__eval_memberGroupDnAttr:GROUP[%d] IN CACHE:%s\n",
+ slapi_log_error(SLAPI_LOG_ACL, 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,8 +3038,8 @@ 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, LOG_ERR, plugin_name,
- "acllas__eval_memberGroupDnAttr: Invalid syntax: %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acllas__eval_memberGroupDnAttr - Invalid syntax: %s\n",
attrVal->bv_val );
slapi_ch_free ( (void **)&s_str );
return ACL_FALSE;
@@ -3202,8 +3200,8 @@ 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, LOG_ERR, plugin_name,
- "acllas__verify_client: Invalid syntax: %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acllas__verify_client - Invalid syntax: %s\n",
attrVal->bv_val );
return 0;
}
@@ -3296,7 +3294,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, LOG_ERR, plugin_name,
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
"acllas__get_members: Invalid syntax: %s\n",
attrVal->bv_val );
}
@@ -3356,8 +3354,8 @@ 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, LOG_DEBUG, plugin_name,
- "DS_LASUserAttrEval:Invalid value(%s)\n", attr_pattern);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASUserAttrEval - Invalid value(%s)\n", attr_pattern);
slapi_ch_free ( (void **) &attrName );
return LAS_EVAL_FAIL;
}
@@ -3422,8 +3420,8 @@ DS_LASUserAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
}
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "DS_LASUserAttrEval: AttrName:%s, attrVal:%s\n", attrName, attrValue );
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASUserAttrEval - AttrName:%s, attrVal:%s\n", attrName, attrValue );
/*
* Here it's the userAttr = "OU#Directory Server" case.
@@ -3508,8 +3506,8 @@ 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, LOG_DEBUG, plugin_name,
- "acllas__client_match_URL: NULL acl pblock\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllas__client_match_URL - NULL acl pblock\n");
return ACL_FALSE;
}
@@ -3544,8 +3542,8 @@ 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, LOG_DEBUG, plugin_name,
- "acllas__client_match_URL: Unable to get client's entry\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllas__client_match_URL - Unable to get client's entry\n");
goto done;
}
@@ -3559,8 +3557,8 @@ 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, LOG_DEBUG, plugin_name,
- "acllas__client_match_URL: url %s does not have a recognized ldap protocol prefix\n", url);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllas__client_match_URL - url %s does not have a recognized ldap protocol prefix\n", url);
goto done;
}
rawdn = url + prefix_len; /* ldap(s)://host:port/... or ldap(s):///... */
@@ -3573,8 +3571,8 @@ 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, LOG_DEBUG, plugin_name,
- "acllas__client_match_URL: url %s does not have a valid ldap protocol prefix\n", url);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllas__client_match_URL - url %s does not have a valid ldap protocol prefix\n", url);
goto done;
}
hostport_len = ++rawdn - tmpp; /* ldap(s)://host:port/... */
@@ -3590,8 +3588,8 @@ 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, LOG_ERR, plugin_name,
- "acllas__client_match_URL: error normalizing dn [%s] part of URL [%s]\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acllas__client_match_URL - Error normalizing dn [%s] part of URL [%s]\n",
rawdn, url);
goto done;
}
@@ -3606,14 +3604,14 @@ 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, LOG_ERR, plugin_name,
- "acllas__client_match_URL: url [%s] is invalid: %d (%s)\n",
+ slapi_log_error(SLAPI_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, LOG_ERR, plugin_name,
- "acllas__client_match_URL: url [%s] has no base dn [%s] or filter [%s]\n",
+ slapi_log_error(SLAPI_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,
NULL == ludp->lud_filter ? "null" : ludp->lud_filter );
@@ -3623,8 +3621,8 @@ 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, LOG_DEBUG, plugin_name,
- "acllas__client_match_URL: url [%s] scope is subtree but dn [%s] "
+ slapi_log_error(SLAPI_LOG_ACL, 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 );
goto done;
@@ -3633,8 +3631,8 @@ 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, LOG_DEBUG, plugin_name,
- "acllas__client_match_URL: url [%s] scope is onelevel but dn [%s] "
+ slapi_log_error(SLAPI_LOG_ACL, 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 );
slapi_ch_free_string(&parent);
@@ -3643,8 +3641,8 @@ 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, LOG_DEBUG, plugin_name,
- "acllas__client_match_URL: url [%s] scope is base but dn [%s] "
+ slapi_log_error(SLAPI_LOG_ACL, 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 );
goto done;
@@ -3656,8 +3654,8 @@ 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, LOG_ERR, plugin_name,
- "DS_LASUserAttrEval: The member URL [%s] search filter in entry [%s] is not valid: [%s]\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acllas__client_match_URL - The member URL [%s] search filter in entry [%s] is not valid: [%s]\n",
normed, n_clientdn, ludp->lud_filter);
goto done;
}
@@ -3716,8 +3714,8 @@ __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, LOG_DEBUG, plugin_name,
- "%s:Invalid LAS(%s)\n", lasName, attr_name);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "__acllas_setup - %s:Invalid LAS(%s)\n", lasName, attr_name);
return LAS_EVAL_INVALID;
}
@@ -3725,12 +3723,12 @@ __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, LOG_DEBUG, plugin_name,
- "%s:Invalid comparator(%d)\n", lasName, (int)comparator);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "__acllas_setup - %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, LOG_DEBUG, plugin_name,
- "%s:Invalid comparator(%d)\n", lasName, (int)comparator);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "__acllas_setup - %s:Invalid comparator(%d)\n", lasName, (int)comparator);
return LAS_EVAL_INVALID;
}
@@ -3741,8 +3739,8 @@ __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, LOG_DEBUG, plugin_name,
- "%s:Unable to get the clientdn attribute(%d)\n",lasName, rc);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "__acllas_setup - %s:Unable to get the clientdn attribute(%d)\n",lasName, rc);
return LAS_EVAL_FAIL;
}
@@ -3752,7 +3750,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, LOG_DEBUG, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
"%s: No user\n",lasName);
return LAS_EVAL_FAIL;
}
@@ -3760,8 +3758,8 @@ __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, LOG_DEBUG, plugin_name,
- "%s:Unable to get the Slapi_Entry attr(%d)\n",lasName, rc);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "__acllas_setup - %s:Unable to get the Slapi_Entry attr(%d)\n",lasName, rc);
return LAS_EVAL_FAIL;
}
@@ -3770,21 +3768,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, LOG_DEBUG, plugin_name,
- "%s:Unable to get the ACLPB(%d)\n", lasName, rc);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "__acllas_setup - %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, LOG_DEBUG, plugin_name,
- "%s:Unable to get LDAPI value(%d)\n", lasName, rc);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "__acllas_setup - %s:Unable to get LDAPI value(%d)\n", lasName, rc);
return LAS_EVAL_FAIL;
}
if (NULL == attr_pattern ) {
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
"%s:No rule value in the ACL\n", lasName);
return LAS_EVAL_FAIL;
@@ -3793,8 +3791,8 @@ __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, LOG_DEBUG, plugin_name,
- "%s:Unable to get the auth type(%d)\n", lasName, rc);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "__acllas_setup - %s:Unable to get the auth type(%d)\n", lasName, rc);
return LAS_EVAL_FAIL;
}
@@ -3802,8 +3800,8 @@ __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, LOG_DEBUG, plugin_name,
- "%s:Unable to get the ssf(%d)\n", lasName, rc);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "__acllas_setup - %s:Unable to get the ssf(%d)\n", lasName, rc);
}
return 0;
}
@@ -3820,8 +3818,8 @@ static int acllas__user_has_role( struct acl_pblock *aclpb,
int present = 0;
if ( NULL == aclpb ) {
- slapi_log_error ( SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "acllas__user_has_role: NULL acl pblock\n");
+ slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ "acllas__user_has_role - NULL acl pblock\n");
return ACL_FALSE;
}
@@ -3856,8 +3854,8 @@ static int acllas__user_has_role( struct acl_pblock *aclpb,
}
if ( NULL == aclpb->aclpb_client_entry ) {
- slapi_log_error ( SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "acllas__user_has_role: Unable to get client's entry\n");
+ slapi_log_error ( SLAPI_LOG_ACL, plugin_name,
+ "acllas__user_has_role - Unable to get client's entry\n");
return ACL_FALSE;
}
@@ -3930,8 +3928,8 @@ DS_LASRoleDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
*
*
*/
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "ACL info: userattr=XXX#ROLEDN does not allow ADD permission.\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "DS_LASRoleDnAttrEval - ACL info: userattr=XXX#ROLEDN does not allow ADD permission.\n");
got_undefined = 1;
} else {
@@ -3948,8 +3946,8 @@ 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, LOG_ERR, plugin_name,
- "DS_LASRoleDnAttrEval: Invalid syntax: %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "DS_LASRoleDnAttrEval - Invalid syntax: %s\n",
attrVal->bv_val );
return LAS_EVAL_FAIL;
}
@@ -4025,8 +4023,8 @@ 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, LOG_DEBUG, plugin_name,
- "aclutil_evaluate_macro for aci '%s' index '%d'\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "aclutil_evaluate_macro - For aci '%s' index '%d'\n",
aci->aclName, aci->aci_index );
if ( aci->aci_macro == NULL ) {
/* No $dn in the target, it's a $attr type subject rule */
@@ -4040,14 +4038,14 @@ 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, LOG_DEBUG, plugin_name,
- "ACL info: failed to locate the calculated target"
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "aclutil_evaluate_macro - 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, LOG_DEBUG, plugin_name,
- "ACL info: found matched_val (%s) for aci index %d"
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "aclutil_evaluate_macro - ACL info: found matched_val (%s) for aci index %d"
"in macro ht\n",
aci->aclName, aci->aci_index );
}
@@ -4311,8 +4309,8 @@ acllas_replace_attr_macro( char *rule, lasInfo *lasinfo)
str = strstr(macro_str, ".");
if (!str) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
- "acllas_replace_attr_macro: Invalid macro \"%s\".",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acllas_replace_attr_macro - Invalid macro \"%s\".",
macro_str);
slapi_ch_free_string(¯o_str);
charray_free(working_list);
@@ -4491,12 +4489,12 @@ 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, LOG_DEBUG, plugin_name,
- "role evaluation: user '%s' does have role '%s'\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllas_eval_one_role - User '%s' does have role '%s'\n",
ACL_ESCAPE_STRING_WITH_PUNCTUATION (lasinfo->clientDn, ebuf), role);
} else {
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "role evaluation: user '%s' does NOT have role '%s'\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllas_eval_one_role - User '%s' does NOT have role '%s'\n",
ACL_ESCAPE_STRING_WITH_PUNCTUATION (lasinfo->clientDn, ebuf), role);
}
}
@@ -4515,8 +4513,8 @@ 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, LOG_ERR, plugin_name,
- "Warning: Bad targetfilter(%s) in aci: does not match\n", str);
+ slapi_log_error(SLAPI_LOG_WARNING, plugin_name,
+ "acllas_eval_one_target_filter - Bad targetfilter(%s) in aci: does not match\n", str);
return(ACL_DONT_KNOW);
}
@@ -4531,10 +4529,6 @@ static int acllas_eval_one_target_filter( char * str, Slapi_Entry *e) {
}
-
-
-
-
/***************************************************************************/
/* E N D */
/***************************************************************************/
diff --git a/ldap/servers/plugins/acl/acllist.c b/ldap/servers/plugins/acl/acllist.c
index 10c9c96..597d12f 100644
--- a/ldap/servers/plugins/acl/acllist.c
+++ b/ldap/servers/plugins/acl/acllist.c
@@ -72,8 +72,8 @@ acllist_init(void)
{
if (( aci_rwlock = slapi_new_rwlock() ) == NULL ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
- "acllist_init:failed in getting the rwlock\n" );
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acllist_init - Failed in getting the rwlock\n" );
return 1;
}
@@ -114,13 +114,13 @@ 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, LOG_DEBUG, plugin_name,
- "Backend %s is no longer STARTED--deactivating it's acis\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl_be_state_change_fnc - 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, LOG_DEBUG, plugin_name,
- "Failed to retrieve backend--NOT activating it's acis\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl_be_state_change_fnc - Failed to retrieve backend--NOT activating it's acis\n");
return;
}
@@ -129,8 +129,8 @@ 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, LOG_DEBUG, plugin_name,
- "Failed to retrieve backend--NOT activating it's acis\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl_be_state_change_fnc - Failed to retrieve backend--NOT activating it's acis\n");
return;
}
@@ -142,12 +142,12 @@ 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, LOG_DEBUG, plugin_name,
- "Backend %s is now STARTED--activating it's acis\n", be_name);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl_be_state_change_fnc - 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, LOG_DEBUG, plugin_name,
- "Failed to retrieve backend--NOT activating it's acis\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl_be_state_change_fnc - Failed to retrieve backend--NOT activating it's acis\n");
return;
}
@@ -156,8 +156,8 @@ 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, LOG_DEBUG, plugin_name,
- "Failed to retrieve backend--NOT activating it's acis\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acl_be_state_change_fnc - Failed to retrieve backend--NOT activating it's acis\n");
return;
}
@@ -195,8 +195,8 @@ 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, LOG_ERR, plugin_name,
- "ACL PARSE ERR(rv=%d): %s\n", rv, acl_str );
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acllist_insert_aci_needsLock_ext - ACL PARSE ERR(rv=%d): %s\n", rv, acl_str );
slapi_ch_free ( (void **) &acl_str );
acllist_free_aci ( aci );
@@ -205,8 +205,8 @@ 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, LOG_DEBUG, plugin_name,
- "ACL ADD ACI ERR(rv=%d): %s\n", rv, acl_str );
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllist_insert_aci_needsLock_ext - ACL ADD ACI ERR(rv=%d): %s\n", rv, acl_str );
slapi_ch_free ( (void **) &acl_str );
acllist_free_aci ( aci );
return 1;
@@ -241,8 +241,8 @@ __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, LOG_DEBUG, plugin_name,
- "Can't insert the acl in the tree\n");
+ slapi_log_error ( SLAPI_PLUGIN_ACL, plugin_name,
+ "__acllist_add_aci - Can't insert the acl in the tree\n");
rv = 1;
} else {
aci_t *t_aci;;
@@ -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, LOG_DEBUG, plugin_name, "Added the ACL:%s to existing container:[%d]%s\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "__acllist_add_aci - 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, LOG_DEBUG, plugin_name, "Added %s to container:%d\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "__acllist_add_aci - Added %s to container:%d\n",
slapi_sdn_get_ndn( aciListHead->acic_sdn ), aciListHead->acic_index );
break;
}
@@ -359,8 +359,8 @@ 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, LOG_DEBUG, plugin_name,
- "No acis to remove in this entry\n" );
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllist_remove_aci_needsLock - No acis to remove in this entry\n" );
return 0;
}
@@ -384,8 +384,8 @@ 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, LOG_DEBUG, plugin_name,
- "Removing container[%d]=%s\n", root->acic_index,
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllist_remove_aci_needsLock - Removing container[%d]=%s\n", root->acic_index,
slapi_sdn_get_ndn ( root->acic_sdn) );
dContainer = (AciContainer *) avl_delete ( &acllistRoot, aciListHead,
__acllist_aciContainer_node_cmp );
@@ -409,8 +409,8 @@ 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, LOG_ERR, plugin_name,
- " Can't add the rest of the acls for entry:%s after delete\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acllist_remove_aci_needsLock - 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, LOG_ERR, plugin_name, "Missing aclpb 4 \n" );
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "acllist_init_scan - Missing aclpb\n" );
return;
}
@@ -665,8 +665,8 @@ 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, LOG_DEBUG, plugin_name,
- "Failed to find root for base: %s \n", basedn );
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllist_init_scan - Failed to find root for base: %s \n", basedn );
}
tmp = slapi_dn_parent ( basedn );
slapi_ch_free_string(&basedn);
@@ -699,8 +699,8 @@ acllist_aciscan_update_scan ( Acl_PBlock *aclpb, char *edn )
int is_not_search_base = 1;
if ( !aclpb ) {
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "acllist_aciscan_update_scan: NULL acl pblock\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllist_aciscan_update_scan - NULL acl pblock\n");
return;
}
@@ -745,9 +745,9 @@ 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, LOG_DEBUG, plugin_name,
- "Searching AVL tree for update:%s: container:%d\n", basedn ,
- root ? root->acic_index: -1);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "acllist_aciscan_update_scan - Searching AVL tree for update:%s: container:%d\n",
+ basedn, root ? root->acic_index: -1);
if ( index >= aclpb_max_selected_acls -2 ) {
aclpb->aclpb_handles_index[0] = -1;
slapi_ch_free ( (void **) &basedn);
@@ -910,8 +910,8 @@ 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, LOG_DEBUG, plugin_name,
- "Can't find the acl in the tree for moddn operation:olddn%s\n",
+ slapi_log_error ( SLAPI_PLUGIN_ACL, plugin_name,
+ "acllist_moddn_aci_needsLock - Can't find the acl in the tree for moddn operation:olddn%s\n",
slapi_sdn_get_ndn ( oldsdn ));
aciListHead->acic_sdn = NULL;
acllist_free_aciContainer ( &aciListHead );
@@ -956,8 +956,8 @@ acllist_print_tree ( Avlnode *root, int *depth, char *start, char *side)
return;
}
aciHeadList = (AciContainer *) root->avl_data;
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, "plugin_name",
- "Container[ Depth=%d%s-%s]: %s\n", *depth, start, side,
+ slapi_log_error(SLAPI_LOG_ACL, "plugin_name",
+ "acllist_print_tree - Container[ Depth=%d%s-%s]: %s\n", *depth, start, side,
slapi_sdn_get_ndn ( aciHeadList->acic_sdn ) );
(*depth)++;
diff --git a/ldap/servers/plugins/acl/aclparse.c b/ldap/servers/plugins/acl/aclparse.c
index 662753e..45adb2b 100644
--- a/ldap/servers/plugins/acl/aclparse.c
+++ b/ldap/servers/plugins/acl/aclparse.c
@@ -148,8 +148,8 @@ 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, LOG_ERR, plugin_name,
- "The ACL target %s does not exist\n", slapi_sdn_get_dn(&targdn));
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acl_parse - The ACL target %s does not exist\n", slapi_sdn_get_dn(&targdn));
}
slapi_free_search_results_internal(temppb);
@@ -183,14 +183,14 @@ 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, LOG_ERR, plugin_name,
- "acl_parse: A macro in a subject ($dn) must have a macro in the target.\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acl_parse - A macro in a subject ($dn) must have a macro in the target.\n");
return(ACL_INVALID_TARGET);
}
return 0;
}
-
+
/***************************************************************************
*
* __aclp__parse_aci
@@ -294,8 +294,8 @@ __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, LOG_ERR, plugin_name,
- "acl_parse: A macro in a targetfilter ($dn) must have a macro in the target.\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "__aclp__parse_aci - A macro in a targetfilter ($dn) must have a macro in the target.\n");
return(ACL_SYNTAX_ERR);
}
@@ -468,8 +468,8 @@ __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, LOG_DEBUG, plugin_name,
- "acl__parse_aci: Unsupported filter type:%d\n", filterChoice);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "__aclp__parse_aci - Unsupported filter type:%d\n", filterChoice);
return(ACL_SYNTAX_ERR);
} else if (( filterChoice == LDAP_FILTER_SUBSTRINGS) &&
(type & ACI_TARGET_DN)) {
@@ -489,8 +489,8 @@ __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, LOG_DEBUG, plugin_name,
- "Multiple targets in the ACL syntax\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "__aclp__parse_aci - Multiple targets in the ACL syntax\n");
slapi_filter_free(f, 1);
return(ACL_SYNTAX_ERR);
} else {
@@ -498,8 +498,8 @@ __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, LOG_DEBUG, plugin_name,
- "Multiple target Filters in the ACL Syntax\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "__aclp__parse_aci - Multiple target Filters in the ACL Syntax\n");
slapi_filter_free(f, 1);
return(ACL_SYNTAX_ERR);
} else {
@@ -509,8 +509,8 @@ __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, LOG_DEBUG, plugin_name,
- "Multiple targets (target_to) in the ACL syntax\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "__aclp__parse_aci - Multiple targets (target_to) in the ACL syntax\n");
slapi_filter_free(f, 1);
return(ACL_SYNTAX_ERR);
} else {
@@ -519,8 +519,8 @@ __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, LOG_DEBUG, plugin_name,
- "Multiple targets (target_from) in the ACL syntax\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "__aclp__parse_aci - Multiple targets (target_from) in the ACL syntax\n");
slapi_filter_free(f, 1);
return(ACL_SYNTAX_ERR);
} else {
@@ -531,8 +531,8 @@ __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, LOG_DEBUG, plugin_name,
- "Unknown keyword at \"%s\"\n Expecting"
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "__aclp__parse_aci - Unknown keyword at \"%s\"\n Expecting"
" \"target\", \"targetattr\", \"targetfilter\", \"targattrfilters\""
" or \"version\"\n", str);
return(ACL_SYNTAX_ERR);
@@ -543,7 +543,7 @@ __aclp__parse_aci(char *str, aci_t *aci_item, char **errbuf)
return 0;
}
-
+
/***************************************************************************
* acl__sanity_check_acltxt
*
@@ -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, LOG_DEBUG, plugin_name, "Normalized String:%s\n", newstr);
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "__aclp__sanity_check_acltxt - Normalized String:%s\n", newstr);
/* check for acl syntax error */
if ((handle = (ACLListHandle_t *) ACL_ParseString(&errp, newstr)) == NULL) {
@@ -1514,8 +1514,8 @@ __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, LOG_ERR, plugin_name,
- "__aclp__init_targetattr: %s\n", errstr);
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "__aclp__init_targetattr - %s\n", errstr);
if (errbuf) {
aclutil_str_append(errbuf, errstr);
}
@@ -1591,8 +1591,8 @@ __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, LOG_ERR, plugin_name,
- "__aclp__init_targetattr: %s\n", errstr);
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "__aclp__init_targetattr - %s\n", errstr);
if (errbuf) {
aclutil_str_append(errbuf, errstr);
}
@@ -1617,8 +1617,8 @@ __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, LOG_ERR, plugin_name,
- "__aclp__init_targetattr: %s\n", errstr);
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "__aclp__init_targetattr - %s\n", errstr);
if (errbuf) {
aclutil_str_append(errbuf, errstr);
}
@@ -1845,8 +1845,8 @@ 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, LOG_ERR, plugin_name,
- "acl_check_for_target_macro: Error: Invalid macro target dn: \"%s\"\n", value);
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acl_check_for_target_macro - Invalid macro target dn: \"%s\"\n", value);
aci_item->aci_type &= ~ACI_TARGET_MACRO_DN;
slapi_ch_free((void **)&aci_item->aci_macro);
return -1;
@@ -1986,8 +1986,8 @@ 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, LOG_ERR, plugin_name,
- "__aclp__init_targetattrfilters: Error: The statement does not begin and end with a \": [%s]\n",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "__aclp__init_targetattrfilters - The statement does not begin and end with a \": [%s]\n",
s);
return (ACL_SYNTAX_ERR);
}
@@ -2106,8 +2106,7 @@ static int __acl__init_targetattrfilters( aci_t *aci, char *input_str) {
return( ACL_SYNTAX_ERR);
}
- return(0);
-
+ return(0);
}
/*
@@ -2214,8 +2213,8 @@ static int __acl_init_targetattrfilter( Targetattrfilter *attrfilter,
if ( (tmp_ptr = strstr( str, ":")) == NULL ) {
/* No :, syntax error */
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "Bad targetattrfilter %s:%s\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "__acl_init_targetattrfilter - Bad targetattrfilter %s:%s\n",
str,"Expecting \":\"");
return(ACL_SYNTAX_ERR);
@@ -2228,8 +2227,8 @@ 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, LOG_DEBUG, plugin_name,
- "No attribute name in targattrfilters\n");
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "__acl_init_targetattrfilter - No attribute name in targattrfilters\n");
return(ACL_SYNTAX_ERR);
}
@@ -2245,8 +2244,8 @@ 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, LOG_DEBUG, plugin_name,
- "Bad targetattr filter for attribute %s:%s\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "__acl_init_targetattrfilter - Bad targetattr filter for attribute %s:%s\n",
attrfilter->attr_str,tmp_ptr);
slapi_ch_free( (void **) &attrfilter->attr_str);
slapi_ch_free( (void **) &tmp_ptr);
@@ -2260,8 +2259,8 @@ 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, LOG_DEBUG, plugin_name,
- "Exactly one attribute type per filter allowed in targattrfilters (%s)\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "__acl_init_targetattrfilter - Exactly one attribute type per filter allowed in targattrfilters (%s)\n",
attrfilter->attr_str);
slapi_ch_free( (void **) &attrfilter->attr_str);
slapi_ch_free( (void **) &tmp_ptr);
diff --git a/ldap/servers/plugins/acl/aclplugin.c b/ldap/servers/plugins/acl/aclplugin.c
index 55f3bc6..095898d 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, LOG_DEBUG, plugin_name, "<= acl_preop_Init %d\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "aclplugin_preop_common: Error: aclpb is NULL\n" );
+ slapi_log_error(SLAPI_LOG_ACL, 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,8 +220,8 @@ aclplugin_preop_common( Slapi_PBlock *pb )
if ( proxy_dn) {
TNF_PROBE_0_DEBUG(proxyacpb_init_start,"ACL","");
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
- "proxied authorization dn is (%s)\n", proxy_dn );
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
+ "aclplugin_preop_common - Proxied authorization dn is (%s)\n", proxy_dn );
acl_init_aclpb ( pb, aclpb, proxy_dn, 1 );
aclpb = acl_new_proxy_aclpb ( pb );
acl_init_aclpb ( pb, aclpb, dn, 0 );
@@ -297,11 +297,11 @@ acl_init( Slapi_PBlock *pb )
{
int rc =0;
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "=> acl_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "=> acl_init\n" );
if ( 0 != acl_init_ext() ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name,
- "Unable to initialize the extensions\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name,
+ "acl_init - 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, LOG_DEBUG, plugin_name, "<= acl_init %d\n", rc);
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "Missing attribute\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "acl_access_allowed_main - 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 f3935c3..bdd10fa 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, LOG_DEBUG, plugin_name,"ACL LIB ERR:(%s)(%s)\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,"acl_print_acllib_err - ACL LIB ERR:(%s)(%s)\n",
msgbuf, str ? str: "NULL");
} else {
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,"ACL LIB ERR:(%s)\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,"acl_print_acllib_err - 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, LOG_DEBUG, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
"acl__print_aci: Null item\n");
return;
}
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
"***BEGIN ACL INFO[ Name:%s]***\n", aci_item->aclName);
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, 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, LOG_DEBUG, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
"ACI type:(%s)\n", str);
aclutil__Ruletypestr (aci_item->aci_ruleType, str);
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name,
"ACI RULE type:(%s)\n",str);
dn = slapi_sdn_get_dn ( aci_item->aci_sdn );
- 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_Entry DN:%s\n", dn);
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name,
+ slapi_log_error(SLAPI_LOG_ACL, 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, LOG_ERR, plugin_name, "%s", lineptr);
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "aclutil_print_err - %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, LOG_DEBUG, plugin_name, " ************ RESOURCE INFO STARTS *********\n");
- slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, plugin_name, " Client DN: %s\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, " ************ RESOURCE INFO STARTS *********\n");
+ slapi_log_error(SLAPI_LOG_ACL, 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, LOG_DEBUG, plugin_name, " resource type:%d(%s)\n",
+ slapi_log_error(SLAPI_LOG_ACL, 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, LOG_DEBUG, plugin_name, " Slapi_Entry DN: %s\n",
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, " Slapi_Entry DN: %s\n",
dn ? dn : "NULL");
- 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");
+ 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");
}
/*
* The input string contains a rule like
@@ -765,9 +765,9 @@ 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, LOG_DEBUG,"acl_match_macro_in_target: "
+ slapi_log_error(SLAPI_LOG_ACL, plugin_name, "acl_match_macro_in_target - "
"Target macro DN key \"%s\" not found in \"%s\".\n",
- ACL_TARGET_MACRO_DN_KEY, macro_prefix, 0);
+ ACL_TARGET_MACRO_DN_KEY, macro_prefix);
slapi_ch_free_string(¯o_prefix);
return ret_val;
}
@@ -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, LOG_DEBUG,"macro ht entry: key='%d' matched_val='%s'"
+ slapi_log_error(LDAP_DEBUG_ACL, plugin_name, "acl_ht_display_entry - 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/automember/automember.c b/ldap/servers/plugins/automember/automember.c
index b36d628..7b5d9e1 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_init\n");
/* get args */
@@ -191,8 +191,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_init: failed to register plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_init - Failed to register plugin\n");
status = -1;
}
@@ -205,8 +205,8 @@ automember_init(Slapi_PBlock *pb)
NULL, /* ? */
plugin_identity /* access control */
)) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_init: failed to register internalpostoperation plugin\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_init: failed to register postop plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_init - Failed to register postop plugin\n");
status = -1;
}
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_init\n");
return status;
}
@@ -253,8 +253,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_internal_postop_init: failed to register plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_internal_postop_init - Failed to register plugin\n");
status = -1;
}
@@ -285,8 +285,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_postop_init: failed to register plugin\n");
+ slapi_log_error(SLAPI_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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_start\n");
slapi_plugin_task_register_handler("automember rebuild membership", automember_task_add, pb);
@@ -314,8 +314,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_start: lock creation failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_start - Lock creation failed\n");
return -1;
}
@@ -324,8 +324,8 @@ 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_start: unable to retrieve plugin dn\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_start: unable to load plug-in configuration\n");
+ slapi_log_error(SLAPI_LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_start - Unable to load plug-in configuration\n");
return -1;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"auto membership plug-in: ready for service\n");
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_load_config\n");
/* Clear out any old config. */
@@ -430,8 +430,8 @@ 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_load_config: Looking for config entries "
+ slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_load_config - Looking for config entries "
"beneath \"%s\".\n", slapi_sdn_get_ndn(automember_get_config_area()));
slapi_search_internal_set_pb(search_pb, slapi_sdn_get_ndn(automember_get_config_area()),
@@ -439,8 +439,8 @@ 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_load_config: Looking for config entries "
+ slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_load_config - Looking for config entries "
"beneath \"%s\".\n", slapi_sdn_get_ndn(automember_get_plugin_sdn()));
slapi_search_internal_set_pb(search_pb, slapi_sdn_get_ndn(automember_get_plugin_sdn()),
@@ -453,8 +453,8 @@ automember_load_config(void)
if (LDAP_SUCCESS != result) {
if (automember_get_config_area() && (result == LDAP_NO_SUCH_OBJECT)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_load_config: Config container \"%s\" does "
+ slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_load_config - Config container \"%s\" does "
"not exist.\n", slapi_sdn_get_ndn(automember_get_config_area()));
goto cleanup;
} else {
@@ -468,8 +468,8 @@ 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_load_config: parsing config entry "
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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
* some invalid config entries, but we just want to continue
@@ -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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_config_entry: Error "
+ slapi_log_error(SLAPI_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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"----------> dn [%s]\n", entry->dn);
/* Load the scope */
@@ -565,8 +565,8 @@ automember_parse_config_entry(Slapi_Entry * e, int apply)
if (value) {
entry->scope = value;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_config_entry: The %s config "
+ slapi_log_error(SLAPI_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);
ret = -1;
@@ -578,8 +578,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM ,
- "automember_parse_config_entry: Invalid search filter in "
+ slapi_log_error(SLAPI_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);
ret = -1;
@@ -591,8 +591,8 @@ automember_parse_config_entry(Slapi_Entry * e, int apply)
goto bail;
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_config_entry: The %s config "
+ slapi_log_error(SLAPI_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);
ret = -1;
@@ -614,8 +614,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_config_entry: The default group \"%s\" can not be "
+ slapi_log_error(SLAPI_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()));
slapi_sdn_free(&dn);
@@ -633,8 +633,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_config_entry: Invalid "
+ slapi_log_error(SLAPI_LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_parse_config_entry - Invalid "
"%s config setting for config entry \"%s\" "
"(value: \"%s\").\n", AUTOMEMBER_GROUPING_ATTR_TYPE,
entry->dn, value);
@@ -646,8 +646,8 @@ automember_parse_config_entry(Slapi_Entry * e, int apply)
goto bail;
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_config_entry: The %s config "
+ slapi_log_error(SLAPI_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);
ret = -1;
@@ -666,8 +666,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_config_entry: Error searching "
+ slapi_log_error(SLAPI_LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_parse_config_entry - Error searching "
"for child rule entries for config \"%s\" (err=%d).",
entry->dn, result);
ret = -1;
@@ -679,8 +679,8 @@ 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_config_entry: parsing regex rule entry "
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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,8 +703,8 @@ 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "store [%s] before [%s] \n", entry->dn,
+ slapi_log_error(SLAPI_LOG_CONFIG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_parse_config_entry - store [%s] before [%s] \n", entry->dn,
config_entry->dn);
entry_added = 1;
@@ -716,8 +716,8 @@ 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "store [%s] at tail\n", entry->dn);
+ slapi_log_error(SLAPI_LOG_CONFIG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_parse_config_entry - store [%s] at tail\n", entry->dn);
entry_added = 1;
break;
@@ -726,8 +726,8 @@ 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "store [%s] at head \n", entry->dn);
+ slapi_log_error(SLAPI_LOG_CONFIG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_parse_config_entry - store [%s] at head \n", entry->dn);
entry_added = 1;
}
@@ -736,8 +736,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_config_entry: Invalid config entry "
+ slapi_log_error(SLAPI_LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_parse_config_entry - Invalid config entry "
"[%s] skipped\n", entry->dn);
}
automember_free_config_entry(&entry);
@@ -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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_parse_config_entry\n");
return ret;
@@ -765,8 +765,8 @@ automember_free_config_entry(struct configEntry ** entry)
return;
if (e->dn) {
- slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "freeing config entry [%s]\n", e->dn);
+ slapi_log_error(SLAPI_LOG_CONFIG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_free_config_entry - 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_get_sdn\n");
slapi_pblock_get(pb, SLAPI_TARGET_SDN, &sdn);
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_dn_is_config\n");
return ret;
@@ -922,12 +922,12 @@ automember_oktodo(Slapi_PBlock *pb)
int ret = 1;
int oprc = 0;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_oktodo\n" );
if(slapi_pblock_get(pb, SLAPI_PLUGIN_OPRETURN, &oprc) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_oktodo: could not get parameters\n" );
+ slapi_log_error(SLAPI_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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_isrepl\n" );
slapi_pblock_get(pb, SLAPI_IS_REPLICATED_OPERATION, &is_repl);
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_isrepl\n" );
return is_repl;
@@ -980,14 +980,14 @@ automember_parse_regex_entry(struct configEntry *config, Slapi_Entry *e)
PRCList *list;
int i = 0;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_regex_entry: The %s config "
+ slapi_log_error(SLAPI_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));
goto bail;
@@ -995,8 +995,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_regex_entry: invalid target group DN "
+ slapi_log_error(SLAPI_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);
goto bail;
@@ -1007,8 +1007,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_regex_entry: The target group \"%s\" can not be "
+ slapi_log_error(SLAPI_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()));
slapi_sdn_free(&group_dn);
@@ -1060,8 +1060,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_regex_entry: Skipping invalid inclusive "
+ slapi_log_error(SLAPI_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,8 +1114,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_regex_entry: Skipping invalid exclusive "
+ slapi_log_error(SLAPI_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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_parse_regex_entry\n");
}
@@ -1153,23 +1153,23 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_regex_rule: Unable to parse "
+ slapi_log_error(SLAPI_LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_parse_regex_rule - Unable to parse "
"regex rule (missing '=' delimeter).\n");
goto bail;
}
/* Make sure the attribute name is not empty. */
if (p == rule_string) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_regex_rule: Unable to parse "
+ slapi_log_error(SLAPI_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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_regex_rule: Unable to allocate "
+ slapi_log_error(SLAPI_LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_parse_regex_rule - Unable to allocate "
"memory.\n");
goto bail;
}
@@ -1177,8 +1177,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_regex_rule: Invalid comparison "
+ slapi_log_error(SLAPI_LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_parse_regex_rule - Invalid comparison "
"attribute name \"%s\".\n", attr);
goto bail;
}
@@ -1187,8 +1187,8 @@ automember_parse_regex_rule(char *rule_string)
/* Find the regex. */
p++;
if (*p == '\0') {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_regex_rule: Unable to parse "
+ slapi_log_error(SLAPI_LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_parse_regex_rule - Unable to parse "
"regex rule (missing regex).\n");
goto bail;
}
@@ -1196,8 +1196,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_regex_rule: Unable to parse "
+ slapi_log_error(SLAPI_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,8 +1270,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_grouping_attr: Value for grouping attribute "
+ slapi_log_error(SLAPI_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;
goto bail;
@@ -1279,8 +1279,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_grouping_attr: Value for grouping attribute "
+ slapi_log_error(SLAPI_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);
ret = 1;
@@ -1298,8 +1298,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_grouping_attr: Value for grouping attribute "
+ slapi_log_error(SLAPI_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);
ret = 1;
@@ -1311,8 +1311,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_grouping_attr: Error allocating memory.\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_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,8 +1332,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_parse_grouping_attr: Invalid value for "
+ slapi_log_error(SLAPI_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);
ret = 1;
@@ -1374,8 +1374,8 @@ automember_update_membership(struct configEntry *config, Slapi_Entry *e, PRFileD
return -1;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_update_membership: Processing \"%s\" "
+ slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_update_membership - Processing \"%s\" "
"definition entry for candidate entry \"%s\".\n",
config->dn, slapi_entry_get_dn(e));
@@ -1401,8 +1401,8 @@ 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_update_membership: Adding \"%s\" "
+ slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_update_membership - Adding \"%s\" "
"to list of excluded groups for \"%s\" "
"(matched: \"%s=%s\").\n",
slapi_sdn_get_dn(curr_rule->target_group_dn),
@@ -1476,8 +1476,8 @@ 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_update_membership: Adding \"%s\" "
+ slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_update_membership - Adding \"%s\" "
"to list of target groups for \"%s\" "
"(matched: \"%s=%s\").\n",
slapi_sdn_get_dn(curr_rule->target_group_dn),
@@ -1601,8 +1601,8 @@ 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_add_member_value: Adding \"%s\" as "
+ slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_add_member_value - Adding \"%s\" as "
"a \"%s\" value to group \"%s\".\n",
member_value, grouping_attr, group_dn);
@@ -1612,16 +1612,16 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_add_member_value: Unable to add \"%s\" as "
+ slapi_log_error(SLAPI_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,
ldap_err2string(result));
rc = result;
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_add_member_value: Unable to find grouping "
+ slapi_log_error(SLAPI_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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_pre_op\n");
if (0 == (sdn = automember_get_sdn(pb)))
@@ -1704,7 +1704,7 @@ automember_pre_op(Slapi_PBlock * pb, int modop)
goto bailmod;
}
} else {
- errstr = slapi_ch_smprintf("automember_pre_op: invalid op type %d",
+ errstr = slapi_ch_smprintf("automember_pre_op - Invalid op type %d",
modop);
ret = LDAP_PARAM_ERROR;
goto bail;
@@ -1733,15 +1733,15 @@ automember_pre_op(Slapi_PBlock * pb, int modop)
slapi_entry_free(e);
if (ret) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_pre_op: operation failure [%d]\n", ret);
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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);
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &ret);
ret = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_add_post_op\n");
/* Reload config if a config entry was added. */
@@ -1804,8 +1804,8 @@ automember_add_post_op(Slapi_PBlock *pb)
automember_load_config();
}
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_add_post_op: Error retrieving dn\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_add_post_op - Error retrieving dn\n");
rc = SLAPI_PLUGIN_FAILURE;
goto bail;
@@ -1854,13 +1854,13 @@ automember_add_post_op(Slapi_PBlock *pb)
automember_config_unlock();
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_add_post_op: Error "
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_del_post_op\n");
/* Reload config if a config entry was deleted. */
@@ -1893,12 +1893,11 @@ automember_del_post_op(Slapi_PBlock *pb)
if (automember_dn_is_config(sdn))
automember_load_config();
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_del_post_op: Error "
- "retrieving dn\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_del_post_op - Error retrieving dn\n");
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_del_post_op\n");
return SLAPI_PLUGIN_SUCCESS;
@@ -2077,8 +2076,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "unable to create task thread!\n");
+ slapi_log_error(SLAPI_LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_task_add - Unable to create task thread!\n");
*returncode = LDAP_OPERATIONS_ERROR;
slapi_task_finish(task, *returncode);
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -2112,8 +2111,8 @@ void automember_rebuild_task_thread(void *arg)
return; /* no task */
}
slapi_task_inc_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_rebuild_task_thread --> refcount incremented.\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_rebuild_task_thread - Refcount incremented.\n" );
/*
* Fetch our task data from the task
*/
@@ -2142,8 +2141,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "Task: unable to search on base (%s) filter (%s) error (%d)\n",
+ slapi_log_error(SLAPI_LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_rebuild_task_thread - 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,12 +2158,12 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_rebuild_task_thread: failed to start transaction\n");
+ slapi_log_error(SLAPI_LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_rebuild_task_thread - Failed to start transaction\n");
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_rebuild_task_thread: failed to get be backend from %s\n",
+ slapi_log_error(SLAPI_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,8 +2217,8 @@ out:
slapi_task_inc_progress(task);
slapi_task_finish(task, result);
slapi_task_dec_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_rebuild_task_thread <-- refcount decremented.\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_rebuild_task_thread - Refcount decremented.\n" );
}
/*
@@ -2308,8 +2307,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "unable to create export task thread!\n");
+ slapi_log_error(SLAPI_LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_task_add_export_updates - Unable to create export task thread!\n");
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
slapi_task_finish(task, *returncode);
@@ -2339,8 +2338,8 @@ void automember_export_task_thread(void *arg)
return; /* no task */
}
slapi_task_inc_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_export_task_thread --> refcount incremented.\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_export_task_thread - Refcount incremented.\n" );
td = (task_data *)slapi_task_get_data(task);
slapi_task_begin(task, 1);
@@ -2354,8 +2353,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "Could not open ldif file \"%s\" for writing, error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_export_task_thread - 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;
goto out;
@@ -2378,8 +2377,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "Task: unable to search on base (%s) filter (%s) error (%d)\n",
+ slapi_log_error(SLAPI_LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_export_task_thread - 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,8 +2426,8 @@ out:
slapi_task_inc_progress(task);
slapi_task_finish(task, result);
slapi_task_dec_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_export_task_thread <-- refcount decremented.\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_export_task_thread - Refcount decremented.\n" );
}
/*
@@ -2495,8 +2494,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "unable to create map task thread!\n");
+ slapi_log_error(SLAPI_LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_task_add_map_entries - Unable to create map task thread!\n");
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
slapi_task_finish(task, *returncode);
@@ -2538,8 +2537,8 @@ void automember_map_task_thread(void *arg)
return; /* no task */
}
slapi_task_inc_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_map_task_thread --> refcount incremented.\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_map_task_thread - Refcount incremented.\n" );
td = (task_data *)slapi_task_get_data(task);
slapi_task_begin(task, 1);
slapi_task_log_notice(task, "Automember map task starting... Reading entries from (%s)"
@@ -2554,8 +2553,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "Could not open ldif file \"%s\" for writing, error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_map_task_thread - 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;
goto out;
@@ -2574,8 +2573,8 @@ 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, LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "Could not open ldif file \"%s\" for reading, error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_map_task_thread - Could not open ldif file \"%s\" for reading, error %d (%s)\n",
td->ldif_in, rc, errstr );
result = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -2635,8 +2634,8 @@ out:
slapi_task_inc_progress(task);
slapi_task_finish(task, result);
slapi_task_dec_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_map_task_thread <-- refcount decremented.\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_map_task_thread - Refcount decremented.\n" );
}
/*
@@ -2655,7 +2654,7 @@ automember_modrdn_post_op(Slapi_PBlock *pb)
PRCList *list = NULL;
int rc = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_modrdn_post_op\n");
/* Just bail if we aren't ready to service requests yet. */
@@ -2672,8 +2671,8 @@ 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, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_modrdn_post_op: Error "
+ slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_modrdn_post_op - Error "
"retrieving post-op entry\n");
return SLAPI_PLUGIN_FAILURE;
}
@@ -2683,8 +2682,8 @@ automember_modrdn_post_op(Slapi_PBlock *pb)
automember_load_config();
}
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
- "automember_modrdn_post_op: Error "
+ slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ "automember_modrdn_post_op - Error "
"retrieving dn\n");
return SLAPI_PLUGIN_FAILURE;
}
@@ -2730,7 +2729,7 @@ automember_modrdn_post_op(Slapi_PBlock *pb)
slapi_pblock_set(pb, SLAPI_PB_RESULT_TEXT, &errtxt);
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, AUTOMEMBER_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"<-- automember_modrdn_post_op (%d)\n", rc);
return rc;
diff --git a/ldap/servers/plugins/bitwise/bitwise.c b/ldap/servers/plugins/bitwise/bitwise.c
index 2a3ff8f..3bedfa7 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, LOG_DEBUG, "=> bitwise_filter_create OID (%s) not handled\n", mrOID, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> 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, LOG_DEBUG, "=> bitwise_filter_create missing parameter(s)\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> bitwise_filter_create missing parameter(s)\n", 0, 0, 0);
}
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= bitwise_filter_create %i\n", rc, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, "<= 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, LOG_DEBUG, "bitwise_init %i\n", rc, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, "bitwise_init %i\n", rc, 0, 0);
return rc;
}
diff --git a/ldap/servers/plugins/chainingdb/cb_add.c b/ldap/servers/plugins/chainingdb/cb_add.c
index 08df9b7..48590a4 100644
--- a/ldap/servers/plugins/chainingdb/cb_add.c
+++ b/ldap/servers/plugins/chainingdb/cb_add.c
@@ -87,8 +87,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "cb_get_connection failed (%d) %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "chaining_back_add - 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM, "add (%s): pre betxn failed, error (%d)\n",dn,rc);
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM, "chaining_back_add - 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_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,8 +199,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "%s%s%s\n",
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "chaining_back_add - %s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?": ":"",
ldap_err2string(parse_rc));
@@ -220,8 +220,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "%s%s%s\n",
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "chaining_back_add - %s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?": ":"",
error_msg );
@@ -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, LOG_ERR, CB_PLUGIN_SUBSYSTEM, "add (%s): post betxn failed, error (%d)\n",dn,rc);
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM, "chaining_back_add - 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 6d1c354..2bf9cd8 100644
--- a/ldap/servers/plugins/chainingdb/cb_bind.c
+++ b/ldap/servers/plugins/chainingdb/cb_bind.c
@@ -91,8 +91,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "cb_get_connection failed (%d) %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "cb_sasl_bind_once_s - cb_get_connection failed (%d) %s\n",
rc, ldap_err2string(rc));
warned_get_conn = 1;
}
@@ -157,8 +157,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "cb_sasl_bind_once_s failed (%s%s%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "cb_sasl_bind_once_s - Failed (%s%s%s)\n",
hasmatched ? *matcheddnp : "",
hasmatched ? ": " : "",
ldap_err2string(rc));
diff --git a/ldap/servers/plugins/chainingdb/cb_close.c b/ldap/servers/plugins/chainingdb/cb_close.c
index a7e16bb..ff3fc9c 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM, "Wrong database type.\n");
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM, "cb_back_close - 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,"Stopping chaining database instance %s\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,"cb_back_close - 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 9bb9b78..522d23e 100644
--- a/ldap/servers/plugins/chainingdb/cb_compare.c
+++ b/ldap/servers/plugins/chainingdb/cb_compare.c
@@ -93,8 +93,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "cb_get_connection failed (%d) %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "chaining_back_compare - cb_get_connection failed (%d) %s\n",
rc, ldap_err2string(rc));
warned_get_conn = 1;
}
@@ -167,7 +167,7 @@ chaining_back_compare ( Slapi_PBlock *pb )
/*cb_send_ldap_result(pb,LDAP_OPERATIONS_ERROR, NULL,
ldap_err2string(rc), 0, NULL);*/
- cb_send_ldap_result(pb,LDAP_OPERATIONS_ERROR, NULL, "FARM SERVER TEMPORARY UNAVAILABLE", 0, NULL);
+ cb_send_ldap_result(pb,LDAP_OPERATIONS_ERROR, NULL, "FARM SERVER TEMPORARY UNAVAILABLE", 0, NULL);
cb_release_op_connection(cb->pool,ld,CB_LDAP_CONN_ERROR(rc));
if (res)
ldap_msgfree(res);
@@ -184,8 +184,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "%s%s%s\n",
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "chaining_back_compare - %s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?": ":"",
ldap_err2string(parse_rc));
@@ -212,7 +212,7 @@ chaining_back_compare ( Slapi_PBlock *pb )
default: {
struct berval ** refs = referrals2berval(referrals);
- cb_send_ldap_result( pb, rc, matched_msg, error_msg, 0, refs);
+ cb_send_ldap_result( pb, rc, matched_msg, error_msg, 0, refs);
cb_release_op_connection(cb->pool,ld,CB_LDAP_CONN_ERROR(rc));
slapi_ch_free((void **)&matched_msg);
slapi_ch_free((void **)&error_msg);
diff --git a/ldap/servers/plugins/chainingdb/cb_config.c b/ldap/servers/plugins/chainingdb/cb_config.c
index 7bd87c5..ce7bbae 100644
--- a/ldap/servers/plugins/chainingdb/cb_config.c
+++ b/ldap/servers/plugins/chainingdb/cb_config.c
@@ -26,7 +26,6 @@ static int cb_parse_config_entry(cb_backend * cb, Slapi_Entry *e);
*/
-
int cb_config_add_dse_entries(cb_backend *cb, char **entries, char *string1, char *string2, char *string3)
{
int x;
@@ -43,8 +42,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "Unable to add config entry (%s) to the DSE: %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "cb_config_add_dse_entries - Unable to add config entry (%s) to the DSE: %s\n",
slapi_entry_get_dn(e),
ldap_err2string(res));
rc = res;
@@ -84,8 +83,8 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "Error accessing entry <%s>\n",cb->configDN);
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_config_load_dse_info - Error accessing entry <%s>\n",cb->configDN);
slapi_free_search_results_internal(search_pb);
slapi_pblock_destroy(search_pb);
return 1;
@@ -98,8 +97,8 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "Error accessing entry <%s> (%s)\n",cb->configDN,ldap_err2string(res));
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_config_load_dse_info - Error accessing entry <%s> (%s)\n",cb->configDN,ldap_err2string(res));
return 1;
}
@@ -122,8 +121,8 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "Error accessing the config DSE (%s)\n",ldap_err2string(res));
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_config_load_dse_info - Error accessing the config DSE (%s)\n",ldap_err2string(res));
slapi_free_search_results_internal(search_pb);
slapi_pblock_destroy(search_pb);
return 1;
@@ -206,8 +205,8 @@ 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, LOG_DEBUG,CB_PLUGIN_SUBSYSTEM,
- "control %s can't be forwarded.\n",bval->bv_val);
+ slapi_log_error(SLAPI_LOG_PLUGIN,CB_PLUGIN_SUBSYSTEM,
+ "cb_config_add_check_callback - Control %s can't be forwarded.\n",bval->bv_val);
*returncode=LDAP_CONSTRAINT_VIOLATION;
return SLAPI_DSE_CALLBACK_ERROR;
}
@@ -246,8 +245,8 @@ 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, LOG_DEBUG,CB_PLUGIN_SUBSYSTEM,
- "control %s can't be forwarded.\n",bval->bv_val);
+ slapi_log_error(SLAPI_LOG_PLUGIN,CB_PLUGIN_SUBSYSTEM,
+ "cb_config_add_callback - control %s can't be forwarded.\n",bval->bv_val);
*returncode=LDAP_CONSTRAINT_VIOLATION;
return SLAPI_DSE_CALLBACK_ERROR;
}
@@ -359,8 +358,8 @@ 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, LOG_DEBUG,CB_PLUGIN_SUBSYSTEM,
- "control %s can't be forwarded.\n",config_attr_value);
+ slapi_log_error(SLAPI_LOG_PLUGIN,CB_PLUGIN_SUBSYSTEM,
+ "cb_config_modify_check_callback - control %s can't be forwarded.\n",config_attr_value);
*returncode=LDAP_CONSTRAINT_VIOLATION;
return SLAPI_DSE_CALLBACK_ERROR;
}
@@ -393,8 +392,8 @@ 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, LOG_DEBUG,CB_PLUGIN_SUBSYSTEM,
- "control %s can't be forwarded.\n",config_attr_value);
+ slapi_log_error(SLAPI_LOG_PLUGIN,CB_PLUGIN_SUBSYSTEM,
+ "cb_config_modify_callback - 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 f3dd149..4c568c0 100644
--- a/ldap/servers/plugins/chainingdb/cb_conn_stateless.c
+++ b/ldap/servers/plugins/chainingdb/cb_conn_stateless.c
@@ -91,8 +91,8 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "cb_close_conn_pool: unexpected connection state (%d)\n",conn->status);
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_close_conn_pool - Unexpected connection state (%d)\n",conn->status);
}
nextconn=conn->next;
cb_close_and_dispose_connection(conn);
@@ -102,8 +102,8 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "cb_close_conn_pool: unexpected connection state (%d)\n",conn->status);
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_close_conn_pool - Unexpected connection state (%d)\n",conn->status);
}
nextconn=conn->next;
cb_close_and_dispose_connection(conn);
@@ -194,8 +194,8 @@ cb_get_connection(cb_conn_pool * pool,
if (maxconnections <=0) {
static int warned_maxconn = 0;
if (!warned_maxconn) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "<== cb_get_connection error (no connection available)\n");
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "cb_get_connection - Error (no connection available)\n");
warned_maxconn = 1;
}
if ( errmsg ) {
@@ -238,8 +238,8 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "==> cb_get_connection server %s conns: %d maxconns: %d\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_get_connection - server %s conns: %d maxconns: %d\n",
hostname, pool->conn.conn_list_count, maxconnections );
}
@@ -248,8 +248,8 @@ cb_get_connection(cb_conn_pool * pool,
/* time limit mgmt */
if (checktime) {
if (current_time() > endbefore ) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "cb_get_connection server %s expired.\n", hostname );
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_get_connection - server %s expired.\n", hostname );
if ( errmsg ) {
*errmsg = PR_smprintf(error1,"timelimit exceeded");
}
@@ -269,8 +269,8 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "<= cb_get_connection server found conn 0x%p to use)\n", conn );
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_get_connection - server found conn 0x%p to use)\n", conn );
}
goto unlock_and_return; /* found one */
}
@@ -280,16 +280,16 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "list: conn 0x%p status %d refcount %lu\n", conn,
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_get_connection - conn 0x%p status %d refcount %lu\n", conn,
conn->status, conn->refcount );
}
if ( conn->status == CB_CONNSTATUS_OK
&& conn->refcount < maxconcurrency ) {
if (cb_debug_on()) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "<= cb_get_connection server found conn 0x%p to use)\n", conn );
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_get_connection - server found conn 0x%p to use)\n", conn );
}
goto unlock_and_return; /* found one */
}
@@ -311,8 +311,8 @@ cb_get_connection(cb_conn_pool * pool,
if (NULL == ld) {
static int warned_init = 0;
if (!warned_init) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "Can't contact server <%s> port <%d>.\n",
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "cb_get_connection - Can't contact server <%s> port <%d>.\n",
hostname, port );
warned_init = 1;
}
@@ -340,8 +340,8 @@ cb_get_connection(cb_conn_pool * pool,
rc=LDAP_SUCCESS;
if (cb_debug_on()) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "Bind to to server <%s> port <%d> as <%s>\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_get_connection - Bind to to server <%s> port <%d> as <%s>\n",
hostname, port, binddn);
}
@@ -352,8 +352,8 @@ cb_get_connection(cb_conn_pool * pool,
{
static int warned_pw = 0;
if (!warned_pw) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "Internal credentials decoding error; "
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "cb_get_connection - Internal credentials decoding error; "
"password storage schemes do not match or "
"encrypted password is corrupted.\n");
warned_pw = 1;
@@ -374,8 +374,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "Can't bind to server <%s> port <%d>. (%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "cb_get_connection - Can't bind to server <%s> port <%d>. (%s)\n",
hostname, port, "time-out expired");
warned_bind_timeout = 1;
}
@@ -388,8 +388,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "Can't bind to server <%s> port <%d>. "
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "cb_get_connection - Can't bind to server <%s> port <%d>. "
"(LDAP error %d - %s; "
SLAPI_COMPONENT_NAME_NSPR " error %d - %s)\n",
hostname, port, rc,
@@ -412,8 +412,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "Successfully bound as %s to remote server %s:%d, "
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "cb_get_connection - Successfully bound as %s to remote server %s:%d, "
"but password has expired.\n",
binddn, hostname, port);
}
@@ -424,8 +424,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "Successfully bound as %s to remote server %s:%d, "
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "cb_get_connection - Successfully bound as %s to remote server %s:%d, "
"but password is expiring in %d seconds.\n",
binddn, hostname, port, password_expiring);
}
@@ -437,13 +437,13 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "<= cb_get_connection doing start_tls on connection 0x%p\n", conn );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "Unable to do start_tls on connection to %s:%d "
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "cb_get_connection - 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,
slapd_pr_strerror(prerr));
@@ -479,23 +479,23 @@ cb_get_connection(cb_conn_pool * pool,
++pool->conn.conn_list_count;
if (cb_debug_on()) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "<= cb_get_connection added new conn 0x%p, "
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_get_connection - added new conn 0x%p, "
"conn count now %d\n", conn->ld, pool->conn.conn_list_count );
}
goto unlock_and_return; /* got a new one */
}
if (cb_debug_on()) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "... cb_get_connection waiting for conn to free up\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "... cb_get_connection awake again\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_get_connection - awake again\n" );
}
}
@@ -505,8 +505,8 @@ unlock_and_return:
*lld=conn->ld;
*cc=conn;
if (cb_debug_on()) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "<== cb_get_connection ld=0x%p (concurrency now %lu)\n",*lld, conn->refcount );
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_get_connection - ld=0x%p (concurrency now %lu)\n",*lld, conn->refcount );
}
} else {
@@ -515,8 +515,8 @@ unlock_and_return:
}
if (cb_debug_on()) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "<== cb_get_connection error %d\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_get_connection - error %d\n", rc );
}
}
@@ -558,15 +558,15 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "==> cb_release_op_connection ld=0x%p not found\n", lld );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "release conn 0x%p status %d refcount after release %lu\n", conn,
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_release_op_connection - release conn 0x%p status %d refcount after release %lu\n", conn,
conn->status, conn->refcount );
}
@@ -648,8 +648,8 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "cb_check_for_stale_connections: conn 0x%p idle and stale\n",conn);
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_check_for_stale_connections - conn 0x%p idle and stale\n",conn);
}
--pool->conn.conn_list_count;
if (connprev == NULL) {
@@ -669,8 +669,8 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "cb_check_for_stale_connections: conn 0x%p stale\n",conn);
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_check_for_stale_connections - conn 0x%p stale\n",conn);
}
}
connprev = conn ;
@@ -693,8 +693,8 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "cb_check_for_stale_connections: conn 0x%p idle and stale\n",conn);
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_check_for_stale_connections - conn 0x%p idle and stale\n",conn);
}
--pool->conn.conn_list_count;
conn_next=conn->next;
@@ -709,8 +709,8 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "cb_check_for_stale_connections: conn 0x%p stale\n",conn);
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_check_for_stale_connections - conn 0x%p stale\n",conn);
}
}
connprev = conn;
@@ -907,8 +907,8 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "cb_update_failed_conn_cpt: Farm server unavailable");
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_update_failed_conn_cpt - Farm server unavailable");
}
}
@@ -920,8 +920,8 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "cb_reset_conn_cpt: Farm server is back");
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_reset_conn_cpt - Farm server is back");
}
slapi_unlock_mutex(cb->monitor_availability.cpt_lock);
}
@@ -942,16 +942,16 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "cb_check_availability: ping the farm server and check if it's still unavailable");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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);
now = current_time();
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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "cb_check_availability: Farm server still unavailable");
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_check_availability - Farm server still unavailable");
return FARMSERVER_UNAVAILABLE ;
}
else {
diff --git a/ldap/servers/plugins/chainingdb/cb_controls.c b/ldap/servers/plugins/chainingdb/cb_controls.c
index 8217fd6..dd0bf7c 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, LOG_DEBUG,CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN,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, LOG_DEBUG,CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN,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, LOG_DEBUG,CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN,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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 6cb4bda..6c4adb0 100644
--- a/ldap/servers/plugins/chainingdb/cb_delete.c
+++ b/ldap/servers/plugins/chainingdb/cb_delete.c
@@ -86,8 +86,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "cb_get_connection failed (%d) %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "chaining_back_delete - 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM, "delete (%s): pre betxn failed, error (%d)\n",dn,rc);
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM, "chaining_back_delete - 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,8 +176,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "%s%s%s\n",
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "chaining_back_delete - %s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?": ":"",
ldap_err2string(parse_rc) );
@@ -197,8 +197,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "%s%s%s\n",
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "chaining_back_delete - %s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?": ":"",
error_msg );
@@ -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, LOG_ERR, CB_PLUGIN_SUBSYSTEM, "delete (%s): post betxn failed, error (%d)\n",dn,rc);
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM, "chaining_back_delete - 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 a75f8c9..f877bf2 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM, "chaining_back_init failed\n");
+ slapi_log_error(SLAPI_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 3029e39..48e7601 100644
--- a/ldap/servers/plugins/chainingdb/cb_instance.c
+++ b/ldap/servers/plugins/chainingdb/cb_instance.c
@@ -502,8 +502,8 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "Malformed backend instance (<%s> missing)>\n", CB_CONFIG_INSTNAME);
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_parse_instance_config_entry - Malformed backend instance (<%s> missing)>\n", CB_CONFIG_INSTNAME);
return -1;
}
@@ -609,7 +609,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,"Error with config attribute %s : %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,"cb_instance_config_initialize - "
+ "Error with config attribute %s : %s\n",
attr_name, err_buf);
rc = -1;
break;
@@ -627,7 +628,8 @@ cb_instance_config_initialize(cb_backend_instance * inst, Slapi_Entry * e , int
if (LDAP_SUCCESS == rc) {
if (!urlfound) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "cb_instance_config_initialize - "
"Malformed backend instance entry. Mandatory attr <%s> missing\n",CB_CONFIG_HOSTURL);
rc = -1;
}
@@ -650,7 +652,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "cb_instance_config_initialize - "
"Error with config attribute %s (%s: forbidden value)\n", CB_CONFIG_BINDUSER, rootdn);
rc= -1;
}
@@ -1563,8 +1566,8 @@ void cb_instance_config_get(void *arg, cb_instance_config_info *config, char *bu
}
break;
default:
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "Invalid attribute syntax.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_instance_config_get - Invalid attribute syntax.\n");
}
}
@@ -1755,8 +1758,8 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "Malformed backend instance (<%s> missing)>\n", CB_CONFIG_INSTNAME);
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_instance_add_config_check_callback - Malformed backend instance (<%s> missing)>\n", CB_CONFIG_INSTNAME);
*returncode = LDAP_LOCAL_ERROR;
return SLAPI_DSE_CALLBACK_ERROR;
}
@@ -1768,8 +1771,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "Can't instantiate chaining backend instance %s.\n",inst->inst_name);
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "cb_instance_add_config_check_callback - Can't instantiate chaining backend instance %s.\n",inst->inst_name);
*returncode=rc;
cb_instance_free(inst);
return SLAPI_DSE_CALLBACK_ERROR;
@@ -1811,8 +1814,8 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "Malformed backend instance (<%s> missing)>\n", CB_CONFIG_INSTNAME);
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_instance_add_config_callback - Malformed backend instance (<%s> missing)>\n", CB_CONFIG_INSTNAME);
*returncode = LDAP_LOCAL_ERROR;
return SLAPI_DSE_CALLBACK_ERROR;
}
@@ -1824,8 +1827,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "Can't instantiate chaining backend instance %s.\n",inst->inst_name);
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "cb_instance_add_config_callback - Can't instantiate chaining backend instance %s.\n",inst->inst_name);
*returncode=rc;
cb_instance_free(inst);
return SLAPI_DSE_CALLBACK_ERROR;
@@ -1939,8 +1942,8 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "Add %s failed (%s)\n",defaultDn,ldap_err2string(rc));
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_create_default_backend_instance_config - Add %s failed (%s)\n",defaultDn,ldap_err2string(rc));
}
slapi_pblock_destroy(pb);
diff --git a/ldap/servers/plugins/chainingdb/cb_modify.c b/ldap/servers/plugins/chainingdb/cb_modify.c
index 203a399..c253937 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,"modify: target:<%s>\n",dn);
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,"modify: target:<%s>\n",dn);
}
ctrls = serverctrls = NULL;
@@ -92,8 +92,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "cb_get_connection failed (%d) %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "chaining_back_modify - 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM, "modify (%s): pre betxn failed, error (%d)\n",dn,rc);
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM, "chaining_back_modify - 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,8 +185,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "%s%s%s\n",
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "chaining_back_modify - %s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?": ":"",
ldap_err2string(parse_rc));
@@ -206,8 +206,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "%s%s%s\n",
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "chaining_back_modify - %s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?": ":"",
error_msg );
@@ -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, LOG_ERR, CB_PLUGIN_SUBSYSTEM, "modify (%s): post betxn failed, error (%d)\n",dn,rc);
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM, "chaining_back_modify - 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 9211ff3..1e4acfd 100644
--- a/ldap/servers/plugins/chainingdb/cb_modrdn.c
+++ b/ldap/servers/plugins/chainingdb/cb_modrdn.c
@@ -97,8 +97,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "cb_get_connection failed (%d) %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "chaining_back_modrdn - 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM, "modrdn (%s): pre betxn failed, error (%d)\n",ndn,rc);
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM, "chaining_back_modrdn - 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,8 +193,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "%s%s%s\n",
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "chaining_back_modrdn - %s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?": ":"",
ldap_err2string(parse_rc));
@@ -214,8 +214,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "%s%s%s\n",
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "chaining_back_modrdn - %s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?": ":"",
error_msg );
@@ -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, LOG_ERR, CB_PLUGIN_SUBSYSTEM, "modrdn (%s): post betxn failed, error (%d)\n",ndn,rc);
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM, "chaining_back_modrdn - 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 0e7dc43..95fa5aa 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,"cb_update_monitor_info: invalid op type <%d>\n",op);
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 50d130a..7fb017f 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 784fe73..2143fd7 100644
--- a/ldap/servers/plugins/chainingdb/cb_search.c
+++ b/ldap/servers/plugins/chainingdb/cb_search.c
@@ -64,8 +64,8 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "local search: base:<%s> scope:<%s> filter:<%s>\n",target,
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "chainingdb_build_candidate_list - local search: base:<%s> scope:<%s> filter:<%s>\n",target,
scope==LDAP_SCOPE_SUBTREE?"SUBTREE":scope==LDAP_SCOPE_ONELEVEL ? "ONE-LEVEL" : "BASE" , filter);
}
@@ -85,8 +85,8 @@ chainingdb_build_candidate_list ( Slapi_PBlock *pb )
}
if (cb_debug_on()) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "chained search: base:<%s> scope:<%s> filter:<%s>\n",target,
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "chainingdb_build_candidate_list - chained search: base:<%s> scope:<%s> filter:<%s>\n",target,
scope==LDAP_SCOPE_SUBTREE ? "SUBTREE": scope==LDAP_SCOPE_ONELEVEL ? "ONE-LEVEL" : "BASE",
filter);
}
@@ -183,8 +183,8 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "cb_get_connection failed (%d) %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "chainingdb_build_candidate_list - cb_get_connection failed (%d) %s\n",
rc, ldap_err2string(rc));
warned_get_conn = 1;
}
@@ -284,8 +284,8 @@ chainingdb_build_candidate_list ( Slapi_PBlock *pb )
/* Local timeout management */
if (timelimit != -1) {
if (current_time() > endbefore) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "Local timeout expiration\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "chainingdb_build_candidate_list - Local timeout expiration\n");
cb_send_ldap_result(pb,LDAP_TIMELIMIT_EXCEEDED,
NULL,NULL, 0, NULL);
/* Force connection close */
@@ -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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"%s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?": ":"",
@@ -426,8 +426,8 @@ 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "Unexpected NULL ctx in chainingdb_next_search_entry\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "chainingdb_next_search_entry - 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,"Invalid entry received.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,"chainingdb_next_search_entry - 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
"%s%s%s\n",
matched_msg?matched_msg:"",
(matched_msg&&(*matched_msg!='\0'))?": ":"",
@@ -722,8 +722,8 @@ chainingdb_next_search_entry ( Slapi_PBlock *pb )
return retcode;
default:
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "chainingdb_next_search_entry:default case.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM, "chaining_back_entry_release\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 b258e1d..3635356 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM, "No operation is set.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM, "cb_forward_operation - No operation is set.\n");
return LDAP_UNWILLING_TO_PERFORM;
}
@@ -133,8 +133,8 @@ cb_forward_operation(Slapi_PBlock * pb)
BerElement *ber = NULL;
if ((ber = ber_init(ctl_value)) == NULL) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "cb_forward_operation: ber_init: Memory allocation failed");
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_forward_operation - ber_init: Memory allocation failed");
if (iscritical)
return LDAP_UNAVAILABLE_CRITICAL_EXTENSION; /* RFC 4511 4.1.11 */
else
@@ -142,8 +142,8 @@ cb_forward_operation(Slapi_PBlock * pb)
}
rc = ber_scanf(ber,"i",&hops);
if (LBER_ERROR == rc) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "Loop detection control badly encoded.");
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_forward_operation - Loop detection control badly encoded.");
ber_free(ber,1);
if (iscritical)
return LDAP_UNAVAILABLE_CRITICAL_EXTENSION; /* RFC 4511 4.1.11 */
@@ -152,8 +152,8 @@ cb_forward_operation(Slapi_PBlock * pb)
}
if (hops <= 0) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "Max hop count exceeded. Loop detected.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_forward_operation - Max hop count exceeded. Loop detected.\n");
ber_free(ber,1);
if (iscritical)
return LDAP_UNAVAILABLE_CRITICAL_EXTENSION; /* RFC 4511 4.1.11 */
@@ -170,15 +170,15 @@ 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, LOG_ERR, CB_PLUGIN_SUBSYSTEM,
- "NULL component identity in an internal operation.");
+ slapi_log_error(SLAPI_LOG_ERR, CB_PLUGIN_SUBSYSTEM,
+ "cb_forward_operation - 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, LOG_DEBUG, CB_PLUGIN_SUBSYSTEM,
- "internal op received from %s component \n",pname ? pname : "NULL");
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
+ "cb_forward_operation - internal op received from %s component \n",pname ? pname : "NULL");
}
/* First, make sure chaining is not denied */
@@ -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, LOG_DEBUG, "chainbe", "cb_be_state_change: set the "
+ slapi_log_error(SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM, "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/collate.c b/ldap/servers/plugins/collation/collate.c
index 6edf427..41ac74b 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, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_ERR, "collation_config - "
"%s: line %lu ignored: only %lu arguments (expected "
"collation language country variant strength decomposition oid ...)\n",
fname, (unsigned long)lineno, (unsigned long)cargc );
@@ -76,20 +76,20 @@ 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, LOG_ERR,
- "%s: line %lu: strength \"%s\" not supported (will use 2)\n",
- fname, (unsigned long)lineno, cargv[4]);
- break;
+ LDAPDebug(LDAP_DEBUG_ERR, "collation_config - "
+ "%s: line %lu: strength \"%s\" not supported (will use 2)\n",
+ fname, (unsigned long)lineno, cargv[4]);
+ break;
}
switch (atoi(cargv[5])) {
case 1: profile->decomposition = UCOL_OFF; break;
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, LOG_ERR,
- "%s: line %lu: decomposition \"%s\" not supported (will use 2)\n",
- fname, (unsigned long)lineno, cargv[5]);
- break;
+ LDAPDebug(LDAP_DEBUG_ERR, "collation_config - "
+ "%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, LOG_DEBUG, "collation_index(%.*s) %lu bytes\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_ERR, "collation_indexer_create: could not "
- "set the collator strength for oid %s to %d: err %d\n",
- oid, profile->strength, err);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "collation_indexer_create: could not "
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "collation_indexer_create: id not found\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG, "collation_indexer_create: could not "
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "collation_indexer_create: could not "
+ LDAPDebug(LDAP_DEBUG_FILTER, "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 42aa1fd..2cc2944 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, LOG_ERR, "Too many tokens (max %d)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "fp_parse_line - 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, LOG_ERR,
- "could not open config file \"%s\" - absolute path?\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "collation_read_config - Could not open config file \"%s\" - absolute path?\n",
fname, 0, 0 );
return; /* Do not exit */
}
- LDAPDebug(LDAP_DEBUG_CONFIG, LOG_DEBUG, "reading config file %s\n", fname, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_CONFIG, "reading config file %s\n", fname, 0, 0 );
fp_getline_init( &lineno );
while ( (line = fp_getline( fp, &lineno )) != NULL ) {
@@ -170,11 +170,11 @@ collation_read_config( char *fname )
if ( line[0] == '#' || line[0] == '\0' ) {
continue;
}
- LDAPDebug(LDAP_DEBUG_CONFIG, LOG_DEBUG, "line %d: %s\n", lineno, line, 0 );
+ LDAPDebug(LDAP_DEBUG_CONFIG, "line %d: %s\n", lineno, line, 0 );
fp_parse_line( line, &cargc, cargv );
if ( cargc < 1 ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: line %d: bad config line (ignored)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "collation_read_config - %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 7404d0f..570f72c 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, LOG_DEBUG, "or_filter_destroy(%p)\n", (void*)or, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "=> or_filter_create(oid %s; type %s)\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> 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, LOG_DEBUG, "value \"%s\"\n", (*val)->bv_val, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "=> or_filter_create missing parameter(s)\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> or_filter_create missing parameter(s)\n", 0, 0, 0);
}
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= or_filter_create(%p) %i\n", (void*)or, rc, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, "<= 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, LOG_DEBUG, "op_indexer_destroy(%p)\n", (void*)ix, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "op_index_entry(%p) %i\n", (void*)ix, rc, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "op_index_search(%p) %i\n", (void*)or, rc, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "ss_indexer_destroy(%p)\n", (void*)ss, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "ss_index_entry(%p) %i %lu substrings\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "ss_index_search(%p) %i\n", (void*)or, rc, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "or_filter_index(%p) %i\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "=> or_indexer_create: no OID parameter\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> 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, LOG_DEBUG, "=> or_indexer_create(oid %s; type %s)\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> 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, LOG_DEBUG, "<= or_indexer_create(%p) %i\n", mrOBJECT, rc, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, "<= or_indexer_create(%p) %i\n", mrOBJECT, rc, 0);
return rc;
}
@@ -977,8 +977,8 @@ orderingRule_init (Slapi_PBlock* pb)
#endif
if ( slapi_pblock_get( pb, SLAPI_CONFIG_DIRECTORY, &cfgpath ) != 0 ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPI_ORPLUGIN_NAME,
- "Unable to retrieve slapd configuration pathname; using default\n" );
+ slapi_log_error(SLAPI_LOG_ERR, SLAPI_ORPLUGIN_NAME,
+ "orderingRule_init - Unable to retrieve slapd configuration pathname; using default\n" );
cfgpath = NULL;
}
@@ -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, LOG_DEBUG, "orderingRule_init %i\n", rc, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, "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 3b62d4c..e92b6e1 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, int sev_level, char *fmt, ... );
+int slapd_log_error_proc( int sev_level, char *subsystem, char *fmt, ... );
/*** end secrets ***/
@@ -103,8 +103,8 @@ 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, LOG_ERR, COS_PLUGIN_SUBSYSTEM,
- "cos_postop_init: failed to register plugin\n" );
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM,
+ "cos_postop_init - Failed to register plugin\n" );
rc = -1;
}
return rc;
@@ -126,8 +126,8 @@ 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, LOG_ERR, COS_PLUGIN_SUBSYSTEM,
- "cos_internalpostop_init: failed to register plugin\n" );
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM,
+ "cos_internalpostop_init - Failed to register plugin\n" );
rc = -1;
}
return rc;
@@ -143,7 +143,7 @@ int cos_init( Slapi_PBlock *pb )
int ret = 0;
void * plugin_identity=NULL;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_init\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_init\n");
/*
** Store the plugin identity for later use.
@@ -159,8 +159,8 @@ 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, LOG_ERR, COS_PLUGIN_SUBSYSTEM,
- "cos_init: failed to register plugin\n" );
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM,
+ "cos_init - Failed to register plugin\n" );
ret = -1;
goto bailout;
}
@@ -178,7 +178,7 @@ int cos_init( Slapi_PBlock *pb )
plugin_identity);
bailout:
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_init\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_init\n");
return ret;
}
@@ -193,22 +193,22 @@ int cos_start( Slapi_PBlock *pb )
{
int ret = 0;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_start\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_start\n");
if( !cos_cache_init() )
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos: ready for service\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, COS_PLUGIN_SUBSYSTEM, "cos_start - Ready for service\n");
}
else
{
/* problems we are hosed */
cos_cache_stop();
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_start: failed to initialise\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_start - Failed to initialise\n");
ret = -1;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_start\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_start\n");
return ret;
}
@@ -219,11 +219,11 @@ int cos_start( Slapi_PBlock *pb )
*/
int cos_close( Slapi_PBlock *pb )
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_close\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_close\n");
cos_cache_stop();
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_close\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_close\n");
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, LOG_DEBUG, "--> cos_post_op\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_post_op\n");
cos_cache_change_notify(pb);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_post_op\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_post_op\n");
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 6c04a1e..4c91136 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, int sev_level, char *fmt, ... );
+int slapd_log_error_proc( int sev_level, char *subsystem, char *fmt, ... );
/* defined in cos.c */
void * cos_get_plugin_identity(void);
@@ -288,7 +288,7 @@ int cos_cache_init(void)
{
int ret = 0;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_init\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_init\n");
slapi_vattrcache_cache_none();
cache_lock = slapi_new_mutex();
@@ -296,68 +296,68 @@ int cos_cache_init(void)
stop_lock = slapi_new_mutex();
something_changed = slapi_new_condvar(change_lock);
keeprunning =1;
- start_lock = slapi_new_mutex();
- start_cond = slapi_new_condvar(start_lock);
- started = 0;
-
- if ( stop_lock == NULL ||
- change_lock == NULL ||
- cache_lock == NULL ||
- stop_lock == NULL ||
- start_lock == NULL ||
- start_cond == NULL ||
- something_changed == NULL)
- {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, COS_PLUGIN_SUBSYSTEM,
- "cos_cache_init: cannot create mutexes\n" );
- ret = -1;
+ start_lock = slapi_new_mutex();
+ start_cond = slapi_new_condvar(start_lock);
+ started = 0;
+
+ if (stop_lock == NULL ||
+ change_lock == NULL ||
+ cache_lock == NULL ||
+ stop_lock == NULL ||
+ start_lock == NULL ||
+ start_cond == NULL ||
+ something_changed == NULL)
+ {
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM,
+ "cos_cache_init - Cannot create mutexes\n" );
+ ret = -1;
goto out;
- }
+ }
- /* grab the views interface */
- if(slapi_apib_get_interface(Views_v1_0_GUID, &views_api))
- {
- /* lets be tolerant if views is disabled */
- views_api = 0;
- }
+ /* grab the views interface */
+ if(slapi_apib_get_interface(Views_v1_0_GUID, &views_api))
+ {
+ /* lets be tolerant if views is disabled */
+ views_api = 0;
+ }
- if (slapi_vattrspi_register((vattr_sp_handle **)&vattr_handle,
- cos_cache_vattr_get,
- cos_cache_vattr_compare,
- cos_cache_vattr_types) != 0)
- {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, COS_PLUGIN_SUBSYSTEM,
- "cos_cache_init: cannot register as service provider\n" );
- ret = -1;
+ if (slapi_vattrspi_register((vattr_sp_handle **)&vattr_handle,
+ cos_cache_vattr_get,
+ cos_cache_vattr_compare,
+ cos_cache_vattr_types) != 0)
+ {
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM,
+ "cos_cache_init - Cannot register as service provider\n" );
+ ret = -1;
goto out;
- }
-
- if ( PR_CreateThread (PR_USER_THREAD,
- cos_cache_wait_on_change,
- NULL,
- PR_PRIORITY_NORMAL,
- PR_GLOBAL_THREAD,
- PR_UNJOINABLE_THREAD,
- SLAPD_DEFAULT_THREAD_STACKSIZE) == NULL )
+ }
+
+ if ( PR_CreateThread (PR_USER_THREAD,
+ cos_cache_wait_on_change,
+ NULL,
+ PR_PRIORITY_NORMAL,
+ PR_GLOBAL_THREAD,
+ PR_UNJOINABLE_THREAD,
+ SLAPD_DEFAULT_THREAD_STACKSIZE) == NULL )
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, COS_PLUGIN_SUBSYSTEM,
- "cos_cache_init: PR_CreateThread failed\n" );
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM,
+ "cos_cache_init - PR_CreateThread failed\n" );
ret = -1;
goto out;
}
- /* wait for that thread to get started */
- if (ret == 0) {
- slapi_lock_mutex(start_lock);
- while (!started) {
- while (slapi_wait_condvar(start_cond, NULL) == 0);
- }
- slapi_unlock_mutex(start_lock);
- }
+ /* wait for that thread to get started */
+ if (ret == 0) {
+ slapi_lock_mutex(start_lock);
+ while (!started) {
+ while (slapi_wait_condvar(start_cond, NULL) == 0);
+ }
+ slapi_unlock_mutex(start_lock);
+ }
out:
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_init\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_init\n");
return ret;
}
@@ -375,7 +375,7 @@ out:
*/
static void cos_cache_wait_on_change(void *arg)
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_wait_on_change thread\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_wait_on_change thread\n");
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, LOG_DEBUG, "<-- cos_cache_wait_on_change thread exit\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_wait_on_change thread exit\n");
}
/*
@@ -446,7 +446,7 @@ static int cos_cache_create(void)
static int firstTime = 1;
int cache_built = 0;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_create\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_create\n");
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, LOG_ERR, "cos_cache_create: failed to cache the schema\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_create - Failed to cache the schema\n");
}
}
else
{
/* currently we cannot go on without the indexes */
cos_cache_release(pNewCache);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_create: failed to index cache\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_create - Failed to index cache\n");
}
}
else
{
if(firstTime)
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos_cache_create: cos disabled\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, COS_PLUGIN_SUBSYSTEM, "cos_cache_create - cos disabled\n");
firstTime = 0;
}
@@ -531,7 +531,7 @@ static int cos_cache_create(void)
}
}
else
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_create: memory allocation failure\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_create - Memory allocation failure\n");
/* make sure we have a new cache */
@@ -563,7 +563,7 @@ static int cos_cache_create(void)
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_create\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_create\n");
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, LOG_DEBUG, "--> cos_cache_build_definition_list\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_build_definition_list\n");
/*
* The class of service definitions may be anywhere in the DIT,
@@ -597,7 +597,8 @@ static int cos_cache_build_definition_list(cosDefinitions **pDefs, int *vattr_ca
attrs[0] = "namingcontexts";
attrs[1] = 0;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos: Building class of service cache after status change.\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, COS_PLUGIN_SUBSYSTEM, "cos_cache_build_definition_list - "
+ "Building class of service cache after status change.\n");
/*
* XXXrbyrne: this looks really inefficient--should be using
@@ -609,9 +610,8 @@ 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, LOG_ERR,
- "cos_cache_build_definition_list: failed to find suffixes\n",
- 0,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM,
+ "cos_cache_build_definition_list - Failed to find suffixes\n");
ret = -1;
goto next;
}
@@ -665,14 +665,16 @@ next:
{
if(firstTime)
{
- 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);
+ slapi_log_error(SLAPI_LOG_PLUGIN, COS_PLUGIN_SUBSYSTEM, "cos_cache_build_definition_list - "
+ "Found no cos definitions, cos disabled while waiting for updates\n");
firstTime = 0;
}
ret = -1;
}
else
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos: Class of service cache built.\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, COS_PLUGIN_SUBSYSTEM, "cos_cache_build_definition_list - "
+ "Class of service cache built.\n");
/* clean up */
if(pSuffixSearch)
@@ -681,7 +683,7 @@ next:
slapi_pblock_destroy(pSuffixSearch);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_build_definition_list\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_build_definition_list\n");
return ret;
}
@@ -869,9 +871,9 @@ 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, LOG_ERR,
- "cos_dn_defs_cb: "
- "failed to normalize parent dn %s. "
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM,
+ "cos_dn_defs_cb - "
+ "Failed to normalize parent dn %s. "
"Adding the pre normalized dn.\n",
parent);
}
@@ -886,18 +888,18 @@ cos_dn_defs_cb (Slapi_Entry* e, void *callback_data)
}
slapi_ch_free_string(&orig);
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "cos_dn_defs_cb: "
- "failed to get parent dn of cos definition %s.\n",
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM,
+ "cos_dn_defs_cb - "
+ "Failed to get parent dn of cos definition %s.\n",
pDn->val);
if (!pCosTemplateDn) {
if (!pCosTargetTree) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "cosTargetTree and cosTemplateDn are not set.\n");
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_dn_defs_cb - cosTargetTree and cosTemplateDn are not set.\n");
} else {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "cosTemplateDn is not set.\n");
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_dn_defs_cb - cosTemplateDn is not set.\n");
}
} else if (!pCosTargetTree) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "cosTargetTree is not set.\n");
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_dn_defs_cb - cosTargetTree is not set.\n");
}
}
}
@@ -977,14 +979,13 @@ 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, LOG_ERR, "Skipping CoS Definition %s"
- "--no CoS Templates found, "
- "which should be added before the CoS Definition.\n",
- pTmpDn, 0, 0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_dn_defs_cb - Skipping CoS Definition %s"
+ "--no CoS Templates found, which should be added before the CoS Definition.\n",
+ pTmpDn);
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Skipping CoS Definition %s\n"
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_dn_defs_cb - Skipping CoS Definition %s\n"
"--error(%d)\n",
- pTmpDn, rc, 0);
+ pTmpDn, rc);
}
}
@@ -999,10 +1000,12 @@ cos_dn_defs_cb (Slapi_Entry* e, void *callback_data)
*/
if(pDn)
{
- 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);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_dn_defs_cb - "
+ "Incomplete cos definition detected in %s, discarding from cache.\n",pDn->val);
}
else
- 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);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_dn_defs_cb - "
+ "Incomplete cos definition detected, no DN to report, discarding from cache.\n");
if(pCosTargetTree)
cos_cache_del_attrval_list(&pCosTargetTree);
@@ -1199,8 +1202,8 @@ 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, LOG_ERR, "cos_cache_add_dn_tmpls:"
- "could not cache cos template %s\n",pDn,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_dn_tmpl_entries_cb - "
+ "Could not cache cos template %s\n",pDn->val);
}
}
else
@@ -1215,10 +1218,12 @@ static int cos_dn_tmpl_entries_cb (Slapi_Entry* e, void *callback_data) {
*/
if(pDn)
{
- 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);
+ slapi_log_error(SLAPI_LOG_PLUGIN, COS_PLUGIN_SUBSYSTEM, "cos_cache_add_dn_tmpls - "
+ "Incomplete cos template detected in %s, discarding from cache.\n",pDn->val);
}
else
- 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);
+ slapi_log_error(SLAPI_LOG_PLUGIN, COS_PLUGIN_SUBSYSTEM, "cos_cache_add_dn_tmpls - "
+ "Incomplete cos template detected, no DN to report, discarding from cache.\n");
if(pObjectclass)
cos_cache_del_attrval_list(&pObjectclass);
@@ -1259,7 +1264,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, LOG_DEBUG, "--> cos_cache_add_dn_tmpls\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_add_dn_tmpls\n");
/* no cos specifier means this is an indirect scheme */
if(pCosSpecifier)
@@ -1331,17 +1336,17 @@ static int cos_cache_add_defn(
cosAttributes *pDummyAttributes = 0;
cosAttrValue *pSpecsIter = 0;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_add_defn\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_add_defn\n");
if (!spec) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "missing spec\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_add_defn - Missing spec\n");
ret = -1;
goto out;
}
pSpecsIter = *spec;
if (!tmpDn) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "missing tmpDn\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_add_defn - Missing tmpDn\n");
ret = -1;
goto out;
}
@@ -1353,7 +1358,8 @@ 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, LOG_ERR, "cos definition %s supplies its own cosspecifier, rejecting scheme\n",(*dn)->val,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_add_defn - "
+ "cos definition %s supplies its own cosspecifier, rejecting scheme\n",(*dn)->val);
ret = -1;
}
@@ -1370,7 +1376,8 @@ static int cos_cache_add_defn(
/* process each template in turn */
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Processing cosDefinition %s\n",(*dn)->val,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, COS_PLUGIN_SUBSYSTEM, "cos_cache_add_defn - "
+ "Processing cosDefinition %s\n",(*dn)->val);
while(pTmpTmplDn && cosType != COSTYPE_INDIRECT)
{
@@ -1384,8 +1391,8 @@ static int cos_cache_add_defn(
if(tmplCount == 0 && cosType != COSTYPE_INDIRECT)
{
/* without our golden templates we are nothing
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_add_defn:"
- "no templates for cos definition at %s.\n",(*dn)->val,0,0);*/
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_add_defn -"
+ "no templates for cos definition at %s.\n",(*dn)->val);*/
ret = COS_DEF_ERROR_NO_TEMPLATES;
}
else
@@ -1429,7 +1436,8 @@ static int cos_cache_add_defn(
theDef->pCosOpDefault = *pCosOpDefault;
cos_cache_add_ll_entry((void**)pDefs, theDef, NULL);
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Added cosDefinition %s\n",(*dn)->val,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, COS_PLUGIN_SUBSYSTEM, "cos_cache_add_defn - "
+ "Added cosDefinition %s\n",(*dn)->val);
}
}
else
@@ -1453,7 +1461,7 @@ out:
cos_cache_del_attrval_list(pAttrs);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_add_defn\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_add_defn\n");
return ret;
}
@@ -1464,7 +1472,7 @@ out:
*/
static void cos_cache_del_attrval_list(cosAttrValue **pVal)
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_del_attrval_list\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_del_attrval_list\n");
while(*pVal)
{
@@ -1475,7 +1483,7 @@ static void cos_cache_del_attrval_list(cosAttrValue **pVal)
*pVal = pTmp;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_del_attrval_list\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_del_attrval_list\n");
}
@@ -1490,7 +1498,7 @@ cos_cache_add_attrval(cosAttrValue **attrval, char *val)
int ret = 0;
cosAttrValue *theVal;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_add_attrval\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_add_attrval\n");
/* create the attrvalue */
theVal = (cosAttrValue*) slapi_ch_malloc(sizeof(cosAttrValue));
@@ -1504,17 +1512,17 @@ cos_cache_add_attrval(cosAttrValue **attrval, char *val)
else
{
slapi_ch_free((void**)&theVal);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_add_attrval: failed to allocate memory\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_add_attrval - Failed to allocate memory\n");
ret = -1;
}
}
else
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_add_attrval: failed to allocate memory\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_add_attrval - Failed to allocate memory\n");
ret = -1;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_add_attrval\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_add_attrval\n");
return ret;
}
@@ -1551,7 +1559,8 @@ static void cos_cache_add_ll_entry(void** attrval, void *theVal, int ( *compare
static int call_count = 0;
call_count++;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_add_ll_entry - recursion level %d\n",call_count,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_add_ll_entry - "
+ "recursion level %d\n",call_count);
/*
@@ -1614,7 +1623,7 @@ static void cos_cache_add_ll_entry(void** attrval, void *theVal, int ( *compare
*attrval = theVal;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_add_ll_entry - recursion level %d\n",call_count,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_add_ll_entry - recursion level %d\n",call_count);
call_count--;
}
@@ -1630,7 +1639,7 @@ int cos_cache_getref(cos_cache **pptheCache)
static int first_time = 1;
cosCache **ppCache = (cosCache**)pptheCache;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_getref\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_getref\n");
if(first_time)
{
@@ -1642,7 +1651,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, LOG_DEBUG, "cos_cache_getref: no cos cache created\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, COS_PLUGIN_SUBSYSTEM, "cos_cache_getref - No cos cache created\n");
}
}
slapi_unlock_mutex(change_lock);
@@ -1659,7 +1668,7 @@ int cos_cache_getref(cos_cache **pptheCache)
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_getref\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_getref\n");
return ret;
}
@@ -1673,7 +1682,7 @@ int cos_cache_addref(cos_cache *ptheCache)
int ret = 0;
cosCache *pCache = (cosCache*)ptheCache;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_addref\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_addref\n");
slapi_lock_mutex(cache_lock);
@@ -1682,7 +1691,7 @@ int cos_cache_addref(cos_cache *ptheCache)
slapi_unlock_mutex(cache_lock);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_addref\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_addref\n");
return ret;
}
@@ -1700,7 +1709,7 @@ int cos_cache_release(cos_cache *ptheCache)
int destroy = 0;
cosCache *pOldCache = (cosCache*)ptheCache;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_release\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_release\n");
slapi_lock_mutex(cache_lock);
@@ -1770,7 +1779,7 @@ int cos_cache_release(cos_cache *ptheCache)
slapi_ch_free((void**)&pOldCache);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_release\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_release\n");
return ret;
}
@@ -1783,7 +1792,7 @@ int cos_cache_release(cos_cache *ptheCache)
*/
static void cos_cache_del_attr_list(cosAttributes **pAttrs)
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_del_attr_list\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_del_attr_list\n");
while(*pAttrs)
{
@@ -1796,7 +1805,7 @@ static void cos_cache_del_attr_list(cosAttributes **pAttrs)
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_del_attr_list\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_del_attr_list\n");
}
@@ -1810,7 +1819,7 @@ static void cos_cache_del_schema(cosCache *pCache)
char *pLastName = 0;
int attr_index = 0;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_del_schema\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_del_schema\n");
if(pCache && pCache->attrCount && pCache->ppAttrIndex)
{
@@ -1831,7 +1840,7 @@ static void cos_cache_del_schema(cosCache *pCache)
cos_cache_del_attrval_list(&(pCache->ppAttrIndex[0]->pObjectclasses));
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_del_schema\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_del_schema\n");
}
@@ -1845,7 +1854,7 @@ static int cos_cache_add_attr(cosAttributes **pAttrs, char *name, cosAttrValue *
int ret =0;
cosAttributes *theAttr;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_add_attr\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_add_attr\n");
/* create the attribute */
theAttr = (cosAttributes*) slapi_ch_malloc(sizeof(cosAttributes));
@@ -1857,22 +1866,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, LOG_DEBUG, "cos_cache_add_attr: Added attribute %s\n",name,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, COS_PLUGIN_SUBSYSTEM, "cos_cache_add_attr - Added attribute %s\n",name);
}
else
{
slapi_ch_free((void**)&theAttr);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_add_attr: failed to allocate memory\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_add_attr - Failed to allocate memory\n");
ret = -1;
}
}
else
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_add_attr: failed to allocate memory\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_add_attr - Failed to allocate memory\n");
ret = -1;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_add_attr\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_add_attr\n");
return ret;
}
@@ -1887,7 +1896,7 @@ static int cos_cache_add_tmpl(cosTemplates **pTemplates, cosAttrValue *dn, cosAt
int ret =0;
cosTemplates *theTemp;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_add_tmpl\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_add_tmpl\n");
/* create the attribute */
theTemp = (cosTemplates*) slapi_ch_malloc(sizeof(cosTemplates));
@@ -1903,10 +1912,10 @@ 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, LOG_ERR,
- "cos_cache_add_tmpl: failed to normalize dn %s. "
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM,
+ "cos_cache_add_tmpl - Failed to normalize dn %s. "
"Processing the pre normalized dn.\n",
- dn->val, 0, 0);
+ dn->val);
}
grade = (char*)slapi_ch_malloc(strlen(dn->val)+1);
@@ -1997,7 +2006,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, LOG_ERR, "cos_cache_add_tmpl: malformed dn detected: %s\n",dn,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_add_tmpl - Malformed dn detected: %s\n",dn->val);
grade[0] = '\0';
}
@@ -2016,17 +2025,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, LOG_DEBUG, "cos_cache_add_tmpl: Added template %s\n",dn->val,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, COS_PLUGIN_SUBSYSTEM, "cos_cache_add_tmpl - Added template %s\n",dn->val);
slapi_ch_free((void**)&grade);
}
else
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_add_tmpl: failed to allocate memory\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_add_tmpl - Failed to allocate memory\n");
ret = -1;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_add_tmpl\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_add_tmpl\n");
return ret;
}
@@ -2045,7 +2054,7 @@ static int cos_cache_attrval_exists(cosAttrValue *pAttrs, const char *val)
{
int ret = 0;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_attrval_exists\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_attrval_exists\n");
while(pAttrs)
{
@@ -2058,7 +2067,7 @@ static int cos_cache_attrval_exists(cosAttrValue *pAttrs, const char *val)
pAttrs = pAttrs->list.pNext;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_attrval_exists\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_attrval_exists\n");
return ret;
}
@@ -2070,12 +2079,13 @@ 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, LOG_DEBUG, "--> cos_cache_vattr_get\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_vattr_get\n");
if(cos_cache_getref(&pCache) < 1)
{
/* problems we are hosed */
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos_cache_vattr_get: failed to get class of service reference\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, COS_PLUGIN_SUBSYSTEM, "cos_cache_vattr_get - "
+ "Failed to get class of service reference\n");
goto bail;
}
@@ -2095,7 +2105,7 @@ static int cos_cache_vattr_get(vattr_sp_handle *handle, vattr_context *c, Slapi_
bail:
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_vattr_get\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_vattr_get\n");
return ret;
}
@@ -2105,12 +2115,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, LOG_DEBUG, "--> cos_cache_vattr_compare\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_vattr_compare\n");
if(cos_cache_getref(&pCache) < 1)
{
/* problems we are hosed */
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos_cache_vattr_compare: failed to get class of service reference\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, COS_PLUGIN_SUBSYSTEM, "cos_cache_vattr_compare - Failed to get class of service reference\n");
goto bail;
}
@@ -2120,7 +2130,7 @@ static int cos_cache_vattr_compare(vattr_sp_handle *handle, vattr_context *c, Sl
bail:
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_vattr_compare\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_vattr_compare\n");
return ret;
}
@@ -2137,12 +2147,12 @@ static int cos_cache_vattr_types(vattr_sp_handle *handle,Slapi_Entry *e,
char *lastattr = "thisisfakeforcos";
int props = 0;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_vattr_types\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_vattr_types\n");
if(cos_cache_getref((cos_cache **)&pCache) < 1)
{
/* problems we are hosed */
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos_cache_vattr_types: failed to get class of service reference\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, COS_PLUGIN_SUBSYSTEM, "cos_cache_vattr_types - Failed to get class of service reference\n");
goto bail;
}
@@ -2165,17 +2175,14 @@ static int cos_cache_vattr_types(vattr_sp_handle *handle,Slapi_Entry *e,
slapi_vattrspi_add_type(type_context,&thang,0);
}
-
}
-
index++;
}
-
cos_cache_release(pCache);
bail:
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_vattr_types\n",0,0,0);
+slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_vattr_types\n");
return ret;
}
@@ -2222,7 +2229,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, LOG_DEBUG, "--> cos_cache_query_attr\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_query_attr\n");
if(out_attr)
@@ -2285,7 +2292,7 @@ static int cos_cache_query_attr(cos_cache *ptheCache, vattr_context *context,
if(pDn == 0)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_query_attr: failed to get entry dn\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_query_attr - Failed to get entry dn\n");
ret = 1;
goto bail;
}
@@ -2300,13 +2307,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, LOG_ERR, "cos_cache_query_attr: failed to get objectclass from %s\n",pDn,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_query_attr - Failed to get objectclass from %s\n",pDn);
goto bail;
}
if(!cos_cache_schema_check(pCache, attr_index, pObjclasses))
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos_cache_query_attr: cos attribute %s failed schema check on dn: %s\n",type,pDn,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_query_attr - cos attribute %s failed schema check on dn: %s\n",type,pDn);
goto bail;
}
}
@@ -2474,7 +2481,8 @@ static int cos_cache_query_attr(cos_cache *ptheCache, vattr_context *context,
hit = 1;
else
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_query_attr: could not create values to return\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM,
+ "cos_cache_query_attr - Could not create values to return\n");
goto bail;
}
@@ -2536,10 +2544,10 @@ static int cos_cache_query_attr(cos_cache *ptheCache, vattr_context *context,
attr_index++;
} while(
- (hit == 0 || merge_mode) &&
- pCache->attrCount > attr_index &&
- !slapi_utf8casecmp((unsigned char*)type, (unsigned char*)pCache->ppAttrIndex[attr_index]->pAttrName)
- );
+ (hit == 0 || merge_mode) &&
+ pCache->attrCount > attr_index &&
+ !slapi_utf8casecmp((unsigned char*)type, (unsigned char*)pCache->ppAttrIndex[attr_index]->pAttrName)
+ );
if(!merge_mode)
attr_matched_index = attr_index;
@@ -2557,7 +2565,8 @@ static int cos_cache_query_attr(cos_cache *ptheCache, vattr_context *context,
hit = 1;
else
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_query_attr: could not create values to return\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_query_attr - "
+ "Could not create values to return\n");
goto bail;
}
}
@@ -2594,15 +2603,15 @@ static int cos_cache_query_attr(cos_cache *ptheCache, vattr_context *context,
(!using_default && pCache && pCache->ppAttrIndex && pCache->ppAttrIndex[attr_matched_index] &&
((pCache->ppAttrIndex[attr_matched_index]->attr_operational == 1) ||
(pCache->ppAttrIndex[attr_matched_index]->attr_operational_default == 1))))
- {
- /* this is an operational attribute, lets mark it so */
- *props |= SLAPI_ATTR_FLAG_OPATTR;
- }
+ {
+ /* this is an operational attribute, lets mark it so */
+ *props |= SLAPI_ATTR_FLAG_OPATTR;
+ }
}
bail:
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_query_attr\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_query_attr\n");
return ret;
}
@@ -2618,7 +2627,7 @@ static int cos_cache_find_attr(cosCache *pCache, char *type)
int ret = -1; /* assume failure */
cosAttributes attr;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_find_attr\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_find_attr\n");
attr.pAttrName = type;
@@ -2633,7 +2642,7 @@ static int cos_cache_find_attr(cosCache *pCache, char *type)
}
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_find_attr\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_find_attr\n");
return ret;
}
@@ -2652,7 +2661,7 @@ static int cos_cache_schema_check(cosCache *pCache, int attr_index, Slapi_Attr *
Slapi_Value *val;
int hint;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_schema_check\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_schema_check\n");
hint = slapi_attr_first_value( pObjclasses, &val );
while(hint != -1)
@@ -2664,7 +2673,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, LOG_DEBUG, "<-- cos_cache_schema_check\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_schema_check\n");
return ret;
}
@@ -2682,7 +2691,7 @@ static int cos_cache_schema_build(cosCache *pCache)
cosAttrValue *pLastRef = 0;
int attr_index = 0;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_schema_build\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_schema_build\n");
if(!config_get_schemacheck())
ret = 0;
@@ -2762,7 +2771,7 @@ static int cos_cache_schema_build(cosCache *pCache)
}
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_schema_build\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_schema_build\n");
return ret;
}
@@ -2788,7 +2797,7 @@ static int cos_cache_index_all(cosCache *pCache)
{
int ret = -1;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_index_all\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_index_all\n");
/*
first fixup the index array so we can use qsort()
@@ -2877,10 +2886,10 @@ static int cos_cache_index_all(cosCache *pCache)
slapi_ch_free_string(&pAttrVal->val);
pAttrVal->val = normed;
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "cos_cache_index_all: failed to normalize dn %s. "
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM,
+ "cos_cache_index_all - Failed to normalize dn %s. "
"Processing the pre normalized dn.\n",
- pAttrVal->val, 0, 0);
+ pAttrVal->val);
}
pCache->ppTemplateList[tmpindex] = pAttrVal->val;
@@ -2949,7 +2958,7 @@ static int cos_cache_index_all(cosCache *pCache)
pCache->templateCount = actualCount;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "cos: cos cache index built\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, COS_PLUGIN_SUBSYSTEM, "cos_cache_index_all - cos cache index built\n");
ret = 0;
}
@@ -2961,13 +2970,14 @@ static int cos_cache_index_all(cosCache *pCache)
if(pCache->ppTemplateList)
slapi_ch_free((void**)(&pCache->ppTemplateList));
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_index_all: failed to allocate index memory\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_index_all - "
+ "Failed to allocate index memory\n");
}
}
else
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_index_all: no attributes to index\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, COS_PLUGIN_SUBSYSTEM, "cos_cache_index_all - No attributes to index\n");
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_index_all\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_index_all\n");
return ret;
}
@@ -2995,7 +3005,7 @@ static int cos_cache_total_attr_count(cosCache *pCache)
int count = 0;
cosDefinitions *pDef = pCache->pDefs;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_total_attr_count\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_total_attr_count\n");
pCache->templateCount = 0;
@@ -3020,7 +3030,7 @@ static int cos_cache_total_attr_count(cosCache *pCache)
pDef = pDef->list.pNext;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_total_attr_count\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_total_attr_count\n");
return count;
}
@@ -3087,7 +3097,7 @@ static int cos_cache_template_index_bsearch(const char *dn)
int ret = 0;
cosCache *pCache;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_template_index_bsearch\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_template_index_bsearch\n");
if(-1 != cos_cache_getref((cos_cache**)&pCache))
{
@@ -3097,7 +3107,7 @@ static int cos_cache_template_index_bsearch(const char *dn)
cos_cache_release((cos_cache*)pCache);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_template_index_bsearch\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_template_index_bsearch\n");
return ret;
}
@@ -3115,7 +3125,7 @@ static int cos_cache_attr_index_bsearch( const cosCache *pCache, const cosAttrib
int ret = -1;
int index = 0;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_attr_index_bsearch\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_attr_index_bsearch\n");
if(upper >= lower)
{
@@ -3159,7 +3169,7 @@ static int cos_cache_attr_index_bsearch( const cosCache *pCache, const cosAttrib
else
index = -1;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_attr_index_bsearch\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_attr_index_bsearch\n");
return index;
}
@@ -3171,7 +3181,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, LOG_DEBUG, "--> cos_cache_cmp_attr\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_cmp_attr\n");
*result = 0;
@@ -3189,7 +3199,7 @@ static int cos_cache_cmp_attr(cosAttributes *pAttr, Slapi_Value *test_this, int
index++;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_cmp_attr\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_cmp_attr\n");
return ret;
}
@@ -3208,7 +3218,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, LOG_DEBUG, "--> cos_cache_cos_2_slapi_attr\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_cos_2_slapi_valueset\n");
/* test out_vs for existing values */
if(*out_vs)
@@ -3242,7 +3252,8 @@ static int cos_cache_cos_2_slapi_valueset(cosAttributes *pAttr, Slapi_ValueSet *
}
else
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_cos_2_slapi_attr: memory allocation error\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_cos_2_slapi_valueset - "
+ "Memory allocation error\n");
ret = -1;
goto bail;
}
@@ -3253,13 +3264,14 @@ static int cos_cache_cos_2_slapi_valueset(cosAttributes *pAttr, Slapi_ValueSet *
}
else
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_cos_2_slapi_attr: memory allocation error\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_cos_2_slapi_valueset - "
+ "Memory allocation error\n");
ret = -1;
}
bail:
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_cos_2_slapi_attr\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_cos_2_slapi_valueset\n");
return ret;
}
@@ -3295,7 +3307,7 @@ void cos_cache_change_notify(Slapi_PBlock *pb)
int rc = 0;
int optype = -1;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_change_notify\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_change_notify\n");
/* Don't update local cache when remote entries are updated. */
slapi_pblock_get( pb, SLAPI_BACKEND, &be );
@@ -3306,8 +3318,8 @@ 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, LOG_ERR, "cos_cache_change_notify: "
- "failed to get dn of changed entry\n");
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_change_notify - "
+ "Failed to get dn of changed entry\n");
goto bail;
}
dn = slapi_sdn_get_dn(sdn);
@@ -3361,8 +3373,8 @@ 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, LOG_DEBUG, "cos_cache_change_notify: "
- "updating due to indirect template change(%s)\n", dn);
+ slapi_log_error(SLAPI_LOG_PLUGIN, COS_PLUGIN_SUBSYSTEM, "cos_cache_change_notify - "
+ "Updating due to indirect template change(%s)\n", dn);
do_update = 1;
}
@@ -3376,7 +3388,7 @@ void cos_cache_change_notify(Slapi_PBlock *pb)
}
bail:
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_change_notify\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_change_notify\n");
}
/*
@@ -3386,7 +3398,7 @@ bail:
*/
void cos_cache_stop(void)
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_stop\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_stop\n");
/* first deregister our state change func */
slapi_unregister_backend_state_change((void *)cos_cache_backend_state_change);
@@ -3411,7 +3423,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, LOG_DEBUG, "<-- cos_cache_stop\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_stop\n");
}
/*
@@ -3431,7 +3443,7 @@ static int cos_cache_backwards_stricmp_and_clip(char*s1,char*s2)
s1len = strlen(s1);
s2len = strlen(s2);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> cos_cache_backwards_stricmp_and_clip s1 %d s2 %d\n",s1len,s2len,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "--> cos_cache_backwards_stricmp_and_clip - s1 %d s2 %d\n",s1len,s2len);
if(s1len > s2len && s2len > 0)
{
@@ -3458,7 +3470,7 @@ static int cos_cache_backwards_stricmp_and_clip(char*s1,char*s2)
}
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- cos_cache_backwards_stricmp_and_clip\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_TRACE, COS_PLUGIN_SUBSYSTEM, "<-- cos_cache_backwards_stricmp_and_clip\n");
return ret;
}
@@ -3479,14 +3491,14 @@ static int cos_cache_follow_pointer( vattr_context *c, const char *dn, char *typ
attrs[0] = type;
attrs[1] = 0;
- /* Use new internal operation API */
- pDnSearch = slapi_pblock_new();
- if (pDnSearch) {
- slapi_search_internal_set_pb(pDnSearch, dn, LDAP_SCOPE_BASE,"(|(objectclass=*)(objectclass=ldapsubentry))",attrs,
- 0,NULL,NULL,cos_get_plugin_identity(),0);
- slapi_search_internal_pb(pDnSearch);
- slapi_pblock_get( pDnSearch, SLAPI_PLUGIN_INTOP_RESULT, &ret);
- }
+ /* Use new internal operation API */
+ pDnSearch = slapi_pblock_new();
+ if (pDnSearch) {
+ slapi_search_internal_set_pb(pDnSearch, dn, LDAP_SCOPE_BASE,"(|(objectclass=*)(objectclass=ldapsubentry))",attrs,
+ 0,NULL,NULL,cos_get_plugin_identity(),0);
+ slapi_search_internal_pb(pDnSearch);
+ slapi_pblock_get( pDnSearch, SLAPI_PLUGIN_INTOP_RESULT, &ret);
+ }
if(pDnSearch && (ret == LDAP_SUCCESS))
{
@@ -3568,15 +3580,15 @@ static int cos_cache_entry_is_cos_related( Slapi_Entry *e) {
Slapi_Attr *pObjclasses = NULL;
if ( e == NULL ) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "cos_cache_change_notify: "
- "modified entry is NULL--updating cache just in case\n");
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_entry_is_cos_related - "
+ "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, LOG_ERR, "cos_cache_change_notify: "
- " failed to get objectclass from %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, COS_PLUGIN_SUBSYSTEM, "cos_cache_entry_is_cos_related - "
+ "Failed to get objectclass from %s\n",
slapi_entry_get_dn(e));
rc = 0;
} else {
diff --git a/ldap/servers/plugins/deref/deref.c b/ldap/servers/plugins/deref/deref.c
index ab61a26..a23ece3 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, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DEREF_PLUGIN_SUBSYSTEM,
"--> deref_init\n");
/* Store the plugin identity for later use.
@@ -181,8 +181,8 @@ deref_init(Slapi_PBlock *pb)
(void *) deref_pre_entry) != 0 ||
deref_register_operation_extension()
) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DEREF_PLUGIN_SUBSYSTEM,
- "deref_init: failed to register plugin\n");
+ slapi_log_error(SLAPI_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, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DEREF_PLUGIN_SUBSYSTEM,
"--> deref_start\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
- "linked attributes plug-in: ready for service\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, DEREF_PLUGIN_SUBSYSTEM,
+ "deref_start - Ready for service\n");
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DEREF_PLUGIN_SUBSYSTEM,
"--> deref_close\n");
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DEREF_PLUGIN_SUBSYSTEM,
"--> deref_pre_search\n");
/* see if the deref request control is in the list of
@@ -424,26 +424,26 @@ 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, LOG_ERR, DEREF_PLUGIN_SUBSYSTEM,
- "The dereference control was specified more than once - it must be specified only once in the search request\n");
+ slapi_log_error(SLAPI_LOG_ERR, DEREF_PLUGIN_SUBSYSTEM,
+ "deref_pre_search - 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, LOG_ERR, DEREF_PLUGIN_SUBSYSTEM,
- "No control value specified for dereference control\n");
+ slapi_log_error(SLAPI_LOG_ERR, DEREF_PLUGIN_SUBSYSTEM,
+ "deref_pre_search - 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, LOG_ERR, DEREF_PLUGIN_SUBSYSTEM,
- "No control value specified for dereference control\n");
+ slapi_log_error(SLAPI_LOG_ERR, DEREF_PLUGIN_SUBSYSTEM,
+ "deref_pre_search - 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, LOG_ERR, DEREF_PLUGIN_SUBSYSTEM,
- "Empty control value specified for dereference control\n");
+ slapi_log_error(SLAPI_LOG_ERR, DEREF_PLUGIN_SUBSYSTEM,
+ "deref_pre_search - Empty control value specified for dereference control\n");
ldapcode = LDAP_PROTOCOL_ERROR;
ldaperrtext = "The dereference control must have a non-empty value";
iscritical = ctrl->ldctl_iscritical;
@@ -457,8 +457,8 @@ deref_pre_search(Slapi_PBlock *pb)
}
if (derefctrl && incompatible) {
- 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",
+ slapi_log_error(SLAPI_LOG_ERR, DEREF_PLUGIN_SUBSYSTEM,
+ "deref_pre_search - 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:
The semantics of the criticality field are specified in [RFC4511].
@@ -495,8 +495,8 @@ deref_pre_search(Slapi_PBlock *pb)
deref_set_operation_extension(pb, speclist);
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
- "<-- deref_pre_op\n");
+ slapi_log_error(SLAPI_LOG_TRACE, DEREF_PLUGIN_SUBSYSTEM,
+ "<-- deref_pre_search\n");
return ldapcode;
}
@@ -529,8 +529,8 @@ 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, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
- "The client does not have permission to read attribute %s in entry %s\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, DEREF_PLUGIN_SUBSYSTEM,
+ "deref_check_access - The client does not have permission to read attribute %s in entry %s\n",
attrname, slapi_entry_get_dn_const(etest));
} else {
slapi_ch_array_add(retattrs, (char *)attrname); /* retattrs and attrs share pointer to attrname */
@@ -589,16 +589,16 @@ 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, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
- "More than one entry matching DN [%s]\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, DEREF_PLUGIN_SUBSYSTEM,
+ "deref_do_deref_attr - More than one entry matching DN [%s]\n",
derefdn);
} else {
int ii;
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, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
- "The client does not have permission to read the requested "
+ slapi_log_error(SLAPI_LOG_PLUGIN, DEREF_PLUGIN_SUBSYSTEM,
+ "deref_do_deref_attr - The client does not have permission to read the requested "
"attributes in entry %s\n", derefdn);
} else {
ber_printf(ctrlber, "{ss", derefattr, derefdn); /* begin DerefRes + derefAttr + derefVal */
@@ -615,8 +615,8 @@ 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, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
- "skip forbidden attribute [%s]\n", derefdn);
+ slapi_log_error(SLAPI_LOG_PLUGIN, DEREF_PLUGIN_SUBSYSTEM,
+ "deref_do_deref_attr - skip forbidden attribute [%s]\n", derefdn);
continue;
}
#endif
@@ -663,13 +663,13 @@ deref_do_deref_attr(Slapi_PBlock *pb, BerElement *ctrlber, const char *derefdn,
}
}
} else { /* nothing */
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
- "No entries matching [%s]\n", derefdn);
+ slapi_log_error(SLAPI_LOG_PLUGIN, DEREF_PLUGIN_SUBSYSTEM,
+ "deref_do_deref_attr - No entries matching [%s]\n", derefdn);
}
} else {
/* handle error */
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
- "Could not read entry with DN [%s]: error %d:%s\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, DEREF_PLUGIN_SUBSYSTEM,
+ "deref_do_deref_attr - Could not read entry with DN [%s]: error %d:%s\n",
derefdn, rc, ldap_err2string(rc));
}
slapi_free_search_results_internal(derefpb);
@@ -715,8 +715,8 @@ 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, LOG_DEBUG, DEREF_PLUGIN_SUBSYSTEM,
- "The client does not have permission to read attribute %s in entry %s\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, DEREF_PLUGIN_SUBSYSTEM,
+ "deref_pre_entry - 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 c0c3676..e5556e2 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"--> dna_init\n");
/**
@@ -460,8 +460,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_init: failed to register plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_init - Failed to register plugin\n");
status = DNA_FAILURE;
}
@@ -476,8 +476,8 @@ dna_init(Slapi_PBlock *pb)
NULL, /* ? */
plugin_identity /* access control */
)) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_init: failed to register postop plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_init - Failed to register postop plugin\n");
status = DNA_FAILURE;
}
}
@@ -493,8 +493,8 @@ dna_init(Slapi_PBlock *pb)
plugin_identity /* access control */
)
) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_init: failed to register plugin\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_init: failed to register be_txn_pre_op plugin\n");
+ slapi_log_error(SLAPI_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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_init\n");
return status;
}
@@ -537,8 +537,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_postop_init: failed to register plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_postop_init - Failed to register plugin\n");
status = DNA_FAILURE;
}
@@ -561,8 +561,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_exop_init: failed to register plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_exop_init - Failed to register plugin\n");
status = DNA_FAILURE;
}
@@ -577,8 +577,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_init: failed to register be_txn_pre_op plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_init - Failed to register be_txn_pre_op plugin\n");
status = DNA_FAILURE;
}
@@ -597,20 +597,20 @@ dna_start(Slapi_PBlock * pb)
Slapi_DN *pluginsdn = NULL;
const char *plugindn = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"--> dna_start\n");
g_dna_cache_lock = slapi_new_rwlock();
if (!g_dna_cache_lock) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_start: global config lock creation failed\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_start: global server lock creation failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_start - Global server lock creation failed\n");
return DNA_FAILURE;
}
@@ -621,13 +621,13 @@ 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "dna_start: had to use hard coded config dn\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "dna_start: config at %s\n", plugindn);
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ "dna_start - Config at %s\n", plugindn);
}
@@ -637,8 +637,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_start: unable to load host and port information\n");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_start - Unable to load host and port information\n");
}
/*
@@ -649,8 +649,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_start: unable to load plug-in configuration\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_start: shared config server initialization failed.\n");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_start - Shared config server initialization failed.\n");
return DNA_FAILURE;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "dna: ready for service\n");
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ "dna_start - Ready for service\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_close\n");
return DNA_SUCCESS;
@@ -710,29 +710,29 @@ dna_parse_exop_ber(Slapi_PBlock *pb, char **shared_dn)
struct berval *reqdata = NULL;
BerElement *tmp_bere = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_parse_exop_ber: Unable to retrieve request OID.\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_parse_exop_ber: Received incorrect request OID.\n");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_exop_ber - Received incorrect request OID.\n");
goto out;
}
/* 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_parse_exop_ber: No request data received.\n");
+ slapi_log_error(SLAPI_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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"--> dna_parse_config_entry\n");
/* If this is the main DNA plug-in
@@ -957,13 +957,13 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int apply)
entry->dn = slapi_ch_strdup(value);
}
- slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "----------> dn [%s]\n", entry->dn);
+ slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_parse_config_entry: The %s config "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - The %s config "
"setting is required for range %s.\n",
DNA_TYPE, entry->dn);
ret = DNA_FAILURE;
@@ -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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_parse_config_entry: dnaType (%s) does "
+ slapi_log_error(SLAPI_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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
"----------> %s [%s]\n", DNA_TYPE, entry->types[i]);
}
@@ -988,16 +988,16 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_parse_config_entry: The %s config "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - The %s config "
"setting is required for range %s.\n",
DNA_NEXTVAL, entry->dn);
ret = DNA_FAILURE;
goto bail;
}
- slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "----------> %s [%" NSPRIu64 "]\n", DNA_NEXTVAL,
+ slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - %s [%" NSPRIu64 "]\n", DNA_NEXTVAL,
entry->nextval);
value = slapi_entry_attr_get_charptr(e, DNA_PREFIX);
@@ -1012,8 +1012,8 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int apply)
slapi_ch_free_string(&value);
}
- slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "----------> %s [%s]\n", DNA_PREFIX, entry->prefix);
+ slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - %s [%s]\n", DNA_PREFIX, entry->prefix);
/* Set the default interval to 1 */
entry->interval = 1;
@@ -1025,38 +1025,38 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int apply)
slapi_ch_free_string(&value);
}
- slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "----------> %s [%" NSPRIu64 "]\n", DNA_INTERVAL, entry->interval);
+ slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - %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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "----------> %s [%s]\n", DNA_GENERATE, entry->generate);
+ slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - %s [%s]\n", DNA_GENERATE, entry->generate);
}
value = slapi_entry_attr_get_charptr(e, DNA_FILTER);
if (value) {
entry->filter = value;
if (NULL == (entry->slapi_filter = slapi_str2filter(value))) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM ,
- "Error: Invalid search filter in entry [%s]: [%s]\n",
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM ,
+ "dna_parse_config_entry - Invalid search filter in entry [%s]: [%s]\n",
entry->dn, value);
ret = DNA_FAILURE;
goto bail;
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_parse_config_entry: The %s config "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - The %s config "
"setting is required for range %s.\n",
DNA_FILTER, entry->dn);
ret = DNA_FAILURE;
goto bail;
}
- slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "----------> %s [%s]\n", DNA_FILTER, value);
+ slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - %s [%s]\n", DNA_FILTER, value);
value = slapi_entry_attr_get_charptr(e, DNA_SCOPE);
if (value) {
@@ -1070,8 +1070,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "Error: Invalid DN used as scope in entry [%s]: [%s]\n",
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - Invalid DN used as scope in entry [%s]: [%s]\n",
entry->dn, value);
ret = DNA_FAILURE;
slapi_sdn_free(&test_dn);
@@ -1079,16 +1079,16 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int apply)
}
slapi_sdn_free(&test_dn);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_parse_config_entry: The %s config "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - The %s config "
"config setting is required for range %s.\n",
DNA_SCOPE, entry->dn);
ret = DNA_FAILURE;
goto bail;
}
- slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "----------> %s [%s]\n", DNA_SCOPE, entry->scope);
+ slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - %s [%s]\n", DNA_SCOPE, entry->scope);
plugin_attr_values = slapi_entry_attr_get_charray(e, DNA_EXCLUDE_SCOPE);
if (plugin_attr_values) {
@@ -1101,8 +1101,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "Error: Ignoring invalid DN used as excluded scope: [%s]\n", plugin_attr_values[i]);
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - Ignoring invalid DN used as excluded scope: [%s]\n", plugin_attr_values[i]);
slapi_ch_free_string(&plugin_attr_values[i]);
} else {
entry->excludescope[j++] = slapi_sdn_new_dn_passin(plugin_attr_values[i]);
@@ -1111,8 +1111,8 @@ 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "----------> %s[%d] [%s]\n", DNA_EXCLUDE_SCOPE, i, slapi_sdn_get_dn(entry->excludescope[i]));
+ slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - %s[%d] [%s]\n", DNA_EXCLUDE_SCOPE, i, slapi_sdn_get_dn(entry->excludescope[i]));
}
/* optional, if not specified set -1 which is converted to the max unsigned
@@ -1125,8 +1125,8 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int apply)
entry->maxval = -1;
}
- slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "----------> %s [%" NSPRIu64 "]\n", DNA_MAXVAL,
+ slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - %s [%" NSPRIu64 "]\n", DNA_MAXVAL,
entry->maxval);
/* get the global bind dn and password(if any) */
@@ -1137,8 +1137,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_parse_config_entry: Unable to create "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - Unable to create "
"slapi_dn from dnaRemoteBindDN (%s)\n", value);
ret = DNA_FAILURE;
slapi_ch_free_string(&value);
@@ -1146,8 +1146,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_parse_config_entry: failed to normalize dn: "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - Failed to normalize dn: "
"%s\n", value);
ret = DNA_FAILURE;
slapi_sdn_free(&sdn);
@@ -1162,8 +1162,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_parse_config_entry: Invalid remote bind DN and password settings.\n");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - Invalid remote bind DN and password settings.\n");
ret = DNA_FAILURE;
goto bail;
}
@@ -1178,8 +1178,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_parse_config_entry: Unable to create "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - Unable to create "
"slapi_dn (%s)\n", value);
ret = DNA_FAILURE;
slapi_ch_free_string(&value);
@@ -1194,8 +1194,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_parse_config_entry: Unable to locate "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - Unable to locate "
"shared configuration entry (%s)\n", value);
ret = DNA_FAILURE;
slapi_sdn_free(&sdn);
@@ -1207,8 +1207,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_parse_config_entry: failed to normalize dn: "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - Failed to normalize dn: "
"%s\n", value);
ret = DNA_FAILURE;
slapi_sdn_free(&sdn);
@@ -1223,8 +1223,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_parse_config_entry: failed to create dn: "
+ slapi_log_error(SLAPI_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);
ret = DNA_FAILURE;
@@ -1232,8 +1232,8 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int apply)
}
entry->shared_cfg_dn = normdn;
- slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "----------> %s [%s]\n", DNA_SHARED_CFG_DN,
+ slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - %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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "----------> %s [%s]\n", DNA_THRESHOLD, value);
+ slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - %s [%s]\n", DNA_THRESHOLD, value);
if (entry->threshold <= 0) {
entry->threshold = 1;
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"----------> %s too low, setting to [%s]\n", DNA_THRESHOLD, value);
}
@@ -1255,8 +1255,8 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int apply)
entry->threshold = 1;
}
- slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "----------> %s [%" NSPRIu64 "]\n", DNA_THRESHOLD,
+ slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - %s [%" NSPRIu64 "]\n", DNA_THRESHOLD,
entry->threshold);
value = slapi_entry_attr_get_charptr(e, DNA_RANGE_REQUEST_TIMEOUT);
@@ -1267,8 +1267,8 @@ dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int apply)
entry->timeout = DNA_DEFAULT_TIMEOUT;
}
- slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "----------> %s [%" NSPRIu64 "]\n", DNA_RANGE_REQUEST_TIMEOUT,
+ slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - %s [%" NSPRIu64 "]\n", DNA_RANGE_REQUEST_TIMEOUT,
entry->timeout);
value = slapi_entry_attr_get_charptr(e, DNA_NEXT_RANGE);
@@ -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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
"dna_parse_config_entry: Unable to create lock "
"for range %s.\n", entry->dn);
ret = DNA_FAILURE;
@@ -1354,8 +1354,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM, "dna_parse_config_entry: "
- "Error: shared config entry (%s) matches scope \"%s\", and filter \"%s\" "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM, "dna_parse_config_entry - "
+ "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);
ret = DNA_FAILURE;
@@ -1378,9 +1378,9 @@ 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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_CONFIG,
DNA_PLUGIN_SUBSYSTEM,
- "store [%s] before [%s] \n", entry->scope,
+ "dna_parse_config_entry - store [%s] before [%s] \n", entry->scope,
config_entry->scope);
entry_added = 1;
break;
@@ -1391,8 +1391,8 @@ 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "store [%s] at tail\n", entry->scope);
+ slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - store [%s] at tail\n", entry->scope);
entry_added = 1;
break;
}
@@ -1400,8 +1400,8 @@ 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "store [%s] at head \n", entry->scope);
+ slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - store [%s] at head \n", entry->scope);
entry_added = 1;
}
@@ -1409,8 +1409,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_parse_config_entry: Invalid config entry "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_parse_config_entry - Invalid config entry "
"[%s] skipped\n", entry->dn);
}
dna_free_config_entry(&entry);
@@ -1418,7 +1418,7 @@ bail:
ret = DNA_SUCCESS;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_parse_config_entry\n");
return ret;
@@ -1434,8 +1434,8 @@ dna_free_config_entry(struct configEntry ** entry)
e = *entry;
if (e->dn) {
- slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "freeing config entry [%s]\n", e->dn);
+ slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM,
+ "dna_free_config_entry - 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_load_host_port\n");
return status;
@@ -1627,14 +1627,15 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM, "dna_update_config_event: failed to abort transaction!\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_update_config_event: failed to start transaction\n");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_update_config_event - Failed to start transaction\n");
}
}
@@ -1686,8 +1687,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_fix_maxval: Unable to activate the "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_fix_maxval - Unable to activate the "
"next range for range %s.\n", config_entry->dn);
}
} else if (!skip_range_request && config_entry->shared_cfg_base) {
@@ -1759,8 +1760,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_notice_allocation: Unable to activate "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_notice_allocation - Unable to activate "
"the next range for range %s.\n", config_entry->dn);
}
} else {
@@ -1817,8 +1818,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_get_shared_servers: search failed for shared "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_get_shared_servers - Search failed for shared "
"config: %s [error %d]\n", config_entry->shared_cfg_base,
ret);
goto cleanup;
@@ -1861,8 +1862,8 @@ 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "dna_get_shared_servers: skipping invalid "
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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);
continue;
@@ -1891,8 +1892,8 @@ dna_get_shared_servers(struct configEntry *config_entry, PRCList **servers, int
}
}
if(err){
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "dna_get_shared_servers: skipping invalid "
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ "dna_get_shared_servers - Skipping invalid "
"shared config entry (%s). Reason: %s\n",
slapi_entry_get_dn(entries[i]), reason);
dna_free_shared_server(&server);
@@ -1986,8 +1987,8 @@ 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "dna_request_range: Already processing a "
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ "dna_request_range - Already processing a "
"range extension request. Skipping request.\n");
slapi_unlock_mutex(config_entry->extend_lock);
goto bail;
@@ -2002,22 +2003,22 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_request_range: Failed to create "
+ slapi_log_error(SLAPI_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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_request_range: Unable to "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_request_range - Unable to "
"initialize LDAP session to server %s:%u.\n",
server->host, server->port);
goto bail;
@@ -2039,8 +2040,8 @@ static int dna_request_range(struct configEntry *config_entry,
NULL, NULL, NULL, NULL);
if (ret != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "dna_request_range: Error binding "
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ "dna_request_range - Error binding "
" to replica server %s:%u. [error %d]\n",
server->host, server->port, ret);
goto bail;
@@ -2051,8 +2052,8 @@ static int dna_request_range(struct configEntry *config_entry,
request, NULL, NULL, &retoid, &responsedata);
if (ret != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_request_range: Error sending "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_request_range - Error sending "
"range extension extended operation request "
"to server %s:%u [error %d]\n", server->host,
server->port, ret);
@@ -2062,8 +2063,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_request_range: Received incorrect response OID.\n");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_request_range - Received incorrect response OID.\n");
goto bail;
}
@@ -2120,22 +2121,22 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_create_range_request: Error "
+ slapi_log_error(SLAPI_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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_create_range_request: Error "
+ slapi_log_error(SLAPI_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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_create_range_request: Error "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_create_range_request - Error "
"encoding request data.\n");
goto bail;
}
@@ -2153,17 +2154,17 @@ bail:
static char *dna_get_dn(Slapi_PBlock * pb)
{
Slapi_DN *sdn = 0;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"--> dna_get_dn\n");
if (slapi_pblock_get(pb, SLAPI_TARGET_SDN, &sdn)) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_get_dn: failed to get dn of changed entry");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_get_dn - Failed to get dn of changed entry");
goto bail;
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_get_dn\n");
return (char *)slapi_sdn_get_dn(sdn);
@@ -2176,14 +2177,14 @@ static int dna_dn_is_config(char *dn)
{
int ret = 0;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"--> dna_is_config %s\n", dn);
if (slapi_dn_issuffix(dn, getPluginDN())) {
ret = 1;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_is_config\n");
return ret;
@@ -2454,7 +2455,7 @@ static int dna_get_next_value(struct configEntry *config_entry,
PRUint64 nextval = 0;
int ret;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"--> dna_get_next_value\n");
/* get the lock to prevent contention with other threads over
@@ -2473,8 +2474,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_get_next_value: no more values available!!\n");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_get_next_value - No more values available!!\n");
goto done;
}
@@ -2484,8 +2485,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_get_next_value: failed to allocate a new ID!!\n");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_get_next_value - Failed to allocate a new ID!!\n");
goto done;
}
}
@@ -2540,7 +2541,7 @@ static int dna_get_next_value(struct configEntry *config_entry,
slapi_pblock_destroy(pb);
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_get_next_value\n");
return ret;
@@ -2673,8 +2674,8 @@ dna_update_shared_config(struct configEntry *config_entry)
}
if (ret != LDAP_SUCCESS) {
- 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",
+ slapi_log_error(SLAPI_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,8 +2738,8 @@ dna_update_next_range(struct configEntry *config_entry,
pb = NULL;
if (ret != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_update_next_range: Error updating "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_update_next_range - Error updating "
"configuration entry [err=%d]\n", ret);
} else {
/* update the cached config and the shared config */
@@ -2819,8 +2820,8 @@ dna_activate_next_range(struct configEntry *config_entry)
pb = NULL;
if (ret != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_activate_next_range: Error updating "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_activate_next_range - Error updating "
"configuration entry [err=%d]\n", ret);
} else {
/* Update the in-memory config info */
@@ -2870,8 +2871,8 @@ 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "dna_is_replica_bind_dn: failed to create "
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ "dna_is_replica_bind_dn - Failed to create "
"replica dn for %s\n", be_suffix);
ret = 1;
goto done;
@@ -2919,8 +2920,8 @@ 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "dna_is_replica_bind_dn: Failed to fetch replica entry "
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ "dna_is_replica_bind_dn - Failed to fetch replica entry "
"for range %s\n", range_dn);
}
}
@@ -2960,8 +2961,8 @@ 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "dna_get_replica_bind_creds: failed to create "
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ "dna_get_replica_bind_creds - Failed to create "
"replica dn for %s\n", be_suffix);
ret = LDAP_PARAM_ERROR;
goto bail;
@@ -2980,8 +2981,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_get_replica_bind_creds: Failed to "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_get_replica_bind_creds - Failed to "
"allocate pblock\n");
goto bail;
}
@@ -2993,8 +2994,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_get_replica_bind_creds: Failed to fetch replica "
+ slapi_log_error(SLAPI_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,
server->port ? server->port : server->secureport, ret);
@@ -3013,8 +3014,8 @@ 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "dna_get_replica_bind_creds: Failed to fetch replication "
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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);
ret = LDAP_OPERATIONS_ERROR;
@@ -3064,8 +3065,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_get_replica_bind_creds: Failed to decode "
+ slapi_log_error(SLAPI_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);
goto bail;
@@ -3134,8 +3135,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_get_remote_config_info: Using SSL protocol, but the secure "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_get_remote_config_info - Using SSL protocol, but the secure "
"port is not defined.\n");
return -1;
}
@@ -3143,8 +3144,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_get_remote_config_info: Using %s protocol, but the non-secure "
+ slapi_log_error(SLAPI_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,8 +3160,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_get_remote_config_info: Failed to decode "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_get_remote_config_info - Failed to decode "
"replica bind credentials for server %s, "
"port %u\n", server->host,
server->port ? server->port : server->secureport);
@@ -3410,21 +3411,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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, " no types to act upon.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM, "_dna_pre_op_add - 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, " dn not in scope\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, " dn in excluded scope\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM, "_dna_pre_op_add - dn in excluded scope\n");
goto next;
}
}
@@ -3433,7 +3434,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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, " dn does not match filter\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM, "_dna_pre_op_add - dn does not match filter\n");
goto next;
}
}
@@ -3465,7 +3466,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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, " adding %s to %s as -2\n", types_to_generate[0], dn);
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM, "_dna_pre_op_add - 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,15 +3505,15 @@ _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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, " retrieved value %" PRIu64 " ret %d\n", setval, ret);
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM, "_dna_pre_op_add - 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_pre_op: no more values available!!\n");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "_dna_pre_op_add - 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"
" %s failed! Unable to proceed.",
@@ -3524,8 +3525,8 @@ _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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_pre_op: failed to allocate a new ID 1\n");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "_dna_pre_op_add - 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"
" %s failed! Unable to proceed.",
@@ -3535,8 +3536,8 @@ _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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_pre_op: failed to allocate a new ID!! 2\n");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "_dna_pre_op_add - 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"
" %s failed! Unable to proceed.",
@@ -3553,8 +3554,8 @@ _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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "dna_pre_op: Passed threshold of %"
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ "_dna_pre_op_add - Passed threshold of %"
NSPRIu64 " remaining values "
"for range %s. (%" NSPRIu64 " values remain)\n",
config_entry->threshold, config_entry->dn,
@@ -3783,8 +3784,8 @@ _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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_pre_op: no more values available!!\n");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "_dna_pre_op_modify - 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"
" %s failed! Unable to proceed.",
@@ -3796,8 +3797,8 @@ _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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_pre_op: failed to allocate a new ID\n");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "_dna_pre_op_modify - 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"
" %s failed! Unable to proceed.",
@@ -3807,8 +3808,8 @@ _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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_pre_op: failed to allocate a new ID!!\n");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "_dna_pre_op_modify - 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"
" %s failed! Unable to proceed.",
@@ -3825,8 +3826,8 @@ _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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_pre_op: Passed threshold of %"
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "_dna_pre_op_modify - Passed threshold of %"
NSPRIu64 " remaining values "
"for range %s. (%" NSPRIu64 " values remain)\n",
config_entry->threshold, config_entry->dn,
@@ -3868,7 +3869,7 @@ dna_pre_op(Slapi_PBlock * pb, int modtype)
LDAPMod **mods;
int ret = 0;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"--> dna_pre_op\n");
if (0 == (dn = dna_get_dn(pb))) {
@@ -3883,15 +3884,15 @@ 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "dna_pre_op: no add entry set for add\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "dna_pre_op: no pre op entry set for modify\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ "dna_pre_op - No pre op entry set for modify\n");
goto bail;
}
/* grab the mods - we'll put them back later with our modifications appended */
@@ -3959,15 +3960,15 @@ bail:
slapi_mods_free(&smods);
if (ret) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "dna_pre_op: operation failure [%d]\n", ret);
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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);
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &ret);
ret = DNA_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_pre_op\n");
return ret;
@@ -4031,26 +4032,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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"--> dna_be_txn_pre_op\n");
if (!slapi_plugin_running(pb)) {
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, " --x bailing, plugin not running\n");
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM, "dna_be_txn_pre_op - Bailing, plugin not running\n");
goto bail;
}
if (0 == (dn = dna_get_dn(pb))) {
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, " --x bailing, is dna dn\n");
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM, "dna_be_txn_pre_op - Bailing, is dna dn\n");
goto bail;
}
if (dna_dn_is_config(dn)) {
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, " --x bailing is dna config dn\n");
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM, "dna_be_txn_pre_op - Bailing is dna config dn\n");
goto bail;
}
if (dna_isrepl(pb)) {
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, " --x bailing replicated operation\n");
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM, "dna_be_txn_pre_op - Bailing replicated operation\n");
/* if repl, the dna values should be already in the entry. */
goto bail;
}
@@ -4062,7 +4063,7 @@ static int dna_be_txn_pre_op(Slapi_PBlock *pb, int modtype)
}
if (e == NULL) {
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, " --x bailing entry is NULL\n");
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM, "dna_be_txn_pre_op - Bailing entry is NULL\n");
goto bail;
} else if (LDAP_CHANGETYPE_MODIFY == modtype) {
slapi_pblock_get(pb, SLAPI_MODIFY_MODS, &mods);
@@ -4074,21 +4075,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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, " using global config...\n");
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM, "dna_be_txn_pre_op - 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, " All types already serviced\n");
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM, "dna_be_txn_pre_op - 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, " Entry not in scope of dnaScope!\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM, "dna_be_txn_pre_op - Entry not in scope of dnaScope!\n");
goto next;
}
}
@@ -4096,7 +4097,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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, " Entry in excluded scope, next\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM, "dna_be_txn_pre_op - Entry in excluded scope, next\n");
goto next;
}
}
@@ -4104,7 +4105,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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM, " Entry does not match filter\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM, "dna_be_txn_pre_op - Entry does not match filter\n");
goto next;
}
}
@@ -4290,15 +4291,15 @@ bail:
slapi_ch_array_free(generated_types);
if (ret) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "dna_be_txn_pre_op: operation failure [%d]\n", ret);
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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);
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &ret);
ret = DNA_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_be_txn_pre_op\n");
return ret;
@@ -4312,7 +4313,7 @@ static int dna_config_check_post_op(Slapi_PBlock * pb)
return DNA_SUCCESS;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"--> dna_config_check_post_op\n");
@@ -4327,7 +4328,7 @@ static int dna_config_check_post_op(Slapi_PBlock * pb)
}
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_config_check_post_op\n");
return DNA_SUCCESS;
@@ -4339,7 +4340,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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"--> dna_parse_exop_backend\n");
Slapi_DN *shared_sdn = NULL;
char *shared_dn = NULL;
@@ -4356,7 +4357,7 @@ static int dna_extend_exop_backend(Slapi_PBlock *pb, Slapi_Backend **target)
}
res = LDAP_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_parse_exop_backend %d\n", res);
return res;
}
@@ -4377,15 +4378,15 @@ static int dna_extend_exop(Slapi_PBlock *pb)
return ret;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "dna_extend_exop: received range extension "
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ "dna_extend_exop - Received range extension "
"request for range [%s]\n", shared_dn);
/* Only allow range requests from the replication bind DN user */
@@ -4425,8 +4426,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_extend_exop: Unable to encode exop response.\n");
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_extend_exop - Unable to encode exop response.\n");
ber_free(respber, 1);
ret = LDAP_ENCODING_ERROR;
goto free_and_return;
@@ -4443,8 +4444,8 @@ static int dna_extend_exop(Slapi_PBlock *pb)
ret = SLAPI_PLUGIN_EXTENDED_SENT_RESULT;
ber_bvfree(respdata);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "dna_extend_exop: Released range %" NSPRIu64 "-%" NSPRIu64 ".\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ "dna_extend_exop - Released range %" NSPRIu64 "-%" NSPRIu64 ".\n",
lower, upper);
}
@@ -4452,7 +4453,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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"<-- dna_extend_exop\n");
return ret;
@@ -4475,7 +4476,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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"--> dna_release_range\n");
if (range_dn) {
@@ -4525,8 +4526,8 @@ 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, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
- "dna_release_range: Already processing a "
+ slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
+ "dna_release_range - Already processing a "
"range extension request. Skipping request.\n");
slapi_unlock_mutex(config_entry->extend_lock);
ret = LDAP_UNWILLING_TO_PERFORM;
@@ -4627,8 +4628,8 @@ 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, LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
- "dna_release_range: Error updating "
+ slapi_log_error(SLAPI_LOG_ERR, DNA_PLUGIN_SUBSYSTEM,
+ "dna_release_range - Error updating "
"configuration entry [err=%d]\n", ret);
}
}
@@ -4648,7 +4649,7 @@ bail:
dna_unlock();
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, DNA_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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 44cfa4c..803436d 100644
--- a/ldap/servers/plugins/http/http_client.c
+++ b/ldap/servers/plugins/http/http_client.c
@@ -41,18 +41,6 @@ int slapd_log_error_proc( char *subsystem, int sev_level, char *fmt, ... );
extern "C" {
#endif
-#define LDAP_DEBUG_TRACE 0x00001 /* 1 */
-#define LDAP_DEBUG_ANY 0x04000 /* 16384 */
-#define LDAP_DEBUG_PLUGIN 0x10000 /* 65536 */
-
-/* debugging stuff */
-extern int slapd_ldap_debug;
-#define LDAPDebug( level, sev_level, fmt, arg1, arg2, arg3 ) \
- { \
- if ( slapd_ldap_debug & level ) { \
- slapd_log_error_proc( NULL, sev_level, fmt, arg1, arg2, arg3 ); \
- } \
- }
#ifdef __cplusplus
}
@@ -113,7 +101,7 @@ int http_client_version(void)
int http_client_init(Slapi_PBlock *pb)
{
int status = HTTP_SUCCESS;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> http_client_init -- BEGIN\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,"http_client_init - BEGIN\n");
if ( slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION,
SLAPI_PLUGIN_VERSION_01 ) != 0 ||
@@ -124,20 +112,20 @@ int http_client_init(Slapi_PBlock *pb)
slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION,
(void *)&pdesc ) != 0 )
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
- "http_client_init: failed to register plugin\n" );
+ slapi_log_error(SLAPI_LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
+ "http_client_init - Failed to register plugin\n" );
status = HTTP_FAILURE;
}
/* 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, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
- "http_client_init: Failed to retrieve SLAPI_PLUGIN_IDENTITY\n");
+ slapi_log_error(SLAPI_LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
+ "http_client_init - Failed to retrieve SLAPI_PLUGIN_IDENTITY\n");
return HTTP_FAILURE;
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- http_client_init -- END\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "http_client_init - END\n");
return status;
}
@@ -147,7 +135,7 @@ static int http_client_start(Slapi_PBlock *pb)
/**
* do some init work here
*/
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> http_client_start -- BEGIN\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,"http_client_start - BEGIN\n");
api[0] = 0; /* reserved for api broker use, must be zero */
api[1] = (void *)_http_init;
@@ -158,14 +146,14 @@ 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, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
"http_client_start: failed to register functions\n" );
status = HTTP_FAILURE;
}
_http_init(plugin_id);
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- http_client_start -- END\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "http_client_start - END\n");
return status;
}
@@ -175,11 +163,11 @@ static int http_client_close(Slapi_PBlock *pb)
/**
* do cleanup
*/
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> http_client_close -- BEGIN\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "http_client_close - BEGIN\n");
slapi_apib_unregister(HTTP_v1_0_GUID);
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- http_client_close -- END\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "http_client_close - END\n");
return status;
}
@@ -189,11 +177,11 @@ static int http_client_close(Slapi_PBlock *pb)
*/
static void _http_init(Slapi_ComponentId *plugin_id)
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> _http_init -- BEGIN\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "_http_init - BEGIN\n");
http_impl_init(plugin_id);
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- _http_init -- END\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "_http_init - END\n");
}
/**
@@ -203,11 +191,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, LOG_DEBUG, "--> _http_get_text -- BEGIN\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "_http_get_text - BEGIN\n");
status = http_impl_get_text(url, data, bytesRead);
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- _http_get_text -- END\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "_http_get_text - END\n");
return status;
}
@@ -218,11 +206,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, LOG_DEBUG, "--> _http_get_binary -- BEGIN\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "_http_get_binary - BEGIN\n");
status = http_impl_get_binary(url, data, bytesRead);
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- _http_get_binary -- END\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "_http_get_binary - END\n");
return status;
}
@@ -233,11 +221,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, LOG_DEBUG, "--> _http_get_redirected_uri -- BEGIN\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "_http_get_redirected_uri -- BEGIN\n");
status = http_impl_get_redirected_uri(url, data, bytesRead);
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- _http_get_redirected_uri -- END\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "_http_get_redirected_uri -- END\n");
return status;
}
@@ -247,11 +235,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, LOG_DEBUG, "--> _http_post -- BEGIN\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "_http_post - BEGIN\n");
status = http_impl_post(url, httpheaderArray, body, data, bytesRead);
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- _http_post -- END\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "_http_post - END\n");
return status;
}
@@ -260,10 +248,10 @@ static int _http_post(char *url, httpheader ** httpheaderArray, char *body, char
*/
static void _http_shutdown( void )
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> _http_shutdown -- BEGIN\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "_http_shutdown - BEGIN\n");
http_impl_shutdown();
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- _http_shutdown -- END\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "_http_shutdown - END\n");
}
diff --git a/ldap/servers/plugins/http/http_impl.c b/ldap/servers/plugins/http/http_impl.c
index ebd6c10..a3d2d6e 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, int sev_level, char *fmt, ... );
+int slapd_log_error_proc( int loglevel, char *subsystem, char *fmt, ... );
/*** from ldaplog.h ***/
@@ -59,10 +59,10 @@ extern "C" {
/* debugging stuff */
extern int slapd_ldap_debug;
-#define LDAPDebug( level, sev_level, fmt, arg1, arg2, arg3 ) \
+#define LDAPDebug( level, fmt, arg1, arg2, arg3 ) \
{ \
if ( slapd_ldap_debug & level ) { \
- slapd_log_error_proc( NULL, sev_level, fmt, arg1, arg2, arg3 ); \
+ slapd_log_error_proc( level, NULL, fmt, arg1, arg2, arg3 ); \
} \
}
@@ -182,14 +182,14 @@ static int doRequestRetry(const char *url, httpheader **httpheaderArray, char *b
retrycnt = httpConfig->retryCount;
if (retrycnt == 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;
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "doRequestRetry - Retry Count cannot be read. Setting to default value of 3\n");
+ retrycnt = 3;
}
status = doRequest(url, httpheaderArray, body, buf, bytesRead, reqType);
if (status != HTTP_IMPL_SUCCESS) {
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "doRequestRetry: Failed to perform http request \n", 0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "doRequestRetry - Failed to perform http request \n");
while (retrycnt > 0) {
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "doRequestRetry: Retrying http request %d.\n", i,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "doRequestRetry - Retrying http request %d.\n", i);
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, 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);
+ slapi_log_error(SLAPI_LOG_ERR, HTTP_PLUGIN_SUBSYSTEM, "doRequestRetry - Failed to perform http request after %d attempts.\n", i);
+ slapi_log_error(SLAPI_LOG_ERR, HTTP_PLUGIN_SUBSYSTEM, "doRequestRetry - Verify plugin URI configuration and contact Directory Administrator.\n");
}
}
@@ -219,19 +219,18 @@ static int doRequest(const char *url, httpheader **httpheaderArray, char *body,
PRInt32 http_connection_time_out = 0;
PRInt32 sslOn = 0;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> doRequest -- BEGIN\n",0,0,0);
-
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> url=[%s] \n",url,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "doRequest - BEGIN\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "doRequest - url=[%s] \n",url);
/* Parse the URL and initialize the host, port, path */
if (parseURI(url, &host, &port, &path, &sslOn) == PR_FAILURE) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
"doRequest: %s \n", HTTP_ERROR_BAD_URL);
status = PR_FAILURE;
goto bail;
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> host=[%s] port[%d] path[%s] \n",host,port,path);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "doRequest - host=[%s] port[%d] path[%s] \n",host,port,path);
/* Initialize the Net Addr */
if (PR_StringToNetAddr(host, &addr) == PR_FAILURE) {
@@ -242,8 +241,8 @@ 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, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
- "doRequest: %s\n", HTTP_ERROR_NET_ADDR);
+ slapi_log_error(SLAPI_LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
+ "doRequest - %s\n", HTTP_ERROR_NET_ADDR);
status = HTTP_CLIENT_ERROR_NET_ADDR;
goto bail;
}
@@ -251,18 +250,18 @@ static int doRequest(const char *url, httpheader **httpheaderArray, char *body,
addr.inet.port = (PRUint16)port;
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Successfully created NetAddr \n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "doRequest - Successfully created NetAddr \n");
/* open a TCP connection to the server */
fd = PR_NewTCPSocket();
if (!fd) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
- "doRequest: %s\n", HTTP_ERROR_SOCKET_CREATE);
+ slapi_log_error(SLAPI_LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
+ "doRequest - %s\n", HTTP_ERROR_SOCKET_CREATE);
status = HTTP_CLIENT_ERROR_SOCKET_CREATE;
goto bail;
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Successfully created New TCP Socket \n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "doRequest - Successfully created New TCP Socket \n");
/* immediately send the response */
setTCPNoDelay(fd);
@@ -270,16 +269,16 @@ static int doRequest(const char *url, httpheader **httpheaderArray, char *body,
if (sslOn) {
fd = setupSSLSocket(fd);
if (fd == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
- "doRequest: %s\n", HTTP_ERROR_SSLSOCKET_CREATE);
+ slapi_log_error(SLAPI_LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
+ "doRequest - %s\n", HTTP_ERROR_SSLSOCKET_CREATE);
status = HTTP_CLIENT_ERROR_SSLSOCKET_CREATE;
goto bail;
}
if (SSL_SetURL(fd, host) != 0) {
errcode = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
- "doRequest: SSL_SetURL -> NSPR Error code (%d) \n", errcode);
+ slapi_log_error(SLAPI_LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
+ "doRequest - SSL_SetURL -> NSPR Error code (%d) \n", errcode);
status = HTTP_CLIENT_ERROR_SSLSOCKET_CREATE;
goto bail;
}
@@ -290,43 +289,43 @@ 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, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
- "doRequest: %s (%s:%d) -> NSPR Error code (%d)\n",
+ slapi_log_error(SLAPI_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;
goto bail;
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Successfully connected to host [%s] \n",host,0,0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "----------> Successfully connected to host [%s] \n",host,0,0);
/* 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, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
- "doRequest-sendPostReq: %s (%s)\n", HTTP_ERROR_SEND_REQ, path);
+ slapi_log_error(SLAPI_LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
+ "doRequest - sendPostReq: %s (%s)\n", HTTP_ERROR_SEND_REQ, path);
status = HTTP_CLIENT_ERROR_SEND_REQ;
goto bail;
}
}
else {
if (sendGetReq(fd, path) == PR_FAILURE) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
- "doRequest-sendGetReq: %s (%s)\n", HTTP_ERROR_SEND_REQ, path);
+ slapi_log_error(SLAPI_LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
+ "doRequest - sendGetReq: %s (%s)\n", HTTP_ERROR_SEND_REQ, path);
status = HTTP_CLIENT_ERROR_SEND_REQ;
goto bail;
}
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Successfully sent the request [%s] \n",path,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "doRequest - Successfully sent the request [%s] \n",path);
/* read the response */
if (processResponse(fd, buf, bytesRead, reqType) == PR_FAILURE) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
"doRequest: %s (%s)\n", HTTP_ERROR_BAD_RESPONSE, url);
status = HTTP_CLIENT_ERROR_BAD_RESPONSE;
goto bail;
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Successfully read the response\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "doRequest - Successfully read the response\n");
bail:
if (host) {
PR_Free(host);
@@ -338,7 +337,7 @@ bail:
PR_Close(fd);
fd = NULL;
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- doRequest -- END\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "doRequest - END\n");
return status;
}
@@ -368,7 +367,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, LOG_DEBUG, "--> processResponse -- BEGIN\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "processResponse - BEGIN\n");
headers = (char *)PR_Calloc(1, 4 * HTTP_DEFAULT_BUFFER_SIZE);
/* Get protocol string */
@@ -390,7 +389,7 @@ static PRStatus processResponse(PRFileDesc *fd, char **resBUF, int *bytesRead, i
tmp[index] = '\0';
protocol = PL_strdup(tmp);
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> protocol=[%s] \n",protocol,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "processResponse - protocol=[%s] \n",protocol);
/* Get status num */
index = 0;
@@ -412,7 +411,7 @@ static PRStatus processResponse(PRFileDesc *fd, char **resBUF, int *bytesRead, i
statusNum = PL_strdup(tmp);
retcode=atoi(tmp);
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> statusNum=[%s] \n",statusNum,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "processResponse - statusNum=[%s] \n",statusNum);
if (HTTP_RESPONSE_REDIRECT && (reqType == HTTP_REQ_TYPE_REDIRECT)) {
isRedirect = PR_TRUE;
@@ -433,7 +432,7 @@ static PRStatus processResponse(PRFileDesc *fd, char **resBUF, int *bytesRead, i
}
tmp[index] = '\0';
statusString = PL_strdup(tmp);
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> statusString [%s] \n",statusString,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "processResponse - statusString [%s] \n",statusString);
}
/**
@@ -507,7 +506,7 @@ static PRStatus processResponse(PRFileDesc *fd, char **resBUF, int *bytesRead, i
value[index] = '\0';
index = 0;
inName = PR_TRUE;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> name=[%s] value=[%s]\n",name,value,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "processResponse - name=[%s] value=[%s]\n",name,value);
if (isRedirect && !PL_strcasecmp(name,"location")) {
location = PL_strdup(value);
}
@@ -530,7 +529,7 @@ static PRStatus processResponse(PRFileDesc *fd, char **resBUF, int *bytesRead, i
*resBUF = PL_strdup(location);
*bytesRead = strlen(location);
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Response Buffer=[%s] bytesRead=[%d] \n",*resBUF,*bytesRead,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "processResponse - Response Buffer=[%s] bytesRead=[%d] \n",*resBUF,*bytesRead);
bail:
@@ -550,7 +549,7 @@ bail:
PL_strfree(location);
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- processResponse -- END\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "processResponse - END\n");
return status;
}
@@ -602,10 +601,10 @@ static PRStatus sendFullData( PRFileDesc *fd, char *buf, int timeOut)
else
{
errcode = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
- "sendFullData: dataSent=%d bufLen=%d -> NSPR Error code (%d)\n",
+ slapi_log_error(SLAPI_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);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "sendFullData - NSPR Error code (%d) \n", errcode);
return PR_FAILURE;
}
}
@@ -675,7 +674,7 @@ static PRStatus sendPostReq(PRFileDesc *fd, const char *path, httpheader **httph
}
strcat(reqBUF, "\0");
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "---------->reqBUF is %s \n",reqBUF,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM, "sendPostRequest - reqBUF is %s \n",reqBUF);
http_connection_time_out = httpConfig->connectionTimeOut;
status = sendFullData( fd, reqBUF, http_connection_time_out);
@@ -693,8 +692,8 @@ 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, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
- "getChar: NSPR Error code (%d)\n", errcode);
+ slapi_log_error(SLAPI_LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
+ "getChar - NSPR Error code (%d)\n", errcode);
return PR_FAILURE;
}
return PR_SUCCESS;
@@ -963,32 +962,32 @@ 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, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
- "Cannot set socket option NSS \n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ "setupSSLSocket - Cannot set socket option NSS \n");
return NULL;
}
sslSocket = SSL_ImportFD(NULL, fd);
if (!sslSocket) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
- "setupSSLSocket: Cannot import to SSL Socket\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ "setupSSLSocket - Cannot import to SSL Socket\n" );
goto sslbail;
}
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
- "setupSSLSocket: setupssl socket created\n" );
+ slapi_log_error(SLAPI_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, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
- "setupSSLSocket: Cannot set SSL_SECURITY option\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
- "setupSSLSocket: CAnnot set SSL_HANDSHAKE_AS_CLIENT option\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ "setupSSLSocket - CAnnot set SSL_HANDSHAKE_AS_CLIENT option\n");
goto sslbail;
}
@@ -998,7 +997,7 @@ PRFileDesc* setupSSLSocket(PRFileDesc* fd)
(SSLGetClientAuthData) getClientAuthData,
(void *)certNickname);
if (secStatus != SECSuccess) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
"setupSSLSocket: SSL_GetClientAuthDataHook Failed\n");
goto sslbail;
}
@@ -1007,24 +1006,24 @@ PRFileDesc* setupSSLSocket(PRFileDesc* fd)
(SSLAuthCertificate) authCertificate,
(void *)CERT_GetDefaultCertDB());
if (secStatus != SECSuccess) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
- "setupSSLSocket: SSL_AuthCertificateHook Failed\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ "setupSSLSocket - SSL_AuthCertificateHook Failed\n");
goto sslbail;
}
secStatus = SSL_BadCertHook(sslSocket,
(SSLBadCertHandler) badCertHandler, NULL);
if (secStatus != SECSuccess) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
- "setupSSLSocket: SSL_BadCertHook Failed\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ "setupSSLSocket - SSL_BadCertHook Failed\n");
goto sslbail;
}
secStatus = SSL_HandshakeCallback(sslSocket,
(SSLHandshakeCallback) handshakeCallback, NULL);
if (secStatus != SECSuccess) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
- "setupSSLSocket: SSL_HandshakeCallback Failed\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ "setupSSLSocket - SSL_HandshakeCallback Failed\n");
goto sslbail;
}
@@ -1036,7 +1035,7 @@ sslbail:
}
SECStatus
- authCertificate(void *arg, PRFileDesc *socket,
+authCertificate(void *arg, PRFileDesc *socket,
PRBool checksig, PRBool isServer)
{
@@ -1047,8 +1046,8 @@ SECStatus
SECStatus secStatus;
if (!arg || !socket) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
- " authCertificate: Faulty socket in callback function \n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ "authCertificate - Faulty socket in callback function\n");
return SECFailure;
}
@@ -1087,7 +1086,7 @@ SECStatus
}
SECStatus
- badCertHandler(void *arg, PRFileDesc *socket)
+badCertHandler(void *arg, PRFileDesc *socket)
{
SECStatus secStatus = SECFailure;
@@ -1122,8 +1121,8 @@ SECStatus
break;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
- "Bad certificate: %d\n", err);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ "badCertHandler - Bad certificate: %d\n", err);
return secStatus;
}
@@ -1198,10 +1197,10 @@ SECStatus
}
SECStatus
- handshakeCallback(PRFileDesc *socket, void *arg)
+handshakeCallback(PRFileDesc *socket, void *arg)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
- "----------> Handshake has completed, ready to send data securely.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ "handshakeCallback - Handshake has completed, ready to send data securely.\n");
return SECSuccess;
}
@@ -1212,7 +1211,7 @@ SECStatus
int http_impl_init(Slapi_ComponentId *plugin_id)
{
int status = HTTP_IMPL_SUCCESS;
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
"-> http_impl_init \n");
httpConfig = NULL;
@@ -1220,19 +1219,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, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
- "http_impl_start: Unable to get HTTP config information \n");
+ slapi_log_error(SLAPI_LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
+ "http_impl_init - 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, LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
- "http_impl_start: Unable to get config information \n");
+ slapi_log_error(SLAPI_LOG_ERR, HTTP_PLUGIN_SUBSYSTEM,
+ "http_impl_init - Unable to get config information \n");
return HTTP_IMPL_FAILURE;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
"<- http_impl_init \n");
return status;
@@ -1286,15 +1285,15 @@ 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, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
- "readConfigLDAPurl: Could not find entry %s (error %d)\n", plugindn, rc);
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, HTTP_PLUGIN_SUBSYSTEM,
- "readConfigLDAPurl: No entries found for <%s>\n", plugindn);
+ slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
+ "readConfigLDAPurl - No entries found for <%s>\n", plugindn);
status = HTTP_IMPL_FAILURE;
return status;
@@ -1343,7 +1342,7 @@ static int parseHTTPConfigEntry(Slapi_Entry *e)
httpConfig->connectionTimeOut = value;
}
else {
- 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);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "parseHTTPConfigEntry - HTTP Connection Time Out cannot be read. Setting to default value of 5000 ms \n", 0,0,0);
httpConfig->connectionTimeOut = 5000;
}
@@ -1353,7 +1352,7 @@ static int parseHTTPConfigEntry(Slapi_Entry *e)
httpConfig->readTimeOut = value;
}
else {
- 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);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "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/linkedattrs/fixup_task.c b/ldap/servers/plugins/linkedattrs/fixup_task.c
index 99d8aca..befc6cd 100644
--- a/ldap/servers/plugins/linkedattrs/fixup_task.c
+++ b/ldap/servers/plugins/linkedattrs/fixup_task.c
@@ -71,8 +71,8 @@ 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "unable to create task thread!\n");
+ slapi_log_error(SLAPI_LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_fixup_task_add - Unable to create task thread!\n");
*returncode = LDAP_OPERATIONS_ERROR;
slapi_task_finish(task, *returncode);
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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,9 +128,9 @@ 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "Syntax validate task starting (link dn: \"%s\") ...\n",
- td->linkdn ? td->linkdn : "");
+ slapi_log_error(SLAPI_LOG_INFO, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_fixup_task_thread - Syntax validate task starting (link dn: \"%s\") ...\n",
+ td->linkdn ? td->linkdn : "");
linked_attrs_read_lock();
main_config = linked_attrs_get_config();
@@ -147,8 +147,8 @@ 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "Fixing up linked attribute pair (%s)\n", config_entry->dn);
+ slapi_log_error(SLAPI_LOG_INFO, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_fixup_task_thread - Fixing up linked attribute pair (%s)\n", config_entry->dn);
linked_attrs_fixup_links(config_entry);
break;
@@ -157,8 +157,8 @@ 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "Fixing up linked attribute pair (%s)\n", config_entry->dn);
+ slapi_log_error(SLAPI_LOG_INFO, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_fixup_task_thread - Fixing up linked attribute pair (%s)\n", config_entry->dn);
linked_attrs_fixup_links(config_entry);
}
@@ -171,8 +171,8 @@ 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "Requested link config DN not found (%s)\n", td->linkdn);
+ slapi_log_error(SLAPI_LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_fixup_task_thread - Requested link config DN not found (%s)\n", td->linkdn);
}
linked_attrs_unlock();
@@ -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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM, "Linked attributes fixup task complete.\n");
+ slapi_log_error(SLAPI_LOG_INFO, LINK_PLUGIN_SUBSYSTEM, "linked_attrs_fixup_task_thread - 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_fixup_task_thread <-- refcount decremented.\n");
}
@@ -219,12 +219,12 @@ 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_fixup_links: failed to start transaction\n");
+ slapi_log_error(SLAPI_LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_fixup_links - Failed to start transaction\n");
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_fixup_links: failed to get be backend from %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_fixup_link - 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_fixup_links: failed to start transaction\n");
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
"linked_attrs_fixup_links: failed to get be backend from %s\n",
slapi_sdn_get_dn(config->suffix));
}
@@ -361,8 +361,8 @@ linked_attrs_remove_backlinks_callback(Slapi_Entry *e, void *callback_data)
mods[0] = &mod;
mods[1] = 0;
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
- "Removing backpointer attribute (%s) from entry (%s)\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_remove_backlinks_callback - Removing backpointer attribute (%s) from entry (%s)\n",
type, slapi_sdn_get_dn(sdn));
/* Perform the operation. */
@@ -436,8 +436,8 @@ linked_attrs_add_backlinks_callback(Slapi_Entry *e, void *callback_data)
}
if (perform_update) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
- "Adding backpointer (%s) in entry (%s)\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_add_backlinks_callback - Adding backpointer (%s) in entry (%s)\n",
linkdn, targetdn);
/* Perform the modify operation. */
diff --git a/ldap/servers/plugins/linkedattrs/linked_attrs.c b/ldap/servers/plugins/linkedattrs/linked_attrs.c
index e29442f..0f761dd 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_init\n");
if ((slapi_pblock_get(pb, SLAPI_PLUGIN_CONFIG_ENTRY, &plugin_entry) == 0) &&
@@ -178,8 +178,8 @@ 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_init: failed to register plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_init - Failed to register plugin\n");
status = -1;
}
@@ -192,8 +192,8 @@ linked_attrs_init(Slapi_PBlock *pb)
NULL, /* ? */
plugin_identity /* access control */
)) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_init: failed to register internalpostoperation plugin\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_init: failed to register postop plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_init - Failed to register postop plugin\n");
status = -1;
}
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
"<-- linked_attrs_init\n");
return status;
}
@@ -239,8 +239,8 @@ 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_internal_postop_init: failed to register plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_internal_postop_init - Failed to register plugin\n");
status = -1;
}
@@ -271,8 +271,8 @@ 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_postop_init: failed to register plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_postop_init - Failed to register plugin\n");
status = -1;
}
@@ -290,14 +290,14 @@ linked_attrs_start(Slapi_PBlock * pb)
{
Slapi_DN *plugindn = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_start\n");
g_config_lock = slapi_new_rwlock();
if (!g_config_lock) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_start: lock creation failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_start - Lock creation failed\n");
return -1;
}
@@ -307,8 +307,8 @@ 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_start: unable to retrieve plugin dn\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_start - Unable to retrieve plugin dn\n");
return -1;
}
@@ -323,8 +323,8 @@ 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_start: unable to load plug-in configuration\n");
+ slapi_log_error(SLAPI_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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
- "linked attributes plug-in: ready for service\n");
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_start: ready for service\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_parse_config_entry: Error "
+ slapi_log_error(SLAPI_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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, LINK_PLUGIN_SUBSYSTEM,
"----------> dn [%s]\n", entry->dn);
value = slapi_entry_attr_get_charptr(e, LINK_LINK_TYPE);
@@ -502,23 +502,23 @@ 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_parse_config_entry: The %s config "
+ slapi_log_error(SLAPI_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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_parse_config_entry: The %s config "
+ slapi_log_error(SLAPI_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);
ret = -1;
goto bail;
}
- slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
- "----------> %s [%s]\n", LINK_LINK_TYPE, entry->linktype);
+ slapi_log_error(SLAPI_LOG_CONFIG, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_parse_config_entry - %s [%s]\n", LINK_LINK_TYPE, entry->linktype);
value = slapi_entry_attr_get_charptr(e, LINK_MANAGED_TYPE);
if (value) {
@@ -540,8 +540,8 @@ 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_parse_config_entry: The %s config "
+ slapi_log_error(SLAPI_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",
LINK_MANAGED_TYPE, entry->dn);
@@ -550,23 +550,23 @@ 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_parse_config_entry: The %s config "
+ slapi_log_error(SLAPI_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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_parse_config_entry: The %s config "
+ slapi_log_error(SLAPI_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);
ret = -1;
goto bail;
}
- slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
- "----------> %s [%s]\n", LINK_MANAGED_TYPE,
+ slapi_log_error(SLAPI_LOG_CONFIG, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_parse_config_entry - %s [%s]\n", LINK_MANAGED_TYPE,
entry->managedtype);
/* A scope is not required. No scope means it
@@ -576,15 +576,15 @@ linked_attrs_parse_config_entry(Slapi_Entry * e, int apply)
entry->scope = value;
}
- slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_parse_config_entry: A config "
+ slapi_log_error(SLAPI_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,
entry->scope);
@@ -595,8 +595,8 @@ 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_parse_config_entry: A config "
+ slapi_log_error(SLAPI_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,
entry->scope);
@@ -613,8 +613,8 @@ 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_parse_config_entry: Unable to create "
+ slapi_log_error(SLAPI_LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_parse_config_entry - Unable to create "
"lock for linked attribute pair \"%s\".\n", entry->dn);
ret = -1;
goto bail;
@@ -631,8 +631,8 @@ 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
- "store [%s] before [%s] \n", entry->dn,
+ slapi_log_error(SLAPI_LOG_CONFIG, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_parse_config_entry - store [%s] before [%s] \n", entry->dn,
config_entry->dn);
/* add to managed type index */
@@ -647,8 +647,8 @@ 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
- "store [%s] at tail\n", entry->dn);
+ slapi_log_error(SLAPI_LOG_CONFIG, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_parse_config_entry - store [%s] at tail\n", entry->dn);
/* add to managed type index */
linked_attrs_insert_config_index(entry);
@@ -660,8 +660,8 @@ 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
- "store [%s] at head \n", entry->dn);
+ slapi_log_error(SLAPI_LOG_CONFIG, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_parse_config_entry - store [%s] at head \n", entry->dn);
/* add to managed type index */
linked_attrs_insert_config_index(entry);
@@ -673,8 +673,8 @@ 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_parse_config_entry: Invalid config entry "
+ slapi_log_error(SLAPI_LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_parse_config_entry - Invalid config entry "
"[%s] skipped\n", entry->dn);
}
linked_attrs_free_config_entry(&entry);
@@ -682,7 +682,7 @@ linked_attrs_parse_config_entry(Slapi_Entry * e, int apply)
ret = 0;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
"<-- linked_attrs_parse_config_entry\n");
return ret;
@@ -716,8 +716,8 @@ 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
- "store [%s] before [%s] \n", entry->dn,
+ slapi_log_error(SLAPI_LOG_CONFIG, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_insert_config_index - store [%s] before [%s] \n", entry->dn,
config_entry->dn);
inserted = 1;
break;
@@ -728,16 +728,16 @@ 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
- "store [%s] at tail\n", entry->dn);
+ slapi_log_error(SLAPI_LOG_CONFIG, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_insert_config_index - store [%s] at tail\n", entry->dn);
inserted = 1;
break;
}
}
} else {
/* first entry */
- slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
- "store [%s] at head \n", entry->dn);
+ slapi_log_error(SLAPI_LOG_CONFIG, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_insert_config_index - store [%s] at head \n", entry->dn);
PR_INSERT_LINK(&(index_entry->list), g_managed_config_index);
inserted = 1;
}
@@ -755,8 +755,8 @@ linked_attrs_free_config_entry(struct configEntry ** entry)
return;
if (e->dn) {
- slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
- "freeing config entry [%s]\n", e->dn);
+ slapi_log_error(SLAPI_LOG_CONFIG, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_free_config_entry - 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_get_dn\n");
if (slapi_pblock_get(pb, SLAPI_TARGET_SDN, &sdn)) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_get_dn: failed to get dn of changed entry");
+ slapi_log_error(SLAPI_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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_get_sdn\n");
slapi_pblock_get(pb, SLAPI_TARGET_SDN, &sdn);
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
"<-- linked_attrs_dn_is_config\n");
return ret;
@@ -1140,13 +1140,13 @@ linked_attrs_oktodo(Slapi_PBlock *pb)
int ret = 1;
int oprc = 0;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_oktodo\n" );
if(slapi_pblock_get(pb, SLAPI_PLUGIN_OPRETURN, &oprc) != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_oktodo: could not get parameters\n" );
+ slapi_log_error(SLAPI_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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
"<-- linked_attrs_oktodo\n" );
return ret;
@@ -1453,8 +1453,8 @@ linked_attrs_mod_backpointers(Slapi_PBlock *pb, char *linkdn, char *type,
}
if (perform_update) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
- "%s backpointer (%s) in entry (%s)\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_mod_backpointers - %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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "Linked Attrs Plugin: Failed to update link to target entry (%s) error %d",
+ slapi_log_error(SLAPI_LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_mod_backpointers - Failed to update link to target entry (%s) error %d",
targetdn, rc);
- err_msg = PR_smprintf("Linked Attrs Plugin: Failed to update "
+ err_msg = PR_smprintf("linked_attrs_mod_backpointers - Failed to update "
"link to target entry (%s) error %d",
targetdn, rc);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM, "%s\n", err_msg);
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_pre_op\n");
if (0 == (dn = linked_attrs_get_dn(pb)))
@@ -1595,15 +1595,15 @@ linked_attrs_pre_op(Slapi_PBlock * pb, int modop)
slapi_entry_free(e);
if (ret) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_pre_op: operation failure [%d]\n", ret);
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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);
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &ret);
ret = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_mod_post_op\n");
/* We don't want to process internal modify
@@ -1702,16 +1702,16 @@ 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_mod_post_op: unknown mod type\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_mod_post_op - Unknown mod type\n" );
rc = SLAPI_PLUGIN_FAILURE;
break;
}
slapi_unlock_mutex(config->lock);
if(rc != LDAP_SUCCESS){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_mod_post_op - update failed (%d)\n",rc);
+ slapi_log_error(SLAPI_LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_mod_post_op - Update failed (%d)\n",rc);
linked_attrs_unlock();
slapi_mod_done(next_mod);
break;
@@ -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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_add_post_op\n");
/* Reload config if a config entry was added. */
@@ -1754,8 +1754,8 @@ 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_add_post_op: Error "
+ slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_add_post_op - Error "
"retrieving dn\n");
}
@@ -1795,8 +1795,8 @@ 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_add_post_op: update failed (%d)\n",rc);
+ slapi_log_error(SLAPI_LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_add_post_op - Update failed (%d)\n",rc);
linked_attrs_unlock();
break;
}
@@ -1808,8 +1808,8 @@ linked_attrs_add_post_op(Slapi_PBlock *pb)
slapi_entry_next_attr(e, attr, &attr);
}
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_add_post_op: Error "
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_del_post_op\n");
/* Just bail if we aren't ready to service requests yet. */
@@ -1843,8 +1843,8 @@ 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_del_post_op: Error "
+ slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_del_post_op - Error "
"retrieving dn\n");
}
@@ -1884,8 +1884,8 @@ 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_del_post_op - update failed (%d)\n",rc);
+ slapi_log_error(SLAPI_LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_del_post_op - Update failed (%d)\n",rc);
linked_attrs_unlock();
break;
}
@@ -1919,8 +1919,8 @@ linked_attrs_del_post_op(Slapi_PBlock *pb)
slapi_valueset_free(vals);
config = NULL;
if(rc != LDAP_SUCCESS){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_del_post_op: update failed (%d)\n",rc);
+ slapi_log_error(SLAPI_LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_del_post_op - Update failed (%d)\n",rc);
linked_attrs_unlock();
goto bail;
}
@@ -1935,8 +1935,8 @@ linked_attrs_del_post_op(Slapi_PBlock *pb)
slapi_entry_next_attr(e, attr, &attr);
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_del_post_op: Error "
+ slapi_log_error(SLAPI_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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_modrdn_post_op\n");
/* Just bail if we aren't ready to service requests yet. */
@@ -1978,8 +1978,8 @@ 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_modrdn_post_op: Error "
+ slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_modrdn_post_op - Error "
"retrieving post-op entry\n");
rc = LDAP_OPERATIONS_ERROR;
goto done;
@@ -1989,8 +1989,8 @@ 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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_modrdn_post_op: Error "
+ slapi_log_error(SLAPI_LOG_PLUGIN, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_modrdn_post_op - Error "
"retrieving dn\n");
rc = LDAP_OPERATIONS_ERROR;
goto done;
@@ -2028,8 +2028,8 @@ linked_attrs_modrdn_post_op(Slapi_PBlock *pb)
slapi_valueset_free(vals);
config = NULL;
if(rc != LDAP_SUCCESS){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_modrdn_post_op: update failed(old type) (%d)\n",rc);
+ slapi_log_error(SLAPI_LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_modrdn_post_op - Update failed(old type) (%d)\n",rc);
linked_attrs_unlock();
break;
}
@@ -2055,8 +2055,8 @@ linked_attrs_modrdn_post_op(Slapi_PBlock *pb)
slapi_valueset_free(vals);
config = NULL;
if(rc != LDAP_SUCCESS){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_modrdn_post_op: update failed(new type) (%d)\n",rc);
+ slapi_log_error(SLAPI_LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ "linked_attrs_modrdn_post_op - Update failed(new type) (%d)\n",rc);
linked_attrs_unlock();
break;
}
@@ -2085,8 +2085,8 @@ 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_modrdn_post_op: update failed(old dn) (%d)\n",rc);
+ slapi_log_error(SLAPI_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);
linked_attrs_unlock();
@@ -2101,8 +2101,8 @@ linked_attrs_modrdn_post_op(Slapi_PBlock *pb)
slapi_valueset_free(vals);
config = NULL;
if(rc != LDAP_SUCCESS){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
- "linked_attrs_modrdn_post_op: update failed(new dn) (%d)\n",rc);
+ slapi_log_error(SLAPI_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, LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"<==== Linked Attribute Pair =====>\n");
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"<---- config entry dn -----> %s\n", entry->dn);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"<---- link type -----------> %s\n", entry->linktype);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_DEBUG, LINK_PLUGIN_SUBSYSTEM,
"<---- managed type --------> %s\n", entry->managedtype);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, LINK_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_DEBUG, 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 8c3a6ad..f796f3a 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, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
"--> memberof_postop_init\n" );
/* get args */
@@ -227,14 +227,14 @@ memberof_postop_init(Slapi_PBlock *pb)
NULL, /* ? */
memberof_plugin_identity /* access control */))
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_postop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_postop_init - Failed\n" );
ret = -1;
}
else if (ret)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_postop_init failed\n" );
+ slapi_log_error(SLAPI_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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_preop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_preop_init - Failed\n" );
ret = -1;
}
else if (ret)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_preop_init failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_preop_init - Failed\n");
ret = -1;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
"<-- memberof_postop_init\n" );
return ret;
@@ -274,8 +274,8 @@ 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_internal_postop_init: failed to register plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_preop_init: Failed to register plugin\n");
status = -1;
}
@@ -299,8 +299,8 @@ 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_internal_postop_init: failed to register plugin\n");
+ slapi_log_error(SLAPI_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, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
"--> memberof_postop_start\n" );
memberof_operation_lock = PR_NewMonitor();
@@ -350,8 +350,8 @@ 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, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_postop_start: Config entry \"%s\" does "
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_postop_start - Config entry \"%s\" does "
"not exist.\n", config_area);
rc = -1;
goto bail;
@@ -361,8 +361,8 @@ int memberof_postop_start(Slapi_PBlock *pb)
if(entries && entries[0]){
config_e = entries[0];
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_postop_start: Config entry \"%s\" was "
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_postop_start - Config entry \"%s\" was "
"not located.\n", config_area);
rc = -1;
goto bail;
@@ -371,8 +371,8 @@ 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "missing config entry\n" );
+ slapi_log_error(SLAPI_LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_postop_start - Missing config entry\n" );
rc = -1;
goto bail;
}
@@ -380,8 +380,8 @@ 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "configuration failed (%s)\n", ldap_err2string( rc ));
+ slapi_log_error(SLAPI_LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_postop_start - 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, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
"--> memberof_postop_del\n" );
/* We don't want to process internal modify
@@ -529,8 +529,8 @@ 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_postop_del: error deleting dn (%s) from group. Error (%d)\n",
+ slapi_log_error(SLAPI_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();
goto bail;
@@ -548,8 +548,8 @@ 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_postop_del: error deleting attr list - dn (%s). Error (%d)\n",
+ slapi_log_error(SLAPI_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, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
"--> memberof_postop_modrdn\n" );
/* We don't want to process internal modify
@@ -866,8 +866,8 @@ 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_postop_modrdn - update failed for (%s), error (%d)\n",
+ slapi_log_error(SLAPI_LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_postop_modrdn - Update failed for (%s), error (%d)\n",
slapi_sdn_get_dn(pre_sdn), ret);
break;
}
@@ -881,8 +881,8 @@ 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_postop_modrdn - delete dn failed for (%s), error (%d)\n",
+ slapi_log_error(SLAPI_LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_postop_modrdn - Delete dn failed for (%s), error (%d)\n",
slapi_sdn_get_dn(pre_sdn), ret);
}
if(ret == LDAP_SUCCESS && pre_e && configCopy.group_filter &&
@@ -896,8 +896,8 @@ 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_postop_modrdn: error deleting attr list - dn (%s). Error (%d)\n",
+ slapi_log_error(SLAPI_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,15 +907,15 @@ 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_postop_modrdn - delete dn callback failed for (%s), error (%d)\n",
+ slapi_log_error(SLAPI_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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_postop_modrdn - replace dn failed for (%s), error (%d)\n",
+ slapi_log_error(SLAPI_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, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM, "%s", returntext);
+ slapi_log_error(SLAPI_LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM, "%s", returntext);
ret = SLAPI_PLUGIN_FAILURE;
goto done;
}
@@ -1134,8 +1134,8 @@ 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_postop_modify: failed to add dn (%s) to target. "
+ slapi_log_error(SLAPI_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);
memberof_unlock();
@@ -1153,8 +1153,8 @@ 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_postop_modify: failed to replace list (%s). "
+ slapi_log_error(SLAPI_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);
memberof_unlock();
@@ -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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_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,8 +1180,8 @@ int memberof_postop_modify(Slapi_PBlock *pb)
{
/* replace current values */
if((ret = memberof_replace_list(pb, &configCopy, sdn))){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_postop_modify: failed to replace values in dn (%s). "
+ slapi_log_error(SLAPI_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);
memberof_unlock();
@@ -1193,10 +1193,9 @@ int memberof_postop_modify(Slapi_PBlock *pb)
default:
{
slapi_log_error(
- SLAPI_LOG_FATAL,
- LOG_ERR,
+ SLAPI_LOG_ERR,
MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_postop_modify: unknown mod type\n" );
+ "memberof_postop_modify - Unknown mod type\n" );
ret = SLAPI_PLUGIN_FAILURE;
break;
}
@@ -1224,7 +1223,7 @@ done:
ret = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
"<-- memberof_postop_modify\n" );
return ret;
}
@@ -1243,7 +1242,7 @@ int memberof_postop_add(Slapi_PBlock *pb)
Slapi_DN *sdn = 0;
void *caller_id = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
"--> memberof_postop_add\n" );
/* We don't want to process internal modify
@@ -1290,8 +1289,8 @@ 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_postop_add: failed to add dn(%s), error (%d)\n",
+ slapi_log_error(SLAPI_LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_postop_add - Failed to add dn(%s), error (%d)\n",
slapi_sdn_get_dn(sdn), ret);
break;
}
@@ -1309,7 +1308,7 @@ bail:
ret = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
"<-- memberof_postop_add\n" );
return ret;
@@ -1332,8 +1331,8 @@ int memberof_oktodo(Slapi_PBlock *pb)
int ret = 1;
int oprc = 0;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
- "--> memberof_postop_oktodo\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "--> memberof_oktodo\n" );
if (!slapi_plugin_running(pb)) {
ret = 0;
@@ -1342,8 +1341,8 @@ int memberof_oktodo(Slapi_PBlock *pb)
if(slapi_pblock_get(pb, SLAPI_PLUGIN_OPRETURN, &oprc) != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_postop_oktodo: could not get parameters\n" );
+ slapi_log_error(SLAPI_LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_oktodo - Could not get parameters\n" );
ret = -1;
}
@@ -1354,8 +1353,8 @@ int memberof_oktodo(Slapi_PBlock *pb)
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
- "<-- memberof_postop_oktodo\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "<-- memberof_oktodo\n" );
return ret;
}
@@ -1469,15 +1468,15 @@ 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_modop_one_replace_r: failed to get DN value from "
+ slapi_log_error(SLAPI_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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_modop_one_replace_r: failed to get DN value from"
+ slapi_log_error(SLAPI_LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_modop_one_replace_r - Failed to get DN value from"
"group (%s)\n", udn);
goto bail;
}
@@ -1486,8 +1485,8 @@ 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_modop_one_replace_r: NULL config parameter\n");
+ slapi_log_error(SLAPI_LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_modop_one_replace_r - NULL config parameter\n");
goto bail;
}
@@ -1547,8 +1546,8 @@ 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_modop_one_replace_r: error searching for members: %d\n", res);
+ slapi_log_error(SLAPI_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);
if(n_entries > 0)
@@ -1593,8 +1592,8 @@ memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig *config,
op_str = "UNKNOWN";
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_modop_one_replace_r: %s %s in %s\n"
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_modop_one_replace_r - %s %s in %s\n"
,op_str, op_this, op_to);
if(config->group_filter && 0 == slapi_filter_test_simple(e, config->group_filter))
@@ -1619,9 +1618,9 @@ memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig *config,
/* someone set up infinitely
recursive groups - bail out */
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_modop_one_replace_r: group recursion"
+ "memberof_modop_one_replace_r - Group recursion"
" detected in %s\n"
,op_to);
goto bail;
@@ -1632,9 +1631,9 @@ memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig *config,
}
/* do op on group */
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_modop_one_replace_r: descending into group %s\n",
+ "memberof_modop_one_replace_r - Descending into group %s\n",
op_to);
/* Add the nested group's DN to the stack so we can detect loops later. */
ll = (memberofstringll*)slapi_ch_malloc(sizeof(memberofstringll));
@@ -1655,7 +1654,7 @@ memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig *config,
}
{
- /* crazyness follows:
+ /* Craziness follows:
* strict-aliasing doesn't like the required cast
* to void for slapi_ch_free so we are made to
* juggle to get a normal thing done
@@ -1676,9 +1675,9 @@ 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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_modop_one_replace_r: not processing memberOf "
+ "memberof_modop_one_replace_r - Not processing memberOf "
"operations on self entry: %s\n", strval);
goto bail;
}
@@ -2075,8 +2074,8 @@ int memberof_get_groups_callback(Slapi_Entry *e, void *callback_data)
if (!groupvals || !group_norm_vals)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_get_groups_callback: NULL groupvals or group_norm_vals\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_get_groups_callback - NULL groupvals or group_norm_vals\n");
rc = -1;
goto bail;
@@ -2093,8 +2092,8 @@ 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, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_get_groups_callback: group recursion"
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_get_groups_callback - Group recursion"
" detected in %s\n" ,group_ndn);
slapi_value_free(&group_ndn_val);
goto bail;
@@ -2112,8 +2111,8 @@ 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, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_get_groups_callback: possible group recursion"
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_get_groups_callback - Possible group recursion"
" detected in %s\n" ,group_ndn);
slapi_value_free(&group_ndn_val);
goto bail;
@@ -2645,8 +2644,8 @@ void memberof_fixup_task_thread(void *arg)
return; /* no task */
}
slapi_task_inc_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_fixup_task_thread --> refcount incremented.\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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);
@@ -2656,8 +2655,8 @@ 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "Memberof task starts (arg: %s) ...\n", td->filter_str);
+ slapi_log_error(SLAPI_LOG_INFO, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_fixup_task_thread - Memberof task starts (arg: %s) ...\n", td->filter_str);
/* We need to get the config lock first. Trying to get the
* config lock after we already hold the op lock can cause
@@ -2679,12 +2678,12 @@ 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_fixup_task_thread: failed to start transaction\n");
+ slapi_log_error(SLAPI_LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_fixup_task_thread - Failed to start transaction\n");
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_fixup_task_thread: failed to get be backend from %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_fixup_task_thread - Failed to get be backend from %s\n",
td->dn);
}
}
@@ -2711,14 +2710,14 @@ 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "Memberof task finished (arg: %s) ...\n", td->filter_str);
+ slapi_log_error(SLAPI_LOG_INFO, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_fixup_task_thread - 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, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
- "memberof_fixup_task_thread <-- refcount decremented.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_fixup_task_thread - refcount decremented.\n");
}
/* extract a single value from the entry (as a string) -- if it's not in the
@@ -2794,7 +2793,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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
"unable to create task thread!\n");
*returncode = LDAP_OPERATIONS_ERROR;
slapi_task_finish(task, *returncode);
@@ -2810,7 +2809,7 @@ out:
void
memberof_task_destructor(Slapi_Task *task)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_task_destructor -->\n" );
if (task) {
task_data *mydata = (task_data *)slapi_task_get_data(task);
@@ -2826,7 +2825,7 @@ memberof_task_destructor(Slapi_Task *task)
slapi_ch_free((void **)&mydata);
}
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEMBEROF_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM,
"memberof_task_destructor <--\n" );
}
@@ -2993,8 +2992,8 @@ 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "Failed to add objectclass (%s) to entry (%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_add_objectclass - Failed to add objectclass (%s) to entry (%s)\n",
auto_add_oc, dn);
}
slapi_pblock_destroy(mod_pb);
diff --git a/ldap/servers/plugins/memberof/memberof_config.c b/ldap/servers/plugins/memberof/memberof_config.c
index 556f362..9dac108 100644
--- a/ldap/servers/plugins/memberof/memberof_config.c
+++ b/ldap/servers/plugins/memberof/memberof_config.c
@@ -89,8 +89,8 @@ memberof_config(Slapi_Entry *config_e, Slapi_PBlock *pb)
char returntext[SLAPI_DSE_RETURNTEXT_SIZE];
if ( inited ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "only one memberOf plugin instance can be used\n" );
+ slapi_log_error(SLAPI_LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_config - Only one memberOf plugin instance can be used\n" );
return( LDAP_PARAM_ERROR );
}
@@ -130,9 +130,9 @@ memberof_config(Slapi_Entry *config_e, Slapi_PBlock *pb)
inited = 1;
if (returncode != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "Error %d: %s\n", returncode, returntext);
- }
+ slapi_log_error(SLAPI_LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_config - Error %d: %s\n", returncode, returntext);
+ }
return returncode;
}
@@ -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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM, "memberof_validate_config: "
+ slapi_log_error(SLAPI_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;
@@ -481,9 +481,9 @@ memberof_apply_config (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
} else {
/* This should of been checked in preop validation */
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE,
- "memberof_apply_config: Failed to locate shared config entry (%s)",
+ "memberof_apply_config - Failed to locate shared config entry (%s)",
sharedcfg);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,"%s\n",returntext);
+ slapi_log_error(SLAPI_LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,"%s\n",returntext);
*returncode = LDAP_UNWILLING_TO_PERFORM;
goto done;
}
@@ -586,8 +586,8 @@ 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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
- "Unable to create the group check filter. The memberOf "
+ slapi_log_error(SLAPI_LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM,
+ "memberof_apply_config - 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",
MEMBEROF_GROUP_ATTR, filter_str );
@@ -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, LOG_ERR, MEMBEROF_PLUGIN_SUBSYSTEM, "memberof_shared_config_validate: %s/n",
+ slapi_log_error(SLAPI_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 2237868..1c4aed8 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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"--> mep_init\n");
if ((slapi_pblock_get(pb, SLAPI_PLUGIN_CONFIG_ENTRY, &plugin_entry) == 0) &&
@@ -193,8 +193,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_init: failed to register plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_init - Failed to register plugin\n");
status = -1;
}
@@ -207,8 +207,8 @@ mep_init(Slapi_PBlock *pb)
NULL, /* ? */
plugin_identity /* access control */
)) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_init: failed to register internalpostoperation plugin\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_init: failed to register plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_init - Failed to register plugin\n");
status = -1;
}
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"<-- mep_init\n");
return status;
}
@@ -251,8 +251,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_internal_postop_init: failed to register plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_internal_postop_init - Failed to register plugin\n");
status = -1;
}
@@ -283,8 +283,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_postop_init: failed to register plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_postop_init - Failed to register plugin\n");
status = -1;
}
@@ -303,14 +303,14 @@ mep_start(Slapi_PBlock * pb)
Slapi_DN *plugindn = NULL;
char *config_area = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"--> mep_start\n");
g_mep_config_lock = slapi_new_rwlock();
if (!g_mep_config_lock) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_start: lock creation failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_start - Lock creation failed\n");
return -1;
}
@@ -320,8 +320,8 @@ 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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "mep_start: unable to retrieve plugin dn\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_start: unable to load plug-in configuration\n");
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_start - Unable to load plug-in configuration\n");
return -1;
}
- 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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ "mep_start - Ready for service\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"--> mep_load_config\n");
/* Clear out any old config. */
@@ -413,16 +413,16 @@ 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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "mep_load_config: Looking for config entries "
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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()),
LDAP_SCOPE_SUBTREE, "objectclass=*",
NULL, 0, NULL, NULL, mep_get_plugin_id(), 0);
} else {
/* Find the config entries beneath our plugin entry. */
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "mep_load_config: Looking for config entries "
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ "mep_load_config - Looking for config entries "
"beneath \"%s\".\n",
slapi_sdn_get_ndn(mep_get_plugin_sdn()));
slapi_search_internal_set_pb(search_pb,
@@ -436,8 +436,8 @@ mep_load_config(void)
if (LDAP_SUCCESS != result) {
if (mep_get_config_area() && (result == LDAP_NO_SUCH_OBJECT)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "mep_load_config: Config container \"%s\" does "
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ "mep_load_config - Config container \"%s\" does "
"not exist.\n", slapi_sdn_get_ndn(mep_get_config_area()));
goto cleanup;
} else {
@@ -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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_config_entry: Error "
+ slapi_log_error(SLAPI_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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_CONFIG, MEP_PLUGIN_SUBSYSTEM,
"----------> dn [%s]\n", slapi_sdn_get_dn(entry->sdn));
/* Load the origin scope */
@@ -522,8 +522,8 @@ mep_parse_config_entry(Slapi_Entry * e, int apply)
if (value) {
entry->origin_scope = value;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_config_entry: The %s config "
+ slapi_log_error(SLAPI_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));
ret = -1;
@@ -535,8 +535,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM ,
- "mep_parse_config_entry: Invalid search filter in "
+ slapi_log_error(SLAPI_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);
ret = -1;
@@ -548,8 +548,8 @@ mep_parse_config_entry(Slapi_Entry * e, int apply)
goto bail;
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_config_entry: The %s config "
+ slapi_log_error(SLAPI_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));
ret = -1;
@@ -561,8 +561,8 @@ mep_parse_config_entry(Slapi_Entry * e, int apply)
if (value) {
entry->managed_base = value;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_config_entry: The %s config "
+ slapi_log_error(SLAPI_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));
ret = -1;
@@ -582,8 +582,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_config_entry: The managed entry "
+ slapi_log_error(SLAPI_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 "
"config entry \"%s\"\n", slapi_sdn_get_dn(entry->template_sdn),
@@ -596,8 +596,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_config_entry: Unable to create "
+ slapi_log_error(SLAPI_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 "
"entry for errors.\n", slapi_sdn_get_dn(entry->template_sdn));
@@ -607,8 +607,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_config_entry: Test managed "
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_parse_config_entry - Test managed "
"entry created from managed entry template "
"\"%s\" violates the schema. Please check "
"the template entry for schema errors.\n",
@@ -627,8 +627,8 @@ mep_parse_config_entry(Slapi_Entry * e, int apply)
slapi_entry_free(test_entry);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_config_entry: The %s config "
+ slapi_log_error(SLAPI_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));
ret = -1;
@@ -652,8 +652,8 @@ 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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "store [%s] before [%s] \n", slapi_sdn_get_dn(entry->sdn),
+ slapi_log_error(SLAPI_LOG_CONFIG, MEP_PLUGIN_SUBSYSTEM,
+ "mep_parse_config_entry - store [%s] before [%s] \n", slapi_sdn_get_dn(entry->sdn),
slapi_sdn_get_dn(config_entry->sdn));
entry_added = 1;
@@ -665,8 +665,8 @@ 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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "store [%s] at tail\n", slapi_sdn_get_dn(entry->sdn));
+ slapi_log_error(SLAPI_LOG_CONFIG, MEP_PLUGIN_SUBSYSTEM,
+ "mep_parse_config_entry - store [%s] at tail\n", slapi_sdn_get_dn(entry->sdn));
entry_added = 1;
break;
@@ -675,8 +675,8 @@ 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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "store [%s] at head \n", slapi_sdn_get_dn(entry->sdn));
+ slapi_log_error(SLAPI_LOG_CONFIG, MEP_PLUGIN_SUBSYSTEM,
+ "mep_parse_config_entry - store [%s] at head \n", slapi_sdn_get_dn(entry->sdn));
entry_added = 1;
}
@@ -685,8 +685,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_config_entry: Invalid config entry "
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_parse_config_entry - Invalid config entry "
"[%s] skipped\n", slapi_sdn_get_dn(entry->sdn));
}
mep_free_config_entry(&entry);
@@ -694,7 +694,7 @@ mep_parse_config_entry(Slapi_Entry * e, int apply)
ret = 0;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"<-- mep_parse_config_entry\n");
return ret;
@@ -709,8 +709,8 @@ mep_free_config_entry(struct configEntry ** entry)
return;
if (e->sdn) {
- slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "freeing config entry [%s]\n", slapi_sdn_get_dn(e->sdn));
+ slapi_log_error(SLAPI_LOG_CONFIG, MEP_PLUGIN_SUBSYSTEM,
+ "mep_free_config_entry - Freeing config entry [%s]\n", slapi_sdn_get_dn(e->sdn));
slapi_sdn_free(&e->sdn);
}
@@ -789,8 +789,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_mapped_origin_attr: Value for mapped attribute "
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_parse_mapped_origin_attr - Value for mapped attribute "
"is not in the correct format. (value: \"%s\").\n",
mapping);
ret = 1;
@@ -799,8 +799,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_mapped_origin_attr: Value for mapped attribute "
+ slapi_log_error(SLAPI_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",
mapping);
@@ -824,8 +824,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_mapped_origin_attr: Invalid mapped "
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_parse_mapped_origin_attr - Invalid mapped "
"attribute value for type \"%s\".\n", mapping);
ret = 1;
goto bail;
@@ -853,8 +853,8 @@ mep_parse_mapped_origin_attr(char *mapping, char **origin_type)
if (p < end) {
p++;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_mapped_origin_attr: Invalid mapped "
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_parse_mapped_origin_attr - Invalid mapped "
"attribute value for type \"%s\".\n", mapping);
ret = 1;
goto bail;
@@ -874,8 +874,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_mapped_origin_attr: Invalid mapped "
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_parse_mapped_origin_attr - Invalid mapped "
"attribute value for type \"%s\".\n", mapping);
ret = 1;
goto bail;
@@ -974,10 +974,10 @@ static Slapi_DN *
mep_get_sdn(Slapi_PBlock * pb)
{
Slapi_DN *sdn = 0;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"--> mep_get_sdn\n");
slapi_pblock_get(pb, SLAPI_TARGET_SDN, &sdn);
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"<-- mep_dn_is_config\n");
return ret;
@@ -1155,12 +1155,12 @@ mep_oktodo(Slapi_PBlock *pb)
int ret = 1;
int oprc = 0;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"--> mep_oktodo\n" );
if(slapi_pblock_get(pb, SLAPI_PLUGIN_OPRETURN, &oprc) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_oktodo: could not get parameters\n" );
+ slapi_log_error(SLAPI_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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"--> mep_isrepl\n" );
slapi_pblock_get(pb, SLAPI_IS_REPLICATED_OPERATION, &is_repl);
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"<-- mep_isrepl\n" );
return is_repl;
@@ -1229,8 +1229,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_create_managed_entry: The %s config attribute "
+ slapi_log_error(SLAPI_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));
err = 1;
@@ -1248,8 +1248,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_create_managed_entry: Value for %s config setting "
+ slapi_log_error(SLAPI_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,
slapi_sdn_get_dn(config->template_sdn), vals[i]);
@@ -1289,8 +1289,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_create_managed_entry: Error parsing mapped attribute "
+ slapi_log_error(SLAPI_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;
goto done;
@@ -1300,8 +1300,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_create_managed_entry: The RDN type \"%s\" "
+ slapi_log_error(SLAPI_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",
rdn_type, slapi_sdn_get_dn(config->template_sdn));
@@ -1336,8 +1336,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_create_managed_entry: Error setting DN "
+ slapi_log_error(SLAPI_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",
slapi_sdn_get_dn(config->template_sdn),
@@ -1385,15 +1385,15 @@ mep_add_managed_entry(struct configEntry *config,
int result = LDAP_SUCCESS;
/* Create the managed entry */
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "mep_add_managed_entry: Creating a managed "
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_add_managed_entry: Unable to create a managed "
+ slapi_log_error(SLAPI_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));
result = -1;
@@ -1404,8 +1404,8 @@ 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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "Adding managed entry \"%s\" for origin "
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ "mep_add_managed_entry - 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,
mep_get_plugin_id(), 0);
@@ -1413,8 +1413,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_add_managed_entry: Unable to add managed "
+ slapi_log_error(SLAPI_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),
ldap_err2string(result));
@@ -1448,8 +1448,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_add_managed_entry: Failed to add managed entry "
+ slapi_log_error(SLAPI_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));
goto bail;
@@ -1467,8 +1467,8 @@ mep_add_managed_entry(struct configEntry *config,
mods[0] = &pointer_mod;
mods[1] = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "Adding %s pointer to \"%s\" in entry \"%s\"\n.",
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ "mep_add_managed_entry - Adding %s pointer to \"%s\" in entry \"%s\"\n.",
MEP_MANAGED_ENTRY_TYPE, managed_dn, slapi_entry_get_dn(origin));
slapi_modify_internal_set_pb_ext(mod_pb, slapi_entry_get_sdn(origin),
@@ -1477,8 +1477,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_add_managed_entry: Unable to add pointer to "
+ slapi_log_error(SLAPI_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),
ldap_err2string(result));
@@ -1524,8 +1524,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_rename_managed_entry: Unable to rename managed "
+ slapi_log_error(SLAPI_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));
} else {
@@ -1542,8 +1542,8 @@ mep_rename_managed_entry(Slapi_Entry *origin,
mods[1] = 0;
/* Perform the modify operation. */
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "mep_rename_managed_entry: Updating %s pointer to "
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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));
slapi_modify_internal_set_pb_ext(mep_pb, slapi_entry_get_sdn(origin),
@@ -1552,8 +1552,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_rename_managed_entry: Unable to update %s "
+ slapi_log_error(SLAPI_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,8 +1603,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_get_mapped_mods: Error getting RDN type from tempate "
+ slapi_log_error(SLAPI_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);
goto bail;
@@ -1629,8 +1629,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_get_mapped_mods: Error parsing mapped attribute "
+ slapi_log_error(SLAPI_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);
goto bail;
@@ -1670,8 +1670,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_mapped_attr: Value for mapped attribute "
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_parse_mapped_attr - Value for mapped attribute "
"is not in the correct format. (value: \"%s\").\n",
mapping);
ret = 1;
@@ -1680,8 +1680,8 @@ mep_parse_mapped_attr(char *mapping, Slapi_Entry *origin,
/* Ensure the type is not empty. */
if (p == mapping) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_mapped_attr: Value for mapped attribute "
+ slapi_log_error(SLAPI_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",
mapping);
@@ -1710,8 +1710,8 @@ mep_parse_mapped_attr(char *mapping, Slapi_Entry *origin,
for (; p <= end; p++) {
if (*p == '$') {
if (p == end) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_mapped_attr: Invalid mapped "
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_parse_mapped_attr - Invalid mapped "
"attribute value for type \"%s\".\n", mapping);
ret = 1;
goto bail;
@@ -1739,8 +1739,8 @@ mep_parse_mapped_attr(char *mapping, Slapi_Entry *origin,
if (p < end) {
p++;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_mapped_attr: Invalid mapped "
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_parse_mapped_attr - Invalid mapped "
"attribute value for type \"%s\".\n", mapping);
ret = 1;
goto bail;
@@ -1760,8 +1760,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_mapped_attr: Invalid mapped "
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_parse_mapped_attr - Invalid mapped "
"attribute value for type \"%s\".\n", mapping);
ret = 1;
goto bail;
@@ -1805,8 +1805,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_mapped_attr: Invalid mapped "
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_parse_mapped_attr - Invalid mapped "
"attribute value for type \"%s\".\n", mapping);
ret = 1;
goto bail;
@@ -1847,8 +1847,8 @@ mep_parse_mapped_attr(char *mapping, Slapi_Entry *origin,
slapi_ch_free_string(&map_val);
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_mapped_attr: Mapped attribute \"%s\" "
+ slapi_log_error(SLAPI_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 "
"required by the schema.\n", map_type,
@@ -1862,8 +1862,8 @@ mep_parse_mapped_attr(char *mapping, Slapi_Entry *origin,
post_str);
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_parse_mapped_attr: No variable found in "
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_parse_mapped_attr - No variable found in "
"mapped attribute value for type \"%s\".\n",
mapping);
ret = 1;
@@ -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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"--> mep_pre_op\n");
/* See if we're calling ourselves. */
@@ -2198,8 +2198,8 @@ mep_pre_op(Slapi_PBlock * pb, int modop)
slapi_mod_free(&next_mod);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_pre_op: Unable to fetch config for "
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_pre_op - Unable to fetch config for "
"origin entry \"%s\".\n", origin_dn);
}
@@ -2210,12 +2210,12 @@ 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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "mep_pre_op: (internal operation) Unable to fetch "
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ "mep_pre_op - (internal operation) Unable to fetch "
"origin entry \"%s\".\n", origin_dn);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_pre_op: Unable to fetch origin entry "
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_pre_op - Unable to fetch origin entry "
"\"%s\".\n", origin_dn);
}
}
@@ -2243,15 +2243,15 @@ mep_pre_op(Slapi_PBlock * pb, int modop)
slapi_entry_free(e);
if (ret) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "mep_pre_op: operation failure [%d]\n", ret);
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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);
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &ret);
ret = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"--> mep_mod_post_op\n");
if (mep_oktodo(pb) && (sdn = mep_get_sdn(pb))) {
@@ -2315,8 +2315,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_mod_post_op: Unable to fetch postop entry.\n");
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_mod_post_op - Unable to fetch postop entry.\n");
result = SLAPI_PLUGIN_FAILURE;
goto bail;
}
@@ -2369,8 +2369,8 @@ mep_mod_post_op(Slapi_PBlock *pb)
mep_pb = slapi_pblock_new();
/* Perform the modify operation. */
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "mep_mod_post_op: Updating mapped attributes "
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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,
slapi_mods_get_ldapmods_byref(smods), 0, 0,
@@ -2379,8 +2379,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_mod_post_op: Unable to update mapped "
+ slapi_log_error(SLAPI_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,
ldap_err2string(result));
@@ -2403,8 +2403,8 @@ mep_mod_post_op(Slapi_PBlock *pb)
slapi_sdn_free(&managed_sdn);
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_mod_post_op: Unable to find config for origin "
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_mod_post_op - Unable to find config for origin "
"entry \"%s\".\n", slapi_sdn_get_dn(sdn));
}
mep_config_unlock();
@@ -2417,7 +2417,7 @@ bail:
result = SLAPI_PLUGIN_FAILURE;
}
slapi_ch_free_string(&managed_dn);
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"--> mep_add_post_op\n");
/* Reload config if a config entry was added. */
@@ -2440,9 +2440,8 @@ mep_add_post_op(Slapi_PBlock *pb)
mep_load_config();
}
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "mep_add_post_op: Error "
- "retrieving dn\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ "mep_add_post_op - Error retrieving dn\n");
}
/* If replication, just bail. */
@@ -2485,12 +2484,12 @@ mep_add_post_op(Slapi_PBlock *pb)
mep_config_unlock();
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "mep_add_post_op: Error "
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"<-- mep_add_post_op\n");
return result;
@@ -2503,7 +2502,7 @@ mep_del_post_op(Slapi_PBlock *pb)
Slapi_DN *sdn = NULL;
int result = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"--> mep_del_post_op\n");
/* Reload config if a config entry was deleted. */
@@ -2511,9 +2510,8 @@ mep_del_post_op(Slapi_PBlock *pb)
if (mep_dn_is_config(sdn))
mep_load_config();
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "mep_del_post_op: Error "
- "retrieving dn\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ "mep_del_post_op - Error retrieving dn\n");
}
/* If replication, just bail. */
@@ -2538,8 +2536,8 @@ mep_del_post_op(Slapi_PBlock *pb)
Slapi_PBlock *mep_pb = slapi_pblock_new();
/* Delete the managed entry. */
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "mep_del_post_op: Deleting managed entry "
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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));
slapi_delete_internal_set_pb(mep_pb, managed_dn, NULL,
@@ -2547,16 +2545,16 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_del_post_op: failed to delete managed entry "
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_del_post_op - Failed to delete managed entry "
"(%s) - error (%d)\n",managed_dn, result);
}
slapi_ch_free_string(&managed_dn);
slapi_pblock_destroy(mep_pb);
}
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "mep_del_post_op: Error "
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ "mep_del_post_op - Error "
"retrieving pre-op entry %s\n", slapi_sdn_get_dn(sdn));
}
@@ -2565,7 +2563,7 @@ mep_del_post_op(Slapi_PBlock *pb)
result = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"<-- mep_del_post_op\n");
return result;
@@ -2582,7 +2580,7 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
struct configEntry *config = NULL;
int result = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"--> mep_modrdn_post_op\n");
/* Just bail if we aren't ready to service requests yet. */
@@ -2597,8 +2595,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_modrdn_post_op: Error "
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_modrdn_post_op -Error "
"retrieving post-op entry\n");
return SLAPI_PLUGIN_FAILURE;
}
@@ -2607,8 +2605,8 @@ 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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "mep_modrdn_post_op: Error "
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ "mep_modrdn_post_op - Error "
"retrieving dn\n");
}
@@ -2651,8 +2649,8 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
char *vals2[2];
/* Delete the associated managed entry. */
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "mep_modrdn_post_op: Removing managed entry \"%s\" "
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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));
slapi_delete_internal_set_pb (mep_pb, managed_dn, NULL, NULL,
@@ -2660,8 +2658,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_modrdn_post_op: failed to delete managed entry "
+ slapi_log_error(SLAPI_LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
+ "mep_modrdn_post_op - Failed to delete managed entry "
"(%s) - error (%d)\n",managed_dn, result);
goto bailmod;
}
@@ -2686,8 +2684,8 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
mods[2] = 0;
/* Perform the modify operation. */
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "mep_modrdn_post_op: Removing %s pointer and %s "
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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);
slapi_modify_internal_set_pb_ext(mep_pb, new_sdn, mods, 0, 0,
@@ -2696,8 +2694,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_modrdn_post_op: Unable to remove %s "
+ slapi_log_error(SLAPI_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,
MEP_ORIGIN_OC, new_dn);
@@ -2717,8 +2715,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_modrdn_post_op: Unable to create in-memory "
+ slapi_log_error(SLAPI_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;
goto bailmod;
@@ -2740,8 +2738,8 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
}
/* Perform the modify operation. */
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "mep_modrdn_post_op: Updating %s pointer to \"%s\" "
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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,
mep_get_plugin_id(), 0);
@@ -2749,8 +2747,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_modrdn_post_op: Unable to update pointer to "
+ slapi_log_error(SLAPI_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,8 +2756,8 @@ 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, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "mep_modrdn_post_op: Renaming managed entry "
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ "mep_modrdn_post_op - Renaming managed entry "
"\"%s\" to \"%s\" due to rename of origin "
"entry \"%s\".\n ", managed_dn,
slapi_entry_get_dn(new_managed_entry),
@@ -2780,8 +2778,8 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
slapi_pblock_init(mep_pb);
/* Perform the modify operation. */
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
- "mep_modrdn_post_op: Updating mapped attributes "
+ slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+ "mep_modrdn_post_op - Updating mapped attributes "
"in entry \"%s\"\n.", managed_dn);
slapi_modify_internal_set_pb_ext(mep_pb,
slapi_entry_get_sdn(new_managed_entry),
@@ -2791,8 +2789,8 @@ 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, LOG_ERR, MEP_PLUGIN_SUBSYSTEM,
- "mep_modrdn_post_op: Unable to update mapped "
+ slapi_log_error(SLAPI_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,
slapi_entry_get_dn(new_managed_entry),
@@ -2847,7 +2845,7 @@ bailmod:
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &result);
result = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, MEP_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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 a225330..afc5c64 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, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"=> pam_passthru_load_config\n");
pam_passthru_write_lock();
@@ -100,13 +100,13 @@ 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "pam_passthru_load_config: unable to apply config "
+ slapi_log_error(SLAPI_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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "pam_passthru_load_config: skipping invalid config "
+ slapi_log_error(SLAPI_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, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"<= pam_passthru_load_config\n");
return status;
@@ -279,8 +279,8 @@ 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "The map method in the string [%s] is invalid: must be "
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "parse_map_method - The map method in the string [%s] is invalid: must be "
"one of %s\n", map_method, get_map_method_values());
}
err = PAM_PASSTHRU_FAILURE;
@@ -293,8 +293,8 @@ 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "The map method in the string [%s] is invalid: must be "
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "parse_map_method - The map method in the string [%s] is invalid: must be "
"one of %s\n", map_method, get_map_method_values());
}
err = PAM_PASSTHRU_FAILURE;
@@ -307,8 +307,8 @@ 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "The map method in the string [%s] is invalid: must be "
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "parse_map_method - The map method in the string [%s] is invalid: must be "
"one of %s\n", map_method, get_map_method_values());
}
err = PAM_PASSTHRU_FAILURE;
@@ -320,8 +320,8 @@ 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "Invalid extra text [%s] after last map method\n",
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "parse_map_method - Invalid extra text [%s] after last map method\n",
((ptr && *ptr) ? *ptr : "(null)"));
}
err = PAM_PASSTHRU_FAILURE;
@@ -337,14 +337,14 @@ print_suffixes(void)
{
void *cookie = NULL;
Slapi_DN *sdn = NULL;
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "The following is the list of valid suffixes to use with "
+ slapi_log_error(SLAPI_LOG_INFO, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "print_suffixes - 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "\t%s\n", slapi_sdn_get_dn(sdn));
+ slapi_log_error(SLAPI_LOG_INFO, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "print_suffixes -\t%s\n", slapi_sdn_get_dn(sdn));
}
}
@@ -376,8 +376,8 @@ 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "Error: valid values for %s are %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_validate_config - Valid values for %s are %s\n",
PAMPT_MISSING_SUFFIX_ATTR, get_missing_suffix_values());
}
goto done;
@@ -422,8 +422,8 @@ pam_passthru_validate_config (Slapi_Entry* e, char *returntext)
}
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "The suffixes listed in %s or %s are not present in "
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_validate_config - The suffixes listed in %s or %s are not present in "
"this server\n", PAMPT_EXCLUDES_ATTR, PAMPT_INCLUDES_ATTR);
}
@@ -432,8 +432,8 @@ 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "Warning: %s\n", returntext);
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_validate_config - Warning: %s\n", returntext);
*returntext = 0; /* log error, don't report back to user */
}
} else {
@@ -458,8 +458,8 @@ 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "Error: the %s method was specified, but no %s was given\n",
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_validate_config - The %s method was specified, but no %s was given\n",
PAMPT_MAP_METHOD_ENTRY_STRING, PAMPT_PAM_IDENT_ATTR);
}
rc = PAM_PASSTHRU_FAILURE;
@@ -472,8 +472,8 @@ 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "Error: no method(s) specified for %s, should be "
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_validate_config - No method(s) specified for %s, should be "
"one or more of %s\n", PAMPT_MAP_METHOD_ATTR,
get_map_method_values());
}
@@ -492,8 +492,8 @@ 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "Error: invalid filter specified for %s "
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_validate_config - Invalid filter specified for %s "
"(filter: \"%s\")\n", PAMPT_FILTER_ATTR,
pam_filter_str);
}
@@ -658,8 +658,8 @@ 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, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "store [%s] at tail\n", entry->dn);
+ slapi_log_error(SLAPI_LOG_CONFIG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_apply_config - store [%s] at tail\n", entry->dn);
inserted = 1;
break;
}
@@ -667,8 +667,8 @@ 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, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "store [%s] at head \n", entry->dn);
+ slapi_log_error(SLAPI_LOG_CONFIG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_apply_config - 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 ef77d6f..b4d30f2 100644
--- a/ldap/servers/plugins/pam_passthru/pam_ptimpl.c
+++ b/ldap/servers/plugins/pam_passthru/pam_ptimpl.c
@@ -87,18 +87,18 @@ 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "Could not find BIND dn %s (error %d - %s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "derive_from_bind_entry - 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "Could not find entry for BIND dn %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "derive_from_bind_entry - 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "Account %s inactivated.\n",
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "derive_from_bind_entry - Account %s inactivated.\n",
slapi_sdn_get_ndn(bindsdn));
init_my_str_buf(pam_id, NULL);
*locked = 1;
@@ -117,8 +117,8 @@ static void
report_pam_error(char *str, int rc, pam_handle_t *pam_handle)
{
if (rc != PAM_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "Error from PAM %s (%d: %s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "report_pam_error - %s (%d: %s)\n",
str, rc, pam_strerror(pam_handle, rc));
}
}
@@ -168,8 +168,8 @@ 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, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "pam msg [%d] = %d %s\n", ii, msg[ii]->msg_style,
+ slapi_log_error(SLAPI_LOG_PLUGIN, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_conv_func - pam msg [%d] = %d %s\n", ii, msg[ii]->msg_style,
msg[ii]->msg);
/* hard to tell what prompt is for . . . */
/* assume prompts for password are either BINARY or ECHO_OFF */
@@ -182,14 +182,14 @@ 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "pam msg [%d] error [%s]\n", ii, msg[ii]->msg);
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_conv_func - 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, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "pam msg [%d] text info [%s]\n", ii, msg[ii]->msg);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_conv_func - pam msg [%d] text info [%s]\n", ii, msg[ii]->msg);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "Error: unknown pam message type (%d: %s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_conv_func - Error: unknown pam message type (%d: %s)\n",
msg[ii]->msg_style, msg[ii]->msg);
ret = PAM_CONV_ERR;
}
@@ -370,8 +370,8 @@ done:
}
if (retcode != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "%s\n", errmsg);
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "do_one_pam_auth - %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 8263690..709d6ec 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, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"=> pam_passthruauth_init\n" );
slapi_pblock_get (pb, SLAPI_PLUGIN_IDENTITY, &pam_passthruauth_plugin_identity);
@@ -121,8 +121,8 @@ 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "pam_passthruauth_init failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthruauth_init - Failed\n");
status = -1;
goto bail;
}
@@ -136,9 +136,9 @@ pam_passthruauth_init( Slapi_PBlock *pb )
NULL, /* ? */
pam_passthruauth_plugin_identity /* access control */
)) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "pam_passthruauth_init: "
- "failed to register preop plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthruauth_init - "
+ "Failed to register preop plugin\n");
status = -1;
goto bail;
}
@@ -156,8 +156,8 @@ 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "pam_passthruauth_init failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthruauth_init - Failed\n");
status = -1;
goto bail;
}
@@ -171,9 +171,9 @@ pam_passthruauth_init( Slapi_PBlock *pb )
NULL, /* ? */
pam_passthruauth_plugin_identity /* access control */
)) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "pam_passthruauth_init: "
- "failed to register internal postop plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthruauth_init - "
+ "Failed to register internal postop plugin\n");
status = -1;
goto bail;
}
@@ -188,15 +188,15 @@ pam_passthruauth_init( Slapi_PBlock *pb )
NULL, /* ? */
pam_passthruauth_plugin_identity /* access control */
)) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "pam_passthruauth_init: "
- "failed to register (%s) plugin\n",
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthruauth_init - "
+ "Failed to register (%s) plugin\n",
is_betxn ? "postoperation" : "betxnpostoperation");
status = -1;
goto bail;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"<= pam_passthruauth_init\n" );
bail:
@@ -214,8 +214,8 @@ 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "pam_passthruauth_preop_init failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_preop_init - Failed\n");
status = -1;
}
return status;
@@ -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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"pam_passthru_internal_postop_init: failed to register plugin\n");
status = -1;
}
@@ -277,9 +277,9 @@ 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "pam_passthru_postop_init: "
- "failed to register (%s) plugin\n",
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_postop_init - "
+ "Failed to register (%s) plugin\n",
is_betxn ? "betxn postop" : "postop");
status = -1;
}
@@ -300,14 +300,14 @@ pam_passthru_bindpreop_start( Slapi_PBlock *pb )
PAM_PASSTHRU_ASSERT( pb != NULL );
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "pam_passthru_bindpreop_start: unable to determine plug-in config dn\n");
+ slapi_log_error(SLAPI_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,16 +323,16 @@ pam_passthru_bindpreop_start( Slapi_PBlock *pb )
pam_passthru_set_config_area(slapi_sdn_dup(pluginsdn));
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "pam_passthru_bindpreop_start: config at %s\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_bindpreop_start - Config at %s\n",
slapi_sdn_get_ndn(pam_passthru_get_config_area()));
/* Create the lock that protects the config . */
g_pam_config_lock = slapi_new_rwlock();
if (!g_pam_config_lock) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "pam_passthru_bindpreop_start: lock creation failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_bindpreop_start - Lock creation failed\n");
rc = PAM_PASSTHRU_FAILURE;
goto done;
}
@@ -346,8 +346,8 @@ 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "could not initialize PAM subsystem (%d)\n", rc);
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_bindpreop_start - 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, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "pam_passthru: ready for service\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_bindpreop_start - Ready for service\n" );
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"=> pam_passthru_bindpreop\n" );
/*
@@ -421,8 +421,8 @@ 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "<= not handled (unable to retrieve bind parameters)\n" );
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_bindpreop - not handled (unable to retrieve bind parameters)\n" );
return retcode;
}
normbinddn = slapi_sdn_get_dn(bindsdn);
@@ -433,8 +433,8 @@ pam_passthru_bindpreop( Slapi_PBlock *pb )
*/
if ((method != LDAP_AUTH_SIMPLE) || (*normbinddn == '\0') ||
(creds->bv_len == 0)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "<= not handled (not simple bind or NULL dn/credentials)\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_bindpreop - Not handled (not simple bind or NULL dn/credentials)\n" );
return retcode;
}
@@ -451,8 +451,8 @@ pam_passthru_bindpreop( Slapi_PBlock *pb )
cfg = pam_passthru_get_config(bindsdn);
if (!cfg) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "<= \"%s\" not handled (doesn't meet configuration criteria)\n", normbinddn );
+ slapi_log_error(SLAPI_LOG_PLUGIN, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_bindpreop - \"%s\" Not handled (doesn't meet configuration criteria)\n", normbinddn );
goto done;
}
@@ -460,8 +460,8 @@ 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, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "<= connection not secure (secure connection required; check config)");
+ slapi_log_error(SLAPI_LOG_PLUGIN, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_bindpreop - Connection not secure (secure connection required; check config)\n");
goto done;
}
}
@@ -484,8 +484,8 @@ 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "%s\n", errmsg);
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_bindpreop - %s\n", errmsg);
} else {
LDAPControl **reqctrls = NULL;
slapi_pblock_get(pb, SLAPI_REQCONTROLS, &reqctrls);
@@ -508,10 +508,10 @@ pam_passthru_bindpreop( Slapi_PBlock *pb )
done:
pam_passthru_unlock();
- 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_PLUGIN, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_bindpreop - handled (error %d - %s)\n", rc, ldap_err2string(rc));
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
"=> pam_passthru_postop\n");
/* Make sure the operation succeeded and bail if it didn't. */
@@ -651,8 +651,8 @@ 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, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "pam_passthru_postop: unale to fetch target SDN.\n");
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_postop - Unable to fetch target SDN.\n");
ret = SLAPI_PLUGIN_FAILURE;
goto bail;
}
@@ -665,8 +665,8 @@ pam_passthru_postop(Slapi_PBlock *pb)
if (e) {
new_sdn = slapi_entry_get_sdn(e);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
- "pam_passthru_postop: unable to fetch post-op "
+ slapi_log_error(SLAPI_LOG_ERR, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ "pam_passthru_postop - Unable to fetch post-op "
"entry for rename operation.\n");
ret = SLAPI_PLUGIN_FAILURE;
goto bail;
@@ -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, LOG_DEBUG, PAM_PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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 128b96a..1556bdb 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, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 646ec58..279a955 100644
--- a/ldap/servers/plugins/passthru/ptconfig.c
+++ b/ldap/servers/plugins/passthru/ptconfig.c
@@ -80,8 +80,8 @@ passthru_config( int argc, char **argv )
int ret = LDAP_SUCCESS;
if ( inited ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
- "only one pass through plugin instance can be used\n" );
+ slapi_log_error(SLAPI_LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
+ "passthru_config - Only one pass through plugin instance can be used\n" );
ret = LDAP_PARAM_ERROR;
goto error;
}
@@ -93,8 +93,8 @@ 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, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
- "no pass through servers found in configuration "
+ slapi_log_error(SLAPI_LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
+ "passthru_config - No pass through servers found in configuration "
"(at least one must be listed)\n" );
ret = LDAP_PARAM_ERROR;
goto error;
@@ -153,8 +153,8 @@ 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, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
- "server parameters should be in the form "
+ slapi_log_error(SLAPI_LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
+ "passthru_config - Server parameters should be in the form "
"\"maxconnections,maxconcurrency,timeout,ldapversion,"
"connlifetime\" (got \"%s\")\n", p );
ret = LDAP_PARAM_ERROR;
@@ -172,24 +172,24 @@ passthru_config( int argc, char **argv )
}
if ( srvr->ptsrvr_ldapversion != LDAP_VERSION2 && srvr->ptsrvr_ldapversion != LDAP_VERSION3 ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
- "LDAP protocol version should be %d or %d (got %d)\n",
+ slapi_log_error(SLAPI_LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
+ "passthru_config - LDAP protocol version should be %d or %d (got %d)\n",
LDAP_VERSION2, LDAP_VERSION3, srvr->ptsrvr_ldapversion );
ret = LDAP_PARAM_ERROR;
goto error;
}
if ( srvr->ptsrvr_maxconnections <= 0 ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
- "maximum connections must be greater than "
+ slapi_log_error(SLAPI_LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
+ "passthru_config - Maximum connections must be greater than "
"zero (got %d)\n", srvr->ptsrvr_maxconnections );
ret = LDAP_PARAM_ERROR;
goto error;
}
if ( srvr->ptsrvr_maxconcurrency <= 0 ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
- "maximum concurrency must be greater than "
+ slapi_log_error(SLAPI_LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
+ "passthru_config - Maximum concurrency must be greater than "
"zero (got %d)\n", srvr->ptsrvr_maxconcurrency );
ret = LDAP_PARAM_ERROR;
goto error;
@@ -207,16 +207,16 @@ 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, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
- "unable to parse LDAP URL \"%s\" (%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
+ "passthru_config - Unable to parse LDAP URL \"%s\" (%s)\n",
srvr->ptsrvr_url, slapi_urlparse_err2string( rc ));
ret = LDAP_PARAM_ERROR;
goto error;
}
if ( ludp->lud_dn == NULL || *ludp->lud_dn == '\0' ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
- "missing suffix in LDAP URL \"%s\"\n", srvr->ptsrvr_url );
+ slapi_log_error(SLAPI_LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
+ "passthru_config - Missing suffix in LDAP URL \"%s\"\n", srvr->ptsrvr_url );
ret = LDAP_PARAM_ERROR;
goto error;
}
@@ -241,8 +241,8 @@ 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, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
- "unable to parse suffix string \"%s\" within \"%s\"\n",
+ slapi_log_error(SLAPI_LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
+ "passthru_config - Unable to parse suffix string \"%s\" within \"%s\"\n",
ludp->lud_dn, srvr->ptsrvr_url );
ret = LDAP_PARAM_ERROR;
goto error;
@@ -304,7 +304,7 @@ passthru_config( int argc, char **argv )
/*
* log configuration for debugging purposes
*/
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_DEBUG, 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 0c74de1..e6eb90e 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, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
"<= passthru_get_connection ld=0x%p (concurrency now %d)\n",
*ldp, conn->ptconn_usecount );
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 c5c57ed..d96fc21 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, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
- "passthruauth_init failed\n" );
+ slapi_log_error(SLAPI_LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
+ "passthruauth_init - Failed\n" );
return( -1 );
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
"<= passthruauth_init succeeded\n" );
return( 0 );
@@ -75,19 +75,19 @@ passthru_bindpreop_start( Slapi_PBlock *pb )
PASSTHRU_ASSERT( pb != NULL );
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
- "unable to get arguments\n" );
+ slapi_log_error(SLAPI_LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
+ "passthru_bindpreop_start - Unable to get arguments\n" );
return( -1 );
}
if (( rc = passthru_config( argc, argv )) != LDAP_SUCCESS ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
- "configuration failed (%s)\n", ldap_err2string( rc ));
+ slapi_log_error(SLAPI_LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
+ "passthru_bindpreop_start - 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, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
"=> passthru_bindpreop\n" );
/*
@@ -142,8 +142,8 @@ 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, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
- "<= not handled (unable to retrieve bind parameters)\n" );
+ slapi_log_error(SLAPI_LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
+ "passthru_bindpreop - Not handled (unable to retrieve bind parameters)\n" );
return( PASSTHRU_OP_NOT_HANDLED );
}
normbinddn = slapi_sdn_get_dn(sdn);
@@ -157,8 +157,8 @@ passthru_bindpreop( Slapi_PBlock *pb )
*/
if ( method != LDAP_AUTH_SIMPLE || *normbinddn == '\0'
|| creds->bv_len == 0 ) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
- "<= not handled (not simple bind or NULL dn/credentials)\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ "passthru_bindpreop - Not handled (not simple bind or NULL dn/credentials)\n" );
return( PASSTHRU_OP_NOT_HANDLED );
}
@@ -172,8 +172,8 @@ passthru_bindpreop( Slapi_PBlock *pb )
* another server.
*/
if ( passthru_dn2server( cfg, normbinddn, &srvr ) != LDAP_SUCCESS ) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
- "<= not handled (not one of our suffixes)\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ "passthru_bindpreop - 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, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM, "%s\n",
+ slapi_log_error(SLAPI_LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM, "%s\n",
errmsg );
} else {
int lderrno;
@@ -224,8 +224,8 @@ 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, LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
- "%s\n", errmsg );
+ slapi_log_error(SLAPI_LOG_ERR, PASSTHRU_PLUGIN_SUBSYSTEM,
+ "passthru_bindpreop - %s\n", errmsg );
}
}
@@ -259,8 +259,8 @@ passthru_bindpreop( Slapi_PBlock *pb )
ldap_memfree( matcheddn );
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PASSTHRU_PLUGIN_SUBSYSTEM,
- "<= handled (error %d - %s)\n", rc, ldap_err2string( rc ));
+ slapi_log_error(SLAPI_LOG_PLUGIN, PASSTHRU_PLUGIN_SUBSYSTEM,
+ "passthru_bindpreop - 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 c9d15d9..44ebeef 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME, "getEntry: search %s\n", udn);
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"getEntry: %s not found\n", udn);
}
}
else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"searchUid: return uid %s\n", uid);
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"searchUid: About to free entry (%s)\n", udn);
slapi_entry_free(entry);
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME, "uid_in_set: comp %s %s \n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME, "uid_in_valueset: comp %s %s \n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"getMembershipFromDownward: ==>\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"propogateMembershipUpward: recursion limit reached: %d\n", depth);
return;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"propogateMembershipUpward: ==>\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"propogateDeletionsUpward: recursion limit reached: %d\n", depth);
return;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"propogateDeletionsUpward: ==>\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, 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_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_entry_get_dn_const(entry));
int posixGroup = hasObjectClass(entry, "posixGroup");
if (!(posixGroup || hasObjectClass(entry, "ntGroup")) && !newposixgroup) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership: test dellist \n");
uid = slapi_value_get_string(uid_value);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"modGroupMembership: perform user %s\n", uid_dn);
uid = searchUid(uid_dn);
if (uid == NULL) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME, "modGroupMembership: <==\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME, "addGroupMembership: ==>\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME, "addGroupMembership: ==>\n");
int posixGroup = hasObjectClass(entry, "posixGroup");
if(!(posixGroup || hasObjectClass(entry, "ntGroup"))) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"addGroupMembership: perform member %s\n", uid_dn);
uid = searchUid(uid_dn);
if (uid == NULL) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME, "addGroupMembership: <==\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 5d54f7a..e090a64 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"posix_group_task_add: task object initialized\n");
/* start the sample task as a separate thread */
@@ -140,12 +140,12 @@ 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"posix_group_task_add: thread created\n");
if (thread == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, POSIX_WINSYNC_PLUGIN_NAME,
- "unable to create task thread!\n");
+ slapi_log_error(SLAPI_LOG_ERR, POSIX_WINSYNC_PLUGIN_NAME,
+ "posix_group_task_add: unable to create task thread!\n");
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
slapi_task_finish(task, *returncode);
@@ -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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME, "search %s\n", member);
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"_task_thread <==\n");
slapi_task_dec_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 8ab3b3d..34df25d 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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,21 +55,21 @@ 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME, "Found suffix's '%s'\n",
- slapi_sdn_get_dn(sdn));
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME, "posix_winsync_agmt_init - "
+ "Found suffix's '%s'\n", slapi_sdn_get_dn(sdn));
break;
}
sdn = slapi_get_next_suffix(&node, 0);
}
if (!sdn) {
char *pardn = slapi_dn_parent(slapi_sdn_get_dn(ds_subtree));
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, POSIX_WINSYNC_PLUGIN_NAME, "suffix not found for '%s'\n",
- pardn);
+ slapi_log_error(SLAPI_LOG_ERR, POSIX_WINSYNC_PLUGIN_NAME, "posix_winsync_agmt_init - "
+ "suffix not found for '%s'\n", pardn);
slapi_ch_free_string(&pardn);
}
plugin_op_finished();
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
"<-- posix_winsync_agmt_init -- end\n");
return cbdata;
@@ -151,12 +151,12 @@ posix_winsync_config(Slapi_Entry *config_e)
theConfig.config_e = NULL;
theConfig.lock = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME, "--> _config %s -- begin\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME, "--> _config %s -- begin\n",
slapi_entry_get_dn_const(config_e));
if (inited) {
- 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_log_error(SLAPI_LOG_ERR, POSIX_WINSYNC_PLUGIN_NAME,
+ "posix_winsync_config - POSIX WinSync plug-in already configured. "
+ "Please remove the plugin config entry [%s]\n",
slapi_entry_get_dn_const(config_e));
return (LDAP_PARAM_ERROR);
}
@@ -183,8 +183,8 @@ 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
- "posix_winsync_config -- init Monitor failed\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ "posix_winsync_config - init Monitor failed\n");
}
slapi_config_register_callback(SLAPI_OPERATION_MODIFY, DSE_FLAG_POSTOP, config_dn,
@@ -193,15 +193,15 @@ 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
- "posix_winsync_config -- register memberuid task failed\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ "posix_winsync_config - register memberuid task failed\n");
}
}
inited = 1;
if (returncode != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, POSIX_WINSYNC_PLUGIN_NAME, "Error %d: %s\n", returncode,
+ slapi_log_error(SLAPI_LOG_ERR, POSIX_WINSYNC_PLUGIN_NAME, "posix_winsync_config - Error %d: %s\n", returncode,
returntext);
}
@@ -237,38 +237,38 @@ 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
- "_apply_config: Config parameter %s: %d\n", POSIX_WINSYNC_MSSFU_SCHEMA,
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ "posix_winsync_apply_config: Config parameter %s: %d\n", POSIX_WINSYNC_MSSFU_SCHEMA,
mssfuSchema);
}
/* 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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
- "_apply_config: Config parameter %s: %d\n", POSIX_WINSYNC_MAP_MEMBERUID,
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ "posix_winsync_apply_config: Config parameter %s: %d\n", POSIX_WINSYNC_MAP_MEMBERUID,
mapMemberUID);
}
/* get create task value */
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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
- "_apply_config: Config parameter %s: %d\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ "posix_winsync_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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
- "_apply_config: Config parameter %s: %d\n", POSIX_WINSYNC_LOWER_CASE,
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ "posix_winsync_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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
- "_apply_config: Config parameter %s: %d\n", POSIX_WINSYNC_MAP_NESTED_GROUPING,
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ "posix_winsync_apply_config: Config parameter %s: %d\n", POSIX_WINSYNC_MAP_NESTED_GROUPING,
mapNestedGrouping);
}
/* if we got here, we have valid values for everything
@@ -286,8 +286,8 @@ posix_winsync_apply_config(Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Ent
theConfig.mapNestedGrouping = mapNestedGrouping;
/* success */
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,
- "<-- _apply_config: config evaluated\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
+ "<-- posix_winsync_apply_config: config evaluated\n");
*returncode = LDAP_SUCCESS;
slapi_unlock_mutex(theConfig.lock);
diff --git a/ldap/servers/plugins/posix-winsync/posix-winsync.c b/ldap/servers/plugins/posix-winsync/posix-winsync.c
index ab482dd..6372bed 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name, "getNisDomainName start DN:%s\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"--> posix_winsync_dirsync_search_params_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"--> posix_winsync_pre_ad_search_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name, "--> _pre_ds_search_cb -- begin\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name, "<-- _pre_ds_search_cb -- end\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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,7 +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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
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)),
@@ -693,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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));
@@ -710,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- posix_winsync_pre_ad_mod_user_cb -- end\n");
return;
@@ -734,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"--> _pre_ad_mod_group_cb -- begin DS account [%s]\n",
slapi_entry_get_dn_const(ds_entry));
@@ -745,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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,
@@ -791,7 +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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
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)),
@@ -815,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name, "_pre_ad_mod_group_cb -- step\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- _pre_ad_mod_group_cb -- end\n");
return;
@@ -854,11 +854,11 @@ posix_winsync_pre_ds_mod_user_cb(void *cbdata, const Slapi_Entry *rawentry, Slap
return;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"--> _pre_ds_mod_user_cb -- begin\n");
if ((NULL == ad_entry) || (NULL == ds_entry)) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- _pre_ds_mod_user_cb -- Empty %s entry.\n",
(NULL==ad_entry)?"ad entry":"ds entry");
plugin_op_finished();
@@ -880,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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);
@@ -912,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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);
@@ -933,7 +933,7 @@ posix_winsync_pre_ds_mod_user_cb(void *cbdata, const Slapi_Entry *rawentry, Slap
}
}
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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");
@@ -953,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- _pre_ds_mod_user_cb add oc:posixAccount\n");
slapi_value_init_string(voc, "shadowAccount");
@@ -962,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- _pre_ds_mod_user_cb add oc:shadowAccount\n");
}
slapi_mods_add_mod_values(smods, LDAP_MOD_REPLACE, "objectClass",
@@ -980,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, LOG_DEBUG, posix_winsync_plugin_name, "<-- _pre_ds_mod_user_cb %s %s\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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");
@@ -990,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, LOG_DEBUG, posix_winsync_plugin_name, "<-- _pre_ds_mod_user_cb -- end\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name, "<-- _pre_ds_mod_user_cb -- end\n");
return;
}
@@ -1015,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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
@@ -1031,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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);
@@ -1039,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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);
@@ -1053,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"_pre_ds_mod_group_cb -- values compared\n");
slapi_ch_free((void**) &local_type);
@@ -1069,11 +1069,11 @@ posix_winsync_pre_ds_mod_group_cb(void *cbdata, const Slapi_Entry *rawentry, Sla
}
}
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"_pre_ds_mod_group_cb present %d modify %d\n", is_present_local,
do_modify_local);
@@ -1090,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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));
@@ -1105,14 +1105,14 @@ posix_winsync_pre_ds_mod_group_cb(void *cbdata, const Slapi_Entry *rawentry, Sla
memberUidUnlock();
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name, "_pre_ds_mod_group_cb step\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- _pre_ds_mod_group_cb -- end\n");
return;
@@ -1138,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"--> _pre_ds_add_user_cb -- begin\n");
/* check all of the required attributes are in the ad_entry:
@@ -1153,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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);
@@ -1172,7 +1172,7 @@ posix_winsync_pre_ds_add_user_cb(void *cbdata, const Slapi_Entry *rawentry, Slap
continue;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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));
@@ -1185,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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));
@@ -1196,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- _pre_ds_add_user_cb -- adding objectclass for new entry failed %d\n",
rc);
} else {
@@ -1209,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, LOG_DEBUG, posix_winsync_plugin_name, "<-- _pre_ds_add_user_cb -- end\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name, "<-- _pre_ds_add_user_cb -- end\n");
return;
}
@@ -1232,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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)) {
@@ -1243,7 +1243,7 @@ posix_winsync_pre_ds_add_group_cb(void *cbdata, const Slapi_Entry *rawentry, Sla
continue;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name, "--> _pre_ds_add_group_cb -- "
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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,
@@ -1253,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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));
@@ -1265,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- _pre_ds_add_group_cb -- adding objectclass for new entry failed %d\n",
rc);
}
@@ -1276,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- posix_winsync_pre_ds_add_group_cb -- end\n");
return;
@@ -1287,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- posix_winsync_get_new_ds_user_dn_cb -- new dn [%s] -- end\n",
*new_dn_string);
@@ -1303,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"--> posix_winsync_get_new_ds_group_dn_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- posix_winsync_get_new_ds_group_dn_cb -- end\n");
return;
@@ -1334,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"--> _pre_ad_mod_user_mods_cb -- begin DS account [%s] \n",
slapi_entry_get_dn_const(ds_entry));
@@ -1344,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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,
@@ -1354,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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));
@@ -1385,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- _pre_ad_mod_user_mods_cb -- end\n");
return;
@@ -1413,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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);
@@ -1421,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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,
@@ -1436,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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));
@@ -1445,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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));
@@ -1463,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- _pre_ad_mod_group_mods_cb -- end\n");
return;
@@ -1473,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"--> posix_winsync_can_add_entry_to_ad_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 */
@@ -1492,12 +1492,12 @@ posix_winsync_begin_update_cb(void *cbdata, const Slapi_DN *ds_subtree, const Sl
return;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- posix_winsync_begin_update_cb -- end\n");
return;
@@ -1514,7 +1514,7 @@ posix_winsync_end_update_cb(void *cbdata, const Slapi_DN *ds_subtree, const Slap
return;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"--> posix_winsync_end_update_cb -- begin %d %d\n",
posix_winsync_config_get_MOFTaskCreated(),
posix_winsync_config_get_createMOFTask());
@@ -1529,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, LOG_ERR, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"--> posix_winsync_end_update_cb, create task %s\n", dn);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"--> posix_winsync_end_update_cb, init'ing task\n");
slapi_entry_init(e_task, dn, NULL);
@@ -1549,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"--> posix_winsync_end_update_cb, adding task\n");
slapi_add_internal_pb(pb);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_ERR, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"posix_winsync_end_update_cb: "
"add task entry\n");
}
@@ -1576,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- posix_winsync_end_update_cb -- end\n");
return;
@@ -1585,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"--> posix_winsync_destroy_agmt_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- posix_winsync_destroy_agmt_cb -- end\n");
return;
@@ -1597,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- posix_winsync_post_ad_mod_user_cb -- end\n");
return;
@@ -1615,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- posix_winsync_post_ad_mod_group_cb -- end\n");
return;
@@ -1633,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- posix_winsync_post_ds_mod_user_cb -- end\n");
return;
@@ -1651,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- posix_winsync_post_ds_mod_group_cb -- end\n");
return;
@@ -1669,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- posix_winsync_post_ds_add_user_cb -- end\n");
return;
@@ -1687,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- posix_winsync_post_ds_add_group_cb -- end\n");
return;
@@ -1721,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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);
@@ -1729,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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,"_pre_ad_add_user_cb -- test objectclass posixAccount\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,"_pre_ad_add_user_cb -- test objectclass posixAccount\n");
for (
i = slapi_attr_first_value(obj_attr, &value);
i != -1;
@@ -1738,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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,"_pre_ad_add_user_cb -- oc: %s \n", oc);
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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);
@@ -1750,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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)){
@@ -1760,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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));
@@ -1770,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"--> _pre_ad_add_user_cb -- "
"adding val for [%s] to new entry [%s]\n",
"msSFU30NisDomain", nisdomainname);
@@ -1780,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- _pre_ad_add_user_cb -- end\n");
return;
@@ -1804,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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);
@@ -1812,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, LOG_DEBUG, POSIX_WINSYNC_PLUGIN_NAME,"_pre_ad_add_group_cb -- test objectclass posixGroup\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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)) {
@@ -1830,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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)){
@@ -1840,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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));
@@ -1849,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"--> _pre_ad_add_group_cb -- "
"adding val for [%s] to new entry [%s]\n",
"msSFU30NisDomain", nisdomainname);
@@ -1859,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- _pre_ad_add_group_cb -- end\n");
return;
@@ -1868,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- posix_winsync_post_ad_add_user_cb -- end\n");
return;
@@ -1886,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- posix_winsync_post_ad_add_group_cb -- end\n");
return;
@@ -1904,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- posix_winsync_post_ad_mod_user_mods_cb -- end\n");
return;
@@ -1922,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- posix_winsync_post_ad_mod_group_mods_cb -- end\n");
return;
@@ -2004,28 +2004,29 @@ posix_winsync_plugin_start(Slapi_PBlock *pb)
int rc;
Slapi_Entry *config_e = NULL; /* entry containing plugin config */
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_ERR, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, posix_winsync_plugin_name, "missing config entry\n");
+ slapi_log_error(SLAPI_LOG_ERR, posix_winsync_plugin_name, "posix_winsync_plugin_start - "
+ "Missing config entry\n");
return (-1);
}
if ((rc = posix_winsync_config(config_e)) != LDAP_SUCCESS) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, posix_winsync_plugin_name, "configuration failed (%s)\n",
- ldap_err2string(rc));
+ slapi_log_error(SLAPI_LOG_ERR, posix_winsync_plugin_name, "posix_winsync_plugin_start - "
+ "configuration failed (%s)\n", ldap_err2string(rc));
return (-1);
}
g_plugin_started = 1;
op_counter = slapi_counter_new();
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- posix_winsync_plugin_start -- registered; end\n");
return 0;
}
@@ -2033,7 +2034,7 @@ posix_winsync_plugin_start(Slapi_PBlock *pb)
static int
posix_winsync_plugin_close(Slapi_PBlock *pb)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"--> posix_winsync_plugin_close -- begin\n");
g_plugin_started = 0;
@@ -2041,7 +2042,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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"<-- posix_winsync_plugin_close -- end\n");
return 0;
}
@@ -2055,7 +2056,7 @@ posix_winsync_plugin_init(Slapi_PBlock *pb)
void *plugin_id = NULL;
Slapi_Entry *confige = NULL;
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
"--> posix_winsync_plugin_init -- begin\n");
if (slapi_pblock_get(pb, SLAPI_PLUGIN_CONFIG_ENTRY, &confige) && confige) {
@@ -2069,22 +2070,22 @@ 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, LOG_ERR, posix_winsync_plugin_name,
- "<-- posix_winsync_plugin_init -- failed to register plugin -- end\n");
+ slapi_log_error(SLAPI_LOG_ERR, posix_winsync_plugin_name,
+ "posix_winsync_plugin_init - Failed to register plugin -- end\n");
return -1;
}
/* 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, LOG_ERR, posix_winsync_plugin_name,
- "<-- posix_winsync_plugin_init -- failed to retrieve plugin identity -- end\n");
+ slapi_log_error(SLAPI_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, LOG_DEBUG, posix_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 c81edfd..090ce22 100644
--- a/ldap/servers/plugins/presence/presence.c
+++ b/ldap/servers/plugins/presence/presence.c
@@ -29,10 +29,6 @@
#include <sys/stat.h>
-/*** from proto-slap.h ***/
-
-int slapd_log_error_proc( char *subsystem, char *fmt, ... );
-
/*** from ldaplog.h ***/
/* edited ldaplog.h for LDAPDebug()*/
@@ -43,21 +39,6 @@ int slapd_log_error_proc( char *subsystem, char *fmt, ... );
extern "C" {
#endif
-#define LDAP_DEBUG_TRACE 0x00001 /* 1 */
-#define LDAP_DEBUG_ANY 0x04000 /* 16384 */
-#define LDAP_DEBUG_PLUGIN 0x10000 /* 65536 */
-
-/* debugging stuff */
-extern int slapd_ldap_debug;
-#define LDAPDebugLevelIsSet( level ) ( slapd_ldap_debug & level )
-
-#define LDAPDebug( level, fmt, arg1, arg2, arg3 ) \
- { \
- if ( LDAPDebugLevelIsSet( level )) { \
- slapd_log_error_proc( NULL, fmt, arg1, arg2, arg3 ); \
- } \
- }
-
#ifdef __cplusplus
}
#endif
@@ -249,7 +230,7 @@ int presence_init( Slapi_PBlock *pb )
int status = PRESENCE_SUCCESS;
char * plugin_identity=NULL;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> presence_init -- BEGIN\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM,"presence_init - BEGIN\n");
/**
* Store the plugin identity for later use.
@@ -269,12 +250,12 @@ int presence_init( Slapi_PBlock *pb )
slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION,
(void *)&pdesc ) != 0 )
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PRESENCE_PLUGIN_SUBSYSTEM,
- "presence_init: failed to register plugin\n" );
+ slapi_log_error(SLAPI_LOG_ERR, PRESENCE_PLUGIN_SUBSYSTEM,
+ "presence_init - Failed to register plugin\n" );
status = PRESENCE_FAILURE;
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- presence_init -- END\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "presence_init -- END\n");
return status;
}
@@ -289,7 +270,7 @@ int presence_start( Slapi_PBlock *pb )
{
char * plugindn = NULL;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> presence_start -- begin\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "presence_start - BEGIN\n");
if(slapi_apib_get_interface(HTTP_v1_0_GUID, &_HttpAPI))
{
@@ -307,8 +288,8 @@ int presence_start( Slapi_PBlock *pb )
presence_vattr_compare,
presence_vattr_types) != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PRESENCE_PLUGIN_SUBSYSTEM,
- "presence_start: cannot register as service provider\n" );
+ slapi_log_error(SLAPI_LOG_ERR, PRESENCE_PLUGIN_SUBSYSTEM,
+ "presence_start - Cannot register as service provider\n" );
return PRESENCE_FAILURE;
}
@@ -340,13 +321,13 @@ int presence_start( Slapi_PBlock *pb )
*/
if (loadPluginConfig() != PRESENCE_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PRESENCE_PLUGIN_SUBSYSTEM,
- "presence_start: unable to load plug-in configuration\n" );
+ slapi_log_error(SLAPI_LOG_ERR, PRESENCE_PLUGIN_SUBSYSTEM,
+ "presence_start - Unable to load plug-in configuration\n" );
return PRESENCE_FAILURE;
}
- 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);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "presence_start - Ready for service\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "presence_start - END\n");
return PRESENCE_SUCCESS;
}
@@ -358,11 +339,11 @@ int presence_start( Slapi_PBlock *pb )
*/
int presence_close( Slapi_PBlock *pb )
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> presence_close\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "--> presence_close\n");
deleteMapTables();
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- presence_close\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "<-- presence_close\n");
return PRESENCE_SUCCESS;
}
@@ -386,9 +367,9 @@ static int presence_vattr_get(vattr_sp_handle *handle,
_Vmap *map = NULL;
_ConfigEntry *info = NULL;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> presence_vattr_get \n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "--> presence_vattr_get \n");
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Type=[%s] \n",type,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "presence_vattr_get - Type=[%s] \n",type);
if (imIDExists(e, type, &id, &map, &info) != PRESENCE_SUCCESS)
{
@@ -400,7 +381,7 @@ static int presence_vattr_get(vattr_sp_handle *handle,
status = PRESENCE_FAILURE;
goto cleanup;
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> ID=[%s] \n",id,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "presence_vattr_get - ID=[%s] \n",id);
/**
* Now since we got a valid id we do a quick schema check
@@ -417,8 +398,8 @@ static int presence_vattr_get(vattr_sp_handle *handle,
status = makeHttpRequest(id, map, info, &returnedBUF, &size);
- 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);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "presence_vattr_get - size=[%d] \n",size);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "presence_vattr_get - buffer=[%s]\n",(returnedBUF) ? returnedBUF : "NULL");
if(status == PRESENCE_SUCCESS)
@@ -451,14 +432,14 @@ static int presence_vattr_get(vattr_sp_handle *handle,
}
cleanup:
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Processed ID=[%s] \n",id,0,0);
+slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "presence_vattr_get - Processed ID=[%s] \n",id);
if (id != NULL ) {
slapi_ch_free((void **)&id);
}
if (returnedBUF != NULL ) {
PR_Free(returnedBUF);
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- presence_vattr_get \n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "<-- presence_vattr_get \n");
return status;
}
@@ -469,8 +450,8 @@ static int presence_vattr_compare(vattr_sp_handle *handle, vattr_context *c, Sla
/**
* not yet implemented ???
*/
- 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);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "--> presence_vattr_compare - does nothing \n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "<-- presence_vattr_compare \n");
return status;
}
@@ -482,11 +463,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, LOG_DEBUG, "--> presence_vattr_types\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "--> presence_vattr_types\n");
PL_HashTableEnumerateEntries(_IdVattrMapTable, setTypes, &args);
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- presence_vattr_types\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "<-- presence_vattr_types\n");
return status;
}
@@ -498,7 +479,7 @@ static int loadPluginConfig(void)
Slapi_PBlock *search_pb;
Slapi_Entry **entries = NULL;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> loadPluginConfig\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "--> loadPluginConfig\n");
search_pb = slapi_pblock_new();
@@ -509,8 +490,8 @@ static int loadPluginConfig(void)
if (status != PRESENCE_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, PRESENCE_PLUGIN_SUBSYSTEM,
- "Error getting level1 presence configurations<%s>\n", getPluginDN());
+ slapi_log_error(SLAPI_LOG_ERR, PRESENCE_PLUGIN_SUBSYSTEM,
+ "loadPluginConfig - Error getting level1 presence configurations<%s>\n", getPluginDN());
status = PRESENCE_FAILURE;
goto cleanup;
}
@@ -518,8 +499,8 @@ 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, LOG_ERR, PRESENCE_PLUGIN_SUBSYSTEM,
- "No entries found for <%s>\n", getPluginDN());
+ slapi_log_error(SLAPI_LOG_ERR, PRESENCE_PLUGIN_SUBSYSTEM,
+ "loadPluginConfig - No entries found for <%s>\n", getPluginDN());
status = PRESENCE_FAILURE;
goto cleanup;
@@ -541,7 +522,7 @@ static int loadPluginConfig(void)
NULL
);
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> parseConfigEntry \n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "--> parseConfigEntry \n");
for (i = 0; (entries[i] != NULL); i++)
{
@@ -552,9 +533,9 @@ static int loadPluginConfig(void)
goto cleanup;
}
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- parseConfigEntry \n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "<-- parseConfigEntry \n");
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- loadPluginConfig\n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "<-- loadPluginConfig\n");
cleanup:
slapi_free_search_results_internal(search_pb);
@@ -579,7 +560,7 @@ static int parseConfigEntry(Slapi_Entry *e)
*/
return PRESENCE_FAILURE;
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> key [%s] \n",key,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "parseConfigEntry - key [%s] \n",key);
/**
* Now create the config entry which will hold all the
* attributes of a presence vendor
@@ -602,7 +583,7 @@ static int parseConfigEntry(Slapi_Entry *e)
toLowerCase(value);
PL_HashTableAdd(_IdVattrMapTable, value, map);
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> nsIMStatusText [%s] \n",value,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "parseConfigEntry - nsIMStatusText [%s] \n",value);
value = slapi_entry_attr_get_charptr(e, NS_IM_STATUS_GRAPHIC);
if (value) {
@@ -614,35 +595,35 @@ static int parseConfigEntry(Slapi_Entry *e)
PL_HashTableAdd(_IdVattrMapTable, value, map);
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> nsIMStatusGraphic [%s] \n",value,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "parseConfigEntry - nsIMStatusGraphic [%s] \n",value);
value = slapi_entry_attr_get_charptr(e, NS_IM_URL_TEXT);
if (value) {
entry->textURL = value;
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> nsIMURLText [%s] \n",value,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "parseConfigEntry - nsIMURLText [%s] \n",value);
value = slapi_entry_attr_get_charptr(e, NS_IM_URL_GRAPHIC);
if (value) {
entry->graphicURL = value;
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> nsIMStatusGraphic [%s] \n",value,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "parseConfigEntry - nsIMStatusGraphic [%s] \n",value);
value = slapi_entry_attr_get_charptr(e, NS_IM_ON_VALUE_MAP_TEXT);
if (value) {
entry->onTextMap = value;
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> nsIMOnValueMapText [%s] \n",value,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "parseConfigEntry - nsIMOnValueMapText [%s] \n",value);
value = slapi_entry_attr_get_charptr(e, NS_IM_OFF_VALUE_MAP_TEXT);
if (value) {
entry->offTextMap = value;
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> nsIMOffValueMapText [%s] \n",value,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "parseConfigEntry - nsIMOffValueMapText [%s] \n",value);
/**
* Next 3 are binary syntax types so needs special handling
@@ -670,20 +651,20 @@ static int parseConfigEntry(Slapi_Entry *e)
entry->requestMethod = value;
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> nsIMRequestMethod [%s] \n",value,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "parseConfigEntry - nsIMRequestMethod [%s] \n",value);
value = slapi_entry_attr_get_charptr(e, NS_IM_URL_TEXT_RETURN_TYPE);
if (value) {
entry->textReturnType = value;
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> nsIMURLTextReturnType [%s] \n",value,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "parseConfigEntry - nsIMURLTextReturnType [%s] \n",value);
value = slapi_entry_attr_get_charptr(e, NS_IM_URL_GRAPHIC_RETURN_TYPE);
if (value) {
entry->graphicReturnType = value;
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> nsIMURLGraphicReturnType [%s] \n",value,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "parseConfigEntry - nsIMURLGraphicReturnType [%s] \n",value);
/**
* Finally add the entry to the map table
@@ -705,8 +686,8 @@ static int imIDExists(Slapi_Entry *e, char *type, char **value, _Vmap **map, _Co
_ConfigEntry *tEntry = NULL;
_Vmap *tMap = NULL;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> imIDExists \n",0,0,0);
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Type [%s] \n",type,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "--> imIDExists \n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "imIDExists - Type [%s] \n",type,0,0);
/**
* The public function PL_HashTableLookup modifies the
@@ -722,8 +703,8 @@ 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, LOG_ERR, PRESENCE_PLUGIN_SUBSYSTEM,
- "No hashtable for vattr types\n");
+ slapi_log_error(SLAPI_LOG_ERR, PRESENCE_PLUGIN_SUBSYSTEM,
+ "imIDExists - No hashtable for vattr types\n");
goto bail;
}
/**
@@ -739,14 +720,14 @@ static int imIDExists(Slapi_Entry *e, char *type, char **value, _Vmap **map, _Co
status = PRESENCE_FAILURE;
goto bail;
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> Value [%s] \n",tValue,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "-imIDExists - Value [%s] \n",tValue,0,0);
tEntry = PL_HashTableLookupConst(_IdConfigMapTable, tMap->imID);
*value = tValue;
*entry = tEntry;
*map = tMap;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- imIDExists \n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "<-- imIDExists \n");
bail:
return status;
@@ -760,7 +741,7 @@ static int makeHttpRequest(char *id, _Vmap *map, _ConfigEntry *info, char **BUF,
char *urltosend = NULL;
int bytesRead;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> makeHttpRequest:: \n",0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "--> makeHttpRequest\n");
if (map->syntax == PRESENCE_STRING) {
url = info->textURL;
@@ -773,14 +754,14 @@ static int makeHttpRequest(char *id, _Vmap *map, _ConfigEntry *info, char **BUF,
}
urltosend = replaceIdWithValue(url, map->imID, id);
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> URL [%s] \n",urltosend,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "makeHttpRequest - URL [%s] \n",urltosend);
/**
* make an actual HTTP call now
*/
- 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);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "makeHttpRequest - RequestMethod [%s] \n", info->requestMethod);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "makeHttpRequest - Syntax [%d] \n", map->syntax);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "makeHttpRequest - TextReturnType [%s] \n", info->textReturnType);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "makeHttpRequest - GraphicReturnType [%s] \n", info->graphicReturnType);
if (!strcasecmp(info->requestMethod, PRESENCE_REQUEST_METHOD_GET)) {
if (map->syntax == PRESENCE_STRING) {
if (!strcasecmp(info->textReturnType, PRESENCE_TEXT_RETURN_TYPE)) {
@@ -805,8 +786,8 @@ 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, LOG_ERR, PRESENCE_PLUGIN_SUBSYSTEM,
- "Unknown request type <%s>\n", info->requestMethod);
+ slapi_log_error(SLAPI_LOG_ERR, PRESENCE_PLUGIN_SUBSYSTEM,
+ "makeHttpRequest - Unknown request type <%s>\n", info->requestMethod);
status = PRESENCE_FAILURE;
goto bail;
}
@@ -817,7 +798,7 @@ static int makeHttpRequest(char *id, _Vmap *map, _ConfigEntry *info, char **BUF,
}
bail:
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- makeHttpRequest:: <%d>\n",status,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "<-- makeHttpRequest:: <%d>\n",status,0,0);
slapi_ch_free((void**)&urltosend);
return status;
@@ -889,7 +870,7 @@ static int setIMStatus(char *id, _Vmap *map, _ConfigEntry *info,
Slapi_Attr *attr = NULL;
const struct berval *tmp = NULL;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> setIMStatus \n", 0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "--> setIMStatus \n");
/**
* we got some data back so lets try to map it to
* the existing set of on/off data
@@ -932,15 +913,15 @@ static int setIMStatus(char *id, _Vmap *map, _ConfigEntry *info,
bval.bv_val = returnedBUF;
value1 = slapi_value_new_berval(&bval);
- 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);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "setIMStatus - returned size [%d] \n", bval.bv_len);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "setIMStatus - returned value [%s] \n", bval.bv_val);
attr = info->onGraphicMap;
if (attr) {
slapi_attr_first_value(attr, &value2);
tmp = slapi_value_get_berval(value2);
- 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);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "setIMStatus - Stored size [%d] \n", tmp->bv_len);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "setIMStatus - Stored value [%s] \n", tmp->bv_val);
if (!slapi_value_compare(attr, value1, value2)) {
value = slapi_value_new_string(PRESENCE_RETURNED_ON_TEXT);
}
@@ -973,7 +954,7 @@ static int setIMStatus(char *id, _Vmap *map, _ConfigEntry *info,
*/
value = slapi_value_new_string(PRESENCE_RETURNED_ERROR_TEXT);
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> value [%s] \n", returnedBUF,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "setIMStatus - value [%s] \n", returnedBUF);
} else {
/**
* we had send a request for image
@@ -981,7 +962,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, LOG_DEBUG, "----------> value [%s] \n", returnedBUF,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "setIMStatus - value [%s] \n", returnedBUF);
if (!strcasecmp(info->requestMethod, PRESENCE_REQUEST_METHOD_REDIRECT)) {
/**
* a redirect case in which we should probably have a
@@ -1016,7 +997,7 @@ static int setIMStatus(char *id, _Vmap *map, _ConfigEntry *info,
*/
}
} else {
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> value [%s] \n", returnedBUF,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "setIMStatus - value [%s] \n", returnedBUF);
bval.bv_len = size;
bval.bv_val = returnedBUF;
value = slapi_value_new_berval(&bval);
@@ -1037,7 +1018,7 @@ static int setIMStatus(char *id, _Vmap *map, _ConfigEntry *info,
if (value && map->syntax == PRESENCE_STRING) {
slapi_value_free(&value);
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- setIMStatus \n", 0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "<-- setIMStatus \n");
return status;
}
@@ -1056,7 +1037,7 @@ static int setTypes(PLHashEntry *he, PRIntn i, void *arg)
_Vmap *map = (_Vmap *)he->value;
char *id = map->imID;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> setTypes \n", 0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "--> setTypes \n");
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 +1052,9 @@ static int setTypes(PLHashEntry *he, PRIntn i, void *arg)
slapi_vattr_values_free(&results, &actual_type_name, free_flags);
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> ID [%s] Type[%s]\n", actual_type_name,type,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "setTypes - ID [%s] Type[%s]\n", actual_type_name,type);
}
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<-- setTypes \n", 0,0,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "<-- setTypes \n");
return HT_ENUMERATE_NEXT;
}
@@ -1091,15 +1072,15 @@ logGraphicAttributeValue( Slapi_Attr *attr, const char *attrname )
if (v) {
char *ldifvalue;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "----------> %s size [%d] \n",
- attrname,v->bv_len,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "logGraphicAttributeValue - %s size [%d] \n",
+ attrname,v->bv_len);
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, LOG_DEBUG, "----------> %s value [\n%s]\n",
- attrname,ldifvalue,0);
+ slapi_log_error(SLAPI_LOG_PLUGIN, PRESENCE_PLUGIN_SUBSYSTEM, "logGraphicAttributeValue - %s value [\n%s]\n",
+ attrname,ldifvalue);
slapi_ch_free_string( &ldifvalue );
}
}
diff --git a/ldap/servers/plugins/pwdstorage/md5_pwd.c b/ldap/servers/plugins/pwdstorage/md5_pwd.c
index 6dec2ba..0bc8f3c 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, LOG_DEBUG, MD5_SUBSYSTEM_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, MD5_SUBSYSTEM_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, MD5_SUBSYSTEM_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, MD5_SUBSYSTEM_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 889d06a..14ac643 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, LOG_DEBUG, plugin_name, "=> sha_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "<= sha_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "=> ssha_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "<= ssha_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "=> sha256_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "<= sha256_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "=> ssha256_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "<= ssha256_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "=> sha384_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "<= sha384_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "=> ssha384_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "<= ssha384_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "=> sha512_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "<= sha512_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "=> ssha512_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "<= ssha512_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "=> crypt_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "<= crypt_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "=> clear_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "<= clear_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "=> ns_mta_md5_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "<= ns_mta_md5_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "=> md5_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "<= md5_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "=> smd5_pwd_storage_scheme_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "<= smd5_pwd_storage_scheme_init %d\n\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 58940d8..3f624f8 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, LOG_DEBUG, plugin_name, hasherrmsg, schemeName, dbpwd );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, hasherrmsg, schemeName, dbpwd );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "sha_pw_cmp: sha_salted_hash() failed\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 ca98145..128c2c3 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, LOG_DEBUG, SALTED_MD5_SUBSYSTEM_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, SALTED_MD5_SUBSYSTEM_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, SALTED_MD5_SUBSYSTEM_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, SALTED_MD5_SUBSYSTEM_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 f5dfe2f..4bd7432 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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "referint_postop_init failed to "
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "referint_postop_init - Failed to "
"allocate configuration\n" );
return ( -1 );
}
@@ -202,24 +202,24 @@ referint_postop_init( Slapi_PBlock *pb )
for (i=0; plugin_attr_values[i];i++);
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, 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]);
- } else {
- plugin_EntryScope[j++] = slapi_sdn_new_dn_passin(plugin_attr_values[i]);
- }
+ if (slapi_dn_syntax_check(NULL, plugin_attr_values[i], 1) == 1) {
+ slapi_log_error(SLAPI_LOG_WARNING, REFERINT_PLUGIN_SUBSYSTEM,
+ "referint_postop_init - Ignoring invalid DN used as plugin entry scope: [%s]\n",
+ plugin_attr_values[i]);
+ slapi_ch_free_string(&plugin_attr_values[i]);
+ } else {
+ plugin_EntryScope[j++] = slapi_sdn_new_dn_passin(plugin_attr_values[i]);
+ }
}
slapi_ch_free((void**)&plugin_attr_values);
}
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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "Error: Ignoring invalid DN used as plugin exclude entry scope: [%s]\n",
+ slapi_log_error(SLAPI_LOG_WARNING, REFERINT_PLUGIN_SUBSYSTEM,
+ "referint_postop_init - Ignoring invalid DN used as plugin exclude entry scope: [%s]\n",
plugin_attr_value);
- slapi_ch_free_string(&plugin_attr_value);
+ slapi_ch_free_string(&plugin_attr_value);
} else {
plugin_ExcludeEntryScope = slapi_sdn_new_dn_passin(plugin_attr_value);
}
@@ -228,10 +228,10 @@ 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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "Error: Ignoring invalid DN used as plugin container scope: [%s]\n",
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
+ "referint_postop_init - Ignoring invalid DN used as plugin container scope: [%s]\n",
plugin_attr_value);
- slapi_ch_free_string(&plugin_attr_value);
+ slapi_ch_free_string(&plugin_attr_value);
} else {
plugin_ContainerScope = slapi_sdn_new_dn_passin(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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "referint_postop_init failed\n" );
+ slapi_log_error(SLAPI_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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "referint_preop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "referint_postop_init - Preop registration 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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "load_config failed to "
+ slapi_log_error(SLAPI_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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "Plugin configuration is missing %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "load_config - Plugin configuration is missing %s\n",
REFERINT_ATTR_DELAY);
rc = SLAPI_PLUGIN_FAILURE;
} else if (!tmp_config->logfile){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "Plugin configuration is missing %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "load_config - 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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "Plugin configuration is missing %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "load_config - Plugin configuration is missing %s\n",
REFERINT_ATTR_LOGCHANGES);
rc = SLAPI_PLUGIN_FAILURE;
} else if (!tmp_config->attrs){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "Plugin configuration is missing %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "load_config - Plugin configuration is missing %s\n",
REFERINT_ATTR_MEMBERSHIP);
rc = SLAPI_PLUGIN_FAILURE;
}
@@ -359,20 +359,20 @@ 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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "referint_postop failed to get argc\n" );
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
+ "load_config - 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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "referint_postop failed to get argv\n" );
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
+ "load_config - Failed to get argv\n" );
rc = SLAPI_PLUGIN_FAILURE;
goto done;
}
if(argv == NULL){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "referint_postop_del, args are NULL\n" );
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
+ "load_config - args are NULL\n" );
rc = SLAPI_PLUGIN_FAILURE;
goto done;
}
@@ -389,8 +389,8 @@ 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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "referint_postop insufficient arguments supplied\n" );
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
+ "load_config - Insufficient arguments supplied\n" );
rc = SLAPI_PLUGIN_FAILURE;
goto done;
}
@@ -431,7 +431,8 @@ 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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "Failed to update configuration.\n");
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "referint_postop_modify - "
+ "Failed to update configuration.\n");
return SLAPI_PLUGIN_FAILURE;
}
} else if (slapi_sdn_compare(sdn, referint_get_plugin_area()) == 0){
@@ -442,7 +443,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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "referint_postop_modify: "
+ slapi_log_error(SLAPI_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,8 +454,8 @@ 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, LOG_DEBUG, REFERINT_PLUGIN_SUBSYSTEM,
- "referint_postop_modify: Config entry \"%s\" does "
+ slapi_log_error(SLAPI_LOG_PLUGIN, REFERINT_PLUGIN_SUBSYSTEM,
+ "referint_postop_modify - Config entry \"%s\" does "
"not exist.\n", config_area);
rc = LDAP_OPERATIONS_ERROR;
goto bail;
@@ -463,8 +464,8 @@ referint_postop_modify(Slapi_PBlock *pb)
if(e){
config_e = e;
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, REFERINT_PLUGIN_SUBSYSTEM,
- "referint_postop_modify: Config entry \"%s\" was not located.\n", config_area);
+ slapi_log_error(SLAPI_LOG_PLUGIN, REFERINT_PLUGIN_SUBSYSTEM,
+ "referint_postop_modify - Config entry \"%s\" was not located.\n", config_area);
rc = LDAP_OPERATIONS_ERROR;
goto bail;
}
@@ -617,8 +618,8 @@ 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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "referint_postop_del: could not get parameters\n" );
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
+ "referint_postop_del - Could not get parameters\n" );
return SLAPI_PLUGIN_FAILURE;
}
/*
@@ -670,8 +671,8 @@ 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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "referint_postop_modrdn: could not get parameters\n" );
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
+ "referint_postop_modrdn - Could not get parameters\n" );
return SLAPI_PLUGIN_FAILURE;
}
/*
@@ -791,8 +792,8 @@ _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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "_update_one_value: entry %s: deleting \"%s: %s\" failed (%d)"
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
+ "_update_one_per_mod - Entry %s: deleting \"%s: %s\" failed (%d)"
"\n", slapi_sdn_get_dn(entrySDN), attrName, slapi_sdn_get_dn(origDN), rc);
}
} else {
@@ -802,15 +803,15 @@ _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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "_update_one_value: NULL dn was passed\n");
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
+ "_update_one_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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "_update_one_value: failed to explode dn %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
+ "_update_one_per_mod - Failed to explode dn %s\n",
slapi_sdn_get_dn(origDN));
goto bail;
}
@@ -881,8 +882,8 @@ _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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "_update_one_value: entry %s: replacing \"%s: %s\" "
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
+ "_update_one_per_mod - Entry %s: replacing \"%s: %s\" "
"with \"%s: %s\" failed (%d)\n",
slapi_sdn_get_dn(entrySDN), attrName,
slapi_sdn_get_dn(origDN), attrName, newDN, rc);
@@ -911,8 +912,8 @@ _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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "_update_one_value: entry %s: replacing \"%s: %s\" "
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
+ "_update_one_per_mod - Entry %s: replacing \"%s: %s\" "
"with \"%s: %s\" failed (%d)\n",
slapi_sdn_get_dn(entrySDN), attrName, sval, attrName, newvalue, rc);
}
@@ -974,8 +975,8 @@ _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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "_update_all_per_mod: entry %s: deleting \"%s: %s\" failed (%d)"
+ slapi_log_error(SLAPI_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);
}
} else {
@@ -985,15 +986,15 @@ _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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "_update_all_per_mod: NULL dn was passed\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "_update_all_per_mod: failed to explode dn %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
+ "_update_all_per_mod - Failed to explode dn %s\n",
slapi_sdn_get_dn(origDN));
goto bail;
}
@@ -1069,8 +1070,8 @@ _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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "_update_all_per_mod: entry %s failed (%d)\n",
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
+ "_update_all_per_mod - Entry %s failed (%d)\n",
slapi_sdn_get_dn(entrySDN), rc);
}
@@ -1219,8 +1220,8 @@ update_integrity(Slapi_DN *origSDN,
}
} else {
if (isFatalSearchError(search_result)){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "update_integrity search (base=%s filter=%s) returned "
+ slapi_log_error(SLAPI_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;
goto free_and_return;
@@ -1267,7 +1268,7 @@ int referint_postop_start( Slapi_PBlock *pb)
int rc = 0;
if((config_rwlock = slapi_new_rwlock()) == NULL){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "referint_postop_init failed to "
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "referint_postop_start - Failed to "
"create rwlock.\n" );
return ( -1 );
}
@@ -1280,7 +1281,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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "referint_postop_start: "
+ slapi_log_error(SLAPI_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,8 +1292,8 @@ 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, LOG_DEBUG, REFERINT_PLUGIN_SUBSYSTEM,
- "referint_postop_start: Config entry \"%s\" does "
+ slapi_log_error(SLAPI_LOG_PLUGIN, REFERINT_PLUGIN_SUBSYSTEM,
+ "referint_postop_start -Config entry \"%s\" does "
"not exist.\n", config_area);
rc = -1;
goto bail;
@@ -1301,8 +1302,8 @@ int referint_postop_start( Slapi_PBlock *pb)
if(e){
config_e = e;
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, REFERINT_PLUGIN_SUBSYSTEM,
- "referint_postop_start: Config entry \"%s\" was not located.\n", config_area);
+ slapi_log_error(SLAPI_LOG_PLUGIN, REFERINT_PLUGIN_SUBSYSTEM,
+ "referint_postop_start - Config entry \"%s\" was not located.\n", config_area);
rc = -1;
goto bail;
}
@@ -1338,8 +1339,8 @@ int referint_postop_start( Slapi_PBlock *pb)
PR_UNJOINABLE_THREAD,
SLAPD_DEFAULT_THREAD_STACKSIZE);
if ( referint_tid == NULL ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "referint_postop_start PR_CreateThread failed\n" );
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
+ "referint_postop_start - PR_CreateThread failed\n" );
exit( 1 );
}
}
@@ -1455,7 +1456,8 @@ 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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,"Failed to set thread data\n");
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,"referint_thread_func - "
+ "Failed to set thread data\n");
}
}
@@ -1470,8 +1472,8 @@ referint_thread_func(void *arg)
/* remove the original file */
if( PR_SUCCESS != PR_Delete(logfilename) ){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "referint_postop_close could not delete \"%s\"\n", logfilename );
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
+ "referint_thread_func - Could not delete \"%s\"\n", logfilename );
}
/* unlock and let other writers back at the file */
@@ -1590,8 +1592,8 @@ 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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "referint_postop could not write integrity log \"%s\" "
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
+ "writeintegritylog - Could not write integrity log \"%s\" "
SLAPI_COMPONENT_NAME_NSPR " %d (%s)\n",
logfilename, PR_GetError(), slapd_pr_strerror(PR_GetError()) );
@@ -1636,8 +1638,8 @@ writeintegritylog(Slapi_PBlock *pb, char *logfilename, Slapi_DN *sdn,
}
if(len_to_write > MAX_LINE ){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "referint_postop could not write integrity log:"
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
+ "writeintegritylog - Could not write integrity log:"
" line length exceeded. It will not be able"
" to update references to this entry.\n");
} else {
@@ -1646,8 +1648,8 @@ 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, LOG_ERR,REFERINT_PLUGIN_SUBSYSTEM,
- " writeintegritylog: PR_Write failed : The disk"
+ slapi_log_error(SLAPI_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,8 +1658,8 @@ 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, LOG_ERR,REFERINT_PLUGIN_SUBSYSTEM,
- " writeintegritylog: failed to close the file descriptor prfd; NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_ERR,REFERINT_PLUGIN_SUBSYSTEM,
+ " writeintegritylog - Failed to close the file descriptor prfd; NSPR error - %d\n",
PR_GetError());
}
referint_unlock();
@@ -1672,8 +1674,8 @@ 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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
- "referint_preop_init: failed to register plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM,
+ "referint_preop_init - Failed to register plugin\n");
status = -1;
}
@@ -1700,7 +1702,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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "referint_validate_config: Null pre op entry.\n");
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "referint_validate_config - Null pre op entry.\n");
rc = LDAP_OPERATIONS_ERROR;
goto bail;
}
@@ -1724,7 +1726,7 @@ referint_validate_config(Slapi_PBlock *pb)
}
if ( SLAPI_PLUGIN_FAILURE == load_config(pb, resulting_entry, 0)) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "referint_validate_config: "
+ slapi_log_error(SLAPI_LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "referint_validate_config - "
"configuration validation failed.\n");
rc = LDAP_UNWILLING_TO_PERFORM;
goto bail;
@@ -1748,7 +1750,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, LOG_ERR, REFERINT_PLUGIN_SUBSYSTEM, "referint_validate_config: "
+ slapi_log_error(SLAPI_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,8 +1760,8 @@ 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, LOG_DEBUG, REFERINT_PLUGIN_SUBSYSTEM,
- "referint_validate_config: Config entry \"%s\" couild not be found, error %d\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, REFERINT_PLUGIN_SUBSYSTEM,
+ "referint_validate_config - Config entry \"%s\" couild not be found, error %d\n",
config_area, rc);
rc = LDAP_OPERATIONS_ERROR;
goto bail;
@@ -1767,8 +1769,8 @@ referint_validate_config(Slapi_PBlock *pb)
if(e){
config_e = e;
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, REFERINT_PLUGIN_SUBSYSTEM,
- "referint_validate_config: Config entry \"%s\" was not located.\n", config_area);
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 047a91b..788c8c7 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, LOG_ERR, repl_plugin_name, "cl4Init: failed to create CSN pending list\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "cl4WriteEntry: invalid entry\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "cl4WriteEntry: failed to write changelog entry\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "cl4ChangeTargetDN: invalid argument\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "cl4AssignChangeNumbers: failed to resolve target dn\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "_cl4AssignCSNCallback: null csn\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "_cl4AbortCSNCallback: null csn\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "_cl4GetEntry: failed to get next changelog entry\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "_cl4ResolveTargetDN: failed to get target entry\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "_cl4ResolveTargetDN: failed to get target entry dn\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "_cl4GetTargetEntry: entry (%s) not found\n",
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "_cl4GetTargetEntry: entry (%s) not found\n",
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "_cl4FindTargetDN: no entries much filter (%s)\n",
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "_cl4FindTargetDN: no entries much filter (%s)\n",
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "_cl4UpdateEntry: invalid argument\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "_cl4UpdateEntry: failed to create entry dn\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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 408010d..c020364 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "Error: the changelog database could "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "Error: the changelog database could "
+ slapi_log_error(SLAPI_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, LOG_DEBUG, repl_plugin_name, "New database generation computed. "
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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 9ae46ba..f1cc54c 100644
--- a/ldap/servers/plugins/replication/cl5_api.c
+++ b/ldap/servers/plugins/replication/cl5_api.c
@@ -366,23 +366,23 @@ int cl5Init(void)
s_cl5Desc.stLock = slapi_new_rwlock();
if (s_cl5Desc.stLock == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "cl5Init: failed to create state lock; NSPR error - %d\n",
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
- "cl5Init: failed to create on close lock; NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5Init - Failed to create on close lock; NSPR error - %d\n",
PR_GetError ());
return CL5_SYSTEM_ERROR;
}
if ((s_cl5Desc.clCvar = PR_NewCondVar(s_cl5Desc.clLock)) == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "cl5Init: failed to create on close cvar; NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5Init - Failed to create on close cvar; NSPR error - %d\n",
PR_GetError ());
return CL5_SYSTEM_ERROR;
}
@@ -451,14 +451,14 @@ int cl5Open (const char *dir, const CL5DBConfig *config)
if (dir == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "cl5Open: null directory\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
- "cl5Open: changelog is not initialized\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5Open - Changelog is not initialized\n");
return CL5_BAD_STATE;
}
@@ -468,15 +468,15 @@ int cl5Open (const char *dir, const CL5DBConfig *config)
/* already open - ignore */
if (s_cl5Desc.dbState == CL5_STATE_OPEN)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5Open: changelog already opened; request ignored\n");
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_ERR, repl_plugin_name_cl,
- "cl5Open: invalid state - %d\n", s_cl5Desc.dbState);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5Open - Invalid state - %d\n", s_cl5Desc.dbState);
rc = CL5_BAD_STATE;
goto done;
}
@@ -484,8 +484,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "cl5Open: failed to open changelog\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5Open - Failed to open changelog\n");
goto done;
}
@@ -493,8 +493,8 @@ int cl5Open (const char *dir, const CL5DBConfig *config)
rc = _cl5DispatchDBThreads ();
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "cl5Open: failed to start database monitoring threads\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5Open - Failed to start database monitoring threads\n");
_cl5Close ();
}
@@ -528,8 +528,8 @@ int cl5Close ()
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5Close: changelog is not initialized\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5Close - Changelog is not initialized\n");
return CL5_BAD_STATE;
}
@@ -538,15 +538,15 @@ int cl5Close ()
/* already closed - ignore */
if (s_cl5Desc.dbState == CL5_STATE_CLOSED)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name_cl,
- "cl5Close: changelog closed; request ignored\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, repl_plugin_name_cl,
- "cl5Close: invalid state - %d\n", s_cl5Desc.dbState);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5Close - Invalid state - %d\n", s_cl5Desc.dbState);
slapi_rwlock_unlock (s_cl5Desc.stLock);
return CL5_BAD_STATE;
}
@@ -581,14 +581,14 @@ int cl5Delete (const char *dir)
if (dir == NULL)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name_cl, "cl5Delete: null directory\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, repl_plugin_name_cl,
- "cl5Delete: changelog is not initialized\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5Delete - Changelog is not initialized\n");
return CL5_BAD_STATE;
}
@@ -596,8 +596,8 @@ int cl5Delete (const char *dir)
if (s_cl5Desc.dbState != CL5_STATE_CLOSED)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5Delete: invalid state - %d\n", s_cl5Desc.dbState);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5Delete - Invalid state - %d\n", s_cl5Desc.dbState);
slapi_rwlock_unlock (s_cl5Desc.stLock);
return CL5_BAD_STATE;
}
@@ -605,8 +605,8 @@ int cl5Delete (const char *dir)
rc = _cl5Delete (dir, PR_TRUE /* remove changelog dir */);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5Delete: failed to remove changelog\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5Delete - Failed to remove changelog\n");
}
slapi_rwlock_unlock (s_cl5Desc.stLock);
@@ -625,16 +625,16 @@ int cl5DeleteDBSync (Object *replica)
if (replica == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5DeleteDBSync: invalid database id\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5DeleteDBSync - invalid database id\n");
return CL5_BAD_DATA;
}
/* changelog is not initialized */
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "cl5DeleteDBSync: "
- "changelog is not initialized\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "cl5DeleteDBSync - "
+ "Changelog is not initialized\n");
return CL5_BAD_STATE;
}
@@ -665,8 +665,8 @@ int cl5DeleteDBSync (Object *replica)
{
Replica *r = (Replica*)object_get_data (replica);
PR_ASSERT (r);
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "cl5DeleteDBSync: "
- "file for replica at (%s) not found\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "cl5DeleteDBSync - "
+ "File for replica at (%s) not found\n",
slapi_sdn_get_dn (replica_get_root (r)));
}
@@ -693,16 +693,16 @@ int cl5GetUpperBoundRUV (Replica *r, RUV **ruv)
if (r == NULL || ruv == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5GetUpperBoundRUV: invalid parameters\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5GetUpperBoundRUV - Invalid parameters\n");
return CL5_BAD_DATA;
}
/* changelog is not initialized */
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "cl5GetUpperBoundRUV: "
- "changelog is not initialized\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "cl5GetUpperBoundRUV - "
+ "Changelog is not initialized\n");
return CL5_BAD_STATE;
}
@@ -726,8 +726,8 @@ int cl5GetUpperBoundRUV (Replica *r, RUV **ruv)
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "cl5GetUpperBoundRUV: "
- "could not find DB object for replica\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "cl5GetUpperBoundRUV - "
+ "Could not find DB object for replica\n");
}
object_release (r_obj);
@@ -759,15 +759,15 @@ int cl5ExportLDIF (const char *ldifFile, Object **replicas)
if (ldifFile == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "cl5ExportLDIF: null ldif file name\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
- "cl5ExportLDIF: changelog is not initialized\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
- "cl5ExportLDIF: failed to open (%s) file; NSPR error - %d\n",
+ slapi_log_error(SLAPI_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, LOG_DEBUG, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name_cl,
"cl5ExportLDIF: starting changelog export to (%s) ...\n", ldifFile);
if (replicas) /* export only selected files */
@@ -805,8 +805,8 @@ int cl5ExportLDIF (const char *ldifFile, Object **replicas)
PR_ASSERT (r);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "cl5ExportLDIF: "
- "failed to locate changelog file for replica at (%s)\n",
+ slapi_log_error(SLAPI_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,8 +826,8 @@ done:;
_cl5RemoveThread ();
if (rc == CL5_SUCCESS)
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name_cl,
- "cl5ExportLDIF: changelog export is finished.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name_cl,
+ "cl5ExportLDIF - Changelog export is finished.\n");
if (prFile)
PR_Close (prFile);
@@ -878,22 +878,22 @@ cl5ImportLDIF (const char *clDir, const char *ldifFile, Object **replicas)
/* validate params */
if (ldifFile == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "cl5ImportLDIF: null ldif file name\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
- "cl5ImportLDIF: changelog is not initialized\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
- "cl5ImportLDIF: null list of replicas\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5ImportLDIF - null list of replicas\n");
return CL5_BAD_DATA;
}
@@ -901,8 +901,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "cl5ImportLDIF: empty replica list\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5ImportLDIF - empty replica list\n");
return CL5_BAD_DATA;
}
prim_replica = (Replica*)object_get_data(prim_replica_obj);
@@ -913,8 +913,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "cl5ImportLDIF: invalid state - %d \n", s_cl5Desc.dbState);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5ImportLDIF - Invalid state - %d \n", s_cl5Desc.dbState);
slapi_rwlock_unlock (s_cl5Desc.stLock);
return CL5_BAD_STATE;
@@ -928,8 +928,8 @@ cl5ImportLDIF (const char *clDir, const char *ldifFile, Object **replicas)
#endif
if (file == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "cl5ImportLDIF: failed to open (%s) ldif file; system error - %d\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5ImportLDIF - Failed to open (%s) ldif file; system error - %d\n",
ldifFile, errno);
rc = CL5_SYSTEM_ERROR;
goto done;
@@ -939,8 +939,8 @@ cl5ImportLDIF (const char *clDir, const char *ldifFile, Object **replicas)
rc = _cl5Delete (clDir, PR_FALSE);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "cl5ImportLDIF: failed to remove changelog\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5ImportLDIF - Failed to remove changelog\n");
goto done;
}
@@ -948,8 +948,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "cl5ImportLDIF: failed to open changelog\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5ImportLDIF - Failed to open changelog\n");
goto done;
}
s_cl5Desc.dbState = CL5_STATE_OPEN; /* force to change the state */
@@ -1040,9 +1040,9 @@ cl5ImportLDIF (const char *clDir, const char *ldifFile, Object **replicas)
replGen, &op, 1);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "cl5ImportLDIF: "
- "failed to write operation to the changelog: "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5ImportLDIF - "
+ "Failed to write operation to the changelog: "
"type: %lu, dn: %s\n",
op.operation_type, REPL_GET_DN(&op.target_address));
slapi_ch_free_string(&replGen);
@@ -1060,9 +1060,9 @@ cl5ImportLDIF (const char *clDir, const char *ldifFile, Object **replicas)
replGen, &op, 1);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "cl5ImportLDIF: "
- "failed to write operation to the changelog: "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5ImportLDIF - "
+ "Failed to write operation to the changelog: "
"type: %lu, dn: %s\n",
op.operation_type, REPL_GET_DN(&op.target_address));
object_release (replica_obj);
@@ -1157,16 +1157,16 @@ cl5ConfigTrimming (int maxEntries, const char *maxAge, int compactInterval, int
{
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "cl5ConfigTrimming: changelog is not initialized\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5ConfigTrimming - Changelog is not initialized\n");
return CL5_BAD_STATE;
}
/* make sure changelog is not closed while trimming configuration
is updated.*/
if (CL5_SUCCESS != _cl5AddThread ()) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "cl5ConfigTrimming: could not start changelog trimming thread\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5ConfigTrimming - Could not start changelog trimming thread\n");
return CL5_BAD_STATE;
}
@@ -1233,26 +1233,26 @@ int cl5GetOperation (Object *replica, slapi_operation_parameters *op)
if (replica == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "cl5GetOperation: NULL replica\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "cl5GetOperation - NULL replica\n");
return CL5_BAD_DATA;
}
if (op == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "cl5GetOperation: NULL operation\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "cl5GetOperation - NULL operation\n");
return CL5_BAD_DATA;
}
if (op->csn == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "%s: cl5GetOperation: operation contains no CSN\n", agmt_name);
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name_cl,
- "%s: cl5GetOperation: changelog is not initialized\n", agmt_name);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5GetOperation - %s - Changelog is not initialized\n", agmt_name);
return CL5_BAD_STATE;
}
@@ -1287,8 +1287,8 @@ int cl5GetFirstOperation (Object *replica, slapi_operation_parameters *op, void
if (replica == NULL || op == NULL || iterator == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5GetFirstOperation: invalid argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5GetFirstOperation - Invalid argument\n");
return CL5_BAD_DATA;
}
@@ -1297,8 +1297,8 @@ 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, LOG_DEBUG, repl_plugin_name_cl,
- "%s: cl5GetFirstOperation: changelog is not initialized\n", agmt_name);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5GetFirstOperation - %s - Changelog is not initialized\n", agmt_name);
return CL5_BAD_STATE;
}
@@ -1341,15 +1341,15 @@ int cl5GetNextOperation (slapi_operation_parameters *op, void *iterator)
if (op == NULL || iterator == NULL || !_cl5IsValidIterator (iterator))
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5GetNextOperation: invalid argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name_cl,
- "cl5GetNextOperation: changelog is not open\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5GetNextOperation - Changelog is not open\n");
return CL5_BAD_STATE;
}
@@ -1405,8 +1405,8 @@ int cl5WriteOperationTxn(const char *replName, const char *replGen,
if (op == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5WriteOperation: NULL operation passed\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5WriteOperationTxn - NULL operation passed\n");
return CL5_BAD_DATA;
}
@@ -1418,8 +1418,8 @@ int cl5WriteOperationTxn(const char *replName, const char *replGen,
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5WriteOperation: changelog is not initialized\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5WriteOperationTxn - Changelog is not initialized\n");
return CL5_BAD_STATE;
}
@@ -1511,8 +1511,8 @@ 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, LOG_DEBUG, repl_plugin_name_cl,
- "cl5CreateReplayIteratorEx: invalid parameter\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5CreateReplayIteratorEx - Invalid parameter\n");
return CL5_BAD_DATA;
}
@@ -1520,8 +1520,8 @@ int cl5CreateReplayIteratorEx (Private_Repl_Protocol *prp, const RUV *consumerRu
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5CreateReplayIteratorEx: changelog is not initialized\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5CreateReplayIteratorEx - Changelog is not initialized\n");
return CL5_BAD_STATE;
}
@@ -1540,8 +1540,8 @@ int cl5CreateReplayIteratorEx (Private_Repl_Protocol *prp, const RUV *consumerRu
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5CreateReplayIteratorEx: could not find DB object for replica\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5CreateReplayIteratorEx - Could not find DB object for replica\n");
}
if (rc != CL5_SUCCESS)
@@ -1572,8 +1572,8 @@ 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, LOG_DEBUG, repl_plugin_name_cl,
- "cl5CreateReplayIterator: invalid parameter\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5CreateReplayIterator - Invalid parameter\n");
return CL5_BAD_DATA;
}
@@ -1581,8 +1581,8 @@ int cl5CreateReplayIterator (Private_Repl_Protocol *prp, const RUV *consumerRuv,
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5CreateReplayIterator: changelog is not initialized\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5CreateReplayIterator - Changelog is not initialized\n");
return CL5_BAD_STATE;
}
@@ -1601,8 +1601,8 @@ int cl5CreateReplayIterator (Private_Repl_Protocol *prp, const RUV *consumerRuv,
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5CreateReplayIterator: could not find DB object for replica\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5CreateReplayIterator - Could not find DB object for replica\n");
}
if (rc != CL5_SUCCESS)
@@ -1654,8 +1654,8 @@ cl5GetNextOperationToReplay (CL5ReplayIterator *iterator, CL5Entry *entry)
if (entry == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "%s: cl5GetNextOperationToReplay: invalid parameter passed\n", agmt_name);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5GetNextOperationToReplay - %s - Invalid parameter passed\n", agmt_name);
return CL5_BAD_DATA;
}
@@ -1672,8 +1672,8 @@ cl5GetNextOperationToReplay (CL5ReplayIterator *iterator, CL5Entry *entry)
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "%s: cl5GetNextOperationToReplay: "
- "failed to read next entry; DB error %d\n", agmt_name, rc);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl, "cl5GetNextOperationToReplay - %s - "
+ "Failed to read next entry; DB error %d\n", agmt_name, rc);
return CL5_DB_ERROR;
}
@@ -1691,8 +1691,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "%s: cl5GetNextOperationToReplay: failed to format entry rc=%d\n", agmt_name, rc);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5GetNextOperationToReplay - %s - Failed to format entry rc=%d\n", agmt_name, rc);
return rc;
}
@@ -1708,8 +1708,8 @@ void cl5DestroyReplayIterator (CL5ReplayIterator **iterator)
{
if (iterator == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5DestroyReplayIterator: invalid iterartor passed\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5DestroyReplayIterator - Invalid iterator passed\n");
return;
}
@@ -1793,8 +1793,8 @@ int cl5GetOperationCount (Object *replica)
if (s_cl5Desc.dbState == CL5_STATE_NONE)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5GetOperationCount: changelog is not initialized\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5GetOperationCount - Changelog is not initialized\n");
return -1;
}
@@ -1824,14 +1824,14 @@ int cl5GetOperationCount (Object *replica)
PR_ASSERT (file);
count = file->entryCount;
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5GetOperationCount: found DB object %p\n", obj);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5GetOperationCount - Found DB object %p\n", obj);
object_release (obj);
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5GetOperationCount: could not get DB object for replica\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5GetOperationCount - Could not get DB object for replica\n");
count = 0;
}
}
@@ -1863,8 +1863,8 @@ static int _cl5Open (const char *dir, const CL5DBConfig *config, CL5OpenMode ope
rc = _cl5TrimInit ();
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5Open: failed to initialize trimming\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5Open - Failed to initialize trimming\n");
goto done;
}
@@ -1872,8 +1872,8 @@ static int _cl5Open (const char *dir, const CL5DBConfig *config, CL5OpenMode ope
rc = cl5CreateDirIfNeeded (dir);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5Open: failed to create changelog directory (%s)\n", dir);
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name_cl, "_cl5Open: invalid db version\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5Open - Invalid db version\n");
goto done;
}
@@ -1896,8 +1896,8 @@ static int _cl5Open (const char *dir, const CL5DBConfig *config, CL5OpenMode ope
rc = _cl5AppInit ();
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5Open: failed to initialize db environment\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5Open - Failed to initialize db environment\n");
goto done;
}
@@ -1911,8 +1911,8 @@ static int _cl5Open (const char *dir, const CL5DBConfig *config, CL5OpenMode ope
rc = _cl5DBOpen ();
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5Open: failed to open changelog database\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5Open - Failed to open changelog database\n");
goto done;
}
@@ -1959,8 +1959,8 @@ int cl5CreateDirIfNeeded (const char *dirName)
rc = PR_MkDir (buff, DIR_CREATE_MODE);
if (rc != PR_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5CreateDirIfNeeded: failed to create dir (%s); NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5CreateDirIfNeeded - Failed to create dir (%s); NSPR error - %d\n",
dirName, PR_GetError ());
return CL5_SYSTEM_ERROR;
}
@@ -1975,8 +1975,8 @@ int cl5CreateDirIfNeeded (const char *dirName)
rc = PR_MkDir (buff, DIR_CREATE_MODE);
if (rc != PR_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5CreateDirIfNeeded: failed to create dir; NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5CreateDirIfNeeded - Failed to create dir; NSPR error - %d\n",
PR_GetError ());
return CL5_SYSTEM_ERROR;
}
@@ -2011,8 +2011,8 @@ static int _cl5AppInit (void)
if (rc == 0 && dbEnv && pagesize)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5AppInit: fetched backend dbEnv (%p)\n", dbEnv);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5AppInit - Fetched backend dbEnv (%p)\n", dbEnv);
s_cl5Desc.dbEnv = dbEnv;
s_cl5Desc.dbEnvOpenFlags = openflags;
s_cl5Desc.dbConfig.pageSize = pagesize;
@@ -2020,8 +2020,8 @@ static int _cl5AppInit (void)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5AppInit: failed to fetch backend dbenv (%p) and/or "
+ slapi_log_error(SLAPI_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,8 +2043,8 @@ static int _cl5DBOpen ()
dir = PR_OpenDir(s_cl5Desc.dbDir);
if (dir == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5DBOpen: failed to open changelog dir; NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name_cl, "_cl5DBOpen: "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBOpen - "
"Error opening file %s\n",
entry->name);
return rc;
@@ -2081,8 +2081,8 @@ static int _cl5DBOpen ()
else /* there is no matching replica for the file - remove */
{
char fullpathname[MAXPATHLEN];
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "_cl5DBOpen: "
- "file %s has no matching replica; removing\n", entry->name);
+ slapi_log_error(SLAPI_LOG_REPL, 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);
rc = s_cl5Desc.dbEnv->dbremove(s_cl5Desc.dbEnv,
@@ -2090,14 +2090,14 @@ static int _cl5DBOpen ()
DEFAULT_DB_ENV_OP_FLAGS);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5DBOpen: failed to remove (%s) file; "
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_ERR, repl_plugin_name_cl,
- "_cl5DBOpen: failed to remove (%s) file; "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5DBOpen - Failed to remove (%s) file; "
"nspr error - %d (%s)\n",
fullpathname, prerr, slapd_pr_strerror(prerr));
}
@@ -2106,8 +2106,8 @@ static int _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);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBOpen - "
+ "Opened %d existing databases in %s\n", count, s_cl5Desc.dbDir);
PR_CloseDir(dir);
return CL5_SUCCESS;
@@ -2147,58 +2147,62 @@ static int _cl5Entry2DBData (const CL5Entry *entry, char **data, PRUint32 *len)
switch (op->operation_type)
{
- case SLAPI_OPERATION_ADD: if (op->p.p_add.parentuniqueid)
- size += strlen (op->p.p_add.parentuniqueid) + 1;
- else
- size ++; /* we just store NULL char */
- slapi_entry2mods (op->p.p_add.target_entry, &rawDN/* dn */, &add_mods);
- size += strlen (rawDN) + 1;
- /* Need larger buffer for the encrypted changelog */
- if (s_cl5Desc.clcrypt_handle) {
- size += (_cl5GetModsSize (add_mods) * (1 + BACK_CRYPT_OUTBUFF_EXTLEN));
- } else {
- size += _cl5GetModsSize (add_mods);
- }
- break;
+ case SLAPI_OPERATION_ADD:
+ if (op->p.p_add.parentuniqueid)
+ size += strlen (op->p.p_add.parentuniqueid) + 1;
+ else
+ size ++; /* we just store NULL char */
+ slapi_entry2mods (op->p.p_add.target_entry, &rawDN/* dn */, &add_mods);
+ size += strlen (rawDN) + 1;
+ /* Need larger buffer for the encrypted changelog */
+ if (s_cl5Desc.clcrypt_handle) {
+ size += (_cl5GetModsSize (add_mods) * (1 + BACK_CRYPT_OUTBUFF_EXTLEN));
+ } else {
+ size += _cl5GetModsSize (add_mods);
+ }
+ break;
- case SLAPI_OPERATION_MODIFY: size += REPL_GET_DN_LEN(&op->target_address) + 1;
- /* Need larger buffer for the encrypted changelog */
- if (s_cl5Desc.clcrypt_handle) {
- size += (_cl5GetModsSize (op->p.p_modify.modify_mods) * (1 + BACK_CRYPT_OUTBUFF_EXTLEN));
- } else {
- size += _cl5GetModsSize (op->p.p_modify.modify_mods);
- }
- break;
+ case SLAPI_OPERATION_MODIFY:
+ size += REPL_GET_DN_LEN(&op->target_address) + 1;
+ /* Need larger buffer for the encrypted changelog */
+ if (s_cl5Desc.clcrypt_handle) {
+ size += (_cl5GetModsSize (op->p.p_modify.modify_mods) * (1 + BACK_CRYPT_OUTBUFF_EXTLEN));
+ } else {
+ size += _cl5GetModsSize (op->p.p_modify.modify_mods);
+ }
+ break;
- case SLAPI_OPERATION_MODRDN: size += REPL_GET_DN_LEN(&op->target_address) + 1;
- /* 1 for deleteoldrdn */
- size += strlen (op->p.p_modrdn.modrdn_newrdn) + 2;
- if (REPL_GET_DN(&op->p.p_modrdn.modrdn_newsuperior_address))
- size += REPL_GET_DN_LEN(&op->p.p_modrdn.modrdn_newsuperior_address) + 1;
- else
- size ++; /* for NULL char */
- if (op->p.p_modrdn.modrdn_newsuperior_address.uniqueid)
- size += strlen (op->p.p_modrdn.modrdn_newsuperior_address.uniqueid) + 1;
- else
- size ++; /* for NULL char */
- /* Need larger buffer for the encrypted changelog */
- if (s_cl5Desc.clcrypt_handle) {
- size += (_cl5GetModsSize (op->p.p_modrdn.modrdn_mods) * (1 + BACK_CRYPT_OUTBUFF_EXTLEN));
- } else {
- size += _cl5GetModsSize (op->p.p_modrdn.modrdn_mods);
- }
- break;
+ case SLAPI_OPERATION_MODRDN:
+ size += REPL_GET_DN_LEN(&op->target_address) + 1;
+ /* 1 for deleteoldrdn */
+ size += strlen (op->p.p_modrdn.modrdn_newrdn) + 2;
+ if (REPL_GET_DN(&op->p.p_modrdn.modrdn_newsuperior_address))
+ size += REPL_GET_DN_LEN(&op->p.p_modrdn.modrdn_newsuperior_address) + 1;
+ else
+ size ++; /* for NULL char */
+ if (op->p.p_modrdn.modrdn_newsuperior_address.uniqueid)
+ size += strlen (op->p.p_modrdn.modrdn_newsuperior_address.uniqueid) + 1;
+ else
+ size ++; /* for NULL char */
+ /* Need larger buffer for the encrypted changelog */
+ if (s_cl5Desc.clcrypt_handle) {
+ size += (_cl5GetModsSize (op->p.p_modrdn.modrdn_mods) * (1 + BACK_CRYPT_OUTBUFF_EXTLEN));
+ } else {
+ size += _cl5GetModsSize (op->p.p_modrdn.modrdn_mods);
+ }
+ break;
- case SLAPI_OPERATION_DELETE: size += REPL_GET_DN_LEN(&op->target_address) + 1;
- break;
+ case SLAPI_OPERATION_DELETE:
+ size += REPL_GET_DN_LEN(&op->target_address) + 1;
+ break;
}
/* allocate data buffer */
(*data) = slapi_ch_malloc (size);
if ((*data) == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5Entry2DBData: failed to allocate data buffer\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5Entry2DBData - Failed to allocate data buffer\n");
return CL5_MEMORY_ERROR;
}
@@ -2250,8 +2254,8 @@ static int _cl5Entry2DBData (const CL5Entry *entry, char **data, PRUint32 *len)
(*len) = pos - *data;
if (*len > size) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5Entry2DBData: real len %d > estimated size %d\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5Entry2DBData - real len %d > estimated size %d\n",
*len, size);
return CL5_MEMORY_ERROR;
}
@@ -2294,8 +2298,8 @@ cl5DBData2Entry (const char *data, PRUint32 len, CL5Entry *entry)
version = (PRUint8)(*pos);
if (version != V_5)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "cl5DBData2Entry: invalid data version\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5DBData2Entry - Invalid data version\n");
return CL5_BAD_FORMAT;
}
@@ -2327,42 +2331,46 @@ cl5DBData2Entry (const char *data, PRUint32 len, CL5Entry *entry)
/* figure out what else we need to read depending on the operation type */
switch (op->operation_type)
{
- case SLAPI_OPERATION_ADD: _cl5ReadString (&op->p.p_add.parentuniqueid, &pos);
+ case SLAPI_OPERATION_ADD:
+ _cl5ReadString (&op->p.p_add.parentuniqueid, &pos);
/* richm: need to free parentuniqueid */
- _cl5ReadString (&rawDN, &pos);
- op->target_address.sdn = slapi_sdn_new_dn_passin(rawDN);
- /* convert mods to entry */
- rc = _cl5ReadMods (&add_mods, &pos);
- slapi_mods2entry (&(op->p.p_add.target_entry), rawDN, add_mods);
- ldap_mods_free (add_mods, 1);
- break;
+ _cl5ReadString (&rawDN, &pos);
+ op->target_address.sdn = slapi_sdn_new_dn_passin(rawDN);
+ /* convert mods to entry */
+ rc = _cl5ReadMods (&add_mods, &pos);
+ slapi_mods2entry (&(op->p.p_add.target_entry), rawDN, add_mods);
+ ldap_mods_free (add_mods, 1);
+ break;
- case SLAPI_OPERATION_MODIFY: _cl5ReadString (&rawDN, &pos);
- op->target_address.sdn = slapi_sdn_new_dn_passin(rawDN);
- rc = _cl5ReadMods (&op->p.p_modify.modify_mods, &pos);
- break;
+ case SLAPI_OPERATION_MODIFY:
+ _cl5ReadString (&rawDN, &pos);
+ op->target_address.sdn = slapi_sdn_new_dn_passin(rawDN);
+ rc = _cl5ReadMods (&op->p.p_modify.modify_mods, &pos);
+ break;
- case SLAPI_OPERATION_MODRDN: _cl5ReadString (&rawDN, &pos);
- op->target_address.sdn = slapi_sdn_new_dn_passin(rawDN);
- _cl5ReadString (&op->p.p_modrdn.modrdn_newrdn, &pos);
- op->p.p_modrdn.modrdn_deloldrdn = *pos;
- pos ++;
- _cl5ReadString (&rawDN, &pos);
- op->p.p_modrdn.modrdn_newsuperior_address.sdn = slapi_sdn_new_dn_passin(rawDN);
- _cl5ReadString (&op->p.p_modrdn.modrdn_newsuperior_address.uniqueid, &pos);
- rc = _cl5ReadMods (&op->p.p_modrdn.modrdn_mods, &pos);
- break;
+ case SLAPI_OPERATION_MODRDN:
+ _cl5ReadString (&rawDN, &pos);
+ op->target_address.sdn = slapi_sdn_new_dn_passin(rawDN);
+ _cl5ReadString (&op->p.p_modrdn.modrdn_newrdn, &pos);
+ op->p.p_modrdn.modrdn_deloldrdn = *pos;
+ pos ++;
+ _cl5ReadString (&rawDN, &pos);
+ op->p.p_modrdn.modrdn_newsuperior_address.sdn = slapi_sdn_new_dn_passin(rawDN);
+ _cl5ReadString (&op->p.p_modrdn.modrdn_newsuperior_address.uniqueid, &pos);
+ rc = _cl5ReadMods (&op->p.p_modrdn.modrdn_mods, &pos);
+ break;
- case SLAPI_OPERATION_DELETE: _cl5ReadString (&rawDN, &pos);
- op->target_address.sdn = slapi_sdn_new_dn_passin(rawDN);
- rc = CL5_SUCCESS;
- break;
+ case SLAPI_OPERATION_DELETE:
+ _cl5ReadString (&rawDN, &pos);
+ op->target_address.sdn = slapi_sdn_new_dn_passin(rawDN);
+ rc = CL5_SUCCESS;
+ break;
- default: rc = CL5_BAD_FORMAT;
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
- repl_plugin_name_cl,
- "cl5DBData2Entry: failed to format entry\n");
- break;
+ default:
+ rc = CL5_BAD_FORMAT;
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5DBData2Entry - Failed to format entry\n");
+ break;
}
return rc;
@@ -2378,9 +2386,9 @@ static int _cl5DispatchDBThreads(void)
PR_UNJOINABLE_THREAD, DEFAULT_THREAD_STACKSIZE);
if (NULL == pth)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5DispatchDBThreads: failed to create trimming "
- "thread; NSPR error - %d\n", PR_GetError ());
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5DispatchDBThreads - Failed to create trimming thread"
+ "; NSPR error - %d\n", PR_GetError ());
return CL5_SYSTEM_ERROR;
}
@@ -2397,8 +2405,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "_cl5AddThread: invalid changelog state - %d\n", s_cl5Desc.dbState);
+ slapi_log_error(SLAPI_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,8 +2558,8 @@ _cl5WriteMod (LDAPMod *mod, char **buff)
/* successfully encrypted. use the encrypted bv */
bv_to_use = encbv;
} else { /* failed */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5WriteMod: encrypting \"%s: %s\" failed\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5WriteMod - Encrypting \"%s: %s\" failed\n",
slapi_mod_get_type(&smod), bv->bv_val);
bv_to_use = NULL;
rc = -1;
@@ -2676,8 +2684,8 @@ static int _cl5ReadMod (Slapi_Mod *smod, char **buff)
ptr += 3;
}
*ptr = '\0';
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5ReadMod: decrypting \"%s: %s\" failed\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5ReadMod - Decrypting \"%s: %s\" failed\n",
slapi_mod_get_type(smod), encstr);
bv_to_use = NULL;
}
@@ -2881,8 +2889,8 @@ static int _cl5UpgradeMajor(char *fromVersion, char *toVersion)
rc = _cl5AppInit ();
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5UpgradeMajor: failed to open the db env\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5UpgradeMajor - Failed to open the db env\n");
return rc;
}
s_cl5Desc.dbOpenMode = backup;
@@ -2890,8 +2898,8 @@ static int _cl5UpgradeMajor(char *fromVersion, char *toVersion)
dir = PR_OpenDir(s_cl5Desc.dbDir);
if (dir == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5UpgradeMajor: failed to open changelog dir %s; NSPR error - %d\n",
+ slapi_log_error(SLAPI_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,8 +2931,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "_cl5UpgradeMajor: failed to get db handle\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5UpgradeMajor - Failed to get db handle\n");
goto out;
}
@@ -2934,14 +2942,14 @@ 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, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5UpgradeMajor: renaming %s to %s\n", oName, nName);
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5UpgradeMajor: failed to rename file (%s -> %s); "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5UpgradeMajor - Failed to rename file (%s -> %s); "
"db error - %d %s\n", oName, nName, rc, db_strerror(rc));
break;
}
@@ -2949,8 +2957,8 @@ static int _cl5UpgradeMajor(char *fromVersion, char *toVersion)
}
/* update the version file */
_cl5WriteDBVersion ();
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "Upgrading from %s to %s is successfully done (%s)\n",
+ slapi_log_error(SLAPI_LOG_INFO, repl_plugin_name_cl,
+ "_cl5UpgradeMajor - Upgrading from %s to %s is successfully done (%s)\n",
fromVersion, toVersion, s_cl5Desc.dbDir);
out:
if (NULL != dir)
@@ -2976,16 +2984,16 @@ static int _cl5UpgradeMinor(char *fromVersion, char *toVersion)
rc = _cl5AppInit ();
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5UpgradeMinor: failed to open the db env\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5UpgradeMinor - Failed to open the db env\n");
return rc;
}
s_cl5Desc.dbOpenMode = backup;
/* update the version file */
_cl5WriteDBVersion ();
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "Upgrading from %s to %s is successfully done (%s)\n",
+ slapi_log_error(SLAPI_LOG_INFO, repl_plugin_name_cl,
+ "_cl5UpgradeMinor - Upgrading from %s to %s is successfully done (%s)\n",
fromVersion, toVersion, s_cl5Desc.dbDir);
return rc;
@@ -3017,8 +3025,8 @@ static int _cl5CheckDBVersion(void)
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5CheckDBVersion: invalid dbversion\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5CheckDBVersion - Invalid dbversion\n");
rc = CL5_BAD_DBVERSION;
goto bailout;
}
@@ -3036,8 +3044,8 @@ static int _cl5CheckDBVersion(void)
}
if (NULL == versionp || versionp == versionendp)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5CheckDBVersion: invalid dbversion: %s\n", dbVersion);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5CheckDBVersion - Invalid dbversion: %s\n", dbVersion);
rc = CL5_BAD_DBVERSION;
goto bailout;
}
@@ -3060,8 +3068,8 @@ static int _cl5CheckDBVersion(void)
rc = _cl5UpgradeMajor(dbVersion, clVersion);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5CheckDBVersion: upgrade %s -> %s failed\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5CheckDBVersion - Upgrade %s -> %s failed\n",
dbVersion, clVersion);
rc = CL5_BAD_DBVERSION;
}
@@ -3072,8 +3080,8 @@ static int _cl5CheckDBVersion(void)
rc = _cl5UpgradeMinor(dbVersion, clVersion);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5CheckDBVersion: upgrade %s -> %s failed\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5CheckDBVersion - Upgrade %s -> %s failed\n",
dbVersion, clVersion);
rc = CL5_BAD_DBVERSION;
}
@@ -3103,8 +3111,8 @@ 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, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5ReadDBVersion: failed to open DBVERSION; NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5ReadDBVersion - Failed to open DBVERSION; NSPR error - %d\n",
PR_GetError ());
return CL5_SYSTEM_ERROR;
}
@@ -3112,8 +3120,8 @@ 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, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5ReadDBVersion: failed to read DBVERSION; NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5ReadDBVersion - Failed to read DBVERSION; NSPR error - %d\n",
PR_GetError ());
PR_Close (file);
return CL5_SYSTEM_ERROR;
@@ -3133,8 +3141,8 @@ static int _cl5ReadDBVersion (const char *dir, char *clVersion, int buflen)
rc = PR_Close (file);
if (rc != PR_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5ReadDBVersion: failed to close DBVERSION; NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5ReadDBVersion - Failed to close DBVERSION; NSPR error - %d\n",
PR_GetError ());
return CL5_SYSTEM_ERROR;
}
@@ -3156,8 +3164,8 @@ static int _cl5WriteDBVersion(void)
s_cl5Desc.dbConfig.fileMode);
if (file == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5WriteDBVersion: failed to open DBVERSION; NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5WriteDBVersion - Failed to open DBVERSION; NSPR error - %d\n",
PR_GetError ());
return CL5_SYSTEM_ERROR;
}
@@ -3170,8 +3178,8 @@ static int _cl5WriteDBVersion(void)
size = slapi_write_buffer (file, clVersion, len);
if (size != len)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5WriteDBVersion: failed to write DBVERSION; NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5WriteDBVersion - Failed to write DBVERSION; NSPR error - %d\n",
PR_GetError ());
PR_Close (file);
return CL5_SYSTEM_ERROR;
@@ -3180,8 +3188,8 @@ static int _cl5WriteDBVersion(void)
rc = PR_Close (file);
if (rc != PR_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5WriteDBVersion: failed to close DBVERSION; NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5WriteDBVersion - Failed to close DBVERSION; NSPR error - %d\n",
PR_GetError ());
return CL5_SYSTEM_ERROR;
}
@@ -3204,8 +3212,8 @@ static void _cl5Close(void)
interval = PR_MillisecondsToInterval(100);
while (s_cl5Desc.threadCount > 0)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5Close: waiting for threads to exit: %d thread(s) still active\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5Close -Waiting for threads to exit: %d thread(s) still active\n",
s_cl5Desc.threadCount);
DS_Sleep(interval);
}
@@ -3223,8 +3231,8 @@ static void _cl5Close(void)
if (_cl5Delete (s_cl5Desc.dbDir, 1) != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5Close: failed to remove changelog\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5Close - Failed to remove changelog\n");
}
s_cl5Desc.dbRmOnClose = PR_FALSE;
}
@@ -3244,11 +3252,11 @@ 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, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5DBClose: deleting DB object %p\n", obj);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5DBClose - Deleting DB object %p\n", obj);
}
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5DBClose: closing databases in %s\n", s_cl5Desc.dbDir);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5DBClose - Closing databases in %s\n", s_cl5Desc.dbDir);
objset_delete (&s_cl5Desc.dbFiles);
}
if (NULL != s_cl5Desc.fileLock)
@@ -3290,8 +3298,8 @@ static int _cl5Delete (const char *clDir, int rmDir)
dir = PR_OpenDir(clDir);
if (dir == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5Delete: failed to open changelog dir; NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5Delete - Failed to open changelog dir; NSPR error - %d\n",
PR_GetError ());
return CL5_SYSTEM_ERROR;
@@ -3304,8 +3312,8 @@ static int _cl5Delete (const char *clDir, int rmDir)
break;
}
if (!_cl5IsDbFile(entry->name)) {
- 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",
+ slapi_log_error(SLAPI_LOG_REPL, 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 */
continue;
@@ -3317,8 +3325,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "_cl5Delete: failed to remove \"%s\"; NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5Delete - Failed to remove \"%s\"; NSPR error - %d\n",
filename, PR_GetError ());
}
} else {
@@ -3326,8 +3334,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "_cl5Delete: failed to remove \"%s\"; "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5Delete - Failed to remove \"%s\"; "
"libdb error - %d (%s)\n",
filename, rc, db_strerror(rc));
}
@@ -3337,8 +3345,8 @@ static int _cl5Delete (const char *clDir, int rmDir)
rc = PR_CloseDir(dir);
if (rc != PR_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5Delete: failed to close changelog dir (%s); NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5Delete - Failed to close changelog dir (%s); NSPR error - %d\n",
clDir, PR_GetError ());
return CL5_SYSTEM_ERROR;
}
@@ -3348,14 +3356,14 @@ static int _cl5Delete (const char *clDir, int rmDir)
rc = PR_RmDir (clDir);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5Delete: failed to remove changelog dir (%s); errno = %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5Delete: changelog dir (%s) is not empty - cannot remove\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5Delete - Changelog dir (%s) is not empty - cannot remove\n",
clDir);
}
@@ -3387,8 +3395,8 @@ static int _cl5TrimInit(void)
if (s_cl5Desc.dbTrim.lock == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5InitTrimming: failed to create lock; NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5InitTrimming - Failed to create lock; NSPR error - %d\n",
PR_GetError ());
return CL5_SYSTEM_ERROR;
}
@@ -3442,7 +3450,7 @@ static int _cl5TrimMain (void *param)
}
PR_AtomicDecrement (&s_cl5Desc.threadCount);
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "_cl5TrimMain: exiting\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5TrimMain - Exiting\n");
return 0;
}
@@ -3510,12 +3518,12 @@ static void _cl5DoPurging (Replica *replica)
/* We found our changelog, now purge it */
_cl5PurgeRID (obj, rid);
object_release (obj);
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "Purged rid (%d) from suffix (%s)\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5DoPurging - Purged rid (%d) from suffix (%s)\n",
rid, slapi_sdn_get_dn(sdn));
} else {
- 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",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5DoPurging - Purge rid (%d) failed to find changelog file (%s) for suffix (%s)\n",
rid, fileName, slapi_sdn_get_dn(sdn));
}
PR_Unlock (s_cl5Desc.dbTrim.lock);
@@ -3541,8 +3549,8 @@ _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, LOG_ERR, repl_plugin_name_cl,
- "_cl5CompactDBs: failed to begin transaction; db error - %d %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5CompactDBs - Failed to begin transaction; db error - %d %s\n",
rc, db_strerror(rc));
goto bail;
}
@@ -3557,13 +3565,13 @@ _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, LOG_ERR, repl_plugin_name_cl,
- "_cl5CompactDBs: failed to compact %s; db error - %d %s\n",
+ slapi_log_error(SLAPI_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, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5CompactDBs: %s - %d pages freed\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5CompactDBs - %s - %d pages freed\n",
dbFile->replName, c_data.compact_pages_free);
}
bail:
@@ -3573,15 +3581,15 @@ bail:
if (rc) {
rc = TXN_ABORT (txnid);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5CompactDBs: failed to abort transaction; db error - %d %s\n",
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
- "_cl5CompactDBs: failed to commit transaction; db error - %d %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5CompactDBs - Failed to commit transaction; db error - %d %s\n",
rc, db_strerror(rc));
}
}
@@ -3611,8 +3619,8 @@ _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, LOG_ERR, repl_plugin_name_cl,
- "_cl5PurgeGetFirstEntry: failed to create cursor; db error - %d %s\n", rc, db_strerror(rc));
+ slapi_log_error(SLAPI_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,8 +3642,8 @@ _cl5PurgeGetFirstEntry(Object *obj, CL5Entry *entry, void **iterator, DB_TXN *tx
slapi_ch_free(&(data.data));
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5PurgeGetFirstEntry: failed to format entry: %d\n", rc);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5PurgeGetFirstEntry - Failed to format entry: %d\n", rc);
goto done;
}
@@ -3659,8 +3667,8 @@ _cl5PurgeGetFirstEntry(Object *obj, CL5Entry *entry, void **iterator, DB_TXN *tx
}
/* db error occured while iterating */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5PurgeGetFirstEntry: failed to get entry; db error - %d %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5PurgeGetFirstEntry - Failed to get entry; db error - %d %s\n",
rc, db_strerror(rc));
rc = CL5_DB_ERROR;
@@ -3708,10 +3716,9 @@ _cl5PurgeGetNextEntry (CL5Entry *entry, void *iterator, DBT *key)
/* Not a lock error, free the 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,
+ slapi_log_error(rc == CL5_DB_LOCK_ERROR?SLAPI_LOG_REPL:SLAPI_LOG_ERR,
repl_plugin_name_cl,
- "_cl5PurgeGetNextEntry: failed to format entry: %d\n",
+ "_cl5PurgeGetNextEntry - Failed to format entry: %d\n",
rc);
}
@@ -3731,10 +3738,9 @@ _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,
+ slapi_log_error(rc == CL5_DB_LOCK_ERROR?SLAPI_LOG_REPL:SLAPI_LOG_ERR,
repl_plugin_name_cl,
- "_cl5PurgeGetNextEntry: failed to get entry; db error - %d %s\n",
+ "_cl5PurgeGetNextEntry - Failed to get entry; db error - %d %s\n",
rc, db_strerror(rc));
return rc;
@@ -3786,8 +3792,8 @@ _cl5PurgeRID(Object *obj, ReplicaId cleaned_rid)
rc = TXN_BEGIN(s_cl5Desc.dbEnv, NULL, &txnid, 0);
if (rc != 0){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5PurgeRID: failed to begin transaction; db error - %d %s. "
+ slapi_log_error(SLAPI_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);
return;
@@ -3828,8 +3834,8 @@ _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, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5PurgeRID: Ran out of db locks deleting entry. "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5PurgeRID - Ran out of db locks deleting entry. "
"Reduce the batch value and restart.\n");
batch_count = trimmed - 10;
if (batch_count < 10){
@@ -3843,8 +3849,8 @@ _cl5PurgeRID(Object *obj, ReplicaId cleaned_rid)
break;
} else {
/* fatal error */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5PurgeRID: fatal error (%d)\n", rc);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5PurgeRID - Fatal error (%d)\n", rc);
slapi_ch_free(&(key.data));
finished = 1;
break;
@@ -3863,8 +3869,8 @@ _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, LOG_ERR, repl_plugin_name_cl,
- "_cl5PurgeRID: Ran out of db locks getting the next entry. "
+ slapi_log_error(SLAPI_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;
if (batch_count < 10){
@@ -3894,8 +3900,8 @@ _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, LOG_ERR, repl_plugin_name_cl,
- "_cl5PurgeRID: failed to commit transaction; db error - %d %s. "
+ slapi_log_error(SLAPI_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);
break;
@@ -3911,15 +3917,15 @@ _cl5PurgeRID(Object *obj, ReplicaId cleaned_rid)
} else {
rc = TXN_ABORT (txnid);
if (rc != 0){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5PurgeRID: failed to abort transaction; db error - %d %s. "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
- "_cl5PurgeRID: Changelog was not purged of rid (%d)\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5PurgeRID - Changelog was not purged of rid (%d)\n",
cleaned_rid);
break;
}
@@ -3927,8 +3933,8 @@ _cl5PurgeRID(Object *obj, ReplicaId cleaned_rid)
}
slapi_ch_free_string(&starting_key);
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5PurgeRID: Removed (%ld entries) that originated from rid (%d)\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5PurgeRID - Removed (%ld entries) that originated from rid (%d)\n",
totalTrimmed, cleaned_rid);
}
@@ -3972,8 +3978,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "_cl5TrimFile: failed to begin transaction; db error - %d %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5TrimFile - Failed to begin transaction; db error - %d %s\n",
rc, db_strerror(rc));
finished = PR_TRUE;
break;
@@ -3987,7 +3993,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, LOG_ERR, repl_plugin_name_cl, "_cl5TrimFile: "
+ slapi_log_error(SLAPI_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);
@@ -4034,9 +4040,9 @@ static void _cl5TrimFile (Object *obj, long *numToTrim)
else
{
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL,
- "Changelog purge skipped anchor csn %s\n",
- csn_as_string (maxcsn, PR_FALSE, strCSN));
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5TrimFile - Changelog purge skipped anchor csn %s\n",
+ csn_as_string (maxcsn, PR_FALSE, strCSN));
}
/* extra read to skip the current record */
@@ -4069,8 +4075,8 @@ static void _cl5TrimFile (Object *obj, long *numToTrim)
rc = TXN_ABORT (txnid);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5TrimFile: failed to abort transaction; db error - %d %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5TrimFile - Failed to abort transaction; db error - %d %s\n",
rc, db_strerror(rc));
}
}
@@ -4080,8 +4086,8 @@ static void _cl5TrimFile (Object *obj, long *numToTrim)
if (rc != 0)
{
finished = 1;
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5TrimFile: failed to commit transaction; db error - %d %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5TrimFile - Failed to commit transaction; db error - %d %s\n",
rc, db_strerror(rc));
}
else
@@ -4097,7 +4103,8 @@ static void _cl5TrimFile (Object *obj, long *numToTrim)
if (totalTrimmed)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "Trimmed %d changes from the changelog\n", totalTrimmed);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5TrimFile - Trimmed %d changes from the changelog\n",
+ totalTrimmed);
}
}
@@ -4167,8 +4174,8 @@ static int _cl5ReadRUV (const char *replGen, Object *obj, PRBool purge)
}
if (rc != RUV_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "%s: _cl5ReadRUV: failed to initialize %s ruv; "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5ReadRUV - %s - Failed to initialize %s ruv; "
"RUV error %d\n", agmt_name, purge? "purge" : "upper bound", rc);
rc = CL5_RUV_ERROR;
@@ -4186,8 +4193,8 @@ static int _cl5ReadRUV (const char *replGen, Object *obj, PRBool purge)
rc = _cl5ConstructRUV (replGen, obj, purge);
goto done;
- default: slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "%s: _cl5ReadRUV: failed to get purge RUV; "
+ default: slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5ReadRUV - %s - Failed to get purge RUV; "
"db error - %d %s\n", agmt_name, rc, db_strerror(rc));
rc = CL5_DB_ERROR;
goto done;
@@ -4242,8 +4249,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "_cl5WriteRUV: failed to begin transaction; db error - %d %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5WriteRUV - Failed to begin transaction; db error - %d %s\n",
rc, db_strerror(rc));
return CL5_DB_ERROR;
}
@@ -4257,8 +4264,8 @@ static int _cl5WriteRUV (CL5DBFile *file, PRBool purge)
rc = txn_commit (txnid, 0);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5WriteRUV: failed to commit transaction; db error - %d %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5WriteRUV - Failed to commit transaction; db error - %d %s\n",
rc, db_strerror(rc));
return CL5_DB_ERROR;
}
@@ -4267,8 +4274,8 @@ static int _cl5WriteRUV (CL5DBFile *file, PRBool purge)
}
else
{
- 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",
+ slapi_log_error(SLAPI_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));
if (CL5_OS_ERR_IS_DISKFULL(rc))
@@ -4280,8 +4287,8 @@ static int _cl5WriteRUV (CL5DBFile *file, PRBool purge)
rc = txn_abort (txnid);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5WriteRUV: failed to abort transaction; db error - %d %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5WriteRUV - Failed to abort transaction; db error - %d %s\n",
rc, db_strerror(rc));
}
#endif
@@ -4312,8 +4319,8 @@ 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, LOG_DEBUG, repl_plugin_name_cl, "_cl5ConstructRUV: "
- "failed to initialize %s RUV for file %s; ruv error - %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, 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;
}
@@ -4325,7 +4332,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, LOG_ERR, repl_plugin_name_cl, "_cl5ConstructRUV: "
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name_cl, "_cl5ConstructRUV - "
"Operation missing csn, moving on to next entry.\n");
cl5_operation_parameters_done (&op);
rc = _cl5GetNextEntry (&entry, iterator);
@@ -4333,8 +4340,8 @@ 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, LOG_DEBUG, repl_plugin_name_cl, "_cl5ConstructRUV: "
- "skipping entry because its csn contains a cleaned rid(%d)\n", rid);
+ slapi_log_error(SLAPI_LOG_REPL, 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);
continue;
@@ -4347,8 +4354,8 @@ 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, LOG_DEBUG, repl_plugin_name_cl, "_cl5ConstructRUV: "
- "failed to updated %s RUV for file %s; ruv error - %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, 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;
continue;
@@ -4415,8 +4422,8 @@ static int _cl5UpdateRUV (Object *obj, CSN *csn, PRBool newReplica, PRBool purge
if (rc != RUV_SUCCESS)
{
- 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",
+ slapi_log_error(SLAPI_LOG_REPL, 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;
}
@@ -4508,8 +4515,8 @@ static int _cl5GetRUV2Purge2 (Object *fileObj, RUV **ruv)
rc = ruv_enumerate_elements (consRUV, _cl5EnumConsumerRUV, *ruv);
if (rc != RUV_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "_cl5GetRUV2Purge2: "
- "failed to construct ruv; ruv error - %d\n", rc);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5GetRUV2Purge2 - "
+ "Failed to construct ruv; ruv error - %d\n", rc);
rc = CL5_RUV_ERROR;
object_release (consRUVObj);
object_release (agmtObj);
@@ -4566,8 +4573,8 @@ 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, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5GetEntryCount: %d changes for replica %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5GetEntryCount - %d changes for replica %s\n",
file->entryCount, file->replName);
return CL5_SUCCESS;
@@ -4582,8 +4589,8 @@ static int _cl5GetEntryCount (CL5DBFile *file)
#endif
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5GetEntryCount: failed to get changelog statistics; "
+ slapi_log_error(SLAPI_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;
}
@@ -4593,15 +4600,15 @@ static int _cl5GetEntryCount (CL5DBFile *file)
#else /* DB31 */
file->entryCount = stats->bt_ndata;
#endif
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5GetEntryCount: %d changes for replica %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_ERR, repl_plugin_name_cl,
- "_cl5GetEntryCount: failed to get count entry; "
+ default: slapi_log_error(SLAPI_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;
}
@@ -4623,8 +4630,8 @@ static int _cl5WriteEntryCount (CL5DBFile *file)
rc = txn_begin(s_cl5Desc.dbEnv, NULL, &txnid, 0);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5WriteEntryCount: failed to begin transaction; db error - %d %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5WriteEntryCount - Failed to begin transaction; db error - %d %s\n",
rc, db_strerror(rc));
return CL5_DB_ERROR;
}
@@ -4636,8 +4643,8 @@ static int _cl5WriteEntryCount (CL5DBFile *file)
rc = txn_commit (txnid, 0);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5WriteEntryCount: failed to commit transaction; db error - %d %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5WriteEntryCount - Failed to commit transaction; db error - %d %s\n",
rc, db_strerror(rc));
return CL5_DB_ERROR;
}
@@ -4646,9 +4653,9 @@ static int _cl5WriteEntryCount (CL5DBFile *file)
}
else
{
- 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",
+ slapi_log_error(SLAPI_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));
if (CL5_OS_ERR_IS_DISKFULL(rc))
{
@@ -4659,8 +4666,8 @@ static int _cl5WriteEntryCount (CL5DBFile *file)
rc = txn_abort (txnid);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5WriteEntryCount: failed to abort transaction; db error - %d %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5WriteEntryCount - Failed to abort transaction; db error - %d %s\n",
rc, db_strerror(rc));
}
#endif
@@ -4722,64 +4729,66 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "_cl5Operation2LDIF(ADD): entry is NULL\n");
- return CL5_BAD_FORMAT;
- }
- if (op->p.p_add.parentuniqueid)
- len += LDIF_SIZE_NEEDED(strlen (T_PARENTIDSTR),
- strlen (op->p.p_add.parentuniqueid));
- slapi_entry2mods (op->p.p_add.target_entry, &rawDN, &add_mods);
- len += LDIF_SIZE_NEEDED(strlen (T_DNSTR), strlen (rawDN));
- l = make_changes_string(add_mods, NULL);
- len += LDIF_SIZE_NEEDED(strlen (T_CHANGESTR), l->ls_len);
- ldap_mods_free (add_mods, 1);
- break;
-
- case SLAPI_OPERATION_MODIFY: if (NULL == op->p.p_modify.modify_mods) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5Operation2LDIF(MODIFY): mods are NULL\n");
- return CL5_BAD_FORMAT;
- }
- len += LDIF_SIZE_NEEDED(strlen (T_DNSTR), REPL_GET_DN_LEN(&op->target_address));
- l = make_changes_string(op->p.p_modify.modify_mods, NULL);
- len += LDIF_SIZE_NEEDED(strlen (T_CHANGESTR), l->ls_len);
+ case SLAPI_OPERATION_ADD:
+ if (NULL == op->p.p_add.target_entry) {
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5Operation2LDIF - ADD - entry is NULL\n");
+ return CL5_BAD_FORMAT;
+ }
+ if (op->p.p_add.parentuniqueid)
+ len += LDIF_SIZE_NEEDED(strlen (T_PARENTIDSTR), strlen (op->p.p_add.parentuniqueid));
+ slapi_entry2mods (op->p.p_add.target_entry, &rawDN, &add_mods);
+ len += LDIF_SIZE_NEEDED(strlen (T_DNSTR), strlen (rawDN));
+ l = make_changes_string(add_mods, NULL);
+ len += LDIF_SIZE_NEEDED(strlen (T_CHANGESTR), l->ls_len);
+ ldap_mods_free (add_mods, 1);
+ break;
+
+ case SLAPI_OPERATION_MODIFY:
+ if (NULL == op->p.p_modify.modify_mods) {
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5Operation2LDIF - MODIFY - mods are NULL\n");
+ return CL5_BAD_FORMAT;
+ }
+ len += LDIF_SIZE_NEEDED(strlen (T_DNSTR), REPL_GET_DN_LEN(&op->target_address));
+ l = make_changes_string(op->p.p_modify.modify_mods, NULL);
+ len += LDIF_SIZE_NEEDED(strlen (T_CHANGESTR), l->ls_len);
break;
- case SLAPI_OPERATION_MODRDN: if (NULL == op->p.p_modrdn.modrdn_mods) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5Operation2LDIF(MODRDN): mods are NULL\n");
- return CL5_BAD_FORMAT;
- }
- len += LDIF_SIZE_NEEDED(strlen (T_DNSTR), REPL_GET_DN_LEN(&op->target_address));
- len += LDIF_SIZE_NEEDED(strlen (T_NEWRDNSTR),
- strlen (op->p.p_modrdn.modrdn_newrdn));
- strDeleteOldRDN = (op->p.p_modrdn.modrdn_deloldrdn ? "true" : "false");
- len += LDIF_SIZE_NEEDED(strlen (T_DRDNFLAGSTR),
- strlen (strDeleteOldRDN));
- if (REPL_GET_DN(&op->p.p_modrdn.modrdn_newsuperior_address))
- len += LDIF_SIZE_NEEDED(strlen (T_NEWSUPERIORDNSTR),
- REPL_GET_DN_LEN(&op->p.p_modrdn.modrdn_newsuperior_address));
- if (op->p.p_modrdn.modrdn_newsuperior_address.uniqueid)
- len += LDIF_SIZE_NEEDED(strlen (T_NEWSUPERIORIDSTR),
- strlen (op->p.p_modrdn.modrdn_newsuperior_address.uniqueid));
- l = make_changes_string(op->p.p_modrdn.modrdn_mods, NULL);
- len += LDIF_SIZE_NEEDED(strlen (T_CHANGESTR), l->ls_len);
- break;
-
- case SLAPI_OPERATION_DELETE: if (NULL == REPL_GET_DN(&op->target_address)) {
- 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;
+ case SLAPI_OPERATION_MODRDN:
+ if (NULL == op->p.p_modrdn.modrdn_mods) {
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5Operation2LDIF - MODRDN - mods are NULL\n");
+ return CL5_BAD_FORMAT;
+ }
+ len += LDIF_SIZE_NEEDED(strlen (T_DNSTR), REPL_GET_DN_LEN(&op->target_address));
+ len += LDIF_SIZE_NEEDED(strlen (T_NEWRDNSTR), strlen (op->p.p_modrdn.modrdn_newrdn));
+ strDeleteOldRDN = (op->p.p_modrdn.modrdn_deloldrdn ? "true" : "false");
+ len += LDIF_SIZE_NEEDED(strlen (T_DRDNFLAGSTR),
+ strlen (strDeleteOldRDN));
+ if (REPL_GET_DN(&op->p.p_modrdn.modrdn_newsuperior_address))
+ len += LDIF_SIZE_NEEDED(strlen (T_NEWSUPERIORDNSTR),
+ REPL_GET_DN_LEN(&op->p.p_modrdn.modrdn_newsuperior_address));
+ if (op->p.p_modrdn.modrdn_newsuperior_address.uniqueid)
+ len += LDIF_SIZE_NEEDED(strlen (T_NEWSUPERIORIDSTR),
+ strlen (op->p.p_modrdn.modrdn_newsuperior_address.uniqueid));
+ l = make_changes_string(op->p.p_modrdn.modrdn_mods, NULL);
+ len += LDIF_SIZE_NEEDED(strlen (T_CHANGESTR), l->ls_len);
+ break;
+
+ case SLAPI_OPERATION_DELETE:
+ if (NULL == REPL_GET_DN(&op->target_address)) {
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
- "_cl5Operation2LDIF: invalid operation type - %lu\n", op->operation_type);
-
- return CL5_BAD_FORMAT;
+ default:
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5Operation2LDIF - Invalid operation type - %lu\n", op->operation_type);
+ return CL5_BAD_FORMAT;
}
/* allocate buffer */
@@ -4787,7 +4796,7 @@ static int _cl5Operation2LDIF (const slapi_operation_parameters *op, const char
start = buff;
if (buff == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
"_cl5Operation2LDIF: memory allocation failed\n");
return CL5_MEMORY_ERROR;
}
@@ -4801,39 +4810,43 @@ static int _cl5Operation2LDIF (const slapi_operation_parameters *op, const char
switch (op->operation_type)
{
- case SLAPI_OPERATION_ADD: if (op->p.p_add.parentuniqueid)
- slapi_ldif_put_type_and_value_with_options(&buff, T_PARENTIDSTR,
- op->p.p_add.parentuniqueid, strlen (op->p.p_add.parentuniqueid), 0);
- slapi_ldif_put_type_and_value_with_options(&buff, T_DNSTR, rawDN, strlen (rawDN), 0);
- slapi_ldif_put_type_and_value_with_options(&buff, T_CHANGESTR, l->ls_buf, l->ls_len, 0);
- slapi_ch_free ((void**)&rawDN);
- break;
+ case SLAPI_OPERATION_ADD:
+ if (op->p.p_add.parentuniqueid)
+ slapi_ldif_put_type_and_value_with_options(&buff, T_PARENTIDSTR,
+ op->p.p_add.parentuniqueid, strlen (op->p.p_add.parentuniqueid), 0);
+ slapi_ldif_put_type_and_value_with_options(&buff, T_DNSTR, rawDN, strlen (rawDN), 0);
+ slapi_ldif_put_type_and_value_with_options(&buff, T_CHANGESTR, l->ls_buf, l->ls_len, 0);
+ slapi_ch_free ((void**)&rawDN);
+ break;
- case SLAPI_OPERATION_MODIFY: slapi_ldif_put_type_and_value_with_options(&buff, T_DNSTR, REPL_GET_DN(&op->target_address),
- REPL_GET_DN_LEN(&op->target_address), 0);
- slapi_ldif_put_type_and_value_with_options(&buff, T_CHANGESTR, l->ls_buf, l->ls_len, 0);
- break;
+ case SLAPI_OPERATION_MODIFY:
+ slapi_ldif_put_type_and_value_with_options(&buff, T_DNSTR, REPL_GET_DN(&op->target_address),
+ REPL_GET_DN_LEN(&op->target_address), 0);
+ slapi_ldif_put_type_and_value_with_options(&buff, T_CHANGESTR, l->ls_buf, l->ls_len, 0);
+ break;
- case SLAPI_OPERATION_MODRDN: slapi_ldif_put_type_and_value_with_options(&buff, T_DNSTR, REPL_GET_DN(&op->target_address),
- REPL_GET_DN_LEN(&op->target_address), 0);
- slapi_ldif_put_type_and_value_with_options(&buff, T_NEWRDNSTR, op->p.p_modrdn.modrdn_newrdn,
- strlen (op->p.p_modrdn.modrdn_newrdn), 0);
- slapi_ldif_put_type_and_value_with_options(&buff, T_DRDNFLAGSTR, strDeleteOldRDN,
- strlen (strDeleteOldRDN), 0);
- if (REPL_GET_DN(&op->p.p_modrdn.modrdn_newsuperior_address))
- slapi_ldif_put_type_and_value_with_options(&buff, T_NEWSUPERIORDNSTR,
- REPL_GET_DN(&op->p.p_modrdn.modrdn_newsuperior_address),
- REPL_GET_DN_LEN(&op->p.p_modrdn.modrdn_newsuperior_address), 0);
- if (op->p.p_modrdn.modrdn_newsuperior_address.uniqueid)
- slapi_ldif_put_type_and_value_with_options(&buff, T_NEWSUPERIORIDSTR,
- op->p.p_modrdn.modrdn_newsuperior_address.uniqueid,
- strlen (op->p.p_modrdn.modrdn_newsuperior_address.uniqueid), 0);
- slapi_ldif_put_type_and_value_with_options(&buff, T_CHANGESTR, l->ls_buf, l->ls_len, 0);
- break;
-
- case SLAPI_OPERATION_DELETE: slapi_ldif_put_type_and_value_with_options(&buff, T_DNSTR, REPL_GET_DN(&op->target_address),
- REPL_GET_DN_LEN(&op->target_address), 0);
- break;
+ case SLAPI_OPERATION_MODRDN:
+ slapi_ldif_put_type_and_value_with_options(&buff, T_DNSTR, REPL_GET_DN(&op->target_address),
+ REPL_GET_DN_LEN(&op->target_address), 0);
+ slapi_ldif_put_type_and_value_with_options(&buff, T_NEWRDNSTR, op->p.p_modrdn.modrdn_newrdn,
+ strlen (op->p.p_modrdn.modrdn_newrdn), 0);
+ slapi_ldif_put_type_and_value_with_options(&buff, T_DRDNFLAGSTR, strDeleteOldRDN,
+ strlen (strDeleteOldRDN), 0);
+ if (REPL_GET_DN(&op->p.p_modrdn.modrdn_newsuperior_address))
+ slapi_ldif_put_type_and_value_with_options(&buff, T_NEWSUPERIORDNSTR,
+ REPL_GET_DN(&op->p.p_modrdn.modrdn_newsuperior_address),
+ REPL_GET_DN_LEN(&op->p.p_modrdn.modrdn_newsuperior_address), 0);
+ if (op->p.p_modrdn.modrdn_newsuperior_address.uniqueid)
+ slapi_ldif_put_type_and_value_with_options(&buff, T_NEWSUPERIORIDSTR,
+ op->p.p_modrdn.modrdn_newsuperior_address.uniqueid,
+ strlen (op->p.p_modrdn.modrdn_newsuperior_address.uniqueid), 0);
+ slapi_ldif_put_type_and_value_with_options(&buff, T_CHANGESTR, l->ls_buf, l->ls_len, 0);
+ break;
+
+ case SLAPI_OPERATION_DELETE:
+ slapi_ldif_put_type_and_value_with_options(&buff, T_DNSTR, REPL_GET_DN(&op->target_address),
+ REPL_GET_DN_LEN(&op->target_address), 0);
+ break;
}
*buff = '\n';
@@ -4880,8 +4893,8 @@ _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, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5LDIF2Operation: warning - failed to parse ldif line\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5LDIF2Operation - Failed to parse ldif line, moving on...\n");
continue;
}
if (strncasecmp (type.bv_val, T_CHANGETYPESTR,
@@ -4942,48 +4955,52 @@ _cl5LDIF2Operation (char *ldifEntry, slapi_operation_parameters *op, char **repl
switch (op->operation_type)
{
- case SLAPI_OPERATION_ADD: /*
- * When it comes here, case T_DNSTR is already
- * passed and rawDN is supposed to set.
- * But it's a good idea to make sure it is
- * not NULL.
- */
- if (NULL == rawDN) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5LDIF2Operation: corrupted format "
- "for operation type - %lu\n",
- op->operation_type);
- slapi_ch_free_string(&ldifEntryWork);
- return CL5_BAD_FORMAT;
- }
- mods = parse_changes_string(value.bv_val);
- PR_ASSERT (mods);
- slapi_mods2entry (&(op->p.p_add.target_entry), rawDN,
- slapi_mods_get_ldapmods_byref(mods));
- slapi_ch_free ((void**)&rawDN);
- slapi_mods_free (&mods);
- break;
+ case SLAPI_OPERATION_ADD:
+ /*
+ * When it comes here, case T_DNSTR is already
+ * passed and rawDN is supposed to set.
+ * But it's a good idea to make sure it is
+ * not NULL.
+ */
+ if (NULL == rawDN) {
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5LDIF2Operation - corrupted format "
+ "for operation type - %lu\n",
+ op->operation_type);
+ slapi_ch_free_string(&ldifEntryWork);
+ return CL5_BAD_FORMAT;
+ }
+ mods = parse_changes_string(value.bv_val);
+ PR_ASSERT (mods);
+ slapi_mods2entry (&(op->p.p_add.target_entry), rawDN,
+ slapi_mods_get_ldapmods_byref(mods));
+ slapi_ch_free ((void**)&rawDN);
+ slapi_mods_free (&mods);
+ break;
- case SLAPI_OPERATION_MODIFY: mods = parse_changes_string(value.bv_val);
- PR_ASSERT (mods);
- op->p.p_modify.modify_mods = slapi_mods_get_ldapmods_passout (mods);
- slapi_mods_free (&mods);
- break;
-
- case SLAPI_OPERATION_MODRDN: mods = parse_changes_string(value.bv_val);
- PR_ASSERT (mods);
- op->p.p_modrdn.modrdn_mods = slapi_mods_get_ldapmods_passout (mods);
- slapi_mods_free (&mods);
- break;
-
- default: slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5LDIF2Operation: invalid operation type - %lu\n",
- op->operation_type);
- if (freeval) {
- slapi_ch_free_string(&value.bv_val);
- }
- slapi_ch_free_string(&ldifEntryWork);
- return CL5_BAD_FORMAT;
+ case SLAPI_OPERATION_MODIFY:
+ mods = parse_changes_string(value.bv_val);
+ PR_ASSERT (mods);
+ op->p.p_modify.modify_mods = slapi_mods_get_ldapmods_passout (mods);
+ slapi_mods_free (&mods);
+ break;
+
+ case SLAPI_OPERATION_MODRDN:
+ mods = parse_changes_string(value.bv_val);
+ PR_ASSERT (mods);
+ op->p.p_modrdn.modrdn_mods = slapi_mods_get_ldapmods_passout (mods);
+ slapi_mods_free (&mods);
+ break;
+
+ default:
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5LDIF2Operation - Invalid operation type - %lu\n",
+ op->operation_type);
+ if (freeval) {
+ slapi_ch_free_string(&value.bv_val);
+ }
+ slapi_ch_free_string(&ldifEntryWork);
+ return CL5_BAD_FORMAT;
}
}
if (freeval) {
@@ -5000,8 +5017,8 @@ _cl5LDIF2Operation (char *ldifEntry, slapi_operation_parameters *op, char **repl
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5LDIF2Operation: invalid data format\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5LDIF2Operation - Invalid data format\n");
}
}
slapi_ch_free_string(&ldifEntryWork);
@@ -5030,15 +5047,15 @@ static int _cl5WriteOperationTxn(const char *replName, const char *replGen,
PR_TRUE /* check for duplicates */);
if (rc != CL5_SUCCESS)
{
- 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);
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5WriteOperationTxn: failed to get db file for target dn (%s)",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5WriteOperationTxn - Failed to get db file for target dn (%s)",
REPL_GET_DN(&op->target_address));
return CL5_OBJSET_ERROR;
}
@@ -5057,8 +5074,8 @@ static int _cl5WriteOperationTxn(const char *replName, const char *replGen,
if (rc != CL5_SUCCESS)
{
char s[CSN_STRSIZE];
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5WriteOperationTxn: failed to convert entry with csn (%s) "
+ slapi_log_error(SLAPI_LOG_REPL, 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;
}
@@ -5072,8 +5089,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "_cl5WriteOperationTxn: failed to write entry; db error - %d %s\n",
+ slapi_log_error(SLAPI_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))
{
@@ -5097,8 +5114,8 @@ static int _cl5WriteOperationTxn(const char *replName, const char *replGen,
rc = TXN_ABORT (txnid);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5WriteOperationTxn: failed to abort transaction; db error - %d %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5WriteOperationTxn - Failed to abort transaction; db error - %d %s\n",
rc, db_strerror(rc));
rc = CL5_DB_ERROR;
goto done;
@@ -5113,8 +5130,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "_cl5WriteOperationTxn: failed to start transaction; db error - %d %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5WriteOperationTxn - Failed to start transaction; db error - %d %s\n",
rc, db_strerror(rc));
rc = CL5_DB_ERROR;
goto done;
@@ -5132,8 +5149,8 @@ static int _cl5WriteOperationTxn(const char *replName, const char *replGen,
}
if (CL5_OS_ERR_IS_DISKFULL(rc))
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5WriteOperationTxn: changelog (%s) DISK FULL; db error - %d %s\n",
+ slapi_log_error(SLAPI_LOG_CRIT, repl_plugin_name_cl,
+ "_cl5WriteOperationTxn - Changelog (%s) DISK FULL; db error - %d %s\n",
s_cl5Desc.dbDir, rc, db_strerror(rc));
cl5_set_diskfull();
rc = CL5_DB_ERROR;
@@ -5143,14 +5160,17 @@ static int _cl5WriteOperationTxn(const char *replName, const char *replGen,
{
if (rc == 0)
{
- 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);
+ slapi_log_error(SLAPI_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, 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));
+ slapi_log_error(SLAPI_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 ++;
+ cnt++;
}
if (rc == 0) /* we successfully added entry */
@@ -5162,16 +5182,16 @@ static int _cl5WriteOperationTxn(const char *replName, const char *replGen,
else
{
char s[CSN_STRSIZE];
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5WriteOperationTxn: failed to write entry with csn (%s); "
+ slapi_log_error(SLAPI_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));
#if USE_DB_TXN
rc = TXN_ABORT (txnid);
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5WriteOperationTxn: failed to abort transaction; db error - %d %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5WriteOperationTxn - Failed to abort transaction; db error - %d %s\n",
rc, db_strerror(rc));
}
#endif
@@ -5185,8 +5205,8 @@ 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, LOG_DEBUG, repl_plugin_name_cl,
- "cl5WriteOperationTxn: successfully written entry with csn (%s)\n", csnStr);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5WriteOperationTxn - Successfully written entry with csn (%s)\n", csnStr);
rc = CL5_SUCCESS;
done:
if (data->data)
@@ -5221,8 +5241,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "_cl5GetFirstEntry: failed to create cursor; db error - %d %s\n", rc, db_strerror(rc));
+ slapi_log_error(SLAPI_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;
}
@@ -5245,8 +5265,8 @@ static int _cl5GetFirstEntry (Object *obj, CL5Entry *entry, void **iterator, DB_
slapi_ch_free (&(data.data));
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5GetFirstOperation: failed to format entry: %d\n", rc);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5GetFirstOperation - Failed to format entry: %d\n", rc);
goto done;
}
@@ -5283,8 +5303,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "_cl5GetFirstEntry: failed to get entry; db error - %d %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5GetFirstEntry - Failed to get entry; db error - %d %s\n",
rc, db_strerror(rc));
rc = CL5_DB_ERROR;
@@ -5325,8 +5345,8 @@ static int _cl5GetNextEntry (CL5Entry *entry, void *iterator)
slapi_ch_free (&(data.data));
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5GetNextEntry: failed to format entry: %d\n", rc);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5GetNextEntry - Failed to format entry: %d\n", rc);
}
return rc;
@@ -5354,10 +5374,9 @@ 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,
+ slapi_log_error(rc == CL5_DB_LOCK_ERROR?SLAPI_LOG_REPL:SLAPI_LOG_ERR,
repl_plugin_name_cl,
- "_cl5GetNextEntry: failed to get entry; db error - %d %s\n",
+ "_cl5GetNextEntry - Failed to get entry; db error - %d %s\n",
rc, db_strerror(rc));
return rc;
@@ -5381,8 +5400,8 @@ static int _cl5CurrentDeleteEntry (void *iterator)
PR_AtomicDecrement (&file->entryCount);
return CL5_SUCCESS;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5CurrentDeleteEntry failed, err=%d %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5CurrentDeleteEntry - Failed, err=%d %s\n",
rc, db_strerror(rc));
/*
* We don't free(close) the cursor here, as the caller will free it by
@@ -5425,34 +5444,37 @@ static int _cl5GetOperation (Object *replica, slapi_operation_parameters *op)
rc = file->db->get(file->db, NULL/*txn*/, &key, &data, 0);
switch (rc)
{
- case 0: entry.op = op;
- /* Callers of this function should cl5_operation_parameters_done(op) */
- rc = cl5DBData2Entry (data.data, data.size, &entry);
- if (rc == CL5_SUCCESS)
- {
- 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, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5GetOperation: failed to convert db data to operation;"
- " csn - %s\n", csnStr);
- }
- goto done;
+ case 0:
+ entry.op = op;
+ /* Callers of this function should cl5_operation_parameters_done(op) */
+ rc = cl5DBData2Entry (data.data, data.size, &entry);
+ if (rc == CL5_SUCCESS)
+ {
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5GetOperation - Successfully retrieved operation with csn (%s)\n",
+ csnStr);
+ }
+ else
+ {
+ slapi_log_error(SLAPI_LOG_REPL, 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, 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;
+ case DB_NOTFOUND:
+ slapi_log_error(SLAPI_LOG_REPL, 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, 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;
- goto done;
+ default:
+ slapi_log_error(SLAPI_LOG_REPL, 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;
+ goto done;
}
done:
@@ -5480,8 +5502,8 @@ PRBool cl5HelperEntry (const char *csnstr, CSN *csnp)
}
if (csn == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5HelperEntry: failed to get csn time; csn error\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "cl5HelperEntry - Failed to get csn time; csn error\n");
return PR_FALSE;
}
csnTime= csn_get_time(csn);
@@ -5551,9 +5573,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, LOG_DEBUG, NULL, "_cl5PositionCursorForReplay (%s): Consumer RUV:\n", agmt_name);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5PositionCursorForReplay - (%s): Consumer RUV:\n", agmt_name);
ruv_dump (consumerRuv, agmt_name, NULL);
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "_cl5PositionCursorForReplay (%s): Supplier RUV:\n", agmt_name);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5PositionCursorForReplay - (%s): Supplier RUV:\n", agmt_name);
ruv_dump (supplierRuv, agmt_name, NULL);
}
@@ -5570,7 +5592,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, LOG_DEBUG, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
"%s: CSN %s found, position set for replay\n", agmt_name, csnStr);
}
}
@@ -5589,15 +5611,15 @@ 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, LOG_DEBUG, repl_plugin_name_cl,
- "%s: CSN %s not found, seems to be missing\n", agmt_name, csnStr);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "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, LOG_ERR, repl_plugin_name_cl,
- "%s: CSN %s not found, we aren't as up to date, or we purged\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "repl_plugin_name_cl - %s: CSN %s not found, we aren't as up to date, or we purged\n",
agmt_name, csnStr);
}
}
@@ -5605,8 +5627,8 @@ static int _cl5PositionCursorForReplay (ReplicaId consumerRID, const RUV *consum
{
csn_as_string(startCSN, PR_FALSE, csnStr);
/* db error */
- 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",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "repl_plugin_name_cl - %s: Failed to retrieve change with CSN %s; db error - %d %s\n",
agmt_name, csnStr, rc, db_strerror(rc));
rc = CL5_DB_ERROR;
@@ -5620,8 +5642,8 @@ static int _cl5PositionCursorForReplay (ReplicaId consumerRID, const RUV *consum
if (*iterator == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "%s: _cl5PositionCursorForReplay: failed to allocate iterator\n", agmt_name);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5PositionCursorForReplay - %s - Failed to allocate iterator\n", agmt_name);
rc = CL5_MEMORY_ERROR;
goto done;
}
@@ -5826,7 +5848,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, LOG_DEBUG, repl_plugin_name_cl, "_cl5CheckMissingCSN: "
+ slapi_log_error(SLAPI_LOG_REPL, 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);
}
@@ -5840,7 +5862,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, LOG_DEBUG, repl_plugin_name_cl, "_cl5CheckMissingCSN: "
+ slapi_log_error(SLAPI_LOG_REPL, 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));
}
@@ -5849,7 +5871,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, LOG_DEBUG, repl_plugin_name_cl, "_cl5CheckMissingCSN: "
+ slapi_log_error(SLAPI_LOG_REPL, 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),
@@ -5869,7 +5891,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, LOG_DEBUG, repl_plugin_name_cl, "_cl5CheckMissingCSN: "
+ slapi_log_error(SLAPI_LOG_REPL, 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),
@@ -5880,7 +5902,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, LOG_DEBUG, repl_plugin_name_cl, "_cl5CheckMissingCSN: "
+ slapi_log_error(SLAPI_LOG_REPL, 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),
@@ -5929,9 +5951,9 @@ _cl5FileName2Replica (const char *file_name, Object **replica)
len = strlen (file_gen);
if (len <= extlen + 1)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5FileName2Replica "
- "invalid file name (%s)\n", file_name);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5FileName2Replica - "
+ "Invalid file name (%s)\n", file_name);
}
else
{
@@ -5946,9 +5968,9 @@ _cl5FileName2Replica (const char *file_name, Object **replica)
PR_ASSERT (repl_gen);
if (strcmp (file_gen, repl_gen) != 0)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5FileName2Replica "
- "replica generation mismatch for replica at (%s), "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5FileName2Replica - "
+ "Replica generation mismatch for replica at (%s), "
"file generation %s, new replica generation %s\n",
slapi_sdn_get_dn (replica_get_root (r)), file_gen, repl_gen);
@@ -5962,8 +5984,8 @@ _cl5FileName2Replica (const char *file_name, Object **replica)
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "_cl5FileName2Replica "
- "malformed file name - %s\n", file_name);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5FileName2Replica - "
+ "Malformed file name - %s\n", file_name);
}
return PR_TRUE;
@@ -6044,8 +6066,8 @@ 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, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5DBOpenFileByReplicaName: Found DB object %p for replica %s\n", tmpObj, replName);
+ slapi_log_error(SLAPI_LOG_REPL, 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)
{
@@ -6075,8 +6097,8 @@ 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, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5DBOpenFileByReplicaName: failed to get purge RUV\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5DBOpenFileByReplicaName - Failed to get purge RUV\n");
goto done;
}
@@ -6084,16 +6106,16 @@ 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, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5DBOpenFileByReplicaName: failed to get upper bound RUV\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5DBOpenFileByReplicaName - Failed to get upper bound RUV\n");
goto done;
}
/* Mark the DB File initialize */
_cl5DBFileInitialized(tmpObj);
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5DBOpenFileByReplicaName: created new DB object %p\n", tmpObj);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5DBOpenFileByReplicaName - Created new DB object %p\n", tmpObj);
if (obj)
{
*obj = tmpObj;
@@ -6132,16 +6154,16 @@ 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, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5AddDBFile: failed to add db file to the list; "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5AddDBFile - Failed to add db file to the list; "
"repl_objset error - %d\n", rc);
object_release (tmpObj);
return CL5_OBJSET_ERROR;
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5AddDBFile: Added new DB object %p\n", tmpObj);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5AddDBFile - Added new DB object %p\n", tmpObj);
}
if (obj)
@@ -6167,16 +6189,16 @@ static int _cl5NewDBFile (const char *replName, const char *replGen, CL5DBFile**
PR_ASSERT (replName && replGen && dbFile);
if (!dbFile) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5NewDBFile: NULL dbFile\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5NewDBFile - NULL dbFile\n");
return CL5_UNKNOWN_ERROR;
}
(*dbFile) = (CL5DBFile *)slapi_ch_calloc (1, sizeof (CL5DBFile));
if (*dbFile == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5NewDBFile: memory allocation failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5NewDBFile - memory allocation failed\n");
return CL5_MEMORY_ERROR;
}
@@ -6218,8 +6240,8 @@ static int _cl5NewDBFile (const char *replName, const char *replGen, CL5DBFile**
out:
if (rc != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5NewDBFile: db_open failed; db error - %d %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5NewDBFile - db_open failed; db error - %d %s\n",
rc, db_strerror(rc));
rc = CL5_DB_ERROR;
goto done;
@@ -6266,12 +6288,12 @@ out:
if ( semadir != NULL )
{
(*dbFile)->semaName = slapi_ch_smprintf("%s/%s.sema", semadir, replName);
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5NewDBFile: semaphore %s\n", (*dbFile)->semaName);
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name_cl, "_cl5NewDBFile: maxConcurrentWrites=%d\n", s_cl5Desc.dbConfig.maxConcurrentWrites );
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5NewDBFile - maxConcurrentWrites=%d\n", s_cl5Desc.dbConfig.maxConcurrentWrites );
}
if ((*dbFile)->sema == NULL )
@@ -6285,8 +6307,8 @@ out:
PR_DeleteSemaphore((*dbFile)->semaName);
prerr = PR_GetError();
if (PR_SUCCESS != prerr) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5NewDBFile: PR_DeleteSemaphore: %s; NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5NewDBFile - PR_DeleteSemaphore: %s; NSPR error - %d\n",
(*dbFile)->semaName ? (*dbFile)->semaName : "(nil)", prerr);
}
(*dbFile)->sema = PR_OpenSemaphore((*dbFile)->semaName,
@@ -6300,15 +6322,15 @@ out:
{
PRErrorCode prerr = PR_GetError();
if (PR_FILE_EXISTS_ERROR == prerr) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5NewDBFile: PR_OpenSemaphore: %s; sema: 0x%p, NSPR error - %d\n",
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
- " : Leftover semaphores may exist. "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5NewDBFile - Leftover semaphores may exist. "
"Run \"ipcs -s\", and remove them with \"ipcrm -s <SEMID>\" if any\n");
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5NewDBFile: failed to create semaphore %s; NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5NewDBFile - Failed to create semaphore %s; NSPR error - %d\n",
(*dbFile)->semaName ? (*dbFile)->semaName : "(nil)", prerr);
}
rc = CL5_SYSTEM_ERROR;
@@ -6326,8 +6348,8 @@ out:
rc = _cl5GetEntryCount (*dbFile);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5NewDBFile: failed to get entry count\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5NewDBFile - Failed to get entry count\n");
goto done;
}
}
@@ -6356,7 +6378,7 @@ static void _cl5DBCloseFile (void **data)
PR_ASSERT (file);
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "_cl5DBCloseFile: "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBCloseFile - "
"Closing database %s\n", file->name);
/* close the file */
@@ -6372,8 +6394,8 @@ static void _cl5DBCloseFile (void **data)
/* close the db */
if (file->db) {
rc = file->db->close(file->db, 0);
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "_cl5DBCloseFile: "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "_cl5DBCloseFile - "
"Closed the changelog database handle for %s "
"(rc: %d)\n", file->name, rc);
file->db = NULL;
@@ -6383,18 +6405,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, LOG_DEBUG, repl_plugin_name_cl, "_cl5DBCloseFile: "
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name_cl, "_cl5DBCloseFile: "
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name_cl, "_cl5DBCloseFile: "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBCloseFile - "
"Deleted the changelog database file %s\n", file->name);
}
@@ -6428,14 +6450,14 @@ static int _cl5GetDBFile (Object *replica, Object **obj)
*obj = objset_find(s_cl5Desc.dbFiles, _cl5CompareDBFile, fileName);
if (*obj)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "_cl5GetDBFile: "
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name_cl, "_cl5GetDBFile: "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5GetDBFile - "
"no DB object found for database %s\n", fileName);
slapi_ch_free_string(&fileName);
return CL5_NOTFOUND;
@@ -6454,14 +6476,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, LOG_DEBUG, repl_plugin_name_cl, "_cl5GetDBFileByReplicaName: "
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name_cl, "_cl5GetDBFileByReplicaName: "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5GetDBFileByReplicaName - "
"no DB object found for database %s\n", fileName);
slapi_ch_free_string(&fileName);
return CL5_NOTFOUND;
@@ -6480,10 +6502,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, LOG_DEBUG, repl_plugin_name_cl, "_cl5DBDeleteFile: "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBDeleteFile - "
"could not find DB object %p\n", obj);
} else {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl, "_cl5DBDeleteFile: "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBDeleteFile - "
"removed DB object %p\n", obj);
}
object_release (obj);
@@ -6565,8 +6587,8 @@ static int _cl5ExportFile (PRFileDesc *prFile, Object *obj)
rc = _cl5Operation2LDIF (&op, file->replGen, &buff, &len);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5ExportFile: failed to convert operation to ldif\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5ExportFile - Failed to convert operation to ldif\n");
operation_parameters_done (&op);
break;
}
@@ -6575,8 +6597,8 @@ static int _cl5ExportFile (PRFileDesc *prFile, Object *obj)
slapi_ch_free((void **)&buff);
if (wlen < len)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5ExportFile: failed to write to ldif file\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5ExportFile - Failed to write to ldif file\n");
rc = CL5_SYSTEM_ERROR;
operation_parameters_done (&op);
break;
@@ -6594,8 +6616,8 @@ static int _cl5ExportFile (PRFileDesc *prFile, Object *obj)
if (rc != CL5_NOTFOUND)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "_cl5ExportFile: failed to retrieve changelog entry\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "_cl5ExportFile - Failed to retrieve changelog entry\n");
}
else
{
@@ -6701,8 +6723,8 @@ cl5_diskspace_is_available()
struct statvfs fsbuf;
if (statvfs(s_cl5Desc.dbDir, &fsbuf) < 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "cl5_diskspace_is_available: Cannot get file system info\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5_diskspace_is_available - Cannot get file system info\n");
rval = 0;
}
else
@@ -6710,8 +6732,8 @@ cl5_diskspace_is_available()
unsigned long fsiz = fsbuf.f_bavail * fsbuf.f_frsize;
if (fsiz < NO_DISK_SPACE)
{
- 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);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5_diskspace_is_available - No enough diskspace for changelog: (%u bytes free)\n", fsiz);
rval = 0;
}
else if (fsiz > MIN_DISK_SPACE)
@@ -6725,8 +6747,8 @@ cl5_diskspace_is_available()
struct statfs fsbuf;
if (statfs(s_cl5Desc.dbDir, &fsbuf) < 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "cl5_diskspace_is_available: Cannot get file system info\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5_diskspace_is_available - Cannot get file system info\n");
rval = 0;
}
else
@@ -6734,8 +6756,8 @@ cl5_diskspace_is_available()
unsigned long fsiz = fsbuf.f_bavail * fsbuf.f_bsize;
if (fsiz < NO_DISK_SPACE)
{
- 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);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5_diskspace_is_available - No enough diskspace for changelog: (%lu bytes free)\n", fsiz);
rval = 0;
}
else if (fsiz > MIN_DISK_SPACE)
@@ -6821,8 +6843,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "cl5WriteRUV: server (pid %d) is already running; bail.\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5WriteRUV - server (pid %d) is already running; bail.\n",
slapd_pid);
rc = 1;
goto bail;
@@ -6833,8 +6855,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "cl5WriteRUV: failed to open changelog\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5WriteRUV - Failed to open changelog\n");
goto bail;
}
s_cl5Desc.dbState = CL5_STATE_OPEN; /* force to change the state */
@@ -6901,8 +6923,8 @@ cl5DeleteRUV()
* And the server IS running.
* RUVs are not in the changelog.
* bail out - return success */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "cl5DeleteRUV: server (pid %d) is already running; bail.\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5DeleteRUV - server (pid %d) is already running; bail.\n",
slapd_pid);
goto bail;
}
@@ -6912,8 +6934,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "cl5DeleteRUV: failed to open changelog\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5DeleteRUV - Failed to open changelog\n");
goto bail;
}
s_cl5Desc.dbState = CL5_STATE_OPEN; /* force to change the state */
@@ -6928,21 +6950,21 @@ cl5DeleteRUV()
rc = _cl5GetEntryCount(dbfile);
if (rc != CL5_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "cl5DeleteRUV: failed to get/delete entry count\n");
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_ERR, repl_plugin_name_cl,
- "cl5DeleteRUV: failed to read/delete purge RUV\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
- "cl5DeleteRUV: failed to read/delete upper bound RUV\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "cl5DeleteRUV - Failed to read/delete upper bound RUV\n");
goto bail;
}
file_obj = objset_next_obj(s_cl5Desc.dbFiles, file_obj);
@@ -6990,8 +7012,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "trigger_cl_purging: failed to create trimming "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "trigger_cl_purging - Failed to create trimming "
"thread; NSPR error - %d\n", PR_GetError ());
} else {
/* need a little time for the thread to get started */
@@ -7015,8 +7037,8 @@ trigger_cl_purging_thread(void *arg){
/* Bump the changelog thread count */
if (CL5_SUCCESS != _cl5AddThread()) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "trigger_cl_purging: Abort - failed to increment thread count "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "trigger_cl_purging_thread - Abort, failed to increment thread count "
"NSPR error - %d\n", PR_GetError ());
return;
}
@@ -7024,7 +7046,7 @@ trigger_cl_purging_thread(void *arg){
/* Purge the changelog */
_cl5DoPurging(replica);
_cl5RemoveThread();
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "trigger_cl_purging: purged changelog for (%s) rid (%d)\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "trigger_cl_purging_thread - 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 466f72d..eeb04a4 100644
--- a/ldap/servers/plugins/replication/cl5_clcache.c
+++ b/ldap/servers/plugins/replication/cl5_clcache.c
@@ -221,10 +221,10 @@ 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, LOG_DEBUG, get_thread_private_agmtname(),
- "clcache_get_buffer: found thread private buffer cache %p\n", *buf);
- 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",
+ slapi_log_error(SLAPI_LOG_REPL, 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(),
+ "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);
(*buf)->buf_state = CLC_STATE_READY;
@@ -274,8 +274,8 @@ clcache_get_buffer ( CLC_Buffer **buf, DB *db, ReplicaId consumer_rid, const RUV
csn_free(&l_csn);
}
else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, get_thread_private_agmtname(),
- "clcache_get_buffer: can't allocate new buffer\n" );
+ slapi_log_error(SLAPI_LOG_ERR, get_thread_private_agmtname(),
+ "clcache_get_buffer - Can't allocate new buffer\n" );
rc = CL5_MEMORY_ERROR;
}
@@ -290,8 +290,8 @@ clcache_return_buffer ( CLC_Buffer **buf )
{
int i;
- 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 "
+ slapi_log_error(SLAPI_LOG_REPL, (*buf)->buf_agmt_name,
+ "clcache_return_buffer - 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",
(*buf)->buf_state,
@@ -353,8 +353,9 @@ clcache_load_buffer ( CLC_Buffer *buf, CSN **anchorCSN )
}
}
else {
- 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",
+ slapi_log_error(SLAPI_LOG_ERR, buf->buf_agmt_name,
+ "clcache_load_buffer - 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 );
}
} else if (rc == CLC_STATE_DONE) {
@@ -362,8 +363,8 @@ clcache_load_buffer ( CLC_Buffer *buf, CSN **anchorCSN )
}
if ( rc != 0 ) {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, buf->buf_agmt_name,
- "clcache_load_buffer: rc=%d\n", rc );
+ slapi_log_error(SLAPI_LOG_REPL, buf->buf_agmt_name,
+ "clcache_load_buffer - rc=%d\n", rc );
}
return rc;
@@ -385,12 +386,12 @@ clcache_load_buffer_bulk ( CLC_Buffer *buf, int flag )
#endif
if (NULL == buf) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "clcache_load_buffer_bulk",
- "NULL buf\n" );
+ slapi_log_error(SLAPI_LOG_ERR, buf->buf_agmt_name,
+ "clcache_load_buffer_bulk - NULL buf\n" );
return rc;
}
if (NULL == buf->buf_busy_list) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "clcache_load_buffer_bulk",
+ slapi_log_error(SLAPI_LOG_ERR, buf->buf_agmt_name, "clcache_load_buffer_bulk - "
"%s%sno buf_busy_list\n",
buf->buf_agmt_name?buf->buf_agmt_name:"",
buf->buf_agmt_name?": ":"" );
@@ -413,7 +414,7 @@ retry:
* 2. try to find another starting position as close
* as possible
*/
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "clcache_load_buffer_bulk",
+ slapi_log_error(SLAPI_LOG_ERR, buf->buf_agmt_name, "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 +434,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, LOG_ERR, "clcache_load_buffer_bulk",
+ slapi_log_error(SLAPI_LOG_ERR, buf->buf_agmt_name, "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 +455,7 @@ retry:
PRIntervalTime interval;
tries++;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "clcache_load_buffer_bulk",
+ slapi_log_error(SLAPI_LOG_TRACE, buf->buf_agmt_name, "clcache_load_buffer_bulk - "
"deadlock number [%d] - retrying\n", tries );
/* back off */
interval = PR_MillisecondsToInterval(slapi_rand() % 100);
@@ -463,7 +464,7 @@ retry:
goto retry;
}
if ((rc == DB_LOCK_DEADLOCK) && (tries >= MAX_TRIALS)) {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "clcache_load_buffer_bulk",
+ slapi_log_error(SLAPI_LOG_REPL, buf->buf_agmt_name, "clcache_load_buffer_bulk - "
"could not load buffer from changelog after %d tries\n", tries );
}
@@ -535,8 +536,8 @@ 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, LOG_DEBUG, buf->buf_agmt_name,
- "load=%d rec=%d csn=%s\n",
+ slapi_log_error(SLAPI_LOG_REPL, buf->buf_agmt_name,
+ "clcache_get_next_change - load=%d rec=%d csn=%s\n",
buf->buf_load_cnt, buf->buf_record_cnt, (char*)*key );
}
@@ -649,11 +650,12 @@ 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, 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,
- curr, conmaxcsn);
+ slapi_log_error(SLAPI_LOG_REPL, buf->buf_agmt_name,
+ "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,
+ curr, conmaxcsn);
}
if (cscb->consumer_maxcsn == NULL) {
@@ -670,8 +672,6 @@ clcache_initial_anchorcsn ( CLC_Buffer *buf, int *flag )
*flag = rid_flag;
hasChange = PR_TRUE;
}
-
-
}
}
@@ -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, LOG_DEBUG, "clcache_initial_anchorcsn",
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "clcache_adjust_anchorcsn" ,
+ slapi_log_error(SLAPI_LOG_REPL, buf->buf_agmt_name, "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,
@@ -742,8 +742,6 @@ clcache_adjust_anchorcsn ( CLC_Buffer *buf, int *flag )
*flag = rid_flag;
hasChange = PR_TRUE;
}
-
-
}
}
@@ -752,7 +750,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, LOG_DEBUG, "clcache_adjust_anchorcsn",
+ slapi_log_error(SLAPI_LOG_REPL, buf->buf_agmt_name, "clcache_adjust_anchorcsn - "
"anchor is now: %s\n", (char *)buf->buf_key.data);
}
@@ -782,9 +780,8 @@ 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, LOG_DEBUG, buf->buf_agmt_name,
- "Skipping update because the consumer with Rid: [%d] is "
- "ignored\n", rid);
+ slapi_log_error(SLAPI_LOG_REPL, buf->buf_agmt_name,
+ "clcache_skip_change - Skipping update because the consumer with Rid: [%d] is ignored\n", rid);
buf->buf_skipped_csn_gt_cons_maxcsn++;
}
break;
@@ -792,8 +789,8 @@ 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, LOG_DEBUG, buf->buf_agmt_name,
- "Skip helper entry type=%ld\n", csn_get_time( buf->buf_current_csn ));
+ slapi_log_error(SLAPI_LOG_REPL, buf->buf_agmt_name,
+ "clcache_skip_change - Skip helper entry type=%ld\n", csn_get_time( buf->buf_current_csn ));
break;
}
@@ -804,8 +801,8 @@ 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, LOG_DEBUG, buf->buf_agmt_name,
- "Skipping update because the changelog buffer current csn [%s] rid "
+ slapi_log_error(SLAPI_LOG_REPL, buf->buf_agmt_name,
+ "clcache_skip_change - 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);
}
@@ -875,8 +872,8 @@ 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, LOG_DEBUG, buf->buf_agmt_name,
- "Skip %s consumer=%s local=%s\n", current, consumer, local );
+ slapi_log_error(SLAPI_LOG_REPL, buf->buf_agmt_name,
+ "clcache_skip_change - Skip %s consumer=%s local=%s\n", current, consumer, local );
}
#endif
@@ -890,7 +887,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, LOG_ERR, NULL, "clcache: malloc failure\n" );
+ slapi_log_error(SLAPI_LOG_ERR, NULL, "clcache: malloc failure\n" );
}
return cscb;
}
@@ -1071,7 +1068,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, LOG_ERR, get_thread_private_agmtname(),
+ slapi_log_error(SLAPI_LOG_ERR, get_thread_private_agmtname(),
"clcache: failed to open cursor; db error - %d %s\n",
rc, db_strerror(rc));
}
@@ -1111,20 +1108,20 @@ 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, 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 );
+ slapi_log_error(SLAPI_LOG_REPL, buf->buf_agmt_name,
+ "clcache_cursor_get - 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, LOG_ERR, buf->buf_agmt_name,
- "clcache_cursor_get: invalid parameter\n" );
+ slapi_log_error(SLAPI_LOG_ERR, buf->buf_agmt_name,
+ "clcache_cursor_get - invalid parameter\n" );
break;
case DB_BUFFER_SMALL:
- 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 );
+ slapi_log_error(SLAPI_LOG_ERR, buf->buf_agmt_name,
+ "clcache_cursor_get - can't allocate %u bytes\n", buf->buf_data.ulen );
break;
default:
diff --git a/ldap/servers/plugins/replication/cl5_config.c b/ldap/servers/plugins/replication/cl5_config.c
index 8bdec68..1a37997 100644
--- a/ldap/servers/plugins/replication/cl5_config.c
+++ b/ldap/servers/plugins/replication/cl5_config.c
@@ -55,8 +55,8 @@ int changelog5_config_init()
}
if (s_configLock == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "changelog5_config_init: failed to create configurationlock; "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "changelog5_config_init - Failed to create configuration lock; "
"NSPR error - %d\n",PR_GetError ());
return 1;
}
@@ -165,8 +165,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "changelog5_config_add: changelog already exist; "
+ slapi_log_error(SLAPI_LOG_NOTICE, repl_plugin_name_cl,
+ "changelog5_config_add - Changelog already exist; "
"request ignored\n");
goto done;
}
@@ -180,8 +180,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "changelog5_config_add: NULL changelog directory\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "changelog5_config_add - NULL changelog directory\n");
goto done;
}
@@ -206,11 +206,11 @@ changelog5_config_add (Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry* entryAfter
*returncode = 1;
if (returntext)
{
- PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "failed to start changelog; error - %d", rc);
+ PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Failed to start changelog; error - %d", rc);
}
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "changelog5_config_add: failed to start changelog\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "changelog5_config_add - Failed to start changelog\n");
goto done;
}
@@ -223,8 +223,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "changelog5_config_add: failed to configure changelog trimming\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "changelog5_config_add - Failed to configure changelog trimming\n");
goto done;
}
@@ -273,8 +273,8 @@ changelog5_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entr
strcpy (returntext, "changelog is not configured");
}
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "changelog5_config_modify: changelog is not configured\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "changelog5_config_modify - Changelog is not configured\n");
return SLAPI_DSE_CALLBACK_ERROR;
}
@@ -289,8 +289,8 @@ changelog5_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entr
strcpy (returntext, "changelog is not configured");
}
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "changelog5_config_modify: changelog is not configured\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "changelog5_config_modify - Changelog is not configured\n");
goto done;
}
@@ -492,8 +492,8 @@ 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, LOG_DEBUG, repl_plugin_name_cl,
- "changelog5_config_modify: changelog directory changed; "
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name_cl,
+ "changelog5_config_modify - Changelog directory changed; "
"old dir - %s, new dir - %s; recreating changelog.\n",
currentDir, config.dir);
@@ -503,15 +503,15 @@ changelog5_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entr
*returncode = 1;
if (returntext)
{
- PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "failed to close changelog; error - %d", rc);
+ PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Failed to close changelog; error - %d", rc);
}
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "changelog5_config_modify: failed to close changelog\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "changelog5_config_modify - Failed to close changelog\n");
goto done;
} else {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "changelog5_config_modify: closed the changelog\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "changelog5_config_modif - Closed the changelog\n");
}
rc = cl5Delete (currentDir);
@@ -523,12 +523,12 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "changelog5_config_modify: failed to remove changelog\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "changelog5_config_modify - Failed to remove changelog\n");
goto done;
} else {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "changelog5_config_modify: deleted the changelog at %s\n", currentDir);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "changelog5_config_modify - Deleted the changelog at %s\n", currentDir);
}
rc = cl5Open (config.dir, &config.dbconfig);
@@ -537,21 +537,21 @@ changelog5_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entr
*returncode = 1;
if (returntext)
{
- PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "failed to restart changelog; error - %d", rc);
+ PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Failed to restart changelog; error - %d", rc);
}
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
- "changelog5_config_modify: failed to restart changelog\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
- "changelog5_config_modify: failed to restore previous changelog\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "changelog5_config_modify - Failed to restore previous changelog\n");
}
goto done;
} else {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name_cl,
- "changelog5_config_modify: opened the changelog at %s\n", config.dir);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
+ "changelog5_config_modify - Opened the changelog at %s\n", config.dir);
}
}
}
@@ -570,8 +570,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "changelog5_config_modify: failed to configure changelog trimming\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "changelog5_config_modify - Failed to configure changelog trimming\n");
goto done;
}
}
@@ -616,8 +616,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "changelog5_config_delete: chagelog is not configured\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "changelog5_config_delete - Chagelog is not configured\n");
return SLAPI_DSE_CALLBACK_ERROR;
}
@@ -632,8 +632,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "changelog5_config_delete: chagelog is not configured\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "changelog5_config_delete - Changelog is not configured\n");
goto done;
}
@@ -648,8 +648,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "changelog5_config_delete: NULL directory\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "changelog5_config_delete - NULL directory\n");
goto done;
}
@@ -664,8 +664,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "changelog5_config_delete: failed to close changelog\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "changelog5_config_delete - Failed to close changelog\n");
goto done;
}
@@ -678,8 +678,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "changelog5_config_delete: failed to remove changelog\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
+ "changelog5_config_delete - Failed to remove changelog\n");
goto done;
}
@@ -753,8 +753,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "changelog5_extract_config: %s: invalid value \"%s\", ignoring the change.\n",
+ slapi_log_error(SLAPI_LOG_NOTICE, repl_plugin_name_cl,
+ "changelog5_extract_config - %s: invalid value \"%s\", ignoring the change.\n",
CONFIG_CHANGELOG_COMPACTDB_ATTRIBUTE, arg);
}
slapi_ch_free_string(&arg);
@@ -770,8 +770,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "changelog5_extract_config: %s: invalid value \"%s\", ignoring the change.\n",
+ slapi_log_error(SLAPI_LOG_NOTICE, 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,8 +787,8 @@ 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, LOG_ERR, repl_plugin_name_cl,
- "changelog5_extract_config: %s: invalid value \"%s\", ignoring the change.\n",
+ slapi_log_error(SLAPI_LOG_NOTICE, 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);
config->maxAge = slapi_ch_strdup(CL5_STR_IGNORE);
diff --git a/ldap/servers/plugins/replication/cl5_init.c b/ldap/servers/plugins/replication/cl5_init.c
index 67b37f6..5296819 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, LOG_ERR, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_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 67fe294..f90131d 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, LOG_ERR, repl_plugin_name_cl, "Starting basic test ...\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
"Basic test completed successfully\n");
else
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "Starting backup and recovery test ...\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
"Backup and Restore test completed successfully\n");
else
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "Starting iteration test ...\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "replica is not configured for (%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl, "replica is not configured for (%s)\n",
REPLICA_ROOT);
return;
}
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Starting first iteration pass ...\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "First iteration pass completed "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "First iteration pass failed: "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "First iteration pass failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl, "First iteration pass failed\n");
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Starting second iteration pass ...\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "Second iteration pass completed "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "Second iteration pass failed: "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "Second iteration pass failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl, "Second iteration pass failed\n");
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Starting third iteration pass ...\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "Third iteration pass completed "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "Third iteration pass failed: "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "Second iteration pass failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl, "Second iteration pass failed\n");
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "Iteration test is complete\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "Starting trimming test ...\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "Trimming test failed\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "Write performance:\n"
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "Read performance:\n"
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "Write performance:\n"
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "Read performance:\n"
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "Starting LDIF test ...\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
"LDIF test completed successfully\n");
else
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl, "LDIF test failed\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name_cl,
"Starting single threaded performance measurement ...\n");
testPerformance ();
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "failed to get server instance "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "failed to add changelog "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "failed to add replica for (%s) "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "failed to add entry (%s); "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "failed to modify entry (%s); "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "failed to rename entry (%s); "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name_cl, "failed to delete entry (%s); "
+ slapi_log_error(SLAPI_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 9cad620..68f836e 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, LOG_DEBUG, repl_plugin_name, "-> clcrypt_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_TRACE, 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 a529c7b..d962df1 100644
--- a/ldap/servers/plugins/replication/csnpl.c
+++ b/ldap/servers/plugins/replication/csnpl.c
@@ -40,16 +40,16 @@ CSNPL* csnplNew ()
csnpl = (CSNPL *)slapi_ch_malloc (sizeof (CSNPL));
if (csnpl == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "csnplNew: failed to allocate pending list\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "csnplNew - Failed to allocate pending list\n");
return NULL;
}
csnpl->csnList = llistNew ();
if (csnpl->csnList == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "csnplNew: failed to allocate pending list\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "csnplNew - Failed to allocate pending list\n");
slapi_ch_free ((void**)&csnpl);
return NULL;
}
@@ -59,8 +59,8 @@ CSNPL* csnplNew ()
if (csnpl->csnLock == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "csnplNew: failed to create lock; NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "csnplNew - Failed to create lock; NSPR error - %d\n",
PR_GetError ());
slapi_ch_free ((void**)&(csnpl->csnList));
slapi_ch_free ((void**)&csnpl);
@@ -111,8 +111,8 @@ int csnplInsert (CSNPL *csnpl, const CSN *csn)
if (csnpl == NULL || csn == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "csnplInsert: invalid argument\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "csnplInsert - Invalid argument\n");
return -1;
}
@@ -143,8 +143,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "csnplInsert: failed to insert csn (%s) into pending list\n", csn_as_string(csn,PR_FALSE,s));
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_DEBUG, repl_plugin_name, "%s: CSN Pending list content:\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "%s: CSN Pending list content:\n",
caller ? caller : "");
}
while (data)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "%s, %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, 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 44df538..fa1ed49 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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "Failed to configure legacy replication\n");
+ slapi_log_error(SLAPI_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, LOG_DEBUG, repl_plugin_name, "legacy_consumer_config_add: "
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "Warning: a copiedFrom "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "legacy_consumer_init_referrals "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "legacy_consumer_init_referrals "
+ slapi_log_error(SLAPI_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 e0db5f1..c171bed 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, LOG_DEBUG, repl_plugin_name, "llistInsertHead: invalid argument\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name, "llistInsertHead: invalid argument\n");
return -1;
}
node = _llistNewNode (key, data);
if (node == NULL)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name, "llistInsertHead: failed to allocate list node\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, repl_plugin_name, "llistInsertHead: invalid argument\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name, "llistInsertHead: invalid argument\n");
return -1;
}
node = _llistNewNode (key, data);
if (node == NULL)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name, "llistInsertHead: failed to allocate list node\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name, "llistInsertHead: failed to allocate list node\n");
return -1;
}
diff --git a/ldap/servers/plugins/replication/profile.c b/ldap/servers/plugins/replication/profile.c
index 4db2751..af82192 100644
--- a/ldap/servers/plugins/replication/profile.c
+++ b/ldap/servers/plugins/replication/profile.c
@@ -25,7 +25,7 @@ static FILE *profile_fd=NULL;
void profile_log(char *file,int line)
{
if (profile_fd==NULL)
- slapi_log_error(,"profile_log: profile file not open.");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "profile_log: profile file not open.");
else
{
/* JCMREPL - Probably need a lock around here */
@@ -43,7 +43,7 @@ void profile_open()
void profile_close()
{
if (profile_fd==NULL)
- slapi_log_error(SLAPI_LOG_ERROR, "repl_profile" ,"profile_close: profile file not open.");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name ,"profile_close: profile file not open.");
else
textfile_close(profile_fd);
}
diff --git a/ldap/servers/plugins/replication/repl5.h b/ldap/servers/plugins/replication/repl5.h
index 219fc87..a473d29 100644
--- a/ldap/servers/plugins/replication/repl5.h
+++ b/ldap/servers/plugins/replication/repl5.h
@@ -681,7 +681,7 @@ int is_task_aborted(ReplicaId rid);
void delete_aborted_rid(Replica *replica, ReplicaId rid, char *repl_root, int skip);
int is_pre_cleaned_rid(ReplicaId rid);
void set_cleaned_rid(ReplicaId rid);
-void cleanruv_log(Slapi_Task *task, int rid, char *task_type, char *fmt, ...);
+void cleanruv_log(Slapi_Task *task, int rid, char *task_type, int sev_level, char *fmt, ...);
char * replica_cleanallruv_get_local_maxcsn(ReplicaId rid, char *base_dn);
#define CLEANRIDSIZ 64 /* maximum number for concurrent CLEANALLRUV tasks */
@@ -726,7 +726,7 @@ void replica_updatedn_list_enumerate(ReplicaUpdateDNList list, FNEnumDN fn, void
/* enabling developper traces for MMR to understand the total/inc protocol state machines */
#ifdef DEV_DEBUG
-#define SLAPI_LOG_DEV_DEBUG SLAPI_LOG_FATAL
+#define SLAPI_LOG_DEV_DEBUG SLAPI_LOG_DEBUG
#define dev_debug(a) slapi_log_error(SLAPI_LOG_DEV_DEBUG, "DEV_DEBUG", "%s\n", a)
#else
#define dev_debug(a)
diff --git a/ldap/servers/plugins/replication/repl5_agmt.c b/ldap/servers/plugins/replication/repl5_agmt.c
index bcff95d..6838c6e 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, LOG_ERR, repl_plugin_name, "Replication agreement \"%s\" "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmt_is_valid - 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, LOG_ERR, repl_plugin_name, "Replication agreement \"%s\" "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmt_is_valid - 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, LOG_ERR, repl_plugin_name, "Replication agreement \"%s\" "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmt_is_valid - 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, LOG_ERR, repl_plugin_name, "Replication agreement \"%s\" "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmt_is_valid - 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, LOG_ERR, repl_plugin_name, "Replication agreement \"%s\" "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmt_is_valid - 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, LOG_ERR, repl_plugin_name, "Replication agreement \"%s\" "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmt_is_valid - 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, LOG_ERR, repl_plugin_name, "Replication agreement \"%s\" "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmt_is_valid - 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, LOG_ERR, repl_plugin_name, "Unable to create new lock "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmt_new_from_entry - 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, LOG_ERR, repl_plugin_name, "Unable to create new attr lock "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmt_new_from_entry - Unable to create new attr lock "
"for replication agreement \"%s\" - agreement ignored.\n",
slapi_entry_get_dn_const(e));
goto loser;
@@ -382,9 +382,9 @@ 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, LOG_ERR, repl_plugin_name, "Warning invalid value "
- "for nsds5ReplicaEnabled (%s), value must be \"on\" or \"off\". Ignoring "
- "this repl agreement.\n",tmpstr);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmt_new_from_entry - "
+ "Warning invalid value for nsds5ReplicaEnabled (%s), value must be \"on\" or \"off\". "
+ "Ignoring this repl agreement.\n",tmpstr);
slapi_ch_free_string(&tmpstr);
goto loser;
}
@@ -474,8 +474,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "agmtlist_add_callback: failed to parse "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "agmt_new_from_entry: failed to set "
"replicated attributes for agreement %s\n",
agmt_get_long_name(ra));
}
@@ -484,8 +484,8 @@ agmt_new_from_entry(Slapi_Entry *e)
if (denied_attrs)
{
/* Report the error to the client */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "WARNING: Attempt to exclude illegal attributes "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "agmt_new_from_entry: Attempt to exclude illegal attributes "
"from a fractional agreement\n");
/* Free the list */
slapi_ch_array_free(denied_attrs);
@@ -496,8 +496,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "agmtlist_add_callback: failed to parse total "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "agmt_new_from_entry: failed to parse total "
"update replicated attributes for agreement %s\n",
agmt_get_long_name(ra));
}
@@ -506,8 +506,8 @@ agmt_new_from_entry(Slapi_Entry *e)
if (denied_attrs)
{
/* Report the error to the client */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "WARNING: Attempt to exclude illegal attributes "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "agmt_new_from_entry: Attempt to exclude illegal attributes "
"from a fractional agreement for total update protocol\n");
/* Free the list */
slapi_ch_array_free(denied_attrs);
@@ -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, LOG_ERR, repl_plugin_name, "WARNING: "
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name, "agmt_new_from_entry: "
"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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_DEBUG, repl_plugin_name, "replication already started for agreement \"%s\"\n", agmt_get_long_name(ra));
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "replication already started for agreement \"%s\"\n", agmt_get_long_name(ra));
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "agmt_replica_init_done: "
+ slapi_log_error(SLAPI_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, LOG_DEBUG, repl_plugin_name, "agmt_set_consumer_ruv: invalid argument"
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "agmt_set_consumer_ruv: invalid argument"
" agmt - %p, ruv - %p\n", ra, ruv);
return -1;
}
@@ -2357,9 +2357,10 @@ 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, LOG_ERR, repl_plugin_name, "%s: agmt_update_consumer_ruv: "
- "failed to update consumer's RUV; LDAP error - %d\n",
- ra->long_name, rc);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmt_update_consumer_ruv - "
+ "%s: agmt_update_consumer_ruv: "
+ "failed to update consumer's RUV; LDAP error - %d\n",
+ ra->long_name, rc);
}
slapi_mod_done (&smod);
@@ -2483,10 +2484,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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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 +2552,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, LOG_ERR, repl_plugin_name, "Total update aborted: "
+ slapi_log_error(SLAPI_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 +2562,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, LOG_ERR, repl_plugin_name, "Total update aborted: "
+ slapi_log_error(SLAPI_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 +2793,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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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 +2896,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, LOG_ERR, repl_plugin_name, "agmt_set_enabled_from_entry: invalid "
+ slapi_log_error(SLAPI_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 +2908,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, LOG_DEBUG, repl_plugin_name, "agmt_set_enabled_from_entry: "
+ slapi_log_error(SLAPI_LOG_REPL, 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 +2917,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, LOG_DEBUG, repl_plugin_name, "agmt_set_enabled_from_entry: "
+ slapi_log_error(SLAPI_LOG_REPL, 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 +3196,7 @@ agmt_remove_maxcsn(Repl_Agmt *ra)
pb = slapi_pblock_new();
if (!pb) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "agmt_set_maxcsn: Out of memory\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmt_remove_maxcsn: Out of memory\n");
goto done;
}
@@ -3204,7 +3205,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, LOG_ERR, repl_plugin_name, "agmt_set_maxcsn: Failed to get repl object.\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmt_remove_maxcsn: Failed to get repl object.\n");
goto done;
}
slapi_ch_free_string(&ra->maxcsn);
@@ -3237,8 +3238,8 @@ 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, LOG_ERR, repl_plugin_name,
- "agmt_set_maxcsn: replica ruv tombstone entry for "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "agmt_remove_maxcsn: replica ruv tombstone entry for "
"replica %s not found\n", slapi_sdn_get_dn(ra->replarea));
goto done;
}
@@ -3290,8 +3291,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "agmt_set_maxcsn: failed to remove agmt maxcsn (%s), error(%d)\n",maxcsns[i], rc);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "agmt_remove_maxcsn: failed to remove agmt maxcsn (%s), error(%d)\n",maxcsns[i], rc);
}
slapi_mod_done(&smod);
slapi_pblock_destroy(modpb);
diff --git a/ldap/servers/plugins/replication/repl5_agmtlist.c b/ldap/servers/plugins/replication/repl5_agmtlist.c
index 99768a8..0daa1d8 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, LOG_DEBUG, repl_plugin_name, "agmt_add: begin\n");
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_ERR, repl_plugin_name, "agmtlist_add_callback: "
+ slapi_log_error(SLAPI_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,15 +271,15 @@ 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, LOG_ERR, repl_plugin_name,
- "agmtlist_modify_callback: NULL target dn\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "agmtlist_modify_callback: received "
- "a modification for unknown replication agreement \"%s\"\n",
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name, "agmtlist_modify_callback - "
+ "Received a modification for unknown replication agreement \"%s\"\n",
slapi_sdn_get_dn(sdn));
goto done;
}
@@ -297,8 +297,8 @@ 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, LOG_DEBUG, repl_plugin_name, "agmtlist_modify_callback: "
- "deletion of %s attribute is not allowed\n", type_nsds5ReplicaInitialize);
+ slapi_log_error(SLAPI_LOG_ERR, 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;
break;
@@ -306,8 +306,8 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore, Slapi_Entry
else
{
if(val == NULL){
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "agmtlist_modify_callback: "
- "no value provided for %s attribute\n", type_nsds5ReplicaInitialize);
+ slapi_log_error(SLAPI_LOG_ERR, 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;
break;
@@ -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, LOG_DEBUG, repl_plugin_name, "agmtlist_modify_callback: %s\n", errortext);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmtlist_modify_callback - %s\n", errortext);
*returncode = LDAP_UNWILLING_TO_PERFORM;
rc = SLAPI_DSE_CALLBACK_ERROR;
}
@@ -352,8 +352,8 @@ 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, LOG_DEBUG, repl_plugin_name, "agmtlist_modify_callback: "
- "failed to update credentials for agreement %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmtlist_modify_callback - "
+ "Failed to update credentials for agreement %s\n",
agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -365,8 +365,8 @@ 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, LOG_DEBUG, repl_plugin_name, "agmtlist_modify_callback: "
- "failed to update timeout for agreement %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmtlist_modify_callback - "
+ "Failed to update timeout for agreement %s\n",
agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -378,8 +378,8 @@ 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, LOG_DEBUG, repl_plugin_name, "agmtlist_modify_callback: "
- "failed to update the flow control window for agreement %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, 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;
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -391,8 +391,8 @@ 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, LOG_DEBUG, repl_plugin_name, "agmtlist_modify_callback: "
- "failed to update the flow control pause for agreement %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, 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;
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -404,8 +404,8 @@ 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, LOG_DEBUG, repl_plugin_name, "agmtlist_modify_callback: "
- "failed to update busy wait time for agreement %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, 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;
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -417,8 +417,8 @@ 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, LOG_DEBUG, repl_plugin_name, "agmtlist_modify_callback: "
- "failed to update session pause time for agreement %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, 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;
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -430,8 +430,8 @@ 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, LOG_DEBUG, repl_plugin_name, "agmtlist_modify_callback: "
- "failed to update bind DN for agreement %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmtlist_modify_callback- "
+ "Failed to update bind DN for agreement %s\n",
agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -442,9 +442,9 @@ 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, LOG_DEBUG, repl_plugin_name,
- "agmtlist_modify_callback: "
- "failed to update host for agreement %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "agmtlist_modify_callback - "
+ "Failed to update host for agreement %s\n",
agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -462,9 +462,9 @@ 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, LOG_DEBUG, repl_plugin_name,
- "agmtlist_modify_callback: "
- "failed to update port for agreement %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "agmtlist_modify_callback - "
+ "Failed to update port for agreement %s\n",
agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -482,8 +482,8 @@ 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, LOG_DEBUG, repl_plugin_name, "agmtlist_modify_callback: "
- "failed to update transport info for agreement %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmtlist_modify_callback - "
+ "Failed to update transport info for agreement %s\n",
agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -494,8 +494,8 @@ 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, LOG_DEBUG, repl_plugin_name, "agmtlist_modify_callback: "
- "failed to update bind method for agreement %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmtlist_modify_callback - "
+ "Failed to update bind method for agreement %s\n",
agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -508,8 +508,8 @@ 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, LOG_DEBUG, repl_plugin_name, "agmtlist_modify_callback: "
- "failed to update replicated attributes for agreement %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmtlist_modify_callback - "
+ "Failed to update replicated attributes for agreement %s\n",
agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -520,8 +520,8 @@ 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, LOG_DEBUG, repl_plugin_name, "agmtlist_modify_callback: "
- "attempt to exclude an illegal attribute in a fractional agreement\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmtlist_modify_callback - "
+ "Attempt to exclude an illegal attribute in a fractional agreement\n");
*returncode = LDAP_UNWILLING_TO_PERFORM;
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -537,8 +537,8 @@ 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, LOG_DEBUG, repl_plugin_name, "agmtlist_modify_callback: "
- "failed to update total update replicated attributes for agreement %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, 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;
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -550,8 +550,8 @@ 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, LOG_DEBUG, repl_plugin_name, "agmtlist_modify_callback: "
- "attempt to exclude an illegal total update attribute in a fractional agreement\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmtlist_modify_callback - "
+ "Attempt to exclude an illegal total update attribute in a fractional agreement\n");
*returncode = LDAP_UNWILLING_TO_PERFORM;
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -576,8 +576,8 @@ 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, LOG_DEBUG, repl_plugin_name, "agmtlist_modify_callback: "
- "failed to set replica agmt state \"enabled/disabled\" for %s\n",agmt_get_long_name(agmt));
+ slapi_log_error(SLAPI_LOG_ERR, 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,8 +585,8 @@ 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, LOG_DEBUG, repl_plugin_name, "agmtlist_modify_callback: "
- "failed to set replica agmt attributes to strip for %s\n",agmt_get_long_name(agmt));
+ slapi_log_error(SLAPI_LOG_ERR, 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,8 +609,8 @@ 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, LOG_ERR, repl_plugin_name, "attribute %s value (%s) is invalid, "
- "must be a number greater than zero.\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmtlist_modify_callback - "
+ "Attribute %s value (%s) is invalid, must be a number greater than zero.\n",
type_replicaProtocolTimeout, val ? val : "");
rc = SLAPI_DSE_CALLBACK_ERROR;
break;
@@ -629,8 +629,8 @@ 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, LOG_DEBUG, repl_plugin_name, "agmtlist_modify_callback: "
- "modification of %s attribute is not allowed\n", mods[i]->mod_type);
+ slapi_log_error(SLAPI_LOG_ERR, 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;
break;
@@ -664,8 +664,8 @@ 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, LOG_DEBUG, repl_plugin_name, "agmtlist_modify_callback: "
- "failed to update replication schedule for agreement %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmtlist_modify_callback - "
+ "Failed to update replication schedule for agreement %s\n",
agmt_get_long_name(agmt));
*returncode = LDAP_OPERATIONS_ERROR;
rc = SLAPI_DSE_CALLBACK_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, LOG_ERR, repl_plugin_name, "agmt_delete: begin\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "agmtlist_delete_callback - 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, LOG_ERR, repl_plugin_name, "agmtlist_delete: "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "agmtlist_delete_callback - "
"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, LOG_ERR, repl_plugin_name, "agmt_rename: begin\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "agmtlist_rename_callback - Begin\n");
*returncode = LDAP_SUCCESS;
return SLAPI_DSE_CALLBACK_OK;
@@ -726,8 +726,8 @@ handle_agmt_search(Slapi_Entry *e, void *callback_data)
int *agmtcount = (int *)callback_data;
int rc;
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "Found replication agreement named \"%s\".\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "handle_agmt_search - Found replication agreement named \"%s\".\n",
slapi_sdn_get_dn(slapi_entry_get_sdn(e)));
rc = add_new_agreement(e);
if (0 == rc)
@@ -736,8 +736,8 @@ handle_agmt_search(Slapi_Entry *e, void *callback_data)
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "The replication "
- "agreement named \"%s\" could not be correctly parsed. No "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "handle_agmt_search - "
+ "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,8 @@ agmtlist_config_init()
NULL /* referral callback */);
slapi_pblock_destroy(pb);
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "agmtlist_config_init: found %d replication agreements in DIT\n", agmtcount);
+ slapi_log_error(SLAPI_LOG_REPL, 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 e44254a..3646bfd 100644
--- a/ldap/servers/plugins/replication/repl5_connection.c
+++ b/ldap/servers/plugins/replication/repl5_connection.c
@@ -435,8 +435,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "%s: Connection disconnected by another thread\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "conn_read_result_ex - %s: Connection disconnected by another thread\n",
agmt_get_long_name(conn->agmt));
}
else if (-1 == rc)
@@ -557,8 +557,8 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: invalid connection insee_if_write_available \n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "see_if_write_available - %s - *Invalid connection\n",
agmt_get_long_name(conn->agmt));
conn->last_ldap_error = LDAP_PARAM_ERROR;
return CONN_OPERATION_FAILED;
@@ -578,14 +578,14 @@ see_if_write_available(Repl_Connection *conn, PRIntervalTime timeout)
/* check */
if (rc == 0) { /* timeout */
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: poll timed out - poll interval [%d]\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "see_if_write_available - %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, LOG_DEBUG, repl_plugin_name,
- "%s: error during poll attempt [%d:%s]\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "see_if_write_available - %s - error during poll attempt [%d:%s]\n",
agmt_get_long_name(conn->agmt),
PR_GetError(), slapd_pr_strerror(PR_GetError()));
conn->last_ldap_error = LDAP_PARAM_ERROR;
@@ -615,9 +615,8 @@ 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, 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",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "see_if_write_available - %s: Failed call to ldap_get_option to get extiofns: LDAP error %d (%s)\n",
agmt_get_long_name(conn->agmt),
rc, ldap_err2string(rc));
conn->last_ldap_error = rc;
@@ -628,9 +627,8 @@ 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, 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",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "see_if_write_available - %s: Failed call to ldap_get_option for poll_fd: LDAP error %d (%s)\n",
agmt_get_long_name(conn->agmt),
rc, ldap_err2string(rc));
conn->last_ldap_error = rc;
@@ -640,9 +638,8 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Failed call to ldap_get_option for socketarg in "
- "see_if_write_available: LDAP error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "see_if_write_available - %s: Failed call to ldap_get_option for socketarg: LDAP error %d (%s)\n",
agmt_get_long_name(conn->agmt),
rc, ldap_err2string(rc));
conn->last_ldap_error = rc;
@@ -654,7 +651,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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"%s: poll timed out - poll interval [%d]\n",
agmt_get_long_name(conn->agmt),
timeout);
@@ -687,13 +684,13 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: check_flow_control_tot_init no callback data [ msgid sent: %d]\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "check_flow_control_tot_init - %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, LOG_DEBUG, repl_plugin_name,
- "%s: check_flow_control_tot_init invalid message ids [ msgid sent: %d, rcv: %d]\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "check_flow_control_tot_init - %s - Invalid message ids [ msgid sent: %d, rcv: %d]\n",
agmt_get_long_name(conn->agmt),
sent_msgid,
rcv_msgid);
@@ -713,8 +710,8 @@ 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, 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"
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "check_flow_control_tot_init - %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),
totalUpdatePause,
@@ -775,8 +772,8 @@ conn_is_available(Repl_Connection *conn)
} else {
/* Else give connection to others threads */
PR_Unlock(conn->lock);
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: perform_operation transient timeout. retry)\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "conn_is_available - %s: transient timeout. retry)\n",
agmt_get_long_name(conn->agmt));
DS_Sleep(PR_MillisecondsToInterval(yield_delay_msec));
PR_Lock(conn->lock);
@@ -836,8 +833,8 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: perform_operation connection is not available (%d)\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "perform_operation - %s - Connection is not available (%d)\n",
agmt_get_long_name(conn->agmt),
return_value);
return return_value;
@@ -886,8 +883,8 @@ perform_operation(Repl_Connection *conn, int optype, const char *dn,
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "%s: Failed to send %s operation: LDAP error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "perform_operation - %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));
conn->last_ldap_error = rc;
@@ -1073,8 +1070,8 @@ conn_cancel_linger(Repl_Connection *conn)
PR_Lock(conn->lock);
if (conn->linger_active)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: Cancelling linger on the connection\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "conn_cancel_linger - %s - Canceling linger on the connection\n",
agmt_get_long_name(conn->agmt));
conn->linger_active = PR_FALSE;
if (slapi_eq_cancel(conn->linger_event) == 1)
@@ -1086,8 +1083,8 @@ conn_cancel_linger(Repl_Connection *conn)
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: No linger to cancel on the connection\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "conn_cancel_linger - %s - No linger to cancel on the connection\n",
agmt_get_long_name(conn->agmt));
}
PR_Unlock(conn->lock);
@@ -1106,8 +1103,8 @@ linger_timeout(time_t event_time, void *arg)
Repl_Connection *conn = (Repl_Connection *)arg;
PR_ASSERT(NULL != conn);
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: Linger timeout has expired on the connection\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "linger_timeout - %s - Linger timeout has expired on the connection\n",
agmt_get_long_name(conn->agmt));
PR_Lock(conn->lock);
if (conn->linger_active)
@@ -1134,13 +1131,13 @@ conn_start_linger(Repl_Connection *conn)
time_t now;
PR_ASSERT(NULL != conn);
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: Beginning linger on the connection\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "conn_start_linger -%s - Beginning linger on the connection\n",
agmt_get_long_name(conn->agmt));
if (!conn_connected(conn))
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: No linger on the closed conn\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "conn_start_linger - %s - No linger on the closed conn\n",
agmt_get_long_name(conn->agmt));
return;
}
@@ -1148,8 +1145,8 @@ conn_start_linger(Repl_Connection *conn)
PR_Lock(conn->lock);
if (conn->linger_active)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: Linger already active on the connection\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "conn_start_linger - %s - Linger already active on the connection\n",
agmt_get_long_name(conn->agmt));
}
else
@@ -1215,8 +1212,8 @@ conn_connect(Repl_Connection *conn)
/* Pb occured in decryption: stop now, binding will fail */
if ( pw_ret == -1 )
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "%s: Decoding of the credentials failed.\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "conn_connect - %s - Decoding of the credentials failed.\n",
agmt_get_long_name(conn->agmt));
return_value = CONN_OPERATION_FAILED;
@@ -1241,8 +1238,8 @@ conn_connect(Repl_Connection *conn)
if (secure > 0) {
if (!NSS_IsInitialized()) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "%s: SSL Not Initialized, Replication over SSL FAILED\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "conn_connect - %s - SSL Not Initialized, Replication over SSL FAILED\n",
agmt_get_long_name(conn->agmt));
conn->last_ldap_error = LDAP_INAPPROPRIATE_AUTH;
conn->last_operation = CONN_INIT;
@@ -1257,8 +1254,8 @@ conn_connect(Repl_Connection *conn)
#endif
/* Now we initialize the LDAP Structure and set options */
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: Trying %s%s slapi_ldap_init_ext\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "conn_connect - %s - Trying %s%s slapi_ldap_init_ext\n",
agmt_get_long_name(conn->agmt),
secure ? "secure" : "non-secure",
(secure == SLAPI_LDAP_INIT_FLAG_startTLS) ? " startTLS" : "");
@@ -1275,8 +1272,8 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Failed to establish %s%sconnection to the consumer\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "conn_connect - %s - Failed to establish %s%sconnection to the consumer\n",
agmt_get_long_name(conn->agmt),
secure ? "secure " : "",
(secure == SLAPI_LDAP_INIT_FLAG_startTLS) ? "startTLS " : "");
@@ -1286,8 +1283,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "%s: binddn = %s, passwd = %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "conn_connect - %s - binddn = %s, passwd = %s\n",
agmt_get_long_name(conn->agmt),
binddn?binddn:"NULL", creds->bv_val?creds->bv_val:"NULL");
@@ -1364,8 +1361,8 @@ close_connection_internal(Repl_Connection *conn)
slapi_ldap_unbind(conn->ld);
}
conn->ld = NULL;
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: Disconnected from the consumer\n", agmt_get_long_name(conn->agmt));
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "close_connection_internal - %s - Disconnected from the consumer\n", agmt_get_long_name(conn->agmt));
}
void
@@ -1698,12 +1695,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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
"%s: Fail to retrieve the remote schema objectclasses\n",
agmt_get_long_name(conn->agmt));
}
@@ -1738,8 +1735,8 @@ 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, LOG_ERR, repl_plugin_name,
- "[S] Schema %s must not be overwritten (set replication log for additional info)\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "update_consumer_schema - [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,13 +1778,13 @@ conn_push_schema(Repl_Connection *conn, CSN **remotecsn)
if (!remotecsn)
{
return_value = CONN_OPERATION_FAILED;
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "NULL remote CSN\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "conn_push_schema - NULL remote CSN\n");
}
else if (!conn_connected_locked(conn, 0 /* not locked */))
{
return_value = CONN_NOT_CONNECTED;
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: Schema replication update failed: not connected to consumer\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "conn_push_schema - %s: Schema replication update failed: not connected to consumer\n",
agmt_get_long_name(conn->agmt));
}
else
@@ -1805,60 +1802,59 @@ conn_push_schema(Repl_Connection *conn, CSN **remotecsn)
}
else
{
- if (*remotecsn) {
- csn_as_string (*remotecsn, PR_FALSE, remotecnsstr);
- csn_as_string (localcsn, PR_FALSE, localcsnstr);
- 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, LOG_DEBUG, repl_plugin_name,
- "[S] Checking consumer schema localcsn:%s / remotecsn:NULL\n", localcsnstr);
- }
- if (!update_consumer_schema(conn)) {
- /* At least one schema definition (attributetypes/objectclasses) of the consumer
- * is a superset of the supplier.
- * It is not possible push the schema immediately.
- * Note: in update_consumer_schema, it may update the local supplier schema.
- * So it could be possible that a second attempt (right now) of update_consumer_schema
- * would be successful
- */
- 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, LOG_DEBUG, "schema",
- "[S] learned definitions are not suffisant to try to push the schema \n");
- return_value = CONN_OPERATION_FAILED;
- }
- }
- if (return_value == CONN_OPERATION_SUCCESS) {
- struct berval **remote_schema_csn_bervals = NULL;
-
- /* Get remote server's schema */
- return_value = conn_read_entry_attribute(conn, "cn=schema", nsschemacsn,
- &remote_schema_csn_bervals);
- if (CONN_OPERATION_SUCCESS == return_value) {
- if (NULL != remote_schema_csn_bervals && NULL != remote_schema_csn_bervals[0]) {
- char remotecsnstr[CSN_STRSIZE + 1] = {0};
- 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, LOG_DEBUG, repl_plugin_name,
- "[S] Reread remotecsn:%s\n", remotecsnstr);
- *remotecsn = csn_new_by_string(remotecsnstr);
- if (*remotecsn && (csn_compare(localcsn, *remotecsn) <= 0)) {
- return_value = CONN_SCHEMA_NO_UPDATE_NEEDED;
- }
- /* Need to free the remote_schema_csn_bervals */
- ber_bvecfree(remote_schema_csn_bervals);
- }
- if (return_value == CONN_OPERATION_SUCCESS) {
- 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));
- }
-
- }
- }
+ 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,
+ "conn_push_schema - [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,
+ "conn_push_schema - [S] Checking consumer schema localcsn:%s / remotecsn:NULL\n", localcsnstr);
+ }
+ if (!update_consumer_schema(conn)) {
+ /* At least one schema definition (attributetypes/objectclasses) of the consumer
+ * is a superset of the supplier.
+ * It is not possible push the schema immediately.
+ * Note: in update_consumer_schema, it may update the local supplier schema.
+ * So it could be possible that a second attempt (right now) of update_consumer_schema
+ * would be successful
+ */
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "conn_push_schema - [S] schema definitions may have been learned\n");
+ if (!update_consumer_schema(conn)) {
+ slapi_log_error(SLAPI_LOG_REPL, "schema",
+ "conn_push_schema - [S] learned definitions are not suffisant to try to push the schema \n");
+ return_value = CONN_OPERATION_FAILED;
+ }
+ }
+ if (return_value == CONN_OPERATION_SUCCESS) {
+ struct berval **remote_schema_csn_bervals = NULL;
+
+ /* Get remote server's schema */
+ return_value = conn_read_entry_attribute(conn, "cn=schema", nsschemacsn,
+ &remote_schema_csn_bervals);
+ if (CONN_OPERATION_SUCCESS == return_value) {
+ if (NULL != remote_schema_csn_bervals && NULL != remote_schema_csn_bervals[0]) {
+ char remotecsnstr[CSN_STRSIZE + 1] = {0};
+ 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,
+ "conn_push_schema - [S] Reread remotecsn:%s\n", remotecsnstr);
+ *remotecsn = csn_new_by_string(remotecsnstr);
+ if (*remotecsn && (csn_compare(localcsn, *remotecsn) <= 0)) {
+ return_value = CONN_SCHEMA_NO_UPDATE_NEEDED;
+ }
+ /* Need to free the remote_schema_csn_bervals */
+ ber_bvecfree(remote_schema_csn_bervals);
+ }
+ if (return_value == CONN_OPERATION_SUCCESS) {
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "conn_push_schema - Schema checking successful: ok to push the schema (%s)\n", agmt_get_long_name(conn->agmt));
+ }
+ }
+ }
}
}
if (CONN_OPERATION_SUCCESS == return_value)
@@ -1898,8 +1894,8 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Error: unable to read local schema definitions.\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "conn_push_schema - %s - Error: unable to read local schema definitions.\n",
agmt_get_long_name(conn->agmt));
return_value = CONN_OPERATION_FAILED;
}
@@ -1942,7 +1938,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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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,8 +1958,8 @@ conn_push_schema(Repl_Connection *conn, CSN **remotecsn)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "%s: Schema replication update failed: "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "conn_push_schema - %s - Schema replication update failed: "
"unable to prepare schema entry for transmission.\n",
agmt_get_long_name(conn->agmt));
}
@@ -2072,7 +2068,7 @@ bind_and_check_pwp(Repl_Connection *conn, char * binddn, char *password)
{
if (conn->last_ldap_error != rc)
{
- int log_level = SLAPI_LOG_FATAL;
+ int log_level = SLAPI_LOG_INFO;
if (conn->last_ldap_error == LDAP_LOCAL_ERROR){
/*
* Local errors are not logged by default, so when we recover
@@ -2081,9 +2077,9 @@ 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, log_level==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
+ slapi_log_error(log_level,
repl_plugin_name,
- "%s: Replication bind with %s auth resumed\n",
+ "bind_and_check_pwp - %s: Replication bind with %s auth resumed\n",
agmt_get_long_name(conn->agmt),
mech ? mech : "SIMPLE");
}
@@ -2096,8 +2092,8 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Successfully bound %s to consumer, "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "bind_and_check_pwp - %s - Successfully bound %s to consumer, "
"but password has expired on consumer.\n",
agmt_get_long_name(conn->agmt), binddn);
}
@@ -2108,8 +2104,8 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Successfully bound %s to consumer, "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "bind_and_check_pwp - %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,10 +2127,9 @@ 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(rc == LDAP_LOCAL_ERROR ? SLAPI_LOG_REPL : SLAPI_LOG_FATAL,
- rc == LDAP_LOCAL_ERROR ? LOG_DEBUG : LOG_ERR,
+ slapi_log_error(rc == LDAP_LOCAL_ERROR ? SLAPI_LOG_REPL : SLAPI_LOG_ERR,
repl_plugin_name,
- "%s: Replication bind with %s auth failed: LDAP error %d (%s) (%s)\n",
+ "bind_and_check_pwp - %s - Replication bind with %s auth failed: LDAP error %d (%s) (%s)\n",
agmt_get_long_name(conn->agmt),
mech ? mech : "SIMPLE", rc,
ldap_err2string(rc), errmsg ? errmsg : "");
@@ -2142,8 +2137,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "%s: Replication bind with %s auth failed: LDAP error %d (%s) (%s)\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "bind_and_check_pwp - %s - Replication bind with %s auth failed: LDAP error %d (%s) (%s)\n",
agmt_get_long_name(conn->agmt),
mech ? mech : "SIMPLE", rc,
ldap_err2string(rc), errmsg ? errmsg : "");
@@ -2224,7 +2219,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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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 f853145..e0a201c 100644
--- a/ldap/servers/plugins/replication/repl5_inc_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_inc_protocol.c
@@ -230,8 +230,8 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Received error %d: %s for %s operation\n",
+ slapi_log_error(SLAPI_LOG_DEBUG, repl_plugin_name,
+ "repl5_inc_log_operation_failure - %s: Received error %d: %s for %s operation\n",
agreement_name,
ldap_error, ldap_error_string ? ldap_error_string : "NULL",
op_string ? op_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, LOG_DEBUG, NULL, "repl5_inc_result_threadmain starting\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl5_inc_result_threadmain - Starting\n");
while (!finished)
{
LDAPControl **returned_controls = NULL;
@@ -274,7 +274,8 @@ 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, LOG_DEBUG, NULL, "repl5_inc_result_threadmain: read result for message_id %d\n", message_id);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "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,17 +338,17 @@ repl5_inc_result_threadmain(void *param)
}
conn_get_error_ex(conn, &operation_code, &connection_error, &ldap_error_string);
- 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);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "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,
csn_str, uniqueid, replica_id, &should_finish,
&(rd->num_changes_sent));
if (return_value || should_finish)
{
- 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);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "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 */
PR_Lock(rd->lock);
rd->result = return_value;
@@ -374,7 +375,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, LOG_DEBUG, "repl5_inc_result_threadmain",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl5_inc_result_threadmain - "
"Abort control detected, setting abort time...(%s)\n",
agmt_get_long_name(rd->prp->agmt));
}
@@ -388,7 +389,7 @@ repl5_inc_result_threadmain(void *param)
repl5_inc_op_free(op);
}
}
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "repl5_inc_result_threadmain exiting\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl5_inc_result_threadmain exiting\n");
}
static result_data *
@@ -442,8 +443,8 @@ repl5_inc_create_async_result_thread(result_data *rd)
SLAPD_DEFAULT_THREAD_STACKSIZE);
if (NULL == tid)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
- "repl5_tot_create_async_result_thread failed. "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "repl5_inc_create_async_result_thread - Failed. "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
PR_GetError(), slapd_pr_strerror( PR_GetError() ));
retval = -1;
@@ -499,8 +500,8 @@ 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, LOG_DEBUG, NULL,
- "repl5_inc_waitfor_async_results: %d %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "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) {
/* If so then we're done */
@@ -524,9 +525,9 @@ repl5_inc_waitfor_async_results(result_data *rd)
if (!done && (loops > 300))
{
/* Log a warning */
- 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);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "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,17 +747,17 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Incremental protocol: "
- "event %s should not occur in state %s; going to sleep\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "repl5_inc_run - %s: "
+ "Event %s should not occur in state %s; going to sleep\n",
agmt_get_long_name(prp->agmt), e1 ? event2name(EVENT_WINDOW_CLOSED) :
event2name(EVENT_BACKOFF_EXPIRED), state2name(current_state));
protocol_sleep(prp, PR_INTERVAL_NO_TIMEOUT);
} else {
/* wait until window opens or an event occurs */
- 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));
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "repl5_inc_run - %s: Waiting for update window to open\n",
+ agmt_get_long_name(prp->agmt));
protocol_sleep(prp, PR_INTERVAL_NO_TIMEOUT);
}
break;
@@ -791,8 +792,8 @@ 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, LOG_ERR, repl_plugin_name, "%s: Incremental protocol: "
- "event %s should not occur in state %s\n",agmt_get_long_name(prp->agmt),
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "repl5_inc_run - %s: "
+ "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));
wait_change_timer_set = 0;
@@ -859,8 +860,8 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Incremental protocol: event %s should not occur in state %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "repl5_inc_run - %s: 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));
@@ -934,8 +935,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "%s: Replication session backing off for %ld seconds\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "repl5_inc_run - %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);
} else {
@@ -959,8 +960,8 @@ 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, LOG_ERR, repl_plugin_name, "%s: Incremental protocol: "
- "event %s should not occur in state %s; going to sleep\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "repl5_inc_run - %s: "
+ "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));
protocol_sleep(prp, PR_INTERVAL_NO_TIMEOUT);
@@ -1006,7 +1007,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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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,16 +1022,16 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Replica has no update vector. It has never been initialized.\n",
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name,
+ "repl5_inc_run - %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,
"Replica is not initialized");
next_state = STATE_BACKOFF_START;
break;
case EXAMINE_RUV_GENERATION_MISMATCH:
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "%s: The remote replica has a different database generation ID than "
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name,
+ "repl5_inc_run - %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));
agmt_set_last_update_status(prp->agmt, 0, NSDS50_REPL_RUV_ERROR,
@@ -1039,8 +1040,8 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Replica update vector is too out of date to bring "
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name,
+ "repl5_inc_run - %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));
agmt_set_last_update_status(prp->agmt, 0, NSDS50_REPL_RUV_ERROR,
@@ -1056,15 +1057,15 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Incremental protocol: fatal error - too much time skew between replicas!\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "repl5_inc_run - %s: 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, LOG_ERR, repl_plugin_name,
- "%s: Incremental protocol: fatal internal error updating the CSN generator!\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "repl5_inc_run - %s: 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,
"fatal internal error updating the CSN generator");
@@ -1152,8 +1153,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "%s: Pausing updates for %ld seconds to allow other suppliers to update consumer\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "repl5_inc_run - %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))){
DS_Sleep(PR_SecondsToInterval(1));
@@ -1171,8 +1172,8 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Incremental update failed and requires administrator action\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "repl5_inc_run - %s: Incremental update failed and requires administrator action\n",
agmt_get_long_name(prp->agmt));
next_state = STATE_STOP_FATAL_ERROR_PART2;
break;
@@ -1220,7 +1221,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
break;
}
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,"%s: State: %s -> %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,"repl5_inc_run - %s: State: %s -> %s\n",
agmt_get_long_name(prp->agmt),state2name(current_state), state2name(next_state));
current_state = next_state;
@@ -1248,8 +1249,8 @@ protocol_sleep(Private_Repl_Protocol *prp, PRIntervalTime duration)
PR_WaitCondVar(prp->cvar, duration);
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: Incremental protocol: can't go to sleep: event bits - %x\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "protocol_sleep - %s: Can't go to sleep: event bits - %x\n",
agmt_get_long_name(prp->agmt), prp->eventbits);
}
PR_Unlock(prp->lock);
@@ -1338,16 +1339,16 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: replay_update: Unable to create NSDS50ReplUpdateInfoControl "
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name,
+ "replay_update - %s: 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));
}
else
{
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: replay_update: Sending %s operation (dn=\"%s\" csn=%s)\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "replay_update - %s: Sending %s operation (dn=\"%s\" csn=%s)\n",
agmt_get_long_name(prp->agmt),
op2string(op->operation_type), REPL_GET_DN(&op->target_address),
csn_as_string(op->csn, PR_FALSE, csn_str));
@@ -1364,8 +1365,8 @@ replay_update(Private_Repl_Protocol *prp, slapi_operation_parameters *op, int *m
&entryattrs);
if (NULL == entryattrs)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "%s: replay_update: Cannot convert entry to LDAPMods.\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "replay_update - %s: Cannot convert entry to LDAPMods.\n",
agmt_get_long_name(prp->agmt));
return_value = CONN_LOCAL_ERROR;
}
@@ -1378,8 +1379,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "%s: replay_update: %s operation (dn=\"%s\" csn=%s) "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "replay_update - %s: %s operation (dn=\"%s\" csn=%s) "
"not sent - empty\n",
agmt_get_long_name(prp->agmt),
op2string(op->operation_type),
@@ -1403,8 +1404,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "%s: replay_update: %ss operation (dn=\"%s\" csn=%s) "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "replay_update - %s: %s operation (dn=\"%s\" csn=%s) "
"not sent - empty\n",
agmt_get_long_name(prp->agmt),
op2string(op->operation_type),
@@ -1430,7 +1431,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, LOG_ERR, repl_plugin_name, "%s: replay_update: Unknown "
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name, "replay_update - %s: Unknown "
"operation type %lu found in changelog - skipping change.\n",
agmt_get_long_name(prp->agmt), op->operation_type);
}
@@ -1441,16 +1442,16 @@ 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, LOG_DEBUG, repl_plugin_name,
- "%s: replay_update: Consumer successfully sent operation with csn %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "replay_update - %s: Consumer successfully sent operation with csn %s\n",
agmt_get_long_name(prp->agmt), csn_as_string(op->csn, PR_FALSE, csn_str));
}
}
else
{
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: replay_update: Consumer could not replay operation with csn %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "replay_update - %s: 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,10 +1525,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,
- *finished ? LOG_ERR : LOG_DEBUG,
+ slapi_log_error(*finished ? SLAPI_LOG_WARNING : slapi_log_urp,
repl_plugin_name,
- "%s: Consumer failed to replay change (uniqueid %s, CSN %s): %s (%d). %s.\n",
+ "repl5_inc_update_from_op_result - %s: Consumer failed to replay change (uniqueid %s, CSN %s): %s (%d). %s.\n",
agmt_get_long_name(prp->agmt),
uniqueid, csn_str,
ldap_err2string(connection_error), connection_error,
@@ -1539,8 +1539,8 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Consumer failed to replay change (uniqueid %s, CSN %s): "
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name,
+ "repl5_inc_update_from_op_result - %s: Consumer failed to replay change (uniqueid %s, CSN %s): "
"%s(%d). Will retry later.\n",
agmt_get_long_name(prp->agmt),
uniqueid, csn_str,
@@ -1551,8 +1551,8 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Consumer timed out to replay change (uniqueid %s, CSN %s): "
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name,
+ "repl5_inc_update_from_op_result - %s: Consumer timed out to replay change (uniqueid %s, CSN %s): "
"%s.\n",
agmt_get_long_name(prp->agmt),
uniqueid, csn_str,
@@ -1566,8 +1566,8 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Failed to replay change (uniqueid %s, CSN %s): "
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name,
+ "repl5_inc_update_from_op_result - %s: Failed to replay change (uniqueid %s, CSN %s): "
"Local error. Will retry later.\n",
agmt_get_long_name(prp->agmt),
uniqueid, csn_str);
@@ -1624,86 +1624,86 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Invalid parameter passed to cl5CreateReplayIterator\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "send_updates - %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,
"Invalid parameter passed to cl5CreateReplayIterator");
return_value = UPDATE_FATAL_ERROR;
break;
case CL5_BAD_FORMAT: /* db data has unexpected format */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "%s: Unexpected format encountered in changelog database\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "send_updates - %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,
"Unexpected format encountered in changelog database");
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, LOG_ERR, repl_plugin_name,
- "%s: Changelog database was in an incorrect state\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "send_updates - %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,
"Changelog database was in an incorrect state");
return_value = UPDATE_FATAL_ERROR;
break;
case CL5_BAD_DBVERSION: /* changelog has invalid dbversion */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "%s: Incorrect dbversion found in changelog database\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "send_updates - %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,
"Incorrect dbversion found in changelog database");
return_value = UPDATE_FATAL_ERROR;
break;
case CL5_DB_ERROR: /* database error */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "%s: A changelog database error was encountered\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "send_updates - %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,
"Changelog database error was encountered");
return_value = UPDATE_FATAL_ERROR;
break;
case CL5_NOTFOUND: /* we have no changes to send */
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: No changes to send\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "send_updates - %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, LOG_ERR, repl_plugin_name,
- "%s: Memory allocation error occurred\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "send_updates - %s: Memory allocation error occurred\n",
agmt_get_long_name(prp->agmt));
agmt_set_last_update_status(prp->agmt, 0, NSDS50_REPL_CL_ERROR,
"changelog memory allocation error occurred");
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, LOG_ERR, repl_plugin_name,
- "%s: An NSPR error (%d) occurred\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "send_updates - %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, LOG_ERR, repl_plugin_name,
- "%s: A CSN API failure was encountered\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "send_updates - %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, LOG_ERR, repl_plugin_name,
- "%s: An RUV API failure occurred\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "send_updates - %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, LOG_ERR, repl_plugin_name,
- "%s: A namedobject API failure occurred\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "send_updates - %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, LOG_ERR, repl_plugin_name,
- "%s: Data required to update replica has been purged from the changelog. "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "send_updates - %s: Data required to update replica has been purged from the changelog. "
"The replica must be reinitialized.\n",
agmt_get_long_name(prp->agmt));
agmt_set_last_update_status(prp->agmt, 0, NSDS50_REPL_CL_ERROR,
@@ -1712,22 +1712,22 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Missing data encountered\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "send_updates - %s: Missing data encountered\n",
agmt_get_long_name(prp->agmt));
agmt_set_last_update_status(prp->agmt, 0, NSDS50_REPL_CL_ERROR,
"Changelog data is missing");
return_value = UPDATE_FATAL_ERROR;
break;
case CL5_UNKNOWN_ERROR: /* unclassified error */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "%s: An unknown error was encountered\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "send_updates - %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, LOG_ERR, repl_plugin_name,
- "%s: An unknown error (%d) occurred "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "send_updates - %s: An unknown error (%d) occurred "
"(cl5CreateReplayIterator)\n",
agmt_get_long_name(prp->agmt), rc);
return_value = UPDATE_TRANSIENT_ERROR;
@@ -1751,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, LOG_ERR, repl_plugin_name, "%s: repl5_inc_run: "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "send_updates - %s: "
"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");
@@ -1772,8 +1772,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "%s: changelog iteration code returned a dummy entry with csn %s, "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "send_updates - %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));
continue;
@@ -1802,10 +1802,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*/);
}
- 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),
+ slapi_log_error(finished ? SLAPI_LOG_WARNING : slapi_log_urp,
+ "send_updates - %s: Failed to send update operation to consumer (uniqueid %s, CSN %s): %s. %s.\n",
+ (char *)agmt_get_long_name(prp->agmt),
entry.op->target_address.uniqueid, csn_str,
ldap_err2string(error),
finished ? "Will retry later" : "Skipping");
@@ -1816,8 +1815,8 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Failed to send update operation to consumer (uniqueid %s, CSN %s): "
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name,
+ "send_updates - %s: Failed to send update operation to consumer (uniqueid %s, CSN %s): "
"%s. Will retry later.\n",
agmt_get_long_name(prp->agmt),
entry.op->target_address.uniqueid, csn_str,
@@ -1827,8 +1826,8 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
{
return_value = UPDATE_TIMEOUT;
finished = 1;
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "%s: Timed out sending update operation to consumer (uniqueid %s, CSN %s): "
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name,
+ "send_updates - %s: Timed out sending update operation to consumer (uniqueid %s, CSN %s): "
"%s.\n",
agmt_get_long_name(prp->agmt),
entry.op->target_address.uniqueid, csn_str,
@@ -1842,8 +1841,8 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Failed to send update operation to consumer (uniqueid %s, CSN %s): "
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name,
+ "send_updates - %s: Failed to send update operation to consumer (uniqueid %s, CSN %s): "
"Local error. Will retry later.\n",
agmt_get_long_name(prp->agmt),
entry.op->target_address.uniqueid, csn_str);
@@ -1892,8 +1891,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "%s: Skipping update operation with no message_id (uniqueid %s, CSN %s):\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "send_updates - %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);
agmt_inc_last_update_changecount (prp->agmt, csn_get_replicaid(entry.op->csn), 1 /*skipped*/);
@@ -1901,8 +1900,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "%s: skipped updates is too high (%d) if no other update is sent we will update the subentry\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "send_updates - %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;
}
@@ -1911,8 +1910,8 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
}
break;
case CL5_BAD_DATA:
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "%s: Invalid parameter passed to cl5GetNextOperationToReplay\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "send_updates - %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,
"Invalid parameter passed to cl5GetNextOperationToReplay");
@@ -1920,15 +1919,15 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
finished = 1;
break;
case CL5_NOTFOUND:
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: No more updates to send (cl5GetNextOperationToReplay)\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "send_updates - %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, LOG_ERR, repl_plugin_name,
- "%s: A database error occurred (cl5GetNextOperationToReplay)\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "send_updates - %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,
"Database error occurred while getting the next operation to replay");
@@ -1936,13 +1935,13 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: A malformed changelog entry was encountered (cl5GetNextOperationToReplay)\n",
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name,
+ "send_updates - %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, LOG_ERR, repl_plugin_name,
- "%s: A memory allocation error occurred (cl5GetNextOperationToReplay)\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "send_updates - %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,
"Memory allocation error occurred (cl5GetNextOperationToReplay)");
@@ -1951,8 +1950,8 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
case CL5_IGNORE_OP:
break;
default:
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "%s: Unknown error code (%d) returned from cl5GetNextOperationToReplay\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "send_updates - %s: Unknown error code (%d) returned from cl5GetNextOperationToReplay\n",
agmt_get_long_name(prp->agmt), rc);
return_value = UPDATE_TRANSIENT_ERROR;
break;
@@ -1977,8 +1976,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "Aborting send_updates...(%s)\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "send_updates - Aborting send_updates...(%s)\n",
agmt_get_long_name(rd->prp->agmt));
}
}
@@ -2000,13 +1999,13 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
{
rid = replica_get_rid(replica);
}
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: skipped updates was definitely too high (%d) update the subentry now\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "send_updates - %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, LOG_ERR, repl_plugin_name,
- "send_updates: Unknown replication area due to agreement not found.");
+ slapi_log_error(SLAPI_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;
} else {
@@ -2039,16 +2038,16 @@ 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, LOG_ERR, repl_plugin_name, "%s: repl5_inc_run: "
- "repl5_tot_destroy_async_result_thread failed; error - %d\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "%s: repl5_inc_run: "
+ "send_updates - repl5_inc_destroy_async_result_thread failed; error - %d\n",
agmt_get_long_name(prp->agmt), rc);
}
*num_changes_sent = rd->num_changes_sent;
}
PR_Lock(rd->lock);
if (rd->flowcontrol_detection) {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: Incremental update flow control triggered %d times\n"
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "send_updates - %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),
rd->flowcontrol_detection,
@@ -2102,44 +2101,44 @@ repl5_inc_stop(Private_Repl_Protocol *prp)
{
/* Isn't listening. Do something drastic. */
return_value = -1;
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: repl5_inc_stop: protocol does not stop after %" NSPRIu64 " seconds\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "repl5_inc_stop - %s: 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, LOG_DEBUG, repl_plugin_name,
- "%s: repl5_inc_stop: protocol stopped after %d seconds\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "repl5_inc_stop - %s: 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, LOG_DEBUG, repl_plugin_name,
- "%s: repl5_inc_stop: protocol replica_object is NULL\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "repl5_inc_stop - %s: Protocol replica_object is NULL\n",
agmt_get_long_name(prp->agmt));
} else {
Replica *replica;
object_acquire(prp->replica_object);
replica = object_get_data(prp->replica_object);
if (NULL == replica) {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: repl5_inc_stop: replica is NULL\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "repl5_inc_stop - %s: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, LOG_DEBUG, repl_plugin_name,
- "%s: repl5_inc_stop: ruv_obj is NULL\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "repl5_inc_stop - %s: rruv_obj is NULL\n",
agmt_get_long_name(prp->agmt));
} else {
RUV *ruv;
object_acquire(ruv_obj);
ruv = (RUV*)object_get_data (ruv_obj);
if (NULL == ruv) {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: repl5_inc_stop: ruv is NULL\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "repl5_inc_stop - %s: ruv is NULL\n",
agmt_get_long_name(prp->agmt));
} else {
diff --git a/ldap/servers/plugins/replication/repl5_init.c b/ldap/servers/plugins/replication/repl5_init.c
index 1eac6f7..ed80bf1 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, LOG_DEBUG, repl_plugin_name, "multimaster_preop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, repl_plugin_name, "multimaster_postop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, repl_plugin_name, "multimaster_internalpreop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, repl_plugin_name, "multimaster_internalpostop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, repl_plugin_name, "multimaster_bepreop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, repl_plugin_name, "multimaster_bepostop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, repl_plugin_name, "multimaster_betxn_bepostop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name, "multimaster_betxn_bepostop_init - Failed\n" );
rc= -1;
}
@@ -399,8 +399,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "multimaster_betxnpostop_init failed\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, repl_plugin_name, "multimaster_start_extop_init (StartNSDS50ReplicationRequest) failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, repl_plugin_name, "multimaster_end_extop_init (EndNSDS50ReplicationRequest) failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, repl_plugin_name, "multimaster_cleanruv_extop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name, "multimaster_cleanruv_maxcsn_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, LOG_DEBUG, repl_plugin_name, "multimaster_cleanruv_extop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name, "multimaster_cleanruv_status_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, LOG_DEBUG, repl_plugin_name, "multimaster_start_extop_init (NSDS50ReplicationEntry failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name, "multimaster_total_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, LOG_DEBUG, repl_plugin_name, "multimaster_start_extop_init (NSDS50ReplicationResponse failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name, "multimaster_response_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, LOG_DEBUG, repl_plugin_name, "multimaster_cleanruv_extop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, repl_plugin_name, "multimaster_cleanruv_abort_extop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name, "multimaster_cleanruv_abort_extop_init - Failed\n" );
rc= -1;
}
@@ -613,90 +613,88 @@ static int
create_repl_schema_policy(void)
{
/* DN part of this entry_string: no need to be optimized. */
- char entry_string[1024];
+ char entry_string[1024];
Slapi_PBlock *pb;
Slapi_Entry *e ;
int return_value;
- char *repl_schema_top, *repl_schema_supplier, *repl_schema_consumer;
- char *default_supplier_policy = NULL;
- char *default_consumer_policy = NULL;
- int rc = 0;
-
- slapi_schema_get_repl_entries(&repl_schema_top, &repl_schema_supplier, &repl_schema_consumer, &default_supplier_policy, &default_consumer_policy);
-
- /* Create cn=replSchema,cn=config */
- PR_snprintf(entry_string, sizeof(entry_string), "dn: %s\nobjectclass: top\nobjectclass: nsSchemaPolicy\ncn: replSchema\n", repl_schema_top);
- e = slapi_str2entry(entry_string, 0);
- pb = slapi_pblock_new();
- slapi_add_entry_internal_set_pb(pb, e, NULL, /* controls */
- repl_get_plugin_identity(PLUGIN_MULTIMASTER_REPLICATION), 0 /* flags */);
- 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, LOG_ERR, repl_plugin_name, "Warning: unable to "
- "create configuration entry %s: %s\n", repl_schema_top,
- ldap_err2string(return_value));
- rc = -1;
- slapi_entry_free (e); /* The entry was not consumed */
- goto done;
- }
- slapi_pblock_destroy(pb);
-
- /* Create cn=supplierUpdatePolicy,cn=replSchema,cn=config */
- PR_snprintf(entry_string, sizeof(entry_string), "dn: %s\nobjectclass: top\nobjectclass: nsSchemaPolicy\ncn: supplierUpdatePolicy\n%s",
- repl_schema_supplier,
- default_supplier_policy ? default_supplier_policy : "");
- e = slapi_str2entry(entry_string, 0);
- pb = slapi_pblock_new();
+ char *repl_schema_top, *repl_schema_supplier, *repl_schema_consumer;
+ char *default_supplier_policy = NULL;
+ char *default_consumer_policy = NULL;
+ int rc = 0;
+
+ slapi_schema_get_repl_entries(&repl_schema_top, &repl_schema_supplier, &repl_schema_consumer, &default_supplier_policy, &default_consumer_policy);
+
+ /* Create cn=replSchema,cn=config */
+ PR_snprintf(entry_string, sizeof(entry_string), "dn: %s\nobjectclass: top\nobjectclass: nsSchemaPolicy\ncn: replSchema\n", repl_schema_top);
+ e = slapi_str2entry(entry_string, 0);
+ pb = slapi_pblock_new();
slapi_add_entry_internal_set_pb(pb, e, NULL, /* controls */
repl_get_plugin_identity(PLUGIN_MULTIMASTER_REPLICATION), 0 /* flags */);
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, LOG_ERR, repl_plugin_name, "Warning: unable to "
- "create configuration entry %s: %s\n", repl_schema_supplier,
- ldap_err2string(return_value));
- rc = -1;
- slapi_entry_free(e); /* The entry was not consumed */
- goto done;
- }
- slapi_pblock_destroy(pb);
-
- /* Create cn=consumerUpdatePolicy,cn=replSchema,cn=config */
- PR_snprintf(entry_string, sizeof(entry_string), "dn: %s\nobjectclass: top\nobjectclass: nsSchemaPolicy\ncn: consumerUpdatePolicy\n%s",
- repl_schema_consumer,
- default_consumer_policy ? default_consumer_policy : "");
- e = slapi_str2entry(entry_string, 0);
- pb = slapi_pblock_new();
+ if (return_value != LDAP_SUCCESS && return_value != LDAP_ALREADY_EXISTS) {
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "create_repl_schema_policy - "
+ "Unable to create configuration entry %s: %s\n", repl_schema_top,
+ ldap_err2string(return_value));
+ rc = -1;
+ slapi_entry_free (e); /* The entry was not consumed */
+ goto done;
+ }
+ slapi_pblock_destroy(pb);
+
+ /* Create cn=supplierUpdatePolicy,cn=replSchema,cn=config */
+ PR_snprintf(entry_string, sizeof(entry_string), "dn: %s\nobjectclass: top\nobjectclass: nsSchemaPolicy\ncn: supplierUpdatePolicy\n%s",
+ repl_schema_supplier,
+ default_supplier_policy ? default_supplier_policy : "");
+ e = slapi_str2entry(entry_string, 0);
+ pb = slapi_pblock_new();
slapi_add_entry_internal_set_pb(pb, e, NULL, /* controls */
repl_get_plugin_identity(PLUGIN_MULTIMASTER_REPLICATION), 0 /* flags */);
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, LOG_ERR, repl_plugin_name, "Warning: unable to "
- "create configuration entry %s: %s\n", repl_schema_consumer,
- ldap_err2string(return_value));
- rc = -1;
- slapi_entry_free(e); /* The entry was not consumed */
- goto done;
- }
- slapi_pblock_destroy(pb);
- pb = NULL;
-
+ if (return_value != LDAP_SUCCESS && return_value != LDAP_ALREADY_EXISTS) {
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "create_repl_schema_policy - Unable to "
+ "create configuration entry %s: %s\n", repl_schema_supplier,
+ ldap_err2string(return_value));
+ rc = -1;
+ slapi_entry_free(e); /* The entry was not consumed */
+ goto done;
+ }
+ slapi_pblock_destroy(pb);
-
- /* Load the policies of the schema replication */
- if (slapi_schema_load_repl_policies()) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Warning: unable to "
- "load the schema replication policies\n");
- rc = -1;
- goto done;
- }
+ /* Create cn=consumerUpdatePolicy,cn=replSchema,cn=config */
+ PR_snprintf(entry_string, sizeof(entry_string), "dn: %s\nobjectclass: top\nobjectclass: nsSchemaPolicy\ncn: consumerUpdatePolicy\n%s",
+ repl_schema_consumer,
+ default_consumer_policy ? default_consumer_policy : "");
+ e = slapi_str2entry(entry_string, 0);
+ pb = slapi_pblock_new();
+ slapi_add_entry_internal_set_pb(pb, e, NULL, /* controls */
+ repl_get_plugin_identity(PLUGIN_MULTIMASTER_REPLICATION), 0 /* flags */);
+ 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_ERR, repl_plugin_name, "create_repl_schema_policy - "
+ "Unable to create configuration entry %s: %s\n", repl_schema_consumer,
+ ldap_err2string(return_value));
+ rc = -1;
+ slapi_entry_free(e); /* The entry was not consumed */
+ goto done;
+ }
+ slapi_pblock_destroy(pb);
+ pb = NULL;
+
+ /* Load the policies of the schema replication */
+ if (slapi_schema_load_repl_policies()) {
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "create_repl_schema_policy - "
+ "Unable to load the schema replication policies\n");
+ rc = -1;
+ goto done;
+ }
+
done:
- if (pb) {
- slapi_pblock_destroy(pb);
- pb = NULL;
- }
+ slapi_pblock_destroy(pb);
+ pb = NULL;
+
return rc;
}
diff --git a/ldap/servers/plugins/replication/repl5_mtnode_ext.c b/ldap/servers/plugins/replication/repl5_mtnode_ext.c
index 034b99c..c5f8aaf 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "multimaster_mtnode_construct_replicas: "
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "replica_get_replica_from_dn: "
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "replica_get_replica_from_dn: "
+ slapi_log_error(SLAPI_LOG_REPL, 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 51f4a2d..f6cade1 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, LOG_ERR, repl_plugin_name, "multimaster_set_local_purl: "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "multimaster_set_local_purl - "
"unable to read server configuration: error %d\n", rc);
}
else
@@ -87,8 +87,8 @@ 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, LOG_ERR, repl_plugin_name, "multimaster_set_local_purl: "
- "server configuration missing\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "multimaster_set_local_purl - "
+ "Server configuration missing\n");
rc = -1;
}
else
@@ -98,8 +98,8 @@ 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, LOG_ERR, repl_plugin_name,
- "multimaster_set_local_purl: invalid server "
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name,
+ "multimaster_set_local_purl - Invalid server "
"configuration\n");
}
else
@@ -189,8 +189,8 @@ 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, LOG_ERR, REPLICATION_SUBSYSTEM,
- "%s An error occurred while decoding the replication update "
+ slapi_log_error(SLAPI_LOG_ERR, REPLICATION_SUBSYSTEM,
+ "multimaster_preop_add - %s An error occurred while decoding the replication update "
"control - Add\n", sessionid);
}
else if (1 == drc)
@@ -240,8 +240,8 @@ multimaster_preop_add (Slapi_PBlock *pb)
{
if(strcasecmp(entry_uuid,target_uuid)!=0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REPLICATION_SUBSYSTEM,
- "%s Replicated Add received with Control_UUID=%s and Entry_UUID=%s.\n",
+ slapi_log_error(SLAPI_LOG_WARNING, REPLICATION_SUBSYSTEM,
+ "multimaster_preop_add - %s Replicated Add received with Control_UUID=%s and Entry_UUID=%s.\n",
sessionid, target_uuid,entry_uuid);
}
@@ -318,8 +318,8 @@ 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, LOG_ERR, REPLICATION_SUBSYSTEM,
- "%s An error occurred while decoding the replication update "
+ slapi_log_error(SLAPI_LOG_ERR, REPLICATION_SUBSYSTEM,
+ "multimaster_preop_delete - %s An error occurred while decoding the replication update "
"control - Delete\n", sessionid);
}
else if (1 == drc)
@@ -331,8 +331,8 @@ 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, LOG_DEBUG, REPLICATION_SUBSYSTEM,
- "%s replication operation not processed, replica unavailable "
+ slapi_log_error(SLAPI_LOG_REPL, REPLICATION_SUBSYSTEM,
+ "multimaster_preop_delete - %s replication operation not processed, replica unavailable "
"or csn ignored\n", sessionid);
csn_free (&csn);
slapi_ch_free ((void**)&target_uuid);
@@ -417,8 +417,8 @@ 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, LOG_ERR, REPLICATION_SUBSYSTEM,
- "%s An error occurred while decoding the replication update "
+ slapi_log_error(SLAPI_LOG_ERR, REPLICATION_SUBSYSTEM,
+ "multimaster_preop_modify - %s An error occurred while decoding the replication update "
"control- Modify\n", sessionid);
}
else if (1 == drc)
@@ -430,8 +430,8 @@ 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, LOG_DEBUG, REPLICATION_SUBSYSTEM,
- "%s replication operation not processed, replica unavailable "
+ slapi_log_error(SLAPI_LOG_REPL, REPLICATION_SUBSYSTEM,
+ "multimaster_preop_modify - %s replication operation not processed, replica unavailable "
"or csn ignored\n", sessionid);
csn_free (&csn);
slapi_ch_free ((void**)&target_uuid);
@@ -522,8 +522,8 @@ multimaster_preop_modrdn (Slapi_PBlock *pb)
&csn, &modrdn_mods);
if (-1 == drc)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, REPLICATION_SUBSYSTEM,
- "%s An error occurred while decoding the replication update "
+ slapi_log_error(SLAPI_LOG_ERR, REPLICATION_SUBSYSTEM,
+ "multimaster_preop_modrdn - %s An error occurred while decoding the replication update "
"control - ModRDN\n", sessionid);
}
else if (1 == drc)
@@ -692,8 +692,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "Purged state information from entry %s up to "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "purge_entry_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,14 +959,14 @@ 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, LOG_DEBUG, REPLICATION_SUBSYSTEM,
- "copy_operation_parameters: operation is null.\n");
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, REPLICATION_SUBSYSTEM,
- "copy_operation_parameters: replica is null.\n");
+ slapi_log_error(SLAPI_LOG_REPL, REPLICATION_SUBSYSTEM,
+ "copy_operation_parameters - replica is null.\n");
return;
}
opext = (supplier_operation_extension*) repl_sup_get_ext (REPL_SUP_EXT_OP, op);
@@ -1150,8 +1150,8 @@ write_changelog_and_ruv (Slapi_PBlock *pb)
void *txn = NULL;
if (cl5_is_diskfull() && !cl5_diskspace_is_available())
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "write_changelog_and_ruv: Skipped due to DISKFULL\n");
+ slapi_log_error(SLAPI_LOG_CRIT, repl_plugin_name,
+ "write_changelog_and_ruv - Skipped due to DISKFULL\n");
return return_value;
}
slapi_pblock_get(pb, SLAPI_TXN, &txn);
@@ -1161,8 +1161,8 @@ write_changelog_and_ruv (Slapi_PBlock *pb)
{
char csn_str[CSN_STRSIZE];
/* ONREPL - log error */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "write_changelog_and_ruv: can't add a change for "
+ slapi_log_error(SLAPI_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),
op_params->target_address.uniqueid,
@@ -1206,14 +1206,14 @@ 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, LOG_DEBUG, repl_plugin_name,
- "write_changelog_and_ruv: RUV already covers csn for "
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_ERR, repl_plugin_name,
- "write_changelog_and_ruv: failed to update RUV for "
+ slapi_log_error(SLAPI_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,
csn_as_string(oppcsn, PR_FALSE, csn_str), rc);
@@ -1274,8 +1274,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "%s process postop: canceling operation csn\n", sessionid);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "process postop - %s canceling operation csn\n", sessionid);
} else {
rc = SLAPI_PLUGIN_FAILURE;
}
@@ -1325,8 +1325,8 @@ process_postop (Slapi_PBlock *pb)
slapi_pblock_get(pb, SLAPI_CONN_ID, &connid);
if (conn)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "process_postop: Failed to apply update (%s) error (%d). "
+ slapi_log_error(SLAPI_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,
connid, opid);
@@ -1463,8 +1463,8 @@ 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, LOG_ERR, repl_plugin_name, "%s process_operation: "
- "can't locate replica for the replicated operation\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "process_operation - "
+ "%s - Can't locate replica for the replicated operation\n",
sessionid );
return PR_FALSE;
}
@@ -1535,8 +1535,8 @@ 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, LOG_ERR, repl_plugin_name, "%s replica_get_purl_for_op: "
- "cannot obtain consumer connection extension or supplier_ruv.\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "replica_get_purl_for_op - "
+ "%s - Cannot obtain consumer connection extension or supplier_ruv.\n",
sessionid);
}
else
@@ -1614,16 +1614,16 @@ 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, LOG_ERR, repl_plugin_name, "multimaster_be_state_change: "
- "replica %s is coming online; enabling replication\n",
+ slapi_log_error(SLAPI_LOG_NOTICE, 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);
}
else if (new_be_state == SLAPI_BE_STATE_OFFLINE)
{
/* backend is about to be taken down - disable replication */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "multimaster_be_state_change: "
- "replica %s is going offline; disabling replication\n",
+ slapi_log_error(SLAPI_LOG_NOTICE, 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,8 +1632,8 @@ 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, LOG_ERR, repl_plugin_name, "multimaster_be_state_change: "
- "replica %s is about to be deleted; disabling replication\n",
+ slapi_log_error(SLAPI_LOG_NOTICE, 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 b735cc8..54bdce1 100644
--- a/ldap/servers/plugins/replication/repl5_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_protocol.c
@@ -85,8 +85,8 @@ prot_new(Repl_Agmt *agmt, int protocol_state)
if (NULL == rp->replica_object)
{
/* Whoa, no local replica!?!? */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "%s: Unable to locate replica object for local replica %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "prot_new - %s: Unable to locate replica object for local replica %s\n",
agmt_get_long_name(agmt),
slapi_sdn_get_dn(replarea_sdn));
goto loser;
@@ -246,7 +246,7 @@ prot_thread_main(void *arg)
agmt = rp->agmt;
if (!agmt) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "missing replication agreement\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "prot_thread_main - Missing replication agreement\n");
return;
}
@@ -281,8 +281,9 @@ 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, 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));
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "prot_thread_main - %s: total update on the replica is in progress. "
+ "Cannot initiate the total update.\n", agmt_get_long_name(rp->agmt));
break;
}
else
@@ -348,15 +349,15 @@ prot_start(Repl_Protocol *rp)
{
PRErrorCode prerr = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "%s: Unable to create protocol thread; NSPR error - %d, %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "prot_start - %s: Unable to create protocol thread; NSPR error - %d, %s\n",
agmt_get_long_name(rp->agmt),
prerr, slapd_pr_strerror(prerr));
}
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Unable to start "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "prot_start - Unable to start "
"protocol object - NULL protocol object passed to prot_start.\n");
}
}
@@ -376,8 +377,8 @@ prot_stop(Repl_Protocol *rp)
{
if (rp->prp_incremental->stop(rp->prp_incremental) != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "Warning: incremental protocol for replica \"%s\" "
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name,
+ "prot_stop - Incremental protocol for replica \"%s\" "
"did not shut down properly.\n",
agmt_get_long_name(rp->agmt));
}
@@ -386,8 +387,8 @@ prot_stop(Repl_Protocol *rp)
{
if (rp->prp_total->stop(rp->prp_total) != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "Warning: total protocol for replica \"%s\" "
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name,
+ "prot_stop - Total protocol for replica \"%s\" "
"did not shut down properly.\n",
agmt_get_long_name(rp->agmt));
}
@@ -401,8 +402,8 @@ prot_stop(Repl_Protocol *rp)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Error: prot_stop() "
- " called on NULL protocol instance.\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "prot_stop - "
+ "NULL protocol instance.\n");
}
}
@@ -431,10 +432,10 @@ prot_notify_update(Repl_Protocol *rp)
void
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, LOG_ERR, repl_plugin_name,
- "Replication agreement for %s could not be updated. "
+ /* MAB: rp might be NULL for disabled suffixes. Don't ASSERT on it */
+ if (NULL == rp) {
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "prot_notify_agmt_changed - Replication agreement for %s could not be updated. "
"For replication to take place, please enable the suffix "
"and restart the server\n", agmt_name);
return;
@@ -451,8 +452,8 @@ prot_notify_agmt_changed(Repl_Protocol *rp, char * agmt_name)
void
prot_notify_window_opened (Repl_Protocol *rp)
{
- /* MAB: rp might be NULL for disabled suffixes. Don't ASSERT on it */
- if (NULL == rp) return;
+ /* MAB: rp might be NULL for disabled suffixes. Don't ASSERT on it */
+ if (NULL == rp) return;
PR_Lock(rp->lock);
if (NULL != rp->prp_active_protocol)
@@ -465,8 +466,8 @@ prot_notify_window_opened (Repl_Protocol *rp)
void
prot_notify_window_closed (Repl_Protocol *rp)
{
- /* MAB: rp might be NULL for disabled suffixes. Don't ASSERT on it */
- if (NULL == rp) return;
+ /* MAB: rp might be NULL for disabled suffixes. Don't ASSERT on it */
+ if (NULL == rp) return;
PR_Lock(rp->lock);
if (NULL != rp->prp_active_protocol)
@@ -481,7 +482,7 @@ prot_status(Repl_Protocol *rp)
{
int return_status = PROTOCOL_STATUS_UNKNOWN;
- /* MAB: rp might be NULL for disabled suffixes. Don't ASSERT on it */
+ /* MAB: rp might be NULL for disabled suffixes. Don't ASSERT on it */
if (NULL != rp)
{
PR_Lock(rp->lock);
@@ -504,8 +505,7 @@ prot_status(Repl_Protocol *rp)
void
prot_replicate_now(Repl_Protocol *rp)
{
- /* MAB: rp might be NULL for disabled suffixes. Don't ASSERT on it */
-
+ /* MAB: rp might be NULL for disabled suffixes. Don't ASSERT on it */
if (NULL != rp)
{
PR_Lock(rp->lock);
diff --git a/ldap/servers/plugins/replication/repl5_protocol_util.c b/ldap/servers/plugins/replication/repl5_protocol_util.c
index 62a2aa9..25caa44 100644
--- a/ldap/servers/plugins/replication/repl5_protocol_util.c
+++ b/ldap/servers/plugins/replication/repl5_protocol_util.c
@@ -98,10 +98,10 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Remote replica already acquired\n",
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name,
+ "acquire_replica - %s: Remote replica already acquired\n",
agmt_get_long_name(prp->agmt));
- return_value = ACQUIRE_FATAL_ERROR;
+ return_value = ACQUIRE_FATAL_ERROR;
return ACQUIRE_SUCCESS;
}
@@ -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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name, "acquire_replica - "
"%s: Unable to send a startReplication "
"extended operation to consumer (%s). Will retry later.\n",
agmt_get_long_name(prp->agmt),
@@ -298,7 +298,8 @@ 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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "acquire_replica - "
"%s: Unable to acquire replica: "
"an internal error occurred on the remote replica. "
"Replication is aborting.\n",
@@ -312,7 +313,8 @@ 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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "acquire_replica - "
"%s: Unable to acquire replica: permission denied. "
"The bind dn \"%s\" does not have permission to "
"supply replication updates to the replica. "
@@ -331,7 +333,8 @@ 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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "acquire_replica - "
"%s: Unable to acquire replica: there is no "
"replicated area \"%s\" on the consumer server. "
"Replication is aborting.\n",
@@ -347,7 +350,8 @@ 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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "acquire_replica - "
"%s: Unable to acquire replica: "
"Excessive clock skew between the supplier and "
"the consumer. Replication is aborting.\n",
@@ -356,7 +360,8 @@ 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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "acquire_replica - "
"%s: Unable to acquire replica: "
"the consumer was unable to decode the "
"startReplicationRequest extended operation sent by the "
@@ -376,7 +381,8 @@ 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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_NOTICE, repl_plugin_name,
+ "acquire_replica - "
"%s: Unable to acquire replica: "
"the replica is currently being updated"
"by another supplier.\n",
@@ -384,7 +390,8 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV **ruv)
}
else /* REPL_NSDS50_INCREMENTAL_PROTOCOL_OID */
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "acquire_replica - "
"%s: Unable to acquire replica: "
"the replica is currently being updated"
"by another supplier. Will try later\n",
@@ -398,7 +405,8 @@ 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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "acquire_replica - "
"%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 +417,8 @@ 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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "acquire_replica - "
"%s: Unable to aquire replica: the replica "
"has the same Replica ID as this one. "
"Replication is aborting.\n",
@@ -422,11 +431,12 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Unable to acquire replica: "
- "the replica instructed us to go into "
- "backoff mode. Will retry later.\n",
- agmt_get_long_name(prp->agmt));
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "acquire_replica - "
+ "%s: Unable to acquire replica: "
+ "the replica instructed us to go into "
+ "backoff mode. Will retry later.\n",
+ agmt_get_long_name(prp->agmt));
agmt_set_last_update_status(prp->agmt, 0, extop_result,
"Unable to acquire replica: the replica instructed "
"us to go into backoff mode. Will retry later.");
@@ -462,7 +472,8 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV **ruv)
}
/* We've acquired the replica. */
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "acquire_replica - "
"%s: Replica was successfully acquired.\n",
agmt_get_long_name(prp->agmt));
/* Parse the update vector */
@@ -472,9 +483,9 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Warning: acquired replica, "
- "but could not parse update vector. "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "acquire_replica - "
+ "%s: acquired replica, but could not parse update vector. "
"The replica must be reinitialized.\n",
agmt_get_long_name(prp->agmt));
}
@@ -496,7 +507,8 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV **ruv)
else
{
/* Couldn't parse the response */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "acquire_replica - "
"%s: Unable to parse the response to the "
"startReplication extended operation. "
"Replication is aborting.\n",
@@ -516,7 +528,8 @@ 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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name,
+ "acquire_replica - "
"%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 +542,8 @@ acquire_replica(Private_Repl_Protocol *prp, char *prot_oid, RUV **ruv)
else
{
/* Couldn't get a current CSN */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "acquire_replica - "
"%s: Unable to obtain current CSN. "
"Replication is aborting.\n",
agmt_get_long_name(prp->agmt));
@@ -599,8 +613,8 @@ release_replica(Private_Repl_Protocol *prp)
{
int operation, error;
conn_get_error(prp->conn, &operation, &error);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "%s: Warning: unable to send endReplication extended operation (%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "release_replica - %s: Unable to send endReplication extended operation (%s)\n",
agmt_get_long_name(prp->agmt),
error ? ldap_err2string(error) : "unknown error");
goto error;
@@ -611,8 +625,8 @@ release_replica(Private_Repl_Protocol *prp)
{
int operation, error;
conn_get_error(prp->conn, &operation, &error);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "%s: Warning: Attempting to release replica, but unable to receive endReplication extended "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "release_replica - %s: 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,8 +643,8 @@ release_replica(Private_Repl_Protocol *prp)
{
int operation, error;
conn_get_error(prp->conn, &operation, &error);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "%s: Warning: response message id does not match the request (%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "release_replica - %s: Response message id does not match the request (%s)\n",
agmt_get_long_name(prp->agmt),
error ? ldap_err2string(error) : "unknown error");
}
@@ -649,13 +663,13 @@ release_replica(Private_Repl_Protocol *prp)
{
if (NSDS50_REPL_REPLICA_RELEASE_SUCCEEDED == extop_result)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "%s: Successfully released consumer\n", agmt_get_long_name(prp->agmt));
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "release_replica - %s: Successfully released consumer\n", agmt_get_long_name(prp->agmt));
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "%s: Unable to release consumer: response code %d\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "release_replica - %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 */
conn_disconnect (prp->conn);
@@ -664,8 +678,8 @@ release_replica(Private_Repl_Protocol *prp)
else
{
/* Couldn't parse the response */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "%s: Warning: Unable to parse the response "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "release_replica - %s: 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 d7f2251..1e5f960 100644
--- a/ldap/servers/plugins/replication/repl5_replica.c
+++ b/ldap/servers/plugins/replication/repl5_replica.c
@@ -141,12 +141,9 @@ replica_new(const Slapi_DN *root)
if (NULL == r)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Unable to "
- "configure replica %s: %s\n",
- slapi_sdn_get_dn(root),
- errorbuf);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "replica_new - "
+ "Unable to configure replica %s: %s\n", slapi_sdn_get_dn(root), errorbuf);
}
-
slapi_entry_free (e);
}
@@ -267,7 +264,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, LOG_DEBUG, repl_plugin_name, "replica_new_from_entry: "
+ slapi_log_error(SLAPI_LOG_REPL, 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 +322,7 @@ replica_destroy(void **arg)
PR_ASSERT(r);
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "replica_destroy\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "replica_destroy\n");
/*
* The function will not be called unless the refcnt of its
@@ -438,13 +435,14 @@ 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, LOG_ERR, repl_plugin_name,
- "replica_subentry_create add failed in slapi_ch_smprintf\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "replica_subentry_create - Failed in slapi_ch_smprintf\n");
rc = -1;
goto done;
}
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "add %s\n", entry_string);
+ slapi_log_error(SLAPI_LOG_INFO, repl_plugin_name,
+ "replica_subentry_create - add %s\n", entry_string);
e = slapi_str2entry(entry_string, 0);
/* create the entry */
@@ -459,9 +457,9 @@ 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, 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));
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "replica_subentry_create - Unable to "
+ "create replication keep alive entry %s: error %d - %s\n", slapi_entry_get_dn_const(e),
+ return_value, ldap_err2string(return_value));
rc = -1;
goto done;
}
@@ -495,17 +493,17 @@ 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, 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));
+ slapi_log_error(SLAPI_LOG_NOTICE, repl_plugin_name,
+ "replica_subentry_check - 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, 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));
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "replica_subentry_check - 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, LOG_ERR, repl_plugin_name,
- "Error accessing replication keep alive entry <cn=%s %d,%s> res=%d\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "replica_subentry_check - 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 */
rc = 1;
@@ -537,7 +535,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, LOG_DEBUG, repl_plugin_name, "subentry_update called at %s\n", buf);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "subentry_update called at %s\n", buf);
val.bv_val = buf;
@@ -564,11 +562,11 @@ replica_subentry_update(Slapi_DN *repl_root, ReplicaId rid)
if (ldrc != LDAP_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name,
"Successful update of replication keep alive entry \"%s: %s\"\n", KEEP_ALIVE_ATTR, buf);
}
@@ -604,7 +602,8 @@ 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "replica_get_exclusive_access - "
"conn=%" NSPRIu64 " op=%d repl=\"%s\": "
"Replica in use locking_purl=%s\n",
connid, opid,
@@ -627,10 +626,11 @@ replica_get_exclusive_access(Replica *r, PRBool *isInc, PRUint64 connid, int opi
}
else
{
- 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));
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "replica_get_exclusive_access - "
+ "conn=%" NSPRIu64 " op=%d repl=\"%s\": Acquired replica\n",
+ connid, opid,
+ slapi_sdn_get_dn(r->repl_root));
r->repl_state_flags |= REPLICA_IN_USE;
r->abort_session = SESSION_ACQUIRED;
if (isInc && *isInc)
@@ -670,18 +670,18 @@ 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, 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));
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "replica_relinquish_exclusive_access - "
+ "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, LOG_DEBUG, repl_plugin_name,
- "conn=%" NSPRIu64 " op=%d repl=\"%s\": "
- "Released replica held by locking_purl=%s\n",
- connid, opid,
- slapi_sdn_get_dn(r->repl_root),
- r->locking_purl);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "replica_relinquish_exclusive_access - "
+ "conn=%" NSPRIu64 " op=%d repl=\"%s\": "
+ "Released replica held by locking_purl=%s\n",
+ connid, opid,
+ slapi_sdn_get_dn(r->repl_root), r->locking_purl);
slapi_ch_free_string(&r->locking_purl);
r->repl_state_flags &= ~(REPLICA_IN_USE);
@@ -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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_ERR, repl_plugin_name, "replica_update_ruv: replica "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_update_ruv: csn "
+ slapi_log_error(SLAPI_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,8 +906,8 @@ 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, LOG_DEBUG,
- repl_plugin_name, "replica_update_ruv: RUV "
+ slapi_log_error(SLAPI_LOG_REPL,
+ repl_plugin_name, "replica_update_ruv - RUV "
"for replica %s already covers max_csn = %s\n",
slapi_sdn_get_dn(r->repl_root),
csn_as_string(updated_csn, PR_FALSE, csn_str));
@@ -915,8 +915,8 @@ replica_update_ruv(Replica *r, const CSN *updated_csn, const char *replica_purl)
}
else if (RUV_SUCCESS != rc)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
- repl_plugin_name, "replica_update_ruv: unable "
+ slapi_log_error(SLAPI_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),
csn_as_string(updated_csn, PR_FALSE, csn_str));
@@ -929,16 +929,16 @@ replica_update_ruv(Replica *r, const CSN *updated_csn, const char *replica_purl)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "replica_update_ruv: unable to get RUV object for replica "
+ slapi_log_error(SLAPI_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;
}
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "replica_update_ruv: "
- "unable to initialize RUV for replica %s\n",
+ slapi_log_error(SLAPI_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, LOG_DEBUG, repl_plugin_name, "Authorized replication managers is resync (%ld)\n", now);
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "Authorized replication managers (%s) was updated during a refresh\n", attr_replicaBindDnGroup);
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "Replica state:\n");
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "\treplica root: %s\n",
+ 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_sdn_get_ndn (r->repl_root));
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "\treplica type: %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "\treplica type: %s\n",
_replica_type_as_string (r));
- 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);
+ 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);
if (r->updatedn_list)
updatedn_list = replica_updatedn_list_to_string(r->updatedn_list, "\n\t\t");
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "\tupdate dn: %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "\truv: %s configured and is %sdirty\n",
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "\tCSN generator: %s configured\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "\tCSN generator: %s configured\n",
r->repl_csngen ? "" : "not");
/* JCMREPL - Dump Referrals */
@@ -1731,8 +1731,8 @@ 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, LOG_ERR, repl_plugin_name, "replica_reload_ruv: "
- "Warning: new data for replica %s does not match the data in the changelog.\n"
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name, "replica_reload_ruv - "
+ "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",
slapi_sdn_get_dn(r->repl_root));
@@ -1850,8 +1850,8 @@ int replica_check_for_data_reload (Replica *r, void *arg)
*/
if (slapi_disordely_shutdown(PR_FALSE)) {
- 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_log_error(SLAPI_LOG_WARNING, repl_plugin_name, "replica_check_for_data_reload - "
+ "Disorderly shutdown for replica %s. Check if DB RUV needs to be updated\n",
slapi_sdn_get_dn(r->repl_root));
if (ruv_covers_ruv(upper_bound_ruv, r_ruv) && !ruv_covers_ruv(r_ruv, upper_bound_ruv)) {
@@ -1861,20 +1861,20 @@ int replica_check_for_data_reload (Replica *r, void *arg)
*/
ruv_force_csn_update_from_ruv(upper_bound_ruv, r_ruv,
- "Force update of database RUV (from CL RUV) -> ", SLAPI_LOG_FATAL);
+ "Force update of database RUV (from CL RUV) -> ", SLAPI_LOG_NOTICE);
replica_set_ruv_dirty(r);
}
} else {
- rc = ruv_compare_ruv(upper_bound_ruv, "changelog max RUV", r_ruv, "database RUV", 0, SLAPI_LOG_FATAL);
+ rc = ruv_compare_ruv(upper_bound_ruv, "changelog max RUV", r_ruv, "database RUV", 0, SLAPI_LOG_ERR);
if (RUV_COMP_IS_FATAL(rc)) {
/* create a temporary replica object to conform to the interface */
r_obj = object_new(r, NULL);
/* We can't use existing changelog - remove existing file */
- 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. "
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name, "replica_check_for_data_reload - "
+ "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 "
"consumers should be reinitialized.\n",
@@ -1889,8 +1889,8 @@ 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, 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 "
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name, "replica_check_for_data_reload - "
+ "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, "
"you should check their status to see why there are no changes from those "
@@ -1936,8 +1936,8 @@ _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, LOG_ERR, repl_plugin_name,
- "_replica_get_config_entry: failed to get the config dn for %s\n",
+ slapi_log_error(SLAPI_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;
}
@@ -2039,10 +2039,10 @@ _replica_init_from_config (Replica *r, Slapi_Entry *e, char *errortext)
/* get replica root */
val = slapi_entry_attr_get_charptr (e, attr_replicaRoot);
if (val == NULL){
- PR_snprintf (errormsg, SLAPI_DSE_RETURNTEXT_SIZE, "failed to retrieve %s attribute from (%s)\n",
+ 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, LOG_ERR, repl_plugin_name, "_replica_init_from_config: %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "_replica_init_from_config - %s\n",
errormsg);
return -1;
}
@@ -2077,7 +2077,8 @@ _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, LOG_ERR, repl_plugin_name, "Invalid value for %s: %d Using default value (%d)\n",
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name, "_replica_init_from_config - "
+ "Invalid value for %s: %d Using default value (%d)\n",
type_replicaBackoffMin, backoff_min, PROTOCOL_BACKOFF_MINIMUM );
backoff_min = PROTOCOL_BACKOFF_MINIMUM;
}
@@ -2088,7 +2089,8 @@ _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, LOG_ERR, repl_plugin_name, "Invalid value for %s: %d Using default value (%d)\n",
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name, "_replica_init_from_config - "
+ "Invalid value for %s: %d Using default value (%d)\n",
type_replicaBackoffMax, backoff_max, PROTOCOL_BACKOFF_MAXIMUM );
backoff_max = PROTOCOL_BACKOFF_MAXIMUM;
}
@@ -2098,9 +2100,10 @@ _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, 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_log_error(SLAPI_LOG_WARNING, repl_plugin_name, "_replica_init_from_config - "
+ "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);
slapi_counter_set_value(r->backoff_max, PROTOCOL_BACKOFF_MAXIMUM);
} else {
@@ -2133,7 +2136,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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name, "_replica_init_from_config - "
"Invalid value for %s: %s Using default value (off)\n",
type_replicaPrecisePurge, precise_purging);
slapi_counter_set_value(r->precise_purging, 0);
@@ -2164,22 +2167,22 @@ _replica_init_from_config (Replica *r, Slapi_Entry *e, char *errortext)
slapi_ch_free ((void**)&val);
if (temprid <= 0 || temprid >= READ_ONLY_REPLICA_ID){
PR_snprintf (errormsg, SLAPI_DSE_RETURNTEXT_SIZE,
- "attribute %s must have a value greater than 0 "
+ "Attribute %s must have a value greater than 0 "
"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, LOG_ERR, repl_plugin_name,
- "_replica_init_from_config: %s\n", errormsg);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "_replica_init_from_config - %s\n", errormsg);
return -1;
} else {
r->repl_rid = (ReplicaId)temprid;
}
} else {
PR_snprintf (errormsg, SLAPI_DSE_RETURNTEXT_SIZE,
- "failed to retrieve required %s attribute from %s",
+ "Failed to retrieve required %s attribute from %s",
attr_replicaId,(char*)slapi_entry_get_dn ((Slapi_Entry*)e));
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "_replica_init_from_config: %s\n", errormsg);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "_replica_init_from_config - %s\n", errormsg);
return -1;
}
}
@@ -2189,10 +2192,10 @@ _replica_init_from_config (Replica *r, Slapi_Entry *e, char *errortext)
gen = csngen_new (r->repl_rid, attr);
if (gen == NULL){
PR_snprintf (errormsg, SLAPI_DSE_RETURNTEXT_SIZE,
- "failed to create csn generator for replica (%s)",
+ "Failed to create csn generator for replica (%s)",
(char*)slapi_entry_get_dn ((Slapi_Entry*)e));
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "_replica_init_from_config: %s\n", errormsg);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "_replica_init_from_config - %s\n", errormsg);
return -1;
}
r->repl_csngen = object_new((void*)gen, (FNFree)csngen_free);
@@ -2224,9 +2227,9 @@ _replica_init_from_config (Replica *r, Slapi_Entry *e, char *errortext)
rc = slapi_uniqueIDGenerateString (&r->repl_name);
if (rc != UID_SUCCESS){
PR_snprintf (errormsg, SLAPI_DSE_RETURNTEXT_SIZE,
- "failed to assign replica name for replica (%s); uuid generator error - %d ",
+ "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, LOG_ERR, repl_plugin_name, "_replica_init_from_config: %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "_replica_init_from_config - %s\n",
errormsg);
return -1;
} else
@@ -2302,12 +2305,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, LOG_ERR, repl_plugin_name, "CleanAllRUV Task: invalid replica id(%d) "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "CleanAllRUV Task - Invalid replica id(%d) "
"aborting task.\n", rid);
goto done;
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Task: unable to parse cleanallruv "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "CleanAllRUV Task - Unable to parse cleanallruv "
"data (%s), aborting task.\n",clean_vals[i]);
goto done;
}
@@ -2320,7 +2323,7 @@ replica_check_for_tasks(Replica *r, Slapi_Entry *e)
forcing = "no";
}
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Task: cleanAllRUV task found, "
+ slapi_log_error(SLAPI_LOG_NOTICE, repl_plugin_name, "CleanAllRUV Task - cleanAllRUV task found, "
"resuming the cleaning of rid(%d)...\n", rid);
/*
* Create payload
@@ -2330,7 +2333,7 @@ replica_check_for_tasks(Replica *r, Slapi_Entry *e)
slapi_ch_free_string(&ridstr);
if(payload == NULL){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Task: Startup: Failed to "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "CleanAllRUV Task - Startup: Failed to "
"create extended op payload, aborting task");
csn_free(&maxcsn);
goto done;
@@ -2340,7 +2343,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, LOG_ERR, repl_plugin_name, "cleanAllRUV: failed to allocate cleanruv_data.\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "CleanAllRUV Task - Failed to allocate cleanruv_data.\n");
csn_free(&maxcsn);
} else {
/* setup our data */
@@ -2359,7 +2362,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, LOG_ERR, repl_plugin_name, "cleanAllRUV: unable to create cleanAllRUV "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "CleanAllRUV Task - Unable to create cleanAllRUV "
"thread for rid(%d)\n", (int)data->rid);
csn_free(&maxcsn);
slapi_sdn_free(&data->sdn);
@@ -2393,12 +2396,12 @@ done:
if(token){
rid = atoi(token);
if(rid <= 0 || rid >= READ_ONLY_REPLICA_ID){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Abort CleanAllRUV Task: invalid replica id(%d) "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "Abort CleanAllRUV Task: unable to parse cleanallruv "
+ slapi_log_error(SLAPI_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 +2410,7 @@ done:
certify = ldap_utf8strtok_r(iter, ":", &iter);
if(!is_cleaned_rid(rid)){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Abort CleanAllRUV Task: replica id(%d) is not "
+ slapi_log_error(SLAPI_LOG_NOTICE, 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 +2419,21 @@ done:
add_aborted_rid(rid, r, repl_root);
stop_ruv_cleaning();
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Abort CleanAllRUV Task: abort task found, "
+ slapi_log_error(SLAPI_LOG_NOTICE, 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, LOG_ERR, repl_plugin_name, "Abort CleanAllRUV Task: failed to allocate cleanruv_data.\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "Abort CleanAllRUV Task: failed to create extended "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "Abort CleanAllRUV Task - Failed to create extended "
"op payload\n");
slapi_ch_free((void **)&data);
} else {
@@ -2448,7 +2451,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, LOG_ERR, repl_plugin_name, "Abort CleanAllRUV Task: unable to create abort cleanAllRUV "
+ slapi_log_error(SLAPI_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);
@@ -2481,9 +2484,9 @@ _replica_update_entry (Replica *r, Slapi_Entry *e, char *errortext)
rc = csngen_get_state ((CSNGen*)object_get_data (r->repl_csngen), &smod);
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, LOG_ERR, repl_plugin_name,
- "_replica_update_entry: %s\n", errortext);
+ PR_snprintf(errortext, SLAPI_DSE_RETURNTEXT_SIZE, "Failed to get csn generator's state; csn error - %d", rc);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "_replica_update_entry - %s\n", errortext);
return -1;
}
@@ -2496,9 +2499,9 @@ _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, LOG_ERR, repl_plugin_name,
- "_replica_update_entry: %s\n", errortext);
+ PR_snprintf(errortext, SLAPI_DSE_RETURNTEXT_SIZE, "Failed to update replica entry");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "_replica_update_entry - %s\n", errortext);
return -1;
}
@@ -2506,9 +2509,9 @@ _replica_update_entry (Replica *r, Slapi_Entry *e, char *errortext)
rc = slapi_entry_add_string (e, attr_replicaName, r->repl_name);
if (rc != 0)
{
- PR_snprintf(errortext, SLAPI_DSE_RETURNTEXT_SIZE, "failed to update replica entry");
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "_replica_update_entry: %s\n", errortext);
+ PR_snprintf(errortext, SLAPI_DSE_RETURNTEXT_SIZE, "Failed to update replica entry");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "_replica_update_entry - %s\n", errortext);
return -1;
}
else
@@ -2557,8 +2560,8 @@ _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, LOG_ERR, repl_plugin_name,
- "_replica_configure_ruv: Out of memory\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "_replica_configure_ruv - Out of memory\n");
goto done;
}
@@ -2584,8 +2587,8 @@ _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, LOG_ERR, repl_plugin_name,
- "_replica_configure_ruv: replica ruv tombstone entry for "
+ slapi_log_error(SLAPI_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));
goto done;
@@ -2594,8 +2597,8 @@ _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, LOG_ERR, repl_plugin_name,
- "_replica_configure_ruv: replica ruv tombstone entry for "
+ slapi_log_error(SLAPI_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);
goto done;
@@ -2673,9 +2676,9 @@ _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, LOG_ERR, repl_plugin_name,
- "_replica_configure_ruv: "
- "failed to recreate replica ruv tombstone entry"
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "_replica_configure_ruv - "
+ "Failed to recreate replica ruv tombstone entry"
" (%s); LDAP error - %d\n",
slapi_sdn_get_dn(r->repl_root), rc);
slapi_ch_free_string(&generation);
@@ -2691,7 +2694,7 @@ _replica_configure_ruv (Replica *r, PRBool isLocked)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "_replica_configure_ruv - "
"RUV for replica %s is missing replica generation\n",
slapi_sdn_get_dn(r->repl_root));
goto done;
@@ -2699,7 +2702,7 @@ _replica_configure_ruv (Replica *r, PRBool isLocked)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "_replica_configure_ruv - "
"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,16 +2728,16 @@ _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, LOG_ERR, repl_plugin_name,
- "_replica_configure_ruv: failed to create replica ruv tombstone "
+ slapi_log_error(SLAPI_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);
goto done;
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "_replica_configure_ruv: No ruv tombstone found for replica %s. "
+ slapi_log_error(SLAPI_LOG_REPL, 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));
return_value = 0;
@@ -2746,8 +2749,8 @@ _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, LOG_ERR, repl_plugin_name,
- "_replica_configure_ruv: replication disabled for "
+ slapi_log_error(SLAPI_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);
slapi_ch_free_string(&state);
@@ -2755,8 +2758,8 @@ _replica_configure_ruv (Replica *r, PRBool isLocked)
}
else if (!r->repl_ruv) /* other error */
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "_replica_configure_ruv: replication broken for "
+ slapi_log_error(SLAPI_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);
slapi_ch_free_string(&state);
@@ -2764,8 +2767,8 @@ _replica_configure_ruv (Replica *r, PRBool isLocked)
}
else /* some error but continue anyway? */
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "_replica_configure_ruv: Error %d reading tombstone for replica %s.\n",
+ slapi_log_error(SLAPI_LOG_REPL, 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,8 +2869,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "_replica_update_state: failed write RUV for %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "replica_update_state - Failed write RUV for %s\n",
slapi_sdn_get_dn (r->repl_root));
}
goto done;
@@ -2888,8 +2891,8 @@ 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, LOG_ERR, repl_plugin_name,
- "replica_update_state: failed to get the config dn for %s\n",
+ slapi_log_error(SLAPI_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);
goto done;
@@ -2930,8 +2933,8 @@ 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, LOG_ERR, repl_plugin_name, "replica_update_state: "
- "failed to update state of csn generator for replica %s: LDAP "
+ slapi_log_error(SLAPI_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);
}
else
@@ -2941,8 +2944,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "_replica_update_state: failed write RUV for %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "replica_update_state - Failed write RUV for %s\n",
slapi_sdn_get_dn (r->repl_root));
}
@@ -3027,8 +3030,8 @@ replica_write_ruv (Replica *r)
}
else /* error */
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "replica_write_ruv: failed to update RUV tombstone for %s; "
+ slapi_log_error(SLAPI_LOG_REPL, 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,8 +3070,8 @@ 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, LOG_ERR, repl_plugin_name,
- "replica_ruv_smods_for_op: attempted to directly modify the tombstone RUV "
+ slapi_log_error(SLAPI_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));
return (-1);
@@ -3162,7 +3165,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, LOG_ERR, repl_plugin_name, "_delete_tombstone: "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "_delete_tombstone - "
"NULL tombstone_dn or uniqueid provided.\n");
}
else
@@ -3176,8 +3179,8 @@ _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, LOG_ERR, repl_plugin_name,
- "_delete_tombstone: unable to delete tombstone %s, "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "_delete_tombstone - Unable to delete tombstone %s, "
"uniqueid %s: %s.\n", tombstone_dn, uniqueid,
ldap_err2string(ldaprc));
}
@@ -3209,8 +3212,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "process_reap_entry: the tombstone reap process "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "process_reap_entry - The tombstone reap process "
" has been stopped\n");
return rc;
}
@@ -3224,8 +3227,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "process_reap_entry: removing tombstone %s "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "process_reap_entry - Removing tombstone %s "
"because its deletion csn (%s) is less than the "
"purge csn (%s).\n",
slapi_entry_get_dn(entry),
@@ -3240,8 +3243,8 @@ process_reap_entry (Slapi_Entry *entry, void *cb_data)
}
else {
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "process_reap_entry: NOT removing tombstone "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "process_reap_entry - NOT removing tombstone "
"%s\n", slapi_entry_get_dn(entry));
}
}
@@ -3268,14 +3271,14 @@ _replica_reap_tombstones(void *arg)
Replica *replica = NULL;
CSN *purge_csn = NULL;
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "Info: Beginning tombstone reap for replica %s.\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "_replica_reap_tombstones - Beginning tombstone reap for replica %s.\n",
replica_name ? replica_name : "(null)");
if (NULL == replica_name)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "Warning: Replica name is null in tombstone reap\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "_replica_reap_tombstones - Replica name is null in tombstone reap\n");
goto done;
}
@@ -3287,8 +3290,8 @@ _replica_reap_tombstones(void *arg)
replica_object = replica_get_by_name(replica_name);
if (NULL == replica_object)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "Warning: Replica object %s is null in tombstone reap\n", replica_name);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "_replica_reap_tombstones - Replica object %s is null in tombstone reap\n", replica_name);
goto done;
}
@@ -3296,15 +3299,15 @@ _replica_reap_tombstones(void *arg)
replica = (Replica *)object_get_data(replica_object);
if (NULL == replica)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "Warning: Replica %s is null in tombstone reap\n", replica_name);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "_replica_reap_tombstones - Replica %s is null in tombstone reap\n", replica_name);
goto done;
}
if (replica->tombstone_reap_stop)
{
- 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);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "_replica_reap_tombstones - Replica %s reap stop flag is set for tombstone reap\n", replica_name);
goto done;
}
@@ -3374,16 +3377,16 @@ _replica_reap_tombstones(void *arg)
if (LDAP_SUCCESS != oprc)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "_replica_reap_tombstones: failed when searching for "
+ slapi_log_error(SLAPI_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),
ldap_err2string(oprc), replica->tombstone_reap_interval);
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "_replica_reap_tombstones: purged %ld of %ld tombstones "
+ slapi_log_error(SLAPI_LOG_REPL, 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,
slapi_sdn_get_dn(replica->repl_root),
@@ -3392,8 +3395,8 @@ _replica_reap_tombstones(void *arg)
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "Info: No purge CSN for tombstone reap for replica %s.\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "_replica_reap_tombstones - No purge CSN for tombstone reap for replica %s.\n",
replica_name);
}
@@ -3421,8 +3424,8 @@ done:
replica = NULL;
}
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "Info: Finished tombstone reap for replica %s.\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "_replica_reap_tombstones - Finished tombstone reap for replica %s.\n",
replica_name ? replica_name : "(null)");
}
@@ -3470,8 +3473,8 @@ 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, LOG_ERR, repl_plugin_name,
- "Error: unable to create the tombstone reap thread for replica %s. "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "eq_cb_reap_tombstones - Unable to create the tombstone reap thread for replica %s. "
"Possible system resources problem\n",
replica_name);
}
@@ -3552,13 +3555,15 @@ replica_create_ruv_tombstone(Replica *r)
r->repl_ruv_dirty = PR_TRUE;
return_value = LDAP_SUCCESS;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Cannot create new replica update vector for %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "replica_create_ruv_tombstone - "
+ "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, LOG_ERR, repl_plugin_name, "Cannot obtain CSN for new replica update vector for %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "replica_create_ruv_tombstone - "
+ "Cannot obtain CSN for new replica update vector for %s\n",
slapi_sdn_get_dn(r->repl_root));
csn_free(&csn);
goto done;
@@ -3631,8 +3636,8 @@ 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, LOG_DEBUG, repl_plugin_name, "assign_csn_callback: "
- "failed to insert csn %s for replica %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, 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 +3674,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, LOG_ERR, repl_plugin_name, "csnplRemove failed");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "abort_csn_callback - csnplRemove failed");
return;
}
}
@@ -3786,8 +3791,8 @@ 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, LOG_DEBUG, repl_plugin_name, "replica_remove_legacy_attr: "
- "failed to remove legacy attribute %s for replica %s; LDAP error - %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, 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,8 +3883,8 @@ 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, LOG_DEBUG, NULL,
- "tombstone_reap event (interval=%ld) was %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "replica_set_tombstone_reap_interval - tombstone_reap event (interval=%ld) was %s\n",
r->tombstone_reap_interval, (found ? "cancelled" : "not found"));
r->repl_eqcxt_tr = NULL;
}
@@ -3890,8 +3895,8 @@ 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, LOG_DEBUG, NULL,
- "tombstone_reap event (interval=%ld) was %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "replica_set_tombstone_reap_interval - tombstone_reap event (interval=%ld) was %s\n",
r->tombstone_reap_interval, (r->repl_eqcxt_tr ? "scheduled" : "not scheduled successfully"));
}
replica_unlock(r->repl_lock);
@@ -3913,7 +3918,8 @@ 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, LOG_DEBUG, "replica_strip_cleaned_rids", "failed to write RUV\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "replica_strip_cleaned_rids - Failed to write RUV\n");
}
i++;
}
@@ -3943,9 +3949,9 @@ replica_replace_ruv_tombstone(Replica *r)
dn = _replica_get_config_dn (r->repl_root);
if (NULL == dn) {
- 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_log_error(SLAPI_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));
replica_unlock(r->repl_lock);
goto bail;
@@ -3975,8 +3981,8 @@ 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, LOG_ERR, repl_plugin_name, "replica_replace_ruv_tombstone: "
- "failed to update replication update vector for replica %s: LDAP "
+ slapi_log_error(SLAPI_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,8 +4107,8 @@ replica_enable_replication (Replica *r)
/* retrieve new ruv */
rc = replica_reload_ruv (r);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "replica_enable_replication: "
- "reloading ruv failed\n");
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name, "replica_enable_replication - "
+ "Reloading ruv failed\n");
/* What to do ? */
}
@@ -4124,8 +4130,8 @@ 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, LOG_DEBUG, repl_plugin_name, "replica_enable_replication: "
- "replica %s is relinquished\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "replica_enable_replication - "
+ "Replica %s is relinquished\n",
slapi_sdn_get_ndn (replica_get_root (r)));
}
@@ -4169,8 +4175,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "replica_disable_replication: "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "replica_disable_replication - "
"replica %s is already locked by (%s) for incoming "
"incremental update; sleeping 100ms\n",
slapi_sdn_get_ndn (replica_get_root (r)),
@@ -4184,7 +4190,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, LOG_DEBUG, repl_plugin_name, "replica_disable_replication: "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "replica_disable_replication - "
"replica %s is acquired\n",
slapi_sdn_get_ndn (replica_get_root (r)));
}
@@ -4245,7 +4251,7 @@ int windows_replica_start_agreement(Replica *r, Repl_Agmt *ra)
/*
- * A callback function registed as op->o_csngen_handler and
+ * A callback function registered as op->o_csngen_handler and
* called by backend ops to generate opcsn.
*/
CSN *
@@ -4284,8 +4290,8 @@ 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, LOG_ERR, NULL,
- "replica_generate_next_csn: "
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name,
+ "replica_generate_next_csn - "
"opcsn=%s <= basecsn=%s, adjusted opcsn=%s\n",
opcsnstr, basecsnstr, opcsn2str);
}
@@ -4429,8 +4435,8 @@ replica_add_session_abort_control(Slapi_PBlock *pb)
/* Build the BER payload */
if ( (ber = der_alloc()) == NULL ) {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "add_session_abort_control: Failed to create ber\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "add_session_abort_control - Failed to create ber\n");
return;
}
rc = ber_printf( ber, "{}");
@@ -4439,8 +4445,8 @@ replica_add_session_abort_control(Slapi_PBlock *pb)
}
ber_free( ber, 1 );
if ( rc == -1 ) {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "add_session_abort_control: Failed to flatten ber\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "add_session_abort_control - Failed to flatten ber\n");
return;
}
@@ -4450,8 +4456,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "add_session_abort_control: abort control successfully added to result\n");
+ slapi_log_error(SLAPI_LOG_REPL, 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 0ad517d..f125037 100644
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
@@ -106,33 +106,33 @@ replica_config_init()
if (s_configLock == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "replica_config_init: "
- "failed to create configuration lock; NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "replica_config_init - "
+ "Failed to create configuration lock; NSPR error - %d\n",
PR_GetError ());
return -1;
}
rid_lock = slapi_new_rwlock();
if(rid_lock == NULL)
{
- 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 ());
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_config_init: "
- "failed to create abort_rid_lock; NSPR error - %d\n", PR_GetError ());
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_config_init: "
- "failed to create notify lock; NSPR error - %d\n", PR_GetError ());
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_config_init: "
- "failed to create notify cond var; NSPR error - %d\n", PR_GetError ());
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_config_add: %s\n", errortext);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "replica_config_add - %s\n", errortext);
*returncode = LDAP_UNWILLING_TO_PERFORM;
goto done;
}
@@ -301,8 +301,8 @@ 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, LOG_ERR, repl_plugin_name, "replica_config_modify: %s\n",
+ PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE, "Replica does not exist for %s", replica_root);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "replica_config_modify - %s\n",
errortext);
*returncode = LDAP_OPERATIONS_ERROR;
goto done;
@@ -341,9 +341,9 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
strcasecmp (config_attr, attr_state) == 0)
{
*returncode = LDAP_UNWILLING_TO_PERFORM;
- PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE, "modification of %s attribute is not allowed",
+ PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE, "Modification of %s attribute is not allowed",
config_attr);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "replica_config_modify: %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "replica_config_modify - %s\n",
errortext);
}
/* this is a request to delete an attribute */
@@ -416,8 +416,8 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
else
{
*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, LOG_ERR, repl_plugin_name, "replica_config_modify: %s\n", errortext);
+ PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE, "Deletion of %s attribute is not allowed", config_attr);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "replica_config_modify - %s\n", errortext);
}
}
else /* modify an attribute */
@@ -425,9 +425,9 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
config_attr_value = (char *) mods[i]->mod_bvalues[0]->bv_val;
if (NULL == config_attr_value) {
*returncode = LDAP_UNWILLING_TO_PERFORM;
- PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE, "attribute %s value is NULL.\n",
+ PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE, "Attribute %s value is NULL.\n",
config_attr);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "replica_config_modify: %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "replica_config_modify - %s\n",
errortext);
break;
}
@@ -528,9 +528,9 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
if(ptimeout <= 0){
*returncode = LDAP_UNWILLING_TO_PERFORM;
PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE,
- "attribute %s value (%s) is invalid, must be a number greater than zero.\n",
+ "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, LOG_ERR, repl_plugin_name, "replica_config_modify: %s\n", errortext);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "replica_config_modify - %s\n", errortext);
break;
}
replica_set_protocol_timeout(r, ptimeout);
@@ -545,9 +545,9 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
if(val <= 0){
*returncode = LDAP_UNWILLING_TO_PERFORM;
PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE,
- "attribute %s value (%s) is invalid, must be a number greater than zero.\n",
+ "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, LOG_ERR, repl_plugin_name, "replica_config_modify: %s\n", errortext);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "replica_config_modify - %s\n", errortext);
break;
}
replica_set_backoff_min(r, val);
@@ -562,9 +562,10 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
if(val <= 0){
*returncode = LDAP_UNWILLING_TO_PERFORM;
PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE,
- "attribute %s value (%s) is invalid, must be a number greater than zero.\n",
+ "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, LOG_ERR, repl_plugin_name, "replica_config_modify: %s\n", errortext);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "replica_config_modify - %s\n",
+ errortext);
break;
}
replica_set_backoff_max(r, val);
@@ -587,9 +588,8 @@ 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, LOG_ERR, repl_plugin_name,
- "Invalid value for %s: %s Value should be \"on\" or \"off\")\n",
- type_replicaPrecisePurge, config_attr_value);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "replica_config_modify - %s:\n", errortext);
break;
}
replica_set_precise_purging(r, on_off);
@@ -607,10 +607,10 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
if (val < 0){
*returncode = LDAP_UNWILLING_TO_PERFORM;
PR_snprintf(errortext, SLAPI_DSE_RETURNTEXT_SIZE,
- "attribute %s value (%s) is invalid, must be a number zero or greater.\n",
+ "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, LOG_ERR, repl_plugin_name,
- "replica_config_modify: %s\n", errortext);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "replica_config_modify - %s\n", errortext);
break;
} else {
/* Set the timeout */
@@ -622,8 +622,8 @@ 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, LOG_ERR, repl_plugin_name, "replica_config_modify: %s\n", errortext);
+ "Modification of attribute %s is not allowed in replica entry", config_attr);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "replica_config_modify - %s\n", errortext);
}
}
}
@@ -710,9 +710,9 @@ replica_config_post_modify(Slapi_PBlock *pb,
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, LOG_ERR, repl_plugin_name,
- "replica_config_post_modify: %s\n",
+ "Replica does not exist for %s", replica_root);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "replica_config_post_modify - %s\n",
errortext);
*returncode = LDAP_OPERATIONS_ERROR;
goto done;
@@ -748,10 +748,10 @@ replica_config_post_modify(Slapi_PBlock *pb,
{
*returncode = LDAP_UNWILLING_TO_PERFORM;
PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE,
- "modification of %s attribute is not allowed",
+ "Modification of %s attribute is not allowed",
config_attr);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "replica_config_post_modify: %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "replica_config_post_modify - %s\n",
errortext);
}
/* this is a request to delete an attribute */
@@ -818,8 +818,8 @@ 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, LOG_ERR, repl_plugin_name, "replica_config_delete: "
- "Warning: The changelog for replica %s is no longer valid since "
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name, "replica_config_delete - "
+ "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)));
cl5DeleteDBSync(mtnode_ext->replica);
@@ -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, LOG_ERR, repl_plugin_name, "replica_execute_task: %s\n", returntext);
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_execute_task: %s\n", returntext);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "replica_execute_task - %s\n", returntext);
return LDAP_OPERATIONS_ERROR;
}
if (apply_mods)
@@ -1164,9 +1164,9 @@ 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, LOG_ERR, repl_plugin_name,
- "replica_execute_task: %s\n", returntext);
+ PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Unsupported replica task - %s", task_name);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "replica_execute_task - %s\n", returntext);
return LDAP_OPERATIONS_ERROR;
}
@@ -1224,9 +1224,9 @@ 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, LOG_ERR, repl_plugin_name,
- "replica_task_done: "
- "failed to remove (%s) attribute from (%s) entry; "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "replica_task_done - "
+ "Failed to remove (%s) attribute from (%s) entry; "
"LDAP error - %d\n",
TASK_ATTR, replica_dn, rc);
}
@@ -1247,9 +1247,9 @@ 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, LOG_ERR, repl_plugin_name,
- "replica_execute_cl2ldif_task: %s\n", returntext);
+ PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Changelog is not open");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "replica_execute_cl2ldif_task - %s\n", returntext);
rc = LDAP_OPERATIONS_ERROR;
goto bail;
}
@@ -1272,21 +1272,21 @@ 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, LOG_ERR, repl_plugin_name,
- "Beginning changelog export of replica \"%s\"\n",
+ slapi_log_error(SLAPI_LOG_INFO, repl_plugin_name,
+ "replica_execute_cl2ldif_task - 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, LOG_ERR, repl_plugin_name,
- "Finished changelog export of replica \"%s\"\n",
+ slapi_log_error(SLAPI_LOG_INFO, repl_plugin_name,
+ "replica_execute_cl2ldif_task - Finished changelog export of replica \"%s\"\n",
replica_get_name(replica));
rc = LDAP_SUCCESS;
} else {
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, LOG_ERR, repl_plugin_name,
- "replica_execute_cl2ldif_task: %s\n", returntext);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "replica_execute_cl2ldif_task - %s\n", returntext);
rc = LDAP_OPERATIONS_ERROR;
}
bail:
@@ -1307,8 +1307,8 @@ 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, LOG_ERR, repl_plugin_name,
- "replica_execute_ldif2cl_task: %s\n", returntext);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "replica_execute_ldif2cl_task - %s\n", returntext);
rc = LDAP_OPERATIONS_ERROR;
goto bail;
}
@@ -1336,21 +1336,21 @@ static int replica_execute_ldif2cl_task (Object *r, char *returntext)
if (rc != CL5_SUCCESS)
{
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE,
- "failed to close changelog to import changelog data; "
+ "Failed to close changelog to import changelog data; "
"changelog error - %d", rc);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "replica_execute_ldif2cl_task: %s\n", returntext);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "replica_execute_ldif2cl_task - %s\n", returntext);
rc = LDAP_OPERATIONS_ERROR;
goto bail;
}
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "Beginning changelog import of replica \"%s\"\n",
+ slapi_log_error(SLAPI_LOG_INFO, repl_plugin_name,
+ "replica_execute_ldif2cl_task - 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, LOG_ERR, repl_plugin_name,
- "Finished changelog import of replica \"%s\"\n",
+ slapi_log_error(SLAPI_LOG_INFO, repl_plugin_name,
+ "replica_execute_ldif2cl_task - Finished changelog import of replica \"%s\"\n",
replica_get_name(replica));
}
else
@@ -1358,8 +1358,8 @@ 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, LOG_ERR, repl_plugin_name,
- "replica_execute_ldif2cl_task: %s\n", returntext);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "replica_execute_ldif2cl_task - %s\n", returntext);
imprc = LDAP_OPERATIONS_ERROR;
}
changelog5_read_config (&config);
@@ -1371,8 +1371,8 @@ static int replica_execute_ldif2cl_task (Object *r, char *returntext)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "replica_execute_ldif2cl_task: failed to start changelog at %s\n",
+ slapi_log_error(SLAPI_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,8 +1397,8 @@ _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, LOG_ERR, repl_plugin_name, "replica_config_add: "
- "configuration entry %s missing %s attribute\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "_replica_config_get_mtnode_ext - "
+ "Configuration entry %s missing %s attribute\n",
slapi_entry_get_dn((Slapi_Entry *)e),
attr_replicaRoot);
return NULL;
@@ -1410,8 +1410,8 @@ _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, LOG_ERR, repl_plugin_name, "replica_config_add: "
- "failed to locate mapping tree node for dn %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "_replica_config_get_mtnode_ext - "
+ "Failed to locate mapping tree node for dn %s\n",
slapi_sdn_get_dn(sdn));
}
else
@@ -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, LOG_DEBUG, repl_plugin_name, "cleanruv_task: cleaning rid (%d)...\n",(int)rid);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "cleanAllRUV_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, LOG_DEBUG, repl_plugin_name, "cleanruv_task: could not write RUV\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "cleanAllRUV_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, LOG_ERR, repl_plugin_name, "cleanruv_task: task failed(%d)\n",rc);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "cleanAllRUV_task - Task failed(%d)\n",rc);
return LDAP_OPERATIONS_ERROR;
}
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "cleanruv_task: finished successfully\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "cleanAllRUV_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, LOG_ERR, repl_plugin_name, "cleanAllRUV_task: Failed to create new task\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "cleanAllRUV_task - Failed to create new task\n");
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
@@ -1524,7 +1524,7 @@ replica_cleanall_ruv_task(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter,
*/
if ((rid_str = fetch_attr(e, "replica-id", 0)) == NULL){
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Missing replica-id attribute");
- cleanruv_log(task, -1, CLEANALLRUV_ID, "%s", returntext);
+ cleanruv_log(task, -1, CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1532,7 +1532,7 @@ replica_cleanall_ruv_task(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter,
rid = atoi(rid_str);
if ((base_dn = fetch_attr(e, "replica-base-dn", 0)) == NULL){
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Missing replica-base-dn attribute");
- cleanruv_log(task, (int)rid, CLEANALLRUV_ID, "%s", returntext);
+ cleanruv_log(task, (int)rid, CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1542,7 +1542,7 @@ replica_cleanall_ruv_task(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter,
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Invalid value for replica-force-cleaning "
"(%s). Value must be \"yes\" or \"no\" for task - (%s)",
force_cleaning, slapi_sdn_get_dn(task_dn));
- cleanruv_log(task, (int)rid, CLEANALLRUV_ID, "%s", returntext);
+ cleanruv_log(task, (int)rid, CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OPERATIONS_ERROR;
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1556,7 +1556,7 @@ replica_cleanall_ruv_task(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter,
if (rid <= 0 || rid >= READ_ONLY_REPLICA_ID){
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Invalid replica id (%d) for task - (%s)",
rid, slapi_sdn_get_dn(task_dn));
- cleanruv_log(task, rid, CLEANALLRUV_ID, "%s", returntext);
+ cleanruv_log(task, rid, CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OPERATIONS_ERROR;
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1564,7 +1564,7 @@ replica_cleanall_ruv_task(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter,
if(is_cleaned_rid(rid)){
/* we are already cleaning this rid */
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Replica id (%d) is already being cleaned", rid);
- cleanruv_log(task, rid, CLEANALLRUV_ID, "%s", returntext);
+ cleanruv_log(task, rid, CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_UNWILLING_TO_PERFORM;
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1575,7 +1575,7 @@ replica_cleanall_ruv_task(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter,
dn = slapi_sdn_new_dn_byval(base_dn);
if((r = replica_get_replica_from_dn(dn)) == NULL){
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Could not find replica from dn(%s)",slapi_sdn_get_dn(dn));
- cleanruv_log(task, rid, CLEANALLRUV_ID, "%s", returntext);
+ cleanruv_log(task, rid, CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OPERATIONS_ERROR;
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1586,7 +1586,7 @@ replica_cleanall_ruv_task(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter,
out:
if(rc){
- cleanruv_log(task, rid, CLEANALLRUV_ID, "Task failed...(%d)", rc);
+ cleanruv_log(task, rid, CLEANALLRUV_ID, SLAPI_LOG_ERR, "Task failed...(%d)", rc);
slapi_task_finish(task, *returncode);
} else {
rc = SLAPI_DSE_CALLBACK_OK;
@@ -1618,11 +1618,11 @@ replica_execute_cleanall_ruv_task (Object *r, ReplicaId rid, Slapi_Task *task, c
char *basedn = NULL;
int rc = 0;
- cleanruv_log(pre_task, rid, CLEANALLRUV_ID,"Initiating CleanAllRUV Task...");
+ cleanruv_log(pre_task, rid, CLEANALLRUV_ID, SLAPI_LOG_INFO, "Initiating CleanAllRUV Task...");
if(get_cleanruv_task_count() >= CLEANRIDSIZ){
/* we are already running the maximum number of tasks */
- cleanruv_log(pre_task, rid, CLEANALLRUV_ID,
+ cleanruv_log(pre_task, rid, CLEANALLRUV_ID, SLAPI_LOG_ERR,
"Exceeded maximum number of active CLEANALLRUV tasks(%d)",CLEANRIDSIZ);
return LDAP_UNWILLING_TO_PERFORM;
}
@@ -1632,7 +1632,7 @@ replica_execute_cleanall_ruv_task (Object *r, ReplicaId rid, Slapi_Task *task, c
if(r){
replica = (Replica*)object_get_data (r);
} else {
- cleanruv_log(pre_task, rid, CLEANALLRUV_ID, "Replica object is NULL, aborting task");
+ cleanruv_log(pre_task, rid, CLEANALLRUV_ID, SLAPI_LOG_ERR, "Replica object is NULL, aborting task");
return -1;
}
/*
@@ -1640,7 +1640,7 @@ replica_execute_cleanall_ruv_task (Object *r, ReplicaId rid, Slapi_Task *task, c
*/
if(replica_get_type(replica) == REPLICA_TYPE_READONLY){
/* this is a consumer, send error */
- cleanruv_log(pre_task, rid, CLEANALLRUV_ID, "Failed to clean rid (%d), task can not be run on a consumer",rid);
+ cleanruv_log(pre_task, rid, CLEANALLRUV_ID, SLAPI_LOG_ERR, "Failed to clean rid (%d), task can not be run on a consumer",rid);
if(task){
rc = -1;
slapi_task_finish(task, rc);
@@ -1650,7 +1650,7 @@ replica_execute_cleanall_ruv_task (Object *r, ReplicaId rid, Slapi_Task *task, c
/*
* Grab the max csn of the deleted replica
*/
- cleanruv_log(pre_task, rid, CLEANALLRUV_ID, "Retrieving maxcsn...");
+ cleanruv_log(pre_task, rid, CLEANALLRUV_ID, SLAPI_LOG_INFO, "Retrieving maxcsn...");
basedn = (char *)slapi_sdn_get_dn(replica_get_root(replica));
maxcsn = replica_cleanallruv_find_maxcsn(replica, rid, basedn);
if(maxcsn == NULL || csn_get_replicaid(maxcsn) == 0){
@@ -1663,7 +1663,7 @@ replica_execute_cleanall_ruv_task (Object *r, ReplicaId rid, Slapi_Task *task, c
csn_init_by_string(maxcsn, "");
}
csn_as_string(maxcsn, PR_FALSE, csnstr);
- cleanruv_log(pre_task, rid, CLEANALLRUV_ID, "Found maxcsn (%s)",csnstr);
+ cleanruv_log(pre_task, rid, CLEANALLRUV_ID, SLAPI_LOG_INFO, "Found maxcsn (%s)",csnstr);
/*
* Create payload
*/
@@ -1672,7 +1672,7 @@ replica_execute_cleanall_ruv_task (Object *r, ReplicaId rid, Slapi_Task *task, c
slapi_ch_free_string(&ridstr);
if(payload == NULL){
- cleanruv_log(pre_task, rid, CLEANALLRUV_ID, "Failed to create extended op payload, aborting task");
+ cleanruv_log(pre_task, rid, CLEANALLRUV_ID, SLAPI_LOG_ERR, "Failed to create extended op payload, aborting task");
rc = -1;
goto fail;
}
@@ -1682,7 +1682,7 @@ replica_execute_cleanall_ruv_task (Object *r, ReplicaId rid, Slapi_Task *task, c
*/
data = (cleanruv_data*)slapi_ch_calloc(1, sizeof(cleanruv_data));
if (data == NULL) {
- cleanruv_log(pre_task, rid, CLEANALLRUV_ID, "Failed to allocate cleanruv_data. Aborting task.");
+ cleanruv_log(pre_task, rid, CLEANALLRUV_ID, SLAPI_LOG_ERR, "Failed to allocate cleanruv_data. Aborting task.");
rc = -1;
goto fail;
}
@@ -1709,7 +1709,7 @@ replica_execute_cleanall_ruv_task (Object *r, ReplicaId rid, Slapi_Task *task, c
}
fail:
- cleanruv_log(pre_task, rid, CLEANALLRUV_ID, "Failed to clean rid (%d)", rid);
+ cleanruv_log(pre_task, rid, CLEANALLRUV_ID, SLAPI_LOG_ERR, "Failed to clean rid (%d)", rid);
if(task){
slapi_task_finish(task, rc);
}
@@ -1766,7 +1766,7 @@ replica_cleanallruv_thread(void *arg)
}
if (data->task) {
slapi_task_inc_refcount(data->task);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name,
"replica_cleanallruv_thread --> refcount incremented (%d).\n",
data->task->task_refcount);
}
@@ -1784,7 +1784,7 @@ replica_cleanallruv_thread(void *arg)
PR_Unlock( notify_lock );
data->repl_obj = replica_get_replica_from_dn(data->sdn);
if(data->repl_obj == NULL){
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, "Unable to retrieve repl object from dn(%s).", data->sdn);
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, SLAPI_LOG_ERR, "Unable to retrieve repl object from dn(%s).", data->sdn);
aborted = 1;
goto done;
}
@@ -1798,7 +1798,7 @@ replica_cleanallruv_thread(void *arg)
}
/* verify we have set our repl objects */
if(data->repl_obj == NULL || data->replica == NULL){
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, "Unable to set the replica objects.");
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, SLAPI_LOG_ERR, "Unable to set the replica objects.");
aborted = 1;
goto done;
}
@@ -1820,11 +1820,12 @@ replica_cleanallruv_thread(void *arg)
* Add the cleanallruv task to the repl config - so we can handle restarts
*/
add_cleaned_rid(data->rid, data->replica, csnstr, data->force); /* marks config that we started cleaning a rid */
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, "Cleaning rid (%d)...", data->rid);
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, SLAPI_LOG_INFO, "Cleaning rid (%d)...", data->rid);
/*
* First, wait for the maxcsn to be covered
*/
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, "Waiting to process all the updates from the deleted replica...");
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, SLAPI_LOG_INFO,
+ "Waiting to process all the updates from the deleted replica...");
ruv_obj = replica_get_ruv(data->replica);
ruv = object_get_data (ruv_obj);
while(data->maxcsn && !is_task_aborted(data->rid) && !is_cleaned_rid(data->rid) && !slapi_is_shutting_down()){
@@ -1845,7 +1846,7 @@ replica_cleanallruv_thread(void *arg)
*
* Even if we are forcing the cleaning, the replicas still need to be up
*/
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID,"Waiting for all the replicas to be online...");
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, SLAPI_LOG_INFO, "Waiting for all the replicas to be online...");
if(strcasecmp(data->force, "no") == 0 && check_agmts_are_alive(data->replica, data->rid, data->task)){
/* error, aborted or shutdown */
aborted = 1;
@@ -1854,7 +1855,7 @@ replica_cleanallruv_thread(void *arg)
/*
* Make sure all the replicas have seen the max csn
*/
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID,"Waiting for all the replicas to receive all the deleted replica updates...");
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, SLAPI_LOG_INFO, "Waiting for all the replicas to receive all the deleted replica updates...");
if(strcasecmp(data->force,"no") == 0 && check_agmts_are_caught_up(data, csnstr)){
/* error, aborted or shutdown */
aborted = 1;
@@ -1868,7 +1869,7 @@ replica_cleanallruv_thread(void *arg)
/*
* Now send the cleanruv extended op to all the agreements
*/
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, "Sending cleanAllRUV task to all the replicas...");
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, SLAPI_LOG_INFO, "Sending cleanAllRUV task to all the replicas...");
while(agmt_not_notified && !is_task_aborted(data->rid) && !slapi_is_shutting_down()){
agmt_obj = agmtlist_get_first_agreement_for_replica (data->replica);
if(agmt_obj == NULL){
@@ -1886,7 +1887,7 @@ replica_cleanallruv_thread(void *arg)
agmt_not_notified = 0;
} else {
agmt_not_notified = 1;
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, "Failed to send task to replica (%s)",agmt_get_long_name(agmt));
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, LOG_WARNING, "Failed to send task to replica (%s)",agmt_get_long_name(agmt));
if(strcasecmp(data->force,"no") == 0){
break;
}
@@ -1904,7 +1905,7 @@ replica_cleanallruv_thread(void *arg)
/*
* need to sleep between passes
*/
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, "Not all replicas have received the "
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, LOG_NOTICE, "Not all replicas have received the "
"cleanallruv extended op, retrying in %d seconds",interval);
if(!slapi_is_shutting_down()){
PR_Lock( notify_lock );
@@ -1920,12 +1921,12 @@ replica_cleanallruv_thread(void *arg)
/*
* Run the CLEANRUV task
*/
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID,"Cleaning local ruv's...");
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, SLAPI_LOG_INFO, "Cleaning local ruv's...");
replica_execute_cleanruv_task (data->repl_obj, data->rid, returntext);
/*
* Wait for all the replicas to be cleaned
*/
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID,
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, SLAPI_LOG_INFO,
"Waiting for all the replicas to be cleaned...");
interval = 10;
@@ -1945,7 +1946,7 @@ replica_cleanallruv_thread(void *arg)
found_dirty_rid = 0;
} else {
found_dirty_rid = 1;
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID,"Replica is not cleaned yet (%s)",
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, LOG_NOTICE, "Replica is not cleaned yet (%s)",
agmt_get_long_name(agmt));
break;
}
@@ -1963,7 +1964,7 @@ replica_cleanallruv_thread(void *arg)
* Need to sleep between passes unless we are shutting down
*/
if (!slapi_is_shutting_down()){
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, "Replicas have not been cleaned yet, "
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, LOG_NOTICE, "Replicas have not been cleaned yet, "
"retrying in %d seconds", interval);
PR_Lock( notify_lock );
PR_WaitCondVar( notify_cvar, PR_SecondsToInterval(interval) );
@@ -1996,15 +1997,16 @@ done:
remove_keep_alive_entry(data->task, data->rid, data->repl_root);
clean_agmts(data);
remove_cleaned_rid(data->rid);
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, "Successfully cleaned rid(%d).", data->rid);
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, SLAPI_LOG_INFO, "Successfully cleaned rid(%d).", data->rid);
} else {
/*
* Shutdown or abort
*/
if(!is_task_aborted(data->rid) || slapi_is_shutting_down()){
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID,"Server shutting down. Process will resume at server startup");
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, LOG_NOTICE,
+ "Server shutting down. Process will resume at server startup");
} else {
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID,"Task aborted for rid(%d).",data->rid);
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, LOG_NOTICE, "Task aborted for rid(%d).",data->rid);
delete_cleaned_rid_config(data);
remove_cleaned_rid(data->rid);
}
@@ -2012,7 +2014,8 @@ done:
if(data->task){
slapi_task_finish(data->task, rc);
slapi_task_dec_refcount(data->task);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name, "replica_cleanallruv_thread <-- refcount decremented.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name,
+ "replica_cleanallruv_thread <-- refcount decremented.\n");
}
if(data->payload){
ber_bvfree(data->payload);
@@ -2048,13 +2051,13 @@ clean_agmts(cleanruv_data *data)
agmt_obj = agmtlist_get_next_agreement_for_replica (data->replica, agmt_obj);
continue;
}
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, "Cleaning agmt...");
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, SLAPI_LOG_INFO, "Cleaning agmt...");
agmt_stop(agmt);
agmt_update_consumer_ruv(agmt);
agmt_start(agmt);
agmt_obj = agmtlist_get_next_agreement_for_replica (data->replica, agmt_obj);
}
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, "Cleaned replication agreements.");
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, SLAPI_LOG_INFO, "Cleaned replication agreements.");
}
/*
@@ -2077,16 +2080,16 @@ remove_keep_alive_entry(Slapi_Task *task, ReplicaId rid, const char *repl_root)
slapi_pblock_get(delete_pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if (rc == LDAP_NO_SUCH_OBJECT) {
/* No problem, it's not always there */
- cleanruv_log(task, rid, CLEANALLRUV_ID, "No Keep-Alive entry to remove (%s)",
+ cleanruv_log(task, rid, CLEANALLRUV_ID, SLAPI_LOG_INFO, "No Keep-Alive entry to remove (%s)",
keep_alive_dn);
} else if (rc != LDAP_SUCCESS){
/* Failed to delete the entry */
- cleanruv_log(task, rid, CLEANALLRUV_ID, "Failed to delete Keep-Alive entry (%s) "
+ cleanruv_log(task, rid, CLEANALLRUV_ID, SLAPI_LOG_ERR, "Failed to delete Keep-Alive entry (%s) "
"Error (%d) This entry will need to be manually removed",
keep_alive_dn, rc);
} else {
/* Success */
- cleanruv_log(task, rid, CLEANALLRUV_ID, "Removed Keep-Alive entry (%s)", keep_alive_dn);
+ cleanruv_log(task, rid, CLEANALLRUV_ID, SLAPI_LOG_INFO, "Removed Keep-Alive entry (%s)", keep_alive_dn);
}
slapi_pblock_destroy(delete_pb);
slapi_ch_free_string(&keep_alive_dn);
@@ -2095,7 +2098,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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name,
"replica_cleanall_ruv_destructor -->\n" );
stop_ruv_cleaning();
if (task) {
@@ -2104,14 +2107,14 @@ replica_cleanall_ruv_destructor(Slapi_Task *task)
DS_Sleep (PR_MillisecondsToInterval(100));
}
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name,
"replica_cleanall_ruv_destructor <--\n" );
}
static void
replica_cleanall_ruv_abort_destructor(Slapi_Task *task)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name,
"replica_cleanall_ruv_abort_destructor -->\n" );
stop_ruv_cleaning();
if (task) {
@@ -2120,7 +2123,7 @@ replica_cleanall_ruv_abort_destructor(Slapi_Task *task)
DS_Sleep (PR_MillisecondsToInterval(100));
}
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name,
"replica_cleanall_ruv_abort_destructor <--\n" );
}
@@ -2138,7 +2141,7 @@ check_replicas_are_done_cleaning(cleanruv_data *data )
int not_all_cleaned = 1;
int interval = 10;
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID,
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, SLAPI_LOG_INFO,
"Waiting for all the replicas to finish cleaning...");
csn_as_string(data->maxcsn, PR_FALSE, csnstr);
@@ -2171,7 +2174,7 @@ check_replicas_are_done_cleaning(cleanruv_data *data )
break;
}
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID,
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, LOG_NOTICE,
"Not all replicas finished cleaning, retrying in %d seconds",
interval);
if(!slapi_is_shutting_down()){
@@ -2251,7 +2254,8 @@ check_replicas_are_done_aborting(cleanruv_data *data )
int not_all_aborted = 1;
int interval = 10;
- cleanruv_log(data->task, data->rid, ABORT_CLEANALLRUV_ID,"Waiting for all the replicas to finish aborting...");
+ cleanruv_log(data->task, data->rid, ABORT_CLEANALLRUV_ID, SLAPI_LOG_INFO,
+ "Waiting for all the replicas to finish aborting...");
filter = PR_smprintf("(%s=%d:%s)", type_replicaAbortCleanRUV, data->rid, data->repl_root);
@@ -2279,7 +2283,8 @@ check_replicas_are_done_aborting(cleanruv_data *data )
if(not_all_aborted == 0){
break;
}
- cleanruv_log(data->task, data->rid, ABORT_CLEANALLRUV_ID, "Not all replicas finished aborting, retrying in %d seconds",interval);
+ cleanruv_log(data->task, data->rid, ABORT_CLEANALLRUV_ID, LOG_NOTICE,
+ "Not all replicas finished aborting, retrying in %d seconds",interval);
if(!slapi_is_shutting_down()){
PR_Lock( notify_lock );
PR_WaitCondVar( notify_cvar, PR_SecondsToInterval(interval) );
@@ -2325,7 +2330,8 @@ check_agmts_are_caught_up(cleanruv_data *data, char *maxcsn)
not_all_caughtup = 0;
} else {
not_all_caughtup = 1;
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, "Replica not caught up (%s)",agmt_get_long_name(agmt));
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, LOG_NOTICE,
+ "Replica not caught up (%s)",agmt_get_long_name(agmt));
break;
}
agmt_obj = agmtlist_get_next_agreement_for_replica (data->replica, agmt_obj);
@@ -2334,7 +2340,7 @@ check_agmts_are_caught_up(cleanruv_data *data, char *maxcsn)
if(not_all_caughtup == 0 || is_task_aborted(data->rid) ){
break;
}
- cleanruv_log(data->task, data->rid, CLEANALLRUV_ID,
+ cleanruv_log(data->task, data->rid, CLEANALLRUV_ID, LOG_NOTICE,
"Not all replicas caught up, retrying in %d seconds",interval);
if(!slapi_is_shutting_down()){
PR_Lock( notify_lock );
@@ -2384,7 +2390,7 @@ check_agmts_are_alive(Replica *replica, ReplicaId rid, Slapi_Task *task)
not_all_alive = 0;
} else {
not_all_alive = 1;
- cleanruv_log(task, rid, CLEANALLRUV_ID, "Replica not online (%s)",
+ cleanruv_log(task, rid, CLEANALLRUV_ID, LOG_NOTICE, "Replica not online (%s)",
agmt_get_long_name(agmt));
break;
}
@@ -2394,7 +2400,7 @@ check_agmts_are_alive(Replica *replica, ReplicaId rid, Slapi_Task *task)
if(not_all_alive == 0 || is_task_aborted(rid)){
break;
}
- cleanruv_log(task, rid, CLEANALLRUV_ID, "Not all replicas online, retrying in %d seconds...",
+ cleanruv_log(task, rid, CLEANALLRUV_ID, LOG_NOTICE, "Not all replicas online, retrying in %d seconds...",
interval);
if(!slapi_is_shutting_down()){
@@ -2505,7 +2511,7 @@ replica_send_cleanruv_task(Repl_Agmt *agmt, cleanruv_data *clean_data)
if(rc != LDAP_SUCCESS){
char *hostname = agmt_get_hostname(agmt);
- cleanruv_log(clean_data->task, clean_data->rid, CLEANALLRUV_ID,
+ cleanruv_log(clean_data->task, clean_data->rid, CLEANALLRUV_ID, SLAPI_LOG_ERR,
"Failed to add CLEANRUV task (%s) to replica (%s). You will need "
"to manually run the CLEANRUV task on this replica (%s) error (%d)",
repl_dn, agmt_get_long_name(agmt), hostname, rc);
@@ -2646,8 +2652,8 @@ 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, LOG_ERR, repl_plugin_name, "CleanAllRUV Task: failed to update replica "
- "config (%d), rid (%d)\n", rc, rid);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "CleanAllRUV Task - add_cleaned_rid: "
+ "Failed to update replica config (%d), rid (%d)\n", rc, rid);
}
slapi_ch_free_string(&dn);
slapi_pblock_destroy(pb);
@@ -2699,8 +2705,8 @@ 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, LOG_ERR, repl_plugin_name, "Abort CleanAllRUV Task: failed to update "
- "replica config (%d), rid (%d)\n", rc, rid);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "Abort CleanAllRUV Task - add_aborted_rid: "
+ "Failed to update replica config (%d), rid (%d)\n", rc, rid);
}
slapi_ch_free_string(&dn);
@@ -2752,8 +2758,8 @@ 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, LOG_ERR, repl_plugin_name, "Abort CleanAllRUV Task: failed to remove replica "
- "config (%d), rid (%d)\n", rc, rid);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "Abort CleanAllRUV Task - delete_aborted_rid: "
+ "Failed to remove replica config (%d), rid (%d)\n", rc, rid);
}
slapi_pblock_destroy (pb);
slapi_ch_free_string(&dn);
@@ -2779,7 +2785,7 @@ delete_cleaned_rid_config(cleanruv_data *clean_data)
int rc = -1, ret, rid;
if(clean_data == NULL){
- cleanruv_log(NULL, -1, CLEANALLRUV_ID, "delete_cleaned_rid_config: cleanruv data is NULL, "
+ cleanruv_log(NULL, -1, CLEANALLRUV_ID, SLAPI_LOG_ERR, "delete_cleaned_rid_config - cleanruv data is NULL, "
"failed to clean the config.");
return;
}
@@ -2798,8 +2804,8 @@ delete_cleaned_rid_config(cleanruv_data *clean_data)
slapi_search_internal_pb(pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &ret);
if (ret != LDAP_SUCCESS){
- cleanruv_log(clean_data->task, clean_data->rid, CLEANALLRUV_ID,
- "delete_cleaned_rid_config: internal search failed(%d).",ret);
+ cleanruv_log(clean_data->task, clean_data->rid, CLEANALLRUV_ID, SLAPI_LOG_ERR,
+ "delete_cleaned_rid_config - Internal search failed(%d).",ret);
goto bail;
} else {
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries);
@@ -2807,8 +2813,8 @@ delete_cleaned_rid_config(cleanruv_data *clean_data)
/*
* No matching entries!
*/
- cleanruv_log(clean_data->task, clean_data->rid, CLEANALLRUV_ID,
- "delete_cleaned_rid_config: failed to find any "
+ cleanruv_log(clean_data->task, clean_data->rid, CLEANALLRUV_ID, SLAPI_LOG_ERR,
+ "delete_cleaned_rid_config - Failed to find any "
"entries with nsds5ReplicaCleanRUV under (%s)", dn);
goto bail;
} else {
@@ -2859,8 +2865,8 @@ delete_cleaned_rid_config(cleanruv_data *clean_data)
}
if (rc != LDAP_SUCCESS && rc != LDAP_NO_SUCH_OBJECT){
- cleanruv_log(clean_data->task, clean_data->rid, CLEANALLRUV_ID,
- "delete_cleaned_rid_config: failed to remove task data "
+ cleanruv_log(clean_data->task, clean_data->rid, CLEANALLRUV_ID, SLAPI_LOG_ERR,
+ "delete_cleaned_rid_config - Failed to remove task data "
"from (%s) error (%d), rid (%d)", edn, rc, clean_data->rid);
goto bail;
}
@@ -2870,8 +2876,8 @@ delete_cleaned_rid_config(cleanruv_data *clean_data)
bail:
if (rc != LDAP_SUCCESS && rc != LDAP_NO_SUCH_OBJECT){
- cleanruv_log(clean_data->task, clean_data->rid, CLEANALLRUV_ID,
- "delete_cleaned_rid_config: failed to remove replica config "
+ cleanruv_log(clean_data->task, clean_data->rid, CLEANALLRUV_ID, SLAPI_LOG_ERR,
+ "delete_cleaned_rid_config - Failed to remove replica config "
"(%d), rid (%d)", rc, clean_data->rid);
}
slapi_free_search_results_internal(pb);
@@ -2932,7 +2938,7 @@ replica_cleanall_ruv_abort(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE,
"Exceeded maximum number of active ABORT CLEANALLRUV tasks(%d)",
CLEANRIDSIZ);
- cleanruv_log(task, -1, ABORT_CLEANALLRUV_ID, "%s", returntext);
+ cleanruv_log(task, -1, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OPERATIONS_ERROR;
return SLAPI_DSE_CALLBACK_ERROR;
}
@@ -2948,7 +2954,7 @@ replica_cleanall_ruv_abort(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter
*/
if ((rid_str = fetch_attr(e, "replica-id", 0)) == NULL){
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Missing required attr \"replica-id\"");
- cleanruv_log(task, -1, ABORT_CLEANALLRUV_ID, "%s", returntext);
+ cleanruv_log(task, -1, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -2961,14 +2967,14 @@ replica_cleanall_ruv_abort(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter
if (rid <= 0 || rid >= READ_ONLY_REPLICA_ID){
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Invalid replica id (%d) for task - (%s)",
rid, slapi_sdn_get_dn(slapi_entry_get_sdn(e)));
- cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID,"%s", returntext);
+ cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OPERATIONS_ERROR;
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
if ((base_dn = fetch_attr(e, "replica-base-dn", 0)) == NULL){
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Missing required attr \"replica-base-dn\"");
- cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID, "%s", returntext);
+ cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -2976,7 +2982,7 @@ replica_cleanall_ruv_abort(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter
if(!is_cleaned_rid(rid) && !is_pre_cleaned_rid(rid)){
/* we are not cleaning this rid */
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Replica id (%d) is not being cleaned, nothing to abort.", rid);
- cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID, "%s", returntext);
+ cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_UNWILLING_TO_PERFORM;
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -2984,7 +2990,7 @@ replica_cleanall_ruv_abort(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter
if(is_task_aborted(rid)){
/* we are already aborting this rid */
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Replica id (%d) is already being aborted", rid);
- cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID, "%s", returntext);
+ cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_UNWILLING_TO_PERFORM;
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -2995,7 +3001,7 @@ replica_cleanall_ruv_abort(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter
sdn = slapi_sdn_new_dn_byval(base_dn);
if((r = replica_get_replica_from_dn(sdn)) == NULL){
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Failed to find replica from dn(%s)", base_dn);
- cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID, "%s", returntext);
+ cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OPERATIONS_ERROR;
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -3007,7 +3013,7 @@ replica_cleanall_ruv_abort(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter
if(strcasecmp(certify_all,"yes") && strcasecmp(certify_all,"no")){
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Invalid value for \"replica-certify-all\", the value "
"must be \"yes\" or \"no\".");
- cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID, "%s", returntext);
+ cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR, "%s", returntext);
*returncode = LDAP_OPERATIONS_ERROR;
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -3028,7 +3034,7 @@ replica_cleanall_ruv_abort(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter
payload = create_cleanruv_payload(ridstr);
if(payload == NULL){
- cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID, "Failed to create extended op payload, aborting task");
+ cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR, "Failed to create extended op payload, aborting task");
*returncode = LDAP_OPERATIONS_ERROR;
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -3044,7 +3050,7 @@ replica_cleanall_ruv_abort(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter
*/
data = (cleanruv_data*)slapi_ch_calloc(1, sizeof(cleanruv_data));
if (data == NULL) {
- cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID,"Failed to allocate abort_cleanruv_data. Aborting task.");
+ cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR, "Failed to allocate abort_cleanruv_data. Aborting task.");
*returncode = LDAP_OPERATIONS_ERROR;
rc = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -3063,7 +3069,7 @@ replica_cleanall_ruv_abort(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter
PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL) {
object_release(r);
- cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID,"Unable to create abort thread. Aborting task.");
+ cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR, "Unable to create abort thread. Aborting task.");
*returncode = LDAP_OPERATIONS_ERROR;
slapi_ch_free_string(&data->certify);
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -3074,7 +3080,7 @@ out:
slapi_sdn_free(&sdn);
if(rc != SLAPI_DSE_CALLBACK_OK){
- cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID, "Abort Task failed (%d)", rc);
+ cleanruv_log(task, rid, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR, "Abort Task failed (%d)", rc);
slapi_task_finish(task, rc);
}
@@ -3100,9 +3106,9 @@ replica_abort_task_thread(void *arg)
}
if (data->task) {
slapi_task_inc_refcount(data->task);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name, "replica_abort_task_thread --> refcount incremented.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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);
+ cleanruv_log(data->task, data->rid, ABORT_CLEANALLRUV_ID, SLAPI_LOG_INFO, "Aborting task for rid(%d)...",data->rid);
/*
* Need to build the replica from the dn
@@ -3113,7 +3119,8 @@ replica_abort_task_thread(void *arg)
* to timing issues, we need to wait to grab the replica obj until we get here.
*/
if((data->repl_obj = replica_get_replica_from_dn(data->sdn)) == NULL){
- cleanruv_log(data->task, data->rid, ABORT_CLEANALLRUV_ID, "Failed to get replica object from dn (%s).", slapi_sdn_get_dn(data->sdn));
+ cleanruv_log(data->task, data->rid, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR,
+ "Failed to get replica object from dn (%s).", slapi_sdn_get_dn(data->sdn));
goto done;
}
if(data->replica == NULL && data->repl_obj){
@@ -3162,7 +3169,7 @@ replica_abort_task_thread(void *arg)
* Need to sleep between passes. unless we are shutting down
*/
if (!slapi_is_shutting_down()){
- cleanruv_log(data->task, data->rid, ABORT_CLEANALLRUV_ID,"Retrying in %d seconds",interval);
+ cleanruv_log(data->task, data->rid, ABORT_CLEANALLRUV_ID, LOG_NOTICE, "Retrying in %d seconds",interval);
PR_Lock( notify_lock );
PR_WaitCondVar( notify_cvar, PR_SecondsToInterval(interval) );
PR_Unlock( notify_lock );
@@ -3178,17 +3185,17 @@ replica_abort_task_thread(void *arg)
done:
if(agmt_not_notified || slapi_is_shutting_down()){
/* failure */
- cleanruv_log(data->task, data->rid, ABORT_CLEANALLRUV_ID,"Abort task failed, will resume the task at the next server startup.");
+ cleanruv_log(data->task, data->rid, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR, "Abort task failed, will resume the task at the next server startup.");
} else {
/*
* Wait for this server to stop its cleanallruv task(which removes the rid from the cleaned list)
*/
- cleanruv_log(data->task, data->rid, ABORT_CLEANALLRUV_ID, "Waiting for CleanAllRUV task to abort...");
+ cleanruv_log(data->task, data->rid, ABORT_CLEANALLRUV_ID, SLAPI_LOG_INFO, "Waiting for CleanAllRUV task to abort...");
while(is_cleaned_rid(data->rid) && !slapi_is_shutting_down()){
DS_Sleep(PR_SecondsToInterval(1));
count++;
if(count == 60){ /* it should not take this long */
- cleanruv_log(data->task, data->rid, ABORT_CLEANALLRUV_ID, "CleanAllRUV task failed to abort. You might need to "
+ cleanruv_log(data->task, data->rid, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR, "CleanAllRUV task failed to abort. You might need to "
"rerun the task.");
rc = -1;
break;
@@ -3203,16 +3210,16 @@ done:
}
delete_aborted_rid(data->replica, data->rid, data->repl_root, 0); /* remove the in-memory aborted rid */
if(rc == 0){
- cleanruv_log(data->task, data->rid, ABORT_CLEANALLRUV_ID, "Successfully aborted task for rid(%d)", data->rid);
+ cleanruv_log(data->task, data->rid, ABORT_CLEANALLRUV_ID, SLAPI_LOG_INFO, "Successfully aborted task for rid(%d)", data->rid);
} else {
- cleanruv_log(data->task, data->rid, ABORT_CLEANALLRUV_ID, "Failed to abort task for rid(%d)",data->rid);
+ cleanruv_log(data->task, data->rid, ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR, "Failed to abort task for rid(%d)",data->rid);
}
}
if(data->task){
slapi_task_finish(data->task, agmt_not_notified);
slapi_task_dec_refcount(data->task);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name, "replica_abort_task_thread <-- refcount incremented.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name, "replica_abort_task_thread <-- refcount incremented.\n");
}
if(data->repl_obj && release_it)
object_release(data->repl_obj);
@@ -3243,11 +3250,11 @@ replica_cleanallruv_send_abort_extop(Repl_Agmt *ra, Slapi_Task *task, struct ber
*/
rc = crc;
if(rc){
- cleanruv_log(task, agmt_get_consumer_rid(ra, conn), ABORT_CLEANALLRUV_ID,
+ cleanruv_log(task, agmt_get_consumer_rid(ra, conn), ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR,
"Failed to send extop to replica(%s).", agmt_get_long_name(ra));
}
} else {
- cleanruv_log(task, agmt_get_consumer_rid(ra, conn), ABORT_CLEANALLRUV_ID,
+ cleanruv_log(task, agmt_get_consumer_rid(ra, conn), ABORT_CLEANALLRUV_ID, SLAPI_LOG_ERR,
"Failed to connect to replica(%s).", agmt_get_long_name(ra));
rc = -1;
}
@@ -3283,8 +3290,9 @@ replica_cleanallruv_send_extop(Repl_Agmt *ra, cleanruv_data *clean_data, int che
/* extop was accepted */
rc = 0;
} else {
- cleanruv_log(clean_data->task, clean_data->rid, CLEANALLRUV_ID,"Replica %s does not support the CLEANALLRUV task. "
- "Sending replica CLEANRUV task...", slapi_sdn_get_dn(agmt_get_dn_byref(ra)));
+ cleanruv_log(clean_data->task, clean_data->rid, CLEANALLRUV_ID, LOG_NOTICE,
+ "Replica %s does not support the CLEANALLRUV task. "
+ "Sending replica CLEANRUV task...", slapi_sdn_get_dn(agmt_get_dn_byref(ra)));
/*
* Ok, this replica doesn't know about CLEANALLRUV, so just manually
* add the CLEANRUV task to the replica.
@@ -3449,7 +3457,8 @@ replica_cleanallruv_check_maxcsn(Repl_Agmt *agmt, char *basedn, char *rid_text,
csn_init_by_string(repl_max, remote_maxcsn);
if(csn_compare (repl_max, max) < 0){
/* we are not caught up yet, free, and return */
- cleanruv_log(task, atoi(rid_text), CLEANALLRUV_ID,"Replica maxcsn (%s) is not caught up with deleted replica's maxcsn(%s)",
+ cleanruv_log(task, atoi(rid_text), CLEANALLRUV_ID, LOG_NOTICE,
+ "Replica maxcsn (%s) is not caught up with deleted replica's maxcsn(%s)",
remote_maxcsn, maxcsn);
rc = -1;
} else {
@@ -3492,7 +3501,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, LOG_DEBUG, repl_plugin_name, "CleanAllRUV_task: failed to get LDAP "
+ slapi_log_error(SLAPI_LOG_REPL, 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;
@@ -3619,7 +3628,7 @@ stop_ruv_cleaning()
* Write our logging to the task and error log
*/
void
-cleanruv_log(Slapi_Task *task, int rid, char *task_type, char *fmt, ...)
+cleanruv_log(Slapi_Task *task, int rid, char *task_type, int sev_level, char *fmt, ...)
{
va_list ap1;
va_list ap2;
@@ -3638,7 +3647,7 @@ cleanruv_log(Slapi_Task *task, int rid, char *task_type, char *fmt, ...)
slapi_task_inc_progress(task);
}
errlog_fmt = PR_smprintf("%s (rid %d): %s \n",task_type, rid, fmt);
- slapi_log_error_ext(SLAPI_LOG_FATAL, repl_plugin_name, errlog_fmt, ap3, ap4);
+ slapi_log_error_ext(sev_level, repl_plugin_name, errlog_fmt, ap3, ap4);
slapi_ch_free_string(&errlog_fmt);
va_end(ap1);
@@ -3699,7 +3708,8 @@ replica_cleanallruv_get_local_maxcsn(ReplicaId rid, char *base_dn)
}
} else {
/* internal search failed */
- cleanruv_log(NULL, (int)rid, CLEANALLRUV_ID, "replica_cleanallruv_get_local_maxcsn: internal search failed (%d)\n", res);
+ cleanruv_log(NULL, (int)rid, CLEANALLRUV_ID, SLAPI_LOG_ERR,
+ "replica_cleanallruv_get_local_maxcsn - Internal search failed (%d)\n", res);
}
slapi_free_search_results_internal(search_pb);
diff --git a/ldap/servers/plugins/replication/repl5_replica_dnhash.c b/ldap/servers/plugins/replication/repl5_replica_dnhash.c
index 12ae3e8..485adcb 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, LOG_ERR, repl_plugin_name, "replica_init_dn_hash: "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_init_dn_hash: "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_add_by_dn: NULL argument\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_add_by_dn: "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_add_by_dn: "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_add_by_dn: "
+ slapi_log_error(SLAPI_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, LOG_DEBUG, repl_plugin_name, "replica_add_by_dn: "
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_ERR, repl_plugin_name, "replica_delete_by_dn: "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_delete_by_dn: "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_delete_by_dn: "
+ slapi_log_error(SLAPI_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, LOG_DEBUG, repl_plugin_name, "replica_delete_by_dn: "
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_ERR, repl_plugin_name, "replica_is_dn_in_hash: "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "replica_is_being_configured: "
"NULL argument\n");
return 0;
}
if (s_hash == NULL || s_lock == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "replica_is_dn_in_hash: "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "replica_is_being_configured: "
"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 8d31209..9f61657 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, LOG_ERR, repl_plugin_name, "replica_init_name_hash: "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_init_name_hash: "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_add_by_name: NULL argument\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_add_by_name: "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_add_by_name: "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_add_by_name: "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_delete_by_name: "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_delete_by_name: "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_delete_by_name: "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_get_by_name: "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "replica_get_by_name: "
+ slapi_log_error(SLAPI_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 9fd155c..b688075 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, LOG_DEBUG, repl_plugin_name, "ruv_init_new: NULL argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "ruv_delete_replica: NULL argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "ruv_get_largest_csn_for_replica: NULL argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "ruv_set_csns: NULL argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "ruv_covers_csn: NULL argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "ruv_covers_csn_internal - 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, LOG_DEBUG, repl_plugin_name, "ruv_covers_csn: replica for id %d not found.\n", rid);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "ruv_covers_csn_internal - Replica for id %d not found.\n", rid);
return_value = PR_TRUE;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "ruv_covers_csn: replica for id %d not found.\n", rid);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "ruv_covers_csn_internal - 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, LOG_DEBUG, repl_plugin_name, "ruv_covers_csn_cleanallruv: NULL argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "ruv_get_min_or_max_csn: NULL argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "ruv_to_bervals: NULL argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "ruv_to_smod: NULL argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "ruv_last_modified_to_smod: NULL argument\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "ruv_last_modified_to_smod - NULL argument\n");
return_value = RUV_BAD_DATA;
}
else
@@ -1400,17 +1400,17 @@ 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, loglevel==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
+ slapi_log_error(loglevel,
repl_plugin_name,
- "ruv_compare_ruv: RUV [%s] is missing the replica generation\n",
+ "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, loglevel==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
+ slapi_log_error(loglevel,
repl_plugin_name,
- "ruv_compare_ruv: RUV [%s] replica generation [%s] does not match RUV [%s] [%s]\n",
+ "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;
}
@@ -1438,34 +1438,34 @@ 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, loglevel==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR, repl_plugin_name,
- "ruv_compare_ruv: RUV [%s] does not contain element [%s] "
+ slapi_log_error(loglevel, 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, loglevel==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,repl_plugin_name,
- "ruv_compare_ruv: the max CSN [%s] from RUV [%s] is larger "
+ slapi_log_error(loglevel, 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, loglevel==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,repl_plugin_name,
- "ruv_compare_ruv: the max CSN [%s] from RUV [%s] is larger "
+ slapi_log_error(loglevel, 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, LOG_DEBUG, repl_plugin_name,
- "ruv_compare_ruv: the max CSN [%s] from RUV [%s] is less than "
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name,
- "ruv_compare_ruv: RUV [%s] has an empty CSN\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "ruv_compare_ruv - RUV [%s] has an empty CSN\n",
ruvbname);
}
}
@@ -1564,7 +1564,7 @@ ruv_dump(const RUV *ruv, char *ruv_name, PRFileDesc *prFile)
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "%s", buff);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "%s", buff);
}
for (replica = dl_get_first (ruv->elements, &cookie); replica;
replica = dl_get_next (ruv->elements, &cookie))
@@ -1589,7 +1589,7 @@ ruv_dump(const RUV *ruv, char *ruv_name, PRFileDesc *prFile)
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "%s", buff);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "%s", buff);
}
}
@@ -1622,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, LOG_DEBUG, repl_plugin_name, "ruv_add_csn_inprogress: failed to add replica"
+ slapi_log_error(SLAPI_LOG_REPL, 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;
@@ -1634,8 +1634,8 @@ 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, LOG_DEBUG, repl_plugin_name, "ruv_add_csn_inprogress: "
- "the csn %s has already be seen - ignoring\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "ruv_add_csn_inprogress - "
+ "The csn %s has already be seen - ignoring\n",
csn_as_string (csn, PR_FALSE, csn_str));
}
rc = RUV_COVERS_CSN;
@@ -1646,8 +1646,8 @@ 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, LOG_DEBUG, repl_plugin_name, "ruv_add_csn_inprogress: "
- "the csn %s has already be seen - ignoring\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "ruv_add_csn_inprogress - "
+ "The csn %s has already be seen - ignoring\n",
csn_as_string (csn, PR_FALSE, csn_str));
}
rc = RUV_COVERS_CSN;
@@ -1655,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, LOG_DEBUG, repl_plugin_name, "ruv_add_csn_inprogress: failed to insert csn %s"
+ slapi_log_error(SLAPI_LOG_REPL, 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;
@@ -1663,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, LOG_DEBUG, repl_plugin_name, "ruv_add_csn_inprogress: successfully inserted csn %s"
+ slapi_log_error(SLAPI_LOG_REPL, 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;
@@ -1719,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, LOG_DEBUG, repl_plugin_name, "ruv_update_ruv: "
- "can't locate RUV element for replica %d\n", csn_get_replicaid (csn));
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_ERR, repl_plugin_name, "ruv_update_ruv: cannot commit csn %s\n",
+ slapi_log_error(SLAPI_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;
@@ -1734,15 +1734,15 @@ 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, LOG_DEBUG, repl_plugin_name, "ruv_update_ruv: "
- "successfully committed csn %s\n", csn_as_string(csn, PR_FALSE, csn_str));
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "ruv_update_ruv - "
+ "Successfully committed csn %s\n", csn_as_string(csn, PR_FALSE, csn_str));
}
}
if ((max_csn = csnplRollUp(replica->csnpl, &first_csn)) != NULL)
{
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "ruv_update_ruv: rolled up to csn %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, 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 */
@@ -1793,8 +1793,8 @@ ruvInit (RUV **ruv, int initCount)
(*ruv)->lock = slapi_new_rwlock();
if ((*ruv)->lock == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "ruvInit: failed to create lock\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "ruvInit - Failed to create lock\n");
dl_free(&(*ruv)->elements);
slapi_ch_free((void**)ruv);
return RUV_NSPR_ERROR;
@@ -1840,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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"ruvAddReplica: memory allocation failed\n");
return NULL;
}
@@ -1871,8 +1871,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "ruvAddReplicaNoCSN: memory allocation failed\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "ruvAddReplicaNoCSN - Memory allocation failed\n");
return NULL;
}
@@ -1896,8 +1896,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "ruvAddIndexReplicaNoCSN: memory allocation failed\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "ruvAddIndexReplicaNoCSN - Memory allocation failed\n");
return NULL;
}
@@ -1990,8 +1990,8 @@ 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, LOG_DEBUG, repl_plugin_name,
- "get_ruvelement_from_berval: invalid berval\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "get_ruvelement_from_berval - Invalid berval\n");
goto loser;
}
@@ -2082,8 +2082,8 @@ get_ruvelement_from_berval(const struct berval *bval)
ret_ruve->csnpl = csnplNew ();
if (ret_ruve->csnpl == NULL)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
- "get_ruvelement_from_berval: failed to create csn pending list\n");
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "get_ruvelement_from_berval - Failed to create csn pending list\n");
goto loser;
}
@@ -2242,7 +2242,7 @@ ruv_is_newer (Object *sruvobj, Object *cruvobj)
if ( cruv->elements == NULL )
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
"ruv_is_newer, consumer RUV has no elements\n");
is_newer=PR_FALSE;
break;
@@ -2290,9 +2290,7 @@ 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, logLevel==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
- repl_plugin_name, "%s %s\n",
- msg, csnStr);
+ slapi_log_error(logLevel, 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 7193038..a87327b 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, LOG_DEBUG, repl_plugin_name, "%s: Update window will %s at %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "%s: Update window is now %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, 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 6276e57..a96ca8f 100644
--- a/ldap/servers/plugins/replication/repl5_tot_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_tot_protocol.c
@@ -92,10 +92,11 @@ 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, 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 : "");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "repl5_tot_log_operation_failure - "
+ "%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 : "");
}
/* Thread that collects results from async operations sent to the consumer */
@@ -203,8 +204,8 @@ 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, LOG_ERR, NULL,
- "repl5_tot_create_async_result_thread failed. "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "repl5_tot_create_async_result_thread - Failed. "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
PR_GetError(), slapd_pr_strerror( PR_GetError() ));
retval = -1;
@@ -262,8 +263,8 @@ 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, LOG_DEBUG, NULL,
- "repl5_tot_waitfor_async_results: %d %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "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,8 +291,8 @@ repl5_tot_waitfor_async_results(callback_data *cb_data)
if (!done && (loops > 30))
{
/* Log a warning */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
- "repl5_tot_waitfor_async_results timed out waiting for responses: %d %d\n",
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name,
+ "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 +339,7 @@ repl5_tot_run(Private_Repl_Protocol *prp)
area_sdn = agmt_get_replarea(prp->agmt);
if (!area_sdn) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Warning: unable to "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "repl5_tot_run - Unable to "
"get repl area. Please check agreement.\n");
goto done;
}
@@ -362,10 +363,9 @@ 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, LOG_ERR, repl_plugin_name, "Warning: unable to "
- "acquire replica for total update, error: %d,"
- " retrying in %d seconds.\n",
- ldaprc, wait_retry);
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name, "repl5_tot_run - "
+ "Unable to acquire replica for total update, error: %d, retrying in %d seconds.\n",
+ ldaprc, wait_retry);
DS_Sleep(PR_SecondsToInterval(wait_retry));
goto retry;
} else {
@@ -393,10 +393,10 @@ retry:
if (CONN_SCHEMA_UPDATED != rc && CONN_SCHEMA_NO_UPDATE_NEEDED != rc)
{
- 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);
+ slapi_log_error(SLAPI_LOG_WARNING, repl_plugin_name, "repl5_tot_run - "
+ "Unable to replicate schema to host %s, port %d. "
+ "Continuing with total update session.\n",
+ hostname, portnum);
/* But keep going */
agmt_set_last_init_status(prp->agmt, 0, rc, 0, "Total schema update failed");
}
@@ -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, LOG_ERR, repl_plugin_name, "Beginning total update of replica "
+ slapi_log_error(SLAPI_LOG_INFO, repl_plugin_name, "repl5_tot_run - 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, LOG_ERR, repl_plugin_name, "Warning: unable to "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "repl5_tot_run - 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, LOG_ERR, repl_plugin_name, "Warning: unable to "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "repl5_tot_run - 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, LOG_ERR, repl_plugin_name, "Warning: unable to "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "repl5_tot_run - 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, LOG_ERR, repl_plugin_name, "Warning: unable to "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "repl5_tot_run - 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, LOG_ERR, repl_plugin_name, "%s: repl5_tot_run: "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "repl5_tot_run - %s"
"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, LOG_ERR, repl_plugin_name, "%s: repl5_tot_run: "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "repl5_tot_run - %s - "
"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, LOG_ERR, repl_plugin_name, "Total update failed for replica \"%s\", "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "repl5_tot_run - 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, LOG_ERR, repl_plugin_name, "Finished total update of replica "
+ slapi_log_error(SLAPI_LOG_INFO, repl_plugin_name, "repl5_tot_run - 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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_DEBUG, repl_plugin_name, "repl5_tot_run: "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl5_tot_stop - "
"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, LOG_DEBUG, repl_plugin_name, "%s: send_entry: Encoding Error\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "%s: send_entry: Encoding Error\n",
agmt_get_long_name(prp->agmt));
((callback_data*)cb_data)->rc = -1;
retval = -1;
@@ -860,43 +860,43 @@ int send_entry (Slapi_Entry *e, void *cb_data)
}
do {
- /* push the entry to the consumer */
- rc = conn_send_extended_operation(prp->conn, REPL_NSDS50_REPLICATION_ENTRY_REQUEST_OID,
- bv /* payload */, NULL /* update_control */, &message_id);
-
- if (message_id)
- {
- ((callback_data*)cb_data)->last_message_id_sent = message_id;
- }
-
- /* If we are talking to a 5.0 type consumer, we need to wait here and retrieve the
- * response. Reason is that it can return LDAP_BUSY, indicating that its queue has
- * filled up. This completely breaks pipelineing, and so we need to fall back to
- * sync transmission for those consumers, in case they pull the LDAP_BUSY stunt on us :( */
-
- if (prp->repl50consumer)
- {
- /* Get the response here */
- rc = repl5_tot_get_next_result((callback_data*)cb_data);
- }
-
- if (rc == CONN_BUSY) {
- time_t now = current_time ();
- if ((now - *last_busyp) < (*sleep_on_busyp + 10)) {
- *sleep_on_busyp +=5;
- }
- else {
- *sleep_on_busyp = 5;
- }
- *last_busyp = now;
-
- 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);
- DS_Sleep(PR_SecondsToInterval(*sleep_on_busyp));
- }
- }
+ /* push the entry to the consumer */
+ rc = conn_send_extended_operation(prp->conn, REPL_NSDS50_REPLICATION_ENTRY_REQUEST_OID,
+ bv /* payload */, NULL /* update_control */, &message_id);
+
+ if (message_id)
+ {
+ ((callback_data*)cb_data)->last_message_id_sent = message_id;
+ }
+
+ /* If we are talking to a 5.0 type consumer, we need to wait here and retrieve the
+ * response. Reason is that it can return LDAP_BUSY, indicating that its queue has
+ * filled up. This completely breaks pipelineing, and so we need to fall back to
+ * sync transmission for those consumers, in case they pull the LDAP_BUSY stunt on us :( */
+
+ if (prp->repl50consumer)
+ {
+ /* Get the response here */
+ rc = repl5_tot_get_next_result((callback_data*)cb_data);
+ }
+
+ if (rc == CONN_BUSY) {
+ time_t now = current_time ();
+ if ((now - *last_busyp) < (*sleep_on_busyp + 10)) {
+ *sleep_on_busyp +=5;
+ }
+ else {
+ *sleep_on_busyp = 5;
+ }
+ *last_busyp = now;
+
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "send_entry - Replica \"%s\" is busy. Waiting %lds while"
+ " it finishes processing its current import queue\n",
+ agmt_get_long_name(prp->agmt), *sleep_on_busyp);
+ DS_Sleep(PR_SecondsToInterval(*sleep_on_busyp));
+ }
+ }
while (rc == CONN_BUSY);
ber_bvfree(bv);
diff --git a/ldap/servers/plugins/replication/repl5_total.c b/ldap/servers/plugins/replication/repl5_total.c
index efe5a91..7f84cf9 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, LOG_ERR, repl_plugin_name, "my_ber_printf_csn: unknown "
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "my_ber_scanf_value BAD 1\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "my_ber_scanf_value BAD 2\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "my_ber_scanf_value BAD 3\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "my_ber_scanf_value BAD 4\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "my_ber_scanf_value BAD 7 - bval is %s\n", attrval->bv_val);
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "Error: preposterous CSN type "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "my_ber_scanf_value - 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, LOG_ERR, repl_plugin_name, "my_ber_scanf_value BAD 8\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "my_ber_scanf_value BAD 10\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name, "Error: could not decode extended "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "decode_total_update_extop - Could not decode extended "
"operation containing entry for total update.\n");
free_and_return:
@@ -850,21 +850,22 @@ 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, 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);
+ const char *dn = slapi_entry_get_dn_const(e);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "multimaster_extop_NSDS50ReplicationEntry - "
+ "Error %d: could not import entry dn %s for total update operation conn=%" NSPRIu64 " op=%d\n",
+ rc, dn, connid, opid);
rc = -1;
}
}
else
{
- 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);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "multimaster_extop_NSDS50ReplicationEntry - "
+ "Error %d: could not decode the total update extop "
+ "for total update operation conn=%" NSPRIu64 " op=%d\n",
+ rc, connid, opid);
}
if (LDAP_SUCCESS != rc) {
diff --git a/ldap/servers/plugins/replication/repl5_updatedn_list.c b/ldap/servers/plugins/replication/repl5_updatedn_list.c
index 16fc6d2..1797934 100644
--- a/ldap/servers/plugins/replication/repl5_updatedn_list.c
+++ b/ldap/servers/plugins/replication/repl5_updatedn_list.c
@@ -52,8 +52,8 @@ 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, LOG_ERR, repl_plugin_name, "replica_new_updatedn_list: "
- "failed to allocate hash table; NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "replica_new_updatedn_list - "
+ "Failed to allocate hash table; NSPR error - %d\n",
PR_GetError ());
return NULL;
}
@@ -96,8 +96,8 @@ 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, LOG_ERR, repl_plugin_name, "replica_new_updatedn_list: "
- "failed to allocate hash table; NSPR error - %d\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "replica_new_updatedn_list - "
+ "Failed to allocate hash table; NSPR error - %d\n",
PR_GetError ());
return NULL;
}
@@ -150,8 +150,8 @@ 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, LOG_DEBUG, repl_plugin_name, "replica_updatedn_list_delete: "
- "update DN with value (%s) is not in the update DN list.\n",
+ slapi_log_error(SLAPI_LOG_REPL, 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 {
/* remove from hash */
@@ -245,8 +245,8 @@ 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, LOG_DEBUG, repl_plugin_name, "replica_updatedn_list_add: "
- "update DN with value (%s) already in the update DN list\n",
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "replica_updatedn_list_add - "
+ "Update DN with value (%s) already in the update DN list\n",
ndn);
slapi_sdn_free(&dn);
} else {
diff --git a/ldap/servers/plugins/replication/repl_bind.c b/ldap/servers/plugins/replication/repl_bind.c
index 9f04af3..06bc361 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, LOG_DEBUG, REPLICATION_SUBSYSTEM, "legacy_preop_bind: begin\n");
+ slapi_log_error(SLAPI_LOG_REPL, 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 1e76c80..5638d0b 100644
--- a/ldap/servers/plugins/replication/repl_connext.c
+++ b/ldap/servers/plugins/replication/repl_connext.c
@@ -31,7 +31,8 @@ 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, LOG_DEBUG, repl_plugin_name, "unable to create replication consumer connection extension - out of memory\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name, "consumer_connection_extension_constructor - "
+ "Unable to create replication consumer connection extension - out of memory\n" );
}
else
{
@@ -45,7 +46,8 @@ void* consumer_connection_extension_constructor (void *object, void *parent)
ext->lock = PR_NewLock();
if (NULL == ext->lock)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, repl_plugin_name, "unable to create replication consumer connection extension lock - out of memory\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name, "consumer_connection_extension_constructor - "
+ "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,16 +81,16 @@ 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, 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);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "consumer_connection_extension_destructor - "
+ "Aborting total update in progress for replicated "
+ "area %s connid=%" NSPRIu64 "\n", slapi_sdn_get_dn(repl_root_sdn), connid);
slapi_stop_bulk_import(pb);
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "consumer_connection_extension_destructor: can't determine root "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "consumer_connection_extension_destructor - Can't determine root "
"of replicated area.\n");
}
slapi_pblock_destroy(pb);
@@ -152,20 +154,23 @@ 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "consumer_connection_extension_acquire_exclusive_access - "
"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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "consumer_connection_extension_acquire_exclusive_access - "
"conn=%" NSPRIu64 " op=%d Reacquired consumer connection extension\n",
connid, opid);
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "consumer_connection_extension_acquire_exclusive_access - "
"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 +180,8 @@ consumer_connection_extension_acquire_exclusive_access(void* conn, PRUint64 conn
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "consumer_connection_extension_acquire_exclusive_access - "
"conn=%" NSPRIu64 " op=%d Could not acquire consumer extension, it is NULL!\n",
connid, opid);
}
@@ -213,7 +219,8 @@ 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "consumer_connection_extension_relinquish_exclusive_access - "
"conn=%" NSPRIu64 " op=%d Consumer connection extension is not in use\n",
connid, opid);
ret = 2;
@@ -221,7 +228,8 @@ 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "consumer_connection_extension_relinquish_exclusive_access - "
"conn=%" NSPRIu64 " op=%d Relinquishing consumer connection extension\n",
connid, opid);
connext->in_use_opid = -1;
@@ -230,7 +238,8 @@ consumer_connection_extension_relinquish_exclusive_access(void* conn, PRUint64 c
else if (force)
{
/* step 4, relinquish it (forced) */
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "consumer_connection_extension_relinquish_exclusive_access - "
"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 +247,8 @@ consumer_connection_extension_relinquish_exclusive_access(void* conn, PRUint64 c
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "consumer_connection_extension_relinquish_exclusive_access - "
"conn=%" NSPRIu64 " op=%d Not relinquishing consumer connection extension, it is held by op=%d!\n",
connid, opid, connext->in_use_opid);
}
@@ -248,7 +258,8 @@ consumer_connection_extension_relinquish_exclusive_access(void* conn, PRUint64 c
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "consumer_connection_extension_relinquish_exclusive_access - "
"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 f3bcebd..5166818 100644
--- a/ldap/servers/plugins/replication/repl_extop.c
+++ b/ldap/servers/plugins/replication/repl_extop.c
@@ -666,7 +666,8 @@ 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "multimaster_extop_StartNSDS50ReplicationRequest - "
"conn=%" NSPRIu64 " op=%d repl=\"%s\": Begin incremental protocol\n",
connid, opid, repl_root);
isInc = PR_TRUE;
@@ -692,7 +693,8 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
{
connext->repl_protocol_version = REPL_PROTOCOL_50_TOTALUPDATE;
}
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "multimaster_extop_StartNSDS50ReplicationRequest - "
"conn=%" NSPRIu64 " op=%d repl=\"%s\": Begin total protocol\n",
connid, opid, repl_root);
isInc = PR_FALSE;
@@ -701,7 +703,8 @@ 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "multimaster_extop_StartNSDS50ReplicationRequest - "
"conn=%" NSPRIu64 " op=%d repl=\"%s\": Begin 7.1 incremental protocol\n",
connid, opid, repl_root);
isInc = PR_TRUE;
@@ -713,7 +716,8 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
{
connext->repl_protocol_version = REPL_PROTOCOL_50_TOTALUPDATE;
}
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "multimaster_extop_StartNSDS50ReplicationRequest - "
"conn=%" NSPRIu64 " op=%d repl=\"%s\": Begin 7.1 total protocol\n",
connid, opid, repl_root);
isInc = PR_FALSE;
@@ -735,7 +739,8 @@ 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "multimaster_extop_StartNSDS50ReplicationRequest - "
"conn=%" NSPRIu64 " op=%d replica=\"%s\": "
"Replica is being configured: try again later\n",
connid, opid, repl_root);
@@ -762,7 +767,8 @@ 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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "multimaster_extop_StartNSDS50ReplicationRequest - "
"%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,10 +812,11 @@ 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, LOG_ERR, repl_plugin_name,
- "conn=%" NSPRIu64 " op=%d repl=\"%s\": "
- "Excessive clock skew from supplier RUV\n",
- connid, opid, repl_root);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "multimaster_extop_StartNSDS50ReplicationRequest - "
+ "conn=%" NSPRIu64 " op=%d repl=\"%s\": "
+ "Excessive clock skew from supplier RUV\n",
+ connid, opid, repl_root);
response = NSDS50_REPL_EXCESSIVE_CLOCK_SKEW;
goto send_response;
}
@@ -843,7 +850,8 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
}
if (check_replica_id_uniqueness(replica, supplier_ruv) != 0){
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "multimaster_extop_StartNSDS50ReplicationRequest - "
"conn=%" NSPRIu64 " op=%d repl=\"%s\": "
"Replica has same replicaID %d as supplier\n",
connid, opid, repl_root, replica_get_rid(replica));
@@ -882,19 +890,21 @@ 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, 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);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "multimaster_extop_StartNSDS50ReplicationRequest - "
+ "conn=%" NSPRIu64 " op=%d repl=\"%s\": "
+ "374 - Starting sleep: connext->repl_protocol_version == %d\n",
+ connid, opid, repl_root, connext->repl_protocol_version);
while (REPL_PROTOCOL_50_INCREMENTAL == connext->repl_protocol_version && i++ < max) {
usleep(200000);
}
- 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);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "multimaster_extop_StartNSDS50ReplicationRequest - "
+ "conn=%" NSPRIu64 " op=%d repl=\"%s\": "
+ "374 - Finished sleep: connext->repl_protocol_version == %d\n",
+ connid, opid, repl_root, connext->repl_protocol_version);
}
#endif
@@ -985,7 +995,8 @@ 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "multimaster_extop_StartNSDS50ReplicationRequest - "
"conn=%" NSPRIu64 " op=%d repl=\"%s\": "
"Unexpected update protocol received: %d. "
"Expected incremental or total.\n",
@@ -1008,7 +1019,7 @@ send_response:
}
if (response != NSDS50_REPL_REPLICA_READY)
{
- int resp_log_level = SLAPI_LOG_FATAL;
+ int resp_log_level = SLAPI_LOG_ERR;
char purlstr[1024] = {0};
if (current_purl)
PR_snprintf(purlstr, sizeof(purlstr), " locked by %s for %s update", current_purl,
@@ -1025,8 +1036,9 @@ send_response:
resp_log_level = SLAPI_LOG_REPL;
}
- slapi_log_error (resp_log_level, resp_log_level==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
+ slapi_log_error (resp_log_level,
repl_plugin_name,
+ "multimaster_extop_StartNSDS50ReplicationRequest - "
"conn=%" NSPRIu64 " op=%d replica=\"%s\": "
"Unable to acquire replica: error: %s%s\n",
connid, opid,
@@ -1078,12 +1090,13 @@ send_response:
}
slapi_pblock_set(pb, SLAPI_EXT_OP_RET_VALUE, resp_bval);
- 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,
- is90 ? "StartNSDS90ReplicationRequest" :
- "StartNSDS50ReplicationRequest", response, rc);
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "multimaster_extop_StartNSDS50ReplicationRequest - "
+ "conn=%" NSPRIu64 " op=%d repl=\"%s\": "
+ "%s: response=%d rc=%d\n",
+ connid, opid, repl_root,
+ is90 ? "StartNSDS90ReplicationRequest" :
+ "StartNSDS50ReplicationRequest", response, rc);
slapi_send_ldap_result(pb, LDAP_SUCCESS, NULL, NULL, 0, NULL);
return_value = SLAPI_PLUGIN_EXTENDED_SENT_RESULT;
@@ -1450,7 +1463,8 @@ 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, LOG_ERR, repl_plugin_name, "Abort CleanAllRUV Task: failed to decode payload. Aborting ext op\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "multimaster_extop_abort_cleanruv - "
+ "Abort CleanAllRUV Task - Failed to decode payload. Aborting ext op\n");
return LDAP_OPERATIONS_ERROR;
}
rid = atoi(ldap_utf8strtok_r(payload, ":", &iter));
@@ -1461,13 +1475,15 @@ 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, LOG_ERR, repl_plugin_name, "Abort CleanAllRUV Task: aborting cleanallruv task for rid(%d)\n", rid);
+ slapi_log_error(SLAPI_LOG_INFO, repl_plugin_name, "multimaster_extop_abort_cleanruv - "
+ "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, LOG_ERR, repl_plugin_name, "Abort CleanAllRUV Task: failed to get replication node "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "multimaster_extop_abort_cleanruv - "
+ "Abort CleanAllRUV Task - Failed to get replication node "
"from (%s), aborting operation\n", repl_root);
rc = LDAP_OPERATIONS_ERROR;
goto out;
@@ -1476,14 +1492,16 @@ multimaster_extop_abort_cleanruv(Slapi_PBlock *pb)
object_acquire (mtnode_ext->replica);
release_it = 1;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "Abort CleanAllRUV Task: replica is missing from (%s), "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "multimaster_extop_abort_cleanruv - "
+ "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, LOG_ERR, repl_plugin_name, "Abort CleanAllRUV Task: replica is NULL, aborting task\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "multimaster_extop_abort_cleanruv - "
+ "Abort CleanAllRUV Task - Replica is NULL, aborting task\n");
rc = LDAP_OPERATIONS_ERROR;
goto out;
}
@@ -1492,7 +1510,8 @@ 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, LOG_DEBUG, repl_plugin_name, "Abort CleanAllRUV Task: failed to allocate "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "multimaster_extop_abort_cleanruv - "
+ "Abort CleanAllRUV Task - Failed to allocate "
"abort_cleanruv_data. Aborting task.\n");
rc = LDAP_OPERATIONS_ERROR;
goto out;
@@ -1517,7 +1536,8 @@ 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, LOG_DEBUG, repl_plugin_name, "Abort CleanAllRUV Task: unable to create abort "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "multimaster_extop_abort_cleanruv - "
+ "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);
@@ -1580,7 +1600,7 @@ multimaster_extop_cleanruv(Slapi_PBlock *pb)
* Decode the payload
*/
if(decode_cleanruv_payload(extop_payload, &payload)){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Task: failed to decode payload. Aborting ext op\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "multimaster_extop_cleanruv - CleanAllRUV Task - Failed to decode payload. Aborting ext op\n");
goto free_and_return;
}
rid = atoi(ldap_utf8strtok_r(payload, ":", &iter));
@@ -1604,7 +1624,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, LOG_ERR, repl_plugin_name, "CleanAllRUV Task: failed to get replication node "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "multimaster_extop_cleanruv - CleanAllRUV Task - Failed to get replication node "
"from (%s), aborting operation\n", repl_root);
goto free_and_return;
}
@@ -1613,14 +1633,14 @@ multimaster_extop_cleanruv(Slapi_PBlock *pb)
object_acquire (mtnode_ext->replica);
release_it = 1;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Task: replica is missing from (%s), "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "multimaster_extop_cleanruv - 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, LOG_ERR, repl_plugin_name, "CleanAllRUV Task: replica is NULL, aborting task\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "multimaster_extop_cleanruv - CleanAllRUV Task - Replica is NULL, aborting task\n");
goto free_and_return;
}
@@ -1630,10 +1650,10 @@ multimaster_extop_cleanruv(Slapi_PBlock *pb)
*
* This will also release mtnode_ext->replica
*/
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Task: launching cleanAllRUV thread...\n");
+ slapi_log_error(SLAPI_LOG_INFO, repl_plugin_name, "multimaster_extop_cleanruv - 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, LOG_ERR, repl_plugin_name, "CleanAllRUV Task: failed to allocate "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "multimaster_extop_cleanruv - CleanAllRUV Task - Failed to allocate "
"cleanruv_Data\n");
goto free_and_return;
}
@@ -1650,7 +1670,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, LOG_ERR, repl_plugin_name, "CleanAllRUV Task: unable to create cleanAllRUV "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "multimaster_extop_cleanruv - CleanAllRUV Task - Unable to create cleanAllRUV "
"monitoring thread. Aborting task.\n");
ber_bvfree(data->payload);
data->payload = NULL;
@@ -1677,18 +1697,18 @@ multimaster_extop_cleanruv(Slapi_PBlock *pb)
/* we've already been cleaned */
break;
}
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Task: checking if we're caught up...\n");
+ slapi_log_error(SLAPI_LOG_INFO, repl_plugin_name, "multimaster_extop_cleanruv - 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, LOG_ERR, repl_plugin_name, "CleanAllRUV Task: not ruv caught up maxcsn(%s)\n", csnstr);
+ slapi_log_error(SLAPI_LOG_NOTICE, repl_plugin_name, "multimaster_extop_cleanruv - CleanAllRUV Task - Not ruv caught up maxcsn(%s)\n", csnstr);
}
DS_Sleep(PR_SecondsToInterval(5));
}
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name, "CleanAllRUV Task: we're caught up...\n");
+ slapi_log_error(SLAPI_LOG_INFO, repl_plugin_name, "multimaster_extop_cleanruv - CleanAllRUV Task - We're caught up...\n");
/*
* Set cleaned rid in memory only - does not survive a server restart
*/
@@ -1704,8 +1724,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, 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);
+ slapi_log_error(SLAPI_LOG_NOTICE, repl_plugin_name, "multimaster_extop_cleanruv - CleanAllRUV Task - You must restart the server if you want to reuse rid(%d).\n", rid);
+ slapi_log_error(SLAPI_LOG_INFO, repl_plugin_name, "multimaster_extop_cleanruv - CleanAllRUV Task - Successfully cleaned rid(%d).\n", rid);
rc = LDAP_SUCCESS;
}
@@ -1772,7 +1792,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, LOG_ERR, repl_plugin_name, "CleanAllRUV Get MaxCSN Task: failed to decode payload. Aborting ext op\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "multimaster_extop_cleanruv_get_maxcsn - CleanAllRUV Task - Get MaxCSN Task: failed to decode payload. Aborting ext op\n");
goto free_and_return;
}
rid = atoi(ldap_utf8strtok_r(payload, ":", &iter));
@@ -1841,7 +1861,8 @@ 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, LOG_ERR, repl_plugin_name, "CleanAllRUV Check Status Task: failed to decode payload. Aborting ext op\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "multimaster_extop_cleanruv_check_status - "
+ "CleanAllRUV Task - 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 09fa2b1..3fe344d 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, LOG_DEBUG, repl_plugin_name, "legacy_preop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, repl_plugin_name, "legacy_postop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, repl_plugin_name, "legacy_internalpreop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, repl_plugin_name, "legacy_internalpostop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, repl_plugin_name, "legacy_entry_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_ERR, repl_plugin_name, "Warning: unable to "
+ slapi_log_error(SLAPI_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 f0289a7..d117c7e 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, LOG_DEBUG, repl_plugin_name, "unable to create replication supplier operation extension - out of memory\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, repl_plugin_name, "unable to create replication consumer operation extension - out of memory\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 f2d7d4d..0155526 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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
+ slapi_log_error(SLAPI_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 2663f23..ab40345 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_PLUGIN,
"<-- 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, LOG_DEBUG, "--> repl_session_plugin_call_agmt_init_cb -- begin\n");
+ LDAPDebug0Args(LDAP_DEBUG_PLUGIN, "--> 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, LOG_ERR, "repl_session_plugin_call_agmt_init_cb -- Aborted -- No replication area\n");
+ LDAPDebug0Args(LDAP_DEBUG_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, LOG_DEBUG, "<-- repl_session_plugin_call_agmt_init_cb -- end\n");
+ LDAPDebug0Args(LDAP_DEBUG_PLUGIN, "<-- 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, LOG_ERR, "repl_session_plugin_call_pre_acquire_cb -- Aborted -- No replication area\n");
+ LDAPDebug0Args(LDAP_DEBUG_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, LOG_ERR, "repl_session_plugin_call_post_acquire_cb -- Aborted -- No replication area\n");
+ LDAPDebug0Args(LDAP_DEBUG_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, LOG_ERR, "repl_session_plugin_call_destroy_agmt_cb -- Aborted -- No replication area\n");
+ LDAPDebug0Args(LDAP_DEBUG_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 6ad46c6..9bf3985 100644
--- a/ldap/servers/plugins/replication/replutil.c
+++ b/ldap/servers/plugins/replication/replutil.c
@@ -168,23 +168,23 @@ 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, LOG_ERR, repl_plugin_name, "copy file: memory allocation failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "copyfile - 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, LOG_ERR, repl_plugin_name,
- "copyfile: failed to open source file %s\n", source);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "copyfile - Failed to open source file %s\n", source);
goto error;
}
/* Open destination file */
dest_fd = OPEN_FUNCTION(destination,O_CREAT | O_WRONLY, mode);
if (-1 == dest_fd)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "copyfile: failed to open destination file %s\n", destination);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "copyfile - Failed to open destination file %s\n", destination);
goto error;
}
/* Loop round reading data and writing it */
@@ -201,8 +201,8 @@ int copyfile(char* source, char * destination, int overwrite, int mode)
if (return_value != bytes_to_write)
{
/* means error */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "copyfile: failed to write to destination file %s\n", destination);
+ slapi_log_error(SLAPI_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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"Failed to parse the ldif line.\n");
continue;
}
@@ -425,72 +425,77 @@ IsValidOperation (const slapi_operation_parameters *op)
{
if (op == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "IsValidOperation: NULL operation\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "IsValidOperation - NULL operation\n");
return PR_FALSE;
}
if (op->csn == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "IsValidOperation: NULL operation CSN\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
- "IsValidOperation: NULL entry uniqueid\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, repl_plugin_name,
- "IsValidOperation: NULL entry DN\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "IsValidOperation - NULL entry DN\n");
return PR_FALSE;
}
switch (op->operation_type)
{
- case SLAPI_OPERATION_ADD: if (op->p.p_add.target_entry == NULL)
- {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "IsValidOperation: NULL entry for add operation\n");
- return PR_FALSE;
- }
- else
- break;
-
- 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, LOG_ERR, repl_plugin_name,
- "IsValidOperation: NULL mods for modify operation\n");
- return PR_FALSE;
- }
- else
- break;
-
- 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, 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, LOG_ERR, repl_plugin_name,
- "IsValidOperation: NULL new rdn for modrdn operation\n");
- return PR_FALSE;
- }
- else
- break;
+ case SLAPI_OPERATION_ADD:
+ if (op->p.p_add.target_entry == NULL)
+ {
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "IsValidOperation - NULL entry for add operation\n");
+ return PR_FALSE;
+ }
+ else
+ break;
+
+ 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_ERR, repl_plugin_name,
+ "IsValidOperation - NULL mods for modify operation\n");
+ return PR_FALSE;
+ }
+ else
+ break;
+
+ 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_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_ERR, repl_plugin_name,
+ "IsValidOperation - NULL new rdn for modrdn operation\n");
+ return PR_FALSE;
+ }
+ else
+ break;
- case SLAPI_OPERATION_DELETE: break;
+ case SLAPI_OPERATION_DELETE:
+ break;
- default: return PR_FALSE;
+ default:
+ return PR_FALSE;
}
return PR_TRUE;
@@ -633,8 +638,8 @@ 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, LOG_ERR, repl_plugin_name,
- "repl_set_mtn_referrals: cannot set NULL state.\n");
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "repl_set_mtn_state_and_referrals - Cannot set NULL state.\n");
return;
}
@@ -710,8 +715,9 @@ repl_set_mtn_state_and_referrals(
}
if (rc != LDAP_SUCCESS && rc != LDAP_TYPE_OR_VALUE_EXISTS) {
- 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);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name, "repl_set_mtn_state_and_referrals - "
+ "Could not set referrals for replica %s: %d\n",
+ slapi_sdn_get_dn(repl_root_sdn), rc);
}
charray_free(referrals_to_set);
@@ -785,12 +791,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, LOG_DEBUG, repl_plugin_name, "repl_chain_on_update: conn=-1 op=%d be "
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "repl_chain_on_update: conn=%" PRIu64 " op=%d be "
+ slapi_log_error(SLAPI_LOG_REPL, 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 +809,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, LOG_DEBUG, repl_plugin_name, "repl_chain_on_update: conn=-1 op=%d be "
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "repl_chain_on_update: conn=%" PRIu64 " op=%d be "
+ slapi_log_error(SLAPI_LOG_REPL, 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 +841,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, LOG_DEBUG, repl_plugin_name, "repl_chain_on_update: conn=-1 op=%d op is "
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "repl_chain_on_update: conn=%" PRIu64 " op=%d op is "
+ slapi_log_error(SLAPI_LOG_REPL, 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 +864,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, LOG_DEBUG, repl_plugin_name, "repl_chain_on_update: conn=-1 op=%d requestor "
- "is root: using local backend\n", opid);
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "repl_chain_on_update: conn=%" PRIu64 " op=%d requestor "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update - conn=%" PRIu64 " op=%d requestor "
"is root: using local backend\n", connid, opid);
}
#endif
@@ -880,10 +886,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, LOG_DEBUG, repl_plugin_name, "repl_chain_on_update: conn=-1 op=%d op is "
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "repl_chain_on_update: conn=%" PRIu64 " op=%d op is "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update - conn=%" PRIu64 " op=%d op is "
"replicated: using local backend\n", connid, opid);
}
#endif
@@ -897,10 +903,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, LOG_DEBUG, repl_plugin_name, "repl_chain_on_update: conn=-1 op=%d using "
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, repl_plugin_name, "repl_chain_on_update: conn=%" PRIu64 " op=%d using "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update - conn=%" PRIu64 " op=%d using "
"local backend for local password policy\n", connid, opid);
}
#endif
@@ -914,10 +920,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, LOG_DEBUG, repl_plugin_name, "repl_chain_on_update: conn=-1 op=%d using "
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update - conn=-1 op=%d using "
"chaining backend\n", opid);
} else {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, repl_plugin_name, "repl_chain_on_update: conn=%" PRIu64 " op=%d using "
+ slapi_log_error(SLAPI_LOG_REPL, 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 3d79b08..52ddea4 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, LOG_ERR, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_DEBUG, 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, LOG_ERR, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_DEBUG, 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, LOG_ERR, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_DEBUG, 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, LOG_ERR, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_DEBUG, 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, LOG_ERR, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_DEBUG, 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, LOG_ERR, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_DEBUG, 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, LOG_ERR, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_DEBUG, 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, LOG_ERR, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_DEBUG, 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, LOG_ERR, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_DEBUG, 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, LOG_ERR, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_DEBUG, 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, LOG_ERR, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_DEBUG, 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, LOG_DEBUG, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, test_repl_session_plugin_name,
"--> test_repl_session_plugin_start -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_ERR, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_DEBUG, 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, LOG_ERR, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_DEBUG, test_repl_session_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 3d04972..6201645 100644
--- a/ldap/servers/plugins/replication/urp.c
+++ b/ldap/servers/plugins/replication/urp.c
@@ -68,8 +68,8 @@ 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, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR, sessionid,
- "urp_modify: No such entry\n");
+ slapi_log_error (slapi_log_urp, sessionid,
+ "urp_modify_operation - No such entry\n");
PROFILE_POINT; /* Modify Conflict; Entry Does Not Exist; Discard Modification */
}
return rc;
@@ -119,8 +119,8 @@ urp_add_operation( Slapi_PBlock *pb )
* setting an error to op_result
*/
/* op_result = LDAP_SUCCESS; */
- 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_log_error (slapi_log_urp, sessionid,
+ "urp_add_operation - %s - An entry with this uniqueid already exists.\n",
slapi_entry_get_dn_const(existing_uniqueid_entry));
op_result= LDAP_ALREADY_EXISTS;
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &op_result);
@@ -160,8 +160,8 @@ 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, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR, sessionid,
- "urp_add (%s): Add conflict; Unique ID (%s) already in RDN\n",
+ slapi_log_error (slapi_log_urp, sessionid,
+ "urp_add_operation - %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,8 +181,8 @@ 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, LOG_ERR, sessionid,
- "urp_add: New entry has nsds5ReplConflict already\n");
+ slapi_log_error(SLAPI_LOG_ERR, sessionid,
+ "urp_add_operation - New entry has nsds5ReplConflict already\n");
vals = attr_get_present_values (attr); /* this returns a pointer to the contents */
}
if ( vals == NULL || *vals == NULL )
@@ -208,8 +208,8 @@ 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, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR, sessionid,
- "urp_add: Naming conflict ADD. Add %s instead\n",
+ slapi_log_error (slapi_log_urp, sessionid,
+ "urp_add_operation - Naming conflict ADD. Add %s instead\n",
slapi_rdn_get_rdn(rdn));
slapi_rdn_free(&rdn);
@@ -224,8 +224,8 @@ 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, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR, sessionid,
- "urp_add (%s): Entry to be added is a loser; "
+ slapi_log_error (slapi_log_urp, sessionid,
+ "urp_add_operation - %s - Entry to be added is a loser; "
"urp_annotate_dn failed.\n", basedn);
rc = SLAPI_PLUGIN_NOOP; /* Ignore this Operation */
}
@@ -252,8 +252,8 @@ urp_add_operation( Slapi_PBlock *pb )
* setting an error to op_result
*/
/* op_result = LDAP_SUCCESS; */
- 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_log_error (slapi_log_urp, sessionid,
+ "urp_add_operation - %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;
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &op_result);
@@ -324,8 +324,8 @@ 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, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR, sessionid,
- "urp_modrdn (%s): operation CSN is newer than the DN CSN.\n",
+ slapi_log_error (slapi_log_urp, sessionid,
+ "urp_modrdn_operation - %s - operation CSN is newer than the DN CSN.\n",
slapi_entry_get_dn_const(target_entry));
op_result= LDAP_UNWILLING_TO_PERFORM;
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &op_result);
@@ -358,8 +358,8 @@ 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, LOG_DEBUG, sessionid,
- "urp_modrdn: target_entry %s is a tombstone; returning LDAP_NO_SUCH_OBJECT.\n",
+ slapi_log_error(SLAPI_LOG_REPL, sessionid,
+ "urp_modrdn_operation - 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);
if (op_result == 0)
@@ -374,8 +374,8 @@ urp_modrdn_operation( Slapi_PBlock *pb )
}
else
{
- 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_log_error (slapi_log_urp, sessionid,
+ "urp_modrdn_operation - %s - Target entry is a tombstone.\n",
slapi_entry_get_dn_const(target_entry));
rc = SLAPI_PLUGIN_NOOP; /* Ignore the modrdn */
}
@@ -418,8 +418,8 @@ 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, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR, sessionid,
- "urp_modrdn: Duplicated CSN for different uniqueids [%s][%s]",
+ slapi_log_error (slapi_log_urp, sessionid,
+ "urp_modrdn_operation - Duplicated CSN for different uniqueids [%s][%s]",
existing_uniqueid, op_uniqueid);
op_result= LDAP_OPERATIONS_ERROR;
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &op_result);
@@ -445,8 +445,8 @@ 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, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR, sessionid,
- "urp_modrdn: Naming conflict MODRDN. Rename target entry from %s to %s\n",
+ slapi_log_error (slapi_log_urp, sessionid,
+ "urp_modrdn_operation - 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);
PROFILE_POINT; /* ModRDN Conflict; Entry with Target DN Exists; Rename Operation Entry */
@@ -549,8 +549,8 @@ urp_modrdn_operation( Slapi_PBlock *pb )
* this will cause replication divergence requiring
* admin intercession
*/
- 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_log_error(SLAPI_LOG_ERR, sessionid,
+ "urp_modrdn_operation - Parent %s couldn't be found, nor recreated as a glue entry\n",
slapi_sdn_get_dn(newsuperior) );
op_result= LDAP_OPERATIONS_ERROR;
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &op_result);
@@ -600,8 +600,8 @@ 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, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR, sessionid,
- "Entry %s does not exist; returning NO_SUCH_OBJECT.\n",
+ slapi_log_error (slapi_log_urp, sessionid,
+ "urp_delete_operation - 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,8 +611,8 @@ 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, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR, sessionid,
- "urp_delete: Entry \"%s\" is already a Tombstone.\n",
+ slapi_log_error (slapi_log_urp, sessionid,
+ "urp_delete_operation - Entry \"%s\" is already a Tombstone.\n",
slapi_entry_get_dn_const(deleteentry));
PROFILE_POINT; /* Delete Operation; Already a Tombstone. */
}
@@ -637,8 +637,8 @@ 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, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR, sessionid,
- "urp_delete: Turn entry \"%s\" into a glue_absent_parent entry.\n",
+ slapi_log_error (slapi_log_urp, sessionid,
+ "urp_delete_operation - Turn entry \"%s\" into a glue_absent_parent entry.\n",
slapi_entry_get_dn_const(deleteentry));
PROFILE_POINT; /* Delete Operation; Entry has children. */
}
@@ -728,8 +728,8 @@ 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, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR, sessionid,
- "Tombstoned glue entry %s since it has no more children\n",
+ slapi_log_error (slapi_log_urp, sessionid,
+ "urp_post_delete_operation - 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, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR, sessionid,
+ slapi_log_error (slapi_log_urp, 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,14 +1018,14 @@ 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, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR, sessionid,
- "urp_annotate_dn: %s --> %s\n", basedn, newrdn);
+ slapi_log_error (slapi_log_urp, 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, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR, sessionid,
- "Naming conflict %s. Renamed existing entry to %s\n",
+ slapi_log_error (slapi_log_urp, sessionid,
+ "urp_annotate_dn - Naming conflict %s. Renamed existing entry to %s\n",
optype, newrdn);
rc = 1;
break;
@@ -1046,20 +1046,20 @@ 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, LOG_ERR, sessionid,
- "Entry %s exists in cache but not in DB\n",
+ slapi_log_error(SLAPI_LOG_ERR, sessionid,
+ "urp_annotate_dn - Entry %s exists in cache but not in DB\n",
basedn);
rc = LDAP_NO_SUCH_OBJECT;
break;
default:
- slapi_log_error (slapi_log_urp, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR, sessionid,
- "Failed to annotate %s, err=%d\n",
+ slapi_log_error (slapi_log_urp, sessionid,
+ "urp_annotate_dn - Failed to annotate %s, err=%d\n",
newrdn, op_result);
}
slapi_ch_free ( (void**)&newrdn );
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, sessionid,
- "Failed to create conflict DN from basedn: %s and uniqueid: %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, sessionid,
+ "urp_annotate_dn - Failed to create conflict DN from basedn: %s and uniqueid: %s\n",
basedn, uniqueid );
}
return rc;
@@ -1092,8 +1092,8 @@ 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, LOG_DEBUG, sessionid,
- "Enter urp_get_min_naming_conflict_entry for %s\n", basedn);
+ slapi_log_error(SLAPI_LOG_REPL, sessionid,
+ "urp_get_min_naming_conflict_entry - %s\n", basedn);
filter = slapi_filter_sprintf("(%s=%s %s%s)", ATTR_NSDS5_REPLCONFLICT, REASON_ANNOTATE_DN,
ESC_NEXT_VAL, basedn);
@@ -1162,8 +1162,8 @@ done:
slapi_pblock_destroy(newpb);
newpb = NULL;
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, sessionid,
- "Leave urp_get_min_naming_conflict_entry (found %d entries)\n", i);
+ slapi_log_error(SLAPI_LOG_REPL, sessionid,
+ "urp_get_min_naming_conflict_entry - Found %d entries\n", i);
return min_naming_conflict_entry;
}
@@ -1208,12 +1208,12 @@ 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, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR, sessionid,
- "Failed to restore RDN of %s, err=%d\n", oldrdnstr, op_result);
+ slapi_log_error (slapi_log_urp, sessionid,
+ "urp_naming_conflict_removal - Failed to restore RDN of %s, err=%d\n", oldrdnstr, op_result);
goto bailout;
}
- 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);
+ slapi_log_error (slapi_log_urp, sessionid,
+ "urp_naming_conflict_removal - Naming conflict removed by %s. RDN of %s was restored\n", optype, oldrdnstr);
/* Step2: Remove ATTR_NSDS5_REPLCONFLICT from the winning entry */
/*
@@ -1222,8 +1222,8 @@ 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, LOG_DEBUG, sessionid,
- "Failed to remove nsds5ReplConflict for %s, err=%d\n",
+ slapi_log_error(SLAPI_LOG_REPL, sessionid,
+ "urp_naming_conflict_removal - 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, LOG_ERR, sessionid,
+ slapi_log_error(SLAPI_LOG_ERR, sessionid,
"Failed to convert %s to RDN\n", slapi_sdn_get_dn(oldsdn));
goto bail;
}
@@ -1257,8 +1257,8 @@ 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, LOG_ERR, sessionid,
- "Annotated DN %s has naming conflict\n", slapi_sdn_get_dn(oldsdn) );
+ slapi_log_error(SLAPI_LOG_WARNING, sessionid,
+ "get_dn_plus_uniqueid - 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, LOG_ERR, sessionid,
+ slapi_log_error(SLAPI_LOG_ERR, sessionid,
"Failed to convert %s to RDN\n", olddn);
goto bail;
}
@@ -1299,8 +1299,8 @@ 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, LOG_ERR, sessionid,
- "Annotated RDN %s has naming conflict\n", olddn);
+ slapi_log_error(SLAPI_LOG_WARNING, sessionid,
+ "get_rdn_plus_uniqueid - 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 10c0e07..84cf829 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, LOG_DEBUG, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"%s: Target entry %s is already a glue entry reason %s\n",
sessionid, dn, reason);
}
@@ -108,8 +108,7 @@ 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, slapi_log_urp==SLAPI_LOG_REPL?LOG_DEBUG:LOG_ERR,
- repl_plugin_name,
+ slapi_log_error (slapi_log_urp, repl_plugin_name,
"%s: Turned the entry %s to glue, reason %s\n",
sessionid, dn, reason);
}
@@ -190,8 +189,8 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Can't create glue %s, uniqueid=NULL\n", sessionid, dnstr);
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "create_glue_entry - %s: Can't create glue %s, uniqueid=NULL\n", sessionid, dnstr);
}
else
{
@@ -210,8 +209,8 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Created glue entry %s uniqueid=%s reason missingEntry\n",
+ slapi_log_error(SLAPI_LOG_NOTICE, repl_plugin_name,
+ "create_glue_entry - %s: Created glue entry %s uniqueid=%s reason missingEntry\n",
sessionid, dnstr, uniqueid);
done= 1;
break;
@@ -219,8 +218,8 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Skipped creating glue entry %s uniqueid=%s reason Entry Already Exists\n",
+ slapi_log_error(SLAPI_LOG_NOTICE, repl_plugin_name,
+ "create_glue_entry - %s: Skipped creating glue entry %s uniqueid=%s reason Entry Already Exists\n",
sessionid, dnstr, uniqueid);
op_result = LDAP_SUCCESS;
/* If we could not create a glue having the nsuniqueid,
@@ -234,16 +233,16 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Can't created glue entry %s uniqueid=%s, error %d; "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "create_glue_entry - %s: Can't created glue entry %s uniqueid=%s, error %d; "
"Possibly, parent entry is a conflict entry.\n",
sessionid, dnstr, uniqueid, op_result);
done= 1;
break;
}
default:
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, repl_plugin_name,
- "%s: Can't created glue entry %s uniqueid=%s, error %d\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "create_glue_entry %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 0a781b4..b00e093 100644
--- a/ldap/servers/plugins/replication/urp_tombstone.c
+++ b/ldap/servers/plugins/replication/urp_tombstone.c
@@ -201,8 +201,8 @@ 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, LOG_ERR, repl_plugin_name,
- "%s: Can't resurrect tombstone to glue reason '%s'. "
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "tombstone_to_glue - %s - Can't resurrect tombstone to glue reason '%s'. "
"Try with conflict dn %s, error=%d\n",
sessionid, reason, addingdn, op_result);
op_result = urp_fixup_rename_entry(addingentry, (const char *)conflictrdn, parentuniqueid,
@@ -216,20 +216,20 @@ tombstone_to_glue (
slapi_ch_free_string(&parentuniqueid);
if (op_result == LDAP_SUCCESS)
{
- 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);
+ slapi_log_error (/*slapi_log_urp*/SLAPI_LOG_ERR, repl_plugin_name,
+ "tombstone_to_glue - %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, LOG_ERR, repl_plugin_name,
- "%s: No need to turn tombstone %s to glue; it was already resurrected.\n",
+ slapi_log_error(/*slapi_log_urp*/SLAPI_LOG_ERR, repl_plugin_name,
+ "tombstone_to_glue - %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, LOG_ERR, repl_plugin_name,
- "%s: Can't resurrect tombstone %s to glue reason '%s', error=%d\n",
+ slapi_log_error(SLAPI_LOG_ERR, repl_plugin_name,
+ "tombstone_to_glue - %s - Can't resurrect tombstone %s to glue reason '%s', error=%d\n",
sessionid, addingdn, reason, op_result);
}
slapi_sdn_free(&parentdn);
diff --git a/ldap/servers/plugins/replication/windows_connection.c b/ldap/servers/plugins/replication/windows_connection.c
index 8fc4c01..09497bb 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, LOG_DEBUG, "=> windows_conn_new\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= windows_conn_new\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_conn_new\n", 0, 0, 0 );
return rpc;
loser:
windows_conn_delete(rpc);
slapi_ch_free((void**)&rpc);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_new - loser\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> windows_conn_connected\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= windows_conn_connected\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> windows_conn_delete_internal\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= windows_conn_delete_internal\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> windows_conn_delete\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= windows_conn_delete\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> windows_conn_get_error\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= windows_conn_get_error\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_conn_get_error\n", 0, 0, 0 );
}
void
windows_conn_set_error(Repl_Connection *conn, int error)
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_set_error\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= windows_conn_set_error\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> windows_perform_operation\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> windows_perform_operation\n", 0, 0, 0 );
if (windows_conn_connected(conn))
{
@@ -347,8 +347,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: Received error %d: %s for %s operation\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_perform_operation - %s: Received error %d: %s for %s operation\n",
agmt_get_long_name(conn->agmt),
rc, s ? s : "NULL", op_string);
conn->last_ldap_error = rc;
@@ -433,16 +433,16 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: Received error [%s] when attempting to %s"
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_perform_operation - %s: Received error [%s] when attempting to %s"
" entry [%s]: Please correct the attribute specified "
"in the error message. Refer to the Windows Active "
"Directory docs for more information.\n",
agmt_get_long_name(conn->agmt),
errmsg, op_string, dn);
} else {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: Received result code %d (%s) for %s operation %s%s\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_perform_operation - %s: Received result code %d (%s) for %s operation %s%s\n",
agmt_get_long_name(conn->agmt),
conn->last_ldap_error, errmsg,
op_string,
@@ -465,8 +465,8 @@ windows_perform_operation(Repl_Connection *conn, int optype, const char *dn,
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
- "%s: Failed to send %s operation: LDAP error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_perform_operation - %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));
conn->last_ldap_error = rc;
@@ -490,7 +490,7 @@ windows_perform_operation(Repl_Connection *conn, int optype, const char *dn,
*/
return_value = CONN_NOT_CONNECTED;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_perform_operation\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> windows_search_entry\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> windows_search_entry\n", 0, 0, 0 );
if (!entry) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "windows_search_entry: NULL entry\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG, "Calling windows entry search request plugin\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_REPL, "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);
@@ -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, LOG_DEBUG, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, 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,
@@ -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, LOG_DEBUG, "windows_search_entry: received %d messages, %d entries, %d references\n",
+ LDAPDebug(LDAP_DEBUG_REPL, "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, LOG_DEBUG, "<= windows_search_entry\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> send_dirsync_search\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "Calling dirsync search request plugin\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_REPL, "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, LOG_DEBUG, "Sending dirsync search request\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_REPL, "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);
@@ -857,8 +857,8 @@ send_dirsync_search(Repl_Connection *conn)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
- "%s: Failed to get %s operation: LDAP error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "send_dirsync_search - %s: Failed to get %s operation: LDAP error %d (%s)\n",
agmt_get_long_name(conn->agmt),
op_string, rc, ldap_err2string(rc));
conn->last_ldap_error = rc;
@@ -889,7 +889,7 @@ send_dirsync_search(Repl_Connection *conn)
*/
return_value = CONN_NOT_CONNECTED;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= send_dirsync_search\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> windows_conn_send_add\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> windows_conn_send_add\n", 0, 0, 0 );
res = windows_perform_operation(conn, CONN_ADD, dn, attrs, NULL /* newrdn */,
NULL /* newparent */, 0 /* deleteoldrdn */, server_controls,
NULL /* extop OID */, NULL /* extop payload */, NULL /* retoidp */,
NULL /* retdatap */, returned_controls);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_send_add\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> 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, "=> windows_conn_send_delete\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_conn_send_delete\n", 0, 0, 0 );
return windows_perform_operation(conn, CONN_DELETE, dn, NULL /* attrs */,
NULL /* newrdn */, NULL /* newparent */, 0 /* deleteoldrdn */,
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, LOG_DEBUG, "=> 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, "=> windows_conn_send_modify\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_conn_send_modify\n", 0, 0, 0 );
return windows_perform_operation(conn, CONN_MODIFY, dn, mods, NULL /* newrdn */,
NULL /* newparent */, 0 /* deleteoldrdn */, 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, LOG_DEBUG, "=> 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, "=> windows_conn_send_rename\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_conn_send_rename\n", 0, 0, 0 );
return windows_perform_operation(conn, CONN_RENAME, dn, NULL /* attrs */,
newrdn, newparent, deleteoldrdn, 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, LOG_DEBUG, "=> windows_conn_get_search_result\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> windows_conn_get_search_result\n", 0, 0, 0 );
if (windows_conn_connected(conn))
{
@@ -980,7 +980,8 @@ 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, LOG_ERR, windows_repl_plugin_name, "error in windows_conn_get_search_result, rc=%d\n", rc);
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name, "windows_conn_get_search_result - "
+ "Error in windows_conn_get_search_result, rc=%d\n", rc);
break;
case LDAP_RES_SEARCH_RESULT:
{
@@ -988,8 +989,9 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "error reading search result in windows_conn_get_search_result, rc=%d:%s\n", rc, ldap_err2string(rc));
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name, "windows_conn_get_search_result - "
+ "Error reading search result in windows_conn_get_search_result, rc=%d:%s\n",
+ rc, ldap_err2string(rc));
}
if (returned_controls)
{
@@ -997,7 +999,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,"received hasmore from dirsync\n");
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,"windows_conn_get_search_result - "
+ "Received hasmore from dirsync\n");
}
}
break;
@@ -1005,7 +1008,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,"received entry from dirsync: %s\n", dn);
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,"windows_conn_get_search_result - "
+ "Received entry from dirsync: %s\n", dn);
lm = ldap_first_entry( conn->ld, res );
/*
* we don't have to retrieve all the members here.
@@ -1026,7 +1030,7 @@ Slapi_Entry * windows_conn_get_search_result(Repl_Connection *conn)
res = NULL;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_get_search_result\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_conn_get_search_result\n", 0, 0, 0 );
return e;
}
@@ -1039,8 +1043,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, 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 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> windows_conn_send_extended_operation\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_conn_send_extended_operation\n", 0, 0, 0 );
return windows_perform_operation(conn, CONN_EXTENDED_OPERATION, NULL /* dn */, NULL /* attrs */,
NULL /* newrdn */, NULL /* newparent */, 0 /* deleteoldrdn */,
server_controls, extop_oid, payload, retoidp, retdatap,
@@ -1067,7 +1071,7 @@ windows_conn_read_entry_attribute(Repl_Connection *conn, const char *dn,
LDAPMessage *res = NULL;
char *attrs[2];
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_read_entry_attribute\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> windows_conn_read_entry_attribute\n", 0, 0, 0 );
PR_ASSERT(NULL != type);
if (windows_conn_connected(conn))
@@ -1109,7 +1113,7 @@ windows_conn_read_entry_attribute(Repl_Connection *conn, const char *dn,
{
return_value = CONN_NOT_CONNECTED;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_read_entry_attribute\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_conn_read_entry_attribute\n", 0, 0, 0 );
return return_value;
}
@@ -1121,8 +1125,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, LOG_DEBUG, "=> 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, "=> windows_conn_get_status\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_conn_get_status\n", 0, 0, 0 );
return conn->status;
}
@@ -1135,13 +1139,13 @@ windows_conn_get_status(Repl_Connection *conn)
void
windows_conn_cancel_linger(Repl_Connection *conn)
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_cancel_linger\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> windows_conn_cancel_linger\n", 0, 0, 0 );
PR_ASSERT(NULL != conn);
PR_Lock(conn->lock);
if (conn->linger_active)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: Cancelling linger on the connection\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_conn_cancel_linger - %s: Cancelling linger on the connection\n",
agmt_get_long_name(conn->agmt));
conn->linger_active = PR_FALSE;
if (slapi_eq_cancel(conn->linger_event) == 1)
@@ -1153,12 +1157,12 @@ windows_conn_cancel_linger(Repl_Connection *conn)
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: No linger to cancel on the connection\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_conn_cancel_linger - %s: No linger to cancel on the connection\n",
agmt_get_long_name(conn->agmt));
}
PR_Unlock(conn->lock);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_cancel_linger\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_conn_cancel_linger\n", 0, 0, 0 );
}
@@ -1174,11 +1178,11 @@ linger_timeout(time_t event_time, void *arg)
PRBool delete_now;
Repl_Connection *conn = (Repl_Connection *)arg;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> linger_timeout\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> linger_timeout\n", 0, 0, 0 );
PR_ASSERT(NULL != conn);
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: Linger timeout has expired on the connection\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "linger_timeout - %s: Linger timeout has expired on the connection\n",
agmt_get_long_name(conn->agmt));
PR_Lock(conn->lock);
if (conn->linger_active)
@@ -1193,7 +1197,7 @@ linger_timeout(time_t event_time, void *arg)
{
windows_conn_delete_internal(conn);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= linger_timeout\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= linger_timeout\n", 0, 0, 0 );
}
@@ -1206,16 +1210,16 @@ windows_conn_start_linger(Repl_Connection *conn)
{
time_t now;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_start_linger\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> windows_conn_start_linger\n", 0, 0, 0 );
PR_ASSERT(NULL != conn);
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: Beginning linger on the connection\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_conn_start_linger - %s: Beginning linger on the connection\n",
agmt_get_long_name(conn->agmt));
if (!windows_conn_connected(conn))
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: No linger on the closed conn\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_conn_start_linger - %s: No linger on the closed conn\n",
agmt_get_long_name(conn->agmt));
return;
}
@@ -1223,8 +1227,8 @@ windows_conn_start_linger(Repl_Connection *conn)
PR_Lock(conn->lock);
if (conn->linger_active)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: Linger already active on the connection\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_conn_start_linger - %s: Linger already active on the connection\n",
agmt_get_long_name(conn->agmt));
}
else
@@ -1234,7 +1238,7 @@ windows_conn_start_linger(Repl_Connection *conn)
conn->status = STATUS_LINGERING;
}
PR_Unlock(conn->lock);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_start_linger\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_conn_start_linger\n", 0, 0, 0 );
}
@@ -1257,7 +1261,7 @@ windows_conn_connect(Repl_Connection *conn)
ConnResult return_value = CONN_OPERATION_SUCCESS;
int pw_ret = 1;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_connect\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> windows_conn_connect\n", 0, 0, 0 );
/** Connection already open just return SUCCESS **/
if(conn->state == STATE_CONNECTED) {
@@ -1293,7 +1297,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, LOG_ERR, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name, "windows_conn_connect - "
"%s: Decoding of the credentials failed.\n",
agmt_get_long_name(conn->agmt));
@@ -1320,7 +1324,7 @@ windows_conn_connect(Repl_Connection *conn)
if (secure > 0) {
if (!NSS_IsInitialized()) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name, "windows_conn_connect - "
"%s: SSL Not Initialized, Replication over SSL FAILED\n",
agmt_get_long_name(conn->agmt));
return_value = CONN_SSL_NOT_ENABLED;
@@ -1336,8 +1340,8 @@ windows_conn_connect(Repl_Connection *conn)
#endif
/* Now we initialize the LDAP Structure and set options */
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: Trying %s%s slapi_ldap_init_ext\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_conn_connect - %s: Trying %s%s slapi_ldap_init_ext\n",
agmt_get_long_name(conn->agmt),
secure ? "secure" : "non-secure",
(secure == SLAPI_LDAP_INIT_FLAG_startTLS) ? " startTLS" : "");
@@ -1349,8 +1353,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: Failed to establish %s%sconnection to the consumer\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_conn_connect - %s: Failed to establish %s%sconnection to the consumer\n",
agmt_get_long_name(conn->agmt),
secure ? "secure " : "",
(secure == SLAPI_LDAP_INIT_FLAG_startTLS) ? "startTLS " : "");
@@ -1360,7 +1364,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, LOG_DEBUG, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, 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");
@@ -1408,7 +1412,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, LOG_DEBUG, "windows_conn_connect : detected NT4 peer\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_REPL, "windows_conn_connect - detected NT4 peer\n", 0, 0, 0 );
} else
{
windows_private_set_isnt4(conn->agmt,0);
@@ -1418,7 +1422,7 @@ windows_conn_connect(Repl_Connection *conn)
if (CONN_IS_WIN2K3 == supports)
{
windows_private_set_iswin2k3(conn->agmt,1);
- LDAPDebug(LDAP_DEBUG_REPL, LOG_DEBUG, "windows_conn_connect : detected Win2k3 or later peer\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_REPL, "windows_conn_connect - detected Win2k3 or later peer\n", 0, 0, 0 );
} else
{
windows_private_set_iswin2k3(conn->agmt,0);
@@ -1442,7 +1446,7 @@ done:
creds = NULL;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_connect\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_conn_connect\n", 0, 0, 0 );
return return_value;
}
@@ -1450,7 +1454,7 @@ done:
static void
close_connection_internal(Repl_Connection *conn)
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> close_connection_internal\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> close_connection_internal\n", 0, 0, 0 );
if (NULL != conn->ld)
{
@@ -1462,20 +1466,21 @@ 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, 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 );
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "close_connection_internal - %s: Disconnected from the consumer\n",
+ agmt_get_long_name(conn->agmt));
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= close_connection_internal\n", 0, 0, 0 );
}
void
windows_conn_disconnect(Repl_Connection *conn)
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_disconnect\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= windows_conn_disconnect\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_conn_disconnect\n", 0, 0, 0 );
}
@@ -1495,7 +1500,7 @@ windows_conn_replica_supports_ds5_repl(Repl_Connection *conn)
ConnResult return_value;
int ldap_rc;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_replica_supports_ds5_repl\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> windows_conn_replica_supports_ds5_repl\n", 0, 0, 0 );
if (windows_conn_connected(conn))
{
@@ -1564,7 +1569,7 @@ windows_conn_replica_supports_ds5_repl(Repl_Connection *conn)
/* Not connected */
return_value = CONN_NOT_CONNECTED;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_replica_supports_ds5_repl\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_conn_replica_supports_ds5_repl\n", 0, 0, 0 );
return return_value;
}
@@ -1575,7 +1580,7 @@ windows_conn_replica_supports_dirsync(Repl_Connection *conn)
ConnResult return_value;
int ldap_rc;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_replica_supports_dirsync\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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 +1641,7 @@ windows_conn_replica_supports_dirsync(Repl_Connection *conn)
/* Not connected */
return_value = CONN_NOT_CONNECTED;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_replica_supports_dirsync\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_conn_replica_supports_dirsync\n", 0, 0, 0 );
return return_value;
}
@@ -1648,7 +1653,7 @@ windows_conn_replica_is_win2k3(Repl_Connection *conn)
ConnResult return_value;
int ldap_rc;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_replica_is_win2k3\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> windows_conn_replica_is_win2k3\n", 0, 0, 0 );
if (windows_conn_connected(conn))
{
@@ -1702,7 +1707,7 @@ windows_conn_replica_is_win2k3(Repl_Connection *conn)
/* Not connected */
return_value = CONN_NOT_CONNECTED;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_conn_replica_is_win2k3\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_conn_replica_is_win2k3\n", 0, 0, 0 );
return return_value;
}
@@ -1718,7 +1723,7 @@ attribute_string_value_present(LDAP *ld, LDAPMessage *entry, const char *type,
int return_value = 0;
ber_len_t vallen;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> attribute_string_value_present\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> attribute_string_value_present\n", 0, 0, 0 );
if (NULL != entry)
{
@@ -1754,7 +1759,7 @@ attribute_string_value_present(LDAP *ld, LDAPMessage *entry, const char *type,
if (NULL != atype)
ldap_memfree(atype);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= attribute_string_value_present\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= attribute_string_value_present\n", 0, 0, 0 );
return return_value;
}
@@ -1778,24 +1783,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, LOG_DEBUG, "=> windows_conn_set_timeout\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= windows_conn_set_timeout\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_conn_set_timeout\n", 0, 0, 0 );
}
void windows_conn_set_agmt_changed(Repl_Connection *conn)
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_conn_set_agmt_changed\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= windows_conn_set_agmt_changed\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_conn_set_agmt_changed\n", 0, 0, 0 );
}
static const char *
@@ -1833,7 +1838,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, LOG_DEBUG, "=> bind_and_check_pwp\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> bind_and_check_pwp\n", 0, 0, 0 );
rc = slapi_ldap_bind(conn->ld, binddn, password, mech, NULL,
&ctrls, NULL, NULL);
@@ -1843,8 +1848,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: Replication bind with %s auth resumed\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "bind_and_check_pwp - %s: Replication bind with %s auth resumed\n",
agmt_get_long_name(conn->agmt),
mech ? mech : "SIMPLE");
}
@@ -1857,8 +1862,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: Successfully bound %s to consumer, "
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "bind_and_check_pwp - %s: Successfully bound %s to consumer, "
"but password has expired on consumer.\n",
agmt_get_long_name(conn->agmt), binddn);
}
@@ -1869,8 +1874,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: Successfully bound %s to consumer, "
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "bind_and_check_pwp - %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);
}
@@ -1879,7 +1884,7 @@ bind_and_check_pwp(Repl_Connection *conn, char * binddn, char *password)
ldap_controls_free( ctrls );
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= bind_and_check_pwp - CONN_OPERATION_SUCCESS\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= bind_and_check_pwp - CONN_OPERATION_SUCCESS\n", 0, 0, 0 );
return (CONN_OPERATION_SUCCESS);
}
@@ -1894,8 +1899,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: Replication bind with %s auth failed: LDAP error %d (%s) (%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "bind_and_check_pwp - %s: Replication bind with %s auth failed: LDAP error %d (%s) (%s)\n",
agmt_get_long_name(conn->agmt),
mech ? mech : "SIMPLE", rc,
ldap_err2string(rc), errmsg);
@@ -1903,14 +1908,14 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: Replication bind with %s auth failed: LDAP error %d (%s) (%s)\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "bind_and_check_pwp - %s: Replication bind with %s auth failed: LDAP error %d (%s) (%s)\n",
agmt_get_long_name(conn->agmt),
mech ? mech : "SIMPLE", rc,
ldap_err2string(rc), errmsg);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= bind_and_check_pwp - CONN_OPERATION_FAILED\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= bind_and_check_pwp - CONN_OPERATION_FAILED\n", 0, 0, 0 );
return (CONN_OPERATION_FAILED);
}
}
@@ -1939,22 +1944,22 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "Error reading bind response for id "
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_check_user_password - 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, LOG_ERR, windows_repl_plugin_name,
- "Error: timeout reading "
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_check_user_password - Error: timeout reading "
"bind response for [%s]\n",
binddn ? binddn : "(anon)");
rc = -1;
} 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, LOG_ERR, windows_repl_plugin_name,
- "Error: unable to parse "
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_check_user_password - Error: unable to parse "
"bind result for [%s]: "
"error %d\n",
binddn ? binddn : "(anon)",
@@ -1974,7 +1979,7 @@ do_simple_bind (Repl_Connection *conn, LDAP *ld, char * binddn, char *password)
{
int msgid;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> do_simple_bind\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> do_simple_bind\n", 0, 0, 0 );
if( LDAP_SUCCESS != slapi_ldap_bind( ld, binddn, password, LDAP_SASL_SIMPLE, NULL, NULL, NULL, &msgid ) )
{
@@ -1987,8 +1992,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: Simple bind failed, "
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "do_simple_bind - %s: Simple bind failed, "
SLAPI_COMPONENT_NAME_LDAPSDK " error %d (%s) (%s), "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
agmt_get_long_name(conn->agmt),
@@ -2000,11 +2005,11 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: Simple bind resumed\n",
+ slapi_log_error(SLAPI_LOG_INFO, windows_repl_plugin_name,
+ "do_simple_bind - %s: Simple bind resumed\n",
agmt_get_long_name(conn->agmt));
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= do_simple_bind\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= do_simple_bind\n", 0, 0, 0 );
return msgid;
}
@@ -2014,14 +2019,14 @@ repl5_start_debug_timeout(int *setlevel)
{
Slapi_Eq_Context eqctx = 0;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> repl5_start_debug_timeout\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= repl5_start_debug_timeout\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= repl5_start_debug_timeout\n", 0, 0, 0 );
return eqctx;
}
@@ -2030,7 +2035,7 @@ repl5_stop_debug_timeout(Slapi_Eq_Context eqctx, int *setlevel)
{
char buf[20];
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> repl5_stop_debug_timeout\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> repl5_stop_debug_timeout\n", 0, 0, 0 );
if (eqctx && !*setlevel) {
(void)slapi_eq_cancel(eqctx);
@@ -2042,7 +2047,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, LOG_DEBUG, "<= repl5_stop_debug_timeout\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= repl5_stop_debug_timeout\n", 0, 0, 0 );
}
static void
@@ -2052,15 +2057,15 @@ 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, LOG_DEBUG, "=> repl5_debug_timeout_callback\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> repl5_debug_timeout_callback\n", 0, 0, 0 );
*setlevel = 1;
sprintf(buf, "%d", s_debug_level);
config_set_errorlog_level("nsslapd-errorlog-level", buf, NULL, 1);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
- "repl5_debug_timeout_callback: set debug level to %d at %ld\n",
+ slapi_log_error(SLAPI_LOG_INFO, windows_repl_plugin_name,
+ "repl5_debug_timeout_callback: Set debug level to %d at %ld\n",
s_debug_level, when);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= repl5_debug_timeout_callback\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= repl5_debug_timeout_callback\n", 0, 0, 0 );
}
diff --git a/ldap/servers/plugins/replication/windows_inc_protocol.c b/ldap/servers/plugins/replication/windows_inc_protocol.c
index 4b37832..d8fad4b 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, LOG_DEBUG, "=> windows_inc_delete\n" );
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, "<= windows_inc_delete\n" );
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> w_set_pause_and_busy_time\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG, "<= w_set_pause_and_busy_time\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG, "=> windows_inc_run\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_inc_run\n" );
prp->stopped = 0;
prp->terminate = 0;
@@ -340,13 +340,13 @@ windows_inc_run(Private_Repl_Protocol *prp)
current_interval = interval;
if(dirsync){
int rc = slapi_eq_cancel(dirsync);
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "windows_inc_runs: cancelled dirsync: %p, rval: %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_inc_run - 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, LOG_DEBUG, windows_repl_plugin_name,
- "windows_inc_runs: new dirsync: %p\n", dirsync);
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_inc_run - New dirsync: %p\n", dirsync);
}
break;
@@ -387,9 +387,9 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: Incremental protocol: "
- "event %s should not occur in state %s; going to sleep\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_inc_run - %s: "
+ "Event %s should not occur in state %s; going to sleep\n",
agmt_get_long_name(prp->agmt),
e1 ? event2name(EVENT_WINDOW_CLOSED) : event2name(EVENT_BACKOFF_EXPIRED),
state2name(current_state));
@@ -403,9 +403,9 @@ windows_inc_run(Private_Repl_Protocol *prp)
else
{
/* wait until window opens or an event occurs */
- 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));
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_inc_run - %s: "
+ "Waiting for update window to open\n", agmt_get_long_name(prp->agmt));
protocol_sleep(prp, PR_INTERVAL_NO_TIMEOUT);
}
break;
@@ -467,8 +467,8 @@ 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, LOG_ERR, windows_repl_plugin_name, "%s: Incremental protocol: "
- "event %s should not occur in state %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name, "windows_inc_run - %s: "
+ "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));
@@ -510,8 +510,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "windows_acquire_replica returned %s (%d)\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_inc_run - windows_acquire_replica returned %s (%d)\n",
acquire2name(rc),
rc);
@@ -543,7 +543,7 @@ windows_inc_run(Private_Repl_Protocol *prp)
int optype, ldaprc;
windows_conn_get_error(prp->conn, &optype, &ldaprc);
agmt_set_last_update_status(prp->agmt, ldaprc,
- prp->last_acquire_response_code, NULL);
+ prp->last_acquire_response_code, NULL);
}
object_release(prp->replica_object);
@@ -579,8 +579,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: Incremental protocol: event %s should not occur in state %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_inc_run - %s: 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));
@@ -676,7 +676,7 @@ windows_inc_run(Private_Repl_Protocol *prp)
int optype, ldaprc;
windows_conn_get_error(prp->conn, &optype, &ldaprc);
agmt_set_last_update_status(prp->agmt, ldaprc,
- prp->last_acquire_response_code, NULL);
+ prp->last_acquire_response_code, NULL);
}
/*
@@ -691,10 +691,10 @@ 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, 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);
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_inc_run - %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);
}
@@ -728,39 +728,39 @@ 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, 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));
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name, "windows_inc_run - %s: "
+ "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));
protocol_sleep(prp, PR_INTERVAL_NO_TIMEOUT);
}
break;
- case STATE_SENDING_UPDATES:
- dev_debug("windows_inc_run(STATE_SENDING_UPDATES)");
- agmt_set_update_in_progress(prp->agmt, PR_TRUE);
- num_changes_sent = 0;
- last_start_time = current_time();
- agmt_set_last_update_start(prp->agmt, last_start_time);
- /*
- * We've acquired the replica, and are ready to send any
- * needed updates.
- */
- if (PROTOCOL_IS_SHUTDOWN(prp))
- {
- windows_release_replica (prp);
- done = 1;
- agmt_set_update_in_progress(prp->agmt, PR_FALSE);
- agmt_set_last_update_end(prp->agmt, current_time());
- /* MAB: I don't find the following status correct. How do we know it has
- been stopped by an admin and not by a total update request, for instance?
- In any case, how is this protocol shutdown situation different from all the
- other ones that are present in this state machine? */
- /* richm: We at least need to let monitors know that the protocol has been
- shutdown - maybe they can figure out why */
- agmt_set_last_update_status(prp->agmt, 0, 0, "Protocol stopped");
- agmt_update_done(prp->agmt, 0);
- break;
- }
+ case STATE_SENDING_UPDATES:
+ dev_debug("windows_inc_run(STATE_SENDING_UPDATES)");
+ agmt_set_update_in_progress(prp->agmt, PR_TRUE);
+ num_changes_sent = 0;
+ last_start_time = current_time();
+ agmt_set_last_update_start(prp->agmt, last_start_time);
+ /*
+ * We've acquired the replica, and are ready to send any
+ * needed updates.
+ */
+ if (PROTOCOL_IS_SHUTDOWN(prp))
+ {
+ windows_release_replica (prp);
+ done = 1;
+ agmt_set_update_in_progress(prp->agmt, PR_FALSE);
+ agmt_set_last_update_end(prp->agmt, current_time());
+ /* MAB: I don't find the following status correct. How do we know it has
+ been stopped by an admin and not by a total update request, for instance?
+ In any case, how is this protocol shutdown situation different from all the
+ other ones that are present in this state machine? */
+ /* richm: We at least need to let monitors know that the protocol has been
+ shutdown - maybe they can figure out why */
+ agmt_set_last_update_status(prp->agmt, 0, 0, "Protocol stopped");
+ agmt_update_done(prp->agmt, 0);
+ break;
+ }
agmt_set_last_update_status(prp->agmt, 0, 0, "Incremental update started");
@@ -777,21 +777,21 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: Replica has no update vector. It has never been initialized.\n",
+ slapi_log_error(SLAPI_LOG_WARNING, windows_repl_plugin_name,
+ "windows_inc_run - %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, LOG_ERR, windows_repl_plugin_name,
- "%s: The remote replica has a different database generation ID than "
+ slapi_log_error(SLAPI_LOG_WARNING, windows_repl_plugin_name,
+ "windows_inc_run - %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, LOG_ERR, windows_repl_plugin_name,
- "%s: Replica update vector is too out of date to bring "
+ slapi_log_error(SLAPI_LOG_WARNING, windows_repl_plugin_name,
+ "windows_inc_run - %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));
next_state = STATE_BACKOFF_START;
@@ -806,15 +806,15 @@ windows_inc_run(Private_Repl_Protocol *prp)
replica = NULL;
if (rc == CSN_LIMIT_EXCEEDED) /* too much skew */
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
- "%s: Incremental protocol: fatal error - too much time skew between replicas!\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_inc_run - %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, LOG_ERR, windows_repl_plugin_name,
- "%s: Incremental protocol: fatal internal error updating the CSN generator!\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_inc_run - %s: Incremental protocol: fatal internal error updating the CSN generator!\n",
agmt_get_long_name(prp->agmt));
next_state = STATE_STOP_FATAL_ERROR;
}
@@ -920,8 +920,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: Pausing updates for %ld seconds to allow other suppliers to update consumer\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_inc_run - %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,8 +944,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: Incremental update failed and requires administrator action\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_inc_run - %s: Incremental update failed and requires administrator action\n",
agmt_get_long_name(prp->agmt));
next_state = STATE_STOP_FATAL_ERROR_PART2;
break;
@@ -997,8 +997,8 @@ windows_inc_run(Private_Repl_Protocol *prp)
break;
}
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: State: %s -> %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_inc_run - %s: State: %s -> %s\n",
agmt_get_long_name(prp->agmt),
state2name(current_state), state2name(next_state));
@@ -1012,18 +1012,16 @@ windows_inc_run(Private_Repl_Protocol *prp)
/* ... and disconnect, if currently connected */
windows_conn_disconnect(prp->conn);
ruv_destroy ( &ruv );
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_inc_run\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_inc_run\n" );
}
-
-
/*
* Go to sleep until awakened.
*/
static void
protocol_sleep(Private_Repl_Protocol *prp, PRIntervalTime duration)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> protocol_sleep\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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 +1030,12 @@ protocol_sleep(Private_Repl_Protocol *prp, PRIntervalTime duration)
PR_WaitCondVar(prp->cvar, duration);
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: Incremental protocol: can't go to sleep: event bits - %x\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "protocol_sleep - %s: 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, LOG_DEBUG, "<= protocol_sleep\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= protocol_sleep\n" );
}
@@ -1050,13 +1048,13 @@ protocol_sleep(Private_Repl_Protocol *prp, PRIntervalTime duration)
static void
event_notify(Private_Repl_Protocol *prp, PRUint32 event)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> event_notify\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG, "<= event_notify\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= event_notify\n" );
}
@@ -1069,26 +1067,26 @@ event_occurred(Private_Repl_Protocol *prp, PRUint32 event)
{
PRUint32 return_value;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> event_occurred\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG, "<= event_occurred\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= event_occurred\n" );
return return_value;
}
static void
reset_events (Private_Repl_Protocol *prp)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> reset_events\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> reset_events\n" );
PR_ASSERT(NULL != prp);
PR_Lock(prp->lock);
prp->eventbits = 0;
PR_Unlock(prp->lock);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= reset_events\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= reset_events\n" );
}
@@ -1096,8 +1094,8 @@ reset_events (Private_Repl_Protocol *prp)
static PRBool
is_dummy_operation (const slapi_operation_parameters *op)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> is_dummy_operation\n" );
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= is_dummy_operation\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> is_dummy_operation\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= is_dummy_operation\n" );
return (strcmp (op->target_address.uniqueid, START_ITERATION_ENTRY_UNIQUEID) == 0);
}
@@ -1106,7 +1104,7 @@ is_dummy_operation (const slapi_operation_parameters *op)
void
w_cl5_operation_parameters_done (struct slapi_operation_parameters *sop)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> w_cl5_operation_parameters_done\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> w_cl5_operation_parameters_done\n" );
if(sop!=NULL) {
switch(sop->operation_type)
{
@@ -1141,7 +1139,7 @@ w_cl5_operation_parameters_done (struct slapi_operation_parameters *sop)
}
}
operation_parameters_done(sop);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= w_cl5_operation_parameters_done\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= w_cl5_operation_parameters_done\n" );
}
@@ -1168,7 +1166,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, LOG_DEBUG, "=> send_updates\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> send_updates\n" );
*num_changes_sent = 0;
@@ -1193,93 +1191,93 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: Invalid parameter passed to cl5CreateReplayIterator\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "send_updates - %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, LOG_ERR, windows_repl_plugin_name,
- "%s: Unexpected format encountered in changelog database\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "send_updates - %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, LOG_ERR, windows_repl_plugin_name,
- "%s: Changelog database was in an incorrect state\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "send_updates - %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, LOG_ERR, windows_repl_plugin_name,
- "%s: Incorrect dbversion found in changelog database\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "send_updates - %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, LOG_ERR, windows_repl_plugin_name,
- "%s: A changelog database error was encountered\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "send_updates - %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, LOG_DEBUG, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_ERR, windows_repl_plugin_name,
- "%s: Memory allocation error occurred\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "send_updates - %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, LOG_ERR, windows_repl_plugin_name,
- "%s: An NSPR error (%d) occurred\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "send_updates - %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, LOG_ERR, windows_repl_plugin_name,
- "%s: A CSN API failure was encountered\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "send_updates - %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, LOG_ERR, windows_repl_plugin_name,
- "%s: An RUV API failure occurred\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "send_updates - %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, LOG_ERR, windows_repl_plugin_name,
- "%s: A namedobject API failure occurred\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "send_updates - %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, LOG_ERR, windows_repl_plugin_name,
- "%s: Data required to update replica has been purged. "
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "send_updates - %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, LOG_ERR, windows_repl_plugin_name,
- "%s: Missing data encountered\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "send_updates - %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, LOG_ERR, windows_repl_plugin_name,
- "%s: An unknown error was ecountered\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "send_updates - %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, LOG_ERR, windows_repl_plugin_name,
- "%s: An unknown error (%d) occurred "
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "send_updates - %s: An unknown error (%d) occurred "
"(cl5CreateReplayIterator)\n",
agmt_get_long_name(prp->agmt), rc);
return_value = UPDATE_TRANSIENT_ERROR;
@@ -1304,8 +1302,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: changelog iteration code returned a dummy entry with csn %s, "
+ slapi_log_error(SLAPI_LOG_WARNING, windows_repl_plugin_name,
+ "send_updates - %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));
continue;
@@ -1336,10 +1334,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,
- finished || slapi_log_urp==SLAPI_LOG_FATAL ? LOG_ERR : LOG_DEBUG,
+ slapi_log_error(finished ? SLAPI_LOG_WARNING : slapi_log_urp,
windows_repl_plugin_name,
- "%s: Consumer failed to replay change (uniqueid %s, CSN %s): %s. %s.\n",
+ "send_updates - %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,
ldap_err2string(error),
@@ -1351,8 +1348,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: Consumer failed to replay change (uniqueid %s, CSN %s): "
+ slapi_log_error(SLAPI_LOG_WARNING, windows_repl_plugin_name,
+ "send_updates - %s: Consumer failed to replay change (uniqueid %s, CSN %s): "
"%s. Will retry later.\n",
agmt_get_long_name(prp->agmt),
entry.op->target_address.uniqueid, csn_str,
@@ -1362,8 +1359,8 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
{
return_value = UPDATE_TIMEOUT;
finished = 1;
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
- "%s: Consumer timed out to replay change (uniqueid %s, CSN %s): "
+ slapi_log_error(SLAPI_LOG_WARNING, windows_repl_plugin_name,
+ "send_updates - %s: Consumer timed out to replay change (uniqueid %s, CSN %s): "
"%s.\n",
agmt_get_long_name(prp->agmt),
entry.op->target_address.uniqueid, csn_str,
@@ -1377,8 +1374,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: Failed to replay change (uniqueid %s, CSN %s): "
+ slapi_log_error(SLAPI_LOG_WARNING, windows_repl_plugin_name,
+ "send_updates - %s: Failed to replay change (uniqueid %s, CSN %s): "
"Local error. Will retry later.\n",
agmt_get_long_name(prp->agmt),
entry.op->target_address.uniqueid, csn_str);
@@ -1414,40 +1411,40 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
}
break;
case CL5_BAD_DATA:
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
- "%s: Invalid parameter passed to cl5GetNextOperationToReplay\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "send_updates - %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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: No more updates to send (cl5GetNextOperationToReplay)\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "send_updates - %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, LOG_ERR, windows_repl_plugin_name,
- "%s: A database error occurred (cl5GetNextOperationToReplay)\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "send_updates - %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, LOG_ERR, windows_repl_plugin_name,
- "%s: A malformed changelog entry was encountered (cl5GetNextOperationToReplay)\n",
+ slapi_log_error(SLAPI_LOG_WARNING, windows_repl_plugin_name,
+ "send_updates - %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, LOG_ERR, windows_repl_plugin_name,
- "%s: A memory allocation error occurred (cl5GetNextOperationToRepla)\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "send_updates - %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, LOG_ERR, windows_repl_plugin_name,
- "%s: Unknown error code (%d) returned from cl5GetNextOperationToReplay\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "send_updates - %s: Unknown error code (%d) returned from cl5GetNextOperationToReplay\n",
agmt_get_long_name(prp->agmt), rc);
return_value = UPDATE_TRANSIENT_ERROR;
break;
@@ -1473,12 +1470,10 @@ 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, LOG_DEBUG, "<= send_updates\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= send_updates\n" );
return return_value;
}
-
-
/*
* XXXggood this should probably be in the superclass, since the full update
* protocol is going to need it too.
@@ -1490,7 +1485,7 @@ windows_inc_stop(Private_Repl_Protocol *prp)
PRIntervalTime start, maxwait, now;
int seconds = 1200;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_inc_stop\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_inc_stop\n" );
maxwait = PR_SecondsToInterval(seconds);
prp->terminate = 1;
@@ -1506,78 +1501,73 @@ windows_inc_stop(Private_Repl_Protocol *prp)
{
/* Isn't listening. Do something drastic. */
return_value = -1;
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_inc_stop: protocol does not stop after %d seconds\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_inc_stop - %s: 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_inc_stop: protocol stopped after %d seconds\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_inc_stop - %s: Protocol stopped after %d seconds\n",
agmt_get_long_name(prp->agmt),
PR_IntervalToSeconds(now-start));
}
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_inc_stop\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_inc_stop\n" );
return return_value;
}
-
-
static int
windows_inc_status(Private_Repl_Protocol *prp)
{
int return_value = 0;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_inc_status\n" );
-
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_inc_status\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_inc_status\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_inc_status\n" );
return return_value;
}
-
-
static void
windows_inc_notify_update(Private_Repl_Protocol *prp)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_inc_notify_update\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_inc_notify_update\n" );
event_notify(prp, EVENT_TRIGGERING_CRITERIA_MET);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_inc_notify_update\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_inc_notify_update\n" );
}
static void
windows_inc_update_now(Private_Repl_Protocol *prp)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_inc_update_now\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_inc_update_now\n" );
event_notify(prp, EVENT_REPLICATE_NOW);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_inc_update_now\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_inc_update_now\n" );
}
static void
windows_inc_notify_agmt_changed(Private_Repl_Protocol *prp)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_inc_notify_agmt_changed\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_inc_notify_agmt_changed\n" );
event_notify(prp, EVENT_AGMT_CHANGED);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_inc_notify_agmt_changed\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_inc_notify_agmt_changed\n" );
}
static void
windows_inc_notify_window_opened (Private_Repl_Protocol *prp)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_inc_notify_window_opened\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_inc_notify_window_opened\n" );
event_notify(prp, EVENT_WINDOW_OPENED);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_inc_notify_window_opened\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_inc_notify_window_opened\n" );
}
static void
windows_inc_notify_window_closed (Private_Repl_Protocol *prp)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_inc_notify_window_closed\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_inc_notify_window_closed\n" );
event_notify(prp, EVENT_WINDOW_CLOSED);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_inc_notify_window_closed\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_inc_notify_window_closed\n" );
}
@@ -1587,7 +1577,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, LOG_DEBUG, "=> Windows_Inc_Protocol_new\n" );
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "=> Windows_Inc_Protocol_new\n" );
prp->delete = windows_inc_delete;
prp->run = windows_inc_run;
@@ -1620,13 +1610,13 @@ Windows_Inc_Protocol_new(Repl_Protocol *rp)
prp->private = (void *)rip;
prp->replica_acquired = PR_FALSE;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= Windows_Inc_Protocol_new\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= Windows_Inc_Protocol_new\n" );
return prp;
loser:
windows_inc_delete(&prp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= Windows_Inc_Protocol_new (loser)\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= Windows_Inc_Protocol_new (loser)\n" );
return NULL;
}
@@ -1638,12 +1628,12 @@ windows_inc_backoff_expired(time_t timer_fire_time, void *arg)
{
Private_Repl_Protocol *prp = (Private_Repl_Protocol *)arg;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_inc_backoff_expired\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_inc_backoff_expired\n" );
PR_ASSERT(NULL != prp);
event_notify(prp, EVENT_BACKOFF_EXPIRED);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_inc_backoff_expired\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_inc_backoff_expired\n" );
}
@@ -1669,7 +1659,7 @@ windows_examine_update_vector(Private_Repl_Protocol *prp, RUV *remote_ruv)
{
int return_value;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_examine_update_vector\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_examine_update_vector\n" );
PR_ASSERT(NULL != prp);
if (NULL == prp)
@@ -1710,7 +1700,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, LOG_DEBUG, "<= windows_examine_update_vector\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_examine_update_vector\n" );
return return_value;
}
@@ -1735,8 +1725,8 @@ acquire2name (int code)
static const char*
state2name (int state)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> state2name\n" );
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= state2name\n" );
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "=> state2name\n" );
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "<= state2name\n" );
switch (state)
{
case STATE_START: return "start";
@@ -1757,8 +1747,8 @@ state2name (int state)
static const char*
event2name (int event)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> event2name\n" );
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= event2name\n" );
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "=> event2name\n" );
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "<= event2name\n" );
switch (event)
{
case EVENT_WINDOW_OPENED: return "update_window_opened";
@@ -1777,11 +1767,11 @@ event2name (int event)
static void
periodic_dirsync(time_t when, void *arg)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> periodic_dirsync\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> periodic_dirsync\n" );
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
"Running Dirsync \n");
event_notify( (Private_Repl_Protocol*) arg, EVENT_RUN_DIRSYNC);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= periodic_dirsync\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= periodic_dirsync\n" );
}
diff --git a/ldap/servers/plugins/replication/windows_private.c b/ldap/servers/plugins/replication/windows_private.c
index 1dab015..dd6b5d0 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, LOG_DEBUG, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
"windows_parse_config_entry: setting %s to %s will be "
"deferred until current update is completed\n",
type, tmpstr);
@@ -232,8 +232,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "Ignoring illegal setting for %s attribute in replication "
+ slapi_log_error(SLAPI_LOG_WARNING, windows_repl_plugin_name,
+ "windows_parse_config_entry - Ignoring illegal setting for %s attribute in replication "
"agreement \"%s\". Valid values are \"toWindows\" or "
"\"fromWindows\".\n", type_oneWaySync, slapi_entry_get_dn(e));
windows_private_set_one_way(ra, ONE_WAY_SYNC_DISABLED);
@@ -263,8 +263,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "Ignoring illegal setting for %s attribute in replication "
+ slapi_log_error(SLAPI_LOG_WARNING, windows_repl_plugin_name,
+ "windows_parse_config_entry - Ignoring illegal setting for %s attribute in replication "
"agreement \"%s\". Valid values are \"delete\" or "
"\"unsync\".\n", type_winsyncMoveAction, slapi_entry_get_dn(e));
windows_private_set_move_action(ra, MOVE_DOES_NOTHING);
@@ -374,7 +374,7 @@ Dirsync_Private* windows_private_new()
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=> windows_private_new\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_new\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_delete\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_delete\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_private_delete\n" );
}
@@ -439,14 +439,14 @@ int windows_private_get_isnt4(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=> windows_private_get_isnt4\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_private_get_isnt4\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<= windows_private_get_isnt4\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_set_isnt4\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_set_isnt4\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_private_set_isnt4\n" );
}
int windows_private_get_iswin2k3(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=> windows_private_get_iswin2k3\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_private_get_iswin2k3\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<= windows_private_get_iswin2k3\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_set_iswin2k3\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_set_iswin2k3\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_get_directory_filter\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_get_directory_filter\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_get_windows_filter\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_get_windows_filter\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_get_deleted_filter\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_get_deleted_filter\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_get_windows_subtree\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_private_get_windows_subtree\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<= windows_private_get_windows_subtree\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_get_windows_domain\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_private_get_windows_domain\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<= windows_private_get_windows_domain\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_set_windows_domain\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_set_windows_domain\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_get_directory_replarea\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_private_get_directory_replarea\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<= windows_private_get_directory_replarea\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_set_windows_replarea\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_set_windows_replarea\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_set_directory_replarea\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_set_directory_replarea\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_private_set_directory_replarea\n" );
}
PRBool windows_private_create_users(const Repl_Agmt *ra)
{
Dirsync_Private *dp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=> windows_private_create_users\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_private_create_users\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<= windows_private_create_users\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_set_create_users\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_set_create_users\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_create_groups\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_private_create_groups\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<= windows_private_create_groups\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_set_create_groups\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_set_create_groups\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_get_one_way\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_private_get_one_way\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<= windows_private_get_one_way\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_set_one_way\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_set_one_way\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_get_windows_userfilter\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_private_get_windows_userfilter\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<= windows_private_get_windows_userfilter\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_set_windows_userfilter\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_set_windows_userfilter\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_get_directory_userfilter\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_private_get_directory_userfilter\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<= windows_private_get_directory_userfilter\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_set_directory_userfilter\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_set_directory_userfilter\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_get_subtreepairs\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_private_get_subtreepairs\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<= windows_private_get_subtreepairs\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_set_subtreepairs\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_set_subtreepairs\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_ERR,
+ LDAPDebug1Arg(LDAP_DEBUG_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, LOG_ERR,
+ LDAPDebug1Arg(LDAP_DEBUG_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, LOG_ERR,
+ LDAPDebug1Arg(LDAP_DEBUG_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, LOG_DEBUG,"=> windows_private_get_windows_treetop\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_private_get_windows_treetop\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<= windows_private_get_windows_treetop\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_set_windows_treetop\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_ERR,
+ LDAPDebug0Args(LDAP_DEBUG_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, LOG_DEBUG,"<= windows_private_set_windows_treetop\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_get_directory_treetop\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_private_get_directory_treetop\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<= windows_private_get_directory_treetop\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_set_directory_treetop\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_ERR,
+ LDAPDebug0Args(LDAP_DEBUG_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, LOG_DEBUG,"<= windows_private_set_directory_treetop\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG, "=> windows_private_dirsync_control\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG, "<= windows_private_dirsync_control\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_update_dirsync_control\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_update_dirsync_control\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_dirsync_has_more\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_private_dirsync_has_more\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<= windows_private_dirsync_has_more\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_null_dirsync_control\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_null_dirsync_control\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_private_null_dirsync_control\n" );
}
static
@@ -1298,7 +1298,7 @@ windows_private_save_dirsync_cookie(const Repl_Agmt *ra)
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"=> windows_private_save_dirsync_cookie\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_save_dirsync_cookie\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_load_dirsync_cookie\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_load_dirsync_cookie\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_get_raw_entry\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_private_get_raw_entry\n" );
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<= windows_private_get_raw_entry\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_set_raw_entry\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_set_raw_entry\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_set_keep_raw_entry\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_set_keep_raw_entry\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_get_keep_raw_entry\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_private_get_keep_raw_entry\n" );
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<= windows_private_get_keep_raw_entry\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_get_api_cookie\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_private_get_api_cookie\n" );
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<= windows_private_get_api_cookie\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_set_api_cookie\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_set_api_cookie\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_get_sync_interval\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_private_get_sync_interval\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<= windows_private_get_sync_interval\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_set_sync_interval\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_set_sync_interval\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_get_move_action\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_private_get_move_action\n" );
PR_ASSERT(ra);
dp = (Dirsync_Private *) agmt_get_priv(ra);
PR_ASSERT (dp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG,"<= windows_private_get_move_action\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,"=> windows_private_set_move_action\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_DEBUG,"<= windows_private_set_move_action\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_PLUGIN,
"<-- windows_plugin_callonce -- no more windows plugin APIs registered "
"for GUID [%s] -- end\n",
guid);
@@ -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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_PLUGIN,
"<-- windows_plugin_callonce -- already added windows plugin API "
"[%d][0x%p] for GUID [%s] -- end\n",
idx, theapis[idx], guid);
@@ -1756,12 +1756,12 @@ windows_plugin_init(Repl_Agmt *ra)
struct winsync_plugin_cookie *list = NULL;
void *cookie = NULL;
- LDAPDebug0Args( LDAP_DEBUG_PLUGIN, LOG_DEBUG, "--> windows_plugin_init_start -- begin\n");
+ LDAPDebug0Args(LDAP_DEBUG_PLUGIN, "--> windows_plugin_init_start -- begin\n");
if (PR_CallOnce(&winsync_callOnce, windows_plugin_callonce)) {
PRErrorCode prerr = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "windows_plugin_init",
- "cannot initialize plugin: %d:%s\n", prerr,
+ slapi_log_error(SLAPI_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, LOG_DEBUG, "<-- windows_plugin_init_start -- end\n");
+ LDAPDebug0Args(LDAP_DEBUG_PLUGIN, "<-- 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
"--> test_winsync_dirsync_search_params_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
"--> test_winsync_pre_ad_search_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
"--> test_winsync_pre_ds_search_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
"--> test_winsync_pre_ad_mod_user_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
"--> test_winsync_pre_ad_mod_group_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
"--> test_winsync_pre_ds_mod_user_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
"--> test_winsync_pre_ds_mod_group_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
"--> test_winsync_pre_ds_add_user_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
"--> test_winsync_pre_ds_add_group_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
"--> test_winsync_get_new_ds_group_dn_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
"--> test_winsync_pre_ad_mod_user_mods_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
"--> test_winsync_pre_ad_mod_group_mods_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
"--> test_winsync_can_add_entry_to_ad_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
"--> test_winsync_begin_update_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
"--> test_winsync_end_update_cb -- begin\n");
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name,
"--> test_winsync_destroy_agmt_cb -- begin\n");
/* free(cbdata); */
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, test_winsync_plugin_name,
- "<-- test_winsync_plugin_start -- failed to register winsync api -- end\n");
+ slapi_log_error(SLAPI_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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_TRACE, test_winsync_plugin_name,
"--> test_winsync_plugin_close -- begin\n");
slapi_apib_unregister(WINSYNC_v3_0_GUID);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_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, LOG_ERR, test_winsync_plugin_name,
- "<-- test_winsync_plugin_init -- failed to retrieve plugin identity -- end\n");
+ slapi_log_error(SLAPI_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, LOG_DEBUG, test_winsync_plugin_name,
+ slapi_log_error(SLAPI_LOG_TRACE, 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 b386074..09ae7b0 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, LOG_DEBUG, "=> windows_ignore_error_and_keep_going\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= windows_ignore_error_and_keep_going\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_ignore_error_and_keep_going\n", 0, 0, 0 );
return return_value;
}
static const char*
op2string(int op)
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> op2string\n", 0, 0, 0 );
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= op2string\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> op2string\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= op2string\n", 0, 0, 0 );
switch (op) {
case SLAPI_OPERATION_ADD:
return "add";
@@ -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, LOG_DEBUG, NULL, "Windows sync entry: %s %s\n", string, buffer);
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "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, LOG_DEBUG, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, NULL, "map_dn_values: length of dn is 0\n");
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "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, LOG_DEBUG, NULL, "map_dn_values: unable to create Slapi_DN from %s.\n", original_dn_string);
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "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, LOG_DEBUG, NULL, "map_dn_values: no remote dn found for %s\n", original_dn_string);
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "map_dn_values: no remote dn found for %s\n", original_dn_string);
}
} else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "map_dn_values: this entry is not ours %s\n", original_dn_string);
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "map_dn_values: this entry is not ours %s\n", original_dn_string);
}
} else {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "map_dn_values: no local entry found for %s\n", original_dn_string);
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "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, LOG_DEBUG, NULL, "map_dn_values: no local dn found for %s\n", original_dn_string);
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "map_dn_values: no local dn found for %s\n", original_dn_string);
}
} else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "map_dn_values: this entry is not ours %s\n", original_dn_string);
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "map_dn_values: this entry is not ours %s\n", original_dn_string);
}
} else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "map_dn_values: no remote entry found for %s\n", original_dn_string);
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "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, LOG_DEBUG, NULL, "acquire_replica, supplier RUV:\n");
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "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, LOG_DEBUG, NULL, "acquire_replica, supplier RUV = null\n");
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "acquire_replica, supplier RUV = null\n");
}
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "acquire_replica, consumer RUV:\n");
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "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, LOG_DEBUG, NULL, "acquire_replica, consumer RUV = null\n");
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "acquire_replica, consumer RUV = null\n");
}
}
}
@@ -581,12 +581,12 @@ windows_acquire_replica(Private_Repl_Protocol *prp, RUV **ruv, int check_ruv)
PRBool is_newer = PR_FALSE;
RUV *r = NULL;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_acquire_replica\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> windows_acquire_replica\n", 0, 0, 0 );
if (NULL == ruv)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name, "NULL ruv\n");
- return_value = ACQUIRE_FATAL_ERROR;
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name, "NULL ruv\n");
+ return_value = ACQUIRE_FATAL_ERROR;
goto done;
}
@@ -594,10 +594,10 @@ 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, LOG_ERR, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_NOTICE, 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 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_acquire_replica\n", 0, 0, 0 );
return ACQUIRE_SUCCESS;
}
@@ -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, LOG_DEBUG, NULL, "acquire_replica, supplier RUV is newer\n");
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "acquire_replica, supplier RUV is newer\n");
}
/* Handle the pristine case */
@@ -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, LOG_DEBUG, "<= windows_acquire_replica - ACQUIRE_CONSUMER_WAS_UPTODATE\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_acquire_replica - ACQUIRE_CONSUMER_WAS_UPTODATE\n", 0, 0, 0 );
return ACQUIRE_CONSUMER_WAS_UPTODATE;
}
@@ -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, LOG_ERR, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
"%s: Unable to obtain current CSN. "
"Replication is aborting.\n",
agmt_get_long_name(prp->agmt));
@@ -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, LOG_DEBUG, "<= windows_acquire_replica\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> windows_release_replica\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= windows_release_replica\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= windows_release_replica\n", 0, 0, 0 );
}
@@ -799,7 +799,7 @@ send_password_modify(Slapi_DN *sdn,
continue;
}
if (0 == strcmp(s, "0")) {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, 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, windows_repl_plugin_name, "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, LOG_DEBUG, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, 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,8 +1147,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: process_replay_add: dn=\"%s\" appears to have been"
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "process_replay_add: %s - 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,14 +1198,14 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: process_replay_add: Reanimating tombstone (dn=\"%s\") to"
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "process_replay_add - %s - 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: process_replay_add: Reanimation of tombstone"
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ " process_replay_add - %s - Reanimation of tombstone"
" (dn=\"%s\") failed. A new entry (dn=\"%s\")"
" will be added instead.\n", agmt_get_long_name(prp->agmt),
slapi_sdn_get_dn(tombstone_dn), new_dn_string);
@@ -1259,8 +1259,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: windows_replay_add: Cannot convert entry to LDAPMods.\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "process_replay_add - %s - Cannot convert entry to LDAPMods.\n",
agmt_get_long_name(prp->agmt));
return_value = CONN_LOCAL_ERROR;
}
@@ -1299,8 +1299,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: windows_replay_add: Cannot replay add operation.\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "process_replay_add - %s: Cannot replay add operation.\n",
agmt_get_long_name(prp->agmt));
}
ldap_mods_free(entryattrs, 1);
@@ -1308,8 +1308,8 @@ process_replay_add(Private_Repl_Protocol *prp, Slapi_Entry *add_entry, Slapi_Ent
}
} else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
- "%s: process_replay_add: failed to create mapped entry dn=\"%s\"\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "process_replay_add - %s - Failed to create mapped entry dn=\"%s\"\n",
agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(remote_dn));
}
}
@@ -1366,8 +1366,8 @@ process_replay_rename(Private_Repl_Protocol *prp,
const subtreePair* sp = NULL;
if (NULL == local_origsdn || NULL == local_newentry) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
- "process_replay_rename: %s is empty\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "process_replay_rename - %s is empty\n",
(NULL==local_origsdn)?"local sdn":"local entry");
goto bail;
}
@@ -1383,8 +1383,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "process_replay_rename: local subtree \"%s\" or "
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "process_replay_rename - local subtree \"%s\" or "
"remote subtree \"%s\" and "
"subtree_pairs are empty\n",
local_subtree?local_subtree:"empty",
@@ -1412,8 +1412,8 @@ process_replay_rename(Private_Repl_Protocol *prp,
p = strstr(norm_newparent, local_subtree);
}
if (NULL == p) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
- "process_replay_rename: new superior \"%s\" is not "
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "process_replay_rename - new superior \"%s\" is not "
"in the local subtree \"%s\"\n",
norm_newparent, local_subtree);
goto bail; /* not in the subtree */
@@ -1440,8 +1440,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "process_replay_rename: local entry \"%s\" has no "
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "process_replay_rename - local entry \"%s\" has no "
"ntUserDomainId\n",
slapi_entry_get_dn_const(local_newentry));
goto bail;
@@ -1499,8 +1499,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_replay_rename: renaming %s to %s,%s; "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "process_replay_rename - %s: Renaming %s to %s,%s; "
"set deleteoldrdn to 1 "
"since AD does not allow old RDN left\n",
agmt_get_long_name(prp->agmt), remote_dn,
@@ -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, LOG_DEBUG, "=> windows_replay_update\n", 0, 0, 0 );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_replay_update\n");
local_dn = slapi_sdn_dup( op->target_address.sdn );
@@ -1569,8 +1569,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: windows_replay_update: failed to fetch local entry "
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_replay_update - %s - Failed to fetch local entry "
"for %s operation dn=\"%s\"\n",
agmt_get_long_name(prp->agmt),
op2string(op->operation_type),
@@ -1583,14 +1583,14 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: windows_replay_update: failed to fetch local entry for %s operation dn=\"%s\"\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_replay_update - %s - 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_replay_update: Looking at %s operation local dn=\"%s\" (%s)\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_replay_update - %s - Looking at %s operation local dn=\"%s\" (%s)\n",
agmt_get_long_name(prp->agmt),
op2string(op->operation_type),
REPL_GET_DN(&op->target_address), "ours");
@@ -1608,8 +1608,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_replay_update: Looking at %s operation local dn=\"%s\" (%s,%s,%s)\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_replay_update - %s -Looking at %s operation local dn=\"%s\" (%s,%s,%s)\n",
agmt_get_long_name(prp->agmt),
op2string(op->operation_type),
REPL_GET_DN(&op->target_address), is_ours ? "ours" : "not ours",
@@ -1621,8 +1621,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: windows_replay_update: failed map dn for %s operation dn=\"%s\" "
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_replay_update - %s - Failed map dn for %s operation dn=\"%s\" "
"rc=%d remote_dn = [%s]\n",
agmt_get_long_name(prp->agmt),
op2string(op->operation_type),
@@ -1630,8 +1630,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_replay_update: Processing %s operation local dn=\"%s\" remote dn=\"%s\"\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "Windows_replay_update - %s - Processing %s operation local dn=\"%s\" remote dn=\"%s\"\n",
agmt_get_long_name(prp->agmt),
op2string(op->operation_type),
REPL_GET_DN(&op->target_address), slapi_sdn_get_dn(remote_dn));
@@ -1655,8 +1655,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_replay_update: "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_replay_update - %s - "
"The modify operation added the sync objectclass and attribute, so "
"the entry was added to windows - result [%d]\n",
agmt_get_long_name(prp->agmt), return_value);
@@ -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, LOG_DEBUG, windows_repl_plugin_name, "%s: renaming remote entry \"%s\" with new RDN of \"%s\"\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "windows_replay_update - %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, LOG_DEBUG, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
"dump mods for replay update:\n");
for(i=0;mapped_mods[i];i++)
{
@@ -1770,20 +1770,20 @@ bail_modify:
if (delete_remote_entry_allowed(local_entry))
{
if (missing_entry) {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_replay_update: remote entry doesn't exist. "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_replay_update - %s - 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_replay_update: deleted remote entry, dn=\"%s\", result=%d\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_replay_update - %s - 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_replay_update: delete not allowed on remote entry, dn=\"%s\"\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_replay_update - %s - Delete not allowed on remote entry, dn=\"%s\"\n",
agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(remote_dn));
}
break;
@@ -1811,7 +1811,7 @@ bail_modify:
break;
}
default:
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name, "%s: replay_update: Unknown "
+ slapi_log_error(SLAPI_LOG_WARNING, windows_repl_plugin_name, "windows_replay_update - %s: Unknown "
"operation type %lu found in changelog - skipping change.\n",
agmt_get_long_name(prp->agmt), op->operation_type);
}
@@ -1838,8 +1838,8 @@ bail_modify:
if (return_value)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_replay_update: update password returned %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_replay_update - %s - Update password returned %d\n",
agmt_get_long_name(prp->agmt), return_value );
}
}
@@ -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, LOG_DEBUG, "=> windows_create_remote_entry\n", 0, 0, 0 );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_create_remote_entry\n");
if (NULL == password) {
retval = LDAP_PARAM_ERROR;
@@ -2128,8 +2128,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_create_remote_entry: "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_create_remote_entry - %s - "
"Trimming initials attribute to %d characters.\n",
agmt_get_long_name(prp->agmt), AD_INITIALS_LENGTH);
}
@@ -2211,16 +2211,16 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_create_remote_entry: "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_create_remote_entry %s - "
"Password is already hashed. Not syncing.\n",
agmt_get_long_name(prp->agmt));
}
}
if ((rc && (LDAP_INVALID_CREDENTIALS != rc)) ||
(NULL == password_value)) {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_create_remote_entry: "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_create_remote_entry - %s - "
"Failed to retrieve clear text password. "
"Not syncing.\n",
agmt_get_long_name(prp->agmt));
@@ -2245,16 +2245,16 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_create_remote_entry: "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_create_remote_entry - %s - "
"Password is already hashed. Not syncing.\n",
agmt_get_long_name(prp->agmt));
}
slapi_ch_free_string(&password_value);
}
if ((rc && (LDAP_INVALID_CREDENTIALS != rc)) || (NULL == *password)) {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_create_remote_entry: "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_create_remote_entry - %s - "
"Failed to retrieve clear text password. "
"Not syncing.\n",
agmt_get_long_name(prp->agmt));
@@ -2286,7 +2286,7 @@ error:
{
windows_dump_entry("Created new remote entry:\n",new_entry);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_create_remote_entry: %d\n", retval, 0, 0 );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_create_remote_entry: %d\n", retval);
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, LOG_DEBUG, "=> windows_entry_already_exists\n", 0, 0, 0 );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_entry_already_exists\n");
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, LOG_DEBUG, "<= windows_entry_already_exists\n", 0, 0, 0 );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_entry_already_exists\n");
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, LOG_DEBUG, "=> windows_delete_local_entry\n", 0, 0, 0 );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_delete_local_entry\n");
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);
@@ -2335,10 +2335,10 @@ windows_delete_local_entry(Slapi_DN *sdn){
slapi_pblock_destroy(pb);
if (return_value) {
- 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);
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_delete_local_entry - 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 );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_delete_local_entry: %d\n", return_value);
return return_value;
}
@@ -2363,16 +2363,16 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: mod_already_made: "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "mod_already_made - %s - "
"modify operation is null - skipping.\n",
agmt_get_long_name(prp->agmt));
return 1;
}
if (!ad_entry) { /* mods cannot already have been made */
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: mod_already_made: "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "mod_already_made - %s - "
"AD entry not found\n",
agmt_get_long_name(prp->agmt));
return retval; /* just allow - will probably fail later if entry really doesn't exist */
@@ -2387,8 +2387,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: mod_already_made: "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "mod_already_made - %s - "
"remote entry attr [%s] already has value [%s] - will not send.\n",
agmt_get_long_name(prp->agmt), type,
slapi_value_get_string(sv));
@@ -2398,8 +2398,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: mod_already_made: "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "mod_already_made - %s - "
"remote entry attr [%s] had all mod values removed - will not send.\n",
agmt_get_long_name(prp->agmt), type);
retval = 1;
@@ -2409,8 +2409,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: mod_already_made: "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "mod_already_made - %s - "
"remote entry attr [%s] already deleted - will not send.\n",
agmt_get_long_name(prp->agmt), type);
retval = 1;
@@ -2422,8 +2422,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: mod_already_made: "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "mod_already_made - %s - "
"remote entry attr [%s] already deleted value [%s] - will not send.\n",
agmt_get_long_name(prp->agmt), type,
slapi_value_get_string(sv));
@@ -2433,16 +2433,16 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: mod_already_made: "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "mod_already_made - %s - "
"remote entry attr [%s] had all mod values removed - will not send.\n",
agmt_get_long_name(prp->agmt), type);
retval = 1;
}
} /* else if no values specified, this means delete the attribute */
} else { /* allow this mod */
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: mod_already_made: "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "mod_already_made - %s - "
"skipping mod op [%d]\n",
agmt_get_long_name(prp->agmt), op);
}
@@ -2489,8 +2489,8 @@ windows_get_superior_change(Private_Repl_Protocol *prp,
const subtreePair* lsp = NULL;
if (NULL == newsuperior) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
- "windows_get_superior_change: newsuperior is NULL\n");
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_get_superior_change - newsuperior is NULL\n");
goto bail;
}
@@ -2508,8 +2508,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "windows_get_superior_change: local subtree \"%s\" or "
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_get_superior_change - local subtree \"%s\" or "
"remote subtree \"%s\" and "
"subtree_pairs are empty\n",
local_subtree?local_subtree:"empty",
@@ -2520,8 +2520,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "windows_get_superior_change: local dn \"%s\" or "
+ slapi_log_error(SLAPI_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");
goto bail;
@@ -2530,8 +2530,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "windows_get_superior_change: local parent dn \"%s\" or "
+ slapi_log_error(SLAPI_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",
mapped_pndn?mapped_pndn:"empty");
@@ -2604,13 +2604,13 @@ windows_get_superior_change(Private_Repl_Protocol *prp,
rc = 0;
}
} else {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "windows_get_superior_change: local parent \"%s\" is not in "
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, windows_repl_plugin_name,
- "windows_get_superior_change: mapped parent \"%s\" is not in "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_get_superior_change - mapped parent \"%s\" is not in "
"DirectoryReplicaSubtree \"%s\"\n", mapped_pndn, local_subtree);
}
bail:
@@ -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, LOG_DEBUG, "=> windows_check_mods_for_rdn_change\n", 0, 0, 0 );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_check_mods_for_rdn_change\n");
/* 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, LOG_DEBUG, "<= windows_check_mods_for_rdn_change: %d\n", ret, 0, 0 );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_check_mods_for_rdn_change: %d\n", ret);
return ret;
}
@@ -2809,17 +2809,17 @@ windows_map_mods_for_replay(Private_Repl_Protocol *prp,
const Slapi_DN *windows_subtree = NULL;
const subtreePair* subtree_pairs = NULL;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_map_mods_for_replay\n", 0, 0, 0 );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_map_mods_for_replay\n");
if (NULL == prp) {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
- "<= windows_map_mods_for_replay; NULL protocol; NOOP\n", 0, 0, 0);
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name,
+ "<= windows_map_mods_for_replay; NULL protocol; NOOP\n");
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, LOG_DEBUG,
- "<= windows_map_mods_for_replay; NULL agreement subtree; NOOP\n", 0, 0, 0);
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name,
+ "<= windows_map_mods_for_replay; NULL agreement subtree; NOOP\n");
return;
}
is_nt4 = windows_private_get_isnt4(prp->agmt);
@@ -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, LOG_DEBUG, windows_repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, 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,8 +3034,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_map_mods_for_replay: "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_map_mods_for_replay - %s - "
"Password is already hashed. Not syncing.\n",
agmt_get_long_name(prp->agmt));
}
@@ -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, LOG_DEBUG, "<= windows_map_mods_for_replay\n", 0, 0, 0 );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_map_mods_for_replay\n");
}
@@ -3544,8 +3544,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_windows_tombstone_dn: arg dn or exists is NULL.\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_windows_tombstone_dn - %s - arg dn or exists is NULL.\n",
agmt_get_long_name(prp->agmt));
return 1;
}
@@ -3586,8 +3586,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_windows_tombstone_dn: Failed to map dn=\"%s\" "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_windows_tombstone_dn - %s - Failed to map dn=\"%s\" "
"to windows tombstone dn.\n", agmt_get_long_name(prp->agmt),
slapi_entry_get_dn(e));
rc = 1;
@@ -3755,8 +3755,8 @@ map_entry_dn_outbound(Slapi_Entry *e,
Slapi_Entry *remote_entry = NULL;
if (NULL == e) {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_outbound: NULL entry.\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_outbound - %s - NULL entry.\n",
agmt_get_long_name(prp->agmt));
return -1;
}
@@ -3771,8 +3771,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_outbound: arg dn or missing_entry is NULL.\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_outbound - %s - arg dn or missing_entry is NULL.\n",
agmt_get_long_name(prp->agmt));
return -1;
}
@@ -3792,15 +3792,15 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_outbound: Failed to get the AD suffix of %s.\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_outbound - %s - 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_outbound: looking for AD entry for DS "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_outbound - %s - Looking for AD entry for DS "
"dn=\"%s\" guid=\"%s\"\n",
agmt_get_long_name(prp->agmt),
slapi_entry_get_dn_const(e),
@@ -3810,8 +3810,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_outbound: unable to make dn from guid %s.\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_outbound - %s - unable to make dn from guid %s.\n",
agmt_get_long_name(prp->agmt), guid);
retval = -1;
goto done;
@@ -3821,8 +3821,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_outbound: return code %d from search "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_outbound - %s - Return code %d from search "
"for AD entry dn=\"%s\" or dn=\"%s\"\n",
agmt_get_long_name(prp->agmt), rc,
slapi_sdn_get_dn(new_dn),
@@ -3836,8 +3836,8 @@ map_entry_dn_outbound(Slapi_Entry *e,
retval = -1;
}
} else {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_outbound: entry not found - rc %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_outbound - %s - 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
* Windows 2000 Server since tombstone reanimation is not supported.
@@ -3879,8 +3879,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_outbound: looking for AD entry for DS "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_outbound - %s - Looking for AD entry for DS "
"dn=\"%s\" username=\"%s\"\n",
agmt_get_long_name(prp->agmt),
slapi_entry_get_dn_const(e),
@@ -3892,13 +3892,13 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_outbound: found AD entry dn=\"%s\"\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_outbound - %s - 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_outbound: entry not found - rc %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_outbound - %s - entry not found - rc %d\n",
agmt_get_long_name(prp->agmt), retval);
if (0 == retval)
{
@@ -3949,8 +3949,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: map_entry_dn_outbound: failed to fetch entry from AD: dn=\"%s\", err=%d\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "map_entry_dn_outbound - %s - 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);
retval = -1;
@@ -3995,8 +3995,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_tombstone_dn_inbound: arg dn is NULL.\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_tombstone_dn_inbound - %s - arg dn is NULL.\n",
agmt_get_long_name(ra));
return -1;
}
@@ -4071,8 +4071,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_inbound: entry is NULL.\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_inbound - %s - entry is NULL.\n",
agmt_get_long_name(ra));
return -1;
}
@@ -4081,8 +4081,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_inbound: arg dn is NULL.\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_inbound - %s - arg dn is NULL.\n",
agmt_get_long_name(ra));
return -1;
}
@@ -4090,8 +4090,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_inbound: looking for local entry "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_inbound - %s - Looking for local entry "
"matching AD entry [%s]\n",
agmt_get_long_name(ra),
slapi_entry_get_dn_const(e));
@@ -4099,16 +4099,16 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_inbound: looking for local entry "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_inbound - %s - Looking for local entry "
"by guid [%s]\n",
agmt_get_long_name(ra),
guid);
retval = find_entry_by_guid(guid,&matching_entry,ra);
if (retval)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_inbound: problem looking for guid: %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_inbound - %s - Problem looking for guid: %d\n",
agmt_get_long_name(ra), retval);
if (ENTRY_NOTFOUND == retval)
{
@@ -4126,16 +4126,16 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_inbound: found local entry [%s]\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_inbound - %s- found local entry [%s]\n",
agmt_get_long_name(ra),
slapi_sdn_get_dn(new_dn));
}
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_inbound: AD entry has no guid!\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_inbound - %s - AD entry has no guid!\n",
agmt_get_long_name(ra));
}
}
@@ -4146,16 +4146,16 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_inbound: looking for local entry "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_inbound - %s - Looking for local entry "
"by uid [%s]\n",
agmt_get_long_name(ra),
username);
retval = find_entry_by_username(username,&matching_entry,ra);
if (retval)
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_inbound: problem looking for username: %d\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_inbound - %s - problem looking for username: %d\n",
agmt_get_long_name(ra), retval);
if (ENTRY_NOTFOUND == retval)
{
@@ -4173,16 +4173,16 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_inbound: found local entry by name [%s]\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_inbound - %s - found local entry by name [%s]\n",
agmt_get_long_name(ra),
slapi_sdn_get_dn(new_dn));
}
}
else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_inbound: AD entry has no username!\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_inbound - %s - AD entry has no username!\n",
agmt_get_long_name(ra));
}
}
@@ -4216,8 +4216,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: map_entry_dn_inbound: Failed to retrieve local suffix from %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "map_entry_dn_inbound - %s - Failed to retrieve local suffix from %s\n",
agmt_get_long_name(ra), slapi_sdn_get_dn(remote_sdn));
goto error;
}
@@ -4295,8 +4295,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "failed to find entry in is_subject_of_agreement_local\n");
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "is_subject_of_agreement_local - Failed to find local entry\n");
goto error;
}
@@ -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, LOG_DEBUG, "=> windows_create_local_entry\n", 0, 0, 0 );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_create_local_entry\n");
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;
@@ -4549,8 +4549,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "extract_guid_from_entry entry %s failed to extract the guid\n", slapi_sdn_get_dn(local_sdn));
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_create_local_entry - 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,8 +4592,9 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "add operation of entry %s returned: %d\n", slapi_sdn_get_dn(local_sdn), retval);
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_create_local_entry - add operation of entry %s returned: %d\n",
+ slapi_sdn_get_dn(local_sdn), retval);
}
error:
slapi_entry_free(local_entry);
@@ -4606,7 +4607,7 @@ error:
{
slapi_ch_free_string(&username);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_create_local_entry\n", 0, 0, 0 );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_create_local_entry\n");
return retval;
}
@@ -4676,13 +4677,13 @@ 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, LOG_DEBUG, "=> windows_generate_update_mods\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> windows_generate_update_mods\n", 0, 0, 0 );
*do_modify = 0;
if (!remote_entry || !local_entry) {
- 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] "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_generate_update_mods - %s - 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",
local_entry ? slapi_entry_get_dn_const(local_entry) : "NULL");
@@ -4781,8 +4782,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "windows_generate_update_mods: %s, %s : values are different\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_generate_update_mods - %s, %s : values are different\n",
slapi_entry_get_dn_const(local_entry), local_type);
if (to_windows && ((0 == slapi_attr_type_cmp(local_type, "streetAddress", SLAPI_TYPE_CMP_SUBTYPE)) ||
@@ -4823,8 +4824,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_generate_update_mods: "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_generate_update_mods - %s - "
"Trimming initials attribute to %d characters.\n",
agmt_get_long_name(prp->agmt), AD_INITIALS_LENGTH);
}
@@ -4838,8 +4839,8 @@ windows_generate_update_mods(Private_Repl_Protocol *prp,
*do_modify = 1;
} else
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "windows_generate_update_mods: %s, %s : values are equal\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_generate_update_mods - %s, %s : values are equal\n",
slapi_entry_get_dn_const(local_entry), local_type);
}
} else {
@@ -4870,8 +4871,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "windows_generate_update_mods: no restricted local values found for "
+ slapi_log_error(SLAPI_LOG_REPL, 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",
local_type,
@@ -4882,8 +4883,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "windows_generate_update_mods: no local values found for "
+ slapi_log_error(SLAPI_LOG_REPL, 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",
local_type,
@@ -4898,8 +4899,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "windows_generate_update_mods: could not map the values in "
+ slapi_log_error(SLAPI_LOG_REPL, 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",
local_type,
@@ -4915,8 +4916,8 @@ windows_generate_update_mods(Private_Repl_Protocol *prp,
{ /* !is_present_local || is_guid */
if (!is_present_local)
{
- 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);
+ slapi_log_error(SLAPI_LOG_REPL, 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,8 +4981,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_generate_update_mods: "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_generate_update_mods - %s - "
"Trimming initials attribute to %d characters.\n",
agmt_get_long_name(prp->agmt), AD_INITIALS_LENGTH);
}
@@ -5046,8 +5047,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "windows_generate_update_mods: deleting %s attribute from local entry\n", local_type);
+ slapi_log_error(SLAPI_LOG_REPL, 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.
* othewise delete all attr. */
@@ -5149,7 +5150,7 @@ windows_generate_update_mods(Private_Repl_Protocol *prp,
slapi_mods_dump(smods,"windows sync");
}
bail:
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_generate_update_mods: %d\n", retval, 0, 0 );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_generate_update_mods: %d\n", retval);
return retval;
}
@@ -5168,8 +5169,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "windows_update_remote_entry: modifying entry %s\n", dn);
+ slapi_log_error(SLAPI_LOG_REPL, 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,8 +5203,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "no mods generated for remote entry: %s\n", dn);
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_update_remote_entry - no mods generated for remote entry: %s\n", dn);
}
slapi_mods_done(&smods);
@@ -5243,8 +5244,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "unable to map remote entry to local DN\n");
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_update_local_entry - Unable to map remote entry to local DN\n");
return retval;
}
@@ -5276,8 +5277,8 @@ windows_update_local_entry(Private_Repl_Protocol *prp,Slapi_Entry *remote_entry,
}
/* rename entry */
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name, "renaming entry \"%s\" - "
- "(newrdn: \"%s\", newsuperior: \"%s\"\n", newdn,
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "windows_update_local_entry - "
+ "renaming entry \"%s\" - (newrdn: \"%s\", newsuperior: \"%s\"\n", newdn,
newrdn ? newrdn:"NULL", newsuperior ? newsuperior:"NULL");
slapi_sdn_init_ndn_byref(&newsuperior_sdn, newsuperior);
slapi_rename_internal_set_pb_ext (pb,
@@ -5290,8 +5291,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "failed to rename entry (\"%s\"); LDAP error - %d "
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_update_local_entry - Failed to rename entry (\"%s\"); LDAP error - %d "
"(newrdn: \"%s\", newsuperior: \"%s\"\n", newdn, retval,
newrdn ? newrdn:"NULL", newsuperior ? newsuperior:"NULL");
slapi_ch_free_string(&newsuperior);
@@ -5307,8 +5308,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "failed to get local entry \"%s\" after rename\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_update_local_entry - Failed to get local entry \"%s\" after rename\n",
slapi_sdn_get_ndn(mapped_sdn));
local_entry = orig_local_entry;
orig_local_entry = NULL;
@@ -5320,8 +5321,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "failed to get local subtree from agreement\n");
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_update_local_entry - Failed to get local subtree from agreement\n");
local_entry = orig_local_entry;
orig_local_entry = NULL;
goto bail;
@@ -5404,9 +5405,9 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "windows_update_local_entry: "
- "failed to modify entry %s replacing %s with %s "
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_update_local_entry - "
+ "Failed to modify entry %s replacing %s with %s "
"- error %d:%s\n",
slapi_entry_get_dn(*ep), prev_member, new_member,
retval, ldap_err2string(retval));
@@ -5433,8 +5434,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "modifying entry: %s\n", dn);
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_update_local_entry - Modifying entry: %s\n", dn);
slapi_modify_internal_set_pb_ext (pb,
slapi_entry_get_sdn(local_entry),
slapi_mods_get_ldapmods_byref(&smods), NULL, NULL,
@@ -5456,22 +5457,22 @@ windows_update_local_entry(Private_Repl_Protocol *prp,Slapi_Entry *remote_entry,
}
if (rc)
{
- 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",
+ slapi_log_error(SLAPI_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, LOG_ERR, windows_repl_plugin_name,
- "failed to make pb in windows_update_local_entry\n");
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_update_local_entry - Failed to make pb\n");
}
} else
{
const char *dn = slapi_entry_get_dn_const(local_entry);
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "no mods generated for local entry: %s\n", dn);
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_update_local_entry - No mods generated for local entry: %s\n", dn);
}
bail:
@@ -5518,7 +5519,8 @@ 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, LOG_ERR, 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_ERR, windows_repl_plugin_name,"windows_process_total_add - %s - "
+ "Cannot convert entry to LDAPMods.\n",agmt_get_long_name(prp->agmt));
retval = CONN_LOCAL_ERROR;
}
else
@@ -5554,7 +5556,8 @@ 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, LOG_ERR, 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_ERR, windows_repl_plugin_name,"windows_process_total_add - %s - "
+ "Cannot replay add operation.\n",agmt_get_long_name(prp->agmt));
}
ldap_mods_free(entryattrs, 1);
entryattrs = NULL;
@@ -5563,8 +5566,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: windows_process_total_add: "
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_process_total_add -%s - "
"Creating AD entry \"%s\" from DS entry \"%s\" failed. "
"AD reserves the account name. Ignoring the error...\n",
agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(remote_dn),
@@ -5616,16 +5619,16 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_process_total_entry: Looking dn=\"%s\" (%s)\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_process_total_entry - %s - 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)
{
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, LOG_ERR, windows_repl_plugin_name,
- "%s: windows_process_total_entry: failed map dn for total update dn=\"%s\"\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_process_total_entry - %s - Failed map dn for total update dn=\"%s\"\n",
agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(local_dn));
goto error;
}
@@ -5659,8 +5662,9 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "failed to get local subtree from agreement\n");
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_search_local_entry_by_uniqueid - "
+ "Failed to get local subtree from agreement\n");
return LDAP_PARAM_ERROR;
}
local_subtree_sdn = local_subtree;
@@ -5782,8 +5786,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_unsync_entry: removing objectclass %s from %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_unsync_entry - %s - 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,8 +5798,8 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_unsync_entry: removing attribute %s from %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_unsync_entry - %s - Removing attribute %s from %s\n",
agmt_get_long_name(prp->agmt), type,
slapi_entry_get_dn_const(e));
}
@@ -5806,8 +5810,8 @@ windows_unsync_entry(Private_Repl_Protocol *prp, Slapi_Entry *e)
if (!pb) {
goto done;
}
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_unsync_entry: modifying entry %s\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_unsync_entry - %s - 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),
slapi_mods_get_ldapmods_byref(smods), NULL, NULL,
@@ -5815,8 +5819,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "%s: windows_unsync_entry: failed to modify entry %s - error %d:%s\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_unsync_entry - %s - 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 +5856,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, LOG_DEBUG, 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, windows_repl_plugin_name,"windows_process_dirsync_entry - %s - Failed to map tombstone dn.\n",agmt_get_long_name(prp->agmt));
}
} else
{
@@ -5901,15 +5905,15 @@ retry:
remote_entry = NULL;
} else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, windows_repl_plugin_name,
- "%s: windows_process_dirsync_entry: failed to fetch inbound entry %s.\n",
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_process_dirsync_entry - %s - 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_process_dirsync_entry: failed to update inbound entry for %s.\n",
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_process_dirsync_entry - %s - Failed to update inbound entry for %s.\n",
agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(slapi_entry_get_sdn_const(e)));
}
} else
@@ -5932,8 +5936,9 @@ retry:
windows_create_local_entry(prp, e, local_sdn);
} else
{
- 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)));
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,"windows_process_dirsync_entry - %s -"
+ " Not allowed to add entry %s.\n",agmt_get_long_name(prp->agmt),
+ slapi_sdn_get_dn(slapi_entry_get_sdn_const(e)));
}
}
slapi_sdn_free(&local_sdn);
@@ -5960,8 +5965,8 @@ retry:
}
} else {
/* We should have been able to map the DN, so this is an error */
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_process_dirsync_entry: failed to map "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_process_dirsync_entry - %s - Failed to map "
"inbound entry %s - rc is %d dn is [%s].\n",
agmt_get_long_name(prp->agmt),
slapi_sdn_get_dn(slapi_entry_get_sdn_const(e)),
@@ -5984,16 +5989,16 @@ 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_process_dirsync_entry: deleting out of "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_process_dirsync_entry - %s - deleting out of "
"scope entry %s\n", agmt_get_long_name(prp->agmt),
slapi_sdn_get_dn(local_sdn));
rc = windows_delete_local_entry(local_sdn);
} 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, LOG_DEBUG, windows_repl_plugin_name,
- "%s: windows_process_dirsync_entry: windows "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "windows_process_dirsync_entry - %s - windows "
"inbound entry %s has the same name as local "
"entry %s but the windows entry is out of the "
"scope of the sync subtree [%s] - if you want "
@@ -6022,7 +6027,7 @@ windows_dirsync_inc_run(Private_Repl_Protocol *prp)
int rc = 0;
int done = 0;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_dirsync_inc_run\n", 0, 0, 0 );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_dirsync_inc_run\n");
while (!done) {
Slapi_Entry *e = NULL;
@@ -6030,8 +6035,8 @@ 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, LOG_ERR, windows_repl_plugin_name,
- "failed to send dirsync search request: %d\n", rc);
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ "windows_dirsync_inc_run - Failed to send dirsync search request: %d\n", rc);
goto error;
}
@@ -6049,6 +6054,6 @@ windows_dirsync_inc_run(Private_Repl_Protocol *prp)
}
} /* While !done */
error:
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_dirsync_inc_run\n", 0, 0, 0 );
+slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_dirsync_inc_run\n");
}
diff --git a/ldap/servers/plugins/replication/windows_tot_protocol.c b/ldap/servers/plugins/replication/windows_tot_protocol.c
index 7194bc6..ffdf4a5 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, LOG_DEBUG, "=> windows_tot_run\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> 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, LOG_ERR, windows_repl_plugin_name, "Beginning total update of replica "
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name, "windows_tot_run - 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, LOG_DEBUG, windows_repl_plugin_name, "%s: windows_tot_run: "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "windows_tot_run - %s - "
"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, LOG_ERR, windows_repl_plugin_name, "Finished total update of replica "
+ slapi_log_error(SLAPI_LOG_ERR, windows_repl_plugin_name, "windows_tot_run - 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,8 @@ windows_tot_run(Private_Repl_Protocol *prp)
*/
if (slapi_is_loglevel_set(SLAPI_LOG_REPL))
{
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, NULL, "total update setting consumer RUV:\n");
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "windows_tot_run - "
+ "Total update setting consumer RUV:\n");
ruv_dump (starting_ruv, "consumer", NULL);
}
agmt_set_consumer_ruv(prp->agmt, starting_ruv );
@@ -270,7 +271,7 @@ done:
prp->stopped = 1;
ruv_destroy(&ruv);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_tot_run\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_tot_run\n" );
}
static int
@@ -280,7 +281,7 @@ windows_tot_stop(Private_Repl_Protocol *prp)
int seconds = 600;
PRIntervalTime start, maxwait, now;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_tot_stop\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_tot_stop\n" );
prp->terminate = 1;
maxwait = PR_SecondsToInterval(seconds);
@@ -294,8 +295,8 @@ windows_tot_stop(Private_Repl_Protocol *prp)
if (!prp->stopped)
{
/* Isn't listening. Disconnect from the replica. */
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, windows_repl_plugin_name, "windows_tot_run: "
- "protocol not stopped after waiting for %d seconds "
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, "windows_tot_stop - "
+ "Protocol not stopped after waiting for %d seconds "
"for agreement %s\n", PR_IntervalToSeconds(now-start),
agmt_get_long_name(prp->agmt));
windows_conn_disconnect(prp->conn);
@@ -306,7 +307,7 @@ windows_tot_stop(Private_Repl_Protocol *prp)
return_value = 0;
}
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_tot_stop\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_tot_stop\n" );
return return_value;
}
@@ -317,8 +318,8 @@ static int
windows_tot_status(Private_Repl_Protocol *prp)
{
int return_value = 0;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_tot_status\n" );
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_tot_status\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_tot_status\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_tot_status\n" );
return return_value;
}
@@ -327,8 +328,8 @@ windows_tot_status(Private_Repl_Protocol *prp)
static void
windows_tot_noop(Private_Repl_Protocol *prp)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_tot_noop\n" );
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_tot_noop\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> windows_tot_noop\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_tot_noop\n" );
/* noop */
}
@@ -339,7 +340,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, LOG_DEBUG, "=> Windows_Tot_Protocol_new\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> Windows_Tot_Protocol_new\n" );
prp->delete = windows_tot_delete;
prp->run = windows_tot_run;
@@ -368,46 +369,46 @@ Windows_Tot_Protocol_new(Repl_Protocol *rp)
rip->rp = rp;
prp->private = (void *)rip;
prp->replica_acquired = PR_FALSE;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= Windows_Tot_Protocol_new\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= Windows_Tot_Protocol_new\n" );
return prp;
loser:
windows_tot_delete(&prp);
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= Windows_Tot_Protocol_new - loser\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= Windows_Tot_Protocol_new - Failed\n" );
return NULL;
}
static void
windows_tot_delete(Private_Repl_Protocol **prpp)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> windows_tot_delete\n" );
-
- /* First, stop the protocol if it isn't already stopped */
- if (!(*prpp)->stopped) {
- (*prpp)->stopped = 1;
- (*prpp)->stop(*prpp);
- }
- /* Then, delete all resources used by the protocol */
- if ((*prpp)->lock) {
- PR_DestroyLock((*prpp)->lock);
- (*prpp)->lock = NULL;
- }
- if ((*prpp)->cvar) {
- PR_DestroyCondVar((*prpp)->cvar);
- (*prpp)->cvar = NULL;
- }
- slapi_ch_free((void **)&(*prpp)->private);
- slapi_ch_free((void **)prpp);
-
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= windows_tot_delete\n" );
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "=> windows_tot_delete\n" );
+
+ /* First, stop the protocol if it isn't already stopped */
+ if (!(*prpp)->stopped) {
+ (*prpp)->stopped = 1;
+ (*prpp)->stop(*prpp);
+ }
+ /* Then, delete all resources used by the protocol */
+ if ((*prpp)->lock) {
+ PR_DestroyLock((*prpp)->lock);
+ (*prpp)->lock = NULL;
+ }
+ if ((*prpp)->cvar) {
+ PR_DestroyCondVar((*prpp)->cvar);
+ (*prpp)->cvar = NULL;
+ }
+ slapi_ch_free((void **)&(*prpp)->private);
+ slapi_ch_free((void **)prpp);
+
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_tot_delete\n" );
}
static
void get_result (int rc, void *cb_data)
{
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> get_result\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> get_result\n" );
PR_ASSERT (cb_data);
((callback_data*)cb_data)->rc = rc;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= get_result\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= get_result\n" );
}
static
@@ -417,7 +418,7 @@ int send_entry (Slapi_Entry *e, void *cb_data)
Private_Repl_Protocol *prp;
unsigned long *num_entriesp;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "=> send_entry\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "=> send_entry\n" );
PR_ASSERT (cb_data);
@@ -430,13 +431,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, LOG_DEBUG, "<= send_entry\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= send_entry\n" );
return -1;
}
/* skip ruv tombstone - not relvant to Active Directory */
if (is_ruv_tombstone_entry (e)) {
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= send_entry\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= send_entry\n" );
return 0;
}
@@ -445,7 +446,7 @@ int send_entry (Slapi_Entry *e, void *cb_data)
(*num_entriesp)++;
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "<= send_entry\n" );
+ slapi_log_error(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= 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 79dcc22..977f29b 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, LOG_DEBUG, RETROCL_PLUGIN_NAME, "retrocl_postop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, RETROCL_PLUGIN_NAME, "retrocl_internalpostop_init failed\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME, "retrocl_internalpostop_init failed\n" );
rc= -1;
}
@@ -207,8 +207,8 @@ 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, LOG_ERR, RETROCL_PLUGIN_NAME,
- "Mapping tree select failed (%d) %s.\n", err, errbuf);
+ slapi_log_error(SLAPI_LOG_ERR, RETROCL_PLUGIN_NAME,
+ "retrocl_select_backend - Mapping tree select failed (%d) %s.\n", err, errbuf);
/* could not find the backend for cn=changelog, either because
* it doesn't exist
@@ -315,14 +315,16 @@ 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, LOG_ERR, RETROCL_PLUGIN_NAME,
- "Successfully removed vulnerable legacy default aci \"%s\". "
+ slapi_log_error(SLAPI_LOG_NOTICE, RETROCL_PLUGIN_NAME,
+ "retrocl_remove_legacy_default_aci - "
+ "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, LOG_ERR, RETROCL_PLUGIN_NAME,
- "Failed to removed vulnerable legacy default aci (%s) error %d\n",
+ slapi_log_error(SLAPI_LOG_ERR, RETROCL_PLUGIN_NAME,
+ "retrocl_remove_legacy_default_aci - "
+ "Failed to removed vulnerable legacy default aci (%s) error %d\n",
RETROCL_ACL, rc);
}
slapi_pblock_destroy(mod_pb);
@@ -360,7 +362,7 @@ static int retrocl_start (Slapi_PBlock *pb)
rc = retrocl_select_backend();
if (rc != 0) {
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "Couldnt find backend, not trimming retro changelog (%d).\n",rc);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "retrocl_start - Couldnt find backend, not trimming retro changelog (%d).\n",rc);
return rc;
}
@@ -370,7 +372,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, LOG_ERR, RETROCL_PLUGIN_NAME, "Missing config entry.\n");
+ slapi_log_error(SLAPI_LOG_ERR, RETROCL_PLUGIN_NAME, "retrocl_start - Missing config entry.\n");
return -1;
}
@@ -381,8 +383,8 @@ 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, LOG_ERR, RETROCL_PLUGIN_NAME,
- "Invalid DN (%s) for exclude suffix.\n", values[i] );
+ slapi_log_error(SLAPI_LOG_ERR, RETROCL_PLUGIN_NAME,
+ "retrocl_start - Invalid DN (%s) for exclude suffix.\n", values[i] );
slapi_ch_array_free(values);
return -1;
}
@@ -401,8 +403,8 @@ 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, LOG_ERR, RETROCL_PLUGIN_NAME,
- "Invalid DN (%s) for include suffix.\n", values[i] );
+ slapi_log_error(SLAPI_LOG_ERR, RETROCL_PLUGIN_NAME,
+ "retrocl_start - Invalid DN (%s) for include suffix.\n", values[i] );
slapi_ch_array_free(values);
return -1;
}
@@ -426,8 +428,8 @@ 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, LOG_ERR, RETROCL_PLUGIN_NAME,
- "include suffix (%s) is also listed in exclude suffix list\n",
+ slapi_log_error(SLAPI_LOG_ERR, RETROCL_PLUGIN_NAME,
+ "retrocl_start - Include suffix (%s) is also listed in exclude suffix list\n",
slapi_sdn_get_dn(retrocl_includes[i]));
return -1;
}
@@ -443,8 +445,8 @@ 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, LOG_ERR, RETROCL_PLUGIN_NAME,
- "include suffix (%s) is a child of the exclude suffix(%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, RETROCL_PLUGIN_NAME,
+ "retrocl_start - 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]));
return -1;
@@ -460,10 +462,10 @@ static int retrocl_start (Slapi_PBlock *pb)
int n = 0;
int i = 0;
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME, "nsslapd-attribute:\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME, "retrocl_start - nsslapd-attribute:\n");
for (n=0; values && values[n]; n++) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME, " - %s\n", values[n]);
+ slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME, "retrocl_start - %s\n", values[n]);
}
retrocl_nattributes = n;
@@ -471,7 +473,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, LOG_DEBUG, RETROCL_PLUGIN_NAME, "Attributes:\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME, "retrocl_start - Attributes:\n");
for (i=0; i<n; i++) {
char *value = values[i];
@@ -482,7 +484,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, LOG_DEBUG, RETROCL_PLUGIN_NAME, " - %s\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME, " - %s\n",
retrocl_attributes[i]);
} else {
@@ -493,7 +495,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, LOG_DEBUG, RETROCL_PLUGIN_NAME, " - %s [%s]\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME, " - %s [%s]\n",
retrocl_attributes[i], retrocl_aliases[i]);
}
}
@@ -505,13 +507,13 @@ 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, LOG_DEBUG, RETROCL_PLUGIN_NAME,
- "Multiple values specified for attribute: nsslapd-log-deleted\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ "retrocl_start - 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, LOG_DEBUG, RETROCL_PLUGIN_NAME,
- "Invalid value (%s) specified for attribute: nsslapd-log-deleted\n", values[0]);
+ slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ "Iretrocl_start - nvalid 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 8d29165..e6a8849 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, LOG_DEBUG,"retrocl","Got changenumbers %lu and %lu\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN,"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, LOG_DEBUG,"retrocl","Refetched last changenumber = %lu \n",
+ slapi_log_error(SLAPI_LOG_PLUGIN,"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 740a2df..203fd7f 100644
--- a/ldap/servers/plugins/retrocl/retrocl_create.c
+++ b/ldap/servers/plugins/retrocl/retrocl_create.c
@@ -101,14 +101,15 @@ static int retrocl_create_be(const char *bedir)
slapi_pblock_destroy(pb);
if (rc == 0) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
"created changelog database node\n");
} else if (rc == LDAP_ALREADY_EXISTS) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
"changelog database node already existed\n");
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME, "Changelog LDBM backend could not be created (%d)\n", rc);
- return rc;
+ slapi_log_error(SLAPI_LOG_ERR, RETROCL_PLUGIN_NAME,
+ "Changelog LDBM backend could not be created (%d)\n", rc);
+ return rc;
}
@@ -152,14 +153,15 @@ static int retrocl_create_be(const char *bedir)
slapi_pblock_destroy(pb);
if (rc == 0) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
"created changenumber index node\n");
} else if (rc == LDAP_ALREADY_EXISTS) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
"changelog index node already existed\n");
} else {
- 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;
+ slapi_log_error(SLAPI_LOG_ERR, RETROCL_PLUGIN_NAME,
+ "Changelog LDBM backend changenumber index could not be created (%d)\n", rc);
+ return rc;
}
return rc;
@@ -196,7 +198,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, LOG_DEBUG, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
"retrocl_create_config: failed to normalize "
"mappingtree dn %s\n", RETROCL_MAPPINGTREE_DN);
return LDAP_PARAM_ERROR;
@@ -240,14 +242,15 @@ int retrocl_create_config(void)
slapi_pblock_destroy(pb);
if (rc == 0) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
- "created changelog mapping tree node\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ "created changelog mapping tree node\n");
} else if (rc == LDAP_ALREADY_EXISTS) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
- "changelog mapping tree node already existed\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
+ "changelog mapping tree node already existed\n");
} else {
- 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;
+ slapi_log_error(SLAPI_LOG_ERR, RETROCL_PLUGIN_NAME,
+ "cn=\"cn=changelog\",cn=mapping tree,cn=config could not be created (%d)\n", rc);
+ return rc;
}
retrocl_be_changelog = slapi_be_select_by_instance_name("changelog");
@@ -256,19 +259,17 @@ int retrocl_create_config(void)
/* This is not the nsslapd-changelogdir from cn=changelog4,cn=config */
char *bedir;
- bedir = retrocl_get_config_str(CONFIG_CHANGELOG_DIRECTORY_ATTRIBUTE);
-
- if (bedir == NULL) {
- /* none specified */
- }
-
- rc = retrocl_create_be(bedir);
- slapi_ch_free ((void **)&bedir);
- if (rc != LDAP_SUCCESS && rc != LDAP_ALREADY_EXISTS) {
- return rc;
- }
-
- retrocl_be_changelog = slapi_be_select_by_instance_name("changelog");
+ bedir = retrocl_get_config_str(CONFIG_CHANGELOG_DIRECTORY_ATTRIBUTE);
+ if (bedir == NULL) {
+ /* none specified */
+ }
+
+ rc = retrocl_create_be(bedir);
+ slapi_ch_free_string(&bedir);
+ if (rc != LDAP_SUCCESS && rc != LDAP_ALREADY_EXISTS) {
+ return rc;
+ }
+ retrocl_be_changelog = slapi_be_select_by_instance_name("changelog");
}
return LDAP_SUCCESS;
@@ -324,13 +325,14 @@ void retrocl_create_cle (void)
slapi_pblock_destroy(pb);
if (rc == 0) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
"created cn=changelog\n");
} else if (rc == LDAP_ALREADY_EXISTS) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
"cn=changelog already existed\n");
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME, "cn=changelog could not be created (%d)\n", rc);
+ slapi_log_error(SLAPI_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 f62574a..036e0c0 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, LOG_DEBUG, RETROCL_PLUGIN_NAME, "write_replog_db: NULL dn\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
"write_replog_db: add %s\n", attributeAlias );
slapi_entry_add_valueset( e, attributeAlias, valueSet );
@@ -346,8 +346,8 @@ write_replog_db(
break;
default:
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
- "replog: Unknown LDAP operation type %d.\n", optype );
+ slapi_log_error(SLAPI_LOG_ERR, RETROCL_PLUGIN_NAME,
+ "write_replog_db - Unknown LDAP operation type %d.\n", optype );
err = SLAPI_PLUGIN_FAILURE;
}
@@ -362,8 +362,8 @@ 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, LOG_ERR, RETROCL_PLUGIN_NAME,
- "replog: an error occured while adding change "
+ slapi_log_error(SLAPI_LOG_ERR, RETROCL_PLUGIN_NAME,
+ "write_replog_db - An error occured while adding change "
"number %lu, dn = %s: %s. \n",
changenum, edn, ldap_err2string( ret ));
retrocl_release_changenumber();
@@ -373,8 +373,8 @@ write_replog_db(
retrocl_commit_changenumber();
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
- "An error occurred while constructing "
+ slapi_log_error(SLAPI_LOG_ERR, RETROCL_PLUGIN_NAME,
+ "write_replog_db - An error occurred while constructing "
"change record number %ld.\n", changenum );
retrocl_release_changenumber();
ret = err;
@@ -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, LOG_ERR, "retrocl_postob: backend is not set\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "retrocl_postob - Backend is not set\n");
return SLAPI_PLUGIN_FAILURE;
}
if (slapi_be_logchanges(be) == 0) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "not applying change if not logging\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "retrocl_postob - Not applying change if not logging\n");
return SLAPI_PLUGIN_SUCCESS;
}
if (retrocl_be_changelog == NULL || be == retrocl_be_changelog) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "not applying change if no/cl be\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "retrocl_postob - 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, LOG_DEBUG,"not applying change if op failed %d\n",rc);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,"retrocl_postob - 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, LOG_DEBUG,"not applying change if op abandoned\n");
+ LDAPDebug0Args(LDAP_DEBUG_PLUGIN,"retrocl_postob - 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, LOG_DEBUG,"not applying change if no op\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE,"retrocl_postob - 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, LOG_DEBUG,"not applying change for nsTombstone entries\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE,"retrocl_postob - Not applying change for nsTombstone entries\n");
return SLAPI_PLUGIN_SUCCESS;
}
/*
@@ -677,8 +677,8 @@ 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, LOG_ERR, "retrocl-plugin",
- "retrocl_postob: operation failure [%d]\n", rc);
+ slapi_log_error(SLAPI_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 1148649..d4e20e4 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, LOG_ERR, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_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, LOG_DEBUG, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
"delete_changerecord: deleted changelog entry \"%s\"\n", dnbuf);
}
slapi_ch_free((void **) &dnbuf );
@@ -116,10 +116,10 @@ handle_getchangetime_result( int err, void *callback_data )
cnum_result_t *crt = callback_data;
if ( crt == NULL ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME,
- "handle_getchangetime_result: callback_data NULL\n" );
+ slapi_log_error(SLAPI_LOG_ERR, RETROCL_PLUGIN_NAME,
+ "handle_getchangetime_result: callback_data NULL\n" );
} else {
- crt->crt_err = err;
+ 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, LOG_ERR, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_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, LOG_ERR, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_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, LOG_DEBUG, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
"trim_changelog: no changelog records "
"to trim\n" );
/* Bail out - we can't do any useful work */
@@ -294,7 +294,7 @@ static int trim_changelog(void)
}
}
} else {
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "not yet time to trim: %ld < (%d+%d)\n",
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "not yet time to trim: %ld < (%d+%d)\n",
now, lt, trim_interval);
}
PR_Lock( ts.ts_s_trim_mutex );
@@ -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, LOG_DEBUG, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
"trim_changelog: removed %d change records\n",
num_deleted );
}
@@ -348,14 +348,14 @@ void retrocl_housekeeping ( time_t cur_time, void *noarg )
int ldrc;
if (retrocl_be_changelog == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "not housekeeping if no cl be\n");
- return;
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "retrocl_housekeeping - not housekeeping if no cl be\n");
+ return;
}
if ( !ts.ts_s_initialized ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, RETROCL_PLUGIN_NAME, "changelog_housekeeping called before "
+ slapi_log_error(SLAPI_LOG_ERR, RETROCL_PLUGIN_NAME, "retrocl_housekeeping - called before "
"trimming constraints set\n" );
- return;
+ return;
}
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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_PLUGIN,
"cltrim: ldrc=%d, first_time=%ld, cur_time=%ld\n",
ldrc,first_time,cur_time);
if ( LDAP_SUCCESS == ldrc && first_time > (time_t) 0L &&
@@ -381,18 +381,19 @@ void retrocl_housekeeping ( time_t cur_time, void *noarg )
}
}
if ( must_trim ) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "changelog about to create thread\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "retrocl_housekeeping - 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, LOG_ERR, RETROCL_PLUGIN_NAME, "unable to create changelog trimming thread\n" );
+ slapi_log_error(SLAPI_LOG_ERR, RETROCL_PLUGIN_NAME, "retrocl_housekeeping - "
+ "Unable to create changelog trimming thread\n" );
}
} else {
- LDAPDebug0Args(LDAP_DEBUG_PLUGIN, LOG_DEBUG,
- "changelog does not need to be trimmed\n");
+ LDAPDebug0Args(LDAP_DEBUG_PLUGIN,
+ "retrocl_housekeeping - changelog does not need to be trimmed\n");
}
}
PR_Unlock( ts.ts_s_trim_mutex );
@@ -421,7 +422,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, LOG_ERR, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_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 +435,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, LOG_ERR, RETROCL_PLUGIN_NAME,
+ slapi_log_error(SLAPI_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 +449,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, LOG_ERR, RETROCL_PLUGIN_NAME, "set_changelog_trim_constraints: "
+ slapi_log_error(SLAPI_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 de5f0df..a8242ad 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, LOG_DEBUG, plugin_name, "=> aes_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "<= aes_init %d\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "=> des_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, plugin_name, "<= des_init %d\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 28949ef..349f48f 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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_init\n");
if ( global_lock == NULL )
@@ -231,8 +231,8 @@ int roles_cache_init()
roles_sp_compare_value,
roles_sp_list_types) )
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
- "roles_cache_init: slapi_vattrspi_register failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
+ "roles_cache_init - slapi_vattrspi_register failed\n");
slapi_destroy_rwlock(global_lock);
global_lock = NULL;
@@ -240,15 +240,15 @@ int roles_cache_init()
}
else if ( slapi_vattrspi_regattr(vattr_handle,NSROLEATTR,"", NULL) )
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
- "roles_cache_init: slapi_vattrspi_regattr failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
+ "roles_cache_init - slapi_vattrspi_regattr failed\n");
slapi_ch_free((void **)&vattr_handle);
slapi_destroy_rwlock(global_lock);
global_lock = NULL;
return(-1);
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_init\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_init\n");
return rc;
}
@@ -263,15 +263,15 @@ 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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_create_suffix\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_ERR,
+ slapi_log_error(SLAPI_LOG_ERR,
ROLES_PLUGIN_SUBSYSTEM,
- "roles_cache_create_suffix: Unable to allocate memory, cannot create role cache\n");
+ "roles_cache_create_suffix - Unable to allocate memory, cannot create role cache\n");
return(NULL);
}
@@ -284,8 +284,8 @@ 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, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
- "roles_cache_create_suffix: Lock creation failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
+ "roles_cache_create_suffix - Lock creation failed\n");
roles_cache_role_def_free(new_suffix);
return(NULL);
}
@@ -293,8 +293,8 @@ 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, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
- "roles_cache_create_suffix: Lock creation failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
+ "roles_cache_create_suffix - ConVar creation failed\n");
roles_cache_role_def_free(new_suffix);
return(NULL);
}
@@ -302,8 +302,8 @@ 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, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
- "roles_cache_create_suffix: Lock creation failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
+ "roles_cache_create_suffix - CondVar creation failed\n");
roles_cache_role_def_free(new_suffix);
return(NULL);
}
@@ -350,8 +350,8 @@ 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, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
- "roles_cache_create_suffix: PR_CreateThread failed\n");
+ slapi_log_error(SLAPI_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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_create_suffix\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_wait_on_change\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "roles_cache_wait_on_change \n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "roles_cache_wait_on_change - notified\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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_wait_on_change thread exit\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_wait_on_change\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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_trigger_update_role: %p \n", roles_list);
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_update \n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "Out of memory \n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_update \n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_stop\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_stop\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_stop\n");
}
/* roles_cache_is_role_entry
@@ -693,9 +693,10 @@ 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, LOG_ERR,
+ slapi_log_error(SLAPI_LOG_ERR,
ROLES_PLUGIN_SUBSYSTEM,
- "roles_cache_is_role_entry: failed to get objectclass from %s\n",slapi_entry_get_dn_const(entry));
+ "roles_cache_is_role_entry - Failed to get objectclass from %s\n",
+ slapi_entry_get_dn_const(entry));
return(-1);
}
@@ -773,7 +774,7 @@ void roles_cache_change_notify(Slapi_PBlock *pb)
return ;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM,
"--> roles_cache_change_notify\n");
@@ -837,9 +838,9 @@ void roles_cache_change_notify(Slapi_PBlock *pb)
}
break;
default:
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
+ slapi_log_error(SLAPI_LOG_ERR,
ROLES_PLUGIN_SUBSYSTEM,
- "roles_cache_change_notify: unknown operation %d\n",operation);
+ "roles_cache_change_notify - Unknown operation %d\n",operation);
return;
}
@@ -847,7 +848,7 @@ void roles_cache_change_notify(Slapi_PBlock *pb)
{
if ( roles_cache_is_role_entry(e) != 1 )
{
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_change_notify: not a role entry\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_change_notify - Not a role entry\n");
return;
}
entry = slapi_entry_dup(e);
@@ -875,7 +876,7 @@ void roles_cache_change_notify(Slapi_PBlock *pb)
}
else
{
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_change_notify: not a role entry\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_change_notify - Not a role entry\n");
return;
}
}
@@ -901,7 +902,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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "roles_cache_change_notify:%s\n",string);
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "roles_cache_change_notify - %s\n",string);
}
}
}
@@ -919,7 +920,7 @@ if ( e != NULL )
}
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_change_notify\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_change_notify\n");
}
@@ -932,7 +933,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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_get_top_suffix\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_get_top_suffix\n");
if ( suffix == NULL )
{
@@ -957,7 +958,7 @@ static Slapi_DN* roles_cache_get_top_suffix(Slapi_DN *suffix)
}
}
/* we should not return that way ... */
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_get_top_suffix\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_get_top_suffix\n");
slapi_sdn_done(&parent_suffix);
slapi_sdn_free(¤t_suffix);
return(NULL);
@@ -976,7 +977,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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_add_roles_from_suffix\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_add_roles_from_suffix\n");
info.suffix_def = suffix_def;
info.rc = LDAP_NO_SUCH_OBJECT;
@@ -1008,7 +1009,7 @@ static int roles_cache_add_roles_from_suffix(Slapi_DN *suffix_dn, roles_cache_de
rc = 0;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_add_roles_from_suffix\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_add_roles_from_suffix\n");
return(rc);
}
@@ -1048,23 +1049,23 @@ 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, LOG_DEBUG,
- ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_create_role_under: %s - %p\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN,
+ 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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM,
- "roles_cache_create_role_under: create node for entry %s - rc: %d SUFFIX: %p\n",
+ "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);
if ( (rc == 0) && new_role)
{
/* 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, LOG_DEBUG,
- ROLES_PLUGIN_SUBSYSTEM, "roles_cache_create_role_under:%s in tree %p rc: %d\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN,
+ 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 +1089,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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
"--> roles_cache_create_object_from_entry\n");
*result = NULL;
@@ -1099,8 +1100,8 @@ 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, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
- "Maximum roles nesting exceeded (%d), not retrieving roles "
+ slapi_log_error(SLAPI_LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
+ "roles_cache_create_object_from_entry - Maximum roles nesting exceeded (%d), not retrieving roles "
"from entry %s--probable circular definition\n",
MAX_NESTED_ROLES, ndn);
@@ -1155,8 +1156,8 @@ 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, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
- "%s: invalid %s - %s not in the same suffix. Scope skipped.\n",
+ slapi_log_error(SLAPI_LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
+ "roles_cache_create_object_from_entry - %s: invalid %s - %s not in the same suffix. Scope skipped.\n",
(char*) slapi_sdn_get_dn(this_role->dn),
ROLE_SCOPE_DN,
rolescopeDN);
@@ -1166,8 +1167,8 @@ 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, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
- "%s: invalid %s - %s not a valid DN. Scope skipped.\n",
+ slapi_log_error(SLAPI_LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
+ "roles_cache_create_object_from_entry - %s: invalid %s - %s not a valid DN. Scope skipped.\n",
(char*) slapi_sdn_get_dn(this_role->dn),
ROLE_SCOPE_DN,
rolescopeDN);
@@ -1228,8 +1229,8 @@ 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, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
- "%s: not allowed to refer virtual attribute "
+ slapi_log_error(SLAPI_LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
+ "roles_cache_create_object_from_entry - %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),
ROLE_FILTER_ATTR_NAME, filter_attr_value,
@@ -1281,8 +1282,8 @@ 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, LOG_DEBUG,
- ROLES_PLUGIN_SUBSYSTEM, "roles_cache_create_object_from_entry: dn %s, nested %s\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN,
+ ROLES_PLUGIN_SUBSYSTEM, "roles_cache_create_object_from_entry - dn %s, nested %s\n",
(char*)slapi_sdn_get_ndn(this_role->dn),string);
/* Make a role object nested from the DN */
@@ -1302,8 +1303,8 @@ static int roles_cache_create_object_from_entry(Slapi_Entry *role_entry, role_ob
}
default:
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
- ROLES_PLUGIN_SUBSYSTEM, "wrong role type\n");
+ slapi_log_error(SLAPI_LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
+ "roles_cache_create_object_from_entry - wrong role type\n");
}
if ( rc == 0 )
@@ -1311,7 +1312,7 @@ static int roles_cache_create_object_from_entry(Slapi_Entry *role_entry, role_ob
*result = this_role;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
"<-- roles_cache_create_object_from_entry\n");
@@ -1334,7 +1335,7 @@ static int roles_cache_determine_class(Slapi_Entry *role_entry)
int rc = 0;
int type = 0;
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
"--> roles_cache_determine_class\n");
rc = slapi_entry_attr_find(role_entry,"objectclass",&attr);
@@ -1380,7 +1381,7 @@ static int roles_cache_determine_class(Slapi_Entry *role_entry)
return 0;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
"<-- roles_cache_determine_class\n");
/* Return the appropriate type ordinal */
@@ -1398,7 +1399,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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
"roles_cache_node_cmp\n");
return (slapi_sdn_compare((Slapi_DN *)role_to_insert->dn, (Slapi_DN *)current_role->dn));
@@ -1411,8 +1412,8 @@ 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, LOG_DEBUG,
- ROLES_PLUGIN_SUBSYSTEM, "roles_cache_insert_object: %s in tree %p\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN,
+ ROLES_PLUGIN_SUBSYSTEM, "roles_cache_insert_object - %s in tree %p\n",
(char*)slapi_sdn_get_ndn(object->dn),
*tree);
return (avl_insert(tree, (caddr_t)object, roles_cache_node_cmp, avl_dup_error));
@@ -1429,7 +1430,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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
"roles_cache_node_nested_cmp\n");
return slapi_sdn_compare(role_to_insert->dn, current_role->dn);
@@ -1441,8 +1442,8 @@ 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, LOG_DEBUG,
- ROLES_PLUGIN_SUBSYSTEM, "roles_cache_insert_object_nested: %s in tree %p: \n",
+ slapi_log_error(SLAPI_LOG_PLUGIN,
+ ROLES_PLUGIN_SUBSYSTEM, "roles_cache_insert_object_nested - %s in tree %p: \n",
(char*)slapi_sdn_get_ndn(object->dn), *tree);
return (avl_insert(tree, (caddr_t)object, roles_cache_node_nested_cmp, avl_dup_error));
@@ -1458,7 +1459,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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
"--> roles_cache_object_nested_from_dn\n");
*result = NULL;
@@ -1474,7 +1475,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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
"<-- roles_cache_object_nested_from_dn\n");
return 0;
}
@@ -1499,7 +1500,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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_listroles\n");
backend = slapi_mapping_tree_find_backend_for_sdn(slapi_entry_get_sdn(entry));
@@ -1567,7 +1568,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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_listroles\n");
return rc;
}
@@ -1590,7 +1591,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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_build_nsrole: role %s\n",
(char*) slapi_sdn_get_ndn(this_role->dn));
@@ -1627,7 +1628,7 @@ static int roles_cache_build_nsrole( caddr_t data, caddr_t arg )
slapi_value_free(&value);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_build_nsrole\n");
return rc;
@@ -1650,7 +1651,7 @@ int roles_check(Slapi_Entry *entry_to_check, Slapi_DN *role_dn, int *present)
int rc = 0;
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_check\n");
*present = 0;
@@ -1685,7 +1686,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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "<-- roles_check\n");
return rc;
@@ -1702,7 +1703,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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "roles_cache_find_node: %s %s\n",
slapi_sdn_get_dn(data), slapi_sdn_get_dn(role->dn));
@@ -1718,7 +1719,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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_find_roles_in_suffix\n");
*list_of_roles = NULL;
@@ -1752,7 +1753,7 @@ static int roles_cache_find_roles_in_suffix(Slapi_DN *target_entry_dn, roles_cac
return rc;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_find_roles_in_suffix\n");
return rc;
}
@@ -1778,19 +1779,19 @@ 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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_is_entry_member_of_object\n");
if (!this_role) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
- ROLES_PLUGIN_SUBSYSTEM, "roles_is_entry_member_of_object-> NULL role\n");
+ slapi_log_error(SLAPI_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, LOG_DEBUG,
- ROLES_PLUGIN_SUBSYSTEM, "roles_is_entry_member_of_object-> entry not in scope of role\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN,
+ ROLES_PLUGIN_SUBSYSTEM, "roles_is_entry_member_of_object - Entry not in scope of role\n");
return rc;
}
@@ -1817,12 +1818,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, LOG_ERR,
- ROLES_PLUGIN_SUBSYSTEM, "roles_is_entry_member_of_object-> invalid role type\n");
+ slapi_log_error(SLAPI_LOG_ERR,
+ ROLES_PLUGIN_SUBSYSTEM, "roles_is_entry_member_of_object - invalid role type\n");
}
}
done:
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "<-- roles_is_entry_member_of_object\n");
return rc;
}
@@ -1840,7 +1841,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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_check_managed\n");
/* Get the attribute */
rc = slapi_entry_attr_find(entry_to_check,ROLE_MANAGED_ATTR_NAME,&attr);
@@ -1860,9 +1861,9 @@ static int roles_check_managed(Slapi_Entry *entry_to_check, role_object *role, i
*present = 1;
}
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM,
- "<-- roles_check_managed: entry %s role %s present %d\n",
+ "<-- 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);
return rc;
}
@@ -1879,7 +1880,7 @@ static int roles_check_filtered(vattr_context *c, Slapi_Entry *entry_to_check, r
{
int rc = 0;
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
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);
@@ -1887,9 +1888,9 @@ static int roles_check_filtered(vattr_context *c, Slapi_Entry *entry_to_check, r
{
*present = 1;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM,
- "<-- roles_check_filtered: entry %s role %s present %d\n",
+ "<-- 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);
return rc;
}
@@ -1915,9 +1916,9 @@ 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, LOG_ERR,
+ slapi_log_error(SLAPI_LOG_ERR,
ROLES_PLUGIN_SUBSYSTEM,
- "Maximum roles nesting exceeded (max %d current %d), not checking roles in entry %s--probable circular definition\n",
+ "roles_check_nested - Maximum roles nesting exceeded (max %d current %d), not checking roles in entry %s--probable circular definition\n",
MAX_NESTED_ROLES,
get_nsrole->hint,
ndn);
@@ -1934,9 +1935,9 @@ 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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM,
- "-->roles_check_nested: entry %s role %s present %d\n",
+ "roles_check_nested - entry %s role %s present %d\n",
slapi_entry_get_dn_const(get_nsrole->is_entry_member_of),
(char*)slapi_sdn_get_ndn(current_nested_role->dn),
get_nsrole->present);
@@ -1959,9 +1960,9 @@ 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, LOG_ERR,
+ slapi_log_error(SLAPI_LOG_ERR,
ROLES_PLUGIN_SUBSYSTEM,
- "The nested role %s doesn't exist\n",
+ "roles_check_nested - The nested role %s doesn't exist\n",
(char*)slapi_sdn_get_ndn(current_nested_role->dn));
return rc;
}
@@ -1976,7 +1977,7 @@ static int roles_check_nested(caddr_t data, caddr_t arg)
}
}
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "<-- roles_check_nested\n");
return rc;
}
@@ -1992,7 +1993,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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_is_inscope\n");
if (this_role->rolescopedn) {
@@ -2015,7 +2016,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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
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);
@@ -2037,7 +2038,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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_role_def_delete\n");
while ( current!= NULL )
@@ -2064,7 +2065,7 @@ static void roles_cache_role_def_delete(roles_cache_def *role_def)
current = current->next;
}
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_role_def_delete\n");
}
@@ -2073,7 +2074,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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_role_def_free\n");
if ( role_def == NULL )
{
@@ -2107,7 +2108,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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_role_def_free\n");
}
@@ -2116,7 +2117,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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_role_object_free\n");
if ( this_role == NULL )
@@ -2151,7 +2152,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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_role_object_free\n");
}
@@ -2160,7 +2161,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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_role_object_nested_free\n");
if ( this_role == NULL )
@@ -2173,7 +2174,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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_role_object_nested_free\n");
return 0;
@@ -2183,7 +2184,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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
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 a1a54de..169c472 100644
--- a/ldap/servers/plugins/roles/roles_plugin.c
+++ b/ldap/servers/plugins/roles/roles_plugin.c
@@ -69,8 +69,8 @@ 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, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
- "roles_postop_init: failed to register plugin\n" );
+ slapi_log_error(SLAPI_LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
+ "roles_postop_init - Failed to register plugin\n" );
rc = -1;
}
return rc;
@@ -92,8 +92,8 @@ 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, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
- "roles_internalpostop_init: failed to register plugin\n" );
+ slapi_log_error(SLAPI_LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
+ "roles_internalpostop_init - Failed to register plugin\n" );
rc = -1;
}
return rc;
@@ -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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_ERR, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM,
"=> roles_close\n" );
roles_cache_stop();
@@ -220,8 +220,8 @@ static int roles_close( Slapi_PBlock *pb )
(notify_callback) statechange_vattr_cache_invalidator_callback(statechange_api));
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM,
- "<= roles_close %d\n", rc );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "--> roles_post_op\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROLES_PLUGIN_SUBSYSTEM, "--> roles_post_op\n");
roles_cache_change_notify(pb);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROLES_PLUGIN_SUBSYSTEM, "<-- roles_post_op\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 5ff03fd..b92a2b2 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, LOG_DEBUG, ROOTDN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_init: failed to register plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_init - Failed to register plugin\n");
status = -1;
}
@@ -139,8 +139,8 @@ rootdn_init(Slapi_PBlock *pb){
NULL, /* ? */
plugin_identity /* access control */
)) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
- "rootdn_init: failed to register rootdn preoperation plugin\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
- "rootdn_start: unable to load plug-in configuration\n");
+ slapi_log_error(SLAPI_LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,
+ "rootdn_init - Unable to load plug-in configuration\n");
return -1;
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROOTDN_PLUGIN_SUBSYSTEM,"<-- rootdn_init\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROOTDN_PLUGIN_SUBSYSTEM,"<-- rootdn_init\n");
return status;
}
@@ -161,8 +161,8 @@ 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, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM,"rootdn_preop_bind_init: "
- "failed to register function\n");
+ slapi_log_error(SLAPI_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, LOG_DEBUG, ROOTDN_PLUGIN_SUBSYSTEM, "--> rootdn_start\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROOTDN_PLUGIN_SUBSYSTEM, "--> rootdn_start\n");
rootdn_set_plugin_dn(ROOTDN_PLUGIN_DN);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROOTDN_PLUGIN_SUBSYSTEM, "<-- rootdn_start\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, ROOTDN_PLUGIN_SUBSYSTEM, "--> rootdn_load_config\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROOTDN_PLUGIN_SUBSYSTEM, "--> rootdn_load_config\n");
if ((slapi_pblock_get(pb, SLAPI_PLUGIN_CONFIG_ENTRY, &e) == 0) && e){
/*
@@ -241,8 +241,8 @@ 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, 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_log_error(SLAPI_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;
goto free_and_return;
@@ -252,8 +252,8 @@ 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, 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_log_error(SLAPI_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(©);
result = -1;
@@ -266,21 +266,21 @@ rootdn_load_config(Slapi_PBlock *pb)
if(openTime){
end = strspn(openTime, "0123456789");
if (!end || openTime[end] != '\0'){
- 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);
+ slapi_log_error(SLAPI_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, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_load_config: "
- "invalid value for rootdn-open-time value (%s), value must be between 0000-2359\n", openTime);
+ slapi_log_error(SLAPI_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, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_load_config: "
- "invalid format for rootdn-open-time value (%s). Should be HHMM\n", openTime);
+ slapi_log_error(SLAPI_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,21 +294,21 @@ rootdn_load_config(Slapi_PBlock *pb)
if(closeTime){
end = strspn(closeTime, "0123456789");
if (!end || closeTime[end] != '\0'){
- 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);
+ slapi_log_error(SLAPI_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, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_load_config: "
- "invalid value for rootdn-close-time value (%s), value must be between 0000-2359\n", closeTime);
+ slapi_log_error(SLAPI_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, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_load_config: "
- "invalid format for rootdn-close-time value (%s), should be HHMM\n", closeTime);
+ slapi_log_error(SLAPI_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,8 +321,8 @@ 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, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_load_config: "
- "there must be a open and a close time. Ignoring time based settings.\n");
+ slapi_log_error(SLAPI_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);
open_time = 0;
@@ -332,8 +332,8 @@ 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, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_load_config: "
- "the close time must be greater than the open time\n");
+ slapi_log_error(SLAPI_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,8 +341,8 @@ 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, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_load_config: "
- "hostname (%s) contains invalid characters, skipping\n",hosts_tmp[i]);
+ slapi_log_error(SLAPI_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;
goto free_and_return;
@@ -353,8 +353,8 @@ 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, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_load_config: "
- "hostname (%s) contains invalid characters, skipping\n",hosts_to_deny_tmp[i]);
+ slapi_log_error(SLAPI_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;
goto free_and_return;
@@ -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, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_load_config: "
+ slapi_log_error(SLAPI_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, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_load_config: "
+ slapi_log_error(SLAPI_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, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_load_config: "
+ slapi_log_error(SLAPI_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, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_load_config: "
+ slapi_log_error(SLAPI_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, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_load_config: "
+ slapi_log_error(SLAPI_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, LOG_DEBUG, ROOTDN_PLUGIN_SUBSYSTEM, "<-- rootdn_load_config (%d)\n", result);
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_check_access: bind not in the "
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_check_access - Bind not in the "
"allowed time window\n");
return -1;
}
@@ -493,8 +493,8 @@ rootdn_check_access(Slapi_PBlock *pb){
daysAllowed = strToLower(daysAllowed);
if(!strstr(daysAllowed, today)){
- 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);
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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,8 @@ 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, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_check_access: Could not get client address for hosts.\n" );
+ slapi_log_error(SLAPI_LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_check_access - "
+ "Could not get client address for hosts.\n" );
rc = -1;
goto free_and_return;
}
@@ -524,12 +525,14 @@ rootdn_check_access(Slapi_PBlock *pb){
dnsName = slapi_ch_strdup( host_entry->h_name );
} else {
/* no hostname */
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_check_access: client address missing hostname\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_check_access - "
+ "Client address missing hostname\n");
rc = -1;
goto free_and_return;
}
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_check_access: client IP address could not be resolved\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_check_access - "
+ "client IP address could not be resolved\n");
rc = -1;
goto free_and_return;
}
@@ -588,7 +591,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, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_check_access: Could not get client address for IP.\n" );
+ slapi_log_error(SLAPI_LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_check_access - Could not get client address for IP.\n" );
rc = -1;
goto free_and_return;
}
@@ -602,13 +605,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, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_check_access: Could not get IPv4 from client address.\n" );
+ slapi_log_error(SLAPI_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, LOG_ERR, ROOTDN_PLUGIN_SUBSYSTEM, "rootdn_check_access: Could not get IPv6 from client address.\n" );
+ slapi_log_error(SLAPI_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 593f2af..af0c507 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, LOG_ERR, "schemareload", "Failed to create global schema reload lock.");
+ slapi_log_error(SLAPI_LOG_ERR, "schemareload", "schemareload_start - 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, LOG_DEBUG, "schemareload",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_ERR, "schemareload", "Schema reload task starts (schema dir: %s) ...\n", td->schemadir?td->schemadir:"default");
+ slapi_log_error(SLAPI_LOG_INFO, "schemareload", "schemareload_thread - 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, LOG_ERR, "schemareload", "Server is shuttoing down; Schema validation aborted.");
+ slapi_log_error(SLAPI_LOG_ERR, "schemareload", "schemareload_thread - Server is shutting 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, LOG_ERR, "schemareload", "Schema validation passed.\n");
+ slapi_log_error(SLAPI_LOG_INFO, "schemareload", "schemareload_thread - 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, LOG_ERR, "schemareload", "Schema reload task finished.\n");
+ slapi_log_error(SLAPI_LOG_INFO, "schemareload", "schemareload_thread - 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, LOG_ERR, "schemareload", "Schema reload task failed.\n");
+ slapi_log_error(SLAPI_LOG_ERR, "schemareload", "schemareload_thread - 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, LOG_ERR, "schemareload", "Schema validation failed.\n");
+ slapi_log_error(SLAPI_LOG_ERR, "schemareload", "schemareload_thread - 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, LOG_DEBUG, "schemareload",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_ERR, "schemareload", "unable to allocate new task!\n");
+ slapi_log_error(SLAPI_LOG_ERR, "schemareload", "schemareload_add - Unable to allocate new task!\n");
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -285,8 +285,8 @@ 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, LOG_ERR, "schemareload",
- "unable to create schema reload task thread!\n");
+ slapi_log_error(SLAPI_LOG_ERR, "schemareload",
+ "schemareload_add - Unable to create schema reload task thread!\n");
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
} else {
diff --git a/ldap/servers/plugins/statechange/statechange.c b/ldap/servers/plugins/statechange/statechange.c
index 242efca..542733e 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, LOG_DEBUG, SCN_PLUGIN_SUBSYSTEM, "--> statechange_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, SCN_PLUGIN_SUBSYSTEM,
- "statechange_init: failed to register plugin\n" );
+ slapi_log_error(SLAPI_LOG_ERR, SCN_PLUGIN_SUBSYSTEM,
+ "statechange_init - Failed to register plugin\n" );
ret = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, SCN_PLUGIN_SUBSYSTEM, "<-- statechange_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, SCN_PLUGIN_SUBSYSTEM, "--> statechange_start\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, SCN_PLUGIN_SUBSYSTEM, "statechange: failed to create lock\n");
+ slapi_log_error(SLAPI_LOG_ERR, SCN_PLUGIN_SUBSYSTEM, "statechange_start - 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, LOG_ERR, SCN_PLUGIN_SUBSYSTEM, "statechange: failed to publish state change interface\n");
+ slapi_log_error(SLAPI_LOG_ERR, SCN_PLUGIN_SUBSYSTEM, "statechange_start - 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, LOG_DEBUG, SCN_PLUGIN_SUBSYSTEM, "<-- statechange_start\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, SCN_PLUGIN_SUBSYSTEM, "--> statechange_close\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, SCN_PLUGIN_SUBSYSTEM, "<-- statechange_close\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, SCN_PLUGIN_SUBSYSTEM, "--> statechange_post_op\n");
+ slapi_log_error(SLAPI_LOG_TRACE, SCN_PLUGIN_SUBSYSTEM, "--> statechange_post_op\n");
/* evaluate this operation against the notification entries */
slapi_lock_mutex(buffer_lock);
@@ -240,8 +240,8 @@ 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, LOG_ERR, SCN_PLUGIN_SUBSYSTEM,
- "statechange_post_op: failed to get dn of changed entry" );
+ slapi_log_error(SLAPI_LOG_ERR, SCN_PLUGIN_SUBSYSTEM,
+ "statechange_post_op - Failed to get dn of changed entry" );
goto bail;
}
ndn = (char *)slapi_sdn_get_ndn(sdn);
@@ -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, LOG_DEBUG, SCN_PLUGIN_SUBSYSTEM, "<-- statechange_post_op\n");
+ slapi_log_error(SLAPI_LOG_TRACE, SCN_PLUGIN_SUBSYSTEM, "<-- statechange_post_op\n");
return SLAPI_PLUGIN_SUCCESS; /* always succeed */
}
@@ -327,8 +327,8 @@ 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, LOG_ERR, SCN_PLUGIN_SUBSYSTEM,
- "Error: invalid filter in statechange entry [%s]: [%s]\n",
+ slapi_log_error(SLAPI_LOG_ERR, SCN_PLUGIN_SUBSYSTEM,
+ "_statechange_register - Invalid filter in statechange entry [%s]: [%s]\n",
dn, filter);
slapi_ch_free_string(&item->caller_id);
slapi_ch_free_string(&item->dn);
diff --git a/ldap/servers/plugins/sync/sync_init.c b/ldap/servers/plugins/sync/sync_init.c
index 111338b..32d9126 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, LOG_DEBUG, SYNC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, SYNC_PLUGIN_SUBSYSTEM,
"--> sync_init\n");
/**
@@ -39,8 +39,8 @@ 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, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
- "sync_init: failed to register plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
+ "sync_init - Failed to register plugin\n");
rc = 1;
}
@@ -55,8 +55,8 @@ int sync_init( Slapi_PBlock *pb )
SYNC_PREOP_DESC,/* plugin desc */
NULL,
plugin_identity)) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
- "sync_init: failed to register preop plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
+ "sync_init - Failed to register preop plugin\n");
rc = 1;
}
}
@@ -71,8 +71,8 @@ int sync_init( Slapi_PBlock *pb )
SYNC_POSTOP_DESC, /* plugin desc */
NULL,
plugin_identity )) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
- "sync_init: failed to register postop plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
+ "sync_init - Failed to register postop plugin\n");
rc = 1;
}
}
@@ -119,13 +119,13 @@ sync_start(Slapi_PBlock * pb)
slapi_register_supported_control( LDAP_CONTROL_SYNC,
SLAPI_OPERATION_SEARCH );
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, SYNC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
- "unable to get arguments\n" );
+ slapi_log_error(SLAPI_LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
+ "sync_start - Unable to get arguments\n" );
return( -1 );
}
sync_persist_initialize(argc, argv);
diff --git a/ldap/servers/plugins/sync/sync_persist.c b/ldap/servers/plugins/sync/sync_persist.c
index deb2bfe..a122fde 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, LOG_DEBUG, SYNC_PLUGIN_SUBSYSTEM, "sync search: enqueued entry "
+ slapi_log_error(SLAPI_LOG_TRACE, SYNC_PLUGIN_SUBSYSTEM, "sync_queue_change - enqueued entry "
"\"%s\" on %d request listeners\n", slapi_entry_get_dn_const(e), matched );
} else {
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, SYNC_PLUGIN_SUBSYSTEM, "sync search: entry "
+ slapi_log_error(SLAPI_LOG_TRACE, SYNC_PLUGIN_SUBSYSTEM, "sync_queue_change - 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, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM, "sync_persist_initialize: cannot initialize lock structure(1). ");
+ slapi_log_error(SLAPI_LOG_ERR, SYNC_PLUGIN_SUBSYSTEM, "sync_persist_initialize - Cannot initialize lock structure(1).\n");
return( -1 );
}
if (( sync_request_list->sync_req_cvarlock = PR_NewLock()) == NULL ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM, "sync_persist_initialize: cannot initialize lock structure(2). ");
+ slapi_log_error(SLAPI_LOG_ERR, SYNC_PLUGIN_SUBSYSTEM, "sync_persist_initialize - Cannot initialize lock structure(2).\n");
return( -1 );
}
if (( sync_request_list->sync_req_cvar = PR_NewCondVar( sync_request_list->sync_req_cvarlock )) == NULL ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM, "sync_persist_initialize: cannot initialize condition variable. ");
+ slapi_log_error(SLAPI_LOG_ERR, SYNC_PLUGIN_SUBSYSTEM, "sync_persist_initialize - Cannot initialize condition variable.\n");
return( -1 );
}
sync_request_list->sync_req_head = NULL;
@@ -284,8 +284,8 @@ sync_persist_add (Slapi_PBlock *pb)
if(NULL == (req->req_tid)){
int prerr;
prerr = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Content Synchronization Search",
- "sync_persist_add function: failed to create persitent thread, error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
+ "sync_persist_add - 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 */
sync_remove_request(req);
@@ -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, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM, "sync_request_alloc: cannot initialize lock structure. ");
+ slapi_log_error(SLAPI_LOG_ERR, SYNC_PLUGIN_SUBSYSTEM, "sync_request_alloc - Cannot initialize lock structure.\n");
slapi_ch_free((void **)&req);
return( NULL );
}
@@ -460,7 +460,8 @@ sync_remove_request( SyncRequest *req )
}
SYNC_UNLOCK_WRITE();
if (!removed) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, SYNC_PLUGIN_SUBSYSTEM, "attempt to remove nonexistent req");
+ slapi_log_error(SLAPI_LOG_PLUGIN, SYNC_PLUGIN_SUBSYSTEM, "sync_remove_request - "
+ "Attempt to remove nonexistent req\n");
}
}
}
@@ -546,15 +547,15 @@ 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, LOG_ERR, "Content Synchronization Search",
- "conn=%" NSPRIu64 " op=%d Null connection - aborted\n",
+ slapi_log_error(SLAPI_LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
+ "sync_send_results - 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, LOG_ERR, "Content Synchronization Search",
- "conn=%" NSPRIu64 " op=%d Could not acquire the connection - aborted\n",
+ slapi_log_error(SLAPI_LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
+ "sync_send_results - conn=%" NSPRIu64 " op=%d Could not acquire the connection - aborted\n",
connid, opid);
return;
}
@@ -564,8 +565,8 @@ 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, LOG_DEBUG, "Content Synchronization Search",
- "conn=%" NSPRIu64 " op=%d Operation no longer active - terminating\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, SYNC_PLUGIN_SUBSYSTEM,
+ "sync_send_results - conn=%" NSPRIu64 " op=%d Operation no longer active - terminating\n",
connid, opid);
break;
}
@@ -642,8 +643,8 @@ sync_send_results( void *arg )
ec, ectrls,
noattrs?noattrs:attrs, attrsonly );
if (rc) {
- slapi_log_error(SLAPI_LOG_CONNS, LOG_DEBUG, SYNC_PLUGIN_SUBSYSTEM,
- "Error %d sending entry %s\n",
+ slapi_log_error(SLAPI_LOG_CONNS, SYNC_PLUGIN_SUBSYSTEM,
+ "sync_send_results - Error %d sending entry %s\n",
rc, slapi_entry_get_dn_const(ec));
}
ldap_controls_free(ectrls);
diff --git a/ldap/servers/plugins/sync/sync_refresh.c b/ldap/servers/plugins/sync/sync_refresh.c
index 091098f..0c825d2 100644
--- a/ldap/servers/plugins/sync/sync_refresh.c
+++ b/ldap/servers/plugins/sync/sync_refresh.c
@@ -441,22 +441,23 @@ 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, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
- "Retro Changelog does not provied nsuniquedid."
+ slapi_log_error(SLAPI_LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
+ "sync_read_entry_from_changelog - Retro Changelog does not provide nsuniquedid."
"Check RCL plugin configuration.\n" );
return(1);
}
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, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
- "Change number provided by Retro Changelog is invalid: %s\n", chgnr);
+ slapi_log_error(SLAPI_LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
+ "sync_read_entry_from_changelog - 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, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_ERR, SYNC_PLUGIN_SUBSYSTEM,
+ "sync_read_entry_from_changelog - "
"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 8c26774..285c60a 100644
--- a/ldap/servers/plugins/sync/sync_util.c
+++ b/ldap/servers/plugins/sync/sync_util.c
@@ -384,16 +384,16 @@ 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, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM, "sync_cookie_get_server_info: "
- "unable to read server configuration: error %d\n", rc);
+ slapi_log_error(SLAPI_LOG_ERR, SYNC_PLUGIN_SUBSYSTEM, "sync_cookie_get_server_info - "
+ "Unable to read server configuration: error %d\n", rc);
}
else
{
slapi_pblock_get(srch_pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries);
if (NULL == entries || NULL == entries[0])
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SYNC_PLUGIN_SUBSYSTEM, "sync_cookie_get_server_info: "
- "server configuration missing\n");
+ slapi_log_error(SLAPI_LOG_ERR, SYNC_PLUGIN_SUBSYSTEM, "sync_cookie_get_server_info -"
+ "Server configuration missing\n");
rc = -1;
}
else
diff --git a/ldap/servers/plugins/syntaxes/bin.c b/ldap/servers/plugins/syntaxes/bin.c
index 221e4b5..8050bcf 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, LOG_DEBUG, "=> bin_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= bin_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= bin_init %d\n", rc, 0, 0 );
return( rc );
}
@@ -225,10 +225,10 @@ octetstring_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> octetstring_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> octetstring_init\n", 0, 0, 0 );
rc = register_bin_like_plugin( pb, &octetstring_pdesc, octetstring_names,
OCTETSTRING_SYNTAX_OID );
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= octetstring_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= octetstring_init %d\n", rc, 0, 0 );
return( rc );
}
@@ -238,10 +238,10 @@ jpeg_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> jpeg_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> jpeg_init\n", 0, 0, 0 );
rc = register_bin_like_plugin( pb, &jpeg_pdesc, jpeg_names,
JPEG_SYNTAX_OID );
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= jpeg_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= jpeg_init %d\n", rc, 0, 0 );
return( rc );
}
@@ -251,10 +251,10 @@ fax_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> fax_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> fax_init\n", 0, 0, 0 );
rc = register_bin_like_plugin( pb, &fax_pdesc, fax_names,
FAX_SYNTAX_OID );
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "<= fax_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= 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 af49ec4..46e92d6 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, LOG_DEBUG, "=> bitstring_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= bitstring_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= 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 6fd5d31..fe39f67 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, LOG_DEBUG, "=> ces_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= ces_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= ces_init %d\n", rc, 0, 0 );
return( rc );
}
@@ -358,12 +358,12 @@ uri_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> uri_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= uri_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= 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 dd46bd3..993abce 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, LOG_DEBUG, "=> cis_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= cis_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= cis_init %d\n", rc, 0, 0 );
return( rc );
}
@@ -738,10 +738,10 @@ boolean_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> boolean_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= boolean_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= boolean_init %d\n", rc, 0, 0 );
return( rc );
}
@@ -750,10 +750,10 @@ time_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> time_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= time_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= time_init %d\n", rc, 0, 0 );
return( rc );
}
@@ -762,10 +762,10 @@ country_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> country_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= country_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= country_init %d\n", rc, 0, 0 );
return( rc );
}
@@ -774,10 +774,10 @@ postal_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> postal_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= postal_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= postal_init %d\n", rc, 0, 0 );
return( rc );
}
@@ -787,9 +787,9 @@ oid_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> oid_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= oid_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= oid_init %d\n", rc, 0, 0 );
return( rc );
}
@@ -798,10 +798,10 @@ printable_init( Slapi_PBlock *pb )
{
int rc;
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "=> printable_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= printable_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= 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 6702dc4..adc000c 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, LOG_DEBUG, "=> delivery_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= delivery_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= 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 0dbc2ff..307641e 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, LOG_DEBUG, "=> dn_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= dn_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= 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 cbf7e25..2059a7a 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, LOG_DEBUG, "=> facsimile_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= facsimile_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= 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 9986fc7..f9bcdb8 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, LOG_DEBUG, "=> guide_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= guide_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= 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, LOG_DEBUG, "=> guide_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= guide_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= 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 400ad8a..48df53a 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, LOG_DEBUG, "=> int_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= int_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= 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 98b319e..26a4a9a 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, LOG_DEBUG, "=> nameoptuid_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= nameoptuid_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= 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 9d6a412..bd5fc71 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, LOG_DEBUG, "=> numstr_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= numstr_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= 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 93b75e5..9059f11 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, LOG_DEBUG, "=> sicis_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= sicis_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= 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 541870f..17ceef9 100644
--- a/ldap/servers/plugins/syntaxes/string.c
+++ b/ldap/servers/plugins/syntaxes/string.c
@@ -119,6 +119,8 @@ string_filter_approx( struct berval *bvfilter, Slapi_Value **bvals,
int ava_wordcount;
char *w1, *w2, *c1, *c2;
+ slapi_log_error(SLAPI_LOG_TRACE, SYNTAX_PLUGIN_SUBSYSTEM, "=> string_filter_approx\n");
+
/*
* try to match words in each filter value in order
* in the attribute value.
@@ -181,8 +183,7 @@ string_filter_approx( struct berval *bvfilter, Slapi_Value **bvals,
if (0 != rc) {
rc = -1;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= string_filter_approx %d\n",
- rc, 0, 0 );
+ slapi_log_error(SLAPI_LOG_TRACE, SYNTAX_PLUGIN_SUBSYSTEM, "<= string_filter_approx %d\n", rc);
return( rc );
}
@@ -208,7 +209,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, LOG_DEBUG, "=> string_filter_sub\n", 0, 0, 0 );
+ slapi_log_error(SLAPI_LOG_TRACE, SYNTAX_PLUGIN_SUBSYSTEM, "=> string_filter_sub\n");
if (pb) {
slapi_pblock_get( pb, SLAPI_OPERATION, &op );
}
@@ -322,13 +323,15 @@ 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, LOG_ERR, "re_comp (%s) failed (%s): %s\n",
- pat, p, re_result?re_result:"unknown" );
+ slapi_log_error(SLAPI_LOG_ERR, SYNTAX_PLUGIN_SUBSYSTEM,
+ "string_filter_sub - 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, LOG_DEBUG, "re_comp (%s)\n", escape_string(p, ebuf), 0, 0);
+ slapi_log_error(SLAPI_LOG_TRACE, SYNTAX_PLUGIN_SUBSYSTEM,
+ "string_filter_sub - re_comp (%s)\n", escape_string(p, ebuf));
}
}
@@ -376,7 +379,8 @@ 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, LOG_DEBUG, "re_exec (%s) %i\n", escape_string(realval, ebuf), tmprc, 0);
+ slapi_log_error(SLAPI_LOG_TRACE, SYNTAX_PLUGIN_SUBSYSTEM,"re_exec (%s) %i\n",
+ escape_string(realval, ebuf), tmprc);
}
if ( tmprc == 1 ) {
rc = 0;
@@ -393,8 +397,7 @@ bailout:
slapi_ch_free((void**)&tmpbuf ); /* NULL is fine */
slapi_ch_free((void**)&bigpat ); /* NULL is fine */
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= string_filter_sub %d\n",
- rc, 0, 0 );
+ slapi_log_error(SLAPI_LOG_TRACE, SYNTAX_PLUGIN_SUBSYSTEM, "<= string_filter_sub %d\n", rc);
return( rc );
}
@@ -738,9 +741,9 @@ string_assertion2keys_ava(
}
break;
default:
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "string_assertion2keys_ava: unknown ftype 0x%x\n",
- ftype, 0, 0 );
+ slapi_log_error(SLAPI_LOG_ERR, SYNTAX_PLUGIN_SUBSYSTEM,
+ "string_assertion2keys_ava - Unknown ftype 0x%x\n",
+ ftype);
break;
}
@@ -920,8 +923,8 @@ substring_comp_keys(
PR_ASSERT(NULL != comp_buf);
PR_ASSERT(NULL != substrlens);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> substring_comp_keys (%s) %d\n",
- str, prepost, 0 );
+ slapi_log_error(SLAPI_LOG_TRACE, SYNTAX_PLUGIN_SUBSYSTEM, "=> substring_comp_keys - (%s) %d\n",
+ str, prepost);
/* prepend ^ for initial substring */
if ( prepost == '^' )
@@ -963,5 +966,5 @@ substring_comp_keys(
(*nsubs)++;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= substring_comp_keys\n", 0, 0, 0 );
+ slapi_log_error(SLAPI_LOG_TRACE, SYNTAX_PLUGIN_SUBSYSTEM, "<= substring_comp_keys\n");
}
diff --git a/ldap/servers/plugins/syntaxes/syntax_common.c b/ldap/servers/plugins/syntaxes/syntax_common.c
index abaac10..6ca2555 100644
--- a/ldap/servers/plugins/syntaxes/syntax_common.c
+++ b/ldap/servers/plugins/syntaxes/syntax_common.c
@@ -51,8 +51,9 @@ syntax_matching_rule_plugin_init(
slapi_pblock_get(pb, SLAPI_PLUGIN_ARGV, &argv);
if (!argv || !argv[0]) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "syntax_matching_rule_plugin_init",
- "Error: matching rule plugin name not specified\n");
+ slapi_log_error(SLAPI_LOG_ERR, SYNTAX_PLUGIN_SUBSYSTEM,
+ "syntax_matching_rule_plugin_init - "
+ "Error: matching rule plugin name not specified\n");
return rc;
}
for (ii = 0; ii < mr_plugin_table_size; ++ii) {
@@ -77,9 +78,9 @@ syntax_matching_rule_plugin_init(
}
if (!mrpd) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "syntax_matching_rule_plugin_init",
- "Error: matching rule plugin name [%s] not found\n",
- argv[0]);
+ slapi_log_error(SLAPI_LOG_ERR, SYNTAX_PLUGIN_SUBSYSTEM,
+ "syntax_matching_rule_plugin_init - "
+ "Error: matching rule plugin name [%s] not found\n", argv[0]);
} else {
rc = slapi_matchingrule_register(&mrpd->mr_def_entry);
}
diff --git a/ldap/servers/plugins/syntaxes/tel.c b/ldap/servers/plugins/syntaxes/tel.c
index a777bdf..006c536 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, LOG_DEBUG, "=> tel_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= tel_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= 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 8255869..10e7040 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, LOG_DEBUG, "=> teletex_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= teletex_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= 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 14405f2..2f734ac 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, LOG_DEBUG, "=> telex_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "=> 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, LOG_DEBUG, "<= telex_init %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "<= telex_init %d\n", rc, 0, 0 );
return( rc );
}
diff --git a/ldap/servers/plugins/syntaxes/validate_task.c b/ldap/servers/plugins/syntaxes/validate_task.c
index abf99b5..203f1d3 100644
--- a/ldap/servers/plugins/syntaxes/validate_task.c
+++ b/ldap/servers/plugins/syntaxes/validate_task.c
@@ -132,8 +132,8 @@ 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, LOG_ERR, SYNTAX_PLUGIN_SUBSYSTEM,
- "unable to create task thread!\n");
+ slapi_log_error(SLAPI_LOG_ERR, SYNTAX_PLUGIN_SUBSYSTEM,
+ "syntax_validate_task_add - Unable to create task thread!\n");
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
slapi_task_finish(task, *returncode);
@@ -176,8 +176,8 @@ syntax_validate_task_thread(void *arg)
return; /* no task */
}
slapi_task_inc_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, SYNTAX_PLUGIN_SUBSYSTEM,
- "syntax_validate_task_thread --> refcount incremented.\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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,8 +185,8 @@ 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, LOG_ERR, SYNTAX_PLUGIN_SUBSYSTEM,
- "Syntax validate task starting (base: \"%s\", filter: \"%s\") ...\n",
+ slapi_log_error(SLAPI_LOG_ERR, SYNTAX_PLUGIN_SUBSYSTEM,
+ "syntax_validate_task_thread - Starting (base: \"%s\", filter: \"%s\") ...\n",
td->dn, td->filter_str);
/* Perform the search and use a callback
@@ -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, LOG_ERR, SYNTAX_PLUGIN_SUBSYSTEM, "Syntax validate task complete."
+ slapi_log_error(SLAPI_LOG_ERR, SYNTAX_PLUGIN_SUBSYSTEM, "syntax_validate_task_thread - Complete."
" Found %" NSPRIu64 " invalid entries.\n",
slapi_counter_get_value(td->invalid_entries));
slapi_task_inc_progress(task);
@@ -213,8 +213,8 @@ 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, LOG_DEBUG, SYNTAX_PLUGIN_SUBSYSTEM,
- "syntax_validate_task_thread <-- refcount decremented.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, SYNTAX_PLUGIN_SUBSYSTEM,
+ "syntax_validate_task_thread - refcount decremented.\n");
}
static int
@@ -244,8 +244,8 @@ 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, LOG_ERR, SYNTAX_PLUGIN_SUBSYSTEM,
- "Entry \"%s\" violates syntax.\n%s",
+ slapi_log_error(SLAPI_LOG_ERR, SYNTAX_PLUGIN_SUBSYSTEM,
+ "syntax_validate_task_callback - Entry \"%s\" violates syntax.\n%s",
dn, error_text);
slapi_pblock_destroy(pb);
diff --git a/ldap/servers/plugins/syntaxes/value.c b/ldap/servers/plugins/syntaxes/value.c
index 360e57f..ef496ee 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_PLUGIN,
"invalid syntax [%d]\n", syntax, 0, 0);
}
diff --git a/ldap/servers/plugins/uiduniq/7bit.c b/ldap/servers/plugins/uiduniq/7bit.c
index 1c0dcbb..ceafa7a 100644
--- a/ldap/servers/plugins/uiduniq/7bit.c
+++ b/ldap/servers/plugins/uiduniq/7bit.c
@@ -67,8 +67,8 @@ static char *moreInfo =
static int
op_error(int internal_error)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
- "Internal error: %d\n", internal_error);
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ "op_error - %d\n", internal_error);
return LDAP_OPERATIONS_ERROR;
}
@@ -78,8 +78,8 @@ issue_error(Slapi_PBlock *pb, int result, char *type, char *value)
{
char *moreinfop;
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
- "%s result %d\n", type, result);
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ "issue_error - %s result %d\n", type, result);
if (value == NULL) {
value = "unknown";
@@ -105,7 +105,7 @@ bit_check_one_berval(const struct berval *value, char **violated)
int i;
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "7-bit checking begin\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "bit_check_one_berval - 7-bit checking begin\n");
#endif
result = LDAP_SUCCESS;
@@ -166,8 +166,8 @@ bit_check(Slapi_Attr *attr, struct berval **values, char **violated)
}
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
- "7 bit check result = %d\n", result);
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ "bit_check - 7 bit check result = %d\n", result);
#endif
return result;
@@ -186,7 +186,7 @@ preop_add(Slapi_PBlock *pb)
char *pwd = NULL;
char *origpwd = NULL;
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "ADD begin\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "preop_add - 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, LOG_DEBUG, plugin_name, "ADD target=%s\n", dn);
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "preop_add - ADD target=%s\n", dn);
#endif
/*
@@ -290,8 +290,8 @@ preop_add(Slapi_PBlock *pb)
if (slapi_dn_issuffix(dn, *subtreeDN))
{
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
- "ADD subtree=%s\n", *subtreeDN);
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ "preop_add - ADD subtree=%s\n", *subtreeDN);
#endif
/*
@@ -348,8 +348,8 @@ preop_modify(Slapi_PBlock *pb)
int checkmodsCapacity = 0; /* max capacity of checkmods */
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
- "MODIFY begin\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ "preop_modify - MODIFY begin\n");
#endif
result = LDAP_SUCCESS;
@@ -472,8 +472,8 @@ preop_modify(Slapi_PBlock *pb)
if (slapi_dn_issuffix(target, *subtreeDN))
{
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
- "MODIFY subtree=%s\n", *subtreeDN);
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ "preop_modify - MODIFY subtree=%s\n", *subtreeDN);
#endif
/*
* Check if the value is 7-bit clean
@@ -511,8 +511,8 @@ preop_modrdn(Slapi_PBlock *pb)
char *violated = NULL;
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
- "MODRDN begin\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ "preop_modrdn - MODRDN begin\n");
#endif
/* Init */
@@ -572,8 +572,8 @@ preop_modrdn(Slapi_PBlock *pb)
if (err) { result = op_error(33); break; }
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
- "MODRDN newrdn=%s\n", rdn);
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ "preop_modrdn - MODRDN newrdn=%s\n", rdn);
#endif
/*
@@ -593,8 +593,8 @@ preop_modrdn(Slapi_PBlock *pb)
err = slapi_entry_add_rdn_values(e);
if (err)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
- "MODRDN bad rdn value=%s\n", rdn);
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ "preop_modrdn - MODRDN bad rdn value=%s\n", rdn);
break; /* Bad DN */
}
@@ -638,8 +638,8 @@ preop_modrdn(Slapi_PBlock *pb)
if (slapi_dn_issuffix(slapi_sdn_get_dn(superior), *subtreeDN))
{
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
- "MODRDN subtree=%s\n", *subtreeDN);
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ "preop_modrdn - 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, LOG_DEBUG, "NS7bitAttr_Init", "%d: %s\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "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, LOG_ERR, "NS7bitAttr_Init",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "NS7bitAttr_Init - "
"Invalid suffix: %s\n", *argv);
continue;
}
@@ -761,29 +761,28 @@ NS7bitAttr_Init(Slapi_PBlock *pb)
if (err) {
if(err == -1){
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "NS7bitAttr_Init","Error: %d\n", err);
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "NS7bitAttr_Init - Error: %d\n", err);
} else if(err == -2){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "NS7bitAttr_Init",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "NS7bitAttr_Init - "
"Invalid plugin arguments - missing arguments\n");
} else if(err == -3){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "NS7bitAttr_Init",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "NS7bitAttr_Init - "
"Invalid plugin arguments - missing \",\" separator argument\n");
} else if(err == -4){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "NS7bitAttr_Init",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "NS7bitAttr_Init - "
"Invalid plugin arguments - missing attributes\n");
} else if(err == -5){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "NS7bitAttr_Init",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "NS7bitAttr_Init - "
"Invalid plugin arguments - missing suffix\n");
} else if(err == -6){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "NS7bitAttr_Init",
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "NS7bitAttr_Init - "
"Invalid plugin arguments - Invalid suffix list\n");
}
err = -1;
}
else
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "NS7bitAttr_Init",
- "plugin loaded\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "NS7bitAttr_Init - plugin loaded\n");
return err;
}
diff --git a/ldap/servers/plugins/uiduniq/uid.c b/ldap/servers/plugins/uiduniq/uid.c
index 5542ae4..f05e15c 100644
--- a/ldap/servers/plugins/uiduniq/uid.c
+++ b/ldap/servers/plugins/uiduniq/uid.c
@@ -178,7 +178,8 @@ 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, LOG_ERR, plugin_name, "load_config failed to allocate configuration\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "uniqueness_entry_to_config - "
+ "Failed to allocate configuration\n");
rc = SLAPI_PLUGIN_FAILURE;
goto done;
} else {
@@ -209,7 +210,8 @@ 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, LOG_DEBUG, plugin_name, "Adding attribute %s to uniqueness set\n", tmp_config->attrs[i]);
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "uniqueness_entry_to_config - "
+ "Adding attribute %s to uniqueness set\n", tmp_config->attrs[i]);
}
slapi_ch_array_free(values);
values = NULL;
@@ -224,14 +226,13 @@ 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, LOG_ERR, plugin_name, "Config info: Invalid DN (skipped): %s\n", values[i]);
- continue;
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "uniqueness_entry_to_config - "
+ "Invalid DN (skipped): %s\n", values[i]);
+ continue;
}
tmp_config->subtrees[nb_subtrees] = slapi_sdn_new_dn_byval(values[i]);
nb_subtrees++;
-
}
-
slapi_ch_array_free(values);
values = NULL;
}
@@ -245,8 +246,9 @@ 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, LOG_ERR, plugin_name, "Config info: Invalid DN (skipped): %s\n", values[i]);
- continue;
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "uniqueness_entry_to_config - "
+ "Invalid DN (skipped): %s\n", values[i]);
+ continue;
}
tmp_config->exclude_subtrees[nb_subtrees] = slapi_sdn_new_dn_byval(values[i]);
nb_subtrees++;
@@ -275,10 +277,10 @@ 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, LOG_DEBUG, plugin_name, "Config fail: unable to parse old style\n");
- rc = SLAPI_PLUGIN_FAILURE;
- goto done;
-
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "uniqueness_entry_to_config - "
+ "Unable to parse old style\n");
+ rc = SLAPI_PLUGIN_FAILURE;
+ goto done;
}
if (UNTAGGED_PARAMETER == result) {
/* This is
@@ -293,9 +295,10 @@ 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, LOG_DEBUG, plugin_name, "Config fail: Only attribute name is valid\n");
- rc = SLAPI_PLUGIN_FAILURE;
- goto done;
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "uniqueness_entry_to_config - "
+ "Only attribute name is valid\n");
+ rc = SLAPI_PLUGIN_FAILURE;
+ goto done;
}
/* Store attrName in the config */
@@ -307,16 +310,18 @@ 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, LOG_ERR, plugin_name, "Config info: Fail to allocate subtree array\n");
- rc = SLAPI_PLUGIN_FAILURE;
- goto done;
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "uniqueness_entry_to_config - "
+ "Fail to allocate subtree array\n");
+ rc = SLAPI_PLUGIN_FAILURE;
+ goto done;
}
for (; argc > 0; argc--, argv++) {
if (slapi_dn_syntax_check(pb, *argv, 1)) { /* syntax check failed */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "Config info: Invalid DN (skipped): %s\n", *argv);
- continue;
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "uniqueness_entry_to_config - "
+ "Invalid DN (skipped): %s\n", *argv);
+ continue;
}
tmp_config->subtrees[nb_subtrees] = slapi_sdn_new_dn_byval(*argv);
nb_subtrees++;
@@ -352,15 +357,13 @@ uniqueness_entry_to_config(Slapi_PBlock *pb, Slapi_Entry *config_entry)
/* set the objectclasses retrieved by getArgument */
tmp_config->subtree_entries_oc = slapi_ch_strdup(requiredObjectClass);
tmp_config->top_entry_oc = slapi_ch_strdup(markerObjectClass);
-
}
-
}
/* 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, LOG_ERR, plugin_name, "Config info: attribute name not defined \n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "uniqueness_entry_to_config - Attribute name not defined \n");
rc = SLAPI_PLUGIN_FAILURE;
goto done;
}
@@ -381,13 +384,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, LOG_ERR, plugin_name, "Config info: objectclass for subtree entries is not defined\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "uniqueness_entry_to_config - 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, LOG_ERR, plugin_name, "Config info: No valid subtree is defined \n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "uniqueness_entry_to_config - No valid subtree is defined \n");
rc = SLAPI_PLUGIN_FAILURE;
goto done;
}
@@ -425,7 +428,6 @@ uid_op_error(int internal_error)
{
slapi_log_error(
SLAPI_LOG_PLUGIN,
- LOG_DEBUG,
plugin_name,
"Internal error: %d\n",
internal_error);
@@ -578,8 +580,8 @@ 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, LOG_DEBUG, plugin_name,
- "SEARCH baseDN=%s attr=%s target=%s\n", slapi_sdn_get_dn(baseDN), attrNames[0],
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ "search - SEARCH baseDN=%s attr=%s target=%s\n", slapi_sdn_get_dn(baseDN), attrNames[0],
target?slapi_sdn_get_dn(target):"None");
#endif
@@ -620,8 +622,8 @@ search(Slapi_DN *baseDN, const char **attrNames, Slapi_Attr *attr,
}
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
- "SEARCH result = %d\n", result);
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ "search - SEARCH result = %d\n", result);
#endif
return( result );
@@ -656,8 +658,8 @@ search_one_berval(Slapi_DN *baseDN, const char **attrNames,
filter = create_filter(attrNames, value, requiredObjectClass);
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
- "SEARCH filter=%s\n", filter);
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ "search_one_berval - SEARCH filter=%s\n", filter);
#endif
/* Perform the search using the new internal API */
@@ -688,8 +690,8 @@ search_one_berval(Slapi_DN *baseDN, const char **attrNames,
for(;*entries;entries++)
{
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
- "SEARCH entry dn=%s\n", slapi_entry_get_dn(*entries));
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ "search_one_berval - SEARCH entry dn=%s\n", slapi_entry_get_dn(*entries));
#endif
/*
@@ -724,8 +726,8 @@ search_one_berval(Slapi_DN *baseDN, const char **attrNames,
}
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
- "SEARCH complete result=%d\n", result);
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ "search_one_berval - SEARCH complete result=%d\n", result);
#endif
END
@@ -948,7 +950,7 @@ preop_add(Slapi_PBlock *pb)
char * attr_friendly = NULL;
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "ADD begin\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "ADD begin\n");
#endif
result = LDAP_SUCCESS;
@@ -979,7 +981,7 @@ preop_add(Slapi_PBlock *pb)
}
slapi_pblock_get(pb, SLAPI_PLUGIN_PRIVATE, &config);
if (config == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "preop_modrdn fail to retrieve the config\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "preop_add - Failed to retrieve the config\n");
result = LDAP_OPERATIONS_ERROR;
break;
}
@@ -999,7 +1001,7 @@ preop_add(Slapi_PBlock *pb)
if (err) { result = uid_op_error(51); break; }
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name, "ADD target=%s\n", slapi_sdn_get_dn(sdn));
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "preop_add - ADD target=%s\n", slapi_sdn_get_dn(sdn));
#endif
/*
@@ -1050,8 +1052,8 @@ preop_add(Slapi_PBlock *pb)
if (result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
- "ADD result %d\n", result);
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ "preop_add - ADD result %d\n", result);
if (result == LDAP_CONSTRAINT_VIOLATION) {
errtext = slapi_ch_smprintf(moreInfo, attr_friendly);
@@ -1101,8 +1103,8 @@ preop_modify(Slapi_PBlock *pb)
char *attr_friendly = NULL;
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
- "MODIFY begin\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ "preop_modify - MODIFY begin\n");
#endif
BEGIN
@@ -1129,7 +1131,7 @@ preop_modify(Slapi_PBlock *pb)
slapi_pblock_get(pb, SLAPI_PLUGIN_PRIVATE, &config);
if (config == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "preop_modrdn fail to retrieve the config\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "preop_modify - Failed to retrieve the config\n");
result = LDAP_OPERATIONS_ERROR;
break;
}
@@ -1217,8 +1219,8 @@ preop_modify(Slapi_PBlock *pb)
freePblock(spb);
if (result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
- "MODIFY result %d\n", result);
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ "preop_modify - MODIFY result %d\n", result);
if (result == LDAP_CONSTRAINT_VIOLATION) {
errtext = slapi_ch_smprintf(moreInfo, attr_friendly);
@@ -1253,8 +1255,8 @@ preop_modrdn(Slapi_PBlock *pb)
struct attr_uniqueness_config *config = NULL;
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
- "MODRDN begin\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ "preop_modrdn - MODRDN begin\n");
#endif
BEGIN
@@ -1281,7 +1283,7 @@ preop_modrdn(Slapi_PBlock *pb)
slapi_pblock_get(pb, SLAPI_PLUGIN_PRIVATE, &config);
if (config == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, plugin_name, "preop_modrdn fail to retrieve the config\n");
+ slapi_log_error(SLAPI_LOG_ERR, plugin_name, "preop_modrdn - Failed to retrieve the config\n");
result = LDAP_OPERATIONS_ERROR;
break;
}
@@ -1317,8 +1319,8 @@ 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, LOG_DEBUG, plugin_name,
- "MODRDN newrdn=%s\n", rdn);
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ "preop_modrdn - MODRDN newrdn=%s\n", rdn);
#endif
/* See if the old RDN value is being deleted. */
@@ -1384,8 +1386,8 @@ preop_modrdn(Slapi_PBlock *pb)
if (result)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, plugin_name,
- "MODRDN result %d\n", result);
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name,
+ "preop_modrdn - MODRDN result %d\n", result);
if (result == LDAP_CONSTRAINT_VIOLATION) {
errtext = slapi_ch_smprintf(moreInfo, config->attr_friendly);
@@ -1499,11 +1501,11 @@ NSUniqueAttr_Init(Slapi_PBlock *pb)
END
if (err) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "NSUniqueAttr_Init", "Error: %d\n", err);
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "NSUniqueAttr_Init - Error: %d\n", err);
err = -1;
}
else
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "NSUniqueAttr_Init", "plugin loaded\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "NSUniqueAttr_Init - plugin loaded\n");
return err;
}
diff --git a/ldap/servers/plugins/uiduniq/utils.c b/ldap/servers/plugins/uiduniq/utils.c
index d2a791e..61b1a86 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, LOG_DEBUG, plugin_name,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 a5ab18b..3a7796b 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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
"--> usn_init\n");
slapi_pblock_get(pb, SLAPI_PLUGIN_IDENTITY, &identity);
@@ -68,8 +68,8 @@ 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, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
- "usn_init: failed to register version & description\n");
+ slapi_log_error(SLAPI_LOG_ERR, USN_PLUGIN_SUBSYSTEM,
+ "usn_init - Failed to register version & description\n");
rc = -1;
goto bail;
}
@@ -77,8 +77,8 @@ 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, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
- "usn_init: failed to register close callback & task\n");
+ slapi_log_error(SLAPI_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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
"<-- usn_init\n");
return rc;
}
@@ -122,8 +122,8 @@ 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, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
- "usn_preop_init: failed to register preop plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, USN_PLUGIN_SUBSYSTEM,
+ "usn_preop_init - Failed to register preop plugin\n");
rc = SLAPI_PLUGIN_FAILURE;
}
@@ -143,8 +143,8 @@ 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, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
- "usn_bepreop_init: failed to register bepreop plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, USN_PLUGIN_SUBSYSTEM,
+ "usn_bepreop_init - Failed to register bepreop plugin\n");
rc = SLAPI_PLUGIN_FAILURE;
}
@@ -160,8 +160,8 @@ 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, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
- "usn_betxnpreop_init: failed to register betxnpreop plugin\n");
+ slapi_log_error(SLAPI_LOG_ERR, USN_PLUGIN_SUBSYSTEM,
+ "usn_betxnpreop_init - Failed to register betxnpreop plugin\n");
rc = SLAPI_PLUGIN_FAILURE;
}
@@ -195,8 +195,8 @@ 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, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
- "usn_bepostop_init: failed to register bepostop plugin\n");
+ slapi_log_error(SLAPI_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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM, "--> usn_start\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM, "--> usn_close\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM, "<-- usn_close\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
"--> usn_preop_delete\n");
slapi_pblock_get(pb, SLAPI_OPERATION, &op);
if (NULL == op) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
- "<-- usn_preop_delete failed; no operation.\n");
+ slapi_log_error(SLAPI_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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
"<-- usn_betxnpreop_delete\n");
return rc;
@@ -463,15 +463,15 @@ usn_bepreop_modify (Slapi_PBlock *pb)
Slapi_Backend *be = NULL;
int rc = SLAPI_PLUGIN_SUCCESS;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
- "usn_bepreop_modify: no backend.\n");
+ slapi_log_error(SLAPI_LOG_ERR, USN_PLUGIN_SUBSYSTEM,
+ "usn_bepreop_modify - No backend.\n");
rc = LDAP_PARAM_ERROR;
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &rc);
rc = SLAPI_PLUGIN_FAILURE;
@@ -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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
"<-- usn_bepostop\n");
return rc;
@@ -531,8 +531,8 @@ usn_bepostop_modify (Slapi_PBlock *pb)
LDAPMod **mods = NULL;
int i;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
- "--> usn_bepostop_mod\n");
+ slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ "--> usn_bepostop_modify\n");
/* if op is not successful, don't increment the counter */
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &rc);
@@ -546,8 +546,8 @@ 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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
- "usn_bepostop_mod: MOD_IGNORE detected\n");
+ slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ "usn_bepostop_modify - MOD_IGNORE detected\n");
goto bail; /* conflict occurred.
skip incrementing the counter. */
} else {
@@ -568,8 +568,8 @@ usn_bepostop_modify (Slapi_PBlock *pb)
slapi_counter_increment(be->be_usn_counter);
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
- "<-- usn_bepostop_mod\n");
+ slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ "<-- usn_bepostop_modify\n");
return rc;
}
@@ -582,8 +582,8 @@ usn_bepostop_delete (Slapi_PBlock *pb)
int rc = SLAPI_PLUGIN_FAILURE;
Slapi_Backend *be = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
- "--> usn_bepostop\n");
+ slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ "--> usn_bepostop_delete\n");
/* if op is not successful, don't increment the counter */
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &rc);
@@ -605,8 +605,8 @@ usn_bepostop_delete (Slapi_PBlock *pb)
slapi_counter_increment(be->be_usn_counter);
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
- "<-- usn_bepostop\n");
+ slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
+ "<-- usn_bepostop_delete\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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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 ca50e79..1e20f1e 100644
--- a/ldap/servers/plugins/usn/usn_cleanup.c
+++ b/ldap/servers/plugins/usn/usn_cleanup.c
@@ -59,16 +59,16 @@ usn_cleanup_thread(void *arg)
if (!task) {
return; /* no task */
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
"--> usn_cleanup_thread\n");
slapi_task_inc_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
- "usn_cleanup_thread --> refcount incremented.\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
- "USN tombstone cleanup: USN plugin is not initialized\n");
+ slapi_log_error(SLAPI_LOG_ERR, USN_PLUGIN_SUBSYSTEM,
+ "usn_cleanup_thread - USN plugin is not initialized\n");
rv = -1;
filter = NULL; /* so we don't try to free it */
goto bail;
@@ -102,8 +102,8 @@ 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, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
- "USN tombstone cleanup: no such suffix %s.\n",
+ slapi_log_error(SLAPI_LOG_ERR, USN_PLUGIN_SUBSYSTEM,
+ "usn_cleanup_thread - No such suffix %s.\n",
cleanup_data->suffix);
goto bail;
} else if (LDAP_SUCCESS != rv) {
@@ -113,8 +113,8 @@ 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, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
- "USN tombstone cleanup: searching tombstone entries in "
+ slapi_log_error(SLAPI_LOG_ERR, USN_PLUGIN_SUBSYSTEM,
+ "usn_cleanup_thread - Searching tombstone entries in "
"%s failed; (%d).\n", cleanup_data->suffix, rv);
goto bail;
}
@@ -122,8 +122,8 @@ 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, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
- "USN tombstone cleanup task starts (suffix: %s) ...\n",
+ slapi_log_error(SLAPI_LOG_INFO, USN_PLUGIN_SUBSYSTEM,
+ "usn_cleanup_thread - USN tombstone cleanup task starts (suffix: %s) ...\n",
cleanup_data->suffix);
slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries);
@@ -138,8 +138,8 @@ 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, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
- "USN tombstone cleanup task aborted due to shutdown.\n");
+ slapi_log_error(SLAPI_LOG_NOTICE, USN_PLUGIN_SUBSYSTEM,
+ "usn_cleanup_thread - Task aborted due to shutdown.\n");
goto bail;
}
@@ -154,8 +154,8 @@ 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, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
- "USN tombstone cleanup: deleting %s failed; (%d).\n",
+ slapi_log_error(SLAPI_LOG_ERR, USN_PLUGIN_SUBSYSTEM,
+ "usn_cleanup_thread - Deleting %s failed; (%d).\n",
slapi_sdn_get_dn(sdn), delrv);
rv = delrv;
}
@@ -165,8 +165,8 @@ 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, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
- "USN tombstone cleanup task finished.\n");
+ slapi_log_error(SLAPI_LOG_INFO, USN_PLUGIN_SUBSYSTEM,
+ "usn_cleanup_thread - USN tombstone cleanup task finished.\n");
bail:
slapi_free_search_results_internal(search_pb);
slapi_pblock_destroy(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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
- "usn_cleanup_thread <-- refcount decremented.\n");
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_PLUGIN, USN_PLUGIN_SUBSYSTEM,
+ "usn_cleanup_thread - refcount decremented.\n");
+ slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
"<-- usn_cleanup_thread\n");
}
@@ -198,8 +198,8 @@ _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, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
- "_usn_cleanup_is_mmr_enabled: failed to normalize "
+ slapi_log_error(SLAPI_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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM,
"--> usn_cleanup_add\n");
*returncode = LDAP_SUCCESS;
@@ -261,8 +261,8 @@ 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, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
- "USN tombstone cleanup: Both suffix and backend are missing.\n");
+ slapi_log_error(SLAPI_LOG_ERR, USN_PLUGIN_SUBSYSTEM,
+ "usn_cleanup_add - Both suffix and backend are missing.\n");
*returncode = LDAP_PARAM_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto bail;
@@ -275,8 +275,8 @@ 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, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
- "USN tombstone cleanup: Backend %s is invalid.\n", backend);
+ slapi_log_error(SLAPI_LOG_ERR, USN_PLUGIN_SUBSYSTEM,
+ "usn_cleanup_add - Backend %s is invalid.\n", backend);
*returncode = LDAP_PARAM_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto bail;
@@ -286,8 +286,8 @@ 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, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
- "USN tombstone cleanup: Suffix %s is replicated. Unwilling to "
+ slapi_log_error(SLAPI_LOG_ERR, USN_PLUGIN_SUBSYSTEM,
+ "usn_cleanup_add - Suffix %s is replicated. Unwilling to "
"perform cleaning up tombstones.\n", suffix);
*returncode = LDAP_UNWILLING_TO_PERFORM;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -297,8 +297,8 @@ 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, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
- "USN tombstone cleanup: unable to allocate new task.\n");
+ slapi_log_error(SLAPI_LOG_ERR, USN_PLUGIN_SUBSYSTEM,
+ "usn_cleanup_add - Unable to allocate new task.\n");
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto bail;
@@ -323,8 +323,8 @@ 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, LOG_ERR, USN_PLUGIN_SUBSYSTEM,
- "USN tombstone cleanup: unable to create task thread.\n");
+ slapi_log_error(SLAPI_LOG_ERR, USN_PLUGIN_SUBSYSTEM,
+ "usn_cleanup_add - Unable to create task thread.\n");
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
slapi_task_finish(task, *returncode);
@@ -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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM, "usn_cleanup_task_destructor -->\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, USN_PLUGIN_SUBSYSTEM, "usn_cleanup_task_destructor <--\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 b8b905f..149dc9d 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, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"--> vattrsp_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, VATTRSP_PLUGIN_SUBSYSTEM,
- "vattrsp_init: failed to register plugin\n" );
+ slapi_log_error(SLAPI_LOG_ERR, VATTRSP_PLUGIN_SUBSYSTEM,
+ "vattrsp_init - Failed to register plugin\n" );
ret = -1;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"<-- vattrsp_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"--> vattrsp_start\n");
+ slapi_log_error(SLAPI_LOG_TRACE, VATTRSP_PLUGIN_SUBSYSTEM,"--> vattrsp_start\n");
/* register this vattr service provider with vattr subsystem */
if (slapi_vattrspi_register((vattr_sp_handle **)&vattr_handle,
@@ -166,8 +166,8 @@ int vattrsp_start( Slapi_PBlock *pb )
vattrsp_vattr_compare,
vattrsp_vattr_types) != 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, VATTRSP_PLUGIN_SUBSYSTEM,
- "vattrsp_start: cannot register as service provider\n" );
+ slapi_log_error(SLAPI_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, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"<-- vattrsp_start\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"--> vattrsp_close\n");
+ slapi_log_error(SLAPI_LOG_TRACE, VATTRSP_PLUGIN_SUBSYSTEM,"--> vattrsp_close\n");
/* clean up stuff here */
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"<-- vattrsp_close\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"--> vattrsp_vattr_get\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"<-- vattrsp_cache_vattr_get\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"--> vattrsp_vattr_compare\n");
+ slapi_log_error(SLAPI_LOG_TRACE, VATTRSP_PLUGIN_SUBSYSTEM,"--> vattrsp_vattr_compare\n");
/* TODO: do your thing, compare the attribute */
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"<-- vattrsp_vattr_compare\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"--> vattrsp_vattr_types\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, VATTRSP_PLUGIN_SUBSYSTEM,"<-- vattrsp_vattr_types\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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 97b07bd..6bba173 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, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "--> views_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, VIEWS_PLUGIN_SUBSYSTEM,
+ slapi_log_error(SLAPI_LOG_ERR, VIEWS_PLUGIN_SUBSYSTEM,
"views_init: failed to register plugin\n" );
ret = SLAPI_PLUGIN_FAILURE;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "<-- views_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "--> views_start\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, VIEWS_PLUGIN_SUBSYSTEM, "views: failed to publish views interface\n");
+ slapi_log_error(SLAPI_LOG_ERR, VIEWS_PLUGIN_SUBSYSTEM, "views_start - 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, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "<-- views_start\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "--> views_close\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "<-- views_close\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "--> views_cache_free\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "<-- views_cache_free\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "--> views_cache_create\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, VIEWS_PLUGIN_SUBSYSTEM, "views_cache_create: failed to index cache\n");
+ slapi_log_error(SLAPI_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, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "<-- views_cache_create\n");
+ slapi_log_error(SLAPI_LOG_TRACE, VIEWS_PLUGIN_SUBSYSTEM, "<-- views_cache_create\n");
return ret;
}
@@ -797,8 +797,8 @@ static void views_cache_create_applied_filter(viewEntry *pView)
pCurrentFilter = slapi_str2filter( buf );
if (!pCurrentFilter) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, VIEWS_PLUGIN_SUBSYSTEM,
- "Error: the view filter [%s] in entry [%s] is not valid\n",
+ slapi_log_error(SLAPI_LOG_ERR, VIEWS_PLUGIN_SUBSYSTEM,
+ "views_cache_create_applied_filter - View filter [%s] in entry [%s] is not valid\n",
buf, current->pDn);
}
if(pBuiltFilter && pCurrentFilter)
@@ -973,8 +973,8 @@ Slapi_Filter *views_cache_create_descendent_filter(viewEntry *ancestor, PRBool u
{
pCurrentFilter = slapi_str2filter( buf );
if (!pCurrentFilter) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, VIEWS_PLUGIN_SUBSYSTEM,
- "Error: the view filter [%s] in entry [%s] is not valid\n",
+ slapi_log_error(SLAPI_LOG_ERR, VIEWS_PLUGIN_SUBSYSTEM,
+ "views_cache_create_descendent_filter - View filter [%s] in entry [%s] is invalid\n",
buf, currentChild->pDn);
}
if(pOrSubFilter && pCurrentFilter)
@@ -1037,8 +1037,8 @@ 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, LOG_ERR, VIEWS_PLUGIN_SUBSYSTEM,
- "Error: the view filter [%s] in entry [%s] is not valid\n",
+ slapi_log_error(SLAPI_LOG_ERR, VIEWS_PLUGIN_SUBSYSTEM,
+ "views_cache_create_inclusion_filter - View filter [%s] in entry [%s] is invalid\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, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "--> views_cache_build_view_list\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "views: Building view cache.\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, VIEWS_PLUGIN_SUBSYSTEM, "views_cache_build_view_list - 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, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "views_cache_build_view_list: failed to find suffixes\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "<-- views_cache_build_view_list\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "--> views_cache_add_ll_entry\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "<-- views_cache_add_ll_entry\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "--> views_update_views_cache\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG, VIEWS_PLUGIN_SUBSYSTEM, "<-- views_update_views_cache\n");
+ slapi_log_error(SLAPI_LOG_TRACE, VIEWS_PLUGIN_SUBSYSTEM, "<-- views_update_views_cache\n");
}
@@ -1876,8 +1876,8 @@ 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, LOG_ERR, VIEWS_PLUGIN_SUBSYSTEM,
- "views_cache_backend_state_change: PR_CreateThread failed\n" );
+ slapi_log_error(SLAPI_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 493fff9..450be84 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, LOG_ERR, PLUGIN_NAME, "Could not get OID from request\n" );
+ slapi_log_error(SLAPI_LOG_ERR, PLUGIN_NAME, "whoami_exop - 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, LOG_ERR, PLUGIN_NAME, "Could not get correct request value from request\n" );
+ slapi_log_error(SLAPI_LOG_ERR, PLUGIN_NAME, "whoami_exop - 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, LOG_ERR, PLUGIN_NAME, "Could not get client_dn" );
+ slapi_log_error(SLAPI_LOG_ERR, PLUGIN_NAME, "whoami_exop - 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, LOG_ERR, PLUGIN_NAME, "Could not set return values" );
+ slapi_log_error(SLAPI_LOG_ERR, PLUGIN_NAME, "whoami_exop - 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, LOG_ERR, PLUGIN_NAME, "whoami_init: Failed to register plug-in.\n" );
+ slapi_log_error(SLAPI_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 8c3fd30..c391435 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, LOG_DEBUG, "do_abandon\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "do_abandon\n", 0, 0, 0 );
/*
* Parse the abandon request. It looks like this:
@@ -47,8 +47,8 @@ do_abandon( Slapi_PBlock *pb )
*/
if ( ber_scanf( ber, "i", &id ) == LBER_ERROR ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ber_scanf failed (op=Abandon; params=ID)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "do_abandon - 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, LOG_ERR,
- "get_ldapmessage_controls failed: %d (%s) (op=Abandon)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "do_abandon - 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, LOG_DEBUG, "do_abandon: id %d\n", id, 0 ,0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, "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, LOG_DEBUG, "do_abandon: no target spec of abandoned operation\n", 0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "do_abandon - no target spec of abandoned operation\n", 0,0,0);
}
operation_set_abandoned_op (pb->pb_op, o->o_abandoned_op);
@@ -116,7 +116,7 @@ do_abandon( Slapi_PBlock *pb )
suppressed_by_plugin = 1;
}
} else {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "do_abandon: op not found\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "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 121e72c..81440ae 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, LOG_DEBUG, "do_add\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "do_add\n", 0, 0, 0 );
slapi_pblock_get( pb, SLAPI_OPERATION, &operation);
ber = operation->o_ber;
@@ -86,8 +86,8 @@ 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, LOG_ERR,
- "ber_scanf failed (op=Add; params=DN)\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "do_add - 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,
"decoding error", 0, 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, LOG_DEBUG, " do_add: dn (%s)\n", slapi_entry_get_dn_const(e), 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, " 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, LOG_ERR, "no values for type %s\n", type, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "do_add - 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 );
@@ -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, LOG_DEBUG, NULL, "slapi_add_internal_set_pb: invalid argument\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, NULL, "slapi_add_entry_internal_set_pb: invalid argument\n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, NULL, "slapi_add_entry_internal_set_pb: invalid argument\n");
return;
}
@@ -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, LOG_DEBUG, "add_created_attrs\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "Invalid DN. RDN contains %s attribute\n", type[i], 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "check_rdn_for_created_attrs: Error allocating RDN\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "check_rdn_for_created_attrs: Error allocating RDN\n", 0, 0, 0);
rc = -1;
}
@@ -907,8 +907,8 @@ 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, LOG_ERR,
- "handle_fast_add: backend not supported\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG, "entry failed schema check\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "handle_fast_add - 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, LOG_DEBUG, "entry failed syntax check\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "handle_fast_add - 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,8 +954,8 @@ 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, LOG_ERR,
- "wire import: error during import (%d)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "handle_fast_add - wire import: error during import (%d)\n",
ret, 0, 0);
send_ldap_result(pb, LDAP_OPERATIONS_ERROR,
NULL, NULL, 0, NULL);
@@ -988,7 +988,7 @@ add_uniqueid (Slapi_Entry *e)
}
else
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "add_created_attrs: uniqueid generation failed for %s; error = %d\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "add_uniqueid - Uniqueid generation failed for %s; error = %d\n",
slapi_entry_get_dn_const(e), rc, 0);
}
diff --git a/ldap/servers/slapd/attr.c b/ldap/servers/slapd/attr.c
index 6f816c8..4d87209 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, LOG_DEBUG, NULL, "add value \"%s\" to "
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_DEBUG,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE,
"=> slapi_attr_get_value_cmp_fn\n");
*compare_fn = NULL;
if (attr == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE,
"<= 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, LOG_DEBUG,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE,
"<= 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, LOG_DEBUG,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE,
"<= 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, LOG_DEBUG,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE,
"<= 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, LOG_DEBUG, "<= slapi_attr_get_value_cmp_fn \n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "<= slapi_attr_get_value_cmp_fn \n");
return rc;
}
diff --git a/ldap/servers/slapd/attrlist.c b/ldap/servers/slapd/attrlist.c
index 384d5fe..1ab5e17 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, LOG_ERR, "attrlist_replace",
+ slapi_log_error(SLAPI_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, LOG_ERR, "attrlist_replace",
+ slapi_log_error(SLAPI_LOG_ERR, "attrlist_replace_with_flags",
"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 6932047..5083b5e 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, LOG_ERR, "NULL passed to check_oid\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "check_oid - 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, LOG_ERR, "Bad oid %s passed to check_oid\n",oid,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "check_oid - 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, LOG_ERR, "Non numeric oid %s passed to check_oid\n",oid,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "check_oid - 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, LOG_ERR, "Non numeric oid %s passed to check_oid\n",oid,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "check_oid - 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, LOG_ERR, "Error: bad oid %s in bucket %d\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "attr_syntax_check_oids - bad oid %s in bucket %d\n",
he->key, ii-1, 0);
nbad++;
}
@@ -670,8 +670,8 @@ 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, LOG_ERR,
- "default_dirstring_values2keys: unsupported ftype 0x%x\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "default_dirstring_values2keys - Unsupported ftype 0x%x\n",
ftype, 0, 0 );
break;
}
@@ -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, LOG_ERR, "attr_syntax_create",
+ slapi_log_error(SLAPI_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, LOG_ERR, "attr_syntax_create",
+ slapi_log_error(SLAPI_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, LOG_ERR, "attr_syntax_create",
+ slapi_log_error(SLAPI_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, LOG_ERR, "attr_syntax_init",
+ slapi_log_error(SLAPI_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, LOG_ERR, "attr_syntax_init",
+ slapi_log_error(SLAPI_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, LOG_ERR, "attr_syntax_internal_asi_add_ht",
+ slapi_log_error(SLAPI_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, LOG_ERR, "attr_syntax_internal_asi_add_ht",
+ slapi_log_error(SLAPI_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, LOG_ERR,
+ slapi_log_error(SLAPI_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, LOG_DEBUG, "attr_reload_internal_attr_syntax",
+ slapi_log_error(SLAPI_LOG_TRACE, "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 62851ef..9d0f144 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, LOG_ERR, "write_audit_log: Invalid log type specified. logtype %d\n", logtype);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "write_audit_log - Invalid log type specified. logtype %d\n", logtype);
break;
}
diff --git a/ldap/servers/slapd/auth.c b/ldap/servers/slapd/auth.c
index f7dd9ce..a109847 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, LOG_DEBUG, "=> slapu_search_s (\"%s\", %i, %s)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_ERR, "slapi_search_internal (\"%s\", subtree, %s) err %i\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "slapu_search_s - (\"%s\", subtree, %s) err %i\n",
baseDN, escape_string( (char*)filter, fbuf ), err);
}
}
} else {
char fbuf[ BUFSIZ ];
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "slapi_search_internal (\"%s\", %i, %s) NULL\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "slapu_search_s - (\"%s\", %i, %s) NULL\n",
baseDN, scope, escape_string( (char*)filter, fbuf ));
}
slapi_sdn_free(&sdn);
*result = (LDAPMessage*)pb;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= slapu_search_s %i\n", err, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= slapu_search_s %i\n", err, 0, 0);
return err;
}
@@ -260,15 +260,15 @@ client_auth_init ()
if (client_auth_config_file == NULL) {
char *confdir = config_get_configdir();
if (NULL == confdir) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "client_auth_init: failed to get configdir\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR,
- "client_auth_init: failed to duplicate \"%s/certmap\"\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "client_auth_init - Failed to duplicate \"%s/certmap\"\n",
confdir, 0, 0);
slapi_ch_free_string(&confdir);
return;
@@ -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, LOG_DEBUG, "ldaputil_init(%s,...) %i\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "client_auth_init - 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, LOG_ERR, "ldapu_get_cert_subject_dn(%p) %i (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "subject_of - 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, LOG_ERR, "ldapu_get_cert_issuer_dn(%p) %i (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "issuer_of - 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, LOG_DEBUG, "<= ldapu_cert_to_ldap_entry() %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= ldapu_cert_to_ldap_entry() %s\n",
extraErrorMsg, 0, 0);
}
} else {
extraErrorMsg = ldapu_err2string(err);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ldapu_cert_to_ldap_entry() %i (%s)%s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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 006ac6b..50c95ca 100644
--- a/ldap/servers/slapd/ava.c
+++ b/ldap/servers/slapd/ava.c
@@ -27,11 +27,10 @@ get_ava(
{
char *type = NULL;
- if ( ber_scanf( ber, "{ao}", &type, &ava->ava_value )
- == LBER_ERROR ) {
+ if ( ber_scanf( ber, "{ao}", &type, &ava->ava_value ) == LBER_ERROR ) {
slapi_ch_free_string( &type );
ava_done(ava);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, " get_ava ber_scanf\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_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 3bb3555..b0998ed 100644
--- a/ldap/servers/slapd/back-ldbm/ancestorid.c
+++ b/ldap/servers/slapd/back-ldbm/ancestorid.c
@@ -74,7 +74,7 @@ static int ldbm_get_nonleaf_ids(backend *be, DB_TXN *txn, IDList **idl, ImportJo
ldbm_nasty(sourcefile,13020,ret);
goto out;
}
- import_log_notice(job, "Gathering ancestorid non-leaf IDs...");
+ import_log_notice(job, SLAPI_LOG_INFO, "ldbm_get_nonleaf_ids", "Gathering ancestorid non-leaf IDs...");
/* For each key which is an equality key */
do {
ret = dbc->c_get(dbc,&key,&data,DB_NEXT_NODUP);
@@ -84,7 +84,8 @@ static int ldbm_get_nonleaf_ids(backend *be, DB_TXN *txn, IDList **idl, ImportJo
}
key_count++;
if(!(key_count % PROGRESS_INTERVAL)){
- import_log_notice(job, "Gathering ancestorid non-leaf IDs: processed %d%% (ID count %d)",
+ import_log_notice(job, SLAPI_LOG_INFO, "ldbm_get_nonleaf_ids",
+ "Gathering ancestorid non-leaf IDs: processed %d%% (ID count %d)",
(key_count * 100 / job->numsubordinates), key_count);
started_progress_logging = 1;
}
@@ -92,11 +93,13 @@ static int ldbm_get_nonleaf_ids(backend *be, DB_TXN *txn, IDList **idl, ImportJo
if(started_progress_logging){
/* finish what we started logging */
- import_log_notice(job, "Gathering ancestorid non-leaf IDs: processed %d%% (ID count %d)",
+ import_log_notice(job, SLAPI_LOG_INFO, "ldbm_get_nonleaf_ids",
+ "Gathering ancestorid non-leaf IDs: processed %d%% (ID count %d)",
(key_count * 100 / job->numsubordinates), key_count);
}
- import_log_notice(job, "Finished gathering ancestorid non-leaf IDs.");
+ import_log_notice(job, SLAPI_LOG_INFO, "ldbm_get_nonleaf_ids",
+ "Finished gathering ancestorid non-leaf IDs.");
/* Check for success */
if (ret == DB_NOTFOUND) ret = 0;
if (ret != 0) ldbm_nasty(sourcefile,13030,ret);
@@ -120,7 +123,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, LOG_DEBUG, "found %lu nodes for ancestorid\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "found %lu nodes for ancestorid\n",
(u_long)IDL_NIDS(nodes), 0, 0);
} else {
idl_free(&nodes);
@@ -207,8 +210,8 @@ 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, LOG_ERR, "Nothing to do to build ancestorid index\n",
- 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_ancestorid_default_create_index - "
+ "Nothing to do to build ancestorid index\n", 0, 0, 0);
goto out;
}
@@ -221,7 +224,7 @@ static int ldbm_ancestorid_default_create_index(backend *be, ImportJob *job)
/* Open the parentid index file */
ret = dblayer_get_index_file(be, ai_pid, &db_pid, DBOPEN_CREATE);
if (ret != 0) {
- ldbm_nasty(sourcefile,13060,ret);
+ ldbm_nasty("ldbm_ancestorid_default_create_index",13060,ret);
goto out;
}
@@ -230,7 +233,8 @@ static int ldbm_ancestorid_default_create_index(backend *be, ImportJob *job)
key.ulen = sizeof(keybuf);
key.flags = DB_DBT_USERMEM;
- import_log_notice(job, "Creating ancestorid index (old idl)...");
+ import_log_notice(job, SLAPI_LOG_INFO, "ldbm_ancestorid_default_create_index",
+ "Creating ancestorid index (old idl)...");
/* Iterate from highest to lowest ID */
nids = nodes->b_nids;
do {
@@ -251,14 +255,16 @@ static int ldbm_ancestorid_default_create_index(backend *be, ImportJob *job)
/* check if we need to abort */
if(job->flags & FLAG_ABORT){
- import_log_notice(job, "ancestorid creation aborted.");
+ import_log_notice(job, SLAPI_LOG_ERR, "ldbm_ancestorid_default_create_index",
+ "ancestorid creation aborted.");
ret = -1;
break;
}
key_count++;
if(!(key_count % PROGRESS_INTERVAL)){
- import_log_notice(job, "Creating ancestorid index: processed %d%% (ID count %d)",
+ import_log_notice(job, SLAPI_LOG_INFO, "ldbm_ancestorid_default_create_index",
+ "Creating ancestorid index: processed %d%% (ID count %d)",
(key_count * 100 / job->numsubordinates), key_count);
started_progress_logging = 1;
}
@@ -268,7 +274,8 @@ 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, LOG_ERR, "ancestorid hash_remove failed\n", 0,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_ancestorid_default_create_index - "
+ "id2idl_hash_remove() failed\n", 0,0,0);
} else {
id2idl_free(&ididl);
}
@@ -302,7 +309,8 @@ 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, LOG_ERR, "ancestorid hash_add failed\n", 0,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_ancestorid_default_create_index - "
+ "id2idl_hash_add failed\n", 0,0,0);
}
}
@@ -337,10 +345,12 @@ static int ldbm_ancestorid_default_create_index(backend *be, ImportJob *job)
if (ret == 0) {
if(started_progress_logging){
/* finish what we started logging */
- import_log_notice(job, "Creating ancestorid index: processed %d%% (ID count %d)",
+ import_log_notice(job, SLAPI_LOG_INFO, "ldbm_ancestorid_default_create_index",
+ "Creating ancestorid index: processed %d%% (ID count %d)",
(key_count * 100 / job->numsubordinates), key_count);
}
- import_log_notice(job, "Created ancestorid index (old idl).");
+ import_log_notice(job, SLAPI_LOG_INFO, "ldbm_ancestorid_default_create_index",
+ "Created ancestorid index (old idl).");
ai_aid->ai_indexmask &= ~INDEX_OFFLINE;
}
@@ -384,7 +394,8 @@ 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, LOG_ERR, "Cannot create ancestorid index. "
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_ancestorid_new_idl_create_index - "
+ "Cannot create ancestorid index. "
"New IDL version called but idl_new is false!\n", 0,0,0);
return 1;
}
@@ -408,8 +419,8 @@ 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, LOG_ERR, "Nothing to do to build ancestorid index\n",
- 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_ancestorid_new_idl_create_index - "
+ "Nothing to do to build ancestorid index\n", 0, 0, 0);
goto out;
}
@@ -428,7 +439,8 @@ static int ldbm_ancestorid_new_idl_create_index(backend *be, ImportJob *job)
key.ulen = sizeof(keybuf);
key.flags = DB_DBT_USERMEM;
- import_log_notice(job, "Creating ancestorid index (new idl)...");
+ import_log_notice(job, SLAPI_LOG_INFO, "ldbm_ancestorid_new_idl_create_index",
+ "Creating ancestorid index (new idl)...");
/* Iterate from highest to lowest ID */
nids = nodes->b_nids;
do {
@@ -449,14 +461,16 @@ static int ldbm_ancestorid_new_idl_create_index(backend *be, ImportJob *job)
/* check if we need to abort */
if(job->flags & FLAG_ABORT){
- import_log_notice(job, "ancestorid creation aborted.");
+ import_log_notice(job, SLAPI_LOG_ERR, "ldbm_ancestorid_new_idl_create_index",
+ "ancestorid creation aborted.");
ret = -1;
break;
}
key_count++;
if(!(key_count % PROGRESS_INTERVAL)){
- import_log_notice(job, "Creating ancestorid index: progress %d%% (ID count %d)",
+ import_log_notice(job, SLAPI_LOG_INFO, "ldbm_ancestorid_new_idl_create_index",
+ "Creating ancestorid index: progress %d%% (ID count %d)",
(key_count * 100 / job->numsubordinates), key_count);
started_progress_logging = 1;
}
@@ -482,8 +496,8 @@ 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, LOG_ERR, sourcefile,
- "Error: ldbm_parentid on node index [" ID_FMT "] of [" ID_FMT "]\n",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_ancestorid_new_idl_create_index",
+ "Failure: ldbm_parentid on node index [" ID_FMT "] of [" ID_FMT "]\n",
nids, nodes->b_nids);
idl_free(&children);
goto out;
@@ -518,12 +532,15 @@ static int ldbm_ancestorid_new_idl_create_index(backend *be, ImportJob *job)
if (ret == 0) {
if(started_progress_logging){
/* finish what we started logging */
- import_log_notice(job, "Creating ancestorid index: processed %d%% (ID count %d)",
+ import_log_notice(job, SLAPI_LOG_INFO, "ldbm_ancestorid_new_idl_create_index",
+ "Creating ancestorid index: processed %d%% (ID count %d)",
(key_count * 100 / job->numsubordinates), key_count);
}
- import_log_notice(job, "Created ancestorid index (new idl).");
+ import_log_notice(job, SLAPI_LOG_INFO, "ldbm_ancestorid_new_idl_create_index",
+ "Created ancestorid index (new idl).");
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to create ancestorid index\n", 0,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_ancestorid_new_idl_create_index - "
+ "Failed to create ancestorid index\n", 0,0,0);
}
/* Free any leftover idlists */
@@ -578,8 +595,8 @@ 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, LOG_ERR, sourcefile,
- "Error: unable to find entry id [" ID_FMT "] (original [" ID_FMT "])"
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_parentid",
+ "Unable to find entry id [" ID_FMT "] (original [" ID_FMT "])"
" in id2entry\n", stored_id, id);
goto out;
}
@@ -632,7 +649,7 @@ static int check_cache(id2idl_hash *ht)
}
if (found > 0) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: parentid index is not complete (%lu extra keys in ancestorid cache)\n", found,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "check_cache - parentid index is not complete (%lu extra keys in ancestorid cache)\n", found,0,0);
ret = -1;
}
@@ -699,13 +716,13 @@ static int ancestorid_addordel(
if (flags & BE_INDEX_ADD) {
#if 1
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "insert ancestorid %lu:%lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "ancestorid_addordel - 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, LOG_DEBUG, "delete ancestorid %lu:%lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "ancestorid_addordel - Delete ancestorid %lu:%lu\n",
(u_long)node_id, (u_long)id, 0);
#endif
ret = idl_delete_key(be, db, &key, id, txn, ai);
@@ -788,7 +805,8 @@ static int ldbm_ancestorid_index_update(
if (err) {
if (DB_NOTFOUND != err) {
ldbm_nasty(sourcefile,13141,err);
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "entryrdn_index_read(%s)\n", slapi_sdn_get_dn(&sdn));
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "ldbm_ancestorid_index_update - "
+ "entryrdn_index_read(%s)\n", slapi_sdn_get_dn(&sdn));
ret = err;
}
break;
@@ -958,14 +976,14 @@ _sdn_suffix_cmp(
/* return the DN */
slapi_sdn_set_dn_passin(common, ndnstr);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "common suffix <%s>\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "_sdn_suffix_cmp - 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, LOG_DEBUG, "_sdn_suffix_cmp(<%s>, <%s>) => %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "_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 899e61b..081cda0 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, LOG_ERR, "archive2db: no archive name\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "ldbm_back_archive2ldbm - No archive name\n");
return -1;
}
@@ -47,12 +47,12 @@ 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, LOG_ERR, "archive2db: no back up \"%s\" exists.\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "ldbm_back_archive2ldbm - No back up \"%s\" exists.\n",
directory);
return -1;
}
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "Warning: Unable to read dbversion file in %s\n",
- directory);
+ LDAPDebug1Arg(LDAP_DEBUG_WARNING, "ldbm_back_archive2ldbm - "
+ "Unable to read dbversion file in %s\n", directory);
}
/* check the current idl format vs backup DB version */
@@ -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, LOG_ERR, "archive2db: failed to write restore file.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "ldbm_back_archive2ldbm - 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, LOG_ERR, "archive2db: backend \"%s\" does not exist.\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "ldbm_back_archive2ldbm - Backend \"%s\" does not exist.\n",
backendname);
return -1;
}
@@ -90,15 +90,15 @@ 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, LOG_ERR,
- "backup has old idl format; "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_archive2ldbm - Backup has old idl format; "
"to restore old formated backup onto the new server, "
"please use command line utility \"bak2db\" .\n",
0, 0, 0);
if (task)
{
slapi_task_log_notice(task,
- "backup has old idl format; "
+ "Backup has old idl format; "
"to restore old formated backup onto the new server, "
"please use command line utility \"bak2db\" .");
}
@@ -111,8 +111,8 @@ 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, LOG_ERR,
- "ldbm: '%s' is already in the middle of "
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "ldbm_back_archive2ldbm - '%s' is already in the middle of "
"another task and cannot be disturbed.\n",
inst->inst_name, 0, 0);
if (task) {
@@ -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, LOG_ERR, "Bringing %s offline...\n",
+ LDAPDebug(LDAP_DEBUG_INFO, "ldbm_back_archive2ldbm - Bringing %s offline...\n",
inst->inst_name, 0, 0);
if (task) {
slapi_task_log_notice(task, "Bringing %s offline...",
@@ -165,8 +165,8 @@ 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, LOG_ERR,
- "archive2db: Failed to read backup file set. "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_archive2ldbm - Failed to read backup file set. "
"Either the directory specified doesn't exist, "
"or it exists but doesn't contain a valid backup set, "
"or file permissions prevent the server reading "
@@ -206,8 +206,8 @@ 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, LOG_ERR,
- "archive2db: backup dir: %s\n", bakup_dir, 0, 0);
+ LDAPDebug(LDAP_DEBUG_INFO,
+ "ldbm_back_archive2ldbm - backup dir: %s\n", bakup_dir, 0, 0);
if (p) *p = c;
slapi_pblock_set( pb, SLAPI_SEQ_VAL, bakup_dir );
@@ -225,8 +225,8 @@ 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, LOG_ERR,
- "archive2db: Unable to to start database in [%s]\n", li->li_directory);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "ldbm_back_archive2ldbm - Unable to to start database in [%s]\n", li->li_directory);
if (task) {
slapi_task_log_notice(task, "Failed to start the database in "
"%s", li->li_directory);
@@ -241,8 +241,8 @@ 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, LOG_ERR,
- "archive2db: Unable to restart '%s'\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_archive2ldbm - Unable to restart '%s'\n",
inst->inst_name, 0, 0);
if (task) {
slapi_task_log_notice(task, "Unable to restart '%s'",
@@ -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, LOG_ERR, "db2archive: no archive name\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldbm2archive - 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, LOG_ERR, "db2archive: Failed to init database\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldbm2archive - Failed to init database\n",
0, 0, 0);
if (task) {
slapi_task_log_notice(task, "Failed to init database");
@@ -309,8 +309,8 @@ 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, LOG_ERR,
- "db2archive: Cannot archive to the db directory.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2archive - Cannot archive to the db directory.\n", 0, 0, 0);
if (task) {
slapi_task_log_notice(task,
"Cannot archive to the db directory.");
@@ -320,7 +320,7 @@ int ldbm_back_ldbm2archive( Slapi_PBlock *pb )
}
dir_bak = slapi_ch_smprintf("%s.bak", directory);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "db2archive: %s exists. Renaming to %s\n",
+ LDAPDebug(LDAP_DEBUG_INFO, "ldbm_back_ldbm2archive - %s exists. Renaming to %s\n",
directory, dir_bak, 0);
if (task) {
slapi_task_log_notice(task, "%s exists. Renaming to %s",
@@ -329,8 +329,8 @@ 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, LOG_ERR,
- "db2archive: %s exists and failed to delete it.\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2archive - %s exists and failed to delete it.\n",
dir_bak, 0, 0);
if (task) {
slapi_task_log_notice(task,
@@ -343,11 +343,11 @@ 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, LOG_ERR,
- "db2archive: Failed to rename \"%s\" to \"%s\".\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2archive - Failed to rename \"%s\" to \"%s\".\n",
directory, dir_bak, 0);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2archive - "SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
if (task) {
slapi_task_log_notice(task,
@@ -364,12 +364,11 @@ 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, LOG_ERR,
- "db2archive: mkdir(%s) failed; errno %i (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2archive - mkdir(%s) failed; errno %i (%s)\n",
directory, errno, msg ? msg : "unknown");
if (task) {
- slapi_task_log_notice(task,
- "mkdir(%s) failed; errno %i (%s)",
+ slapi_task_log_notice(task, "mkdir(%s) failed; errno %i (%s)",
directory, errno, msg ? msg : "unknown");
}
goto err;
@@ -387,8 +386,8 @@ 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, LOG_ERR,
- "ldbm: '%s' is already in the middle of "
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "ldbm_back_ldbm2archive - Backend '%s' is already in the middle of "
"another task and cannot be disturbed.\n",
inst->inst_name, 0, 0);
if (task) {
@@ -417,13 +416,13 @@ 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, LOG_DEBUG,
- "db2archive: pre-backup-plugin failed (%d).\n", return_value);
+ LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM,
+ "ldbm_back_ldbm2archive - pre-backup-plugin failed (%d).\n", return_value);
if (is_slapd_running() && run_from_cmdline) {
- 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");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2archive - Standalone db2bak is not supported when a "
+ "multimaster replication enabled server is "
+ "coexisting.\nPlease use db2bak.pl, instead.\n");
goto err;
}
}
@@ -433,8 +432,8 @@ 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, LOG_DEBUG,
- "db2archive: post-backup-plugin failed (%d).\n", return_value);
+ LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM,
+ "ldbm_back_ldbm2archive - post-backup-plugin failed (%d).\n", return_value);
}
if (! run_from_cmdline) {
@@ -451,8 +450,8 @@ int ldbm_back_ldbm2archive( Slapi_PBlock *pb )
err:
if (return_value) {
if (dir_bak) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
- "db2archive failed: renaming %s back to %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2archive - Failed renaming %s back to %s\n",
dir_bak, directory);
if (task) {
slapi_task_log_notice(task,
@@ -460,8 +459,8 @@ err:
dir_bak, directory);
}
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "db2archive failed: removing %s\n", directory);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2archive - Failed removing %s\n", directory);
if (task) {
slapi_task_log_notice(task, "db2archive failed: removing %s",
directory);
@@ -470,11 +469,11 @@ err:
ldbm_delete_dirs(directory);
if (dir_bak && (PR_SUCCESS != PR_Rename(dir_bak, directory))) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
- "db2archive: Failed to rename \"%s\" to \"%s\".\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2archive - Failed to rename \"%s\" to \"%s\".\n",
dir_bak, directory);
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
- SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2archive - " SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr));
if (task) {
slapi_task_log_notice(task,
@@ -490,7 +489,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, LOG_ERR, "db2archive: Failed to close database\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldbm2archive - 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 5c7108d..7f1c280 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, LOG_ERR, "BAD CACHE ASSERTION at %s/%d: %s\n", \
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG, _a, _x1, _x2, _x3)
+#define LOG(_a, _x1, _x2, _x3) LDAPDebug(LDAP_DEBUG_CACHE, _a, _x1, _x2, _x3)
#else
#define ASSERT(_x) ;
#define LOG(_a, _x1, _x2, _x3) ;
@@ -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, LOG_ERR, "%s\n", ep_ids);
+ LDAPDebug1Arg(LDAP_DEBUG_DEBUG, "%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, LOG_ERR, "%s\n", ep_ids);
+ LDAPDebug1Arg(LDAP_DEBUG_DEBUG, "%s\n", ep_ids);
}
}
#endif
@@ -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, LOG_DEBUG, "=> cache_init\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> cache_init\n", 0, 0, 0);
cache->c_maxsize = maxsize;
cache->c_maxentries = maxentries;
cache->c_curentries = 0;
@@ -507,8 +507,8 @@ int cache_init(struct cache *cache, size_t maxsize, long maxentries, int type)
}
cache->c_tries = slapi_counter_new();
} else {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
- "cache_init: slapi counter is not available.\n");
+ LDAPDebug0Args(LDAP_DEBUG_NOTICE,
+ "cache_init - slapi counter is not available.\n");
cache->c_cursize = NULL;
cache->c_hits = NULL;
cache->c_tries = NULL;
@@ -518,10 +518,10 @@ 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, LOG_ERR, "ldbm: cache_init: PR_NewMonitor failed\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "cache_init - PR_NewMonitor failed\n");
return 0;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= cache_init\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= cache_init\n", 0, 0, 0);
return 1;
}
@@ -561,8 +561,8 @@ entrycache_flush(struct cache *cache)
ASSERT(e->ep_refcnt == 0);
e->ep_refcnt++;
if (entrycache_remove_int(cache, e) < 0) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "entry cache flush: unable to delete entry\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "entrycache_flush - Unable to delete entry\n", 0, 0, 0);
break;
}
if(e == CACHE_LRU_HEAD(cache, struct backentry *)) {
@@ -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, LOG_ERR,
- "entrycache_clear_int: there are still %ld entries "
+ LDAPDebug1Arg(LDAP_DEBUG_WARNING,
+ "entrycache_clear_int - There are still %ld entries "
"in the entry cache.\n", cache->c_curentries);
#ifdef LDAP_CACHE_DEBUG
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "ID(s) in entry cache:\n");
+ LDAPDebug0Args(LDAP_DEBUG_DEBUG, "entrycache_clear_int - ID(s) in entry cache:\n");
dump_hash(cache->c_idtable);
#endif
}
@@ -655,8 +655,8 @@ static void entrycache_set_max_size(struct cache *cache, size_t bytes)
if (bytes < MINCACHESIZE) {
bytes = MINCACHESIZE;
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "WARNING -- Minimum cache size is %lu -- rounding up\n",
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "entrycache_set_max_size - Minimum cache size is %lu -- rounding up\n",
MINCACHESIZE, 0, 0);
}
cache_lock(cache);
@@ -683,8 +683,8 @@ 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, LOG_ERR,
- "WARNING -- Possible CONFIGURATION ERROR -- cachesize "
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "entrycache_set_max_size - Possible CONFIGURATION ERROR -- cachesize "
"(%lu) may be configured to use more than the available "
"physical memory.\n", bytes, 0, 0);
}
@@ -1120,10 +1120,10 @@ entrycache_return(struct cache *cache, struct backentry **bep)
e = *bep;
if (!e) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "entrycache_return e is NULL\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "entrycache_return - backentry is NULL\n");
return;
}
- LOG("=> entrycache_return (%s) entry count: %d, entry in cache:%ld\n",
+ LOG("entrycache_return - (%s) entry count: %d, entry in cache:%ld\n",
backentry_get_ndn(e), e->ep_refcnt, cache->c_curentries);
cache_lock(cache);
@@ -1144,7 +1144,7 @@ entrycache_return(struct cache *cache, struct backentry **bep)
* we don't/can't always call cache_remove().
*/
if (remove_hash(cache->c_dntable, (void *)ndn, strlen(ndn)) == 0) {
- LOG("entrycache_return: failed to remove %s from dn table\n", ndn, 0, 0);
+ LOG("entrycache_return -Failed to remove %s from dn table\n", ndn, 0, 0);
}
}
backentry_free(bep);
@@ -1163,7 +1163,7 @@ entrycache_return(struct cache *cache, struct backentry **bep)
backentry_free(&eflush);
eflush = eflushtemp;
}
- LOG("<= entrycache_return\n", 0, 0, 0);
+ LOG("entrycache_return - returning.\n", 0, 0, 0);
}
@@ -1172,7 +1172,7 @@ struct backentry *cache_find_dn(struct cache *cache, const char *dn, unsigned lo
{
struct backentry *e;
- LOG("=> cache_find_dn (%s)\n", dn, 0, 0);
+ LOG("=> cache_find_dn - (%s)\n", dn, 0, 0);
/*entry normalized by caller (dn2entry.c) */
cache_lock(cache);
@@ -1194,7 +1194,7 @@ struct backentry *cache_find_dn(struct cache *cache, const char *dn, unsigned lo
}
slapi_counter_increment(cache->c_tries);
- LOG("<= cache_find_dn (%sFOUND)\n", e ? "" : "NOT ", 0, 0);
+ LOG("<= cache_find_dn - (%sFOUND)\n", e ? "" : "NOT ", 0, 0);
return e;
}
@@ -1521,8 +1521,8 @@ 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, LOG_ERR,
- "cache_lock_entry: failed to create a lock for %s\n",
+ LDAPDebug1Arg(LDAP_DEBUG_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);
return 1;
@@ -1580,8 +1580,8 @@ dncache_clear_int(struct cache *cache)
}
cache->c_maxsize = size;
if (cache->c_curentries > 0) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "dncache_clear_int: there are still %ld dn's "
+ LDAPDebug1Arg(LDAP_DEBUG_WARNING,
+ "dncache_clear_int - There are still %ld dn's "
"in the dn cache. :/\n", cache->c_curentries);
}
}
@@ -1604,8 +1604,8 @@ dncache_set_max_size(struct cache *cache, size_t bytes)
if (bytes < MINCACHESIZE) {
bytes = MINCACHESIZE;
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "WARNING -- Minimum cache size is %lu -- rounding up\n",
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "dncache_set_max_size - Minimum cache size is %lu -- rounding up\n",
MINCACHESIZE, 0, 0);
}
cache_lock(cache);
@@ -1633,8 +1633,8 @@ dncache_set_max_size(struct cache *cache, size_t bytes)
* ldbm_instance_config
*/
if (! util_is_cachesize_sane(&bytes)) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "WARNING -- Possible CONFIGURATION ERROR -- cachesize "
+ LDAPDebug1Arg(LDAP_DEBUG_WARNING,
+ "dncache_set_max_size - Possible CONFIGURATION ERROR -- cachesize "
"(%lu) may be configured to use more than the available "
"physical memory.\n", bytes);
}
@@ -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, LOG_ERR, "dn cache flush: unable to delete entry\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "dncache_flush - Unable to delete entry\n",
0, 0, 0);
break;
}
@@ -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, LOG_ERR, "check_entry_cache",
+ slapi_log_error(SLAPI_LOG_DEBUG, "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, LOG_ERR, "check_entry_cache",
+ slapi_log_error(SLAPI_LOG_DEBUG, "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, LOG_ERR, "check_entry_cache",
+ slapi_log_error(SLAPI_LOG_DEBUG, "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, LOG_DEBUG, "check_entry_cache",
+ slapi_log_error(SLAPI_LOG_CACHE, "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, LOG_ERR, "check_entry_cache",
+ slapi_log_error(SLAPI_LOG_DEBUG, "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, LOG_DEBUG, "check_entry_cache",
+ slapi_log_error(SLAPI_LOG_CACHE, "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/cleanup.c b/ldap/servers/slapd/back-ldbm/cleanup.c
index 6e31f57..1111352 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, LOG_DEBUG, "ldbm backend cleaning up\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"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 b69e2d5..aca0fa6 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, LOG_DEBUG, "ldbm backend syncing\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "ldbm_back_close - 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, LOG_DEBUG, "ldbm backend done syncing\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "ldbm_back_close - 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, LOG_DEBUG, "ldbm backend flushing\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "ldbm_back_close -ldbm backend flushing\n", 0, 0, 0 );
slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &li );
dblayer_flush( li );
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ldbm backend done flushing\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "ldbm_back_close -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, LOG_ERR, "Set of instances destroyed\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_INFO, "ldbm_back_instance_set_destructor - 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 30986ad..7edf4c9 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, LOG_DEBUG, "=> dblayer_copy_file_keybykey\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> dblayer_copy_file_keybykey\n", 0, 0, 0 );
if (!env) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_file_keybykey, Out of memory\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_copy_file_keybykey, Create error %d: %s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_copy_file_keybykey, Open error %d: %s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_copy_file_keybykey, get_flags error %d: %s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_copy_file_keybykey, get_type error %d: %s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_copy_file_keybykey, get_pagesize error %d: %s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_copy_file_keybykey, Create error %d: %s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_copy_file_keybykey, set_flags error %d: %s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_copy_file_keybykey, set_pagesize error %d: %s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_copy_file_keybykey - set_pagesize error %d: %s\n", retval, db_strerror(retval), 0);
goto error;
}
@@ -111,8 +111,8 @@ dblayer_copy_file_keybykey(DB_ENV *env,
/* entryrdn.db */
struct attrinfo *ai = NULL;
if (NULL == inst) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
- "dblayer_copy_file_keybykey(entryrdn), "
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "dblayer_copy_file_keybykey (entryrdn) - "
"dup_cmp_fn cannot be retrieved since inst is NULL.\n");
goto error;
}
@@ -121,8 +121,8 @@ 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, LOG_ERR,
- "dblayer_copy_file_keybykey(entryrdn), set_dup_compare error %d: %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "dblayer_copy_file_keybykey (entryrdn) - set_dup_compare error %d: %s\n",
retval, db_strerror(retval));
goto error;
}
@@ -130,8 +130,8 @@ 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, LOG_ERR,
- "dblayer_copy_file_keybykey, set_dup_compare error %d: %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "dblayer_copy_file_keybykey - set_dup_compare error %d: %s\n",
retval, db_strerror(retval));
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, LOG_ERR, "dblayer_copy_file_keybykey, Open error %d: %s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_copy_file_keybykey, Create cursor error %d: %s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_copy_file_keybykey, c_get error %d: %s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_copy_file_keybykey, put error %d: %s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_copy_file_keybykey, Close cursor error %d: %s\n", retval_cleanup, db_strerror(retval_cleanup), 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_copy_file_keybykey, Close error %d: %s\n", retval_cleanup, db_strerror(retval_cleanup), 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_copy_file_keybykey, Close error %d: %s\n", retval_cleanup, db_strerror(retval_cleanup), 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_copy_file_keybykey - Close error %d: %s\n", retval_cleanup, db_strerror(retval_cleanup), 0);
retval += retval_cleanup;
}
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= dblayer_copy_file_keybykey\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> dblayer_copy_file_resetlsns\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_ERR, "dblayer_copy_file_resetlsns: Call to dblayer_make_private_simple_env failed!\n"
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_copy_file_resetlsns: Copy not completed successfully.", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_copy_file_resetlsns - Copy did not complete successfully.", 0, 0, 0);
}
out:
/* Close the environment */
@@ -241,12 +241,12 @@ out:
if (retval2) {
if (0 == retval) {
retval = retval2;
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_file_resetlsns, error %d: %s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_copy_file_resetlsns - error %d: %s\n", retval, db_strerror(retval), 0);
}
}
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= dblayer_copy_file_resetlsns\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> dblayer_make_private_recovery_env\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> dblayer_make_private_recovery_env\n", 0, 0, 0 );
if (NULL == env) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_make_private_recovery_env: Null environment. Cannot continue.", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_make_private_recovery_env, Create error %d: %s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_make_private_recovery_env, Open error %d: %s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_make_private_recovery_env - Open error %d: %s\n", retval, db_strerror(retval), 0);
goto error;
}
error:
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= dblayer_make_private_recovery_env\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> dblayer_make_private_simple_env\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> dblayer_make_private_simple_env\n", 0, 0, 0 );
if (NULL == env) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_make_private_simple_env: Null environment. Cannot continue.", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_make_private_simple_env, error %d: %s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_make_private_simple_env, error %d: %s\n", retval, db_strerror(retval), 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_make_private_simple_env - error %d: %s\n", retval, db_strerror(retval), 0);
goto error;
}
error:
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= dblayer_make_private_simple_env\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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 95b37dd..54f05ba 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, LOG_ERR,"dblayer_set_batch_transactions: enabling batch transactions "
+ LDAPDebug(LDAP_DEBUG_NOTICE,"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, LOG_ERR,"dblayer_set_batch_transactions: batch transactions was "
+ LDAPDebug(LDAP_DEBUG_NOTICE,"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, LOG_ERR,"dblayer_set_batch_txn_min_sleep: Warning batch transactions "
+ LDAPDebug(LDAP_DEBUG_WARNING, "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, LOG_ERR,"dblayer_set_batch_txn_max_sleep: Warning batch transactions "
+ LDAPDebug(LDAP_DEBUG_WARNING ,"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, LOG_DEBUG,"version check: %s (%d.%d)\n", string, major, minor);
+ LDAPDebug(LDAP_DEBUG_TRACE,"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, LOG_ERR,"Db home directory is not set. "
+ LDAPDebug(LDAP_DEBUG_WARNING,"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, LOG_ERR,"libdb: %s\n", buffer, 0, 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG, "Enabled 64-bit files\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_ERR,"Setting ncache to: %d to keep each chunk below 4Gbytes\n",
+ LDAPDebug(LDAP_DEBUG_NOTICE, "dblayer_select_ncache - Setting ncache to: %d to keep each chunk below 4Gbytes\n",
*ncachep, 0, 0);
}
#endif
@@ -818,8 +818,8 @@ cleanup:
slapi_ch_free((void **)&head[i]);
}
if (myncache == mymaxncache) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "WARNING: dbcachesize %lu too big\n", cachesize, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_get_ncache - cachesize %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, LOG_DEBUG,"home_directory=%s\n",priv->dblayer_home_directory,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"home_directory=%s\n",priv->dblayer_home_directory,0,0);
}
if (priv->dblayer_log_directory) {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"log_directory=%s\n",priv->dblayer_log_directory,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"log_directory=%s\n",priv->dblayer_log_directory,0,0);
}
if (priv->dblayer_dbhome_directory) {
- 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);
+ 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);
}
/* Check a given filesystem directory for access we need */
@@ -983,8 +983,8 @@ 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, LOG_ERR,
- "WARNING---no %s permission to file %s\n",
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "dblayer_grok_directory - No %s permission to file %s\n",
access_string,filename,0);
} else {
PR_Close(prfd); /* okay */
@@ -1062,8 +1062,8 @@ 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, LOG_ERR,
- "ERROR -- Failed to create DB_ENV (returned: %d).\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_make_env - Failed to create DB_ENV (returned: %d).\n",
ret, 0, 0);
}
@@ -1120,8 +1120,8 @@ dblayer_make_env(struct dblayer_private_env **env, struct ldbminfo *li)
*env = pEnv;
pEnv = NULL; /* do not free below */
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR -- Failed to create RWLock (returned: %d).\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_make_env - Failed to create RWLock (returned: %d).\n",
ret, 0, 0);
}
@@ -1241,8 +1241,8 @@ no_diskspace(struct ldbminfo *li, int dbenv_flags)
char *region_dir;
if (statvfs(li->li_directory, &db_buf) < 0){
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Cannot get file system info for (%s); file system corrupted?\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "no_diskspace - Cannot get file system info for (%s); file system corrupted?\n",
li->li_directory, 0, 0);
return 1;
} else {
@@ -1257,8 +1257,8 @@ 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, LOG_ERR,
- "Cannot get file system info for (%s); file system corrupted?\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "no_diskspace - Cannot get file system info for (%s); file system corrupted?\n",
li->li_dblayer_private->dblayer_dbhome_directory, 0, 0);
return 1;
}
@@ -1278,8 +1278,8 @@ no_diskspace(struct ldbminfo *li, int dbenv_flags)
/* Check if we have enough space */
if (fsiz < expected_siz){
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "No enough space left on device (%s) (%lu bytes); "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "no_diskspace - 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);
return 1;
@@ -1324,12 +1324,12 @@ dblayer_start(struct ldbminfo *li, int dbmode)
if (NULL != priv->dblayer_env) {
if (CATASTROPHIC == priv->dblayer_env) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Error: DB previously failed to start.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "dblayer_start - DB previously failed to start.\n", 0, 0, 0);
return -1;
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Warning: DB already started.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "dblayer_start - DB already started.\n", 0, 0, 0);
return 0;
}
}
@@ -1337,8 +1337,8 @@ 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, LOG_ERR,
- "Error: DB directory is not specified.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "dblayer_start - DB directory is not specified.\n", 0, 0, 0);
return -1;
}
PR_Lock(li->li_config_mutex);
@@ -1364,7 +1364,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, LOG_ERR,"Can't start because the database "
+ LDAPDebug(LDAP_DEBUG_CRIT,"dblayer_start - Can't start because the database "
"directory \"%s\" either doesn't exist, or is not "
"accessible\n", region_dir, 0, 0);
return return_value;
@@ -1376,7 +1376,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, LOG_ERR,"Can't start because the log "
+ LDAPDebug(LDAP_DEBUG_CRIT,"dblayer_start - Can't start because the log "
"directory \"%s\" either doesn't exist, or is not "
"accessible\n", log_dir, 0, 0);
return return_value;
@@ -1387,7 +1387,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, LOG_ERR,"WARNING---Likely CONFIGURATION ERROR---"
+ LDAPDebug(LDAP_DEBUG_WARNING,"dblayer_start - 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);
@@ -1422,15 +1422,14 @@ 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, LOG_ERR, "Recovering database after restore "
+ LDAPDebug(LDAP_DEBUG_NOTICE, "dblayer_start - Recovering database after restore "
"from archive.\n", 0, 0, 0);
} else if (DBLAYER_CLEAN_RECOVER_MODE & dbmode) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Clean up db environment and start "
+ LDAPDebug(LDAP_DEBUG_NOTICE, "dblayer_start - Clean up db environment and start "
"from archive.\n", 0, 0, 0);
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Detected Disorderly Shutdown last "
- "time Directory Server was running, recovering "
- "database.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_NOTICE, "dblayer_start - Detected Disorderly Shutdown last "
+ "time Directory Server was running, recovering database.\n", 0, 0, 0);
slapi_disordely_shutdown(PR_TRUE);
}
}
@@ -1449,8 +1448,8 @@ dblayer_start(struct ldbminfo *li, int dbmode)
}
if (priv->dblayer_private_mem) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "WARNING: Server is running with nsslapd-db-private-mem on; "
+ LDAPDebug(LDAP_DEBUG_INFO,
+ "Server is running with nsslapd-db-private-mem on; "
"No other process is allowed to access the database\n",
0, 0, 0);
open_flags |= DB_PRIVATE;
@@ -1474,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, LOG_ERR, "resizing db cache size: %lu -> %lu\n",
+ LDAPDebug(LDAP_DEBUG_NOTICE, "dblayer_start - 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, LOG_ERR, "resizing db cache count: %d -> %d\n",
+ LDAPDebug(LDAP_DEBUG_NOTICE, "dblayer_start - 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) {
@@ -1487,12 +1486,12 @@ dblayer_start(struct ldbminfo *li, int dbmode)
* We don't allow lower value than that.
*/
if (priv->dblayer_lock_config <= BDB_LOCK_NB_MIN) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "New max db lock count is too small. "
+ LDAPDebug1Arg(LDAP_DEBUG_NOTICE, "dblayer_start - New max db lock count is too small. "
"Resetting it to the default value %d.\n", BDB_LOCK_NB_MIN);
priv->dblayer_lock_config = BDB_LOCK_NB_MIN;
}
if (priv->dblayer_lock_config != priv->dblayer_previous_lock_config) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "resizing max db lock count: %d -> %d\n",
+ LDAPDebug(LDAP_DEBUG_NOTICE, "dblayer_start - resizing max db lock count: %d -> %d\n",
priv->dblayer_previous_lock_config, priv->dblayer_lock_config, 0);
}
}
@@ -1502,8 +1501,8 @@ 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, LOG_ERR,
- "ERROR -- Failed to create DBENV (returned: %d).\n",
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "dblayer_start - Failed to create DBENV (returned: %d).\n",
return_value, 0, 0);
}
dblayer_free_env(&priv->dblayer_env);
@@ -1515,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, LOG_ERR, "using default value for log bufsize because configured value (%lu) is too small.\n",
+ LDAPDebug(LDAP_DEBUG_NOTICE, "dblayer_start - Using default value for log bufsize because configured value (%lu) is too small.\n",
priv->dblayer_logbuf_size, 0, 0);
}
}
@@ -1538,8 +1537,8 @@ dblayer_start(struct ldbminfo *li, int dbmode)
return_value = thisenv->remove(thisenv, region_dir, DB_FORCE);
if (0 != return_value)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "dblayer_start: failed to remove old db env "
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "dblayer_start - Failed to remove old db env "
"in %s: %s\n", region_dir,
dblayer_strerror(return_value), 0);
return return_value;
@@ -1548,8 +1547,8 @@ dblayer_start(struct ldbminfo *li, int dbmode)
if ((return_value = dblayer_make_env(&pEnv, li)) != 0)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR -- Failed to create DBENV (returned: %d).\n",
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "dblayer_start - Failed to create DBENV (returned: %d).\n",
return_value, 0, 0);
return return_value;
}
@@ -1567,18 +1566,18 @@ 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, LOG_ERR,
- "mmap in opening database environment (recovery mode) "
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "dblayer_start - 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, LOG_ERR, "Database Recovery Process FAILED. "
+ LDAPDebug(LDAP_DEBUG_CRIT, "dblayer_start - Database Recovery Process FAILED. "
"The database is not recoverable. err=%d: %s\n",
return_value, dblayer_strerror(return_value), 0);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Please make sure there is enough disk space for "
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "dblayer_start - Please make sure there is enough disk space for "
"dbcache (%lu bytes) and db region files\n",
li->li_dbcachesize, 0, 0);
}
@@ -1587,8 +1586,8 @@ 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, LOG_ERR,
- "ERROR -- Failed to create DBENV (returned: %d).\n",
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "dblayer_start - Failed to create DBENV (returned: %d).\n",
return_value, 0, 0);
return return_value;
}
@@ -1666,15 +1665,15 @@ 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, LOG_ERR,
- "mmap in opening database environment "
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "dblayer_start - 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, LOG_ERR,
- "Opening database environment (%s) failed. err=%d: %s\n",
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "dblayer_start - Opening database environment (%s) failed. err=%d: %s\n",
region_dir, return_value, dblayer_strerror(return_value));
}
}
@@ -1709,12 +1708,12 @@ 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, LOG_ERR, "check_and_set_import_cache: "
+ LDAPDebug2Args(LDAP_DEBUG_ERR, "check_and_set_import_cache - "
"Failed to get pagesize: %ld or pages: %ld\n",
pagesize, pages);
return ENOENT;
}
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "check_and_set_import_cache: "
+ LDAPDebug(LDAP_DEBUG_INFO, "check_and_set_import_cache - "
"pagesize: %ld, pages: %ld, procpages: %ld\n",
pagesize, pages, procpages);
@@ -1733,8 +1732,8 @@ check_and_set_import_cache(struct ldbminfo *li)
/* sanity check */
if (li->li_import_cache_autosize >= 100) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
- "check_and_set_import_cache: "
+ LDAPDebug0Args(LDAP_DEBUG_NOTICE,
+ "check_and_set_import_cache -"
"import cache autosizing value "
"(nsslapd-import-cache-autosize) should not be "
"greater than or equal to 100(%). Reset to 50(%).\n");
@@ -1758,8 +1757,8 @@ check_and_set_import_cache(struct ldbminfo *li)
page_delta = pages - import_pages;
if (page_delta < hard_limit) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "After allocating import cache %ldKB, "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "check_and_set_import_cache - After allocating import cache %ldKB, "
"the available memory is %ldKB, "
"which is less than the hard limit %ldKB. "
"Please decrease the import cache size and rerun import.\n",
@@ -1768,8 +1767,8 @@ check_and_set_import_cache(struct ldbminfo *li)
return ENOMEM;
}
if (page_delta < soft_limit) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "WARNING: After allocating import cache %ldKB, "
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "check_and_set_import_cache - After allocating import cache %ldKB, "
"the available memory is %ldKB, "
"which is less than the soft limit %ldKB. "
"You may want to decrease the import cache size and "
@@ -1778,7 +1777,7 @@ check_and_set_import_cache(struct ldbminfo *li)
soft_limit*(pagesize/1024));
}
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "Import allocates %ldKB import cache.\n",
+ LDAPDebug1Arg(LDAP_DEBUG_INFO, "check_and_set_import_cache - 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 */
@@ -1834,22 +1833,22 @@ 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, LOG_ERR,
- "instance %s: dbenv is not available (0x%x).\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_instance_start - 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, LOG_ERR,
- "Warning: DB instance \"%s\" already started.\n",
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "dblayer_instance_start - DB instance \"%s\" already started.\n",
inst->inst_name, 0, 0);
return 0;
}
if (attrcrypt_init(inst)) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Error: unable to initialize attrcrypt system for %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_instance_start - Unable to initialize attrcrypt system for %s\n",
inst->inst_name, 0, 0);
return return_value;
}
@@ -1867,12 +1866,14 @@ int dblayer_instance_start(backend *be, int mode)
return_value = dblayer_grok_directory(inst_dirp,
DBLAYER_DIRECTORY_READWRITE_ACCESS);
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Can't start because the database instance "
- "directory is NULL\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,"dblayer_instance_start - "
+ "Can't start because the database instance "
+ "directory is NULL\n", 0, 0, 0);
goto errout;
}
if (0 != return_value) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Can't start because the database instance "
+ LDAPDebug(LDAP_DEBUG_ERR,"dblayer_instance_start - "
+ "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);
@@ -1890,7 +1891,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, LOG_ERR, "Warning: Unable to read dbversion "
+ LDAPDebug(LDAP_DEBUG_WARNING, "dblayer_instance_start - Unable to read dbversion "
"file in %s\n", inst->inst_dir_name, 0, 0);
} else {
int rval = 0;
@@ -1906,7 +1907,7 @@ int dblayer_instance_start(backend *be, int mode)
rval = check_db_inst_version(inst);
if (rval & DBVERSION_NOT_SUPPORTED)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Instance %s does not have the "
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_instance_start - Instance %s does not have the "
"expected version\n", inst->inst_name, 0, 0);
PR_ASSERT(0);
slapi_ch_free_string(&dataversion);
@@ -1915,8 +1916,8 @@ int dblayer_instance_start(backend *be, int mode)
}
else if (rval & DBVERSION_NEED_DN2RDN)
{
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
- "%s is on, while the instance %s is in the DN format. "
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "dblayer_instance_start - %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);
slapi_ch_free_string(&dataversion);
@@ -1925,8 +1926,8 @@ int dblayer_instance_start(backend *be, int mode)
}
else if (rval & DBVERSION_NEED_RDN2DN)
{
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
- "%s is off, while the instance %s is in the RDN "
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "dblayer_instance_start - %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);
slapi_ch_free_string(&dataversion);
@@ -1944,7 +1945,7 @@ int dblayer_instance_start(backend *be, int mode)
rval = ldbm_upgrade(inst, rval);
if (0 != rval)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Upgrading instance %s failed\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_instance_start - Upgrading instance %s failed\n",
inst->inst_name, 0, 0);
PR_ASSERT(0);
return_value = -1;
@@ -1953,7 +1954,7 @@ int dblayer_instance_start(backend *be, int mode)
/**
if (rval & DBVERSION_NEED_IDL_OLD2NEW)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_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);
@@ -1962,7 +1963,7 @@ int dblayer_instance_start(backend *be, int mode)
}
else if (rval & DBVERSION_NEED_IDL_NEW2OLD)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_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);
@@ -2009,8 +2010,8 @@ 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, LOG_ERR,
- "WARNING: Import is running with "
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "dblayer_instance_start - Import is running with "
"nsslapd-db-private-import-mem on; "
"No other process is allowed to access the database\n",
0, 0, 0);
@@ -2039,8 +2040,8 @@ 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, LOG_ERR,
- "Unable to create new DB_ENV for import/export! %d\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_instance_start - Unable to create new DB_ENV for import/export! %d\n",
return_value, 0, 0);
goto out;
}
@@ -2060,8 +2061,8 @@ int dblayer_instance_start(backend *be, int mode)
oflags,
priv->dblayer_file_mode);
if (return_value != 0) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Unable to open new DB_ENV for import/export! %d\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_instance_start - Unable to open new DB_ENV for import/export! %d\n",
return_value, 0, 0);
goto out;
}
@@ -2073,8 +2074,8 @@ 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, LOG_ERR,
- "Unable to create id2entry db file! %d\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_instance_start - Unable to create id2entry db file! %d\n",
return_value, 0, 0);
goto out;
}
@@ -2084,8 +2085,8 @@ 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, LOG_ERR,
- "dbp->set_pagesize(%lu or %lu) failed %d\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_instance_start - dbp->set_pagesize(%lu or %lu) failed %d\n",
priv->dblayer_page_size, DBLAYER_PAGESIZE,
return_value);
goto out;
@@ -2094,7 +2095,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, LOG_ERR, "dbp->set_malloc failed %d\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "dblayer_instance_start - dbp->set_malloc failed %d\n",
return_value);
goto out;
@@ -2122,8 +2123,8 @@ 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, LOG_ERR,
- "dbp->set_pagesize(%lu or %lu) failed %d\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_instance_start - dbp->set_pagesize(%lu or %lu) failed %d\n",
priv->dblayer_page_size, DBLAYER_PAGESIZE,
return_value);
goto out;
@@ -2132,7 +2133,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, LOG_ERR, "dbp->set_malloc failed %d\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "dblayer_instance_start - dbp->set_malloc failed %d\n",
return_value);
goto out;
@@ -2144,8 +2145,8 @@ 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, LOG_ERR,
- "dbp->open(\"%s\") failed: %s (%d)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_instance_start - dbp->open(\"%s\") failed: %s (%d)\n",
id2entry_file, dblayer_strerror(return_value),
return_value);
/* if it's a newly created backend instance,
@@ -2154,16 +2155,16 @@ int dblayer_instance_start(backend *be, int mode)
if (strstr(dblayer_strerror(return_value),
"No such file or directory"))
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Instance %s is not registered as a db data directory. "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_instance_start - 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);
}
else if (strstr(dblayer_strerror(return_value),
"Permission denied"))
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Instance directory %s may not be writable\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_instance_start - Instance directory %s may not be writable\n",
inst_dirp, 0, 0);
}
@@ -2201,14 +2202,14 @@ out:
* being imported or is in normal mode
*/
if (inst->inst_nextid > MAXID && !(mode & DBLAYER_EXPORT_MODE)) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_instance_start fail: backend '%s' "
+ LDAPDebug(LDAP_DEBUG_CRIT, "dblayer_instance_start - 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, LOG_ERR, "dblayer_instance_start fail: %s (%d)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_instance_start -failure %s (%d)\n",
dblayer_strerror(return_value), return_value, 0);
}
errout:
@@ -2293,31 +2294,31 @@ 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, LOG_ERR, "No memory for DB_ENV or DB handle\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "dblayer_get_aux_id2entry_ext - No memory for DB_ENV or DB handle\n");
goto done;
}
*ppDB = NULL;
inst = (ldbm_instance *) be->be_instance_info;
if (NULL == inst)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "No instance/env: persistent id2entry is not available\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_get_aux_id2entry_ext - No instance/env: persistent id2entry is not available\n", 0, 0, 0);
goto done;
}
li = inst->inst_li;
if (NULL == li)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "No ldbm info: persistent id2entry is not available\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_get_aux_id2entry_ext - No ldbm info: persistent id2entry is not available\n", 0, 0, 0);
goto done;
}
opriv = li->li_dblayer_private;
if (NULL == opriv)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "No dblayer info: persistent id2entry is not available\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_get_aux_id2entry_ext - No dblayer info: persistent id2entry is not available\n", 0, 0, 0);
goto done;
}
priv = (dblayer_private *)slapi_ch_malloc(sizeof(dblayer_private));
@@ -2331,8 +2332,8 @@ dblayer_get_aux_id2entry_ext(backend *be, DB **ppDB, DB_ENV **ppEnv,
}
else
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Instance dir is NULL: persistent id2entry is not available\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_get_aux_id2entry_ext - Instance dir is NULL: persistent id2entry is not available\n",
0, 0, 0);
goto done;
}
@@ -2341,8 +2342,8 @@ 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, LOG_ERR,
- "No inst dir: persistent id2entry is not available\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_get_aux_id2entry_ext - No inst dir: persistent id2entry is not available\n", 0, 0, 0);
goto done;
}
@@ -2354,8 +2355,8 @@ 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, LOG_ERR,
- "can't create env dir: persistent id2entry is not available\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "dblayer_get_aux_id2entry_ext - Can't create env dir: persistent id2entry is not available\n");
goto done;
}
@@ -2363,8 +2364,8 @@ 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, LOG_ERR,
- "Unable to create new DB_ENV for import/export! %d\n", rval);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "dblayer_get_aux_id2entry_ext - Unable to create new DB_ENV for import/export! %d\n", rval);
goto err;
}
}
@@ -2385,24 +2386,24 @@ 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, LOG_ERR,
- "Unable to open new DB_ENV for upgradedb/reindex %d\n", rval);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "dblayer_get_aux_id2entry_ext - Unable to open new DB_ENV for upgradedb/reindex %d\n", rval);
goto err;
}
*ppEnv = mypEnv->dblayer_DB_ENV;
}
rval = db_create(&dbp, *ppEnv, 0);
if (rval) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "Unable to create id2entry db handler! %d\n", rval);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "dblayer_get_aux_id2entry_ext - Unable to create id2entry db handler! %d\n", rval);
goto err;
}
rval = dbp->set_pagesize(dbp, (priv->dblayer_page_size == 0) ?
DBLAYER_PAGESIZE : priv->dblayer_page_size);
if (rval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "dbp->set_pagesize(%lu or %lu) failed %d\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_get_aux_id2entry_ext - dbp->set_pagesize(%lu or %lu) failed %d\n",
priv->dblayer_page_size, DBLAYER_PAGESIZE, rval);
goto err;
}
@@ -2420,12 +2421,12 @@ 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, LOG_ERR,
- "dbp->open(\"%s\") failed: %s (%d)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_get_aux_id2entry_ext - dbp->open(\"%s\") failed: %s (%d)\n",
id2entry_file, dblayer_strerror(rval), rval);
if (strstr(dblayer_strerror(rval), "Permission denied")) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "Instance directory %s may not be writable\n", inst_dirp);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "dblayer_get_aux_id2entry_ext - Instance directory %s may not be writable\n", inst_dirp);
}
goto err;
}
@@ -2472,8 +2473,8 @@ 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, LOG_ERR,
- "No instance/env: persistent id2entry is not available\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_release_aux_id2entry - No instance/env: persistent id2entry is not available\n", 0, 0, 0);
goto done;
}
@@ -2545,17 +2546,17 @@ 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, LOG_ERR, "%s: Cleaning up entry cache\n",
+ LDAPDebug1Arg(LDAP_DEBUG_DEBUG, "dblayer_instance_close - %s: Cleaning up entry cache\n",
inst->inst_name);
cache_clear(&inst->inst_cache, CACHE_TYPE_ENTRY);
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "%s: Cleaning up dn cache\n",
+ LDAPDebug1Arg(LDAP_DEBUG_DEBUG, "dblayer_instance_close - %s: Cleaning up dn cache\n",
inst->inst_name);
cache_clear(&inst->inst_dncache, CACHE_TYPE_DN);
}
if (attrcrypt_cleanup_private(inst)) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Error: failed to clean up attrcrypt system for %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_instance_close - Failed to clean up attrcrypt system for %s\n",
inst->inst_name, 0, 0);
}
@@ -2621,7 +2622,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, LOG_ERR,"Waiting for %d database threads to stop\n",
+ LDAPDebug(LDAP_DEBUG_INFO,"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
@@ -2654,14 +2655,14 @@ void dblayer_pre_close(struct ldbminfo *li)
}
PR_Unlock(priv->thread_count_lock);
if (timedout) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Timeout after [%d] milliseconds; leave %d database thread(s)...\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_pre_close - 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, LOG_ERR,"All database threads now stopped\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_INFO,"All database threads now stopped\n",0,0,0);
timeout_escape:
return;
}
@@ -2779,12 +2780,12 @@ dblayer_remove_env(struct ldbminfo *li)
char *home_dir = NULL;
int rc = db_env_create(&env, 0);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR -- Failed to create DB_ENV (returned: %d)\n", rc);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "dblayer_remove_env - Failed to create DB_ENV (returned: %d)\n", rc);
return rc;
}
if (NULL == li) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "ERROR -- No ldbm info is given\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "dblayer_remove_env - No ldbm info is given\n");
return -1;
}
@@ -2792,8 +2793,8 @@ dblayer_remove_env(struct ldbminfo *li)
if (home_dir) {
rc = env->remove(env, home_dir, 0);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR -- Failed to remove DB environment files. "
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "dblayer_remove_env - Failed to remove DB environment files. "
"Please remove %s/__db.00# (# is 1 through 6)\n",
home_dir);
}
@@ -2933,8 +2934,8 @@ dblayer_open_file(backend *be, char* indexname, int open_flag,
!is_fullpath(inst->inst_dir_name))
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "The instance path %s is not registered for db_data_dir, "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_open_file - 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);
return -1;
@@ -3189,7 +3190,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, LOG_ERR, "db_remove: Failed to create db (%d) %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_db_remove_ex - Failed to create db (%d) %s\n",
rc, dblayer_strerror(rc), 0);
goto done;
}
@@ -3416,7 +3417,9 @@ 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, LOG_DEBUG, "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, "dblayer_txn_begin_ext - "
+ "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);
@@ -3430,8 +3433,8 @@ dblayer_txn_begin_ext(struct ldbminfo *li, back_txnid parent_txn, back_txn *txn,
}
if (0 != return_value)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Serious Error---Failed in dblayer_txn_begin, err=%d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "dblayer_txn_begin_ext - Serious Error---Failed in dblayer_txn_begin, err=%d (%s)\n",
return_value, dblayer_strerror(return_value), 0);
}
return return_value;
@@ -3516,7 +3519,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, LOG_DEBUG, "txn_commit (before notify): batchcount: %d, "
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, "dblayer_txn_commit_ext - (before notify): batchcount: %d, "
"txn_in_progress: %d, curr_txn: %x\n", trans_batch_count,
txn_in_progress_count, txn_id);
/*
@@ -3539,7 +3542,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, LOG_DEBUG, "txn_commit (before unlock): batchcount: %d, "
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, "dblayer_txn_commit_ext - (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);
@@ -3555,8 +3558,8 @@ int dblayer_txn_commit_ext(struct ldbminfo *li, back_txn *txn, PRBool use_lock)
if (0 != return_value)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Serious Error---Failed in dblayer_txn_commit, err=%d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "dblayer_txn_commit_ext - 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)) {
operation_out_of_disk_space();
@@ -3623,7 +3626,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, LOG_DEBUG, "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, "dblayer_txn_abort_ext - 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
@@ -3645,8 +3648,8 @@ int dblayer_txn_abort_ext(struct ldbminfo *li, back_txn *txn, PRBool use_lock)
if (0 != return_value)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Serious Error---Failed in dblayer_txn_abort, err=%d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "dblayer_txn_abort_ext - 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)) {
operation_out_of_disk_space();
@@ -3775,7 +3778,8 @@ dblayer_start_perf_thread(struct ldbminfo *li)
SLAPD_DEFAULT_THREAD_STACKSIZE) )
{
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "failed to create database perf thread, "
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_start_perf_thread - "
+ "Failed to create database perf thread, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
return_value = -1;
@@ -3803,7 +3807,7 @@ static int perf_threadmain(void *param)
}
DECR_THREAD_COUNT(priv);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "Leaving perf_threadmain\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "perf_threadmain - Leaving perf_threadmain\n", 0, 0, 0);
return 0;
}
@@ -3821,7 +3825,8 @@ dblayer_start_deadlock_thread(struct ldbminfo *li)
SLAPD_DEFAULT_THREAD_STACKSIZE) )
{
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "failed to create database deadlock thread, "
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_start_deadlock_thread - "
+ "Failed to create database deadlock thread, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
return_value = -1;
@@ -3931,7 +3936,7 @@ print_ttilist(txn_test_iter **ttilist, size_t tticnt)
{
while (tticnt > 0) {
tticnt--;
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
"txn_test_threadmain: attr [%s] cnt [%lu]\n",
ttilist[tticnt]->attr, ttilist[tticnt]->cnt);
}
@@ -3958,7 +3963,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, LOG_ERR, "txn_test_threadmain",
+ slapi_log_error(SLAPI_LOG_ERR, "txn_test_init_cfg",
"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);
@@ -4008,8 +4013,8 @@ wait_for_init:
backend *be = inst->inst_be;
if (be->be_state != BE_STATE_STARTED) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
- "txn_test_threadmain: backend not started, retrying\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "txn_test_threadmain - Backend not started, retrying\n");
object_release(inst_obj);
goto wait_for_init;
}
@@ -4017,8 +4022,8 @@ wait_for_init:
for (idx = cfg.indexes; idx && *idx; ++idx) {
DB *db = NULL;
if (be->be_state != BE_STATE_STARTED) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
- "txn_test_threadmain: backend not started, retrying\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "txn_test_threadmain - Backend not started, retrying\n");
object_release(inst_obj);
goto wait_for_init;
}
@@ -4026,8 +4031,8 @@ wait_for_init:
if (!strcmp(*idx, "id2entry")) {
dblayer_get_id2entry(be, &db);
if (db == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
- "txn_test_threadmain: id2entry database not found or not ready yet, retrying\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "txn_test_threadmain - id2entry database not found or not ready yet, retrying\n");
object_release(inst_obj);
goto wait_for_init;
}
@@ -4036,13 +4041,13 @@ wait_for_init:
ainfo_get(be, *idx, &ai);
if (NULL == ai) {
if (dbattempts >= dbmaxretries) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "txn_test_threadmain: index [%s] not found or not ready yet, skipping\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "txn_test_threadmain - index [%s] not found or not ready yet, skipping\n",
*idx);
continue;
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "txn_test_threadmain: index [%s] not found or not ready yet, retrying\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "txn_test_threadmain - index [%s] not found or not ready yet, retrying\n",
*idx);
object_release(inst_obj);
goto wait_for_init;
@@ -4051,13 +4056,13 @@ 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, LOG_ERR,
- "txn_test_threadmain: database file for index [%s] not found or not ready yet, skipping\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "txn_test_threadmain - Database file for index [%s] not found or not ready yet, skipping\n",
*idx);
continue;
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "txn_test_threadmain: database file for index [%s] not found or not ready yet, retrying\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "txn_test_threadmain - Database file for index [%s] not found or not ready yet, retrying\n",
*idx);
object_release(inst_obj);
goto wait_for_init;
@@ -4072,7 +4077,7 @@ wait_for_init:
}
}
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "txn_test_threadmain: starting main txn stress loop\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "txn_test_threadmain - starting main txn stress loop\n");
print_ttilist(ttilist, tticnt);
while (!priv->dblayer_stop_threads) {
@@ -4085,8 +4090,8 @@ 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, LOG_ERR,
- "txn_test_threadmain failed to create a new transaction, err=%d (%s)\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "txn_test_threadmain - Failed to create a new transaction, err=%d (%s)\n",
rc, dblayer_strerror(rc));
}
} else {
@@ -4101,8 +4106,8 @@ retry_txn:
/* phase 1 - open a cursor to each db */
if (cfg.verbose) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "txn_test_threadmain: starting [%lu] indexes\n", tticnt);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "txn_test_threadmain - Starting [%lu] indexes\n", tticnt);
}
for (ii = 0; ii < tticnt; ++ii) {
txn_test_iter *tti = ttilist[ii];
@@ -4128,8 +4133,8 @@ retry_cursor:
rc = tti->db->cursor(tti->db, txn, &tti->cur, 0);
if (DB_LOCK_DEADLOCK == rc) {
if (cfg.verbose) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
- "txn_test_threadmain cursor create deadlock - retry\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "txn_test_threadmain - Cursor create deadlock - retry\n");
}
if (cfg.use_txn) {
goto retry_txn;
@@ -4137,8 +4142,8 @@ retry_cursor:
goto retry_cursor;
}
} else if (rc) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
- "txn_test_threadmain failed to create a new cursor, err=%d (%s)\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "txn_test_threadmain - Failed to create a new cursor, err=%d (%s)\n",
rc, dblayer_strerror(rc));
}
}
@@ -4181,8 +4186,8 @@ 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, LOG_ERR,
- "txn_test_threadmain cursor get deadlock - retry\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "txn_test_threadmain - Cursor get deadlock - retry\n");
}
if (cfg.use_txn) {
goto retry_txn;
@@ -4194,8 +4199,8 @@ 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, LOG_ERR,
- "txn_test_threadmain failed to read a cursor, err=%d (%s)\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "txn_test_threadmain - Failed to read a cursor, err=%d (%s)\n",
rc, dblayer_strerror(rc));
}
tti->cur->c_close(tti->cur);
@@ -4213,8 +4218,8 @@ retry_get:
/*print_ttilist(ttilist, tticnt);*/
init_ttilist(ttilist, tticnt);
if (cfg.verbose) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
- "txn_test_threadmain: finished [%lu] indexes [%lu] records\n", tticnt, cnt);
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "txn_test_threadmain - Finished [%lu] indexes [%lu] records\n", tticnt, cnt);
}
TXN_TEST_LOOP_WAIT(cfg.loop_msec);
} else {
@@ -4252,7 +4257,8 @@ dblayer_start_txn_test_thread(struct ldbminfo *li)
SLAPD_DEFAULT_THREAD_STACKSIZE) )
{
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "failed to create txn test thread, "
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_start_txn_test_thread - "
+ "Failed to create txn test thread, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
return_value = -1;
@@ -4290,11 +4296,11 @@ static int deadlock_threadmain(void *param)
int rejected = 0;
if ((rval = LOCK_DETECT(db_env, flags, deadlock_policy, &rejected)) != 0) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Serious Error---Failed in deadlock detect (aborted at 0x%x), err=%d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "deadlock_threadmain - 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, LOG_DEBUG, "deadlock_threadmain: found and rejected %d lock requests\n", rejected);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "deadlock_threadmain - Found and rejected %d lock requests\n", rejected);
}
}
@@ -4303,12 +4309,12 @@ static int deadlock_threadmain(void *param)
}
DECR_THREAD_COUNT(priv);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "Leaving deadlock_threadmain\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "deadlock_threadmain - Leaving deadlock_threadmain\n", 0, 0, 0);
return 0;
}
#define checkpoint_debug_message(debug, fmt, a1, a2, a3) \
- if (debug) { LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,fmt,a1,a2,a3); }
+ if (debug) { LDAPDebug(LDAP_DEBUG_DEBUG,fmt,a1,a2,a3); }
/* this thread tries to do two things:
1. catch a group of transactions that are pending allowing a worker thread
@@ -4337,8 +4343,8 @@ dblayer_start_log_flush_thread(dblayer_private *priv)
PR_UNJOINABLE_THREAD,
SLAPD_DEFAULT_THREAD_STACKSIZE) ) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "failed to create database log flush thread, "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_start_log_flush_thread - Failed to create database log flush thread, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
return_value = -1;
@@ -4382,7 +4388,7 @@ static int log_flush_threadmain(void *param)
PR_Unlock(sync_txn_log_flush);
break;
}
- LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "log_flush_threadmain (in loop): batchcount: %d, "
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, "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
@@ -4391,7 +4397,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_DEBUG, "log_flush_threadmain (working): batchcount: %d, "
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, "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++){
@@ -4400,7 +4406,7 @@ static int log_flush_threadmain(void *param)
trans_batch_count = 0;
last_flush = PR_IntervalNow();
do_flush = 0;
- LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "log_flush_threadmain (before notify): batchcount: %d, "
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, "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);
}
@@ -4416,7 +4422,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_DEBUG, "log_flush_threadmain (wakeup): batchcount: %d, "
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, "log_flush_threadmain - (wakeup): batchcount: %d, "
"txn_in_progress: %d\n", trans_batch_count, txn_in_progress_count, 0);
} else {
DS_Sleep(interval_def);
@@ -4427,7 +4433,7 @@ static int log_flush_threadmain(void *param)
}
DECR_THREAD_COUNT(priv);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "Leaving log_flush_threadmain\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "log_flush_threadmain - Leaving log_flush_threadmain\n", 0, 0, 0);
return 0;
}
@@ -4445,8 +4451,8 @@ dblayer_start_checkpoint_thread(struct ldbminfo *li)
SLAPD_DEFAULT_THREAD_STACKSIZE) )
{
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "failed to create database checkpoint thread, "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_start_checkpoint_thread - Failed to create database checkpoint thread, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
return_value = -1;
@@ -4489,8 +4495,8 @@ 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, LOG_ERR,
- "Checkpoint thread failed due to missing db home directory info\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "checkpoint_threadmain - Failed due to missing db home directory info\n",
0, 0, 0);
goto error_return;
}
@@ -4527,23 +4533,23 @@ static int checkpoint_threadmain(void *param)
/* now checkpoint */
checkpoint_debug_message(debug_checkpointing,
- "Starting checkpoint\n", 0, 0, 0);
+ "checkpoint_threadmain - Starting checkpoint\n", 0, 0, 0);
rval = dblayer_txn_checkpoint(li, priv->dblayer_env,
PR_TRUE, PR_TRUE, PR_FALSE);
#if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR < 4100
if (DB_INCOMPLETE == rval)
{
checkpoint_debug_message(debug_checkpointing,
- "Retrying checkpoint\n", 0, 0, 0);
+ "checkpoint_threadmain - Retrying checkpoint\n", 0, 0, 0);
} else
#endif
{
checkpoint_debug_message(debug_checkpointing,
- "Checkpoint Done\n", 0, 0, 0);
+ "checkpoint_threadmain - Checkpoint Done\n", 0, 0, 0);
if (rval != 0) {
/* bad error */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Serious Error---Failed to checkpoint database, "
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "checkpoint_threadmain - Serious Error---Failed to checkpoint database, "
"err=%d (%s)\n", rval, dblayer_strerror(rval), 0);
if (LDBM_OS_ERR_IS_DISKFULL(rval)) {
operation_out_of_disk_space();
@@ -4555,23 +4561,23 @@ static int checkpoint_threadmain(void *param)
}
checkpoint_debug_message(debug_checkpointing,
- "Starting checkpoint\n", 0, 0, 0);
+ "checkpoint_threadmain - Starting checkpoint\n", 0, 0, 0);
rval = dblayer_txn_checkpoint(li, priv->dblayer_env,
PR_TRUE, PR_TRUE, PR_FALSE);
#if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR < 4100
if (DB_INCOMPLETE == rval)
{
checkpoint_debug_message(debug_checkpointing,
- "Retrying checkpoint\n", 0, 0, 0);
+ "checkpoint_threadmain - Retrying checkpoint\n", 0, 0, 0);
} else
#endif
{
checkpoint_debug_message(debug_checkpointing,
- "Checkpoint Done\n", 0, 0, 0);
+ "checkpoint_threadmain - Checkpoint Done\n", 0, 0, 0);
if (rval != 0) {
/* bad error */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Serious Error---Failed to checkpoint database, "
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "checkpoint_threadmain - Serious Error---Failed to checkpoint database, "
"err=%d (%s)\n", rval, dblayer_strerror(rval), 0);
if (LDBM_OS_ERR_IS_DISKFULL(rval)) {
operation_out_of_disk_space();
@@ -4603,30 +4609,30 @@ static int checkpoint_threadmain(void *param)
if (!db || rc ) {
continue;
}
- LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "compactdb: Compacting DB start: %s\n",
+ LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM, "checkpoint_threadmain - Compacting DB start: %s\n",
inst->inst_name);
rc = dblayer_txn_begin(inst->inst_be, NULL, &txn);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "compactdb: transaction begin failed: %d\n", rc);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "checkpoint_threadmain - compactdb: transaction begin failed: %d\n", rc);
break;
}
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, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "compactdb: failed to abort txn (%s) db error - %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "checkpoint_threadmain - compactdb: failed to abort txn (%s) db error - %d %s\n",
inst->inst_name, rc, db_strerror(rc));
break;
}
} else {
- LDAPDebug2Args(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
+ LDAPDebug2Args(LDAP_DEBUG_BACKLDBM,
"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, LOG_ERR, "compactdb: failed to commit txn (%s) db error - %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "checkpoint_threadmain - compactdb: failed to commit txn (%s) db error - %d %s\n",
inst->inst_name, rc, db_strerror(rc));
break;
}
@@ -4641,7 +4647,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, LOG_ERR, "checkpoint_threadmain: "
+ LDAPDebug2Args(LDAP_DEBUG_ERR, "checkpoint_threadmain - "
"log archive failed - %s (%d)\n",
dblayer_strerror(rval), rval);
} else {
@@ -4657,7 +4663,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, LOG_ERR, "checkpoint_threadmain: failed to rename log (%s) to (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "checkpoint_threadmain - Failed to rename log (%s) to (%s)\n",
*listp, new_filename, 0);
rval = -1;
goto error_return;
@@ -4669,12 +4675,12 @@ static int checkpoint_threadmain(void *param)
* individually freed. */
}
}
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "Check point before leaving\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "checkpoint_threadmain - Check point before leaving\n");
rval = dblayer_force_checkpoint(li);
error_return:
DECR_THREAD_COUNT(priv);
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "Leaving checkpoint_threadmain\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "checkpoint_threadmain - Leaving checkpoint_threadmain\n");
return rval;
}
@@ -4697,7 +4703,8 @@ dblayer_start_trickle_thread(struct ldbminfo *li)
SLAPD_DEFAULT_THREAD_STACKSIZE) )
{
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "failed to create database trickle thread, "
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_start_trickle_thread - "
+ "Failed to create database trickle thread, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
return_value = -1;
@@ -4736,18 +4743,18 @@ static int trickle_threadmain(void *param)
priv->dblayer_trickle_percentage,
&pages_written)) != 0)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Serious Error---Failed to trickle, err=%d (%s)\n",rval,dblayer_strerror(rval), 0);
+ LDAPDebug(LDAP_DEBUG_ERR,"trickle_threadmain - Serious Error---Failed to trickle, err=%d (%s)\n",rval,dblayer_strerror(rval), 0);
}
if (pages_written > 0)
{
- checkpoint_debug_message(debug_checkpointing,"Trickle thread wrote %d pages\n",pages_written,0, 0);
+ checkpoint_debug_message(debug_checkpointing,"trickle_threadmain - Trickle thread wrote %d pages\n",pages_written,0, 0);
}
}
}
}
DECR_THREAD_COUNT(priv);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "Leaving trickle_threadmain priv\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "trickle_threadmain - Leaving trickle_threadmain priv\n", 0, 0, 0);
return 0;
}
@@ -4987,7 +4994,7 @@ static int commit_good_database(dblayer_private *priv)
priv->dblayer_file_mode );
if (NULL == prfd)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Fatal Error---Failed to write guardian file %s, database corruption possible" SLAPI_COMPONENT_NAME_NSPR " %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_CRIT,"commit_good_database - 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;
}
@@ -5005,7 +5012,8 @@ static int commit_good_database(dblayer_private *priv)
return 0;
} else
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Fatal Error---Failed to write guardian file, database corruption possible\n", 0,0, 0 );
+ LDAPDebug(LDAP_DEBUG_CRIT,"commit_good_database - "
+ "Failed to write guardian file, database corruption possible\n", 0,0, 0 );
(void)PR_Delete(filename);
return -1;
}
@@ -5070,7 +5078,8 @@ static int read_metadata(struct ldbminfo *li)
so we should check for condition 3.
*/
if (!dbversion_exists(li, home_dir)) {
- 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 );
+ LDAPDebug(LDAP_DEBUG_EMERG,"read_metadata - "
+ "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;
@@ -5123,8 +5132,8 @@ 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, LOG_ERR,
- "Fatal Error---Failed to delete guardian file, "
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "read_metadata - Failed to delete guardian file, "
"database corruption possible\n", 0, 0, 0 );
}
return return_value;
@@ -5146,7 +5155,7 @@ static int dblayer_force_checkpoint(struct ldbminfo *li)
if (priv->dblayer_enable_transactions) {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "Checkpointing database ...\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "dblayer_force_checkpoint - Checkpointing database ...\n", 0, 0, 0);
/*
* DB workaround. Newly created environments do not know what the
@@ -5162,21 +5171,21 @@ static int dblayer_force_checkpoint(struct ldbminfo *li)
if (ret != DB_INCOMPLETE)
#endif
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Checkpoint FAILED, error %s (%d)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_force_checkpoint - 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, LOG_ERR, "Busy: retrying checkpoint\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_NOTICE, "dblayer_force_checkpoint - 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, LOG_ERR, "Busy: giving up on checkpoint\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_NOTICE, "dblayer_force_checkpoint - Busy: giving up on checkpoint\n", 0, 0, 0);
break;
} else if (ret != 0) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Checkpoint FAILED, error %s (%d)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "Cdblayer_force_checkpoint - heckpoint FAILED, error %s (%d)\n",
dblayer_strerror(ret), ret, 0);
break;
}
@@ -5198,8 +5207,8 @@ _dblayer_delete_aux_dir(struct ldbminfo *li, char *path)
int rc = -1;
if (NULL == li || NULL == path) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
- "_dblayer_delete_aux_dir: Invalid LDBM info (0x%x) "
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "_dblayer_delete_aux_dir - Invalid LDBM info (0x%x) "
"or path (0x%x)\n", li, path);
return rc;
}
@@ -5249,8 +5258,8 @@ static int _dblayer_delete_instance_dir(ldbm_instance *inst, int startdb)
if (NULL == li)
{
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
- "_dblayer_delete_instance_dir: NULL LDBM info\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "_dblayer_delete_instance_dir - NULL LDBM info\n");
rval = -1;
goto done;
}
@@ -5261,7 +5270,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, LOG_ERR, "_dblayer_delete_instance_dir: dblayer_start failed! %s (%d)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "_dblayer_delete_instance_dir - dblayer_start failed! %s (%d)\n",
dblayer_strerror(rval), rval, 0);
goto done;
}
@@ -5287,11 +5296,11 @@ static int _dblayer_delete_instance_dir(ldbm_instance *inst, int startdb)
goto done;
}
if (inst_dirp && *inst_dirp) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "_dblayer_delete_instance_dir: inst_dir is NULL\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "_dblayer_delete_instance_dir - inst_dir is NULL\n", 0, 0, 0);
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "_dblayer_delete_instance_dir: PR_OpenDir(%s) failed (%d): %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "_dblayer_delete_instance_dir - PR_OpenDir(%s) failed (%d): %s\n",
inst_dirp, PR_GetError(),slapd_pr_strerror(PR_GetError()));
}
rval = -1;
@@ -5335,7 +5344,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, LOG_ERR, "_dblayer_delete_instance_dir: dblayer_close failed! %s (%d)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "_dblayer_delete_instance_dir - dblayer_close failed! %s (%d)\n",
dblayer_strerror(rval), rval, 0);
}
}
@@ -5395,8 +5404,8 @@ 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, LOG_ERR,
- "dblayer_delete_database: skipping instance %s\n",inst->inst_name , 0, 0);
+ LDAPDebug(LDAP_DEBUG_NOTICE,
+ "dblayer_delete_database_ex - skipping instance %s\n",inst->inst_name , 0, 0);
} else
{
if (NULL == instance)
@@ -5407,8 +5416,8 @@ dblayer_delete_database_ex(struct ldbminfo *li, char *instance, char *cldir)
}
if (ret != 0)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "dblayer_delete_database: WARNING _dblayer_delete_instance_dir failed (%d)\n", ret, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_delete_database_ex - Failed (%d)\n", ret, 0, 0);
return ret;
}
}
@@ -5419,8 +5428,8 @@ 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, LOG_ERR,
- "dblayer_delete_database: failed to deelete \"%s\"\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "dblayer_delete_database_ex - Failed to delete \"%s\"\n",
chdir);
return ret;
}
@@ -5430,7 +5439,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, LOG_ERR, "PR_OpenDir (%s) failed (%d): %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_delete_database_ex - PR_OpenDir (%s) failed (%d): %s\n",
priv->dblayer_home_directory,
PR_GetError(),slapd_pr_strerror(PR_GetError()));
return -1;
@@ -5474,8 +5483,8 @@ dblayer_delete_database_ex(struct ldbminfo *li, char *instance, char *cldir)
{
ret = dblayer_delete_transaction_logs(log_dir);
if(ret) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "dblayer_delete_database: dblayer_delete_transaction_logs failed (%d)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_delete_database_ex - dblayer_delete_transaction_logs failed (%d)\n",
ret, 0, 0);
return -1;
}
@@ -5649,7 +5658,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, LOG_ERR, "dblayer_copyfile: failed to open source file %s by \"%s\"\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR, "dblayer_copyfile - Failed to open source file %s by \"%s\"\n",
source, strerror(errno));
goto error;
}
@@ -5657,12 +5666,12 @@ 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, LOG_ERR, "dblayer_copyfile: failed to open dest file %s by \"%s\"\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR, "dblayer_copyfile - Failed to open dest file %s by \"%s\"\n",
destination, strerror(errno));
goto error;
}
- LDAPDebug2Args(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
- "Copying %s to %s\n", source, destination);
+ LDAPDebug2Args(LDAP_DEBUG_BACKLDBM,
+ "dblayer_copyfile - Copying %s to %s\n", source, destination);
/* Loop round reading data and writing it */
while (1)
{
@@ -5672,7 +5681,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, LOG_ERR, "dblayer_copyfile: failed to read by \"%s\": rval = %d\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR, "dblayer_copyfile - Failed to read by \"%s\": rval = %d\n",
strerror(errno), return_value);
}
break;
@@ -5686,12 +5695,12 @@ dblayer_copyfile(char *source, char *destination, int overwrite, int mode)
break;
} else {
/* means error */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copyfile: failed to write by \"%s\"; real: %d bytes, exp: %d bytes\n",
+ LDAPDebug(LDAP_DEBUG_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;
ptr += return_value;
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copyfile: retrying to write %d bytes\n", bytes_to_write);
+ LDAPDebug1Arg(LDAP_DEBUG_NOTICE, "dblayer_copyfile - Retrying to write %d bytes\n", bytes_to_write);
} else {
break;
}
@@ -5761,14 +5770,14 @@ dblayer_copy_directory(struct ldbminfo *li,
if (!src_dir || '\0' == *src_dir)
{
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
- "dblayer_copy_directory: src_dir is empty\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "dblayer_copy_directory - src_dir is empty\n");
return return_value;
}
if (!dest_dir || '\0' == *dest_dir)
{
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
- "dblayer_copy_directory: dest_dir is empty\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "dblayer_copy_directory - dest_dir is empty\n");
return return_value;
}
@@ -5786,14 +5795,14 @@ dblayer_copy_directory(struct ldbminfo *li,
}
if (is_changelog) {
if (!src_is_fullpath) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "Changelogdir \"%s\" is not full path; "
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "dblayer_copy_directory - Changelogdir \"%s\" is not full path; "
"Skipping it.\n", src_dir);
return 0;
}
} else {
inst = ldbm_instance_find_by_name(li, relative_instance_name);
if (NULL == inst) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Backend instance \"%s\" does not exist; "
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_copy_directory - Backend instance \"%s\" does not exist; "
"Instance path %s could be invalid.\n",
relative_instance_name, src_dir, 0);
return return_value;
@@ -5809,7 +5818,7 @@ dblayer_copy_directory(struct ldbminfo *li,
inst_dir, MAXPATHLEN);
if (!inst_dirp || !*inst_dirp)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Instance dir is NULL.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_copy_directory - Instance dir is NULL.\n", 0, 0, 0);
return return_value;
}
len = strlen(inst_dirp);
@@ -5822,8 +5831,8 @@ dblayer_copy_directory(struct ldbminfo *li,
dirhandle = PR_OpenDir(new_src_dir);
if (NULL == dirhandle)
{
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "dblayer_copy_directory: failed to open dir %s\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "dblayer_copy_directory - Failed to open dir %s\n",
new_src_dir);
return return_value;
@@ -5882,7 +5891,7 @@ dblayer_copy_directory(struct ldbminfo *li,
}
if (mkdir_p(new_dest_dir, 0700) != PR_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Can't create new directory %s, "
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_copy_directory - Can't create new directory %s, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
new_dest_dir, PR_GetError(),
slapd_pr_strerror(PR_GetError()));
@@ -5894,7 +5903,7 @@ dblayer_copy_directory(struct ldbminfo *li,
filename2 = slapi_ch_smprintf("%s/%s", new_dest_dir, direntry->name);
if (restore) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Restoring file %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_INFO, "dblayer_copy_directory - Restoring file %d (%s)\n",
*cnt, filename2, 0);
if (task) {
slapi_task_log_notice(task,
@@ -5903,7 +5912,7 @@ dblayer_copy_directory(struct ldbminfo *li,
"Restoring file %d (%s)", *cnt, filename2);
}
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Backing up file %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_INFO, "dblayer_copy_directory - Backing up file %d (%s)\n",
*cnt, filename2, 0);
if (task) {
slapi_task_log_notice(task,
@@ -5925,7 +5934,7 @@ dblayer_copy_directory(struct ldbminfo *li,
0, priv->dblayer_file_mode);
}
if (return_value < 0) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_copy_directory: Failed to copy file %s to %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR, "dblayer_copy_directory - Failed to copy file %s to %s\n",
filename1, filename2);
slapi_ch_free((void**)&filename1);
slapi_ch_free((void**)&filename2);
@@ -5964,8 +5973,8 @@ _dblayer_get_changelogdir(struct ldbminfo *li, char **changelogdir)
int rc = -1;
if (NULL == li || NULL == changelogdir) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: _dblayer_get_changelogdir: Invalid arg: "
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "_dblayer_get_changelogdir - Invalid arg: "
"li: 0x%x, changelogdir: 0x%x\n", li, changelogdir);
return rc;
}
@@ -5986,8 +5995,8 @@ _dblayer_get_changelogdir(struct ldbminfo *li, char **changelogdir)
goto bail;
}
if (LDAP_SUCCESS != rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: Failed to search \"%s\"\n", CHANGELOGENTRY);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "_dblayer_get_changelogdir - Failed to search \"%s\"\n", CHANGELOGENTRY);
goto bail;
}
/* rc == LDAP_SUCCESS */
@@ -6047,8 +6056,8 @@ 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, LOG_ERR,
- "Backup: missing db home directory info\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "dblayer_backup - Missing db home directory info\n");
return return_value;
}
@@ -6085,13 +6094,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, LOG_ERR,
- "Backup: transaction error\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "dblayer_backup - Transaction error\n");
return return_value;
}
if ( g_get_shutdown() || c_get_shutdown() ) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "Backup aborted\n");
+ LDAPDebug0Args(LDAP_DEBUG_WARNING, "dblayer_backup - Server shutting down, backup aborted\n");
return_value = -1;
goto bail;
}
@@ -6103,8 +6112,8 @@ 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, LOG_ERR,
- "Backup: log archive error\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "dblayer_backup - Log archive error\n");
if (task) {
slapi_task_log_notice(task, "Backup: log archive error\n");
}
@@ -6115,7 +6124,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, LOG_ERR, "Backup aborted\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "dblayer_backup - Server shutting down, backup aborted\n");
return_value = -1;
goto bail;
}
@@ -6127,8 +6136,8 @@ 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, LOG_ERR,
- "Backup: Instance dir is empty\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "dblayer_backup - Instance dir is empty\n");
if (task) {
slapi_task_log_notice(task,
"Backup: Instance dir is empty\n");
@@ -6140,8 +6149,8 @@ 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, LOG_ERR,
- "Backup: error in copying directory "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_backup - Error in copying directory "
"(%s -> %s): err=%d\n",
inst_dirp, dest_dir, return_value);
if (task) {
@@ -6168,8 +6177,8 @@ dblayer_backup(struct ldbminfo *li, char *dest_dir, Slapi_Task *task)
0 /* backup */,
&cnt, 0, 0, 1);
if (return_value) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Backup: error in copying directory "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_backup - Error in copying directory "
"(%s -> %s): err=%d\n",
changelogdir, changelog_destdir, return_value);
if (task) {
@@ -6191,7 +6200,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, LOG_ERR, "Backup: Failed to copy file %s\n", pathname1);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "dblayer_backup - Failed to copy file %s\n", pathname1);
slapi_ch_free_string(&pathname1);
goto bail;
}
@@ -6202,8 +6211,8 @@ 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, LOG_ERR,
- "Backup: can't get list of logs\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "dblayer_backup - Can't get list of logs\n");
goto bail;
}
@@ -6219,8 +6228,8 @@ dblayer_backup(struct ldbminfo *li, char *dest_dir, Slapi_Task *task)
}
if (! found) {
ok = 0; /* missing log: start over */
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "WARNING: Log %s has been swiped "
+ LDAPDebug1Arg(LDAP_DEBUG_WARNING,
+ "dblayer_backup - Log %s has been swiped "
"out from under me! (retrying)\n", *listi);
if (task) {
slapi_task_log_notice(task,
@@ -6231,7 +6240,7 @@ dblayer_backup(struct ldbminfo *li, char *dest_dir, Slapi_Task *task)
}
if ( g_get_shutdown() || c_get_shutdown() ) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "Backup aborted\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "dblayer_backup - Server shutting down, backup aborted\n");
return_value = -1;
goto bail;
}
@@ -6256,7 +6265,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, LOG_ERR, "Backing up file %d (%s)\n",
+ LDAPDebug2Args(LDAP_DEBUG_INFO, "dblayer_backup - Backing up file %d (%s)\n",
cnt, pathname2);
if (task)
{
@@ -6268,7 +6277,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, LOG_ERR, "Backup: error in copying file '%s' (err=%d)\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR, "dblayer_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)",
@@ -6279,7 +6288,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, LOG_ERR, "Backup aborted\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "dblayer_backup - Server shutting down, backup aborted\n");
return_value = -1;
slapi_ch_free((void **)&pathname1);
slapi_ch_free((void **)&pathname2);
@@ -6299,15 +6308,15 @@ 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, LOG_ERR, "Backing up file %d (%s)\n", cnt, pathname2);
+ LDAPDebug2Args(LDAP_DEBUG_INFO, "dblayer_backup - 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);
}
return_value = dblayer_copyfile(pathname1, pathname2, 0, priv->dblayer_file_mode);
if (0 > return_value) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Backup: error in copying version file "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_backup - Error in copying version file "
"(%s -> %s): err=%d\n",
pathname1, pathname2, return_value);
if (task) {
@@ -6386,7 +6395,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, LOG_ERR, "PR_ReadDir failed (%d): %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_delete_transaction_logs - PR_ReadDir failed (%d): %s\n",
PR_GetError(),slapd_pr_strerror(PR_GetError()), 0);
break;
}
@@ -6398,7 +6407,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, LOG_ERR, "Deleting log file: (%s)\n",
+ LDAPDebug(LDAP_DEBUG_INFO, "dblayer_delete_transaction_logs - Deleting log file: (%s)\n",
filename1, 0, 0);
unlink(filename1);
}
@@ -6407,8 +6416,8 @@ int dblayer_delete_transaction_logs(const char * log_dir)
}
else if (PR_FILE_NOT_FOUND_ERROR != PR_GetError())
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "dblayer_delete_transaction_logs: PR_OpenDir(%s) failed (%d): %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_delete_transaction_logs - PR_OpenDir(%s) failed (%d): %s\n",
log_dir, PR_GetError(),slapd_pr_strerror(PR_GetError()));
rc=1;
}
@@ -6459,7 +6468,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, LOG_ERR, "Moving file %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "Moving file %s\n",
filename2, 0, 0);
/* Is this entry a directory? */
tmp_rval = PR_GetFileInfo64(filename1, &info);
@@ -6488,7 +6497,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, LOG_ERR, "dblayer_copy_dirand_contents: failed to copy file %s\n", filename1);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "dblayer_copy_dirand_contents - Failed to copy file %s\n", filename1);
break;
}
}
@@ -6525,7 +6534,7 @@ static int dblayer_fri_trim(char *fri_dir_path, char* bename)
{
if(strcasecmp(direntry->name,bename)!=0)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Removing file %s from staging area\n",
+ LDAPDebug(LDAP_DEBUG_INFO, "dblayer_fri_trim - Removing file %s from staging area\n",
filename, 0, 0);
ldbm_delete_dirs(filename);
}
@@ -6535,7 +6544,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, LOG_ERR, "Removing file %s from staging area\n",
+ LDAPDebug(LDAP_DEBUG_INFO, "dblayer_fri_trim - Removing file %s from staging area\n",
filename, 0, 0);
PR_Delete(filename);
}
@@ -6580,18 +6589,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, 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);
+ LDAPDebug(LDAP_DEBUG_INFO, "dblayer_fri_restore - %s exists\n",fribak_dir_path, 0, 0);
+ LDAPDebug(LDAP_DEBUG_INFO, "dblayer_fri_restore - Removing %s.\n",fribak_dir_path, 0, 0);
retval = ldbm_delete_dirs(fribak_dir_path);
if (retval)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dblayer_fri_restore: Removal of %s failed!\n", fribak_dir_path, 0, 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_fri_restore: Creation of %s failed!\n", fribak_dir_path, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_fri_restore - Creation of %s failed!\n", fribak_dir_path, 0, 0);
goto error;
}
}
@@ -6600,21 +6609,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, LOG_ERR, "dblayer_fri_restore: Copy contents to %s failed!\n", fribak_dir_path, 0, 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_fri_restore: Recovery failed!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "dblayer_fri_restore: Trim failed!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_fri_restore - Trim failed!\n", 0, 0, 0);
goto error;
}
*new_src_dir = fribak_dir_path;
@@ -6668,7 +6677,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, LOG_ERR,
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
"Restore: missing db home directory info\n");
return -1;
}
@@ -6678,7 +6687,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, LOG_ERR, "Restore: backup directory %s does not "
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "dblayer_restore - Backup directory %s does not "
"exist.\n", src_dir);
if (task) {
slapi_task_log_notice(task, "Restore: backup directory %s does not "
@@ -6686,7 +6695,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, LOG_ERR, "Restore: backup directory %s is not "
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "dblayer_restore - Backup directory %s is not "
"a directory.\n", src_dir);
if (task) {
slapi_task_log_notice(task, "Restore: backup directory %s is not "
@@ -6695,7 +6704,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, LOG_ERR, "Restore: backup directory %s does not "
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "dblayer_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 "
@@ -6735,12 +6744,12 @@ 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, LOG_ERR,
- "Restore: target server has no %s configured\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "dblayer_restore - Target server has no %s configured\n",
direntry->name);
if (task) {
slapi_task_log_notice(task,
- "Restore: target server has no %s configured\n",
+ "dblayer_restore - Target server has no %s configured\n",
direntry->name);
}
PR_CloseDir(dirhandle);
@@ -6750,8 +6759,8 @@ 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, LOG_ERR,
- "Restore: backup dir %s and target dir %s "
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "dblayer_restore - Backup dir %s and target dir %s "
"are identical\n",
src_dir, inst->inst_parent_dir_name);
if (task) {
@@ -6798,8 +6807,8 @@ 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, LOG_ERR,
- "Restore: failed to open the directory \"%s\"\n", real_src_dir);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "dblayer_restore- Failed to open the directory \"%s\"\n", real_src_dir);
if (task) {
slapi_task_log_notice(task,
"Restore: failed to open the directory \"%s\"\n", real_src_dir);
@@ -6830,8 +6839,8 @@ 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, LOG_ERR,
- "Restore: broken changelog dir path %s\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "dblayer_restore - Broken changelog dir path %s\n",
changelogdir);
if (task) {
slapi_task_log_notice(task,
@@ -6849,8 +6858,8 @@ 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, LOG_ERR,
- "Restore: failed to copy directory %s\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "dblayer_restore - Failed to copy directory %s\n",
filename1);
if (task) {
slapi_task_log_notice(task,
@@ -6868,7 +6877,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, LOG_ERR, "Restore: failed to copy file %s\n", filename1);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "dblayer_restore - Failed to copy file %s\n", filename1);
goto error_out;
}
}
@@ -6886,12 +6895,12 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task *task, char *
continue;
else
{
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "Restore: failed to copy directory %s\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "dblayer_restore - Failed to copy directory %s\n",
filename1);
if (task) {
slapi_task_log_notice(task,
- "Restore: failed to copy directory %s", filename1);
+ "dblayer_restore - Failed to copy directory %s", filename1);
}
goto error_out;
}
@@ -6919,7 +6928,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, LOG_ERR, "Restoring file %d (%s)\n",
+ LDAPDebug2Args(LDAP_DEBUG_INFO, "dblayer_restore - Restoring file %d (%s)\n",
cnt, filename2);
if (task) {
slapi_task_log_notice(task, "Restoring file %d (%s)",
@@ -6930,7 +6939,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, LOG_ERR, "Restore: failed to copy file %s\n", filename1);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "dblayer_restore - Failed to copy file %s\n", filename1);
goto error_out;
}
cnt++;
@@ -6947,7 +6956,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, LOG_ERR, "Warning: Unable to read dbversion "
+ LDAPDebug1Arg(LDAP_DEBUG_WARNING, "dblayer_restore - Unable to read dbversion "
"file in %s\n", home_dir);
}
else
@@ -6970,8 +6979,8 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task *task, char *
}
else if (action & DBVERSION_NEED_DN2RDN)
{
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
- "%s is on, while the instance %s is in the DN format. "
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "dblayer_restore - %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);
return_value = -1;
@@ -6979,8 +6988,8 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task *task, char *
}
else if (action & DBVERSION_NEED_RDN2DN)
{
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
- "%s is off, while the instance %s is in the RDN format. "
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "dblayer_restore - %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);
return_value = -1;
@@ -7008,10 +7017,10 @@ 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, LOG_ERR,
- "Restore: failed to init database\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "dblayer_restore - Failed to init database\n");
if (task) {
- slapi_task_log_notice(task, "Restore: failed to init database");
+ slapi_task_log_notice(task, "dblayer_restore - Failed to init database");
}
return_value = tmp_rval;
goto error_out;
@@ -7021,16 +7030,16 @@ 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, LOG_ERR,
- "Warning: Unable to verify the index configuration\n");
+ LDAPDebug0Args(LDAP_DEBUG_WARNING,
+ "dblayer_restore - Unable to verify the index configuration\n");
}
if (li->li_flags & SLAPI_TASK_RUNNING_FROM_COMMANDLINE) {
/* command line: close the database down again */
tmp_rval = dblayer_close(li, dbmode);
if (0 != tmp_rval) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
- "Restore: Failed to close database\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "dblayer_restore - Failed to close database\n");
}
} else {
allinstance_set_busy(li); /* on-line mode */
@@ -7045,13 +7054,13 @@ error_out:
if (frirestore && PR_Access(real_src_dir, PR_ACCESS_EXISTS) == PR_SUCCESS)
{
int ret1 = 0;
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "Restore: Removing staging area %s.\n", real_src_dir);
+ LDAPDebug1Arg(LDAP_DEBUG_INFO,
+ "dblayer_restore - Removing staging area %s.\n", real_src_dir);
ret1 = ldbm_delete_dirs(real_src_dir);
if (ret1)
{
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "Restore: Removal of staging area %s failed!\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "dblayer_restore - Removal of staging area %s failed!\n",
real_src_dir);
}
}
@@ -7086,8 +7095,8 @@ 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, LOG_ERR,
- "Failed to open file: %s, error: (%d) %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_file_open - Failed to open file: %s, error: (%d) %s\n",
fname, rc, slapd_pr_strerror(rc));
}
return rc;
@@ -7155,8 +7164,8 @@ 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, LOG_ERR,
- "Previous import or restore failed, file: %s is empty\n", fname);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "dblayer_file_check - Previous import or restore failed, file: %s is empty\n", fname);
}
PR_Close(prfd);
PR_Delete(fname);
@@ -7325,16 +7334,16 @@ int dblayer_update_db_ext(ldbm_instance *inst, char *oldext, char *newext)
if (NULL == inst)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "update_db_ext: Null instance is passed\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_update_db_ext - Null instance is passed\n", 0, 0, 0);
return -1; /* non zero */
}
li = inst->inst_li;
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, LOG_ERR,
- "update_db_ext: instance dir is NULL\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_update_db_ext - Instance dir is NULL\n", 0, 0, 0);
return -1; /* non zero */
}
for (a = (struct attrinfo *)avl_getfirst(inst->inst_attrs);
@@ -7354,22 +7363,22 @@ 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, LOG_ERR, "db_create returned %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_update_db_ext - 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, LOG_DEBUG, "update_db_ext: rename %s -> %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "dblayer_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, LOG_ERR, "rename returned %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_update_db_ext - rename returned %d (%s)\n",
rval, dblayer_strerror(rval), 0);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "update_db_ext: index (%s) Failed to update index %s -> %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_update_db_ext - index (%s) Failed to update index %s -> %s\n",
inst->inst_name, ofile, nfile);
goto done;
}
@@ -7380,22 +7389,22 @@ 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, LOG_ERR, "db_create returned %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_update_db_ext - 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, LOG_DEBUG, "update_db_ext: rename %s -> %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "dblayer_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, LOG_ERR, "rename returned %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "dblayer_update_db_ext - rename returned %d (%s)\n",
rval, dblayer_strerror(rval), 0);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "update_db_ext: index (%s) Failed to update index %s -> %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_update_db_ext - index (%s) Failed to update index %s -> %s\n",
inst->inst_name, ofile, nfile);
}
done:
@@ -7418,8 +7427,8 @@ int dblayer_delete_indices(ldbm_instance *inst)
if (NULL == inst)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "update_index_ext: Null instance is passed\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dblayer_delete_indices - Null instance is passed\n", 0, 0, 0);
return rval;
}
rval = 0;
@@ -7436,7 +7445,7 @@ void dblayer_set_recovery_required(struct ldbminfo *li)
{
if (NULL == li || NULL == li->li_dblayer_private)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"set_recovery_required: no dblayer info\n",
+ LDAPDebug(LDAP_DEBUG_ERR,"dblayer_set_recovery_required - No dblayer info\n",
0, 0, 0);
return;
}
diff --git a/ldap/servers/slapd/back-ldbm/dbverify.c b/ldap/servers/slapd/back-ldbm/dbverify.c
index 192ba52..c63f1ce 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, LOG_ERR, "DB verify",
+ slapi_log_error(SLAPI_LOG_ERR, "dbverify_ext",
"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, LOG_ERR, "DB verify",
+ slapi_log_error(SLAPI_LOG_ERR, "dbverify_ext",
"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, LOG_ERR, "DB verify",
+ slapi_log_error(SLAPI_LOG_ERR, "dbverify_ext",
"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, LOG_ERR, "DB verify",
+ slapi_log_error(SLAPI_LOG_ERR, "dbverify_ext",
"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, LOG_ERR, "DB verify",
+ slapi_log_error(SLAPI_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, LOG_ERR, "DB verify",
+ slapi_log_error(SLAPI_LOG_ERR, "dbverify_ext",
"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, LOG_ERR, "DB verify",
+ slapi_log_error(SLAPI_LOG_ERR, "dbverify_ext",
"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, LOG_ERR, "DB verify",
+ slapi_log_error(SLAPI_LOG_ERR, "dbverify_ext",
"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, LOG_ERR, "DB verify",
+ slapi_log_error(SLAPI_LOG_ERR, "dbverify_ext",
"%s: ok\n", dbdir);
}
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "DB verify",
+ slapi_log_error(SLAPI_LOG_ERR, "dbverify_ext",
"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, LOG_DEBUG, "verify DB", "Verifying db files...\n");
+ slapi_log_error(SLAPI_LOG_TRACE, "ldbm_back_dbverify", "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, LOG_ERR, "verify DB",
- "dbverify: Failed to init database\n");
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_dbverify",
+ "dbverify: Failed to init database\n");
return rval;
}
/* server is up */
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "verify DB", "server is up\n");
+ slapi_log_error(SLAPI_LOG_TRACE, "ldbm_back_dbverify", "server is up\n");
if (instance_names) /* instance is specified */
{
char **inp = NULL;
@@ -237,8 +237,8 @@ ldbm_back_dbverify( Slapi_PBlock *pb )
if (instance_set_busy(inst) != 0)
{
/* standalone, only. never happens */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
- "ldbm: '%s' is already in the middle of "
+ slapi_log_error(SLAPI_LOG_WARNING, "ldbm_back_dbverify",
+ "Backend '%s' is already in the middle of "
"another task and cannot be disturbed.\n",
inst->inst_name);
continue; /* skip this instance and go to the next*/
@@ -256,8 +256,8 @@ ldbm_back_dbverify( Slapi_PBlock *pb )
rval = dblayer_post_close(li, DBLAYER_EXPORT_MODE);
if (0 != rval)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
- "verify DB", "Failed to close database\n");
+ slapi_log_error(SLAPI_LOG_ERR,
+ "ldbm_back_dbverify", "Failed to close database\n");
}
return rval_main;
diff --git a/ldap/servers/slapd/back-ldbm/dbversion.c b/ldap/servers/slapd/back-ldbm/dbversion.c
index e8d9e79..49fc509 100644
--- a/ldap/servers/slapd/back-ldbm/dbversion.c
+++ b/ldap/servers/slapd/back-ldbm/dbversion.c
@@ -62,7 +62,8 @@ 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, LOG_ERR, "Could not open file \"%s\" for writing "
+ LDAPDebug(LDAP_DEBUG_ERR, "dbversion_write - "
+ "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 +101,8 @@ dbversion_write(struct ldbminfo *li, const char *directory,
len = strlen(buf);
if ( slapi_write_buffer( prfd, buf, len ) != (PRInt32)len )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Could not write to file \"%s\"\n", filename, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "dbversion_write - "
+ "Could not write to file \"%s\"\n", filename, 0, 0 );
rc= -1;
}
if(rc==0 && dataversion!=NULL)
@@ -109,7 +111,8 @@ dbversion_write(struct ldbminfo *li, const char *directory,
len = strlen( buf );
if ( slapi_write_buffer( prfd, buf, len ) != (PRInt32)len )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Could not write to file \"%s\"\n", filename, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "dbversion_write - "
+ "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 fb5ed90..9f91dc2 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, LOG_DEBUG, "=> dn2entry_ext \"%s\"\n", slapi_sdn_get_dn(sdn), 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> dn2entry_ext \"%s\"\n", slapi_sdn_get_dn(sdn), 0, 0 );
inst = (ldbm_instance *) be->be_instance_info;
@@ -66,8 +66,8 @@ dn2entry_ext(
{
if (DB_NOTFOUND != *err)
{
- LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR,
- "dn2entry_ext: Failed to get id for %s "
+ LDAPDebug2Args(LDAP_DEBUG_ANY,
+ "dn2entry_ext - Failed to get id for %s "
"from entryrdn index (%d)\n",
slapi_sdn_get_dn(sdn), *err);
}
@@ -118,15 +118,15 @@ dn2entry_ext(
* entrydn index, but we could not read the entry
* from the id2entry index. what should we do?
*/
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "dn2entry_ext: the dn \"%s\" was in the %s index, "
+ LDAPDebug(LDAP_DEBUG_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);
}
}
}
bail:
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= dn2entry_ext %p\n", e, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= dn2entry_ext %p\n", e, 0, 0 );
return( e );
}
@@ -159,7 +159,7 @@ dn2ancestor(
{
struct backentry *e = NULL;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> dn2ancestor \"%s\"\n", slapi_sdn_get_dn(sdn), 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= dn2ancestor %p\n", e, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= dn2ancestor %p\n", e, 0, 0 );
return( e );
}
@@ -255,15 +255,15 @@ get_copy_of_entry(Slapi_PBlock *pb, const entry_address *addr, back_txn *txn, in
{
if(must_exist)
{
- 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 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "get_copy_of_entry - 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 );
}
if ( LDAP_INVALID_DN_SYNTAX == err ) {
rc = LDAP_INVALID_DN_SYNTAX; /* respect the error */
} else {
- rc= LDAP_OPERATIONS_ERROR;
+ rc = LDAP_OPERATIONS_ERROR;
}
}
else
diff --git a/ldap/servers/slapd/back-ldbm/filterindex.c b/ldap/servers/slapd/back-ldbm/filterindex.c
index 49e83cb..755917b 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, LOG_DEBUG, "=> filter_candidates\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= filter_candidates %lu (vattr)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "<= filter_candidates %lu (vlv)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "\tEQUALITY\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "\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, LOG_DEBUG, "\tSUBSTRINGS\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "\tSUBSTRINGS\n", 0, 0, 0 );
result = substring_candidates( pb, be, f, err, allidslimit );
break;
case LDAP_FILTER_GE:
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "\tGE\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "\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, LOG_DEBUG, "\tLE\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "\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, LOG_DEBUG, "\tPRESENT\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "\tPRESENT\n", 0, 0, 0 );
result = presence_candidates( pb, be, f, err, allidslimit );
break;
case LDAP_FILTER_APPROX:
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "\tAPPROX\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "\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, LOG_DEBUG, "\tEXTENSIBLE\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "\tEXTENSIBLE\n", 0, 0, 0 );
result = extensible_candidates( pb, be, f, err, allidslimit );
break;
case LDAP_FILTER_AND:
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "\tAND\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "\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, LOG_DEBUG, "\tOR\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "\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, LOG_DEBUG, "\tNOT\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "\tNOT\n", 0, 0, 0 );
result = idl_allids( be );
break;
default:
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_FILTER,
"filter_candidates: unknown type 0x%X\n",
ftype, 0, 0 );
break;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= filter_candidates %lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> ava_candidates\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> ava_candidates\n", 0, 0, 0 );
if ( slapi_filter_get_ava( f, &type, &bval ) != 0 ) {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, " slapi_filter_get_ava failed\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, " slapi_filter_get_ava failed\n",
0, 0, 0 );
return( NULL );
}
@@ -227,7 +227,7 @@ ava_candidates(
op = "~=";
break;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, " %s%s%s\n", type, op,
+ LDAPDebug(LDAP_DEBUG_TRACE, " %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, LOG_DEBUG, "<= ava_candidates %lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "<= ava_candidates %lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "<= ava_candidates invalid filter\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"<= 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, LOG_DEBUG, "<= ava_candidates %lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> presence_candidates\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> presence_candidates\n", 0, 0, 0 );
if ( slapi_filter_get_type( f, &type ) != 0 ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, " slapi_filter_get_type failed\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "presence_candidates - slapi_filter_get_type failed\n",
0, 0, 0 );
return( NULL );
}
@@ -367,16 +367,16 @@ presence_candidates(
if (idl != NULL && ALLIDS(idl) && strcasecmp(type, "nscpentrydn") == 0) {
/* try the equality index instead */
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
- "fallback to eq index as pres index gave allids\n",
- 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,
+ "presence_candidates - fallback to eq index as pres index gave allids\n",
+ 0, 0, 0);
idl_free(&idl);
idl = index_range_read_ext(pb, be, type, indextype_EQUALITY,
SLAPI_OP_GREATER_OR_EQUAL,
NULL, NULL, 0, &txn, err, allidslimit);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= presence_candidates %lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> extensible_candidates\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= extensible_candidates %lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> range_candidates attr=%s\n", type, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"<= 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"<= 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, LOG_DEBUG, "<= range_candidates %lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> list_candidates 0x%x\n", ftype, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= list_candidates %lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG,"NOT filter\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE,"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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"<= 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"<= list_candidates NULL\n", 0, 0, 0 );
idl_free( &idl );
idl = NULL;
@@ -879,7 +879,7 @@ list_candidates(
}
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= list_candidates %lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> sub_candidates\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> sub_candidates\n", 0, 0, 0 );
if (slapi_filter_get_subfilt( f, &type, &initial, &any, &final ) != 0) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, " slapi_filter_get_subfilt fails\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "substring_candidates - 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"<= 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, LOG_DEBUG, "<= sub_candidates %lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> keys2idl type %s indextype %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
" 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 5a60892..e6e0ab4 100644
--- a/ldap/servers/slapd/back-ldbm/findentry.c
+++ b/ldap/servers/slapd/back-ldbm/findentry.c
@@ -46,8 +46,8 @@ 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, LOG_ERR,
- "check_entry_for_referral: Out of memory\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"<= %s sent referral to (%s) for (%s)\n",
callingfn,
refscopy ? refscopy[0]->bv_val : "",
@@ -133,21 +133,21 @@ find_entry_internal_dn(
/* wait for entry modify lock */
if ( !lock || cache_lock_entry( &inst->inst_cache, e ) == 0 ) {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
- "<= find_entry_internal_dn found (%s)\n", slapi_sdn_get_dn(sdn), 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE,
+ "<= find_entry_internal_dn - found (%s)\n", slapi_sdn_get_dn(sdn), 0, 0 );
return( e );
}
/*
* 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, LOG_DEBUG,
- " find_entry_internal_dn retrying (%s)\n", slapi_sdn_get_dn(sdn), 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS,
+ " 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, LOG_ERR,"find_entry_internal_dn retry count exceeded (%s)\n", slapi_sdn_get_dn(sdn), 0, 0 );
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG, "<= find_entry_internal_dn not found (%s)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"<= find_entry_internal_uniqueid found; uniqueid = (%s)\n",
uniqueid, 0, 0 );
return( e );
@@ -286,15 +286,15 @@ 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_ARGS,
" 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, LOG_ERR,
- "find_entry_internal_uniqueid retry count exceeded; uniqueid = (%s)\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"<= 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, LOG_DEBUG, "=> find_entry_internal (uniqueid=%s) lock %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> find_entry_internal (uniqueid=%s) lock %d\n",
addr->uniqueid, lock, 0 );
return (find_entry_internal_uniqueid (pb, be, addr->uniqueid, lock, txn));
}
@@ -330,15 +330,15 @@ find_entry_internal(
{
struct backentry *entry = NULL;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> find_entry_internal (dn=%s) lock %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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);
} else {
- LDAPDebug0Args( LDAP_DEBUG_ANY, LOG_ERR, "find_entry_internal: Null target dn\n" );
+ LDAPDebug0Args(LDAP_DEBUG_ANY, "find_entry_internal: Null target dn\n" );
}
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_ERR, "<= find_entry_internal\n" );
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "<= 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 e0ea621..38d8101 100644
--- a/ldap/servers/slapd/back-ldbm/id2entry.c
+++ b/ldap/servers/slapd/back-ldbm/id2entry.c
@@ -36,11 +36,12 @@ id2entry_add_ext(backend *be, struct backentry *e, back_txn *txn,
struct backentry *encrypted_entry = NULL;
char *entrydn = NULL;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> id2entry_add( %lu, \"%s\" )\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_ERR, "Could not open/create id2entry\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "id2entry_add_ext - "
+ "Could not open/create id2entry\n",
0, 0, 0 );
rc = -1;
goto done;
@@ -56,8 +57,8 @@ 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, LOG_ERR, "attrcrypt_encrypt_entry failed in id2entry_add\n",
- 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "id2entry_add_ext - "
+ "attrcrypt_encrypt_entry failed\n", 0, 0, 0 );
rc = -1;
goto done;
}
@@ -82,7 +83,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, LOG_ERR, "id2entry_add_ext(): Entry disappeared "
+ LDAPDebug(LDAP_DEBUG_WARNING, "id2entry_add_ext - Entry disappeared "
"from cache (%s)\n", oldbdn->dn_sdn, 0, 0 );
}
}
@@ -90,7 +91,7 @@ id2entry_add_ext(backend *be, struct backentry *e, back_txn *txn,
}
CACHE_RETURN(&inst->inst_dncache, &bdn);
- LDAPDebug2Args( LDAP_DEBUG_TRACE, LOG_DEBUG,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE,
"=> id2entry_add (dncache) ( %lu, \"%s\" )\n",
(u_long)e->ep_id, slapi_entry_get_dn_const(entry_to_use) );
}
@@ -189,7 +190,7 @@ done:
backentry_free(&encrypted_entry);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= id2entry_add %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= id2entry_add %d\n", rc, 0, 0 );
return( rc );
}
@@ -211,12 +212,12 @@ id2entry_delete( backend *be, struct backentry *e, back_txn *txn )
int rc;
char temp_id[sizeof(ID)];
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> id2entry_delete( %lu, \"%s\" )\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_ERR, "Could not open/create id2entry\n",
- 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "id2entry_delete - "
+ "Could not open/create id2entry\n", 0, 0, 0 );
return( -1 );
}
@@ -234,7 +235,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, LOG_DEBUG, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_CACHE, ID2ENTRY,
"dncache_find_id returned: %s\n",
slapi_sdn_get_dn(bdn->dn_sdn));
CACHE_REMOVE(&inst->inst_dncache, bdn);
@@ -245,7 +246,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, LOG_DEBUG, "<= id2entry_delete %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= id2entry_delete %d\n", rc, 0, 0 );
return( rc );
}
@@ -261,11 +262,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, LOG_DEBUG, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_TRACE, ID2ENTRY,
"=> id2entry(%lu)\n", (u_long)id);
if ( (e = cache_find_id( &inst->inst_cache, id )) != NULL ) {
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_TRACE, ID2ENTRY,
"<= id2entry %p, dn \"%s\" (cache)\n",
e, backentry_get_ndn(e));
goto bail;
@@ -273,7 +274,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, LOG_ERR, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_ERR, ID2ENTRY,
"Could not open id2entry err %d\n", *err);
return( NULL );
}
@@ -295,7 +296,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, LOG_ERR, ID2ENTRY, "db error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, ID2ENTRY, "db error %d (%s)\n",
*err, dblayer_strerror( *err ));
}
}
@@ -310,8 +311,8 @@ 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, LOG_ERR, ID2ENTRY,
- "malloc failed in libdb; "
+ slapi_log_error(SLAPI_LOG_CRIT, ID2ENTRY,
+ "Malloc failed in libdb; "
"terminating the server; OS error %d (%s)\n",
*err, slapd_system_strerror( *err ));
exit (1);
@@ -321,7 +322,7 @@ id2entry( backend *be, ID id, back_txn *txn, int *err )
}
if ( data.dptr == NULL ) {
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_TRACE, ID2ENTRY,
"<= id2entry( %lu ) not found\n", (u_long)id);
goto bail;
}
@@ -344,21 +345,21 @@ 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, LOG_DEBUG, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_CACHE, 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, LOG_DEBUG, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, ID2ENTRY,
- "<= id2entry( %lu ) entryrdn_lookup_dn returned NULL. "
+ slapi_log_error(SLAPI_LOG_ERR, ID2ENTRY,
+ "id2entry( %lu ) entryrdn_lookup_dn returned NULL. "
"Index file may be deleted or corrupted.\n",
(u_long)id);
goto bail;
@@ -367,11 +368,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, LOG_DEBUG, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_CACHE, ID2ENTRY,
"%s is already in the dn cache\n", normdn);
} else {
CACHE_RETURN(&inst->inst_dncache, &bdn);
- slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_CACHE, ID2ENTRY,
"entryrdn_lookup_dn returned: %s, "
"and set to dn cache (id %d)\n", normdn, id);
}
@@ -395,7 +396,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, LOG_DEBUG, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_TRACE, ID2ENTRY,
"id2entry id: %d, dn \"%s\" -- adding it to cache\n",
id, backentry_get_ndn(e));
@@ -403,7 +404,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, LOG_ERR, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_ERR, ID2ENTRY,
"attrcrypt_decrypt_entry failed in id2entry\n");
}
@@ -444,13 +445,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, LOG_DEBUG, ID2ENTRY,
- "id2entry: failed to put entry (id %lu, dn %s) "
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_ERR, ID2ENTRY,
"str2entry returned NULL for id %lu, string=\"%s\"\n",
(u_long)id, (char*)data.data);
e = NULL;
@@ -461,7 +462,7 @@ bail:
dblayer_release_id2entry( be, db );
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ID2ENTRY,
+ slapi_log_error(SLAPI_LOG_TRACE, 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 9263b87..9c80e0a 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_ARGS,
"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, LOG_DEBUG, "=> idl_fetch_one\n", 0, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_TRACE, "=> idl_fetch_one\n", 0, 0, 0 ); */
data.flags = DB_DBT_MALLOC;
@@ -205,16 +205,16 @@ idl_fetch_one(
{
char *msg;
if ( EPERM == *err && *err != errno ) {
- 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 );
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR,
- "idl_fetch_one error %d %s\n",
- *err, (msg = dblayer_strerror( *err )) ? msg : "", 0 );
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG, "=> idl_fetch\n", 0, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_TRACE, "=> idl_fetch\n", 0, 0, 0 ); */
if ( (idl = idl_fetch_one( li, db, key, txn, err )) == NULL ) {
return( NULL );
}
@@ -324,19 +324,20 @@ idl_old_fetch(
/* Check for inconsistencies: */
if ( tmp[i]->b_ids[0] != thisID ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_fetch_one(%s)->b_ids[0] == %lu\n",
+ LDAPDebug(LDAP_DEBUG_WARNING, "idl_old_fetch - (%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, LOG_ERR, "indirect block (%s) contains %lu, %lu\n",
- key->dptr, (u_long)thisID, (u_long)nextID);
+ if ( nextID <= thisID ) {
+ LDAPDebug(LDAP_DEBUG_WARNING, "idl_old_fetch - "
+ "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, LOG_ERR, "idl_fetch_one(%s)->b_ids[last] == %lu"
+ if ( nextID <= tmp[i]->b_ids[(tmp[i]->b_nids)-1] ) {
+ LDAPDebug(LDAP_DEBUG_WARNING, "idl_old_fetch - (%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);
- }
+ }
}
}
dblayer_read_txn_commit(be, &s_txn);
@@ -363,7 +364,7 @@ idl_old_fetch(
}
slapi_ch_free((void**)&tmp );
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= idl_fetch %lu ids (%lu max)\n", (u_long)idl->b_nids,
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= idl_old_fetch %lu ids (%lu max)\n", (u_long)idl->b_nids,
(u_long)idl->b_nmax, 0 );
return( idl );
}
@@ -377,40 +378,40 @@ idl_store(
DB_TXN *txn
)
{
- int rc;
- DBT data = {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);
-
- rc = db->put( db, txn, key, &data, 0 );
- if ( 0 != rc ) {
- char *msg;
- if ( EPERM == rc && rc != errno ) {
- 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 );
- } else {
- if (LDBM_OS_ERR_IS_DISKFULL(rc)) {
- 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 : "" );
- if (rc == DB_RUNRECOVERY) {
- 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, LOG_DEBUG, "<= idl_store %d\n", rc, 0, 0 ); */
- return( rc );
+ int rc;
+ DBT data = {0};
+
+ /* LDAPDebug(LDAP_DEBUG_TRACE, "=> idl_store\n", 0, 0, 0 ); */
+
+ data.dptr = (char *) idl;
+ data.dsize = (2 + idl->b_nmax) * sizeof(ID);
+
+ rc = db->put( db, txn, key, &data, 0 );
+ if ( 0 != rc ) {
+ char *msg;
+ if ( EPERM == rc && rc != errno ) {
+ LDAPDebug(LDAP_DEBUG_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 );
+ } else {
+ if (LDBM_OS_ERR_IS_DISKFULL(rc)) {
+ operation_out_of_disk_space();
+ }
+ LDAPDebug( ((DB_LOCK_DEADLOCK == rc) ? LDAP_DEBUG_TRACE : LDAP_DEBUG_ERR),
+ "idl_store - (%s) Returns %d %s\n",
+ ((char*)key->dptr)[ key->dsize - 1 ] ? "" : (char*)key->dptr,
+ rc, (msg = dblayer_strerror( rc )) ? msg : "" );
+ if (rc == DB_RUNRECOVERY) {
+ LDAPDebug(LDAP_DEBUG_WARNING, "%s\n" "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 ); */
+ return( rc );
}
static void
@@ -472,14 +473,14 @@ idl_change_first(
int rc;
char *msg;
- /* LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> idl_change_first\n", 0, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_ERR, "idl_change_first del (%s) err %d %s\n",
- bkey->dptr, rc, (msg = dblayer_strerror( rc )) ? msg : "" );
+ LDAPDebug(LDAP_DEBUG_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,9 +508,9 @@ idl_change_first(
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, LOG_ERR, fmt, key->dptr, ARG1, ARG2); \
- slapi_ch_free((void**)&fmt); \
+ sprintf (fmt, "IDL_CHECK_FAILED - %s(%%s,%lu) %s: %s\n", func, (u_long)id, note, FORMAT); \
+ LDAPDebug(LDAP_DEBUG_ERR, fmt, key->dptr, ARG1, ARG2); \
+ slapi_ch_free((void**)&fmt); \
} \
} while(0)
@@ -591,7 +592,7 @@ idl_old_insert_key(
if ( rc != 0 && rc != DB_NOTFOUND ) {
if ( rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_insert_key 0 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_old_insert_key - 0 BAD %d %s\n",
rc, (msg = dblayer_strerror( rc )) ? msg : "", 0 );
}
return( rc );
@@ -601,7 +602,7 @@ idl_old_insert_key(
rc = idl_store( be, db, key, idl, txn );
if ( rc != 0 && rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_insert_key 1 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_old_insert_key - 1 BAD %d %s\n",
rc, (msg = dblayer_strerror( rc )) ? msg : "", 0 );
}
@@ -639,7 +640,7 @@ idl_old_insert_key(
idl_unlock_list(a->ai_idl,key);
if ( rc != 0 && rc != DB_LOCK_DEADLOCK)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_insert_key 2 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_old_insert_key - 2 BAD %d %s\n",
rc, (msg = dblayer_strerror( rc )) ? msg : "", 0 );
}
if (NULL != disposition) {
@@ -667,8 +668,8 @@ idl_old_insert_key(
idl_free( &tmp2 );
if ( rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_insert_key 3 BAD %d %s\n",
- rc, (msg = dblayer_strerror( rc )) ? msg : "", 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_old_insert_key - 3 BAD %d %s\n",
+ rc, (msg = dblayer_strerror( rc )) ? msg : "", 0 );
}
return( rc );
}
@@ -693,7 +694,7 @@ idl_old_insert_key(
idl_free( &tmp2 );
if ( rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_insert_key 4 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_old_insert_key - 4 BAD %d %s\n",
rc, (msg = dblayer_strerror( rc )) ? msg : "", 0 );
}
return( rc );
@@ -711,7 +712,7 @@ idl_old_insert_key(
idl_unlock_list(a->ai_idl,key);
if ( rc != 0 && rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_insert_key 5 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_old_insert_key - 5 BAD %d %s\n",
rc, (msg = dblayer_strerror( rc )) ? msg : "", 0 );
}
return( rc );
@@ -730,8 +731,8 @@ idl_old_insert_key(
; /* NULL */
if ( id == idl->b_ids[i] ) { /* already in a block */
#ifdef _DEBUG_LARGE_BLOCKS
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "id %lu for key (%s) is already in block %d\n",
+ LDAPDebug(LDAP_DEBUG_DEBUG,
+ "idl_old_insert_key - id %lu for key (%s) is already in block %d\n",
(u_long)id, key.dptr, i);
#endif
idl_unlock_list(a->ai_idl,key);
@@ -751,13 +752,13 @@ idl_old_insert_key(
if ( rc != 0 ) {
if ( rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_insert_key 5.5 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_old_insert_key - 6 BAD %d %s\n",
rc, (msg = dblayer_strerror( rc )) ? msg : "", 0 );
}
return( rc );
}
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "nonexistent continuation block (%s)\n", k2.dptr, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "idl_old_insert_key - nonexistent continuation block (%s)\n", k2.dptr, 0, 0 );
idl_unlock_list(a->ai_idl,key);
idl_free( &idl );
slapi_ch_free((void**)&kstr );
@@ -816,8 +817,8 @@ idl_old_insert_key(
== NULL ) {
if ( rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "idl_fetch_one (%s) returns NULL\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "idl_old_insert_key - (%s) returns NULL\n",
k3.dptr, 0, 0 );
}
if (0 != rc) {
@@ -869,12 +870,10 @@ idl_old_insert_key(
break;
case 2: /* already there - how? */
case 3: /* split block - how? */
- 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, LOG_ERR,
- "likely database corruption\n",
- 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "idl_old_insert_key - Not expecting (%d) from idl_insert_maxids "
+ "of %lu in (%s). Likely database corruption\n",
+ rc, (u_long)id, k2.dptr );
rc = 0;
break;
}
@@ -901,11 +900,10 @@ idl_old_insert_key(
* we started this insert. what can we do
* aside from log a warning?
*/
- 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, LOG_ERR,
- "likely database corruption\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "idl_old_insert_key - Not expecting return %d from idl_insert_maxids "
+ "of id %lu in block with key (%s). Likely database corruption\n",
+ rc, (u_long)tmp->b_ids[tmp->b_nids-1], k3.dptr );
/* FALL */
case 3: /* block is full */
/*
@@ -1135,7 +1133,8 @@ int idl_old_store_block(
slapi_ch_free(&(cont_key.data));
if ( ret != 0 && ret != DB_LOCK_DEADLOCK )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_store_block(%s) 1 BAD %d %s\n",key->data, ret, dblayer_strerror( ret ));
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_old_store_block - (%s) BAD %d %s\n",
+ key->data, ret, dblayer_strerror( ret ));
goto done;
}
/* Put the lead ID number in the header block */
@@ -1359,7 +1358,7 @@ idl_old_delete_key(
IDList *idl, *didl;
DBT contkey = {0};
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> idl_delete_key(%s,%lu)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> idl_old_delete_key(%s,%lu)\n",
key->dptr, (u_long)id, 0 );
idl_Wlock_list(a->ai_idl,key);
@@ -1368,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, LOG_ERR, "idl_delete_key(%s) 0 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_old_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, LOG_DEBUG, "<= idl_delete_key(%s,%lu) %d !idl_fetch_one\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= idl_old_delete_key(%s,%lu) %d !idl_fetch_one\n",
key->dptr, (u_long)id, rc );
return rc;
}
@@ -1385,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, LOG_ERR, "idl_delete_key(%s) 1 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_old_delete_key - (%s) 1 BAD %d %s\n",
key->dptr, rc, (msg = dblayer_strerror( rc )) ? msg : "" );
}
break;
@@ -1394,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, LOG_ERR, "idl_delete_key(%s) 2 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_old_delete_key - (%s) 2 BAD %d %s\n",
key->dptr, rc, (msg = dblayer_strerror( rc )) ? msg : "" );
if (rc == DB_RUNRECOVERY) {
ldbm_nasty("",74,rc);
@@ -1409,14 +1408,14 @@ idl_old_delete_key(
break;
default:
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_delete_key(%s) 3 BAD idl_delete\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_old_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, LOG_DEBUG, "<= idl_delete_key(%s,%lu) %d (not indirect)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= idl_old_delete_key(%s,%lu) %d (not indirect)\n",
key->dptr, (u_long)id, rc );
return( rc );
}
@@ -1437,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, LOG_DEBUG, "<= idl_delete_key(%s,%lu) -666 (id not found)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= idl_old_delete_key(%s,%lu) -666 (id not found)\n",
key->dptr, (u_long)id, 0 );
return( -666 );
}
@@ -1452,10 +1451,10 @@ idl_old_delete_key(
idl_unlock_list(a->ai_idl,key);
if ( rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_delete_key(%s) 5 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_old_delete_key - (%s) 5 BAD %d %s\n",
contkey.dptr, rc, (msg = dblayer_strerror( rc )) ? msg : "" );
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= idl_delete_key(%s,%lu) %d idl_fetch_one(contkey)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= idl_old_delete_key(%s,%lu) %d idl_fetch_one(contkey)\n",
contkey.dptr, (u_long)id, rc );
slapi_ch_free( (void **)&(contkey.dptr) );
return( rc );
@@ -1467,12 +1466,12 @@ idl_old_delete_key(
if ( (rc = idl_store( be, db, &contkey, didl, txn )) != 0 ) {
if ( rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_delete_key(%s) BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_old_delete_key - (%s) BAD %d %s\n",
contkey.dptr, rc, (msg = dblayer_strerror( rc )) ? msg : "" );
}
}
if (0 != rc) {
- idl_check_indirect( idl, i, didl, NULL, "idl_delete_key", "0", key, id );
+ idl_check_indirect( idl, i, didl, NULL, "idl_old_delete_key", "0", key, id );
}
break;
@@ -1480,11 +1479,11 @@ 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, LOG_ERR, "idl_delete_key(%s) 7 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_old_delete_key - (%s) 7 BAD %d %s\n",
contkey.dptr, rc, (msg = dblayer_strerror( rc )) ? msg : "" );
}
if (0 != rc) {
- idl_check_indirect( idl, i, didl, NULL, "idl_delete_key", "1", key, id );
+ idl_check_indirect( idl, i, didl, NULL, "idl_old_delete_key", "1", key, id );
}
break;
@@ -1496,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, LOG_ERR, "idl_delete_key: idl_store(%s) BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_old_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, LOG_ERR, "idl_delete_key: db->del(%s) BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_old_delete_key - db->del(%s) 0 BAD %d %s\n",
key->dptr, rc, (msg = dblayer_strerror( rc )) ? msg : "" );
if (rc == DB_RUNRECOVERY) {
ldbm_nasty("",75,rc);
@@ -1512,26 +1511,25 @@ idl_old_delete_key(
}
}
if ( rc == 0 ) { /* Delete the indirect block: */
- rc = db->del( db, txn, &contkey, 0 );
- if ( rc != 0 && rc != DB_LOCK_DEADLOCK )
- {
- 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);
+ rc = db->del( db, txn, &contkey, 0 );
+ if ( rc != 0 && rc != DB_LOCK_DEADLOCK )
+ {
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_old_delete_key - db->del(%s) 1 BAD %d %s\n",
+ contkey.dptr, rc, (msg = dblayer_strerror( rc )) ? msg : "" );
+ if (rc == DB_RUNRECOVERY) {
+ ldbm_nasty("",76,rc);
+ }
}
-
- }
}
break;
case 3: /* id not found - previously deleted */
rc = 0;
- idl_check_indirect( idl, i, didl, NULL, "idl_delete_key", "3", key, id );
+ idl_check_indirect( idl, i, didl, NULL, "idl_old_delete_key", "3", key, id );
break;
case 4: /* all ids block - should not happen */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_delete_key: cont block (%s) is allids\n",
- contkey.dptr, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_old_delete_key - cont block (%s) is allids\n",
+ contkey.dptr, 0, 0 );
rc = 0;
break;
}
@@ -1541,10 +1539,10 @@ idl_old_delete_key(
idl_unlock_list(a->ai_idl,key);
if ( rc != 0 && rc != DB_LOCK_DEADLOCK )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "idl_delete_key(%s) 9 BAD %d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_old_delete_key - (%s) 9 BAD %d %s\n",
key->dptr, rc, (msg = dblayer_strerror( rc )) ? msg : "" );
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= idl_delete_key(%s,%lu) %d (indirect)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= idl_old_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 e48953d..1d37831 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, LOG_ERR, "database index is corrupt; "
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_new_fetch - 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);
@@ -231,21 +231,21 @@ idl_new_fetch(
if (ptr == NULL) break;
if (*(int32_t *)ptr < -1) {
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "DB_MULTIPLE buffer is corrupt; "
- "next offset [%d] is less than zero\n",
- *(int32_t *)ptr);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "idl_new_fetch - "
+ "DB_MULTIPLE buffer is corrupt; next offset [%d] is less than zero\n",
+ *(int32_t *)ptr);
/* retry the read */
break;
}
if (dataret.size != sizeof(ID)) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "database index is corrupt; "
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_new_fetch - Database index is corrupt; "
"key %s has a data item with the wrong size (%d)\n",
key.data, dataret.size, 0);
goto error;
}
memcpy(&id, dataret.data, sizeof(ID));
if (id == lastid) { /* dup */
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "Detected duplicate id "
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "idl_new_fetch - Detected duplicate id "
"%d due to DB_MULTIPLE error - skipping\n",
id);
continue; /* get next one */
@@ -255,7 +255,8 @@ 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, LOG_ERR, "unable to extend id list (err=%d)\n", idl_rc, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_new_fetch - Unable to extend id list (err=%d)\n",
+ idl_rc, 0, 0);
idl_free(&idl);
goto error;
}
@@ -263,7 +264,7 @@ idl_new_fetch(
count++;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "bulk fetch buffer nids=%d\n", count, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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 +272,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, LOG_DEBUG, "search for key for attribute index %s "
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, "idl_new_fetch - search for key for attribute index %s "
"exceeded allidslimit %d - count is %d\n",
a->ai_type, allidslimit, count);
break;
@@ -292,8 +293,8 @@ 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, LOG_ERR,
- "unable to extend id list (err=%d)\n", idl_rc);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "idl_new_fetch - Unable to extend id list (err=%d)\n", idl_rc);
idl_free(&idl);
goto error;
}
@@ -321,10 +322,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, LOG_DEBUG, "idl_new_fetch %s returns allids\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "idl_new_fetch - %s returns allids\n",
key.data, 0, 0);
} else {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "idl_new_fetch %s returns nids=%lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "idl_new_fetch - %s returns nids=%lu\n",
key.data, (u_long)IDL_NIDS(idl), 0);
}
@@ -465,10 +466,9 @@ idl_new_range_fetch(
if (DB_NOTFOUND != ret) {
#ifdef DB_USE_BULK_FETCH
if (ret == DB_BUFFER_SMALL) {
- 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);
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_new_range_fetch - 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);
}
#endif
ldbm_nasty(filename,2,ret);
@@ -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, LOG_DEBUG,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE,
"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, LOG_DEBUG,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE,
"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, LOG_DEBUG,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE,
"idl_new_range_fetch - timelimit exceeded\n");
*flag_err = LDAP_TIMELIMIT_EXCEEDED;
goto error;
@@ -525,23 +525,22 @@ idl_new_range_fetch(
if (ptr == NULL) break;
if (*(int32_t *)ptr < -1) {
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "DB_MULTIPLE buffer is corrupt; "
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "DB_MULTIPLE buffer is corrupt; "
"next offset [%d] is less than zero\n",
*(int32_t *)ptr);
/* retry the read */
break;
}
if (dataret.size != sizeof(ID)) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "database index is corrupt; "
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_new_range_fetch - Database index is corrupt; "
"key %s has a data item with the wrong size (%d)\n",
cur_key.data, dataret.size, 0);
goto error;
}
memcpy(&id, dataret.data, sizeof(ID));
if (id == lastid) { /* dup */
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "Detedted duplicate id "
- "%d due to DB_MULTIPLE error - skipping\n",
- id);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "idl_new_range_fetch - "
+ "Detected duplicate id %d due to DB_MULTIPLE error - skipping\n", id);
continue; /* get next one */
}
/* note the last id read to check for dups */
@@ -571,8 +570,8 @@ idl_new_range_fetch(
idl_rc = idl_append_extend(&idl, id);
}
if (idl_rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "unable to extend id list (err=%d)\n", idl_rc);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "idl_new_range_fetch - Unable to extend id list (err=%d)\n", idl_rc);
idl_free(&idl);
goto error;
}
@@ -580,7 +579,7 @@ idl_new_range_fetch(
count++;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "bulk fetch buffer nids=%d\n", count, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "idl_new_range_fetch - 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) &&
@@ -636,13 +635,13 @@ idl_new_range_fetch(
(idl->b_nids > (ID)lookthrough_limit)) {
idl_free(&idl);
idl = idl_allids( be );
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE,
"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, LOG_DEBUG,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE,
"idl_new_range_fetch - sizelimit exceeded\n");
*flag_err = LDAP_SIZELIMIT_EXCEEDED;
goto error;
@@ -652,7 +651,7 @@ idl_new_range_fetch(
if (stoptime > 0) { /* timelimit is set */
curtime = current_time();
if (curtime >= stoptime) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE,
"idl_new_range_fetch - timelimit exceeded\n");
*flag_err = LDAP_TIMELIMIT_EXCEEDED;
goto error;
@@ -683,8 +682,8 @@ 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, LOG_ERR,
- "unable to extend id list (err=%d)\n", idl_rc);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "idl_new_range_fetch - Unable to extend id list (err=%d)\n", idl_rc);
idl_free(&idl);
goto error;
}
@@ -714,10 +713,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, LOG_DEBUG, "idl_new_fetch %s returns allids\n",
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "idl_new_range_fetch - %s returns allids\n",
cur_key.data);
} else {
- LDAPDebug2Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "idl_new_fetch %s returns nids=%lu\n",
+ LDAPDebug2Args(LDAP_DEBUG_TRACE, "idl_new_range_fetch - %s returns nids=%lu\n",
cur_key.data, (u_long)IDL_NIDS(idl));
}
@@ -754,7 +753,8 @@ 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, LOG_ERR, "unable to extend id list (err=%d)\n", idl_rc);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "idl_new_range_fetch - "
+ "Unable to extend id list (err=%d)\n", idl_rc);
idl_free(&idl);
return 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, LOG_ERR, "could not obtain count for key %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_new_insert_key - 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, LOG_DEBUG, "allidslimit exceeded for key %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "idl_new_insert_key - allidslimit exceeded for key %s\n",
key->data, 0, 0);
cursor->c_close(cursor);
cursor = NULL;
@@ -872,7 +872,6 @@ error:
}
#endif
-
return ret;
}
@@ -987,7 +986,7 @@ static int idl_new_store_allids(backend *be, DB *db, DBT *key, DB_TXN *txn)
goto error;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "key %s has been set to allids\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "idl_new_store_allids - key %s has been set to allids\n",
key->data, 0, 0);
error:
@@ -1082,13 +1081,14 @@ 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, LOG_ERR, "could not obtain count for key %s\n",
- key->data, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "idl_new_store_block - "
+ "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, LOG_DEBUG, "allidslimit exceeded for key %s\n",
- key->data, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "idl_new_store_block - "
+ "allidslimit exceeded for key %s\n",
+ key->data, 0, 0);
cursor->c_close(cursor);
cursor = NULL;
ret = idl_new_store_allids(be, db, key, txn);
diff --git a/ldap/servers/slapd/back-ldbm/import-merge.c b/ldap/servers/slapd/back-ldbm/import-merge.c
index 959abde..b657507 100644
--- a/ldap/servers/slapd/back-ldbm/import-merge.c
+++ b/ldap/servers/slapd/back-ldbm/import-merge.c
@@ -394,18 +394,20 @@ static int import_merge_one_file(ImportWorkerInfo *worker, int passes,
ret = import_make_merge_filenames(inst->inst_dir_name,
worker->index_info->name, pass_number, &oldname, &newname);
if (0 != ret) {
- import_log_notice(worker->job, "Failed making filename in merge");
+ import_log_notice(worker->job, SLAPI_LOG_ERR, "import_merge_one_file",
+ "Failed making filename in merge");
goto error;
}
ret = PR_Rename(newname,oldname);
if (0 != ret) {
PRErrorCode prerr = PR_GetError();
- import_log_notice(worker->job, "Failed to rename file \"%s\" to \"%s\" "
- "in merge, " SLAPI_COMPONENT_NAME_NSPR " error %d (%s)",
- oldname, newname, prerr, slapd_pr_strerror(prerr));
+ import_log_notice(worker->job, SLAPI_LOG_ERR, "import_merge_one_file",
+ "Failed to rename file \"%s\" to \"%s\" "
+ "in merge, " SLAPI_COMPONENT_NAME_NSPR " error %d (%s)",
+ oldname, newname, prerr, slapd_pr_strerror(prerr));
slapi_ch_free( (void**)&newname);
slapi_ch_free( (void**)&oldname);
- goto error;
+ goto error;
}
slapi_ch_free( (void**)&newname);
slapi_ch_free( (void**)&oldname);
@@ -424,20 +426,20 @@ static int import_merge_one_file(ImportWorkerInfo *worker, int passes,
ret = dblayer_close(inst->inst_li, DBLAYER_IMPORT_MODE);
if (0 != ret) {
if (ENOSPC == ret) {
- import_log_notice(worker->job, "FAILED: NO DISK SPACE LEFT");
+ import_log_notice(worker->job, SLAPI_LOG_ERR, "import_merge_one_file", "FAILED: NO DISK SPACE LEFT");
} else {
- import_log_notice(worker->job, "MERGE FAIL 8 %d", ret);
+ import_log_notice(worker->job, SLAPI_LOG_ERR, "import_merge_one_file", "MERGE FAIL 8 %d", ret);
}
goto error;
}
ret = dblayer_start(inst->inst_li, DBLAYER_IMPORT_MODE);
if (0 != ret) {
- import_log_notice(worker->job, "MERGE FAIL 9");
+ import_log_notice(worker->job, SLAPI_LOG_ERR, "import_merge_one_file", "MERGE FAIL 9");
goto error;
}
ret = dblayer_instance_start(be, DBLAYER_IMPORT_MODE);
if (0 != ret) {
- import_log_notice(worker->job, "MERGE FAIL 9A");
+ import_log_notice(worker->job, SLAPI_LOG_ERR, "import_merge_one_file", "MERGE FAIL 9A");
goto error;
}
#else
@@ -449,27 +451,27 @@ static int import_merge_one_file(ImportWorkerInfo *worker, int passes,
*/
ret = dblayer_instance_close(be);
if (0 != ret) {
- import_log_notice(worker->job, "MERGE FAIL 8i %d\n", ret);
- goto error;
+ import_log_notice(worker->job, SLAPI_LOG_ERR, "import_merge_one_file", "MERGE FAIL 8i %d\n", ret);
+ goto error;
}
ret = dblayer_instance_start(be, DBLAYER_IMPORT_MODE);
if (0 != ret) {
- import_log_notice(worker->job, "MERGE FAIL 8j %d\n", ret);
- goto error;
+ import_log_notice(worker->job, SLAPI_LOG_ERR, "import_merge_one_file", "MERGE FAIL 8j %d\n", ret);
+ goto error;
}
#endif
ret = import_open_merge_input_files(be, worker->index_info,
passes, &input_files, &number_found, &pass_number);
if (0 != ret) {
- import_log_notice(worker->job, "MERGE FAIL 10");
+ import_log_notice(worker->job, SLAPI_LOG_ERR, "import_merge_one_file", "MERGE FAIL 10");
goto error;
}
ret = dblayer_open_file(be, worker->index_info->name, 1,
worker->index_info->ai, &output_file);
if (0 != ret) {
- import_log_notice(worker->job, "Failed to open output file for "
+ import_log_notice(worker->job, SLAPI_LOG_ERR, "import_merge_one_file", "Failed to open output file for "
"index %s in merge", worker->index_info->name);
goto error;
}
@@ -481,7 +483,7 @@ static int import_merge_one_file(ImportWorkerInfo *worker, int passes,
ret = import_merge_open_input_cursors(input_files, passes,
&input_cursors);
if (0 != ret) {
- import_log_notice(worker->job, "MERGE FAIL 2 %s %d",
+ import_log_notice(worker->job, SLAPI_LOG_ERR, "import_merge_one_file", "MERGE FAIL 2 %s %d",
worker->index_info->name, ret);
goto error;
}
@@ -489,78 +491,78 @@ static int import_merge_one_file(ImportWorkerInfo *worker, int passes,
/* Now read from the first location in each file and insert into the
* queue */
for (i = 0; i < passes; i++) if (input_files[i]) {
- import_merge_thang prime_thang = {0};
+ import_merge_thang prime_thang = {0};
- /* Read an IDL from the file */
- ret = import_merge_get_next_thang(be, input_cursors[i],
+ /* Read an IDL from the file */
+ ret = import_merge_get_next_thang(be, input_cursors[i],
input_files[i], &prime_thang, &key,
vlv_index ? IMPORT_MERGE_THANG_VLV : IMPORT_MERGE_THANG_IDL);
- if (0 != ret) {
- import_log_notice(worker->job, "MERGE FAIL 1 %s %d",
+ if (0 != ret) {
+ import_log_notice(worker->job, SLAPI_LOG_ERR, "import_merge_one_file", "MERGE FAIL 1 %s %d",
worker->index_info->name, ret);
- goto error;
- }
- /* Put it on the queue */
- ret = import_merge_insert_input_queue(be, &merge_queue, i,& key,
+ goto error;
+ }
+ /* Put it on the queue */
+ ret = import_merge_insert_input_queue(be, &merge_queue, i,& key,
&prime_thang, passes);
- if (0 != ret) {
- import_log_notice(worker->job, "MERGE FAIL 0 %s",
+ if (0 != ret) {
+ import_log_notice(worker->job, SLAPI_LOG_ERR, "import_merge_one_file", "MERGE FAIL 0 %s",
worker->index_info->name);
- goto error;
- }
+ goto error;
+ }
}
/* We now have a pre-filled queue, so we may now proceed to remove the
head entry and write it to the output file, and repeat this process
until we've finished reading all the input data */
while (not_finished && (0 == ret) ) {
- ret = import_merge_remove_input_queue(be, &merge_queue, &thang,
+ ret = import_merge_remove_input_queue(be, &merge_queue, &thang,
&key, input_cursors, input_files, passes);
- if (0 != ret) {
- /* Have we finished cleanly ? */
- if (EOF == ret) {
- not_finished = 0;
- } else {
- import_log_notice(worker->job, "MERGE FAIL 3 %s, %d",
- worker->index_info->name, ret);
- }
- } else {
- /* Write it out */
- (*key_count)++;
- if (vlv_index) {
- /* Write the vlv index */
- ret = output_file->put(output_file, NULL, &key,
- &(thang.payload.vlv_data),0);
- slapi_ch_free(&(thang.payload.vlv_data.data));
- thang.payload.vlv_data.data = NULL;
- } else {
- /* Write the IDL index */
- ret = idl_store_block(be, output_file, &key,
- thang.payload.idl, NULL, worker->index_info->ai);
- /* Free the key we got back from the queue */
- idl_free(&(thang.payload.idl));
- thang.payload.idl = NULL;
- }
- slapi_ch_free(&(key.data));
- key.data = NULL;
if (0 != ret) {
- /* Failed to write--- most obvious cause being out of
- disk space, let's make sure that we at least print a
- sensible error message right here. The caller should
- really handle this properly, but we're always bad at
- this. */
- if (ret == DB_RUNRECOVERY || ret == ENOSPC) {
- import_log_notice(worker->job, "OUT OF SPACE ON DISK, "
- "failed writing index file %s",
- worker->index_info->name);
- } else {
- import_log_notice(worker->job, "Failed to write "
- "index file %s, errno=%d (%s)\n",
- worker->index_info->name, errno,
- dblayer_strerror(errno));
- }
+ /* Have we finished cleanly ? */
+ if (EOF == ret) {
+ not_finished = 0;
+ } else {
+ import_log_notice(worker->job, SLAPI_LOG_ERR, "import_merge_one_file", "MERGE FAIL 3 %s, %d",
+ worker->index_info->name, ret);
+ }
+ } else {
+ /* Write it out */
+ (*key_count)++;
+ if (vlv_index) {
+ /* Write the vlv index */
+ ret = output_file->put(output_file, NULL, &key,
+ &(thang.payload.vlv_data),0);
+ slapi_ch_free(&(thang.payload.vlv_data.data));
+ thang.payload.vlv_data.data = NULL;
+ } else {
+ /* Write the IDL index */
+ ret = idl_store_block(be, output_file, &key,
+ thang.payload.idl, NULL, worker->index_info->ai);
+ /* Free the key we got back from the queue */
+ idl_free(&(thang.payload.idl));
+ thang.payload.idl = NULL;
+ }
+ slapi_ch_free(&(key.data));
+ key.data = NULL;
+ if (0 != ret) {
+ /* Failed to write--- most obvious cause being out of
+ disk space, let's make sure that we at least print a
+ sensible error message right here. The caller should
+ really handle this properly, but we're always bad at
+ this. */
+ if (ret == DB_RUNRECOVERY || ret == ENOSPC) {
+ import_log_notice(worker->job, SLAPI_LOG_ERR, "import_merge_one_file",
+ "OUT OF SPACE ON DISK, failed writing index file %s",
+ worker->index_info->name);
+ } else {
+ import_log_notice(worker->job, SLAPI_LOG_ERR, "import_merge_one_file",
+ "Failed to write index file %s, errno=%d (%s)\n",
+ worker->index_info->name, errno,
+ dblayer_strerror(errno));
+ }
+ }
}
- }
}
preclose_ret = ret;
/* Now close the files */
@@ -568,51 +570,52 @@ static int import_merge_one_file(ImportWorkerInfo *worker, int passes,
/* Close the cursors */
/* Close and delete the files */
for (i = 0; i < passes; i++) {
- DBC *cursor = input_cursors[i];
- DB *db = input_files[i];
- if (NULL != db) {
- PR_ASSERT(NULL != cursor);
- ret = cursor->c_close(cursor);
- if (0 != ret) {
- import_log_notice(worker->job, "MERGE FAIL 4");
- }
- ret = dblayer_close_file(&db);
- if (0 != ret) {
- import_log_notice(worker->job, "MERGE FAIL 5");
- }
- /* Now make the filename and delete the file */
- {
- char *newname = NULL;
- char *oldname = NULL;
- ret = import_make_merge_filenames(inst->inst_dir_name,
- worker->index_info->name, i+1, &oldname, &newname);
- if (0 != ret) {
- import_log_notice(worker->job, "MERGE FAIL 6");
- } else {
- ret = PR_Delete(newname);
+ DBC *cursor = input_cursors[i];
+ DB *db = input_files[i];
+ if (NULL != db) {
+ PR_ASSERT(NULL != cursor);
+ ret = cursor->c_close(cursor);
if (0 != ret) {
- import_log_notice(worker->job, "MERGE FAIL 7");
+ import_log_notice(worker->job, SLAPI_LOG_ERR, "import_merge_one_file", "MERGE FAIL 4");
+ }
+ ret = dblayer_close_file(&db);
+ if (0 != ret) {
+ import_log_notice(worker->job, SLAPI_LOG_ERR, "import_merge_one_file", "MERGE FAIL 5");
}
- slapi_ch_free( (void**)&newname);
- slapi_ch_free( (void**)&oldname);
- }
- }
- }
+ /* Now make the filename and delete the file */
+ {
+ char *newname = NULL;
+ char *oldname = NULL;
+ ret = import_make_merge_filenames(inst->inst_dir_name,
+ worker->index_info->name, i+1, &oldname, &newname);
+ if (0 != ret) {
+ import_log_notice(worker->job, SLAPI_LOG_ERR, "import_merge_one_file", "MERGE FAIL 6");
+ } else {
+ ret = PR_Delete(newname);
+ if (0 != ret) {
+ import_log_notice(worker->job, SLAPI_LOG_ERR, "import_merge_one_file", "MERGE FAIL 7");
+ }
+ slapi_ch_free( (void**)&newname);
+ slapi_ch_free( (void**)&oldname);
+ }
+ }
+ }
}
if (preclose_ret != 0) ret = preclose_ret;
- }
- if (EOF == ret) {
+ }
+ if (EOF == ret) {
ret = 0;
- }
+ }
error:
slapi_ch_free((void**)&input_cursors);
slapi_ch_free((void**)&input_files);
if (ret) {
- import_log_notice(worker->job, "%s: Import merge failed. "
- "If this is an online-import, shutdown the server "
- "and try the offline command line import (ldif2db)",
- inst->inst_name);
+ import_log_notice(worker->job, SLAPI_LOG_ERR, "import_merge_one_file",
+ "%s: Import merge failed. "
+ "If this is an online-import, shutdown the server "
+ "and try the offline command line import (ldif2db)",
+ inst->inst_name);
}
return ret;
}
@@ -636,52 +639,53 @@ int import_mega_merge(ImportJob *job)
int passes = job->current_pass;
if (1 == job->number_indexers) {
- import_log_notice(job, "Beginning %d-way merge of one file...", passes);
+ import_log_notice(job, SLAPI_LOG_INFO, "import_mega_merge",
+ "Beginning %d-way merge of one file...", passes);
} else {
- import_log_notice(job, "Beginning %d-way merge of up to %lu files...",
- passes, (long unsigned int)job->number_indexers);
+ import_log_notice(job, SLAPI_LOG_INFO, "import_mega_merge",
+ "Beginning %d-way merge of up to %lu files...",
+ passes, (long unsigned int)job->number_indexers);
}
time(&beginning);
/* Iterate over the files */
- for (current_worker = job->worker_list;
+ for (current_worker = job->worker_list;
(ret == 0) && (current_worker != NULL);
- current_worker = current_worker->next) {
- /* We need to ignore the primary index */
- if ((current_worker->work_type != FOREMAN) &&
- (current_worker->work_type != PRODUCER)) {
- time_t file_beginning = 0;
- time_t file_end = 0;
- int key_count = 0;
-
- time(&file_beginning);
- ret = import_merge_one_file(current_worker,passes,&key_count);
- time(&file_end);
- if (key_count == 0) {
- import_log_notice(job, "No files to merge for \"%s\".",
- current_worker->index_info->name);
- } else {
- if (-1 == key_count) {
- import_log_notice(job, "Merged \"%s\": Simple merge - "
- "file renamed.",
- current_worker->index_info->name);
- } else {
- import_log_notice(job, "Merged \"%s\": %d keys merged "
- "in %ld seconds.",
- current_worker->index_info->name,
- key_count, file_end-file_beginning);
+ current_worker = current_worker->next)
+ {
+ /* We need to ignore the primary index */
+ if ((current_worker->work_type != FOREMAN) &&
+ (current_worker->work_type != PRODUCER)) {
+ time_t file_beginning = 0;
+ time_t file_end = 0;
+ int key_count = 0;
+
+ time(&file_beginning);
+ ret = import_merge_one_file(current_worker,passes,&key_count);
+ time(&file_end);
+ if (key_count == 0) {
+ import_log_notice(job, SLAPI_LOG_INFO, "import_mega_merge", "No files to merge for \"%s\".",
+ current_worker->index_info->name);
+ } else {
+ if (-1 == key_count) {
+ import_log_notice(job, SLAPI_LOG_INFO, "import_mega_merge", "Merged \"%s\": Simple merge - "
+ "file renamed.", current_worker->index_info->name);
+ } else {
+ import_log_notice(job, SLAPI_LOG_INFO, "import_mega_merge", "Merged \"%s\": %d keys merged "
+ "in %ld seconds.", current_worker->index_info->name,
+ key_count, file_end-file_beginning);
+ }
+ }
}
- }
}
- }
- time(&end);
- if (0 == ret) {
- int seconds_to_merge = end - beginning;
+ time(&end);
+ if (0 == ret) {
+ int seconds_to_merge = end - beginning;
- import_log_notice(job, "Merging completed in %d seconds.",
+ import_log_notice(job, SLAPI_LOG_INFO, "import_mega_merge", "Merging completed in %d seconds.",
seconds_to_merge);
- }
+ }
return ret;
}
diff --git a/ldap/servers/slapd/back-ldbm/import-threads.c b/ldap/servers/slapd/back-ldbm/import-threads.c
index d47c9ba..f08f0b3 100644
--- a/ldap/servers/slapd/back-ldbm/import-threads.c
+++ b/ldap/servers/slapd/back-ldbm/import-threads.c
@@ -68,10 +68,9 @@ 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, LOG_ERR,
- "import_generate_uniqueid: failed to generate "
- "uniqueid for %s; error=%d.\n",
- slapi_entry_get_dn_const(e), rc, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "import_generate_uniqueid - "
+ "Failed to generate uniqueid for %s; error=%d.\n",
+ slapi_entry_get_dn_const(e), rc, 0 );
}
}
@@ -398,16 +397,16 @@ import_producer(void *param)
if (detected_eof) {
/* check if the file can still be read, whine if so... */
if (read(fd, (void *)&idx, 1) > 0) {
- import_log_notice(job, "WARNING: Unexpected end of file found "
+ import_log_notice(job, SLAPI_LOG_WARNING, "import_producer", "Unexpected end of file found "
"at line %d of file \"%s\"", curr_lineno,
curr_filename);
}
if (fd == STDIN_FILENO) {
- import_log_notice(job, "Finished scanning file stdin (%lu "
+ import_log_notice(job, SLAPI_LOG_INFO, "import_producer", "Finished scanning file stdin (%lu "
"entries)", (u_long)(id-id_filestart));
} else {
- import_log_notice(job, "Finished scanning file \"%s\" (%lu "
+ import_log_notice(job, SLAPI_LOG_INFO, "import_producer", "Finished scanning file \"%s\" (%lu "
"entries)", curr_filename, (u_long)(id-id_filestart));
}
close(fd);
@@ -439,14 +438,16 @@ import_producer(void *param)
fd = dblayer_open_huge_file(curr_filename, o_flag, 0);
}
if (fd < 0) {
- import_log_notice(job, "Could not open LDIF file \"%s\", errno %d (%s)",
- curr_filename, errno, slapd_system_strerror(errno));
+ import_log_notice(job, SLAPI_LOG_ERR, "import_producer",
+ "Could not open LDIF file \"%s\", errno %d (%s)",
+ curr_filename, errno, slapd_system_strerror(errno));
goto error;
}
if (fd == STDIN_FILENO) {
- import_log_notice(job, "Processing file stdin");
+ import_log_notice(job, SLAPI_LOG_INFO, "import_producer", "Processing file stdin");
} else {
- import_log_notice(job, "Processing file \"%s\"", curr_filename);
+ import_log_notice(job, SLAPI_LOG_INFO, "import_producer",
+ "Processing file \"%s\"", curr_filename);
}
}
if (job->flags & FLAG_ABORT) {
@@ -498,8 +499,8 @@ import_producer(void *param)
the entry */
strncmp(estr, "dn:: ", 5) &&
NULL == strstr(estr, "\ndn:: ")) { /* ditto */
- import_log_notice(job, "WARNING: skipping bad LDIF entry (not "
- "starting with \"dn: \") ending line %d of file \"%s\"",
+ import_log_notice(job, SLAPI_LOG_WARNING, "import_producer",
+ "Skipping bad LDIF entry (not starting with \"dn: \") ending line %d of file \"%s\"",
curr_lineno, curr_filename);
FREE(estr);
continue;
@@ -507,8 +508,8 @@ import_producer(void *param)
/* get_value_from_string decodes base64 if it is encoded. */
rc = get_value_from_string((const char *)estr, "dn", &dn);
if (rc) {
- import_log_notice(job, "WARNING: skipping bad LDIF entry (dn "
- "has no value\n");
+ import_log_notice(job, SLAPI_LOG_WARNING, "import_producer",
+ "Skipping bad LDIF entry (dn has no value\n");
FREE(estr);
continue;
}
@@ -523,9 +524,9 @@ import_producer(void *param)
FREE(estr);
if (! e) {
if (!(str2entry_flags & SLAPI_STR2ENTRY_INCLUDE_VERSION_STR)) {
- import_log_notice(job, "WARNING: skipping bad LDIF entry "
- "ending line %d of file \"%s\"", curr_lineno,
- curr_filename);
+ import_log_notice(job, SLAPI_LOG_WARNING, "import_producer",
+ "Skipping bad LDIF entry ending line %d of file \"%s\"",
+ curr_lineno, curr_filename);
}
continue;
}
@@ -542,10 +543,9 @@ import_producer(void *param)
}
if (slapi_entry_schema_check(NULL, e) != 0) {
- import_log_notice(job, "WARNING: skipping entry \"%s\" which "
- "violates schema, ending line %d of file "
- "\"%s\"", slapi_entry_get_dn(e),
- curr_lineno, curr_filename);
+ import_log_notice(job, SLAPI_LOG_WARNING, "import_producer",
+ "Skipping entry \"%s\" which violates schema, ending line %d of file \"%s\"",
+ slapi_entry_get_dn(e), curr_lineno, curr_filename);
slapi_entry_free(e);
job->skipped++;
@@ -595,10 +595,9 @@ import_producer(void *param)
/* Check attribute syntax */
if (syntax_err != 0)
{
- import_log_notice(job, "WARNING: skipping entry \"%s\" which "
- "violates attribute syntax, ending line %d of "
- "file \"%s\"", slapi_entry_get_dn(e),
- curr_lineno, curr_filename);
+ import_log_notice(job, SLAPI_LOG_WARNING, "import_producer",
+ "Skipping entry \"%s\" which violates attribute syntax, ending line %d of "
+ "file \"%s\"", slapi_entry_get_dn(e), curr_lineno, curr_filename);
slapi_entry_free(e);
job->skipped++;
@@ -693,12 +692,13 @@ import_producer(void *param)
/* Check to see if we have the space in the fifo */
/* If not, make it bigger if possible */
if (import_fifo_validate_capacity_or_expand(job, newesize) == 1) {
- import_log_notice(job, "CRITICAL: skipping entry \"%s\" "
+ import_log_notice(job, SLAPI_LOG_WARNING, "import_producer", "Skipping entry \"%s\" "
"ending line %d of file \"%s\"",
- slapi_entry_get_dn(e),
- curr_lineno, curr_filename);
- import_log_notice(job, "REASON: entry too large (%lu bytes) for "
- "the buffer size (%lu bytes), and we were UNABLE to expand buffer.", (long unsigned int)newesize, (long unsigned int)job->fifo.bsize);
+ slapi_entry_get_dn(e), curr_lineno, curr_filename);
+ import_log_notice(job, SLAPI_LOG_WARNING, "import_producer",
+ "REASON: entry too large (%lu bytes) for the buffer size (%lu bytes), "
+ "and we were UNABLE to expand buffer.",
+ (long unsigned int)newesize, (long unsigned int)job->fifo.bsize);
backentry_free(&ep);
job->skipped++;
continue;
@@ -825,10 +825,11 @@ index_set_entry_to_fifo(ImportWorkerInfo *info, Slapi_Entry *e,
newesize = (slapi_entry_size(ep->ep_entry) + sizeof(struct backentry));
if (import_fifo_validate_capacity_or_expand(job, newesize) == 1) {
- import_log_notice(job, "CRITICAL: skipping entry \"%s\"",
+ import_log_notice(job, SLAPI_LOG_WARNING, "index_set_entry_to_fifo", "Skipping entry \"%s\"",
slapi_entry_get_dn(e));
- import_log_notice(job, "REASON: entry too large (%lu bytes) for "
- "the buffer size (%lu bytes), and we were UNABLE to expand buffer.", (long unsigned int)newesize, (long unsigned int)job->fifo.bsize);
+ import_log_notice(job, SLAPI_LOG_WARNING, "index_set_entry_to_fifo", "REASON: entry too large (%lu bytes) for "
+ "the buffer size (%lu bytes), and we were UNABLE to expand buffer.",
+ (long unsigned int)newesize, (long unsigned int)job->fifo.bsize);
backentry_free(&ep);
job->skipped++;
rc = 0; /* go to the next loop */
@@ -914,7 +915,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, LOG_ERR, "Could not open id2entry\n" );
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "index_producer - Could not open id2entry\n" );
goto error;
}
if (job->flags & FLAG_DN2RDN) {
@@ -922,7 +923,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, LOG_ERR, "Could not open new id2entry\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "index_producer - Could not open new id2entry\n");
goto error;
}
}
@@ -930,8 +931,8 @@ 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, LOG_ERR,
- "Failed to get cursor for reindexing\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "index_producer - Failed to get cursor for reindexing\n", 0, 0, 0 );
dblayer_release_id2entry(be, db);
goto error;
}
@@ -966,7 +967,7 @@ index_producer(void *param)
if (0 != db_rval) {
if (DB_NOTFOUND != db_rval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: Failed to read database, "
+ LDAPDebug(LDAP_DEBUG_ERR, "index_producer - %s: Failed to read database, "
"errno=%d (%s)\n", inst->inst_name, db_rval,
dblayer_strerror(db_rval));
if (job->task) {
@@ -1002,8 +1003,8 @@ 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, LOG_DEBUG,
- "index_producer: converting an entry "
+ LDAPDebug2Args(LDAP_DEBUG_TRACE,
+ "index_producer - Converting an entry "
"from dn format to rdn format failed "
"(dn: %s, ID: %d)\n",
slapi_entry_get_dn_const(e), temp_id);
@@ -1029,8 +1030,8 @@ index_producer(void *param)
char *pid_str = NULL;
char *pdn = NULL;
- LDAPDebug2Args( LDAP_DEBUG_TRACE, LOG_DEBUG,
- "index_producer: entryrdn is not available; "
+ LDAPDebug2Args(LDAP_DEBUG_TRACE,
+ "index_producer - entryrdn is not available; "
"composing dn (rdn: %s, ID: %d)\n",
rdn, temp_id);
rc = get_value_from_string((const char *)data.dptr,
@@ -1045,9 +1046,9 @@ 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, LOG_ERR,
- "ldbm2index: Failed to compose dn for "
- "(rdn: %s, ID: %d)\n", rdn, temp_id);
+ LDAPDebug2Args(LDAP_DEBUG_ANY, "index_producer - "
+ "Failed to compose dn for (rdn: %s, ID: %d)\n",\
+ rdn, temp_id);
slapi_ch_free_string(&rdn);
slapi_rdn_done(&psrdn);
continue;
@@ -1056,10 +1057,9 @@ index_producer(void *param)
rc = slapi_rdn_get_dn(&psrdn, &pdn);
slapi_rdn_done(&psrdn);
if (rc) {
- LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm2index: Failed to compose dn for "
- "(rdn: %s, ID: %d) from Slapi_RDN\n",
- rdn, temp_id);
+ LDAPDebug2Args(LDAP_DEBUG_ANY, "index_producer - "
+ "Failed to compose dn for (rdn: %s, ID: %d) from Slapi_RDN\n",
+ rdn, temp_id);
slapi_ch_free_string(&rdn);
continue;
}
@@ -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, LOG_DEBUG, "ldbm2index",
+ slapi_log_error(SLAPI_LOG_CACHE, "index_producer - ",
"entryrdn_lookup_dn returned: %s, "
"and set to dn cache\n", normdn);
}
@@ -1090,8 +1090,8 @@ index_producer(void *param)
"%s: WARNING: skipping badly formatted entry (id %lu)",
inst->inst_name, (u_long)temp_id);
}
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: WARNING: skipping badly formatted entry (id %lu)\n",
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "index_producer - %s: Skipping badly formatted entry (id %lu)\n",
inst->inst_name, (u_long)temp_id, 0);
continue;
}
@@ -1118,25 +1118,27 @@ index_producer(void *param)
tmp_db->close(tmp_db, 0);
rc = db_create(&db, env, 0);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "Creating db handle to remove %s failed.\n", id2entry);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "index_producer - "
+ "Creating db handle to remove %s failed.\n", id2entry);
goto bail;
}
rc = db->remove(db, id2entry, NULL, 0);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "Removing %s failed.\n", id2entry);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "index_producer - "
+ "Removing %s failed.\n", id2entry);
goto bail;
}
rc = db_create(&db, env, 0);
if (rc) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug2Args(LDAP_DEBUG_ERR, "index_producer - "
"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, LOG_ERR, "Renaming %s to %s failed.\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR, "index_producer - "
+ "Renaming %s to %s failed.\n",
tmpid2entry, id2entry);
goto bail;
}
@@ -1156,7 +1158,7 @@ error:
tmp_db->close(tmp_db, 0);
rc = db_create(&tmp_db, env, 0);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "index_producer - "
"Creating db handle to remove %s s failed.\n",
tmpid2entry);
goto bail;
@@ -1164,8 +1166,8 @@ error:
/* remove tmp */
rc = tmp_db->remove(tmp_db, tmpid2entry, NULL, 0);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "Removing %s failed.\n",
- tmpid2entry);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "index_producer - "
+ "Removing %s failed.\n", tmpid2entry);
goto bail;
}
}
@@ -1260,14 +1262,15 @@ 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, LOG_ERR,
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "add_IDs_to_IDarray - "
"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, LOG_ERR, "Invalid ID in %s\n", strids);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "add_IDs_to_IDarray - "
+ "Invalid ID in %s\n", strids);
return 1;
}
@@ -1463,7 +1466,8 @@ upgradedn_producer(void *param)
if (!chk_dn_norm && !chk_dn_norm_sp) {
/* Nothing to do... */
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "UpgradeDnFormat is not required.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "upgradedn_producer - "
+ "UpgradeDnFormat is not required.\n");
info->state = FINISHED;
goto done;
}
@@ -1480,14 +1484,16 @@ 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, LOG_ERR, "Could not open id2entry\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "upgradedn_producer - "
+ "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, LOG_ERR, "Failed to get cursor for reindexing\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "upgradedn_producer - "
+ "Failed to get cursor for reindexing\n");
dblayer_release_id2entry(be, db);
goto error;
}
@@ -1521,14 +1527,14 @@ upgradedn_producer(void *param)
if (0 != db_rval) {
if (DB_NOTFOUND == db_rval) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "%s: Finished to read database\n",
- inst->inst_name);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "upgradedn_producer - "
+ "%s: Finished reading database\n", inst->inst_name);
if (job->task) {
slapi_task_log_notice(job->task,
- "%s: Finished to read database", inst->inst_name);
+ "%s: Finished reading database", inst->inst_name);
}
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: Failed to read database, "
+ LDAPDebug(LDAP_DEBUG_ERR, "%s: Failed to read database, "
"errno=%d (%s)\n", inst->inst_name, db_rval,
dblayer_strerror(db_rval));
if (job->task) {
@@ -1583,10 +1589,9 @@ upgradedn_producer(void *param)
char *pid_str = NULL;
char *pdn = NULL;
- LDAPDebug2Args( LDAP_DEBUG_TRACE, LOG_DEBUG,
- "index_producer: entryrdn is not available; "
- "composing dn (rdn: %s, ID: %d)\n",
- rdn, temp_id);
+ LDAPDebug2Args(LDAP_DEBUG_TRACE, "upgradedn_producer - "
+ "entryrdn is not available; composing dn (rdn: %s, ID: %d)\n",
+ rdn, temp_id);
rc = get_value_from_string((const char *)data.dptr,
LDBM_PARENTID_STR, &pid_str);
if (rc) {
@@ -1599,7 +1604,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, LOG_ERR,
+ LDAPDebug2Args(LDAP_DEBUG_ANY,
"uptradedn: Failed to compose dn for "
"(rdn: %s, ID: %d)\n", rdn, temp_id);
slapi_ch_free_string(&rdn);
@@ -1610,10 +1615,9 @@ upgradedn_producer(void *param)
rc = slapi_rdn_get_dn(&psrdn, &pdn);
slapi_rdn_done(&psrdn);
if (rc) {
- LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR,
- "uptradedn: Failed to compose dn for "
- "(rdn: %s, ID: %d) from Slapi_RDN\n",
- rdn, temp_id);
+ LDAPDebug2Args(LDAP_DEBUG_ANY, "upgradedn_producer - "
+ "Failed to compose dn for (rdn: %s, ID: %d) from Slapi_RDN\n",
+ rdn, temp_id);
slapi_ch_free_string(&rdn);
continue;
}
@@ -1636,7 +1640,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, LOG_DEBUG, "uptradedn",
+ slapi_log_error(SLAPI_LOG_CACHE, "upgradedn_producer",
"entryrdn_lookup_dn returned: %s, "
"and set to dn cache\n", normdn);
dn_in_cache = 1;
@@ -1662,9 +1666,9 @@ upgradedn_producer(void *param)
"%s: WARNING: skipping badly formatted entry (id %lu)",
inst->inst_name, (u_long)temp_id);
}
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: WARNING: skipping badly formatted entry (id %lu)\n",
- inst->inst_name, (u_long)temp_id, 0);
+ LDAPDebug(LDAP_DEBUG_WARNING, "upgradedn_producer - "
+ "%s: Skipping badly formatted entry (id %lu)\n",
+ inst->inst_name, (u_long)temp_id, 0);
continue;
}
@@ -1707,7 +1711,7 @@ upgradedn_producer(void *param)
slapi_task_log_notice(job->task,
"%s: No DNs to fix.\n", inst->inst_name);
}
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
"%s: No DNs to fix.\n", inst->inst_name);
slapi_ch_free_string(&path);
goto bail;
@@ -1720,7 +1724,7 @@ upgradedn_producer(void *param)
"%s: Error: failed to open a file \"%s\"",
inst->inst_name, path);
}
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug2Args(LDAP_DEBUG_ERR, "upgradedn_producer - "
"%s: Error: failed to open a file \"%s\"\n",
inst->inst_name, path);
slapi_ch_free_string(&path);
@@ -1740,7 +1744,7 @@ upgradedn_producer(void *param)
"%s: Error: failed to write a line \"%s\"",
inst->inst_name, dn_id);
}
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug2Args(LDAP_DEBUG_ERR, "upgradedn_producer - "
"%s: Error: failed to write a line \"%s\"",
inst->inst_name, dn_id);
slapi_ch_free_string(&dn_id);
@@ -1768,7 +1772,7 @@ upgradedn_producer(void *param)
}
if (add_IDs_to_IDarray(&dn_norm_sp_conflicts, &my_max,
my_idx, buf)) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "upgradedn_producer - "
"Failed to set IDs %s to conflict list\n",
buf);
goto error;
@@ -1782,11 +1786,11 @@ 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, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_NOTICE, "upgradedn_producer - "
"Entry %s (%lu) is a conflict of (%lu)\n",
normdn, temp_id, alt_id);
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "Renaming \"%s\" to \"%s\"\n",
- rdn, newrdn);
+ LDAPDebug2Args(LDAP_DEBUG_NOTICE, "upgradedn_producer - "
+ "Renaming \"%s\" to \"%s\"\n", rdn, newrdn);
if (!dn_in_cache) {
/* If not in dn cache, normdn needs to be freed. */
slapi_ch_free_string(&normdn);
@@ -1804,9 +1808,9 @@ upgradedn_producer(void *param)
slapi_ch_strdup(rdn), 0);
rc = slapi_entry_add_rdn_values(e);
if (rc) {
- 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);
+ LDAPDebug(LDAP_DEBUG_ERR, "upgradedn_producer - "
+ "%s: Failed to add rdn values to an entry: %s (id %lu)\n",
+ inst->inst_name, normdn, (u_long)temp_id);
goto error;
}
} /* !alt_id */
@@ -1822,7 +1826,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, LOG_DEBUG, "uptradedn",
+ slapi_log_error(SLAPI_LOG_CACHE, "upgradedn_producer",
"set dn %s to dn cache\n", normdn);
}
/* Check DN syntax attr values if it contains '\\' or not */
@@ -1834,9 +1838,8 @@ upgradedn_producer(void *param)
rdnp = PL_strchr(rdn, '=');
if (NULL == rdnp) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: WARNING: skipping an entry with corrupted RDN \"%s\" "
- "(id %lu)\n",
+ LDAPDebug(LDAP_DEBUG_WARNING, "upgradedn_producer - "
+ "%s: Skipping an entry with corrupted RDN \"%s\" (id %lu)\n",
inst->inst_name, rdn, (u_long)temp_id);
slapi_entry_free(e); e = NULL;
continue;
@@ -1856,7 +1859,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, LOG_DEBUG,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE, "upgradedn_producer - "
"%s: Found upgradedn candidate: (id %lu)\n",
inst->inst_name, (u_long)temp_id);
/*
@@ -1865,9 +1868,9 @@ upgradedn_producer(void *param)
*/
rc = slapi_entry_add_rdn_values(e);
if (rc) {
- 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);
+ LDAPDebug(LDAP_DEBUG_ERR, "upgradedn_producer - "
+ "%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;
continue;
}
@@ -1928,7 +1931,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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE, "upgradedn_producer - "
"%s: Found upgradedn candidate: %s (id %lu)\n",
inst->inst_name, valueptr, (u_long)temp_id);
if (!entryrdn_get_switch() && isentrydn) {
@@ -1940,10 +1943,9 @@ upgradedn_producer(void *param)
*/
rc = slapi_entry_add_rdn_values(e);
if (rc) {
- 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);
+ LDAPDebug(LDAP_DEBUG_ERR, "upgradedn_producer - "
+ "%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;
continue;
}
@@ -1969,11 +1971,9 @@ upgradedn_producer(void *param)
charray_free(ud_vals);
ud_vals = NULL;
if (skipit) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: WARNING: skipping an entry "
- "with a corrupted dn (syntax value): %s "
- "(id %lu)\n",
- inst->inst_name,
- workdn?workdn:"unknown", (u_long)temp_id);
+ LDAPDebug(LDAP_DEBUG_WARNING, "upgradedn_producer - "
+ "%s: Skipping an entry with a corrupted dn (syntax value): %s (id %lu)\n",
+ inst->inst_name, workdn?workdn:"unknown", (u_long)temp_id);
slapi_ch_free_string(&workdn);
upgradedn_free_list(&ud_list);
break;
@@ -2103,10 +2103,11 @@ upgradedn_producer(void *param)
newesize = (slapi_entry_size(ep->ep_entry) + sizeof(struct backentry));
if (import_fifo_validate_capacity_or_expand(job, newesize) == 1) {
- import_log_notice(job, "WARNING: skipping entry \"%s\"",
+ import_log_notice(job, SLAPI_LOG_ERR, "upgradedn_producer", "Skipping entry \"%s\"",
slapi_entry_get_dn(e));
- import_log_notice(job, "REASON: entry too large (%lu bytes) for "
- "the buffer size (%lu bytes), and we were UNABLE to expand buffer.", (long unsigned int)newesize, (long unsigned int)job->fifo.bsize);
+ import_log_notice(job, SLAPI_LOG_ERR, "upgradedn_producer", "REASON: entry too large (%lu bytes) for "
+ "the buffer size (%lu bytes), and we were UNABLE to expand buffer.",
+ (long unsigned int)newesize, (long unsigned int)job->fifo.bsize);
backentry_free(&ep);
job->skipped++;
continue;
@@ -2217,7 +2218,7 @@ foreman_do_parentid(ImportJob *job, FifoItem *fi, struct attrinfo *parentid_ai)
/* Delete it. */
ret = slapi_attr_first_value(pid_to_del, &value);
if (ret < 0) {
- import_log_notice(job,
+ import_log_notice(job, SLAPI_LOG_ERR, "foreman_do_parentid",
"Error: retrieving parentid value (error %d)",
ret);
} else {
@@ -2228,7 +2229,7 @@ foreman_do_parentid(ImportJob *job, FifoItem *fi, struct attrinfo *parentid_ai)
BE_INDEX_DEL|BE_INDEX_EQUALITY|BE_INDEX_NORMALIZED,
NULL);
if (ret) {
- import_log_notice(job,
+ import_log_notice(job, SLAPI_LOG_ERR, "foreman_do_parentid",
"Error: deleting %s from parentid index "
"(error %d: %s)",
bval->bv_val, ret, dblayer_strerror(ret));
@@ -2256,8 +2257,8 @@ foreman_do_parentid(ImportJob *job, FifoItem *fi, struct attrinfo *parentid_ai)
}
}
if (ret != 0) {
- import_log_notice(job, "ERROR: Can't update parentid index "
- "(error %d)", ret);
+ import_log_notice(job, SLAPI_LOG_ERR, "foreman_do_parentid",
+ "Can't update parentid index (error %d)", ret);
return ret;
}
}
@@ -2285,7 +2286,7 @@ foreman_do_entrydn(ImportJob *job, FifoItem *fi)
/* Delete it. */
ret = slapi_attr_first_value(entrydn_to_del, &value);
if (ret < 0) {
- import_log_notice(job,
+ import_log_notice(job, SLAPI_LOG_ERR, "foreman_do_entrydn",
"Error: retrieving entrydn value (error %d)",
ret);
} else {
@@ -2296,7 +2297,7 @@ foreman_do_entrydn(ImportJob *job, FifoItem *fi)
BE_INDEX_DEL|BE_INDEX_EQUALITY|BE_INDEX_NORMALIZED,
NULL);
if (ret) {
- import_log_notice(job,
+ import_log_notice(job, SLAPI_LOG_ERR, "foreman_do_entrydn",
"Error: deleting %s from entrydn index "
"(error %d: %s)",
bval->bv_val, ret, dblayer_strerror(ret));
@@ -2332,9 +2333,9 @@ foreman_do_entrydn(ImportJob *job, FifoItem *fi)
ID id = idl_firstid(IDL); /* entrydn is a single attr */
idl_free(&IDL);
if (id != entry->ep_id) { /* case (2) */
- import_log_notice(job, "Duplicated entrydn detected: \"%s\": "
- "Entry ID: (%d, %d)",
- bv.bv_val, id, entry->ep_id);
+ import_log_notice(job, SLAPI_LOG_ERR, "foreman_do_entrydn",
+ "Duplicated entrydn detected: \"%s\": Entry ID: (%d, %d)",
+ bv.bv_val, id, entry->ep_id);
return LDBM_ERROR_FOUND_DUPDN;
}
} else {
@@ -2342,9 +2343,9 @@ foreman_do_entrydn(ImportJob *job, FifoItem *fi)
bv.bv_val, entry->ep_id,
BE_INDEX_ADD|BE_INDEX_NORMALIZED, NULL);
if (ret) {
- import_log_notice(job, "Error writing entrydn index "
- "(error %d: %s)",
- ret, dblayer_strerror(ret));
+ import_log_notice(job, SLAPI_LOG_ERR, "foreman_do_entrydn",
+ "Error writing entrydn index (error %d: %s)",
+ ret, dblayer_strerror(ret));
return ret;
}
}
@@ -2352,10 +2353,10 @@ foreman_do_entrydn(ImportJob *job, FifoItem *fi)
/* Did this work ? */
if (IDL) {
/* IMPOSTER ! Get thee hence... */
- import_log_notice(job, "WARNING: Skipping duplicate entry "
- "\"%s\" found at line %d of file \"%s\"",
- slapi_entry_get_dn(entry->ep_entry),
- fi->line, fi->filename);
+ import_log_notice(job, SLAPI_LOG_WARNING, "foreman_do_entrydn",
+ "Skipping duplicate entry \"%s\" found at line %d of file \"%s\"",
+ slapi_entry_get_dn(entry->ep_entry),
+ fi->line, fi->filename);
idl_free(&IDL);
/* skip this one */
fi->bad = FIFOITEM_BAD;
@@ -2365,9 +2366,9 @@ foreman_do_entrydn(ImportJob *job, FifoItem *fi)
ret = index_addordel_string(be, "entrydn", bv.bv_val, entry->ep_id,
BE_INDEX_ADD|BE_INDEX_NORMALIZED, NULL);
if (ret) {
- import_log_notice(job, "Error writing entrydn index "
- "(error %d: %s)",
- ret, dblayer_strerror(ret));
+ import_log_notice(job, SLAPI_LOG_ERR, "foreman_do_entrydn",
+ "Error writing entrydn index (error %d: %s)",
+ ret, dblayer_strerror(ret));
return ret;
}
}
@@ -2393,7 +2394,7 @@ foreman_do_entryrdn(ImportJob *job, FifoItem *fi)
/* Delete it. */
ret = slapi_attr_first_value(entryrdn_to_del, &value);
if (ret < 0) {
- import_log_notice(job,
+ import_log_notice(job, SLAPI_LOG_ERR, "foreman_do_entryrdn",
"Error: retrieving entryrdn value (error %d)",
ret);
} else {
@@ -2401,7 +2402,7 @@ foreman_do_entryrdn(ImportJob *job, FifoItem *fi)
slapi_value_get_berval((const Slapi_Value *)value);
ret = entryrdn_index_entry(be, entry, BE_INDEX_DEL, NULL);
if (ret) {
- import_log_notice(job,
+ import_log_notice(job, SLAPI_LOG_ERR, "foreman_do_entryrdn",
"Error: deleting %s from entrydn index "
"(error %d: %s)",
bval->bv_val, ret, dblayer_strerror(ret));
@@ -2417,14 +2418,14 @@ foreman_do_entryrdn(ImportJob *job, FifoItem *fi)
}
ret = entryrdn_index_entry(be, entry, BE_INDEX_ADD, NULL);
if (LDBM_ERROR_FOUND_DUPDN == ret) {
- import_log_notice(job, "Duplicated DN detected: \"%s\": "
- "Entry ID: (%d)",
- slapi_entry_get_dn(entry->ep_entry),
- entry->ep_id);
+ import_log_notice(job, SLAPI_LOG_ERR, "foreman_do_entryrdn",
+ "Duplicated DN detected: \"%s\": Entry ID: (%d)",
+ slapi_entry_get_dn(entry->ep_entry), entry->ep_id);
return ret;
} else if (0 != ret) {
- import_log_notice(job, "Error writing entryrdn index "
- "(error %d: %s)", ret, dblayer_strerror(ret));
+ import_log_notice(job, SLAPI_LOG_ERR, "foreman_do_entryrdn",
+ "Error writing entryrdn index (error %d: %s)",
+ ret, dblayer_strerror(ret));
return ret;
}
return 0;
@@ -2491,11 +2492,13 @@ import_foreman(void *param)
/* Read that entry from the cache */
fi = import_fifo_fetch(job, id, 0);
if (NULL == fi) {
- import_log_notice(job, "WARNING: entry id %d is missing", id);
+ import_log_notice(job, SLAPI_LOG_WARNING, "import_foreman",
+ "Entry id %d is missing", id);
continue;
}
if (NULL == fi->entry) {
- import_log_notice(job, "WARNING: entry for id %d is missing", id);
+ import_log_notice(job, SLAPI_LOG_WARNING, "import_foreman",
+ "Entry for id %d is missing", id);
continue;
}
if (job->flags & FLAG_UPGRADEDNFORMAT_V1) {
@@ -2519,9 +2522,9 @@ import_foreman(void *param)
parent_status = IMPORT_ADD_OP_ATTRS_SAVE_OLD_PID;
}
if (add_op_attrs(pb, inst->inst_li, fi->entry, &parent_status) != 0) {
- import_log_notice(job, "ERROR: Could not add op attrs to "
- "entry ending at line %d of file \"%s\"",
- fi->line, fi->filename);
+ import_log_notice(job, SLAPI_LOG_ERR, "import_foreman",
+ "Could not add op attrs to entry ending at line %d of file \"%s\"",
+ fi->line, fi->filename);
goto error;
}
@@ -2545,11 +2548,10 @@ import_foreman(void *param)
#define RUVRDN SLAPI_ATTR_UNIQUEID "=" RUV_STORAGE_ENTRY_UNIQUEID
if (!slapi_be_issuffix(inst->inst_be, backentry_get_sdn(fi->entry)) &&
strcasecmp(backentry_get_ndn(fi->entry), RUVRDN) /* NOT nsuniqueid=ffffffff-... */) {
- import_log_notice(job, "WARNING: Skipping entry \"%s\" "
- "which has no parent, ending at line %d "
- "of file \"%s\"",
- slapi_entry_get_dn(fi->entry->ep_entry),
- fi->line, fi->filename);
+ import_log_notice(job, SLAPI_LOG_WARNING, "import_foreman",
+ "Skipping entry \"%s\" which has no parent, ending at line %d "
+ "of file \"%s\"",
+ slapi_entry_get_dn(fi->entry->ep_entry), fi->line, fi->filename);
/* skip this one */
fi->bad = FIFOITEM_BAD;
job->skipped++;
@@ -2594,10 +2596,9 @@ import_foreman(void *param)
slapi_attr_first_value(nsuniqueid, &uival);
uuidstr = slapi_value_get_string(uival);
} else {
- import_log_notice(job, "ERROR: Failed to get nsUniqueId "
- "of the duplicated entry %s; "
- "Entry ID: %d",
- orig_dn, fi->entry->ep_id);
+ import_log_notice(job, SLAPI_LOG_ERR, "import_foreman",
+ "Failed to get nsUniqueId of the duplicated entry %s; "
+ "Entry ID: %d", orig_dn, fi->entry->ep_id);
slapi_ch_free_string(&orig_dn);
goto cont;
}
@@ -2632,9 +2633,9 @@ import_foreman(void *param)
ret = foreman_do_entrydn(job, fi);
}
if (ret) {
- import_log_notice(job, "ERROR: Failed to rename duplicated "
- "DN %s to %s; Entry ID: %d",
- orig_dn, new_dn, fi->entry->ep_id);
+ import_log_notice(job, SLAPI_LOG_ERR, "import_foreman",
+ "Failed to rename duplicated DN %s to %s; Entry ID: %d",
+ orig_dn, new_dn, fi->entry->ep_id);
slapi_ch_free_string(&orig_dn);
if (-1 == ret) {
goto cont; /* skip entry */
@@ -2642,9 +2643,9 @@ import_foreman(void *param)
goto error;
}
} else {
- import_log_notice(job, "WARNING: Duplicated entry %s is "
- "renamed to %s; Entry ID: %d",
- orig_dn, new_dn, fi->entry->ep_id);
+ import_log_notice(job, SLAPI_LOG_WARNING, "import_foreman",
+ "Duplicated entry %s is renamed to %s; Entry ID: %d",
+ orig_dn, new_dn, fi->entry->ep_id);
slapi_ch_free_string(&orig_dn);
}
} else if (0 != ret) {
@@ -2669,19 +2670,19 @@ next:
if (ret) {
/* DB_RUNRECOVERY usually occurs if disk fills */
if (LDBM_OS_ERR_IS_DISKFULL(ret)) {
- import_log_notice(job, "ERROR: OUT OF SPACE ON DISK or FILE TOO LARGE -- "
- "Could not store the entry ending at line "
- "%d of file \"%s\"",
- fi->line, fi->filename);
+ import_log_notice(job, SLAPI_LOG_ERR, "import_foreman",
+ "OUT OF SPACE ON DISK or FILE TOO LARGE -- "
+ "Could not store the entry ending at line %d of file \"%s\"",
+ fi->line, fi->filename);
} else if (ret == DB_RUNRECOVERY) {
- import_log_notice(job, "FATAL ERROR: (LARGEFILE SUPPORT NOT ENABLED? OUT OF SPACE ON DISK?) -- "
- "Could not store the entry ending at line "
- "%d of file \"%s\"",
- fi->line, fi->filename);
+ import_log_notice(job, SLAPI_LOG_ERR, "import_foreman",
+ "(LARGEFILE SUPPORT NOT ENABLED? OUT OF SPACE ON DISK?) -- "
+ "Could not store the entry ending at line %d of file \"%s\"",
+ fi->line, fi->filename);
} else {
- import_log_notice(job, "ERROR: Could not store the entry "
- "ending at line %d of file \"%s\" -- "
- "error %d", fi->line, fi->filename, ret);
+ import_log_notice(job, SLAPI_LOG_ERR, "import_foreman",
+ "Could not store the entry ending at line %d of file \"%s\" -- error %d",
+ fi->line, fi->filename, ret);
}
goto error;
}
@@ -2810,7 +2811,8 @@ import_worker(void *param)
ret = index_buffer_init(info->index_buffer_size, 0,
&substring_key_buffer);
if (0 != ret) {
- import_log_notice(job, "IMPORT FAIL 1 (error %d)", ret);
+ import_log_notice(job, SLAPI_LOG_ERR, "import_worker",
+ "IMPORT FAIL 1 (error %d)", ret);
}
}
}
@@ -2908,7 +2910,7 @@ import_worker(void *param)
BE_INDEX_NORMALIZED,
NULL);
if (ret) {
- import_log_notice(job,
+ import_log_notice(job, SLAPI_LOG_ERR, "import_worker",
"Error deleting %s from %s index "
"(error %d: %s)",
bval->bv_val, info->index_info->name,
@@ -3034,8 +3036,8 @@ import_worker(void *param)
error:
if (ret == DB_RUNRECOVERY) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"cannot import; database recovery needed\n",
- 0,0,0);
+ LDAPDebug(LDAP_DEBUG_CRIT, "import_worker - "
+ "Cannot import; database recovery needed\n", 0,0,0);
} else if (ret == DB_LOCK_DEADLOCK) {
/* can this occur? */
}
@@ -3070,7 +3072,7 @@ static int bulk_import_start(Slapi_PBlock *pb)
slapi_pblock_get(pb, SLAPI_BACKEND, &be);
if (be == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "bulk_import_start: backend is not set\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "bulk_import_start - Backend is not set\n");
return -1;
}
job = CALLOC(ImportJob);
@@ -3082,9 +3084,9 @@ 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, LOG_ERR, "ldbm: '%s' is already in the middle of "
- "another task and cannot be disturbed.\n",
- job->inst->inst_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_WARNING, "bulk_import_start - "
+ "'%s' is already in the middle of another task and cannot be disturbed.\n",
+ job->inst->inst_name, 0, 0);
FREE(job);
return SLAPI_BI_ERR_BUSY;
}
@@ -3152,9 +3154,9 @@ static int bulk_import_start(Slapi_PBlock *pb)
SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL) {
PRErrorCode prerr = PR_GetError();
- 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);
+ LDAPDebug(LDAP_DEBUG_ERR, "bulk_import_start - "
+ "Unable to spawn import thread, " SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
+ prerr, slapd_pr_strerror(prerr), 0);
PR_Unlock(job->wire_lock);
ret = -2;
goto fail;
@@ -3301,7 +3303,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, LOG_ERR, "bulk_import_queue",
+ slapi_log_error(SLAPI_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*/
@@ -3328,7 +3330,7 @@ static int bulk_import_queue(ImportJob *job, Slapi_Entry *entry)
newesize = (slapi_entry_size(ep->ep_entry) + sizeof(struct backentry));
if (import_fifo_validate_capacity_or_expand(job, newesize) == 1) {
- import_log_notice(job, "REASON: entry too large (%lu bytes) for "
+ import_log_notice(job, SLAPI_LOG_ERR, "bulk_import_queue", "Entry too large (%lu bytes) for "
"the effective import buffer size (%lu bytes), and we were UNABLE to expand buffer. ",
(long unsigned int)newesize, (long unsigned int)job->fifo.bsize);
backentry_clear_entry(ep); /* entry is released in the frontend on failure*/
@@ -3381,8 +3383,8 @@ void factory_destructor(void *extension, void *object, void *parent)
* aborted!
*/
thread = job->main_thread;
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR bulk import abandoned\n",
- 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "factory_destructor - "
+ "ERROR bulk import abandoned\n", 0, 0, 0);
import_abort_all(job, 1);
/* wait for import_main to finish... */
PR_JoinThread(thread);
@@ -3407,7 +3409,8 @@ int ldbm_back_wire_import(Slapi_PBlock *pb)
slapi_pblock_get(pb, SLAPI_BACKEND, &be);
if (be == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_back_wire_import: backend is not set\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "ldbm_back_wire_import - "
+ "Backend is not set\n");
return -1;
}
li = (struct ldbminfo *)(be->be_database->plg_private);
@@ -3468,9 +3471,8 @@ int ldbm_back_wire_import(Slapi_PBlock *pb)
}
/* ??? unknown state */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: ldbm_back_wire_import: unknown state %d\n",
- state, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_wire_import - "
+ "ERROR: unknown state %d\n", state, 0, 0);
return -1;
}
@@ -3508,15 +3510,15 @@ 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, LOG_DEBUG, "dse_conf_backup(%s): backup file %s\n",
- filter, filename, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "dse_conf_backup_core - "
+ "(%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, LOG_ERR,
- "dse_conf_backup(%s): open %s failed: (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "dse_conf_backup_core - "
+ "(%s): open %s failed: (%s)\n",
filter, filename, slapd_pr_strerror(PR_GetError()));
rval = -1;
goto out;
@@ -3524,9 +3526,8 @@ 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, LOG_ERR,
- "dse_conf_backup(%s): out of memory\n",
- filter, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "dse_conf_backup_core - "
+ "(%s): out of memory\n", filter, 0, 0);
rval = -1;
goto out;
}
@@ -3538,8 +3539,8 @@ 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, LOG_DEBUG, "\ndn: %s\n",
- slapi_entry_get_dn_const(*ep), 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "dse_conf_backup_core - "
+ "dn: %s\n", slapi_entry_get_dn_const(*ep), 0, 0);
if (l <= sizeof(tmpbuf))
tp = tmpbuf;
@@ -3549,8 +3550,8 @@ 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, LOG_ERR,
- "dse_conf_backup(%s): write %s failed: %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "dse_conf_backup_core - "
+ "(%s): write %s failed: %d (%s)\n",
filter, PR_GetError(), slapd_pr_strerror(PR_GetError()));
rval = -1;
if (l > sizeof(tmpbuf))
@@ -3578,8 +3579,8 @@ 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, LOG_DEBUG, "%s: %s\n", attr_name,
- attr_val->bv_val, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "dse_conf_backup_core - "
+ "%s: %s\n", attr_name, attr_val->bv_val, 0);
if (l <= sizeof(tmpbuf))
tp = tmpbuf;
else
@@ -3588,8 +3589,8 @@ 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, LOG_ERR,
- "dse_conf_backup(%s): write %s failed: %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "dse_conf_backup_core - "
+ "%s): write %s failed: %d (%s)\n",
filter, PR_GetError(), slapd_pr_strerror(PR_GetError()));
rval = -1;
if (l > sizeof(tmpbuf))
@@ -3605,9 +3606,9 @@ 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, LOG_ERR,
- "dse_conf_backup(%s): write %s failed: %d (%s)\n",
- filter, PR_GetError(), slapd_pr_strerror(PR_GetError()));
+ LDAPDebug(LDAP_DEBUG_ERR, "dse_conf_backup_core - "
+ "(%s): write %s failed: %d (%s)\n",
+ filter, PR_GetError(), slapd_pr_strerror(PR_GetError()));
rval = -1;
goto out;
}
@@ -3631,9 +3632,9 @@ out:
prrval = PR_Close(prfd);
if (PR_SUCCESS != prrval)
{
- 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);
+ LDAPDebug(LDAP_DEBUG_CRIT, "dse_conf_backup_core - "
+ "Failed to back up dse indexes %d (%s)\n",
+ PR_GetError(), slapd_pr_strerror(PR_GetError()), 0);
rval = -1;
}
}
@@ -3677,8 +3678,8 @@ 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, LOG_ERR,
- "Warning: config backup file %s not found in backup\n",
+ LDAPDebug(LDAP_DEBUG_WARNING, "dse_conf_verify_core - "
+ "Config backup file %s not found in backup\n",
file_name, 0, 0);
rval = 0;
goto out;
@@ -3687,8 +3688,8 @@ 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, LOG_ERR,
- "Warning: can't open config backup file: %s\n", filename, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "dse_conf_verify_core - "
+ "Can't open config backup file: %s\n", filename, 0, 0);
rval = -1;
goto out;
}
@@ -3717,8 +3718,9 @@ 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, LOG_ERR, "WARNING: skipping bad LDIF entry "
- "ending line %d of file \"%s\"", curr_lineno, filename, 0);
+ LDAPDebug(LDAP_DEBUG_WARNING, "dse_conf_verify_core - "
+ "Skipping bad LDIF entry ending line %d of file \"%s\"",
+ curr_lineno, filename, 0);
continue;
}
if (bep - backup_entries >= backup_entry_len)
@@ -3753,9 +3755,9 @@ 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, LOG_ERR, "WARNING!!: current %s is "
- "different from backed up configuration; "
- "The backup is restored.\n", log_str, 0, 0);
+ LDAPDebug(LDAP_DEBUG_WARNING, "dse_conf_verify_core - "
+ "Current %s is different from backed up configuration; "
+ "The backup is restored.\n", log_str, 0, 0);
}
slapi_free_search_results_internal(&srch_pb);
@@ -3824,9 +3826,8 @@ import_get_and_add_parent_rdns(ImportWorkerInfo *info,
return rc;
}
if (NULL == inst || NULL == srdn) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
- "import_get_and_add_parent_rdns: Empty %s\n",
- NULL==inst?"inst":"srdn");
+ slapi_log_error(SLAPI_LOG_ERR, "import_get_and_add_parent_rdns",
+ "Empty %s\n", NULL==inst?"inst":"srdn");
return rc;
}
@@ -3838,8 +3839,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, LOG_ERR, "ldif2dbm",
- "import_get_and_add_parent_rdns: "
+ slapi_log_error(SLAPI_LOG_ERR, "import_get_and_add_parent_rdns",
"Failed to convert DN %s to RDN\n",
slapi_sdn_get_dn(bdn->dn_sdn));
slapi_rdn_done(&mysrdn);
@@ -3848,8 +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, LOG_ERR, "ldif2dbm",
- "import_get_and_add_parent_rdns: "
+ slapi_log_error(SLAPI_LOG_ERR, "import_get_and_add_parent_rdns",
"Failed to merge Slapi_RDN %s to RDN\n",
slapi_sdn_get_dn(bdn->dn_sdn));
}
@@ -3857,8 +3856,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, LOG_ERR, "ldif2dbm",
- "import_get_and_add_parent_rdns: "
+ slapi_log_error(SLAPI_LOG_ERR, "import_get_and_add_parent_rdns",
"Failed to convert DN %s to RDN\n",
slapi_sdn_get_dn(bdn->dn_sdn));
CACHE_RETURN(&inst->inst_dncache, &bdn);
@@ -3876,8 +3874,8 @@ import_get_and_add_parent_rdns(ImportWorkerInfo *info,
/* not in the dn cache; read id2entry */
if (NULL == db) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
- "import_get_and_add_parent_rdns: Empty db\n");
+ slapi_log_error(SLAPI_LOG_ERR, "import_get_and_add_parent_rdns",
+ "Empty db\n");
return rc;
}
id_internal_to_stored(id, (char *)&storedid);
@@ -3889,24 +3887,21 @@ 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, LOG_ERR, "ldif2dbm",
- "import_get_and_add_parent_rdns: Failed to "
- "position at ID " ID_FMT "\n", id);
+ slapi_log_error(SLAPI_LOG_ERR, "import_get_and_add_parent_rdns",
+ "Failed to position at ID " ID_FMT "\n", id);
return rc;
}
/* 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, LOG_ERR, "ldif2dbm",
- "import_get_and_add_parent_rdns: "
+ slapi_log_error(SLAPI_LOG_ERR, "import_get_and_add_parent_rdns",
"Failed to get rdn of entry " ID_FMT "\n", id);
goto bail;
}
/* 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, LOG_ERR, "ldif2dbm",
- "import_get_and_add_parent_rdns: "
+ slapi_log_error(SLAPI_LOG_ERR, "import_get_and_add_parent_rdns",
"Failed to add rdn %s of entry " ID_FMT "\n", rdn, id);
goto bail;
}
@@ -3928,8 +3923,7 @@ import_get_and_add_parent_rdns(ImportWorkerInfo *info,
normdn = NULL;
rc = slapi_rdn_get_dn(&mysrdn, &normdn);
if (rc) {
- LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR,
- "import_get_and_add_parent_rdns: "
+ slapi_log_error(SLAPI_LOG_ERR, "import_get_and_add_parent_rdns",
"Failed to compose dn for (rdn: %s, ID: %d) "
"from Slapi_RDN\n", rdn, id);
goto bail;
@@ -3942,8 +3936,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, LOG_ERR, "ldif2dbm",
- "import_get_and_add_parent_rdns: "
+ slapi_log_error(SLAPI_LOG_ERR, "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 f87ad97..24988e4 100644
--- a/ldap/servers/slapd/back-ldbm/import.c
+++ b/ldap/servers/slapd/back-ldbm/import.c
@@ -124,7 +124,8 @@ FifoItem *import_fifo_fetch(ImportJob *job, ID id, int worker)
if (fi->bad == FIFOITEM_BAD) {
fi->bad = FIFOITEM_BAD_PRINTED;
if (!(job->flags & FLAG_UPGRADEDNFORMAT_V1)) {
- import_log_notice(job, "WARNING: bad entry: ID %d", id);
+ import_log_notice(job, SLAPI_LOG_WARNING, "import_fifo_fetch",
+ "Bad entry: ID %d", id);
}
}
return NULL;
@@ -198,7 +199,7 @@ static void import_log_status_done(ImportJob *job)
/* this adds a line to the 'nsTaskLog' value, which is cumulative (anything
* logged here is added to the end)
*/
-void import_log_notice(ImportJob *job, char *format, ...)
+void import_log_notice(ImportJob *job, int log_level, char *subsystem, char *format, ...)
{
va_list ap;
char buffer[LOG_BUFFER];
@@ -212,14 +213,14 @@ 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, LOG_ERR, "upgradedn %s: %s\n", job->inst->inst_name,
- buffer, 0);
+ slapi_log_error(log_level, subsystem, "upgradedn %s: %s\n",
+ job->inst->inst_name, buffer);
} else if (job->flags & FLAG_REINDEXING) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "reindex %s: %s\n", job->inst->inst_name,
- buffer, 0);
+ slapi_log_error(log_level, subsystem, "reindex %s: %s\n",
+ job->inst->inst_name, buffer);
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "import %s: %s\n", job->inst->inst_name,
- buffer, 0);
+ slapi_log_error(log_level, subsystem, "import %s: %s\n",
+ job->inst->inst_name, buffer);
}
}
@@ -482,9 +483,10 @@ 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, LOG_ERR, "unable to spawn import foreman thread, "
- SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
- prerr, slapd_pr_strerror(prerr), 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "import_start_threads - "
+ "Unable to spawn import foreman thread, "
+ SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
+ prerr, slapd_pr_strerror(prerr), 0);
FREE(foreman);
goto error;
}
@@ -512,7 +514,8 @@ static int import_start_threads(ImportJob *job)
PR_UNJOINABLE_THREAD,
SLAPD_DEFAULT_THREAD_STACKSIZE)) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "unable to spawn import worker thread, "
+ LDAPDebug(LDAP_DEBUG_ERR, "import_start_threads - "
+ "Unable to spawn import worker thread, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
FREE(worker);
@@ -528,10 +531,10 @@ static int import_start_threads(ImportJob *job)
return 0;
error:
- import_log_notice(job, "Import thread creation failed.");
- import_log_notice(job, "Aborting all import threads...");
+ import_log_notice(job, SLAPI_LOG_ERR, "import_start_threads", "Import thread creation failed.");
+ import_log_notice(job, SLAPI_LOG_ERR, "import_start_threads", "Aborting all import threads...");
import_abort_all(job, 1);
- import_log_notice(job, "Import threads aborted.");
+ import_log_notice(job, SLAPI_LOG_ERR, "import_start_threads", "Import threads aborted.");
return -1;
}
@@ -662,10 +665,10 @@ static int import_throw_in_towel(ImportJob *job, time_t current_time,
* for the slowdown */
if (job->cache_hit_ratio < IMPORT_CHUNK_TEST_CACHE_HIT_RATIO) {
/* We have a winner ! */
- import_log_notice(job, "Decided to end this pass because "
- "the progress rate has dropped below "
- "the %.0f%% threshold.",
- IMPORT_CHUNK_TEST_SLOWDOWN_RATIO_A*100.0);
+ import_log_notice(job, SLAPI_LOG_INFO, "import_throw_in_towel",
+ "Decided to end this pass because the progress rate has dropped below "
+ "the %.0f%% threshold.",
+ IMPORT_CHUNK_TEST_SLOWDOWN_RATIO_A*100.0);
return 1;
}
} else {
@@ -677,10 +680,9 @@ static int import_throw_in_towel(ImportJob *job, time_t current_time,
* been misconfigured too large */
if (number_of_times_here > 10) {
/* Got to get here ten times at least */
- import_log_notice(job, "Decided to end this pass "
- "because the progress rate "
- "plummeted below %.0f%%",
- IMPORT_CHUNK_TEST_SLOWDOWN_RATIO_B*100.0);
+ import_log_notice(job, SLAPI_LOG_INFO, "import_throw_in_towel",
+ "Decided to end this pass because the progress rate plummeted below %.0f%%",
+ IMPORT_CHUNK_TEST_SLOWDOWN_RATIO_B*100.0);
return 1;
}
number_of_times_here++;
@@ -850,7 +852,7 @@ static int import_monitor_threads(ImportJob *job, int *status)
p += sprintf(p, "recent rate %.1f/sec, ",
job->recent_progress_rate);
p += sprintf(p, "hit ratio %.0f%%", job->cache_hit_ratio * 100.0);
- import_log_notice(job, "%s", buffer);
+ import_log_notice(job, SLAPI_LOG_INFO, "import_monitor_threads", "%s", buffer);
}
/* Then let's see if it's time to complete this import pass */
@@ -858,14 +860,14 @@ static int import_monitor_threads(ImportJob *job, int *status)
giveup = import_throw_in_towel(job, time_now, trailing_ID);
if (giveup) {
/* If so, signal the lead thread to stop */
- import_log_notice(job, "Ending pass number %d ...",
- job->total_pass);
+ import_log_notice(job, SLAPI_LOG_INFO, "import_monitor_threads",
+ "Ending pass number %d ...", job->total_pass);
foreman->command = STOP;
while (foreman->state != FINISHED) {
DS_Sleep(tenthsecond);
}
- import_log_notice(job, "Foreman is done; waiting for "
- "workers to finish...");
+ import_log_notice(job, SLAPI_LOG_INFO, "import_monitor_threads",
+ "Foreman is done; waiting for workers to finish...");
}
}
@@ -897,7 +899,8 @@ static int import_monitor_threads(ImportJob *job, int *status)
count++;
}
- import_log_notice(job, "Workers finished; cleaning up...");
+ import_log_notice(job, SLAPI_LOG_INFO, "import_monitor_threads",
+ "Workers finished; cleaning up...");
/* Now tell all the workers to stop */
for (current_worker = job->worker_list; current_worker != NULL;
@@ -918,7 +921,7 @@ static int import_monitor_threads(ImportJob *job, int *status)
current_worker = current_worker->next;
}
}
- import_log_notice(job, "Workers cleaned up.");
+ import_log_notice(job, SLAPI_LOG_INFO, "import_monitor_threads", "Workers cleaned up.");
/* If we're here and giveup is true, and the primary hadn't finished
* processing the input files, we need to return IMPORT_INCOMPLETE_PASS */
@@ -951,7 +954,7 @@ static int import_run_pass(ImportJob *job, int *status)
/* Start the threads running */
ret = import_start_threads(job);
if (ret != 0) {
- import_log_notice(job, "Starting threads failed: %d\n", ret);
+ import_log_notice(job, SLAPI_LOG_ERR, "import_run_pass", "Starting threads failed: %d\n", ret);
goto error;
}
@@ -959,10 +962,10 @@ static int import_run_pass(ImportJob *job, int *status)
ret = import_monitor_threads(job, status);
if ((ret == ERR_IMPORT_ABORTED) || (ret == NEED_DN_NORM) ||
(ret == NEED_DN_NORM_SP) || (ret == NEED_DN_NORM_BT)) {
-import_log_notice(job, "Thread monitoring returned: %d\n", ret);
+ import_log_notice(job, SLAPI_LOG_ERR, "import_run_pass", "Thread monitoring returned: %d\n", ret);
goto error;
} else if (ret != 0) {
- import_log_notice(job, "Thread monitoring aborted: %d\n", ret);
+ import_log_notice(job, SLAPI_LOG_ERR, "import_run_pass", "Thread monitoring aborted: %d\n", ret);
goto error;
}
@@ -1063,7 +1066,8 @@ static int import_sweep_after_pass(ImportJob *job)
backend *be = job->inst->inst_be;
int ret = 0;
- import_log_notice(job, "Sweeping files for merging later...");
+ import_log_notice(job, SLAPI_LOG_INFO, "import_sweep_after_pass",
+ "Sweeping files for merging later...");
ret = dblayer_instance_close(be);
@@ -1076,46 +1080,49 @@ static int import_sweep_after_pass(ImportJob *job)
/* Foreach job, rename the file to <filename>.n, where n is the
* pass number */
if ((current_worker->work_type != FOREMAN) &&
- (current_worker->work_type != PRODUCER) &&
- (strcasecmp(current_worker->index_info->name, LDBM_PARENTID_STR) != 0)) {
- char *newname = NULL;
- char *oldname = NULL;
-
- ret = import_make_merge_filenames(job->inst->inst_dir_name,
- current_worker->index_info->name, job->current_pass,
- &oldname, &newname);
- if (0 != ret) {
- break;
- }
- if (PR_Access(oldname, PR_ACCESS_EXISTS) == PR_SUCCESS) {
- ret = PR_Rename(oldname, newname);
- if (ret != PR_SUCCESS) {
- PRErrorCode prerr = PR_GetError();
- import_log_notice(job, "Failed to rename file \"%s\" to \"%s\", "
- SLAPI_COMPONENT_NAME_NSPR " error %d (%s)",
- oldname, newname, prerr, slapd_pr_strerror(prerr));
- slapi_ch_free( (void**)&newname);
- slapi_ch_free( (void**)&oldname);
+ (current_worker->work_type != PRODUCER) &&
+ (strcasecmp(current_worker->index_info->name, LDBM_PARENTID_STR) != 0)) {
+ char *newname = NULL;
+ char *oldname = NULL;
+
+ ret = import_make_merge_filenames(job->inst->inst_dir_name,
+ current_worker->index_info->name, job->current_pass,
+ &oldname, &newname);
+ if (0 != ret) {
break;
}
+ if (PR_Access(oldname, PR_ACCESS_EXISTS) == PR_SUCCESS) {
+ ret = PR_Rename(oldname, newname);
+ if (ret != PR_SUCCESS) {
+ PRErrorCode prerr = PR_GetError();
+ import_log_notice(job, SLAPI_LOG_ERR, "import_sweep_after_pass",
+ "Failed to rename file \"%s\" to \"%s\", "
+ SLAPI_COMPONENT_NAME_NSPR " error %d (%s)",
+ oldname, newname, prerr, slapd_pr_strerror(prerr));
+ slapi_ch_free( (void**)&newname);
+ slapi_ch_free( (void**)&oldname);
+ break;
+ }
+ }
+ slapi_ch_free( (void**)&newname);
+ slapi_ch_free( (void**)&oldname);
+ }
}
- slapi_ch_free( (void**)&newname);
- slapi_ch_free( (void**)&oldname);
- }
- }
- ret = dblayer_instance_start(be, DBLAYER_IMPORT_MODE);
+ ret = dblayer_instance_start(be, DBLAYER_IMPORT_MODE);
}
if (0 == ret) {
- import_log_notice(job, "Sweep done.");
- } else {
- if (ENOSPC == ret) {
- import_log_notice(job, "ERROR: NO DISK SPACE LEFT in sweep phase");
+ import_log_notice(job, SLAPI_LOG_INFO, "import_sweep_after_pass", "Sweep done.");
} else {
- import_log_notice(job, "ERROR: Sweep phase error %d (%s)", ret,
- dblayer_strerror(ret));
- }
+ if (ENOSPC == ret) {
+ import_log_notice(job, LOG_CRIT, "import_sweep_after_pass",
+ "NO DISK SPACE LEFT in sweep phase");
+ } else {
+ import_log_notice(job, SLAPI_LOG_ERR, "import_sweep_after_pass",
+ "Sweep phase error %d (%s)", ret,
+ dblayer_strerror(ret));
+ }
}
return ret;
@@ -1251,8 +1258,8 @@ 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, LOG_ERR,
- "unable to spawn upgrade dn producer thread, "
+ LDAPDebug(LDAP_DEBUG_ERR, "import_main_offline - "
+ "Unable to spawn upgrade dn producer thread, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
goto error;
@@ -1265,8 +1272,8 @@ int import_main_offline(void *arg)
PR_UNJOINABLE_THREAD,
SLAPD_DEFAULT_THREAD_STACKSIZE)) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "unable to spawn index producer thread, "
+ LDAPDebug(LDAP_DEBUG_ERR, "import_main_offline - "
+ "Unable to spawn index producer thread, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
goto error;
@@ -1274,14 +1281,14 @@ int import_main_offline(void *arg)
}
else
{
- import_log_notice(job, "Beginning import job...");
+ import_log_notice(job, SLAPI_LOG_INFO, "import_main_offline", "Beginning import job...");
if (! CREATE_THREAD(PR_USER_THREAD, (VFP)import_producer, producer,
PR_PRIORITY_NORMAL, PR_GLOBAL_BOUND_THREAD,
PR_UNJOINABLE_THREAD,
SLAPD_DEFAULT_THREAD_STACKSIZE)) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "unable to spawn import producer thread, "
+ LDAPDebug(LDAP_DEBUG_ERR,"import_main_offline - "
+ "Unable to spawn import producer thread, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
goto error;
@@ -1289,9 +1296,9 @@ int import_main_offline(void *arg)
}
if (0 == job->job_index_buffer_suggestion)
- import_log_notice(job, "Index buffering is disabled.");
+ import_log_notice(job, SLAPI_LOG_INFO, "import_main_offline", "Index buffering is disabled.");
else
- import_log_notice(job,
+ import_log_notice(job, SLAPI_LOG_INFO, "import_main_offline",
"Index buffering enabled with bucket size %lu",
(long unsigned int)job->job_index_buffer_suggestion);
@@ -1327,12 +1334,14 @@ int import_main_offline(void *arg)
if (ret == ERR_IMPORT_ABORTED) {
/* at least one of the threads has aborted -- shut down ALL
* of the threads */
- import_log_notice(job, "Aborting all %s threads...", opstr);
+ import_log_notice(job, SLAPI_LOG_ERR, "import_main_offline",
+ "Aborting all %s threads...", opstr);
/* this abort sets the abort flag on the threads and will block for
* the exit of all threads
*/
import_set_abort_flag_all(job, 1);
- import_log_notice(job, "%s threads aborted.", opstr);
+ import_log_notice(job, SLAPI_LOG_ERR, "import_main_offline",
+ "%s threads aborted.", opstr);
aborted = 1;
goto error;
}
@@ -1341,7 +1350,8 @@ int import_main_offline(void *arg)
goto error;
} else if (0 != ret) {
/* Some horrible fate has befallen the import */
- import_log_notice(job, "Fatal pass error %d", ret);
+ import_log_notice(job, SLAPI_LOG_ERR, "import_main_offline",
+ "Fatal pass error %d", ret);
goto error;
}
@@ -1387,8 +1397,8 @@ int import_main_offline(void *arg)
job->first_ID = job->ready_ID + 1;
import_free_thread_data(job);
job->worker_list = producer;
- import_log_notice(job, "Beginning pass number %d",
- job->total_pass+1);
+ import_log_notice(job, SLAPI_LOG_INFO, "import_main_offline",
+ "Beginning pass number %d", job->total_pass+1);
} else {
/* Bizarro-slapd */
goto error;
@@ -1398,7 +1408,7 @@ int import_main_offline(void *arg)
/* kill the producer now; we're done */
if (producer) {
- import_log_notice(job, "Cleaning up producer thread...");
+ import_log_notice(job, SLAPI_LOG_INFO, "import_main_offline", "Cleaning up producer thread...");
producer->command = STOP;
/* wait for the lead thread to stop */
while (producer->state != FINISHED) {
@@ -1406,17 +1416,20 @@ int import_main_offline(void *arg)
}
}
- import_log_notice(job, "Indexing complete. Post-processing...");
+ import_log_notice(job, SLAPI_LOG_INFO, "import_main_offline", "Indexing complete. Post-processing...");
/* Now do the numsubordinates attribute */
/* [610066] reindexed db cannot be used in the following backup/restore */
- import_log_notice(job, "Generating numsubordinates (this may take several minutes to complete)...");
+ import_log_notice(job, SLAPI_LOG_INFO, "import_main_offline",
+ "Generating numsubordinates (this may take several minutes to complete)...");
if ( (!(job->flags & FLAG_REINDEXING) || (job->flags & FLAG_DN2RDN)) &&
(ret = update_subordinatecounts(be, job, NULL)) != 0 )
{
- import_log_notice(job, "Failed to update numsubordinates attributes");
+ import_log_notice(job, SLAPI_LOG_ERR, "import_main_offline",
+ "Failed to update numsubordinates attributes");
goto error;
}
- import_log_notice(job, "Generating numSubordinates complete.");
+ import_log_notice(job, SLAPI_LOG_INFO, "import_main_offline",
+ "Generating numSubordinates complete.");
if (!entryrdn_get_noancestorid()) {
/* And the ancestorid index */
@@ -1426,14 +1439,14 @@ int import_main_offline(void *arg)
ainfo_get(be, "ancestorid", &ai);
dblayer_erase_index_file(be, ai, 0);
if ((ret = ldbm_ancestorid_create_index(be, job)) != 0) {
- import_log_notice(job, "Failed to create ancestorid index");
+ import_log_notice(job, SLAPI_LOG_ERR, "import_main_offline", "Failed to create ancestorid index");
goto error;
}
}
- import_log_notice(job, "Flushing caches...");
+ import_log_notice(job, SLAPI_LOG_INFO, "import_main_offline", "Flushing caches...");
if (0 != (ret = dblayer_flush(job->inst->inst_li)) ) {
- import_log_notice(job, "Failed to flush database");
+ import_log_notice(job, SLAPI_LOG_ERR, "import_main_offline", "Failed to flush database");
goto error;
}
@@ -1446,7 +1459,7 @@ int import_main_offline(void *arg)
error:
/* If we fail, the database is now in a mess, so we delete it
except dry run mode */
- import_log_notice(job, "Closing files...");
+ import_log_notice(job, SLAPI_LOG_INFO, "import_main_offline", "Closing files...");
cache_clear(&job->inst->inst_cache, CACHE_TYPE_ENTRY);
if (entryrdn_get_switch()) {
cache_clear(&job->inst->inst_dncache, CACHE_TYPE_DN);
@@ -1460,14 +1473,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, LOG_ERR, "import_main_offline: "
+ LDAPDebug0Args(LDAP_DEBUG_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, LOG_ERR, "import_main_offline: "
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "import_main_offline - "
"dn cache_init failed. Server should be restarted.\n");
}
}
@@ -1480,7 +1493,7 @@ error:
dblayer_instance_close(job->inst->inst_be);
} else {
if (0 != (ret = dblayer_instance_close(job->inst->inst_be)) ) {
- import_log_notice(job, "Failed to close database");
+ import_log_notice(job, SLAPI_LOG_WARNING, "import_main_offline", "Failed to close database");
}
}
if (!(job->flags & FLAG_ONLINE))
@@ -1496,7 +1509,7 @@ error:
if (job->not_here_skipped) {
if (job->skipped) {
- import_log_notice(job,
+ import_log_notice(job, SLAPI_LOG_INFO, "import_main_offline",
"%s complete. Processed %lu entries "
"(%d bad entries were skipped, "
"%d entries were skipped because they don't "
@@ -1506,7 +1519,7 @@ error:
job->skipped, job->not_here_skipped,
seconds_to_import, entries_per_second);
} else {
- import_log_notice(job,
+ import_log_notice(job, SLAPI_LOG_INFO, "import_main_offline",
"%s complete. Processed %lu entries "
"(%d entries were skipped because they don't "
"belong to this database) "
@@ -1517,7 +1530,7 @@ error:
}
} else {
if (job->skipped) {
- import_log_notice(job,
+ import_log_notice(job, SLAPI_LOG_INFO, "import_main_offline",
"%s complete. Processed %lu entries "
"(%d were skipped) in %d seconds. "
"(%.2f entries/sec)",
@@ -1525,7 +1538,7 @@ error:
job->skipped, seconds_to_import,
entries_per_second);
} else {
- import_log_notice(job,
+ import_log_notice(job, SLAPI_LOG_INFO, "import_main_offline",
"%s complete. Processed %lu entries "
"in %d seconds. (%.2f entries/sec)",
opstr, (long unsigned int)entries_processed,
@@ -1536,7 +1549,7 @@ error:
if (job->flags & (FLAG_DRYRUN|FLAG_UPGRADEDNFORMAT_V1)) {
if (0 == ret) {
- import_log_notice(job, "%s complete. %s is up-to-date.",
+ import_log_notice(job, SLAPI_LOG_INFO, "import_main_offline", "%s complete. %s is up-to-date.",
opstr, job->inst->inst_name);
ret = 0;
if (job->task) {
@@ -1544,23 +1557,25 @@ error:
}
import_all_done(job, ret);
} else if (NEED_DN_NORM_BT == ret) {
- import_log_notice(job, "%s complete. %s needs upgradednformat all.",
- opstr, job->inst->inst_name);
+ import_log_notice(job, SLAPI_LOG_NOTICE, "import_main_offline",
+ "%s complete. %s needs upgradednformat all.",
+ opstr, job->inst->inst_name);
if (job->task) {
slapi_task_dec_refcount(job->task);
}
import_all_done(job, ret);
ret = 1;
} else if (NEED_DN_NORM == ret) {
- import_log_notice(job, "%s complete. %s needs upgradednformat.",
- opstr, job->inst->inst_name);
+ import_log_notice(job, SLAPI_LOG_NOTICE, "import_main_offline",
+ "%s complete. %s needs upgradednformat.",
+ opstr, job->inst->inst_name);
if (job->task) {
slapi_task_dec_refcount(job->task);
}
import_all_done(job, ret);
ret = 2;
} else if (NEED_DN_NORM_SP == ret) {
- import_log_notice(job,
+ import_log_notice(job, SLAPI_LOG_NOTICE, "import_main_offline",
"%s complete. %s needs upgradednformat spaces.",
opstr, job->inst->inst_name);
if (job->task) {
@@ -1575,7 +1590,7 @@ error:
}
}
} else if (0 != ret) {
- import_log_notice(job, "%s failed.", opstr);
+ import_log_notice(job, SLAPI_LOG_ERR, "import_main_offline", "%s failed.", opstr);
if (job->task != NULL) {
slapi_task_finish(job->task, ret);
}
@@ -1621,7 +1636,7 @@ int ldbm_back_ldif2ldbm_deluxe(Slapi_PBlock *pb)
slapi_pblock_get(pb, SLAPI_BACKEND, &be);
if (be == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_back_ldif2ldbm_deluxe: backend is not set\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "ldbm_back_ldif2ldbm_deluxe - Backend is not set\n");
return -1;
}
job = CALLOC(ImportJob);
@@ -1673,7 +1688,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, LOG_ERR,
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "ldbm_back_ldif2ldbm_deluxe - "
"DN to RDN option is specified, "
"but %s is not enabled\n",
CONFIG_ENTRYRDN_SWITCH);
@@ -1734,7 +1749,7 @@ int ldbm_back_ldif2ldbm_deluxe(Slapi_PBlock *pb)
SLAPD_DEFAULT_THREAD_STACKSIZE);
if (thread == NULL) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "unable to spawn import thread, "
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldif2ldbm_deluxe - 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/import.h b/ldap/servers/slapd/back-ldbm/import.h
index 6ff8828..3ef4d80 100644
--- a/ldap/servers/slapd/back-ldbm/import.h
+++ b/ldap/servers/slapd/back-ldbm/import.h
@@ -200,13 +200,7 @@ struct _import_worker_info {
int import_fifo_validate_capacity_or_expand(ImportJob *job, size_t entrysize);
FifoItem *import_fifo_fetch(ImportJob *job, ID id, int worker);
void import_free_job(ImportJob *job);
-void import_log_notice(ImportJob *job, char *format, ...)
-#ifdef __GNUC__
- __attribute__ ((format (printf, 2, 3)));
-#else
- ;
-#endif
-
+void import_log_notice(ImportJob *job, int log_level, char *subsystem, char *format, ...);
void import_abort_all(ImportJob *job, int wait_for_them);
int import_entry_belongs_here(Slapi_Entry *e, backend *be);
int import_make_merge_filenames(char *directory, char *indexname, int pass,
diff --git a/ldap/servers/slapd/back-ldbm/index.c b/ldap/servers/slapd/back-ldbm/index.c
index 3af04f2..962db07 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, LOG_DEBUG, "=> index_%s_entry( \"%s\", %lu )\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= index_%s_entry%s %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= index_%s_entry%s %d\n",
(flags & BE_INDEX_ADD) ? "add" : "del",
(flags & BE_INDEX_TOMBSTONE) ? " (tombstone)" : "", result );
return( result );
@@ -900,10 +900,10 @@ index_read_ext_allids(
if (unindexed != NULL) *unindexed = 0;
prefix = index_index2prefix( indextype );
if (prefix == NULL) {
- LDAPDebug0Args( LDAP_DEBUG_ANY, LOG_DEBUG, "index_read_ext: NULL prefix\n" );
+ LDAPDebug0Args(LDAP_DEBUG_ANY, "index_read_ext: NULL prefix\n" );
return NULL;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> index_read( \"%s\" %s \"%s\" )\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, " indextype: \"%s\" indexmask: 0x%x\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, " 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, LOG_DEBUG, "<= index_read %lu candidates "
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= index_read %lu candidates "
"(allids - not indexed)\n", (u_long)IDL_NIDS(idl), 0, 0 );
index_free_prefix( prefix );
slapi_ch_free_string( &basetmp );
@@ -971,9 +971,9 @@ index_read_ext_allids(
(allidslimit == 0)) {
idl = idl_allids( be );
if (unindexed != NULL) *unindexed = 1;
- LDAPDebug1Arg( LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "<= index_read %lu candidates "
+ LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM, "<= 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 "
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, "<= 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"<= index_read NULL (index file open for attr %s)\n",
basetype, 0, 0 );
index_free_prefix (prefix);
@@ -997,8 +997,8 @@ 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, LOG_ERR,
- "index_read failed to encrypt index key for %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "index_read_ext_allids - Failed to encrypt index key for %s\n",
basetype, 0, 0 );
}
if (encrypted_val) {
@@ -1054,7 +1054,7 @@ index_read_ext_allids(
ber_bvfree(encrypted_val);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= index_read %lu candidates\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_ERR, "index_range_read: NULL pblock\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "index_range_read_ext - NULL pblock\n",
0, 0, 0);
return NULL;
}
@@ -1244,7 +1244,7 @@ index_range_read_ext(
prefix = index_index2prefix( indextype );
if (prefix == NULL) {
- LDAPDebug0Args( LDAP_DEBUG_ANY, LOG_ERR, "index_range_read: NULL prefix\n" );
+ LDAPDebug0Args(LDAP_DEBUG_ANY, "index_range_read_ext - NULL prefix\n" );
return( NULL );
}
@@ -1276,7 +1276,7 @@ index_range_read_ext(
}
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "index_range_read lookthrough_limit=%d\n",
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "index_range_read_ext - lookthrough_limit=%d\n",
lookthrough_limit);
switch( coreop ) {
@@ -1286,8 +1286,8 @@ index_range_read_ext(
case SLAPI_OP_GREATER:
break;
default:
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "<= index_range_read(%s,%s) NULL (operator %i)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "index_range_read_ext - (%s,%s) NULL (operator %i)\n",
type, prefix, coreop );
index_free_prefix(prefix);
return( NULL );
@@ -1297,19 +1297,19 @@ index_range_read_ext(
index_free_prefix(prefix);
return NULL;
}
- LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " indextype: \"%s\" indexmask: 0x%x\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, "index_range_read_ext - 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, LOG_DEBUG,
- "<= index_range_read(%s,%s) %lu candidates (allids)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE,
+ "index_range_read_ext - (%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, LOG_ERR,
- "<= index_range_read(%s,%s) NULL (could not open index file)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "index_range_read_ext - (%s,%s) NULL (could not open index file)\n",
type, prefix, 0 );
index_free_prefix(prefix);
return( NULL ); /* why not allids? */
@@ -1321,8 +1321,8 @@ index_range_read_ext(
*err = db->cursor(db,db_txn,&dbc,0);
if (0 != *err ) {
ldbm_nasty(errmsg, 1060, *err);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "<= index_range_read(%s,%s) NULL: db->cursor() == %i\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "index_range_read_ext - (%s,%s) NULL: db->cursor() == %i\n",
type, prefix, *err );
dblayer_release_index_file( be, ai, db );
index_free_prefix(prefix);
@@ -1379,8 +1379,8 @@ index_range_read_ext(
goto error;
} else {
ldbm_nasty(errmsg, 1070, *err);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "index_range_read(%s,%s) seek to end of index file err %i\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "index_range_read_ext - (%s,%s) seek to end of index file err %i\n",
type, prefix, *err );
}
} else if (DBTcmp (&upperkey, &cur_key, ai->ai_key_cmp_fn) > 0) {
@@ -1411,9 +1411,9 @@ index_range_read_ext(
}
/* if (LDAP_DEBUG_FILTER) {
char encbuf [BUFSIZ];
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " lowerkey=%s(%li bytes)\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, " lowerkey=%s(%li bytes)\n",
encoded (&lowerkey, encbuf), (long)lowerkey.dsize, 0 );
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " upperkey=%s(%li bytes)\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, " upperkey=%s(%li bytes)\n",
encoded (&upperkey, encbuf), (long)upperkey.dsize, 0 );
} */
data.flags = DB_DBT_MALLOC;
@@ -1437,8 +1437,8 @@ index_range_read_ext(
} else {
idl = idl_allids( be );
ldbm_nasty(errmsg, 1080, *err);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "<= index_range_read(%s,%s) allids (seek to lower key in index file err %i)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "index_range_read_ext - (%s,%s) allids (seek to lower key in index file err %i)\n",
type, prefix, *err );
}
dbc->c_close(dbc);
@@ -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, LOG_ERR, "<= index_range_read(%s,%s) op==GREATER, no next key: %i)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "index_range_read_ext - (%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, LOG_DEBUG, " cur_key=%s(%li bytes)\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, " cur_key=%s(%li bytes)\n",
encoded (&cur_key, encbuf), (long)cur_key.dsize, 0 );
*/
/* lookthrough limit and size limit check */
@@ -1490,14 +1490,14 @@ index_range_read_ext(
(idl->b_nids > (ID)lookthrough_limit)) {
idl_free(&idl);
idl = idl_allids( be );
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
- "index_range_read lookthrough_limit exceeded\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE,
+ "index_range_read_ext - lookthrough_limit exceeded\n");
*err = LDAP_ADMINLIMIT_EXCEEDED;
break;
}
if ((sizelimit > 0) && (idl->b_nids > (ID)sizelimit)) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
- "index_range_read sizelimit exceeded\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE,
+ "index_range_read_ext - sizelimit exceeded\n");
*err = LDAP_SIZELIMIT_EXCEEDED;
break;
}
@@ -1506,8 +1506,8 @@ index_range_read_ext(
if (timelimit != -1) {
curtime = current_time();
if (curtime >= stoptime) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
- "index_range_read timelimit exceeded\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE,
+ "index_range_read_ext - timelimit exceeded\n");
*err = LDAP_TIMELIMIT_EXCEEDED;
break;
}
@@ -1520,8 +1520,8 @@ index_range_read_ext(
idl_free(&idl);
idl = NULL;
}
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
- "index_range_read - operation abandoned\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE,
+ "index_range_read_ext - Operation abandoned\n");
break; /* clean up happens outside the while() loop */
}
@@ -1534,7 +1534,7 @@ index_range_read_ext(
*err = NEW_IDL_DEFAULT;
tmp = idl_fetch_ext(be, db, &cur_key, NULL, ai, err, allidslimit);
if(*err == DB_LOCK_DEADLOCK) {
- ldbm_nasty("index_range_read retrying transaction", 1090, *err);
+ ldbm_nasty("index_range_read_ext - retrying transaction", 1090, *err);
#ifdef FIX_TXN_DEADLOCKS
#error if txn != NULL, have to abort and retry the transaction, not just the fetch
#endif
@@ -1544,13 +1544,13 @@ index_range_read_ext(
}
}
if(retry_count == IDL_FETCH_RETRY_COUNT) {
- ldbm_nasty("index_range_read retry count exceeded",1095,*err);
+ ldbm_nasty("index_range_read_ext - retry count exceeded",1095,*err);
}
if (!tmp) {
if (slapi_is_loglevel_set(LDAP_DEBUG_TRACE)) {
char encbuf[BUFSIZ];
- LDAPDebug2Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
- "index_range_read_ext: cur_key=%s(%li bytes) was deleted - skipping\n",
+ LDAPDebug2Args(LDAP_DEBUG_TRACE,
+ "index_range_read_ext - cur_key=%s(%li bytes) was deleted - skipping\n",
encoded(&cur_key, encbuf), (long)cur_key.dsize);
}
} else {
@@ -1565,15 +1565,15 @@ index_range_read_ext(
id != NOID; id = idl_nextid(tmp, id)) {
*err = idl_append_extend(&idl, id);
if (*err) {
- ldbm_nasty("index_range_read - failed to generate idlist",
+ ldbm_nasty("index_range_read_ext - Failed to generate idlist",
1097, *err);
}
}
idl_free(&tmp);
}
if (ALLIDS(idl)) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
- "index_range_read hit an allids value\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE,
+ "index_range_read_ext - Hit an allids value\n");
break;
}
}
@@ -1597,23 +1597,23 @@ index_range_read_ext(
}
}
if (*err) {
- LDAPDebug1Arg(LDAP_DEBUG_FILTER, LOG_DEBUG,
- " dbc->c_get(...DB_NEXT) == %i\n", *err);
+ LDAPDebug1Arg(LDAP_DEBUG_FILTER,
+ "index_range_read_ext - 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, LOG_DEBUG, " idl=ALLIDS\n");
+ LDAPDebug0Args(LDAP_DEBUG_FILTER, "index_range_read_ext - idl=ALLIDS\n");
} else {
- LDAPDebug1Arg(LDAP_DEBUG_FILTER, LOG_DEBUG,
- " idl->b_nids=%d\n", idl->b_nids);
- LDAPDebug1Arg(LDAP_DEBUG_FILTER, LOG_DEBUG,
- " idl->b_nmax=%d\n", idl->b_nmax);
+ LDAPDebug1Arg(LDAP_DEBUG_FILTER,
+ "index_range_read_ext - idl->b_nids=%d\n", idl->b_nids);
+ LDAPDebug1Arg(LDAP_DEBUG_FILTER,
+ "index_range_read_ext - idl->b_nmax=%d\n", idl->b_nmax);
for (i = 0; i < idl->b_nids; i++) {
- LDAPDebug2Args(LDAP_DEBUG_FILTER, LOG_DEBUG,
- " idl->b_ids[%d]=%d\n", i, idl->b_ids[i]);
+ LDAPDebug2Args(LDAP_DEBUG_FILTER,
+ "index_range_read_ext - idl->b_ids[%d]=%d\n", i, idl->b_ids[i]);
}
}
}
@@ -1624,7 +1624,7 @@ error:
DBT_FREE_PAYLOAD(upperkey);
dblayer_release_index_file( be, ai, db );
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= index_range_read(%s,%s) %lu candidates\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "index_range_read_ext - (%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, LOG_DEBUG, "=> %s_values\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "addordel_values - %s_values\n",
(flags & BE_INDEX_ADD) ? "add" : "del", 0, 0);
prefix = index_index2prefix( indextype );
if (prefix == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "<= %s_values: NULL prefix\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "addordel_values - %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, LOG_DEBUG, "<= %s_values %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "addordel_values - %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, LOG_DEBUG, " %s_value(\"%s\")\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "addordel_values - %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, LOG_DEBUG, "<= %s_values %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "addordel_values - %s_values %d\n",
(flags & BE_INDEX_ADD) ? "add" : "del", rc, 0 );
return( rc );
}
@@ -1820,12 +1820,12 @@ addordel_values_sv(
const struct berval *bvp;
struct berval *encrypted_bvp = NULL;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> %s_values\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "addordel_values_sv - %s_values\n",
(flags & BE_INDEX_ADD) ? "add" : "del", 0, 0);
prefix = index_index2prefix( indextype );
if (prefix == NULL) {
- LDAPDebug0Args( LDAP_DEBUG_ANY, LOG_ERR, "addordel_values_sv: NULL prefix\n" );
+ LDAPDebug0Args(LDAP_DEBUG_ANY, "addordel_values_sv - NULL prefix\n" );
return( -1 );
}
@@ -1856,7 +1856,7 @@ addordel_values_sv(
slapi_ch_free( (void**)&key.dptr );
}
index_free_prefix (prefix);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= %s_values %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "addordel_values_sv - %s_values %d\n",
(flags & BE_INDEX_ADD) ? "add" : "del", rc, 0 );
return( rc );
}
@@ -1872,7 +1872,8 @@ addordel_values_sv(
rc = attrcrypt_encrypt_index_key(be,a,bvp,&encrypted_bvp);
if (rc)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to encrypt index key for %s\n", a->ai_type ,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "addordel_values_sv - Failed to encrypt index key for %s\n",
+ a->ai_type ,0,0);
} else {
bvp = encrypted_bvp;
}
@@ -1912,7 +1913,7 @@ addordel_values_sv(
{
char encbuf[BUFSIZ];
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, " %s_value(\"%s\")\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "addordel_values_sv - %s_value(\"%s\")\n",
(flags & BE_INDEX_ADD) ? "add" : "del",
encoded (&key, encbuf), 0);
}
@@ -1956,7 +1957,7 @@ addordel_values_sv(
{
ldbm_nasty(errmsg, 1140, rc);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= %s_values %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "addordel_values_sv - %s_values %d\n",
(flags & BE_INDEX_ADD) ? "add" : "del", rc, 0 );
return( rc );
}
@@ -2012,8 +2013,8 @@ index_addordel_values_ext_sv(
char buf[SLAPD_TYPICAL_ATTRIBUTE_NAME_MAX_LENGTH];
char *basetmp, *basetype;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
- "=> index_addordel_values_ext_sv( \"%s\", %lu )\n", type, (u_long)id, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE,
+ "index_addordel_values_ext_sv - ( \"%s\", %lu )\n", type, (u_long)id, 0 );
basetype = buf;
if ( (basetmp = slapi_attr_basetype( type, buf, sizeof(buf) ))
@@ -2027,11 +2028,11 @@ index_addordel_values_ext_sv(
slapi_ch_free_string( &basetmp );
return( 0 );
}
- LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " index_addordel_values_ext_sv indexmask 0x%x\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, "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, LOG_ERR,
- "<= index_read NULL (could not open index attr %s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "index_addordel_values_ext_sv - index_read NULL (could not open index attr %s)\n",
basetype, 0, 0 );
slapi_ch_free_string( &basetmp );
if ( err != 0 ) {
@@ -2183,7 +2184,7 @@ index_addordel_values_ext_sv(
slapi_ch_free( (void**)&basetmp );
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= index_addordel_values_ext_sv\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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 c2f462a..c40e108 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, LOG_DEBUG, "=> ldbm_back_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_ERR, "ldbm_back_init: dblayer_init failed\n",0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_CRIT, "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, LOG_ERR, "ldbm_back_init: "
+ LDAPDebug(LDAP_DEBUG_CRIT, "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, LOG_ERR, "ldbm_back_init: PR_NewLock failed\n",
+ LDAPDebug(LDAP_DEBUG_CRIT, "ldbm_back_init - PR_NewLock failed\n",
0, 0, 0 );
goto fail;
}
if ((li->li_shutdown_mutex = PR_NewLock()) == NULL ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_back_init: PR_NewLock failed\n",
+ LDAPDebug(LDAP_DEBUG_CRIT, "ldbm_back_init - PR_NewLock failed\n",
0, 0, 0 );
goto fail;
}
if ((li->li_config_mutex = PR_NewLock()) == NULL ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_back_init: PR_NewLock failed\n",
+ LDAPDebug(LDAP_DEBUG_CRIT, "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, LOG_ERR, "ldbm_back_init: PR_NewCondVar failed\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_CRIT, "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, LOG_ERR, "ldbm_back_init failed\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_CRIT, "ldbm_back_init - Failed %d\n", rc, 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, LOG_ERR, "ldbm_back_init: failed to publish IDL interface\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_CRIT, "ldbm_back_init - Failed to publish IDL interface\n", 0, 0, 0);
goto fail;
}
interface_published = 1;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ldbm_back_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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 fcce4ed..1504641 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, LOG_ERR, "ldbm_instance_create: cache_init failed\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_instance_create - cache_init failed\n",
0, 0, 0);
rc = -1;
goto error;
@@ -50,8 +50,8 @@ 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, LOG_ERR,
- "ldbm_instance_create: dn cache_init failed\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "ldbm_instance_create - dn cache_init failed\n");
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, LOG_ERR, "ldbm_instance_create: PR_NewLock failed\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "ldbm_instance_create: PR_NewMonitor failed\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "ldbm_instance_create: PR_NewLock failed\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "ldbm_instance_create: PR_NewLock failed\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "ldbm_instance_create: PR_NewCondVar failed\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"ldbm_instance_start: warning - backend is in a wrong state - %d\n",
be->be_state, 0, 0 );
PR_Unlock (be->be_state_lock);
@@ -280,8 +280,8 @@ ldbm_instance_stop(backend *be)
PR_Lock (be->be_state_lock);
if (be->be_state != BE_STATE_STARTED) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm_back_close: warning - backend %s is in the wrong state - %d\n",
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "ldbm_instance_stop - Backend %s is in the wrong state - %d\n",
inst ? inst->inst_name : "", be->be_state, 0 );
PR_Unlock (be->be_state_lock);
return 0;
@@ -392,7 +392,7 @@ ldbm_instance_destructor(void **arg)
{
ldbm_instance *inst = (ldbm_instance *) *arg;
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Destructor for instance %s called\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_instance_destructor - 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 9eeefec..6013f54 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_add.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_add.c
@@ -117,9 +117,9 @@ ldbm_back_add( Slapi_PBlock *pb )
if (inst && inst->inst_ref_count) {
slapi_counter_increment(inst->inst_ref_count);
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm_add: instance \"%s\" does not exist.\n",
- inst ? inst->inst_name : "null instance");
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "ldbm_back_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, LOG_DEBUG, "ldbm_add: cache_remove %s failed.\n",
+ LDAPDebug1Arg(LDAP_DEBUG_CACHE, "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, LOG_DEBUG, "cache_add_tentative concurrency detected: %s\n",
+ LDAPDebug1Arg(LDAP_DEBUG_CACHE, "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, LOG_DEBUG, "Add Retrying Transaction\n");
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, "Add Retrying Transaction\n");
#ifndef LDBM_NO_BACKOFF_DELAY
{
PRIntervalTime interval;
@@ -272,8 +272,8 @@ ldbm_back_add( Slapi_PBlock *pb )
slapi_pblock_get( pb, SLAPI_ADD_TARGET_SDN, &sdn );
if (NULL == sdn)
{
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm_back_add: Null target dn\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "ldbm_back_add - "
+ "Null target dn\n");
goto error_return;
}
@@ -333,8 +333,8 @@ ldbm_back_add( Slapi_PBlock *pb )
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
}
if (!ldap_result_code) {
- 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");
+ LDAPDebug0Args(LDAP_DEBUG_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;
}
slapi_pblock_get(pb, SLAPI_PLUGIN_OPRETURN, &opreturn);
@@ -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, LOG_DEBUG, "find_entry2modify_only returned NULL parententry pdn: %s, uniqueid: %s\n",
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, "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, LOG_DEBUG, "entry failed schema check\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "entry failed syntax check\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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;
@@ -525,7 +525,8 @@ ldbm_back_add( Slapi_PBlock *pb )
* magic objectclass.
*/
if (NULL == sdn) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "ldbm_back_add: Null target dn\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "ldbm_back_add - "
+ "Null target dn\n");
ldap_result_code = LDAP_OPERATIONS_ERROR;
goto error_return;
}
@@ -541,7 +542,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, LOG_DEBUG, "Resurrection of %s - Couldn't remove %s\n", dn, SLAPI_ATTR_NSCP_ENTRYDN, 0);
+ LDAPDebug(LDAP_DEBUG_REPL, "Resurrection of %s - Couldn't remove %s\n", dn, SLAPI_ATTR_NSCP_ENTRYDN, 0);
}
/* And copy the reason from e */
@@ -549,7 +550,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, LOG_DEBUG, "Resurrection of %s - Added Conflict reason %s\n", dn, reason, 0);
+ LDAPDebug(LDAP_DEBUG_REPL, "Resurrection of %s - Added Conflict reason %s\n", dn, reason, 0);
}
slapi_ch_free((void **)&reason);
}
@@ -602,8 +603,8 @@ ldbm_back_add( Slapi_PBlock *pb )
*/
addingentry = backentry_init( e );
if ( ( addingentry->ep_id = next_id( be ) ) >= MAXID ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "add: maximum ID reached, cannot add entry to "
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_add - "
+ "Maximum ID reached, cannot add entry to "
"backend '%s'", be->be_name, 0, 0 );
ldap_result_code = LDAP_OPERATIONS_ERROR;
goto error_return;
@@ -656,7 +657,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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"ldbm_back_add (tombstone_operation): failed to "
"decompose %s to Slapi_RDN\n", tombstoned_dn);
} else {
@@ -718,7 +719,7 @@ ldbm_back_add( Slapi_PBlock *pb )
Slapi_DN ancestorsdn;
struct backentry *ancestorentry;
- LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "ldbm_add: Parent \"%s\" does not exist. "
+ LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM, "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 +735,7 @@ ldbm_back_add( Slapi_PBlock *pb )
ACLPLUGIN_ACCESS_DEFAULT, &errbuf);
if ( ldap_result_code != LDAP_SUCCESS )
{
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "no access to parent, pdn = %s\n",
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "no access to parent, pdn = %s\n",
slapi_sdn_get_dn(&parentsdn));
ldap_result_message= errbuf;
goto error_return;
@@ -748,7 +749,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, LOG_DEBUG, "ldbm_add: adjusting dn: %s --> %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_BACKLDBM, "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 +761,7 @@ ldbm_back_add( Slapi_PBlock *pb )
else
{ /* no parent */
if (!isroot && !is_replicated_operation) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "no parent & not root\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "no parent & not root\n");
ldap_result_code= LDAP_INSUFFICIENT_ACCESS;
goto error_return;
}
@@ -789,7 +790,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, LOG_DEBUG, "cache_add_tentative concurrency detected: %s\n",
+ LDAPDebug1Arg(LDAP_DEBUG_CACHE, "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 +802,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, LOG_DEBUG, "ACL syntax error: %s\n",
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "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 +816,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, LOG_DEBUG, "ldbm_back_add",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "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, LOG_DEBUG, "parent_update_on_childchange: %s, rc=%d\n",
+ LDAPDebug2Args(LDAP_DEBUG_BACKLDBM, "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 +844,7 @@ ldbm_back_add( Slapi_PBlock *pb )
not_an_error = 1;
rc = retval = LDAP_SUCCESS;
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "SLAPI_PLUGIN_BE_TXN_PRE_ADD_FN plugin "
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "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 +858,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, LOG_DEBUG, "SLAPI_PLUGIN_BE_TXN_PRE_ADD_FN plugin failed: %d\n",
+ LDAPDebug1Arg(LDAP_DEBUG_DEBUG, "SLAPI_PLUGIN_BE_TXN_PRE_ADD_FN plugin failed: %d\n",
ldap_result_code ? ldap_result_code : retval);
goto error_return;
}
@@ -865,12 +866,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, LOG_DEBUG, "add 1 DEADLOCK\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, "add 1 DEADLOCK\n", 0, 0, 0 );
/* Retry txn */
continue;
}
if (retval) {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "id2entry_add(%s) failed, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "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 +888,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, LOG_DEBUG, "add 2 DB_LOCK_DEADLOCK\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, "add 2 DB_LOCK_DEADLOCK\n", 0, 0, 0 );
/* Retry txn */
continue;
}
if (retval) {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "index_addordel_string TOMBSTONE (%s), err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "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 +910,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, LOG_DEBUG, "add 3 DB_LOCK_DEADLOCK\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, "add 3 DB_LOCK_DEADLOCK\n", 0, 0, 0 );
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "index_addordel_string TOMBSTONE csn(%s), err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "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 +929,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, LOG_DEBUG, "add 4 DB_LOCK_DEADLOCK\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, "add 4 DB_LOCK_DEADLOCK\n", 0, 0, 0 );
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "index_addordel_string UNIQUEID (%s), err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "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 +950,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, LOG_DEBUG, "add 5 DB_LOCK_DEADLOCK\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, "add 5 DB_LOCK_DEADLOCK\n", 0, 0, 0 );
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "index_addordel_string ENTRYDN (%s), err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "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,9 +970,10 @@ ldbm_back_add( Slapi_PBlock *pb )
if (tombstoneentry) {
retval = entryrdn_index_entry(be, tombstoneentry, BE_INDEX_DEL, &txn);
if (retval) {
- 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 : "");
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_add - "
+ "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,13 +989,15 @@ ldbm_back_add( Slapi_PBlock *pb )
}
if (DB_LOCK_DEADLOCK == retval)
{
- LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "add 5 DEADLOCK\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, "ldbm_back_add - "
+ "add 5 DEADLOCK\n", 0, 0, 0 );
/* retry txn */
continue;
}
if (retval) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_DEBUG, "add: attempt to index %lu failed; rc=%d\n",
- (u_long)addingentry->ep_id, retval);
+ LDAPDebug2Args(LDAP_DEBUG_DEBUG, "ldbm_back_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)) {
disk_full = 1;
@@ -1004,18 +1008,19 @@ 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, LOG_DEBUG, "ldbm_back_add",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "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)
{
- LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "add 6 DEADLOCK\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, "add 6 DEADLOCK\n", 0, 0, 0 );
/* Retry txn */
continue;
}
if (retval) {
- 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);
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, "ldbm_back_add - "
+ "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)) {
disk_full = 1;
@@ -1031,13 +1036,13 @@ 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_ARGS,
"add DEADLOCK vlv_update_index\n", 0, 0, 0 );
/* Retry txn */
continue;
}
if (retval) {
- LDAPDebug2Args(LDAP_DEBUG_TRACE, LOG_DEBUG,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE, "ldbm_back_add - "
"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);
@@ -1052,8 +1057,8 @@ 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, LOG_ERR,
- "ldbm_back_add: ldbm_txn_ruv_modify_context "
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_add - "
+ "ldbm_txn_ruv_modify_context "
"failed to construct RUV modify context\n",
0, 0, 0);
ldap_result_code= LDAP_OPERATIONS_ERROR;
@@ -1069,7 +1074,7 @@ ldbm_back_add( Slapi_PBlock *pb )
continue;
}
if (0 != retval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_add - "
"modify_update_all failed, err=%d %s\n", retval,
(msg = dblayer_strerror( retval )) ? msg : "", 0 );
if (LDBM_OS_ERR_IS_DISKFULL(retval))
@@ -1085,7 +1090,8 @@ ldbm_back_add( Slapi_PBlock *pb )
}
if (retry_count == RETRY_TIMES) {
/* Failed */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Retry count exceeded in add\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_add - "
+ "Retry count exceeded in add\n", 0, 0, 0 );
ldap_result_code= LDAP_BUSY;
goto error_return;
}
@@ -1105,8 +1111,9 @@ 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, LOG_DEBUG, "ldap_add: cache_replace concurrency detected: %s (rc: %d)\n",
- slapi_entry_get_dn_const(addingentry->ep_entry), retval);
+ LDAPDebug2Args(LDAP_DEBUG_CACHE, "ldbm_back_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 +1136,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, LOG_DEBUG, "ldbm_back_add",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "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,8 +1147,8 @@ 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, LOG_ERR,
- "ldbm_back_add: modify_switch_entries failed\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "ldbm_back_add - "
+ "modify_switch_entries failed\n");
goto error_return;
}
}
@@ -1149,8 +1156,9 @@ 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, LOG_DEBUG, "SLAPI_PLUGIN_BE_TXN_POST_ADD_FN plugin "
- "returned error code %d\n", retval );
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "ldbm_back_add - "
+ "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 +1211,7 @@ error_return:
* be written to disk.
*/
myrc = modify_unswitch_entries(&parent_modify_c, be);
- slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_add",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "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,8 +1252,9 @@ 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, LOG_DEBUG, "SLAPI_PLUGIN_BE_TXN_POST_ADD_FN plugin "
- "returned error code %d\n", retval );
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "ldbm_back_add - "
+ "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 +1328,7 @@ common_return:
if (bdn) {
CACHE_ADD( &inst->inst_dncache, bdn, NULL );
CACHE_RETURN(&inst->inst_dncache, &bdn);
- slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG, "ldbm_back_add",
+ slapi_log_error(SLAPI_LOG_CACHE, "ldbm_back_add",
"set %s to dn cache\n", dn);
}
}
@@ -1341,7 +1350,7 @@ common_return:
if (ruv_c_init) {
modify_term(&ruv_c, be);
}
- slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_add",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "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 2b192d2..c748604 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, LOG_ERR, "attr_index_config: Missing indexing arguments\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "attr_index_config - Missing indexing arguments\n", 0, 0, 0);
return -1;
}
@@ -701,13 +701,13 @@ 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, LOG_ERR,
- "%s: line %d: index type \"none\" cannot be combined with other types\n",
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "attr_index_config - %s: line %d: index type \"none\" cannot be combined with other types\n",
fname, lineno, 0);
}
a->ai_indexmask = INDEX_OFFLINE; /* note that the index isn't available */
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "attr_index_config",
+ slapi_log_error(SLAPI_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));
@@ -717,7 +717,7 @@ attr_index_config(
}
if(hasIndexType == 0){
/* indexType missing, error out */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "attr_index_config: Missing index type\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "attr_index_config - Missing index type\n", 0, 0, 0);
attrinfo_delete(&a);
return -1;
}
@@ -841,14 +841,15 @@ 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, LOG_ERR, "%s: use \"%s\" instead of \"%s\" (ignored)\n",
- preamble, officialOID, attrValue->bv_val);
+ LDAPDebug(LDAP_DEBUG_WARNING, "attr_index_config - "
+ "%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, LOG_ERR, "%s: line %d: "
- "unknown or invalid matching rule \"%s\" in index configuration (ignored)\n",
- fname, lineno, attrValue->bv_val);
+ LDAPDebug(LDAP_DEBUG_WARNING, "attr_index_config - %s: line %d: "
+ "unknown or invalid matching rule \"%s\" in index configuration (ignored)\n",
+ fname, lineno, attrValue->bv_val);
}
{ /*
@@ -876,7 +877,7 @@ attr_index_config(
}
if ((return_value = attr_index_idlistsize_config(e, a, myreturntext))) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"attr_index_config: %s: Failed to parse idscanlimit info: %d:%s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,"attr_index_config - %s: Failed to parse idscanlimit info: %d:%s\n",
fname, return_value, myreturntext);
}
@@ -884,8 +885,9 @@ attr_index_config(
return_value = idl_init_private(be, a);
if (0 != return_value) {
/* fatal error, exit */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"%s: line %d:Fatal Error: Failed to initialize attribute structure\n",
- fname, lineno, 0);
+ LDAPDebug(LDAP_DEBUG_CRIT,"attr_index_config - "
+ "%s: line %d:Fatal Error: Failed to initialize attribute structure\n",
+ fname, lineno, 0);
exit( 1 );
}
@@ -898,9 +900,9 @@ 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, LOG_ERR,
- "The attribute [%s] does not have a valid ORDERING matching rule - error %d:s\n",
- a->ai_type, rc, ldap_err2string(rc));
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "attr_index_config - 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 0dec545..393053f 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c
@@ -153,14 +153,13 @@ 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, LOG_DEBUG,"-> attrcrypt_keymgmt_get_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"-> 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, LOG_ERR,
- "attrcrypt_keymgmt_get_key: "
- "failed create attrcrypt key dn for plugin %s, "
+ LDAPDebug(LDAP_DEBUG_ERR, "attrcrypt_keymgmt_get_key - "
+ "Failed create attrcrypt key dn for plugin %s, "
"instance %s, cypher %s\n",
li->inst_li->li_plugin->plg_name,
li->inst_name, acs->ace->cipher_display_name);
@@ -171,7 +170,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, LOG_DEBUG,"<- attrcrypt_keymgmt_get_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_keymgmt_get_key\n", 0, 0, 0);
return ret;
}
@@ -181,7 +180,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, LOG_DEBUG,"-> attrcrypt_keymgmt_store_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"-> 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 +213,15 @@ 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, 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");
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG,"<- attrcrypt_keymgmt_store_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_keymgmt_store_key\n", 0, 0, 0);
return ret;
}
@@ -238,13 +239,15 @@ 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, LOG_DEBUG,"-> attrcrypt_wrap_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"-> 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, LOG_ERR,"attrcrypt_wrap_key: failed to wrap key for cipher %s\n", acs->ace->cipher_display_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,"attrcrypt_wrap_key - "
+ "Failed to wrap key for cipher %s\n",
+ acs->ace->cipher_display_name, 0, 0);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_wrap_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_wrap_key\n", 0, 0, 0);
return ret;
}
@@ -256,7 +259,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, LOG_DEBUG, ATTRCRYPT, "-> attrcrypt_unwrap_key\n");
+ slapi_log_error(SLAPI_LOG_TRACE, "attrcrypt_unwrap_key", "-> 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 +277,11 @@ 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, LOG_ERR, ATTRCRYPT,
- "attrcrypt_unwrap_key: "
- "failed to unwrap key for cipher %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "attrcrypt_unwrap_key",
+ "Failed to unwrap key for cipher %s\n",
acs->ace->cipher_display_name);
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT, "<- attrcrypt_unwrap_key\n");
+ slapi_log_error(SLAPI_LOG_TRACE, "attrcrypt_unwrap_key", "<- attrcrypt_unwrap_key\n");
return ret;
}
@@ -289,15 +291,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, LOG_DEBUG, ATTRCRYPT, "-> attrcrypt_generate_key\n");
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT, "-> attrcrypt_generate_key\n");
if (NULL == symmetric_key) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "NULL symmetric_key\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "attrcrypt_generate_key - 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, LOG_ERR, ATTRCRYPT, "%s is not supported.\n",
+ slapi_log_error(SLAPI_LOG_ERR, "attrcrypt_generate_key", "%s is not supported.\n",
acs->ace->cipher_display_name);
ret = -1;
goto bail;
@@ -323,7 +325,7 @@ attrcrypt_generate_key(attrcrypt_cipher_state *acs,PK11SymKey **symmetric_key)
ret = 0;
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
"<- attrcrypt_generate_key (%d)\n", ret);
return ret;
}
@@ -337,7 +339,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, LOG_DEBUG,"-> attrcrypt_fetch_public_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"-> 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,15 +350,16 @@ attrcrypt_fetch_public_key(SECKEYPublicKey **public_key)
cert = slapd_pk11_findCertFromNickname(cert_name, NULL);
if (cert == NULL) {
errorCode = PR_GetError();
- 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));
+ LDAPDebug(LDAP_DEBUG_ERR,"attrcrypt_fetch_public_key - Can't find certificate %s: %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, 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;
+ errorCode = PR_GetError();
+ LDAPDebug(LDAP_DEBUG_ERR,"attrcrypt_fetch_public_key - Can't get private key from cert %s: %d - %s\n", cert_name, errorCode, slapd_pr_strerror(errorCode));
+ ret = -1;
}
if (cert) {
slapd_pk11_CERT_DestroyCertificate(cert);
@@ -369,7 +372,7 @@ attrcrypt_fetch_public_key(SECKEYPublicKey **public_key)
if (cert_name != default_cert_name) {
slapi_ch_free_string(&cert_name);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_fetch_public_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_fetch_public_key\n", 0, 0, 0);
return ret;
}
@@ -382,7 +385,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, LOG_DEBUG,"-> attrcrypt_fetch_private_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"-> 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 +396,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, LOG_ERR,"Can't find certificate %s in attrcrypt_fetch_private_key: %d - %s\n", cert_name, errorCode, slapd_pr_strerror(errorCode));
+ LDAPDebug(LDAP_DEBUG_ERR,"attrcrypt_fetch_private_key - Can't find certificate %s: %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, 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));
+ LDAPDebug(LDAP_DEBUG_ERR,"attrcrypt_fetch_private_key - Can't get private key from cert %s: %d - %s\n", cert_name, errorCode, slapd_pr_strerror(errorCode));
ret = -1;
}
if (cert) {
@@ -414,7 +417,7 @@ attrcrypt_fetch_private_key(SECKEYPrivateKey **private_key)
if (cert_name != default_cert_name) {
slapi_ch_free_string(&cert_name);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_fetch_private_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_fetch_private_key\n", 0, 0, 0);
return ret;
}
@@ -429,36 +432,36 @@ attrcrypt_cipher_init(ldbm_instance *li, attrcrypt_cipher_entry *ace, SECKEYPriv
{
int ret = 0;
PK11SymKey *symmetric_key = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT, "-> attrcrypt_cipher_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, ATTRCRYPT,
- "Failed to create cipher lock in attrcrypt_cipher_init\n");
+ slapi_log_error(SLAPI_LOG_ERR, "attrcrypt_cipher_init",
+ "Failed to create cipher lock\n");
}
acs->slot = slapd_pk11_GetInternalKeySlot();
if (NULL == acs->slot) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
- "Failed to create a slot for cipher %s in attrcrypt_cipher_entry\n",
+ slapi_log_error(SLAPI_LOG_ERR, "attrcrypt_cipher_init",
+ "Failed to create a slot for cipher %s\n",
acs->cipher_display_name);
goto error;
}
/* 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, LOG_ERR, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_ERR, "attrcrypt_cipher_init",
"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, LOG_ERR, ATTRCRYPT, "Warning: "
+ slapi_log_error(SLAPI_LOG_WARNING, "attrcrypt_cipher_init",
"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, LOG_ERR, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_ERR, "attrcrypt_cipher_init",
"Cipher %s is not supported on the security device. "
"Do not configure attrcrypt with the cipher.\n",
ace->cipher_display_name);
@@ -467,32 +470,31 @@ 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, LOG_ERR, ATTRCRYPT,
- "Failed to store key for cipher %s in "
- "attrcrypt_cipher_init\n", acs->cipher_display_name);
+ slapi_log_error(SLAPI_LOG_ERR, "attrcrypt_cipher_init",
+ "Failed to store key for cipher %s\n", acs->cipher_display_name);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_INFO, "attrcrypt_cipher_init",
"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, LOG_ERR, ATTRCRYPT,
- "attrcrypt_cipher_init: symmetric key failed to unwrap "
+ slapi_log_error(SLAPI_LOG_ERR, "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, LOG_ERR, ATTRCRYPT,
- "Failed to retrieve key for cipher %s in attrcrypt_cipher_init "
- "(%d)\n", acs->cipher_display_name, ret);
+ slapi_log_error(SLAPI_LOG_ERR, "attrcrypt_cipher_init",
+ "Failed to retrieve key for cipher %s (%d)\n",
+ acs->cipher_display_name, ret);
}
if (symmetric_key) {
/* we loaded the symmetric key, store it in the acs */
acs->key = symmetric_key;
}
error:
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT, "<- attrcrypt_cipher_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT, "<- attrcrypt_cipher_init\n");
return ret;
}
@@ -510,7 +512,7 @@ attrcrypt_init(ldbm_instance *li)
attrcrypt_cipher_entry *ace = NULL;
SECKEYPrivateKey *private_key = NULL;
SECKEYPublicKey *public_key = NULL;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_init\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"-> 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
@@ -542,14 +544,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, LOG_DEBUG, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, "attrcrypt_init",
"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, LOG_ERR, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_ERR, "attrcrypt_init",
"All prepared ciphers are not available. "
"Please disable attribute encryption.\n");
}
@@ -561,10 +563,11 @@ attrcrypt_init(ldbm_instance *li)
private_key = NULL;
} else {
if (li->attrcrypt_configured) {
- 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_WARNING, "attrcrypt_init - "
+ "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, LOG_DEBUG,"<- attrcrypt_init : %d\n", ret, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_init : %d\n", ret, 0, 0);
return ret;
}
@@ -578,22 +581,22 @@ attrcrypt_init(ldbm_instance *li)
int attrcrypt_check_enable_cipher(attrcrypt_cipher_entry *ace)
{
int ret = 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);
+ LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_check_enable_cipher\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_check_enable_cipher\n", 0, 0, 0);
return ret;
}
int
attrcrypt_cleanup(attrcrypt_cipher_state *acs)
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_cleanup\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"-> 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, LOG_DEBUG,"<- attrcrypt_cleanup\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_cleanup\n", 0, 0, 0);
return 0;
}
@@ -604,11 +607,11 @@ attrcrypt_cleanup(attrcrypt_cipher_state *acs)
int
attrcrypt_cleanup_private(ldbm_instance *li)
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "-> attrcrypt_cleanup_private\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "-> 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, LOG_DEBUG, "<- attrcrypt_cleanup_private\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "<- attrcrypt_cleanup_private\n", 0, 0, 0);
return 0;
}
@@ -647,7 +650,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, LOG_ERR,format_string, print_buffer, length, 0);
+ LDAPDebug(LDAP_DEBUG_DEBUG, format_string, print_buffer, length, 0);
slapi_ch_free((void**)&print_buffer);
}
@@ -660,7 +663,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, LOG_DEBUG,"-> attrcrypt_crypto_op\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"-> 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 +671,14 @@ attrcrypt_crypto_op(attrcrypt_private *priv, backend *be, struct attrinfo *ai, c
}
#if defined(DEBUG_ATTRCRYPT)
if (encrypt) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"attrcrypt_crypto_op encrypt '%s' (%d)\n", in_data, in_size, 0);
+ LDAPDebug(LDAP_DEBUG_DEBUG,"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, LOG_DEBUG,"<- attrcrypt_crypto_op\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_crypto_op\n", 0, 0, 0);
return ret;
}
@@ -689,7 +692,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, LOG_DEBUG,"-> attrcrypt_crypto_op_value\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_crypto_op_value\n", 0, 0, 0);
bval = (struct berval *) slapi_value_get_berval(invalue);
in_data = bval->bv_val;
@@ -706,7 +709,7 @@ attrcrypt_crypto_op_value(attrcrypt_private *priv, backend *be, struct attrinfo
slapi_ch_free((void**)&out_data);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_crypto_op_value: %d\n", ret, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_crypto_op_value: %d\n", ret, 0, 0);
return ret;
}
@@ -720,7 +723,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, LOG_DEBUG,"-> attrcrypt_crypto_op_value_replace\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_crypto_op_value_replace\n", 0, 0, 0);
bval = (struct berval *) slapi_value_get_berval(inoutvalue);
in_data = bval->bv_val;
@@ -737,7 +740,7 @@ attrcrypt_crypto_op_value_replace(attrcrypt_private *priv, backend *be, struct a
slapi_ch_free((void**)&out_data);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_crypto_op_value_replace: %d\n", ret, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_crypto_op_value_replace: %d\n", ret, 0, 0);
return ret;
}
@@ -748,7 +751,7 @@ attrcrypt_crypto_op_values(attrcrypt_private *priv, backend *be, struct attrinf
int i = 0;
Slapi_Value **encrypted_values = NULL;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_crypto_op_values\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"-> 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 +765,7 @@ attrcrypt_crypto_op_values(attrcrypt_private *priv, backend *be, struct attrinf
}
}
*outvalues = encrypted_values;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_crypto_op_values: %d\n", ret, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_crypto_op_values: %d\n", ret, 0, 0);
return ret;
}
@@ -772,7 +775,7 @@ attrcrypt_crypto_op_values_replace(attrcrypt_private *priv, backend *be, struct
int ret = 0;
int i = 0;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_crypto_op_values_replace\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"-> 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 +783,7 @@ attrcrypt_crypto_op_values_replace(attrcrypt_private *priv, backend *be, struct
break;
}
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_crypto_op_values_replace\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_crypto_op_values_replace\n", 0, 0, 0);
return ret;
}
@@ -802,7 +805,7 @@ attrcrypt_decrypt_entry(backend *be, struct backentry *e)
return ret;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_decrypt_entry\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"-> 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 +823,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, LOG_ERR,"attrcrypt_decrypt_entry: FAILING because decryption operation failed\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,"attrcrypt_decrypt_entry - Decryption operation failed\n", 0, 0, 0);
return ret;
}
i = slapi_attr_next_value(attr,i,&value);
@@ -832,14 +835,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, LOG_ERR,"attrcrypt_decrypt_entry: FAILING because decryption operation failed\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,"attrcrypt_decrypt_entry - Decryption operation 2 failed\n", 0, 0, 0);
return ret;
}
i = attr_next_deleted_value(attr,i,&value);
}
}
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_decrypt_entry\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_decrypt_entry\n", 0, 0, 0);
return ret;
}
@@ -863,7 +866,7 @@ attrcrypt_encrypt_entry_inplace(backend *be, const struct backentry *inout)
return ret;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_encrypt_entry_inplace\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"-> 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 +885,7 @@ attrcrypt_encrypt_entry_inplace(backend *be, const struct backentry *inout)
}
}
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_encrypt_entry_inplace\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_encrypt_entry_inplace\n", 0, 0, 0);
return ret;
}
@@ -908,7 +911,7 @@ attrcrypt_encrypt_entry(backend *be, const struct backentry *in, struct backentr
return ret;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_encrypt_entry\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"-> 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 +935,8 @@ 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, LOG_ERR,"Error: attrcrypt_crypto_op_values failed in attrcrypt_encrypt_entry\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,"attrcrypt_encrypt_entry - Failed to encrypt value, error %d\n",
+ ret, 0, 0);
break;
}
/* DBDB does this call free the old value memory ? */
@@ -943,7 +947,7 @@ attrcrypt_encrypt_entry(backend *be, const struct backentry *in, struct backentr
}
}
*out = new_entry;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"<- attrcrypt_encrypt_entry\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_encrypt_entry\n", 0, 0, 0);
return ret;
}
@@ -968,7 +972,7 @@ attrcrypt_encrypt_index_key(backend *be, struct attrinfo *ai, const struct berva
}
if (ai->ai_attrcrypt) {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"-> attrcrypt_encrypt_index_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"-> 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 +985,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, LOG_DEBUG,"<- attrcrypt_encrypt_index_key\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_encrypt_index_key\n", 0, 0, 0);
}
return ret;
}
@@ -1008,13 +1012,13 @@ attrcrypt_decrypt_index_key(backend *be,
Slapi_Value *value = NULL;
rc = -1;
if (NULL == in || NULL == out) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "attrcrypt_decrypt_index_key: Empty %s\n",
+ LDAPDebug1Arg(LDAP_DEBUG_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, LOG_DEBUG, "-> attrcrypt_decrypt_index_key\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "-> 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 +1035,7 @@ attrcrypt_decrypt_index_key(backend *be,
}
}
bail:
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "<- attrcrypt_decrypt_index_key\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "<- attrcrypt_decrypt_index_key\n");
slapi_value_free(&value);
}
@@ -1053,7 +1057,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, LOG_DEBUG, ATTRCRYPT, "-> back_crypt_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT, "-> back_crypt_init\n");
/* Encryption is not specified */
if (!encAlgorithm || !handle) {
goto bail;
@@ -1084,8 +1088,8 @@ 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, LOG_ERR, ATTRCRYPT,
- "back_crypt_init: Failed to initialize cipher %s."
+ slapi_log_error(SLAPI_LOG_ERR, "back_crypt_init",
+ "Failed to initialize cipher %s."
"Please choose other cipher or disable changelog "
"encryption.\n",
ace->cipher_display_name);
@@ -1093,8 +1097,8 @@ 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, LOG_DEBUG, ATTRCRYPT,
- "back_crypt_init: Initialized cipher %s\n",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "back_crypt_init",
+ "Initialized cipher %s\n",
ace->cipher_display_name);
}
break;
@@ -1104,7 +1108,7 @@ back_crypt_init(Slapi_Backend *be, const char *dn,
SECKEY_DestroyPrivateKey(private_key);
private_key = NULL;
bail:
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
"<- back_crypt_init : %d\n", ret);
return ret;
}
@@ -1124,7 +1128,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, LOG_DEBUG, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
"-> back_crypt_encrypt_value\n");
if (NULL == out) {
goto bail;
@@ -1142,7 +1146,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, LOG_DEBUG, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
"<- back_crypt_encrypt_entry (returning %d)\n", ret);
return ret;
}
@@ -1155,7 +1159,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, LOG_DEBUG, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
"-> back_crypt_decrypt_value\n");
if (NULL == out) {
goto bail;
@@ -1173,7 +1177,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, LOG_DEBUG, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
"<- _back_crypt_decrypt_entry (returning %d)\n", ret);
return ret;
}
@@ -1191,7 +1195,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, LOG_DEBUG, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
"-> _back_crypt_crypto_op_value\n");
if (NULL == invalue || NULL == outvalue) {
goto bail;
@@ -1222,7 +1226,7 @@ _back_crypt_crypto_op_value(attrcrypt_state_private *state_priv,
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
"<- _back_crypt_crypto_op_value (returning %d)\n", ret);
return ret;
}
@@ -1241,19 +1245,19 @@ _back_crypt_cipher_init(Slapi_Backend *be,
int ret = 1; /* fail by default */
PK11SymKey *symmetric_key = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT, "-> _back_crypt_cipher_init\n");
+ slapi_log_error(SLAPI_LOG_TRACE, 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, LOG_ERR, ATTRCRYPT,
- "_back_crypt_cipher_init: Cipher lock not found.\n");
+ slapi_log_error(SLAPI_LOG_ERR, "_back_crypt_cipher_init",
+ "Cipher lock not found.\n");
}
acs->slot = slapd_pk11_getInternalKeySlot();
if (NULL == acs->slot) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
- "_back_crypt_cipher_init: Failed to create a slot for cipher %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_back_crypt_cipher_init",
+ "Failed to create a slot for cipher %s\n",
acs->cipher_display_name);
goto error;
}
@@ -1261,28 +1265,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, LOG_ERR, ATTRCRYPT,
- "_back_crypt_cipher_init: entry storing key does not exist.\n");
+ slapi_log_error(SLAPI_LOG_ERR, "_back_crypt_cipher_init",
+ "Entry storing key does not exist.\n");
} else if (KEYMGMT_ERR_OTHER == ret) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
- "_back_crypt_cipher_init: coding error.\n");
+ slapi_log_error(SLAPI_LOG_ERR, "_back_crypt_cipher_init",
+ "Coding error.\n");
} else if (KEYMGMT_ERR_CANT_UNWRAP == ret) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
- "_back_crypt_cipher_init: symmetric key failed to unwrap "
+ slapi_log_error(SLAPI_LOG_ERR, "_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, LOG_ERR, ATTRCRYPT,
- "_back_crypt_cipher_init: No symmetric key found for cipher "
+ slapi_log_error(SLAPI_LOG_ERR, "_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, LOG_ERR, ATTRCRYPT,
- "_back_crypt_cipher_init: Failed to generate key for %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_back_crypt_cipher_init",
+ "Failed to generate key for %s\n",
acs->cipher_display_name);
if (ret < 0) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_ERR, "_back_crypt_cipher_init",
"Cipher %s is not supported on the security device. "
"Do not configure changelog encryption with the cipher.\n",
ace->cipher_display_name);
@@ -1292,11 +1296,10 @@ _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, LOG_ERR, ATTRCRYPT,
- "_back_crypt_cipher_init: Failed to store key for cipher "
- "%s\n", acs->cipher_display_name);
+ slapi_log_error(SLAPI_LOG_ERR, "_back_crypt_cipher_init",
+ "Failed to store key for cipher %s\n", acs->cipher_display_name);
} else {
- slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "_back_crypt_cipher_init",
"Key for cipher %s successfully generated and stored\n",
acs->cipher_display_name);
}
@@ -1307,7 +1310,7 @@ _back_crypt_cipher_init(Slapi_Backend *be,
acs->key = symmetric_key;
}
error:
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
"<- _back_crypt_cipher_init (returning %d\n", ret);
return ret;
}
@@ -1320,7 +1323,7 @@ _back_crypt_cleanup_private(attrcrypt_state_private **state_priv)
{
attrcrypt_cipher_state **current = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
"-> _back_crypt_cleanup_private\n");
if (state_priv && *state_priv) {
for (current = &((*state_priv)->acs_array[0]); *current; current++) {
@@ -1329,7 +1332,7 @@ _back_crypt_cleanup_private(attrcrypt_state_private **state_priv)
}
slapi_ch_free((void **)state_priv);
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
"<- _back_crypt_cleanup_private\n");
return 0;
}
@@ -1356,7 +1359,7 @@ _back_crypt_keymgmt_get_key(attrcrypt_cipher_state *acs,
if (NULL == key_from_store) {
return ret;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
"-> _back_crypt_keymgmt_get_key\n");
*key_from_store = NULL;
/* Fetch the entry */
@@ -1391,7 +1394,7 @@ _back_crypt_keymgmt_get_key(attrcrypt_cipher_state *acs,
}
bail:
freeConfigEntry(&entry);
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
"<- _back_crypt_keymgmt_get_key (returning %d)\n", ret);
return ret;
}
@@ -1408,7 +1411,7 @@ _back_crypt_keymgmt_store_key(Slapi_Backend *be,
SECItem wrapped_symmetric_key = {0};
ldbm_instance *li = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
"-> _back_crypt_keymgmt_store_key\n");
if (!be || !be->be_instance_info) {
goto bail;
@@ -1447,17 +1450,16 @@ _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, 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");
+ slapi_log_error(SLAPI_LOG_ERR, "_back_crypt_keymgmt_store_key",
+ "Failed to add config key to the DSE: %d: %s: %s\n",
+ rc, ldap_err2string(rc), resulttext ? resulttext : "unknown");
ret = -1;
}
slapi_mods_free(&smods);
slapi_pblock_destroy(pb);
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
"<- _back_crypt_keymgmt_store_key (returning %d)\n", ret);
return ret;
}
@@ -1473,7 +1475,7 @@ _back_crypt_acs_list_add(attrcrypt_state_private **state_priv,
if (NULL == state_priv) {
return;
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
"-> _back_crypt_acs_list_add\n");
/* Is the list already there ? */
@@ -1494,7 +1496,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, LOG_DEBUG, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
"<- _back_crypt_acs_list_add\n");
return;
}
@@ -1517,17 +1519,17 @@ _back_crypt_crypto_op(attrcrypt_private *priv,
unsigned int output_buffer_size2 = 0;
unsigned char *output_buffer = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT, "-> _back_crypt_crypto_op\n");
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT, "-> _back_crypt_crypto_op\n");
if (NULL == acs) {
goto bail;
}
if (encrypt) {
- slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ATTRCRYPT,
- "_back_crypt_crypto_op encrypt '%s' (%lu)\n",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "_back_crypt_crypto_op",
+ "Encrypt '%s' (%lu)\n",
in_data, (long unsigned int)in_size);
} else {
- slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ATTRCRYPT,
- "_back_crypt_crypto_op decrypt (%lu)\n", (long unsigned int)in_size);
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "_back_crypt_crypto_op",
+ "Decrypt (%lu)\n", (long unsigned int)in_size);
}
/* Allocate the output buffer */
output_buffer_length = in_size + BACK_CRYPT_OUTBUFF_EXTLEN;
@@ -1540,9 +1542,9 @@ _back_crypt_crypto_op(attrcrypt_private *priv,
&iv_item);
if (NULL == security_parameter) {
int errorCode = PR_GetError();
- 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,
+ slapi_log_error(SLAPI_LOG_ERR, "_back_crypt_crypto_op",
+ "Failed to make IV for cipher %s : %d - %s\n",
+ acs->ace->cipher_display_name, errorCode,
slapd_pr_strerror(errorCode));
goto error;
}
@@ -1551,9 +1553,9 @@ _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, LOG_ERR, ATTRCRYPT,
- "_back_crypt_crypto_op: failed on cipher %s : "
- "%d - %s\n", acs->ace->cipher_display_name, errorCode,
+ slapi_log_error(SLAPI_LOG_ERR, "_back_crypt_crypto_op",
+ "Failed on cipher %s : %d - %s\n",
+ acs->ace->cipher_display_name, errorCode,
slapd_pr_strerror(errorCode));
goto error;
}
@@ -1562,8 +1564,8 @@ _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, LOG_ERR, ATTRCRYPT,
- "_back_crypt_crypto_op failed on cipher %s : %d - %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_back_crypt_crypto_op",
+ "Failed on cipher %s : %d - %s\n",
acs->ace->cipher_display_name, errorCode,
slapd_pr_strerror(errorCode));
goto error;
@@ -1574,9 +1576,9 @@ _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, LOG_ERR, ATTRCRYPT,
- "_back_crypt_crypto_op digest final failed on cipher "
- "%s : %d - %s\n", acs->ace->cipher_display_name,
+ slapi_log_error(SLAPI_LOG_ERR, "_back_crypt_crypto_op",
+ "Digest final failed on cipher %s : %d - %s\n",
+ acs->ace->cipher_display_name,
errorCode, slapd_pr_strerror(errorCode));
goto error;
} else {
@@ -1586,7 +1588,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, LOG_ERR, "DEBUG_ATTRCRYPT",
+ slapi_log_error(SLAPI_LOG_DEBUG, "DEBUG_ATTRCRYPT",
"slapd_pk11_DigestFinal '%s', %u\n",
output_buffer, output_buffer_size1 + output_buffer_size2);
}
@@ -1603,14 +1605,14 @@ _back_crypt_crypto_op(attrcrypt_private *priv,
size_t redo_size = -1;
int redo_ret;
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_DEBUG, 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, LOG_ERR, "DEBUG_ATTRCRYPT",
+ slapi_log_error(SLAPI_LOG_DEBUG, "DEBUG_ATTRCRYPT",
"attrcrypt_crypto_op returned (%d) "
"orig length %u redone length %u\n",
redo_ret, in_size, redo_size);
@@ -1619,7 +1621,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, LOG_ERR, "DEBUG_ATTRCRYPT",
+ slapi_log_error(SLAPI_LOG_DEBUG, "DEBUG_ATTRCRYPT",
"_back_crypt_crypto_op returned (%d) "
"orig length %u redone length %u\n",
redo_ret, in_size, redo_size);
@@ -1629,7 +1631,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, LOG_ERR, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_DEBUG, ATTRCRYPT,
"<------ check result of crypto op\n");
}
#endif
@@ -1645,7 +1647,7 @@ error:
slapi_ch_free_string((char **)&output_buffer);
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ATTRCRYPT,
+ slapi_log_error(SLAPI_LOG_TRACE, ATTRCRYPT,
"<- _back_crypt_crypto_op (returning %d)\n", rc);
return rc;
}
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt_config.c b/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt_config.c
index 6059cd9..1c60b5b 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, LOG_ERR, "Warning: malformed attribute encryption entry %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_attrcrypt_parse_entry - Malformed attribute encryption entry %s\n",
slapi_entry_get_dn(e), 0, 0);
return LDAP_OPERATIONS_ERROR;
}
@@ -82,7 +82,8 @@ 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, LOG_ERR, "Warning: attempt to configure unrecognized cipher %s in encrypted attribute config entry %s\n",
+ LDAPDebug(LDAP_DEBUG_WARNING, "ldbm_attrcrypt_parse_entry - "
+ "Attempt to configure unrecognized cipher %s in encrypted attribute config entry %s\n",
attrValue->bv_val, slapi_entry_get_dn(e), 0);
}
}
@@ -161,8 +162,9 @@ 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, LOG_ERR, "Warning: attempt to encryption on a non-existent attribute: %s\n",
- attribute_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_instance_attrcrypt_config_add_callback - "
+ "Attempt to encryption on a non-existent attribute: %s\n",
+ attribute_name, 0, 0);
returntext = "attribute does not exist";
*returncode = LDAP_UNWILLING_TO_PERFORM;
ret = SLAPI_DSE_CALLBACK_ERROR;
@@ -215,7 +217,8 @@ 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, LOG_ERR, "Warning: attempt to delete encryption for non-existant attribute: %s\n",
+ LDAPDebug(LDAP_DEBUG_WARNING, "ldbm_instance_attrcrypt_config_delete_callback - "
+ "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_bind.c b/ldap/servers/slapd/back-ldbm/ldbm_bind.c
index 8fa2092..cfc187c 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_bind.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_bind.c
@@ -48,8 +48,8 @@ ldbm_back_bind( Slapi_PBlock *pb )
if (inst->inst_ref_count) {
slapi_counter_increment(inst->inst_ref_count);
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm_bind: instance %s does not exist.\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "ldbm_back_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 0e7be35..c6b2029 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_compare.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_compare.c
@@ -48,9 +48,9 @@ ldbm_back_compare( Slapi_PBlock *pb )
if (inst && inst->inst_ref_count) {
slapi_counter_increment(inst->inst_ref_count);
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm_compare: instance \"%s\" does not exist.\n",
- inst ? inst->inst_name : "null instance");
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "ldbm_back_compare - "
+ "Instance \"%s\" does not exist.\n",
+ inst ? inst->inst_name : "null instance");
return -1;
}
/* get the namespace dn */
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_config.c b/ldap/servers/slapd/back-ldbm/ldbm_config.c
index e843aae..f8add00 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_config.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_config.c
@@ -73,12 +73,13 @@ 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, LOG_DEBUG, "Added database config entry [%s]\n", ebuf);
+ LDAPDebug1Arg(LDAP_DEBUG_CONFIG, "ldbm_config_add_dse_entries - Added database config entry [%s]\n", ebuf);
} else if (result == LDAP_ALREADY_EXISTS) {
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "Database config entry [%s] already exists - skipping\n", ebuf);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "ldbm_config_add_dse_entries - 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);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_config_add_dse_entries - "
+ "Unable to add config entry [%s] to the DSE: %d %d\n",
+ ebuf, result, rc);
}
slapi_pblock_destroy(util_pb);
}
@@ -305,13 +306,14 @@ 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, LOG_ERR, "New db directory location will not take affect until the server is restarted\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_config_directory_set - "
+ "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, LOG_ERR,
- "ERROR: db directory is not set; check %s in the db config: %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_config_directory_set - db directory is not set; check %s in the db config: %s\n",
CONFIG_DIRECTORY, CONFIG_LDBM_DN, 0);
retval = LDAP_PARAM_ERROR;
} else {
@@ -335,8 +337,8 @@ 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, LOG_ERR,
- "ERROR: ldbm plugin unable to read %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_config_directory_set - ldbm plugin unable to read %s\n",
CONFIG_LDBM_DN, 0, 0);
retval = res;
goto done;
@@ -344,8 +346,8 @@ 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, LOG_ERR,
- "ERROR: ldbm plugin unable to read %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_config_directory_set - ldbm plugin unable to read %s\n",
CONFIG_LDBM_DN, 0, 0);
retval = LDAP_OPERATIONS_ERROR;
goto done;
@@ -353,8 +355,8 @@ 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, LOG_ERR,
- "ERROR: ldbm plugin unable to read attribute nsslapd-directory from %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_config_directory_set - ldbm plugin unable to read attribute nsslapd-directory from %s\n",
CONFIG_LDBM_DN, 0, 0);
retval = LDAP_OPERATIONS_ERROR;
goto done;
@@ -363,16 +365,16 @@ 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, LOG_ERR,
- "ERROR: ldbm plugin unable to read attribute nsslapd-directory from %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_config_directory_set - ldbm plugin unable to read attribute nsslapd-directory from %s\n",
CONFIG_LDBM_DN, 0, 0);
retval = LDAP_OPERATIONS_ERROR;
goto done;
}
slapi_pblock_destroy(search_pb);
if (NULL == s || '\0' == s || 0 == PL_strcmp(s, "(null)")) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: db directory is not set; check %s in the db config: %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_config_directory_set - db directory is not set; check %s in the db config: %s\n",
CONFIG_DIRECTORY, CONFIG_LDBM_DN, 0);
retval = LDAP_PARAM_ERROR;
goto done;
@@ -419,20 +421,21 @@ 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, LOG_ERR,"WARNING: cache too small, increasing to %dK bytes\n",
+ LDAPDebug(LDAP_DEBUG_NOTICE,"ldbm_config_dbcachesize_set: cache too small, increasing to %dK bytes\n",
DBDEFMINSIZ/1000, 0, 0);
val = DBDEFMINSIZ;
} else if (val > li->li_dbcachesize) {
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, LOG_ERR, "Error: nsslapd-dbcachesize value is too large.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "ldbm_config_dbcachesize_set - "
+ "nsslapd-dbcachesize value is too large.\n");
return LDAP_UNWILLING_TO_PERFORM;
}
}
if (CONFIG_PHASE_RUNNING == phase) {
li->li_new_dbcachesize = val;
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "New db cache size will not take affect until the server is restarted\n",
+ LDAPDebug(LDAP_DEBUG_NOTICE, "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 +461,8 @@ static int ldbm_config_maxpassbeforemerge_set(void *arg, void *value, char *erro
if (apply) {
if (val < 0) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"WARNING: maxpassbeforemerge will not take negative value\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_NOTICE,"ldbm_config_maxpassbeforemerge_set- "
+ "maxpassbeforemerge will not take negative value - setting to 100\n", 0, 0, 0);
val = 100;
}
@@ -486,7 +490,8 @@ 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, LOG_ERR, "New nsslapd-dbncache will not take affect until the server is restarted\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_NOTICE, "ldbm_config_dbncache_set - "
+ "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;
@@ -827,8 +832,9 @@ 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, LOG_ERR, "Error: Invalid value for %s (%d). Must be between 0 and 100\n",
- CONFIG_DB_TRICKLE_PERCENTAGE, val);
+ LDAPDebug2Args(LDAP_DEBUG_ERR, "ldbm_config_db_trickle_percentage_set - "
+ "Invalid value for %s (%d). Must be between 0 and 100\n",
+ CONFIG_DB_TRICKLE_PERCENTAGE, val);
return LDAP_UNWILLING_TO_PERFORM;
}
@@ -1022,14 +1028,14 @@ static int ldbm_config_db_lock_set(void *arg, void *value, char *errorbuf, int p
if (val < BDB_LOCK_NB_MIN) {
slapi_create_errormsg(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: Invalid value for %s (%d). Must be greater than %d\n",
CONFIG_DB_LOCK, val, BDB_LOCK_NB_MIN);
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "Error: Invalid value for %s (%d)\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR, "ldbm_config_db_lock_set - Invalid value for %s (%d)\n",
CONFIG_DB_LOCK, val);
return LDAP_UNWILLING_TO_PERFORM;
}
if (apply) {
if (CONFIG_PHASE_RUNNING == phase) {
li->li_new_dblock = val;
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "New db max lock count will not take affect until the server is restarted\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_NOTICE, "ldbm_config_db_lock_set - New db max lock count will not take affect until the server is restarted\n", 0, 0, 0);
} else {
li->li_new_dblock = val;
li->li_dblock = val;
@@ -1068,7 +1074,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, LOG_ERR,"Error: db cachesize value is too large.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,"ldbm_config_db_cache_set - db cachesize value is too large.\n");
return LDAP_UNWILLING_TO_PERFORM;
}
}
@@ -1199,7 +1205,8 @@ 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, LOG_ERR,"Error: import cachesize value is too large.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,"ldbm_config_import_cachesize_set - "
+ "Import cachesize value is too large.\n");
return LDAP_UNWILLING_TO_PERFORM;
}
}
@@ -1463,15 +1470,16 @@ 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, LOG_ERR, "Error: Invalid value for deadlock policy (%d). Must be between %d and %d inclusive",
- val, DB_LOCK_DEFAULT, DB_LOCK_YOUNGEST);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_config_db_deadlock_policy_set - "
+ "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;
}
if (val == DB_LOCK_NORUN) {
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, LOG_ERR, "Warning: Setting value for %s to (%d) will disable deadlock detection",
+ LDAPDebug2Args(LDAP_DEBUG_WARNING, "ldbm_config_db_deadlock_policy_set - Setting value for %s to (%d) will disable deadlock detection",
CONFIG_DB_DEADLOCK_POLICY, val);
}
@@ -1572,8 +1580,8 @@ 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, LOG_ERR,
- "ldbm_config_read_instance_entries: "
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "ldbm_config_read_instance_entries -"
"failed to create backend dn for %s\n", backend_type);
return 1;
}
@@ -1589,8 +1597,8 @@ 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, LOG_ERR,
- "ldbm_config_read_instance_entries: "
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "ldbm_config_read_instance_entries - "
"failed to add instance entry %s\n",
slapi_entry_get_dn_const(entries[i]));
break;
@@ -1625,8 +1633,8 @@ 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, LOG_ERR,
- "ldbm_config_load_dse_info: "
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "ldbm_config_load_dse_info - "
"failed create config dn for %s\n",
li->li_plugin->plg_name);
rval = 1;
@@ -1635,8 +1643,8 @@ int ldbm_config_load_dse_info(struct ldbminfo *li)
search_pb = slapi_pblock_new();
if (!search_pb) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm_config_load_dse_info: Out of memory\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_config_load_dse_info - Out of memory\n",
0, 0, 0);
rval = 1;
goto bail;
@@ -1652,7 +1660,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, LOG_ERR, "Error accessing the ldbm config DSE\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_config_load_dse_info - Error accessing the ldbm config DSE 1\n",
0, 0, 0);
rval = 1;
goto bail;
@@ -1662,13 +1670,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, LOG_ERR, "Error accessing the ldbm config DSE\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_config_load_dse_info - Error accessing the ldbm config DSE 2\n",
0, 0, 0);
rval = 1;
goto bail;
}
if (0 != parse_ldbm_config_entry(li, entries[0], ldbm_config)) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error parsing the ldbm config DSE\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_config_load_dse_info - Error parsing the ldbm config DSE\n",
0, 0, 0);
rval = 1;
goto bail;
@@ -1684,8 +1692,8 @@ 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, LOG_ERR,
- "ldbm_config_load_dse_info: "
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "ldbm_config_load_dse_info - "
"failed to read instance entries\n");
goto bail;
}
@@ -1706,8 +1714,8 @@ 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, LOG_ERR,
- "ldbm_config_load_dse_info: "
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "ldbm_config_load_dse_info - "
"failed to create monitor dn for %s\n",
li->li_plugin->plg_name);
rval = 1;
@@ -1722,8 +1730,8 @@ 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, LOG_ERR,
- "ldbm_config_load_dse_info: "
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "ldbm_config_load_dse_info - "
"failed create monitor database dn for %s\n",
li->li_plugin->plg_name);
rval = 1;
@@ -1739,8 +1747,8 @@ 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, LOG_ERR,
- "ldbm_config_load_dse_info: "
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "ldbm_config_load_dse_info - "
"failed create plugin dn for %s\n",
li->li_plugin->plg_name);
rval = 1;
@@ -1890,7 +1898,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, LOG_DEBUG, "Unknown config attribute %s\n", attr_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_CONFIG, "ldbm_config_set - 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 */
}
@@ -1898,7 +1906,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, LOG_ERR, "%s can't be modified while the server is running.\n", attr_name);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "ldbm_config_set - %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;
}
@@ -1946,20 +1954,20 @@ 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, LOG_ERR, "Error: value %s for attr %s is not a number\n", str_val, attr_name);
+ LDAPDebug2Args(LDAP_DEBUG_ERR, "ldbm_config_set - 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)) {
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, LOG_ERR, "Error: value %s for attr %s is greater than the maximum %d\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_config_set - 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, LOG_ERR, "Error: value %s for attr %s is less than the minimum %d\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_config_set - Value %s for attr %s is less than the minimum %d\n",
str_val, attr_name, minint);
return LDAP_UNWILLING_TO_PERFORM;
}
@@ -1987,21 +1995,21 @@ 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, LOG_ERR, "Error: value %s for attr %s is not a number\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR, "ldbm_config_set - 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)) {
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, LOG_ERR, "Error: value %s for attr %s is greater than the maximum %d\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_config_set - 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, LOG_ERR, "Error: value %s for attr %s is less than the minimum %d\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_config_set - Value %s for attr %s is less than the minimum %d\n",
str_val, attr_name, minint);
return LDAP_UNWILLING_TO_PERFORM;
}
@@ -2023,14 +2031,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, LOG_ERR, "Error: value %s for attr %s is not a number\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR, "ldbm_config_set - 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, LOG_ERR, "Error: value %s for attr %s is outside the range of representable values\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR, "ldbm_config_set - Value %s for attr %s is outside the range of representable values\n",
str_val, attr_name);
return LDAP_UNWILLING_TO_PERFORM;
}
@@ -2091,7 +2099,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, LOG_ERR, "Error with config attribute %s : %s\n", attr_name, err_buf, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "parse_ldbm_config_entry - Error with config attribute %s : %s\n", attr_name, err_buf, 0);
return 1;
}
}
@@ -2211,8 +2219,8 @@ 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, LOG_ERR,
- "Internal Error: Error setting instance config attr %s to %s: %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_config_internal_set - 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 ef81317..326d67d 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, LOG_DEBUG, "ldbm_back_delete", "enter conn=%" NSPRIu64 " op=%d\n",
+ slapi_log_error(SLAPI_LOG_TRACE, "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, LOG_ERR, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_delete",
"Either of DELETE_TARGET_SDN or TARGET_ADDRESS is NULL.\n");
goto error_return;
}
@@ -136,8 +136,8 @@ ldbm_back_delete( Slapi_PBlock *pb )
if (inst && inst->inst_ref_count) {
slapi_counter_increment(inst->inst_ref_count);
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm_delete: instance \"%s\" does not exist.\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "ldbm_back_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, LOG_ERR, "ldbm_back_delete",
+ slapi_log_error(SLAPI_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, LOG_ERR, "ldbm_back_delete",
+ slapi_log_error(SLAPI_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,8 @@ ldbm_back_delete( Slapi_PBlock *pb )
}
/* We're re-trying */
- LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "Delete Retrying Transaction\n");
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, "ldbm_back_delete - "
+ "Delete Retrying Transaction\n");
#ifndef LDBM_NO_BACKOFF_DELAY
{
PRIntervalTime interval;
@@ -271,14 +272,14 @@ ldbm_back_delete( Slapi_PBlock *pb )
{
ldap_result_code= LDAP_NO_SUCH_OBJECT;
retval = -1;
- LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "ldbm_back_delete: Deleting entry is already deleted.\n");
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, "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, LOG_DEBUG, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "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,8 +351,8 @@ 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, LOG_DEBUG,
- "SLAPI_PLUGIN_BE_TXN_PRE_DELETE_FN plugin "
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ "ldbm_back_delete - SLAPI_PLUGIN_BE_TXN_PRE_DELETE_FN plugin "
"returned error code %d\n", retval );
if (!ldap_result_code) {
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
@@ -376,13 +377,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, LOG_ERR, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_WARNING, "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, LOG_ERR, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_WARNING, "ldbm_back_delete",
"Attempt to Tombstone again a tombstone entry %s\n", dn);
delete_tombstone_entry = 1;
}
@@ -422,7 +423,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
}
}
if (create_tombstone_entry && is_tombstone_entry) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldbm_back_delete",
+ slapi_log_error(SLAPI_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 +431,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
}
#ifdef DEBUG
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_REPL, "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 +531,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, LOG_ERR, "ldbm_back_delete",
+ slapi_log_error(SLAPI_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 +571,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, LOG_ERR, "ldbm_back_delete",
+ slapi_log_error(SLAPI_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 +579,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
goto error_return;
}
if (!childuniqueid) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldbm_back_delete",
+ slapi_log_error(SLAPI_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,8 +657,8 @@ ldbm_back_delete( Slapi_PBlock *pb )
not_an_error = 1;
rc = LDAP_SUCCESS;
}
- LDAPDebug1Arg( LDAP_DEBUG_TRACE, LOG_DEBUG,
- "SLAPI_PLUGIN_BE_TXN_PRE_DELETE_FN plugin "
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ "ldbm_back_delete - SLAPI_PLUGIN_BE_TXN_PRE_DELETE_FN plugin "
"returned error code %d\n", retval );
if (!ldap_result_code) {
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
@@ -719,7 +720,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, LOG_DEBUG, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_CACHE, "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;
@@ -729,13 +730,14 @@ ldbm_back_delete( Slapi_PBlock *pb )
}
retval = id2entry_add( be, tombstone, &txn );
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "delete 1 DB_LOCK_DEADLOCK\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, "ldbm_back_delete - delete 1 DB_LOCK_DEADLOCK\n",
+ 0, 0, 0 );
/* Abort and re-try */
continue;
}
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "id2entry_add failed, err=%d %s\n",
- retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_delete - 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);
goto error_return;
@@ -747,7 +749,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
retval = id2entry_delete( be, e, &txn );
if (DB_LOCK_DEADLOCK == retval)
{
- LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "delete 2 DEADLOCK\n");
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, "ldbm_back_delete - delete 2 DEADLOCK\n");
/* Retry txn */
continue;
}
@@ -769,12 +771,12 @@ ldbm_back_delete( Slapi_PBlock *pb )
retval = index_addordel_entry( be, e, addordel_flags, &txn );
if (DB_LOCK_DEADLOCK == retval)
{
- LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "delete 1 DEADLOCK\n");
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, "ldbm_back_delete - delete 1 DEADLOCK\n");
/* Retry txn */
continue;
}
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "index_del_entry(%s, 0x%x) failed (%d)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_delete - index_addordel_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,15 +794,15 @@ 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, LOG_DEBUG,
- "delete (adding %s) DB_LOCK_DEADLOCK\n",
+ LDAPDebug(LDAP_DEBUG_BACKLDBM,
+ "ldbm_back_delete - (adding %s) DB_LOCK_DEADLOCK\n",
SLAPI_ATTR_VALUE_TOMBSTONE, 0, 0 );
/* Retry txn */
continue;
}
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "delete (adding %s) failed, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_delete - (adding %s) failed, err=%d %s\n",
SLAPI_ATTR_VALUE_TOMBSTONE, retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
@@ -816,15 +818,15 @@ 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, LOG_DEBUG,
- "delete tombstone csn(adding %s) DB_LOCK_DEADLOCK\n",
+ LDAPDebug(LDAP_DEBUG_BACKLDBM,
+ "ldbm_back_delete - delete tombstone csn(adding %s) DB_LOCK_DEADLOCK\n",
deletion_csn_str, 0, 0 );
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "delete tombsone csn(adding %s) failed, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_delete - delete tombsone csn(adding %s) failed, err=%d %s\n",
deletion_csn_str,
retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
@@ -840,40 +842,38 @@ 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, LOG_DEBUG,
- "delete (adding %s) DB_LOCK_DEADLOCK\n",
+ LDAPDebug(LDAP_DEBUG_BACKLDBM,
+ "ldbm_back_delete - (adding %s) DB_LOCK_DEADLOCK\n",
SLAPI_ATTR_UNIQUEID, 0, 0 );
/* Retry txn */
continue;
}
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "delete (adding %s) failed, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_delete - (adding %s) failed, err=%d %s\n",
SLAPI_ATTR_UNIQUEID, retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
- DEL_SET_ERROR(ldap_result_code,
- LDAP_OPERATIONS_ERROR, retry_count);
+ DEL_SET_ERROR(ldap_result_code, LDAP_OPERATIONS_ERROR, retry_count);
goto error_return;
}
retval = index_addordel_string(be, SLAPI_ATTR_NSCP_ENTRYDN,
slapi_sdn_get_ndn(&nscpEntrySDN),
tombstone->ep_id, BE_INDEX_ADD, &txn);
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
- "delete (adding %s) DB_LOCK_DEADLOCK\n",
+ LDAPDebug(LDAP_DEBUG_BACKLDBM,
+ "ldbm_back_delete - (adding %s) DB_LOCK_DEADLOCK\n",
SLAPI_ATTR_NSCP_ENTRYDN, 0, 0 );
/* Retry txn */
continue;
}
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "delete (adding %s) failed, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_delete - (adding %s) failed, err=%d %s\n",
SLAPI_ATTR_NSCP_ENTRYDN, retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
- DEL_SET_ERROR(ldap_result_code,
- LDAP_OPERATIONS_ERROR, retry_count);
+ DEL_SET_ERROR(ldap_result_code, LDAP_OPERATIONS_ERROR, retry_count);
goto error_return;
}
/* add a new usn to the entryusn index */
@@ -884,15 +884,15 @@ 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, LOG_DEBUG,
- "delete (adding %s) DB_LOCK_DEADLOCK\n",
+ LDAPDebug(LDAP_DEBUG_BACKLDBM,
+ "ldbm_back_delete - (adding %s) DB_LOCK_DEADLOCK\n",
SLAPI_ATTR_ENTRYUSN, 0, 0 );
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "delete (adding %s) failed, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_delete - (adding %s) failed, err=%d %s\n",
SLAPI_ATTR_ENTRYUSN, retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
@@ -915,14 +915,14 @@ ldbm_back_delete( Slapi_PBlock *pb )
svals, NULL, e->ep_id,
BE_INDEX_ADD, &txn);
if (DB_LOCK_DEADLOCK == retval) {
- LDAPDebug0Args( LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
- "delete (updating " LDBM_PARENTID_STR ") DB_LOCK_DEADLOCK\n");
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM,
+ "ldbm_back_delete - delete (updating " LDBM_PARENTID_STR ") DB_LOCK_DEADLOCK\n");
/* Retry txn */
continue;
}
if ( retval ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "delete (deleting %s) failed, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_delete - (deleting %s) failed, err=%d %s\n",
LDBM_PARENTID_STR, retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
@@ -934,14 +934,14 @@ 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, LOG_DEBUG,
- "delete (deleting entryrdn) DB_LOCK_DEADLOCK\n");
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM,
+ "ldbm_back_delete - (deleting entryrdn) DB_LOCK_DEADLOCK\n");
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR,
- "delete (deleting entryrdn) failed, err=%d %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY,
+ "ldbm_back_delete - (deleting entryrdn) failed, err=%d %s\n",
retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
@@ -952,14 +952,14 @@ 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, LOG_DEBUG,
- "adding (adding tombstone entryrdn) DB_LOCK_DEADLOCK\n");
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM,
+ "ldbm_back_delete - (adding tombstone entryrdn) DB_LOCK_DEADLOCK\n");
/* Retry txn */
continue;
}
if (retval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "adding (adding tombstone entryrdn %s) failed, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_delete - (adding tombstone entryrdn %s) failed, err=%d %s\n",
slapi_entry_get_dn(tombstone->ep_entry),
retval, (msg = dblayer_strerror( retval )) ? msg : "" );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
@@ -980,15 +980,15 @@ 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, LOG_DEBUG,
- "delete (deleting %s) DB_LOCK_DEADLOCK\n",
+ LDAPDebug(LDAP_DEBUG_BACKLDBM,
+ "ldbm_back_delete - (deleting %s) 0 DB_LOCK_DEADLOCK\n",
SLAPI_ATTR_VALUE_TOMBSTONE, 0, 0 );
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "delete (deleting %s) failed, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_delete - (deleting %s) failed, err=%d %s\n",
SLAPI_ATTR_VALUE_TOMBSTONE, retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
@@ -1004,15 +1004,15 @@ 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, LOG_DEBUG,
- "delete tombstone csn(deleting %s) DB_LOCK_DEADLOCK\n",
+ LDAPDebug(LDAP_DEBUG_BACKLDBM,
+ "ldbm_back_delete - delete tombstone csn(deleting %s) DB_LOCK_DEADLOCK\n",
deletion_csn_str, 0, 0 );
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "delete tombsone csn(deleting %s) failed, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_delete - delete tombsone csn(deleting %s) failed, err=%d %s\n",
deletion_csn_str,
retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
@@ -1028,15 +1028,15 @@ 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, LOG_DEBUG,
- "delete (deleting %s) DB_LOCK_DEADLOCK\n",
+ LDAPDebug(LDAP_DEBUG_BACKLDBM,
+ "ldbm_back_delete - (deleting %s) 1 DB_LOCK_DEADLOCK\n",
SLAPI_ATTR_UNIQUEID, 0, 0 );
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "delete (deleting %s) failed, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_delete - (deleting %s) failed 1, err=%d %s\n",
SLAPI_ATTR_UNIQUEID, retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
@@ -1052,15 +1052,15 @@ 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, LOG_DEBUG,
- "delete (deleting %s) DB_LOCK_DEADLOCK\n",
+ LDAPDebug(LDAP_DEBUG_BACKLDBM,
+ "ldbm_back_delete - (deleting %s) 2 DB_LOCK_DEADLOCK\n",
SLAPI_ATTR_NSCP_ENTRYDN, 0, 0 );
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "delete (deleting %s) failed, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_delete - (deleting %s) failed 2, err=%d %s\n",
SLAPI_ATTR_NSCP_ENTRYDN, retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
@@ -1078,15 +1078,15 @@ 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, LOG_DEBUG,
- "delete (deleting %s) DB_LOCK_DEADLOCK\n",
+ LDAPDebug(LDAP_DEBUG_BACKLDBM,
+ "ldbm_back_delete - (deleting %s) 3 DB_LOCK_DEADLOCK\n",
SLAPI_ATTR_ENTRYUSN, 0, 0 );
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "delete (deleting %s) failed, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_delete - (deleting %s) failed 3, err=%d %s\n",
SLAPI_ATTR_ENTRYUSN, retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
@@ -1099,14 +1099,14 @@ 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, LOG_DEBUG,
- "delete (deleting entryrdn) DB_LOCK_DEADLOCK\n");
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM,
+ "ldbm_back_delete - (deleting entryrdn) DB_LOCK_DEADLOCK\n");
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR,
- "delete (deleting entryrdn) failed, err=%d %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY,
+ "ldbm_back_delete - (deleting entryrdn) failed, err=%d %s\n",
retval,
(msg = dblayer_strerror( retval )) ? msg : "" );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
@@ -1120,17 +1120,17 @@ 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, LOG_DEBUG, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "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)
{
- LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "del 4 DEADLOCK\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, "ldbm_back_delete - 4 DEADLOCK\n", 0, 0, 0 );
/* Retry txn */
continue;
}
if (0 != retval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "delete 3 BAD, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_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,8 @@ ldbm_back_delete( Slapi_PBlock *pb )
if (DB_LOCK_DEADLOCK == retval)
{
- LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "delete DEADLOCK vlv_update_index\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_BACKLDBM, "ldbm_back_delete - DEADLOCK vlv_update_all_indexes\n",
+ 0, 0, 0 );
/* Retry txn */
continue;
}
@@ -1163,8 +1164,8 @@ 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, LOG_ERR,
- "ldbm_back_delete: ldbm_txn_ruv_modify_context "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_delete - ldbm_txn_ruv_modify_context "
"failed to construct RUV modify context\n",
0, 0, 0);
ldap_result_code= LDAP_OPERATIONS_ERROR;
@@ -1180,8 +1181,8 @@ ldbm_back_delete( Slapi_PBlock *pb )
continue;
}
if (0 != retval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "modify_update_all failed, err=%d %s\n", retval,
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_delete - modify_update_all failed, err=%d %s\n", retval,
(msg = dblayer_strerror( retval )) ? msg : "", 0 );
if (LDBM_OS_ERR_IS_DISKFULL(retval))
disk_full = 1;
@@ -1196,7 +1197,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
}
if (retry_count == RETRY_TIMES) {
/* Failed */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Retry count exceeded in delete\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_delete - Retry count exceeded in delete\n", 0, 0, 0 );
ldap_result_code= LDAP_BUSY;
retval = -1;
goto error_return;
@@ -1204,7 +1205,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, LOG_DEBUG, "ldbm_back_delete: cache_replace failed (%d): %s --> %s\n",
+ LDAPDebug(LDAP_DEBUG_CACHE, "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;
@@ -1214,13 +1215,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, LOG_DEBUG, "SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN plugin "
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "ldbm_back_delete - 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, LOG_ERR, "SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN plugin "
+ LDAPDebug0Args(LDAP_DEBUG_ANY, "ldbm_back_delete - 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);
@@ -1293,7 +1294,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, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_ERR,
"ldbm_back_delete: modify_switch_entries failed\n", 0, 0, 0);
retval = -1;
goto error_return;
@@ -1304,7 +1305,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, LOG_DEBUG, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "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 +1368,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, LOG_DEBUG, "SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN plugin "
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "ldbm_back_delete - 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 +1394,7 @@ error_return:
* be written to disk.
*/
myrc = modify_unswitch_entries(&parent_modify_c, be);
- slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "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 +1418,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, LOG_DEBUG, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_CACHE, "ldbm_back_delete",
"set %s to dn cache\n", slapi_sdn_get_dn(tombstonesdn));
CACHE_RETURN(&inst->inst_dncache, &bdn);
}
@@ -1471,7 +1472,7 @@ diskfull_return:
slapi_send_ldap_result( pb, ldap_result_code, NULL, ldap_result_message, 0, NULL );
}
}
- slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_delete",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "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 +1500,7 @@ diskfull_return:
slapi_sdn_done(&parentsdn);
if (pb->pb_conn)
{
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "ldbm_back_delete", "leave conn=%" NSPRIu64 " op=%d\n",
+ slapi_log_error(SLAPI_LOG_TRACE, "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 6dcdc20..35b2849 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, LOG_ERR, "BAD ASSERTION at %s/%d: %s\n", \
+ LDAPDebug(LDAP_DEBUG_DEBUG, "ldbm_entryrdn ASSERT - BAD ASSERTION at %s/%d: %s\n", \
__FILE__, __LINE__, #_x); \
*(char *)0L = 23; \
} \
@@ -35,10 +35,7 @@ static int entryrdn_noancestorid = 0;
#endif
#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)
+ (((rc)==DB_LOCK_DEADLOCK)?SLAPI_LOG_BACKLDBM:SLAPI_LOG_ERR)
#define ENTRYRDN_DELAY \
{ \
@@ -47,8 +44,6 @@ static int entryrdn_noancestorid = 0;
DS_Sleep(interval); \
}
-#define ENTRYRDN_TAG "entryrdn-index"
-
#define RDN_INDEX_SELF 'S'
#define RDN_INDEX_CHILD 'C'
#define RDN_INDEX_PARENT 'P'
@@ -208,21 +203,19 @@ entryrdn_index_entry(backend *be,
Slapi_RDN *srdn = NULL;
int db_retry = 0;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "entryrdn_index_entry",
"--> entryrdn_index_entry\n");
if (NULL == be || NULL == e) {
- 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");
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_index_entry",
+ "Param error: Empty %s\n", NULL==be?"backend":NULL==e?"entry":"unknown");
return rc;
}
/* Open the entryrdn index */
rc = _entryrdn_open_index(be, &ai, &db);
if (rc || (NULL == db)) {
- 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);
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_index_entry",
+ "Opening the index failed: %s(%d)\n",
+ rc<0?dblayer_strerror(rc):"Invalid parameter", rc);
return rc;
}
@@ -230,21 +223,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, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_index_entry: Empty dn\n");
+ slapi_log_error(SLAPI_LOG_ERR, "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, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_index_entry: Failed to convert "
- "%s to Slapi_RDN\n", slapi_sdn_get_dn(sdn));
+ slapi_log_error(SLAPI_LOG_ERR, "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, LOG_DEBUG, ENTRYRDN_TAG,
- "entryrdn_index_entry: %s does not belong to "
- "the db\n", slapi_sdn_get_dn(sdn));
+ slapi_log_error(SLAPI_LOG_TRACE, "entryrdn_index_entry",
+ "%s does not belong to the db\n", slapi_sdn_get_dn(sdn));
rc = DB_NOTFOUND;
goto bail;
}
@@ -254,9 +245,8 @@ 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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "entryrdn_index_entry: Failed to make a cursor: %s(%d)\n",
- dblayer_strerror(rc), rc);
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "entryrdn_index_entry",
+ "Failed to make a cursor: %s(%d)\n", dblayer_strerror(rc), rc);
if ((DB_LOCK_DEADLOCK == rc) && !db_txn) {
ENTRYRDN_DELAY;
continue;
@@ -268,8 +258,8 @@ entryrdn_index_entry(backend *be,
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_index_entry: cursor open failed after [%d] retries\n", db_retry);
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_index_entry",
+ "Cursor open failed after [%d] retries\n", db_retry);
rc = DB_LOCK_DEADLOCK;
goto bail;
}
@@ -289,8 +279,8 @@ 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_SEVLEVEL(myrc), ENTRYRDN_TAG,
- "entryrdn_index_entry: Failed to close cursor: %s(%d)\n",
+ slapi_log_error(ENTRYRDN_LOGLEVEL(myrc), "entryrdn_index_entry",
+ "Failed to close cursor: %s(%d)\n",
dblayer_strerror(myrc), myrc);
if ((DB_LOCK_DEADLOCK == myrc) && !db_txn) {
ENTRYRDN_DELAY;
@@ -307,8 +297,8 @@ bail:
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_index_entry: cursor close failed after [%d] retries\n", db_retry);
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_index_entry",
+ "Cursor close failed after [%d] retries\n", db_retry);
rc = DB_LOCK_DEADLOCK;
}
}
@@ -316,7 +306,7 @@ bail:
dblayer_release_index_file(be, ai, db);
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "entryrdn_index_entry",
"<-- entryrdn_index_entry\n");
return rc;
}
@@ -355,12 +345,12 @@ entryrdn_index_read_ext(backend *be,
rdn_elem *elem = NULL;
int db_retry = 0;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "entryrdn_index_read",
"--> entryrdn_index_read\n");
if (NULL == be || NULL == sdn || NULL == id) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_index_read: Param error: Empty %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_index_read_ext",
+ "Param error: Empty %s\n",
NULL==be?"backend":NULL==sdn?"DN":
NULL==id?"id container":"unknown");
goto bail;
@@ -370,15 +360,14 @@ entryrdn_index_read_ext(backend *be,
rc = slapi_rdn_init_all_sdn(&srdn, sdn);
if (rc < 0) {
- 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));
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "entryrdn_index_read_ext",
+ "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, LOG_DEBUG, ENTRYRDN_TAG,
- "entryrdn_index_read: %s does not belong to the db\n",
- slapi_sdn_get_dn(sdn));
+ slapi_log_error(SLAPI_LOG_TRACE, "entryrdn_index_read_ext",
+ "%s does not belong to the db\n", slapi_sdn_get_dn(sdn));
rc = DB_NOTFOUND;
goto bail;
}
@@ -386,9 +375,8 @@ 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, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_index_read: Opening the index failed: "
- "%s(%d)\n",
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_index_read_ext",
+ "Opening the index failed: %s(%d)\n",
rc<0?dblayer_strerror(rc):"Invalid parameter", rc);
db = NULL;
goto bail;
@@ -398,9 +386,8 @@ 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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "entryrdn_index_read: Failed to make a cursor: %s(%d)\n",
- dblayer_strerror(rc), rc);
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "entryrdn_index_read_ext",
+ "Failed to make a cursor: %s(%d)\n", dblayer_strerror(rc), rc);
if ((DB_LOCK_DEADLOCK == rc) && !db_txn) {
ENTRYRDN_DELAY;
continue;
@@ -412,9 +399,8 @@ entryrdn_index_read_ext(backend *be,
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_index_read: Failed to make a cursor after [%d] retries\n",
- db_retry);
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_index_read_ext",
+ "Failed to make a cursor after [%d] retries\n", db_retry);
rc = DB_LOCK_DEADLOCK;
goto bail;
}
@@ -432,9 +418,8 @@ 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_SEVLEVEL(myrc), ENTRYRDN_TAG,
- "entryrdn_index_read: Failed to close cursor: %s(%d)\n",
- dblayer_strerror(myrc), myrc);
+ slapi_log_error(ENTRYRDN_LOGLEVEL(myrc), "entryrdn_index_read_ext",
+ "Failed to close cursor: %s(%d)\n", dblayer_strerror(myrc), myrc);
if ((DB_LOCK_DEADLOCK == myrc) && !db_txn) {
ENTRYRDN_DELAY;
continue;
@@ -450,9 +435,8 @@ bail:
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_index_read: Failed to close cursor after [%d] retries\n",
- db_retry);
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_index_read_ext",
+ "Failed to close cursor after [%d] retries\n", db_retry);
rc = rc ? rc : DB_LOCK_DEADLOCK;
}
}
@@ -461,7 +445,7 @@ bail:
}
slapi_rdn_done(&srdn);
slapi_ch_free((void **)&elem);
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "entryrdn_index_read",
"<-- entryrdn_index_read\n");
return rc;
}
@@ -515,12 +499,12 @@ entryrdn_rename_subtree(backend *be,
ID targetid = 0;
int db_retry = 0;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "entryrdn_rename_subtree",
"--> entryrdn_rename_subtree\n");
if (NULL == be || NULL == oldsdn || 0 == id) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_rename_subtree: Param error: Empty %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_rename_subtree",
+ "Param error: Empty %s\n",
NULL==be?"backend":NULL==oldsdn?"old dn":
(NULL==newsrdn&&NULL==newsupsdn)?"new dn and new superior":
0==id?"id":"unknown");
@@ -529,15 +513,14 @@ entryrdn_rename_subtree(backend *be,
rc = slapi_rdn_init_all_sdn_ext(&oldsrdn, oldsdn, flags);
if (rc < 0) {
- 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));
+ slapi_log_error(SLAPI_LOG_ERR, "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, LOG_DEBUG, ENTRYRDN_TAG,
- "entryrdn_rename_subtree: %s does not belong to "
- "the db\n", slapi_sdn_get_dn(oldsdn));
+ slapi_log_error(SLAPI_LOG_TRACE, "entryrdn_rename_subtree",
+ "%s does not belong to the db\n", slapi_sdn_get_dn(oldsdn));
rc = DB_NOTFOUND;
goto bail;
}
@@ -558,8 +541,8 @@ 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, LOG_DEBUG, ENTRYRDN_TAG,
- "entryrdn_rename_subtree: No new superior is given "
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "entryrdn_rename_subtree",
+ "No new superior is given "
"and new rdn %s is identical to the original\n",
slapi_rdn_get_rdn(&oldsrdn));
goto bail;
@@ -568,19 +551,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, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_rename_subtree: Empty RDN\n");
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_rename_subtree",
+ "Empty RDN\n");
goto bail;
} else if (0 == rdnidx) {
if (mynewsupsdn) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_move_subtree: Moving suffix \"%s\" is "
- "not alloweds\n", nrdn);
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_rename_subtree",
+ "Moving suffix \"%s\" is not alloweds\n", nrdn);
goto bail;
} else {
/* newsupsdn == NULL, so newsrdn is not */
- slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ENTRYRDN_TAG,
- "entryrdn_rename_subtree: Renaming suffix %s to %s\n",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "entryrdn_rename_subtree",
+ "Renaming suffix %s to %s\n",
nrdn, slapi_rdn_get_nrdn((Slapi_RDN *)mynewsrdn));
}
}
@@ -588,9 +570,8 @@ 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, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_rename_subtree: Opening the index failed: "
- "%s(%d)\n",
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_rename_subtree",
+ "Opening the index failed: %s(%d)\n",
rc<0?dblayer_strerror(rc):"Invalid parameter", rc);
db = NULL;
return rc;
@@ -600,9 +581,8 @@ 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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "entryrdn_rename_subtree: Failed to make a cursor: %s(%d)\n",
- dblayer_strerror(rc), rc);
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "entryrdn_rename_subtree",
+ "Failed to make a cursor: %s(%d)\n", dblayer_strerror(rc), rc);
if ((DB_LOCK_DEADLOCK == rc) && !db_txn) {
ENTRYRDN_DELAY;
continue;
@@ -614,8 +594,8 @@ entryrdn_rename_subtree(backend *be,
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_rename_subtree: create cursor failed after [%d] retries\n",
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_rename_subtree",
+ "Create cursor failed after [%d] retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
goto bail;
@@ -625,9 +605,8 @@ 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, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_rename_subtree: Failed to generate "
- "a new elem: id: %d, rdn: %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_rename_subtree",
+ "Failed to generate a new elem: id: %d, rdn: %s\n",
id, slapi_rdn_get_rdn(mynewsrdn));
goto bail;
}
@@ -637,16 +616,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, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_rename_subtree: Failed to convert "
- "new superior \"%s\" to Slapi_RDN\n",
+ slapi_log_error(SLAPI_LOG_ERR, "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, LOG_DEBUG, ENTRYRDN_TAG,
- "entryrdn_rename_subtree: %s does not belong "
- "to the db\n", slapi_sdn_get_dn(mynewsupsdn));
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "entryrdn_rename_subtree",
+ "%s does not belong to the db\n", slapi_sdn_get_dn(mynewsupsdn));
rc = DB_NOTFOUND;
goto bail;
}
@@ -654,9 +631,8 @@ 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, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_rename_subtree: Failed to read "
- "the element of new superior \"%s\" (%d)\n",
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_rename_subtree",
+ "Failed to read the element of new superior \"%s\" (%d)\n",
slapi_sdn_get_dn(mynewsupsdn), rc);
goto bail;
}
@@ -671,9 +647,8 @@ entryrdn_rename_subtree(backend *be,
&oldsupelem, NULL, 0/*flags*/, db_txn);
}
if (rc || NULL == targetelem) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_rename_subtree: Failed to read "
- "the target element \"%s\" (%d)\n",
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_rename_subtree",
+ "Failed to read the target element \"%s\" (%d)\n",
slapi_sdn_get_dn(oldsdn), rc);
goto bail;
}
@@ -733,9 +708,8 @@ 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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "entryrdn_rename_subtree: Adding %s failed; "
- "%s(%d)\n", keybuf, dblayer_strerror(rc), rc);
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "entryrdn_rename_subtree",
+ "Adding %s failed; %s(%d)\n", keybuf, dblayer_strerror(rc), rc);
goto bail;
}
if (childelems) {
@@ -799,10 +773,8 @@ 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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "entryrdn_rename_subtree: Adding "
- "%s failed; %s(%d)\n",
- keybuf, dblayer_strerror(rc), rc);
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "entryrdn_rename_subtree",
+ "Adding %s failed; %s(%d)\n", keybuf, dblayer_strerror(rc), rc);
goto bail;
}
}
@@ -834,9 +806,8 @@ 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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "entryrdn_rename_subtree: Adding %s failed; "
- "%s(%d)\n", keybuf, dblayer_strerror(rc), rc);
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "entryrdn_rename_subtree",
+ "Adding %s failed; %s(%d)\n", keybuf, dblayer_strerror(rc), rc);
goto bail;
}
}
@@ -912,9 +883,8 @@ 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_SEVLEVEL(myrc), ENTRYRDN_TAG,
- "entryrdn_rename_subtree: Failed to close cursor: %s(%d)\n",
- dblayer_strerror(myrc), myrc);
+ slapi_log_error(ENTRYRDN_LOGLEVEL(myrc), "entryrdn_rename_subtree",
+ "Failed to close cursor: %s(%d)\n", dblayer_strerror(myrc), myrc);
if ((DB_LOCK_DEADLOCK == myrc) && !db_txn) {
ENTRYRDN_DELAY;
continue;
@@ -930,17 +900,16 @@ bail:
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_rename_subtree: Failed to close cursor after [%d] retries.\n",
- db_retry);
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_rename_subtree",
+ "Failed to close cursor after [%d] retries.\n", db_retry);
rc = rc ? rc : DB_LOCK_DEADLOCK;
}
}
if (db) {
dblayer_release_index_file(be, ai, db);
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
- "<-- entryrdn_rename_subtree\n");
+ slapi_log_error(SLAPI_LOG_TRACE, "entryrdn_rename_subtree",
+ "<-- entryrdn_rename_subtree\n");
return rc;
}
@@ -970,12 +939,12 @@ entryrdn_get_subordinates(backend *be,
rdn_elem **cep = NULL;
int db_retry = 0;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "entryrdn_get_subordinates",
"--> entryrdn_get_subordinates\n");
if (NULL == be || NULL == sdn || 0 == id) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_get_subordinates: Param error: Empty %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_get_subordinates",
+ "Param error: Empty %s\n",
NULL==be?"backend":NULL==sdn?"dn":0==id?"id":"unknown");
goto bail;
}
@@ -989,14 +958,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, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_get_subordinates: Failed to convert "
- "\"%s\" to Slapi_RDN\n", slapi_sdn_get_dn(sdn));
+ slapi_log_error(SLAPI_LOG_ERR, "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, LOG_DEBUG, ENTRYRDN_TAG,
- "entryrdn_get_subordinates: %s does not belong to "
- "the db\n", slapi_sdn_get_dn(sdn));
+ slapi_log_error(SLAPI_LOG_TRACE, "entryrdn_get_subordinates",
+ "%s does not belong to the db\n", slapi_sdn_get_dn(sdn));
rc = DB_NOTFOUND;
}
goto bail;
@@ -1005,17 +972,16 @@ 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, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_get_subordinates: Empty RDN\n");
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_get_subordinates",
+ "Empty RDN\n");
goto bail;
}
/* Open the entryrdn index */
rc = _entryrdn_open_index(be, &ai, &db);
if (rc || (NULL == db)) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_get_subordinates: Opening the index failed: "
- "%s(%d)\n",
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_get_subordinates",
+ "Opening the index failed: %s(%d)\n",
rc<0?dblayer_strerror(rc):"Invalid parameter", rc);
db = NULL;
goto bail;
@@ -1025,9 +991,8 @@ 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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "entryrdn_get_subordinates: Failed to make a cursor: %s(%d)\n",
- dblayer_strerror(rc), rc);
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "entryrdn_get_subordinates",
+ "Failed to make a cursor: %s(%d)\n", dblayer_strerror(rc), rc);
if ((DB_LOCK_DEADLOCK == rc) && !db_txn) {
ENTRYRDN_DELAY;
continue;
@@ -1039,9 +1004,8 @@ entryrdn_get_subordinates(backend *be,
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_get_subordinates: Failed to make a cursor after [%d] retries\n",
- db_retry);
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_get_subordinates",
+ "Failed to make a cursor after [%d] retries\n", db_retry);
rc = DB_LOCK_DEADLOCK;
goto bail;
}
@@ -1057,9 +1021,9 @@ 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, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_get_subordinates: Appending %d to idl "
- "for direct children failed (%d)\n", childid, rc);
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_get_subordinates",
+ "Appending %d to idl for direct children failed (%d)\n",
+ childid, rc);
goto bail;
}
@@ -1067,9 +1031,8 @@ 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, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_get_subordinates: Appending %d to idl "
- "for indirect children failed (%d)\n",
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_get_subordinates",
+ "Appending %d to idl for indirect children failed (%d)\n",
childid, rc);
goto bail;
}
@@ -1094,9 +1057,8 @@ 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_SEVLEVEL(myrc), ENTRYRDN_TAG,
- "entryrdn_get_subordinates: Failed to close cursor: %s(%d)\n",
- dblayer_strerror(myrc), myrc);
+ slapi_log_error(ENTRYRDN_LOGLEVEL(myrc), "entryrdn_get_subordinates",
+ "Failed to close cursor: %s(%d)\n", dblayer_strerror(myrc), myrc);
if ((DB_LOCK_DEADLOCK == myrc) && !db_txn) {
ENTRYRDN_DELAY;
continue;
@@ -1112,9 +1074,8 @@ bail:
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_get_subordinates: Failed to close cursor after [%d] retries\n",
- db_retry);
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_get_subordinates",
+ "Failed to close cursor after [%d] retries\n", db_retry);
rc = rc ? rc : DB_LOCK_DEADLOCK;
goto bail;
}
@@ -1123,7 +1084,7 @@ bail:
if (db) {
dblayer_release_index_file(be, ai, db);
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "entryrdn_get_subordinates",
"<-- entryrdn_get_subordinates\n");
return rc;
}
@@ -1158,12 +1119,12 @@ entryrdn_lookup_dn(backend *be,
int maybesuffix = 0;
int db_retry = 0;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "entryrdn_lookup_dn",
"--> entryrdn_lookup_dn\n");
if (NULL == be || NULL == rdn || 0 == id || NULL == dn) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_lookup_dn: Param error: Empty %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_lookup_dn",
+ "Param error: Empty %s\n",
NULL==be?"backend":NULL==rdn?"rdn":0==id?"id":
NULL==dn?"dn container":"unknown");
return rc;
@@ -1174,9 +1135,8 @@ 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, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_lookup_dn: Opening the index failed: "
- "%s(%d)\n",
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_lookup_dn",
+ "Opening the index failed: %s(%d)\n",
rc<0?dblayer_strerror(rc):"Invalid parameter", rc);
return rc;
}
@@ -1186,9 +1146,8 @@ 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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "entryrdn_lookup_dn: Failed to make a cursor: %s(%d)\n",
- dblayer_strerror(rc), rc);
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "entryrdn_lookup_dn",
+ "Failed to make a cursor: %s(%d)\n", dblayer_strerror(rc), rc);
if (DB_LOCK_DEADLOCK == rc) {
#ifdef FIX_TXN_DEADLOCKS
#error if txn != NULL, have to retry the entire transaction
@@ -1206,8 +1165,8 @@ 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, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_get_parent: Failed to normalize %s\n", rdn);
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_lookup_dn",
+ "Failed to normalize %s\n", rdn);
goto bail;
}
if (rc == 0) { /* orignrdn is passed in */
@@ -1233,13 +1192,13 @@ retry_get0:
if (rc) {
if (DB_LOCK_DEADLOCK == rc) {
if (db_txn) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
- "entryrdn_get_parent: cursor get deadlock while under txn -> failure\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "entryrdn_lookup_dn",
+ "Cursor got deadlock while under txn -> failure\n");
goto bail;
} else {
/* try again */
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
- "entryrdn_get_parent: cursor get deadlock\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "entryrdn_lookup_dn",
+ "Cursor deadlocked, trying again.\n");
goto retry_get0;
}
} else if (DB_NOTFOUND == rc) { /* could be a suffix or
@@ -1254,12 +1213,12 @@ retry_get1:
if (rc) {
if (DB_LOCK_DEADLOCK == rc) {
if (db_txn) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
- "entryrdn_get_parent: cursor get deadlock while under txn -> failure\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "entryrdn_lookup_dn",
+ "Cursor get deadlock while under txn -> failure\n");
} else {
/* try again */
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
- "entryrdn_get_parent: retry cursor get deadlock\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "entryrdn_lookup_dn",
+ "Cursor deadlockrf, trying again.\n");
goto retry_get1;
}
} else if (DB_NOTFOUND != rc) {
@@ -1309,9 +1268,8 @@ 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_SEVLEVEL(myrc), ENTRYRDN_TAG,
- "entryrdn_lookup_dn: Failed to close cursor: %s(%d)\n",
- dblayer_strerror(myrc), myrc);
+ slapi_log_error(ENTRYRDN_LOGLEVEL(myrc), "entryrdn_lookup_dn",
+ "Failed to close cursor: %s(%d)\n", dblayer_strerror(myrc), myrc);
if (DB_LOCK_DEADLOCK == myrc) {
#ifdef FIX_TXN_DEADLOCKS
#error if txn != NULL, have to retry the entire transaction
@@ -1339,7 +1297,7 @@ bail:
}
slapi_ch_free_string(&nrdn);
slapi_ch_free_string(&keybuf);
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "entryrdn_lookup_dn",
"<-- entryrdn_lookup_dn\n");
return rc;
}
@@ -1373,15 +1331,15 @@ entryrdn_get_parent(backend *be,
rdn_elem *elem = NULL;
int db_retry = 0;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "entryrdn_get_parent",
"--> 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, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_get_parent: Param error: Empty %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_get_parent",
+ "Param error: Empty %s\n",
NULL==be?"backend":NULL==rdn?"rdn":0==id?"id":
NULL==rdn?"rdn container":
NULL==pid?"pid":"unknown");
@@ -1393,9 +1351,8 @@ 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, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_get_parent: Opening the index failed: "
- "%s(%d)\n",
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_get_parent",
+ "Opening the index failed: %s(%d)\n",
rc<0?dblayer_strerror(rc):"Invalid parameter", rc);
return rc;
}
@@ -1404,9 +1361,8 @@ 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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "entryrdn_get_parent: Failed to make a cursor: %s(%d)\n",
- dblayer_strerror(rc), rc);
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "entryrdn_get_parent",
+ "Failed to make a cursor: %s(%d)\n", dblayer_strerror(rc), rc);
if (DB_LOCK_DEADLOCK == rc) {
#ifdef FIX_TXN_DEADLOCKS
#error if txn != NULL, have to retry the entire transaction
@@ -1423,8 +1379,8 @@ 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, LOG_ERR, ENTRYRDN_TAG,
- "entryrdn_get_parent: Failed to normalize %s\n", rdn);
+ slapi_log_error(SLAPI_LOG_ERR, "entryrdn_get_parent",
+ "Failed to normalize %s\n", rdn);
goto bail;
}
if (rc == 0) { /* orignrdn is passed in */
@@ -1448,11 +1404,11 @@ retry_get0:
if (rc) {
if (DB_LOCK_DEADLOCK == rc) {
if (db_txn) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
- "entryrdn_get_parent: cursor get deadlock while under txn -> failure\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "entryrdn_get_parent",
+ "Cursor get deadlock while under txn -> failure\n");
} else {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
- "entryrdn_get_parent: cursor get deadlock\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "entryrdn_get_parent",
+ "Cursor deadlocked, trying again.\n");
/* try again */
goto retry_get0;
}
@@ -1468,12 +1424,12 @@ retry_get1:
if (rc) {
if (DB_LOCK_DEADLOCK == rc) {
if (db_txn) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
- "entryrdn_get_parent: cursor get deadlock while under txn -> failure\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "entryrdn_get_parent",
+ "Cursor get deadlock while under txn -> failure\n");
} else {
/* try again */
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
- "entryrdn_get_parent: retry cursor get deadlock\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "entryrdn_get_parent",
+ "Cursor deadlocked, trying again.\n");
goto retry_get1;
}
} else if (DB_NOTFOUND != rc) {
@@ -1503,9 +1459,8 @@ 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_SEVLEVEL(myrc), ENTRYRDN_TAG,
- "entryrdn_get_parent: Failed to close cursor: %s(%d)\n",
- dblayer_strerror(myrc), myrc);
+ slapi_log_error(ENTRYRDN_LOGLEVEL(myrc), "entryrdn_get_parent",
+ "Failed to close cursor: %s(%d)\n", dblayer_strerror(myrc), myrc);
if (DB_LOCK_DEADLOCK == myrc) {
#ifdef FIX_TXN_DEADLOCKS
#error if txn != NULL, have to retry the entire transaction
@@ -1526,8 +1481,8 @@ bail:
}
/* it is guaranteed that db is not NULL. */
dblayer_release_index_file(be, ai, db);
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
- "<-- entryrdn_get_parent\n");
+ slapi_log_error(SLAPI_LOG_TRACE, "entryrdn_get_parent",
+ "<-- entryrdn_get_parent\n");
return rc;
}
@@ -1552,12 +1507,11 @@ _entryrdn_new_rdn_elem(backend *be,
size_t nrdn_len = 0;
rdn_elem *re = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_new_rdn_elem",
"--> _entryrdn_new_rdn_elem\n");
if (NULL == srdn || NULL == be) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_new_rdn_elem: Empty %s\n",
- NULL==srdn?"RDN":NULL==be?"backend":"unknown");
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_new_rdn_elem",
+ "Empty %s\n", NULL==srdn?"RDN":NULL==be?"backend":"unknown");
*length = 0;
return NULL;
}
@@ -1566,9 +1520,8 @@ _entryrdn_new_rdn_elem(backend *be,
nrdn = slapi_rdn_get_nrdn(srdn);
if (NULL == rdn || NULL == nrdn) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_new_rdn_elem: Empty rdn (%s) or "
- "normalized rdn (%s)\n", rdn?rdn:"",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_new_rdn_elem",
+ "Empty rdn (%s) or normalized rdn (%s)\n", rdn?rdn:"",
nrdn?nrdn:"");
*length = 0;
return NULL;
@@ -1584,8 +1537,8 @@ _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, LOG_DEBUG, ENTRYRDN_TAG,
- "<-- _entryrdn_new_rdn_elem\n");
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_new_rdn_elem",
+ "<-- _entryrdn_new_rdn_elem\n");
return re;
}
@@ -1612,19 +1565,19 @@ static void
_entryrdn_dump_rdn_elem(rdn_elem *elem)
{
if (NULL == elem) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG, "RDN ELEMENT: empty\n");
+ slapi_log_error(SLAPI_LOG_DEBUG, "_entryrdn_dump_rdn_elem", "RDN ELEMENT: empty\n");
return;
}
- 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",
+ slapi_log_error(SLAPI_LOG_DEBUG, "_entryrdn_dump_rdn_elem", "RDN ELEMENT:\n");
+ slapi_log_error(SLAPI_LOG_DEBUG, "_entryrdn_dump_rdn_elem", " ID: %u\n",
id_stored_to_internal(elem->rdn_elem_id));
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG, " RDN: \"%s\"\n",
+ slapi_log_error(SLAPI_LOG_DEBUG, "_entryrdn_dump_rdn_elem", " RDN: \"%s\"\n",
RDN_ADDR(elem));
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG, " RDN length: %u\n",
+ slapi_log_error(SLAPI_LOG_DEBUG, "_entryrdn_dump_rdn_elem", " RDN length: %u\n",
sizeushort_stored_to_internal(elem->rdn_elem_rdn_len));
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG, " Normalized RDN: \"%s\"\n",
+ slapi_log_error(SLAPI_LOG_DEBUG, "_entryrdn_dump_rdn_elem", " Normalized RDN: \"%s\"\n",
elem->rdn_elem_nrdn_rdn);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG, " Normalized RDN length: %u\n",
+ slapi_log_error(SLAPI_LOG_DEBUG, "_entryrdn_dump_rdn_elem", " Normalized RDN length: %u\n",
sizeushort_stored_to_internal(elem->rdn_elem_nrdn_len));
return;
}
@@ -1637,8 +1590,8 @@ _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, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_open_index: Param error: Empty %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_open_index",
+ "Param error: Empty %s\n",
NULL==be?"be":NULL==ai?"attrinfo container":
NULL==dbp?"db container":"unknown");
goto bail;
@@ -1653,7 +1606,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, LOG_ERR, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_open_index",
"Encrypting entryrdn is not supported. "
"Ignoring the configuration entry \"dn: "
"cn=entryrdn, cn=encrypted attributes, cn=<backend>, "
@@ -1681,16 +1634,16 @@ _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, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_encrypt_key",
"--> _entryrdn_encrypt_key\n");
if (NULL == key) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG, "Empty key\n");
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_encrypt_key", "Empty key\n");
goto bail;
}
if (NULL == be || NULL == key || NULL == ai) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_encrypt_key: Param error: Empty %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_encrypt_key",
+ "Param error: Empty %s\n",
NULL==be?"be":NULL==key?"key":
NULL==ai?"attrinfo":"unknown");
goto bail;
@@ -1699,11 +1652,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, LOG_ERR, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_encrypt_key",
"Failed to encrypt index key for %s\n", key);
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_encrypt_key",
"<-- _entryrdn_encrypt_key\n");
return encrypted_val;
}
@@ -1716,16 +1669,16 @@ _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, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_decrypt_key",
"--> _entryrdn_decrypt_key\n");
if (NULL == key) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG, "Empty key\n");
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_decrypt_key", "Empty key\n");
goto bail;
}
if (NULL == be || NULL == key || NULL == ai) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_encrypt_key: Param error: Empty %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_decrypt_key",
+ "Param error: Empty %s\n",
NULL==be?"be":NULL==key?"key":
NULL==ai?"attrinfo":"unknown");
goto bail;
@@ -1739,11 +1692,11 @@ _entryrdn_decrypt_key(backend *be, const char *key, struct attrinfo *ai)
ber_bvfree(decrypted_val);
goto bail;
}
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_decrypt_key",
"Failed to decrypt index key for %s\n", key);
bail:
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_decrypt_key",
"<-- _detryrdn_encrypt_key\n");
return decrypted;
}
@@ -1765,11 +1718,11 @@ _entryrdn_get_elem(DBC *cursor,
int rc = 0;
void *ptr = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG, "--> _entryrdn_get_elem\n");
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_get_elem", "--> _entryrdn_get_elem\n");
if (NULL == cursor || NULL == key || NULL == data || NULL == elem ||
NULL == comp_key) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_get_elem: Param error: Empty %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_get_elem",
+ "Param error: Empty %s\n",
NULL==cursor?"cursor":NULL==key?"key":
NULL==data?"data":NULL==elem?"elem container":
NULL==comp_key?"key to compare":"unknown");
@@ -1783,11 +1736,11 @@ retry_get:
if (rc) {
if (DB_LOCK_DEADLOCK == rc) {
if (db_txn) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_get_elem: cursor get deadlock while under txn -> failure\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_get_elem",
+ "Cursor get deadlock while under txn -> failure\n");
} else {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_get_elem: cursor get deadlock\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_get_elem",
+ "Cursor deadlocked, trying again.\n");
/* try again */
goto retry_get;
}
@@ -1817,7 +1770,7 @@ retry_get:
slapi_ch_free(&ptr);
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG, "<-- _entryrdn_get_elem\n");
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_get_elem", "<-- _entryrdn_get_elem\n");
return rc;
}
@@ -1834,12 +1787,12 @@ _entryrdn_get_tombstone_elem(DBC *cursor,
rdn_elem *childelem = NULL;
char buffer[RDN_BULK_FETCH_BUFFER_SIZE];
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_get_tombstone_elem",
"--> _entryrdn_get_tombstone_elem\n");
if (NULL == cursor || NULL == srdn || NULL == key || NULL == elem ||
NULL == comp_key) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_get_tombstone_elem: Param error: Empty %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_get_tombstone_elem",
+ "Param error: Empty %s\n",
NULL==cursor?"cursor":NULL==key?"key":
NULL==srdn?"srdn":NULL==elem?"elem container":
NULL==comp_key?"key to compare":"unknown");
@@ -1859,13 +1812,13 @@ 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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_get_tombstone_elem: cursor get deadlock while under txn -> failure\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_get_tombstone_elem",
+ "Cursor get deadlock while under txn -> failure\n");
goto bail;
} else {
/* try again */
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_get_tombstone_elem: cursor get deadlock\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_get_tombstone_elem",
+ "Cursor deadlocked, trying again.\n");
goto retry_get0;
}
@@ -1918,13 +1871,13 @@ 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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_get_tombstone_elem: cursor get deadlock while under txn -> failure\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_get_tombstone_elem",
+ "Cursor get deadlock while under txn -> failure\n");
goto bail;
} else {
/* try again */
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_get_tombstone_elem: retry cursor get deadlock\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_get_tombstone_elem",
+ "Cursor deadlocked, trying again.\n");
goto retry_get1;
}
} else if (DB_NOTFOUND == rc) {
@@ -1938,7 +1891,7 @@ retry_get1:
} while (0 == rc);
bail:
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_get_tombstone_elem",
"<-- _entryrdn_get_tombstone_elem\n");
return rc;
}
@@ -1949,11 +1902,11 @@ _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, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_put_data",
"--> _entryrdn_put_data\n");
if (NULL == cursor || NULL == key || NULL == data) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_put_data: Param error: Empty %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_put_data",
+ "Param error: Empty %s\n",
NULL==cursor?"cursor":NULL==key?"key":
NULL==data?"data":"unknown");
goto bail;
@@ -1964,9 +1917,8 @@ _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, LOG_DEBUG, ENTRYRDN_TAG,
- "_entryrdn_put_data: The same key (%s) and the "
- "data exists in index\n",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "_entryrdn_put_data",
+ "The same key (%s) and the data exists in index\n",
(char *)key->data);
break;
} else {
@@ -1978,9 +1930,8 @@ _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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_put_data: Adding the %s link (%s) "
- "failed: %s (%d)\n", keyword, (char *)key->data,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_put_data",
+ "Adding the %s link (%s) failed: %s (%d)\n", keyword, (char *)key->data,
dblayer_strerror(rc), rc);
if ((DB_LOCK_DEADLOCK == rc) && !db_txn) {
ENTRYRDN_DELAY;
@@ -1993,13 +1944,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, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_put_data: cursor put operation failed after [%d] retries\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_put_data",
+ "Cursor put operation failed after [%d] retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG, "<-- _entryrdn_put_data\n");
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_put_data", "<-- _entryrdn_put_data\n");
return rc;
}
@@ -2009,11 +1960,11 @@ _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, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_del_data",
"--> _entryrdn_del_data\n");
if (NULL == cursor || NULL == key || NULL == data) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_del_data: Param error: Empty %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_del_data",
+ "Param error: Empty %s\n",
NULL==cursor?"cursor":NULL==key?"key":
NULL==data?"data":"unknown");
goto bail;
@@ -2023,8 +1974,8 @@ _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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_del_data: cursor get deadlock\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_del_data",
+ "Cursor deadlocked, trying again.\n");
/* try again */
} else if (DB_NOTFOUND == rc) {
rc = 0; /* not found is ok */
@@ -2039,8 +1990,8 @@ _entryrdn_del_data(DBC *cursor, DBT *key, DBT *data, DB_TXN *db_txn)
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_del_data: cursor get failed after [%d] retries\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_del_data",
+ "Cursor get failed after [%d] retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
goto bail;
@@ -2050,9 +2001,8 @@ _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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_del_data: Deleting %s failed; "
- "%s(%d)\n", (char *)key->data,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_del_data",
+ "Deleting %s failed; %s(%d)\n", (char *)key->data,
dblayer_strerror(rc), rc);
if ((DB_LOCK_DEADLOCK == rc) && !db_txn) {
ENTRYRDN_DELAY;
@@ -2064,13 +2014,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, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_del_data: cursor del failed after [%d] retries\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_del_data",
+ "Cursor del failed after [%d] retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_del_data",
"<-- _entryrdn_del_data\n");
return rc;
}
@@ -2093,13 +2043,13 @@ _entryrdn_insert_key_elems(backend *be,
int rc = 0;
ID myid = 0;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_insert_key_elems",
"--> _entryrdn_insert_key_elems\n");
if (NULL == be || NULL == cursor || NULL == srdn ||
NULL == key || NULL == parentelem || NULL == elem) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_insert_key_elem: Param error: Empty %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_insert_key_elems",
+ "Param error: Empty %s\n",
NULL==be?"backend":NULL==cursor?"cursor":NULL==srdn?"RDN":
NULL==key?"key":NULL==parentelem?"parent element":
NULL==elem?"target element":"unknown");
@@ -2158,7 +2108,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, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_insert_key_elems",
"<-- _entryrdn_insert_key_elems\n");
return rc;
}
@@ -2191,9 +2141,10 @@ _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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_replace_suffix_id: Adding suffix %s failed: "
- "%s (%d)\n", normsuffix, dblayer_strerror(rc), rc);
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc),
+ "_entryrdn_replace_suffix_id",
+ "Adding suffix %s failed: %s (%d)\n",
+ normsuffix, dblayer_strerror(rc), rc);
if ((DB_LOCK_DEADLOCK == rc) && !db_txn) {
ENTRYRDN_DELAY;
continue;
@@ -2204,8 +2155,8 @@ _entryrdn_replace_suffix_id(DBC *cursor, DBT *key, DBT *adddata,
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_replace_suffix_id: cursor put failed after [%d] retries\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_replace_suffix_id",
+ "Cursor put failed after [%d] retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
goto bail;
@@ -2237,8 +2188,8 @@ _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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_replace_suffix_id: cursor get deadlock\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_replace_suffix_id",
+ "Cursor get deadlocked, trying again.\n");
/* try again */
ENTRYRDN_DELAY;
} else if (rc) {
@@ -2250,8 +2201,8 @@ _entryrdn_replace_suffix_id(DBC *cursor, DBT *key, DBT *adddata,
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_replace_suffix_id: cursor get1 failed after [%d] retries\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_replace_suffix_id",
+ "Cursor get1 failed after [%d] retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
goto bail;
@@ -2296,8 +2247,8 @@ _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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_replace_suffix_id: retry cursor get deadlock\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_replace_suffix_id",
+ "Retry cursor get deadlock\n");
/* try again */
ENTRYRDN_DELAY;
} else if (!rc || (DB_NOTFOUND == rc)) {
@@ -2309,8 +2260,8 @@ _entryrdn_replace_suffix_id(DBC *cursor, DBT *key, DBT *adddata,
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_replace_suffix_id: cursor get2 failed after [%d] retries\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_replace_suffix_id",
+ "Cursor get2 failed after [%d] retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
goto bail0;
@@ -2344,8 +2295,8 @@ _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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_replace_suffix_id: retry2 cursor get deadlock\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_replace_suffix_id",
+ "Retry2 cursor get deadlock\n");
ENTRYRDN_DELAY;
} else {
_entryrdn_cursor_print_error("_entryrdn_replace_suffix_id",
@@ -2357,8 +2308,8 @@ _entryrdn_replace_suffix_id(DBC *cursor, DBT *key, DBT *adddata,
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_replace_suffix_id: cursor get3 failed after [%d] retries\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_replace_suffix_id",
+ "Cursor get3 failed after [%d] retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
goto bail0;
@@ -2371,8 +2322,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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_replace_suffix_id: "
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_replace_suffix_id",
"Fixing the parent link (%s) failed: %s (%d)\n",
keybuf, dblayer_strerror(rc), rc);
if ((DB_LOCK_DEADLOCK == rc) && !db_txn) {
@@ -2385,9 +2335,8 @@ _entryrdn_replace_suffix_id(DBC *cursor, DBT *key, DBT *adddata,
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_replace_suffix_id: cursor put failed after [%d] retries\n",
- db_retry);
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_replace_suffix_id",
+ "Cursor put failed after [%d] retries\n", db_retry);
rc = DB_LOCK_DEADLOCK;
goto bail0;
}
@@ -2435,12 +2384,12 @@ _entryrdn_insert_key(backend *be,
Slapi_RDN *tmpsrdn = NULL;
int db_retry = 0;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_insert_key",
"--> _entryrdn_insert_key\n");
if (NULL == be || NULL == cursor || NULL == srdn || 0 == id) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_insert_key: Param error: Empty %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_insert_key",
+ "Param error: Empty %s\n",
NULL==be?"backend":NULL==cursor?"cursor":NULL==srdn?"RDN":
0==id?"id":"unknown");
goto bail;
@@ -2449,8 +2398,8 @@ _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, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_insert_key: Empty RDN\n");
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_insert_key",
+ "Empty RDN\n");
goto bail;
}
@@ -2464,8 +2413,8 @@ _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, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_insert_key: Failed to generate an elem: "
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_insert_key",
+ "Failed to generate an elem: "
"id: %d, rdn: %s\n",
id, slapi_rdn_get_rdn(srdn));
goto bail;
@@ -2489,9 +2438,8 @@ _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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_insert_key: Get existing suffix %s "
- "failed: %s (%d)\n",
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_insert_key",
+ "Get existing suffix %s failed: %s (%d)\n",
nrdn, dblayer_strerror(rc), rc);
if ((DB_LOCK_DEADLOCK == rc) && !db_txn) {
ENTRYRDN_DELAY;
@@ -2503,9 +2451,8 @@ _entryrdn_insert_key(backend *be,
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_insert_key: cursor get failed after [%d] retries\n",
- db_retry);
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_insert_key",
+ "Cursor get failed after [%d] retries\n", db_retry);
rc = DB_LOCK_DEADLOCK;
goto bail;
}
@@ -2521,8 +2468,8 @@ _entryrdn_insert_key(backend *be,
} /* if (TMPID == tmpid) */
rc = 0;
} /* if (DB_KEYEXIST == rc) */
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
- "_entryrdn_insert_key: Suffix %s added: %d\n",
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_insert_key",
+ "Suffix %s added: %d\n",
nrdn, rc);
goto bail; /* succeeded or failed, it's done */
}
@@ -2535,9 +2482,8 @@ _entryrdn_insert_key(backend *be,
if (rc) {
char *dn = NULL;
slapi_rdn_get_dn(srdn, &dn);
- 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_log_error(SLAPI_LOG_ERR, "_entryrdn_insert_key",
+ "Partial dup of %s (idx %d) failed (%d)\n", dn, rdnidx, rc);
slapi_ch_free_string(&dn);
goto bail;
}
@@ -2545,9 +2491,8 @@ _entryrdn_insert_key(backend *be,
if (NULL == elem) {
char *dn = NULL;
slapi_rdn_get_dn(tmpsrdn, &dn);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_insert_key: Failed to generate a new elem: "
- "dn: %s\n", dn);
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_insert_key",
+ "Failed to generate a new elem: dn: %s\n", dn);
slapi_ch_free_string(&dn);
goto bail;
}
@@ -2565,9 +2510,8 @@ _entryrdn_insert_key(backend *be,
int isexception = 0;
if ((rc == DB_LOCK_DEADLOCK) && db_txn) {
- 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);
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_insert_key",
+ "Suffix \"%s\" cursor get fails: %s(%d)\n", nrdn, dblayer_strerror(rc), rc);
goto bail;
}
/* Check the RDN is in the exception list */
@@ -2587,9 +2531,8 @@ _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, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_insert_key: Failed to generate an elem: "
- "id: %d, rdn: %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_insert_key",
+ "Failed to generate an elem: id: %d, rdn: %s\n",
suffixid, slapi_rdn_get_rdn(tmpsrdn));
goto bail;
}
@@ -2602,16 +2545,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, LOG_DEBUG, ENTRYRDN_TAG,
- "_entryrdn_insert_key: Suffix %s added: %d\n",
- slapi_rdn_get_rdn(tmpsrdn), rc);
+ slapi_log_error(SLAPI_LOG_TRACE, "_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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_insert_key: Suffix \"%s\" not found: "
- "%s(%d)\n", nrdn, dblayer_strerror(rc), rc);
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_insert_key",
+ "Suffix \"%s\" not found: %s(%d)\n", nrdn, dblayer_strerror(rc), rc);
goto bail;
}
}
@@ -2629,9 +2570,9 @@ _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, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_insert_key: RDN list \"%s\" is broken: "
- "idx(%d)\n", slapi_rdn_get_rdn(srdn), rdnidx);
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_insert_key",
+ "RDN list \"%s\" is broken: idx(%d)\n",
+ slapi_rdn_get_rdn(srdn), rdnidx);
goto bail;
}
/* Generate a key for child tree */
@@ -2647,9 +2588,8 @@ _entryrdn_insert_key(backend *be,
if (rc) {
char *dn = NULL;
slapi_rdn_get_dn(srdn, &dn);
- 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_log_error(SLAPI_LOG_ERR, "_entryrdn_insert_key",
+ "Partial dup of %s (idx %d) failed (%d)\n", dn, rdnidx, rc);
slapi_ch_free_string(&dn);
goto bail;
}
@@ -2658,9 +2598,8 @@ _entryrdn_insert_key(backend *be,
if (NULL == elem) {
char *dn = NULL;
slapi_rdn_get_dn(tmpsrdn, &dn);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_insert_key: Failed to generate a new elem: "
- "dn: %s\n", dn);
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_insert_key",
+ "Failed to generate a new elem: dn: %s\n", dn);
slapi_ch_free_string(&dn);
goto bail;
}
@@ -2676,9 +2615,10 @@ _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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_insert_key: Suffix \"%s\" cursor get fails: "
- "%s(%d)\n", childnrdn, dblayer_strerror(rc), rc);
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc),
+ "_entryrdn_insert_key",
+ "Suffix \"%s\" cursor get fails: %s(%d)\n",
+ childnrdn, dblayer_strerror(rc), rc);
goto bail;
} else if (DB_NOTFOUND == rc) {
/* if 0 == rdnidx, Child is a Leaf RDN to be added */
@@ -2710,13 +2650,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, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_insert_key: Node \"%s\" not found: "
- "%s(%d)\n", dn, dblayer_strerror(rc), rc);
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_insert_key",
+ "Node \"%s\" not found: %s(%d)\n", dn, dblayer_strerror(rc), rc);
} else {
- 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);
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_insert_key",
+ "Getting \"%s\" failed: %s(%d)\n", dn, dblayer_strerror(rc), rc);
}
slapi_ch_free_string(&dn);
goto bail;
@@ -2734,9 +2672,8 @@ _entryrdn_insert_key(backend *be,
} else {
char *dn = NULL;
slapi_rdn_get_dn(tmpsrdn, &dn);
- 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_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_insert_key",
+ "Suffix \"%s\" not found: %s(%d)\n", nrdn, dblayer_strerror(rc), rc);
slapi_ch_free_string(&dn);
goto bail;
}
@@ -2750,19 +2687,17 @@ _entryrdn_insert_key(backend *be,
/* already in the file */
/* do nothing and return. */
rc = 0;
- slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ENTRYRDN_TAG,
- "_entryrdn_insert_key: ID %d is already "
- "in the index. NOOP.\n", currid);
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "_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, LOG_ERR,
- ENTRYRDN_TAG,
- "_entryrdn_insert_key: Same DN (%s: %s) "
- "is already in the %s file with different ID "
- "%d. Expected ID is %d.\n",
- tmprc?"rdn":"dn", tmprc?childnrdn:dn,
- LDBM_ENTRYRDN_STR, currid, id);
+ slapi_log_error(SLAPI_LOG_ERR,
+ "_entryrdn_insert_key",
+ "Same DN (%s: %s) is already in the %s file with different ID "
+ "%d. Expected ID is %d.\n",
+ tmprc?"rdn":"dn", tmprc?childnrdn:dn,
+ LDBM_ENTRYRDN_STR, currid, id);
slapi_ch_free_string(&dn);
/* returning special error code for the upgrade */
rc = LDBM_ERROR_FOUND_DUPDN;
@@ -2788,7 +2723,7 @@ bail:
slapi_ch_free((void **)&elem);
slapi_ch_free((void **)&parentelem);
slapi_ch_free((void **)&childelem);
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_insert_key",
"<-- _entryrdn_insert_key\n");
return rc;
}
@@ -2823,12 +2758,12 @@ _entryrdn_delete_key(backend *be,
int done = 0;
char buffer[RDN_BULK_FETCH_BUFFER_SIZE];
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_delete_key",
"--> _entryrdn_delete_key\n");
if (NULL == be || NULL == cursor || NULL == srdn || 0 == id) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_delete_key: Param error: Empty %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_delete_key",
+ "Param error: Empty %s\n",
NULL==be?"backend":NULL==cursor?"cursor":NULL==srdn?"RDN":
0==id?"ID":"unknown");
goto bail;
@@ -2838,8 +2773,8 @@ _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, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_delete_key: Empty RDN\n");
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_delete_key",
+ "Empty RDN\n");
goto bail;
}
lastidx = slapi_rdn_get_last_ext(srdn, &suffix, FLAG_ALL_NRDNS);
@@ -2847,8 +2782,8 @@ _entryrdn_delete_key(backend *be,
issuffix = 1;
selfnrdn = suffix;
} else if (lastidx < 0 || NULL == suffix) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_delete_key: Empty suffix\n");
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_delete_key",
+ "Empty suffix\n");
goto bail;
}
@@ -2870,12 +2805,12 @@ _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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_delete_key: cursor get deadlock while under txn -> failure\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_delete_key",
+ "Cursor get deadlock while under txn -> failure\n");
goto bail;
} else {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_delete_key: cursor get deadlock\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_delete_key",
+ "Cursor get deadlock, trying again.\n");
/* try again */
continue;
}
@@ -2903,9 +2838,8 @@ _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, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_delete_key: Failed to remove %s; "
- "has a child %s\n", nrdn,
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_delete_key",
+ "Failed to remove %s; has a child %s\n", nrdn,
(char *)childelem->rdn_elem_nrdn_rdn);
rc = -1;
goto bail;
@@ -2915,12 +2849,12 @@ 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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_delete_key: cursor get deadlock while under txn -> failure\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_delete_key",
+ "Cursor get deadlock while under txn -> failure\n");
goto bail;
} else {
- slapi_log_error(ENTRYRDN_LOGLEVEL(rc), ENTRYRDN_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_delete_key: retry cursor get deadlock\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_delete_key",
+ "Cursor get deadlocked, trying again\n");
/* try again */
goto retry_get;
}
@@ -2950,9 +2884,8 @@ retry_get:
if (rc) {
char *dn = NULL;
slapi_rdn_get_dn(srdn, &dn);
- 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_log_error(SLAPI_LOG_ERR, "_entryrdn_delete_key",
+ "Partial dup of %s (idx %d) failed (%d)\n", dn, 1, rc);
slapi_ch_free_string(&dn);
goto bail;
}
@@ -2960,9 +2893,8 @@ retry_get:
if (NULL == elem) {
char *dn = NULL;
slapi_rdn_get_dn(tmpsrdn, &dn);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_delete_key: Failed to generate a parent "
- "elem: dn: %s\n", dn);
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_delete_key",
+ "Failed to generate a parent elem: dn: %s\n", dn);
slapi_ch_free_string(&dn);
slapi_rdn_free(&tmpsrdn);
goto bail;
@@ -2974,9 +2906,8 @@ retry_get:
if (NULL == elem) {
char *dn = NULL;
slapi_rdn_get_dn(srdn, &dn);
- 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_log_error(SLAPI_LOG_ERR, "_entryrdn_delete_key",
+ "Failed to generate a parent's child elem: dn: %s\n", dn);
slapi_ch_free_string(&dn);
goto bail;
}
@@ -2991,9 +2922,8 @@ retry_get:
if (NULL == elem) {
char *dn = NULL;
slapi_rdn_get_dn(srdn, &dn);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_delete_key: Failed to generate a target "
- "elem: dn: %s\n", dn);
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_delete_key",
+ "Failed to generate a target elem: dn: %s\n", dn);
slapi_ch_free_string(&dn);
goto bail;
}
@@ -3015,8 +2945,8 @@ retry_get:
}
if (rc) {
if (DB_NOTFOUND == rc) {
- slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ENTRYRDN_TAG,
- "_entryrdn_delete_key: No parent link %s\n", keybuf);
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "_entryrdn_delete_key",
+ "No parent link %s\n", keybuf);
goto bail;
} else {
/* There's no parent or positioning at parent failed */
@@ -3039,9 +2969,8 @@ 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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_delete_key: Deleting %s failed; "
- "%s(%d)\n", (char *)key.data,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_delete_key",
+ "Deleting %s failed; %s(%d)\n", (char *)key.data,
dblayer_strerror(rc), rc);
if ((DB_LOCK_DEADLOCK == rc) && !db_txn) {
ENTRYRDN_DELAY; /* sleep for a bit then retry immediately */
@@ -3053,8 +2982,8 @@ retry_get:
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_delete_key: delete parent link failed after [%d] retries\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_delete_key",
+ "Delete parent link failed after [%d] retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
goto bail;
@@ -3069,9 +2998,8 @@ 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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_delete_key: Deleting %s failed; "
- "%s(%d)\n", (char *)key.data,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_delete_key",
+ "Deleting %s failed; %s(%d)\n", (char *)key.data,
dblayer_strerror(rc), rc);
if ((DB_LOCK_DEADLOCK == rc) && !db_txn) {
ENTRYRDN_DELAY;
@@ -3083,8 +3011,8 @@ retry_get:
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_delete_key: delete parent's child link failed after [%d] retries\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_delete_key",
+ "Delete parent's child link failed after [%d] retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
goto bail;
@@ -3100,9 +3028,8 @@ 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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_delete_key: Deleting %s failed; "
- "%s(%d)\n", (char *)key.data,
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_delete_key",
+ "Deleting %s failed: %s(%d)\n", (char *)key.data,
dblayer_strerror(rc), rc);
if ((DB_LOCK_DEADLOCK == rc) && !db_txn) {
ENTRYRDN_DELAY;
@@ -3114,8 +3041,8 @@ retry_get:
}
}
if (RETRY_TIMES == db_retry) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_delete_key: delete self link failed after [%d] retries\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_delete_key",
+ "Delete self link failed after [%d] retries\n",
db_retry);
rc = DB_LOCK_DEADLOCK;
}
@@ -3127,7 +3054,7 @@ bail:
slapi_ch_free_string(&parentnrdn);
slapi_ch_free_string(&keybuf);
slapi_ch_free((void **)&elem);
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_delete_key",
"<-- _entryrdn_delete_key\n");
return rc;
}
@@ -3155,12 +3082,12 @@ _entryrdn_index_read(backend *be,
Slapi_RDN *tmpsrdn = NULL;
rdn_elem *tmpelem = NULL;
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_index_read",
"--> _entryrdn_index_read\n");
if (NULL == be || NULL == cursor ||
NULL == srdn || NULL == elem) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_index_read: Param error: Empty %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_index_read",
+ "Param error: Empty %s\n",
NULL==be?"backend":NULL==cursor?"cursor":NULL==srdn?"RDN":
NULL==elem?"elem container":"unknown");
goto bail;
@@ -3176,8 +3103,8 @@ _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, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_index_read: Empty RDN (Suffix)\n");
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_index_read",
+ "Empty RDN (Suffix)\n");
goto bail;
}
/* Setting up a key for suffix */
@@ -3193,9 +3120,9 @@ _entryrdn_index_read(backend *be,
if (rc) {
char *dn = NULL;
slapi_rdn_get_dn(srdn, &dn);
- 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_log_error(SLAPI_LOG_ERR, "_entryrdn_index_read",
+ "Partial dup of %s (idx %d) failed (%d)\n",
+ dn, rdnidx, rc);
slapi_ch_free_string(&dn);
goto bail;
}
@@ -3203,9 +3130,8 @@ _entryrdn_index_read(backend *be,
if (NULL == *elem) {
char *dn = NULL;
slapi_rdn_get_dn(tmpsrdn, &dn);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_index_read: Failed to generate a new elem: "
- "dn: %s\n", dn);
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_index_read",
+ "Failed to generate a new elem: dn: %s\n", dn);
slapi_ch_free_string(&dn);
slapi_rdn_free(&tmpsrdn);
goto bail;
@@ -3221,9 +3147,9 @@ _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, LOG_DEBUG, ENTRYRDN_TAG,
- "_entryrdn_index_read: Suffix \"%s\" cursor get fails: "
- "%s(%d)\n", nrdn, dblayer_strerror(rc), rc);
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "_entryrdn_index_read",
+ "Suffix \"%s\" cursor get fails: %s(%d)\n",
+ nrdn, dblayer_strerror(rc), rc);
slapi_rdn_free(&tmpsrdn);
goto bail;
}
@@ -3234,9 +3160,9 @@ _entryrdn_index_read(backend *be,
rdnidx--; /* consider nsuniqueid=..,<RDN> one RDN */
}
if (rc || NULL == *elem) {
- 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);
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "_entryrdn_index_read",
+ "Suffix \"%s\" not found: %s(%d)\n",
+ nrdn, dblayer_strerror(rc), rc);
rc = DB_NOTFOUND;
slapi_rdn_free(&tmpsrdn);
goto bail;
@@ -3262,8 +3188,8 @@ _entryrdn_index_read(backend *be,
#ifdef LDAP_DEBUG_ENTRYRDN
char *dn = NULL;
slapi_rdn_get_dn(srdn, &dn);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_index_read: done; DN %s => ID %d\n",
+ slapi_log_error(SLAPI_LOG_DEBUG, "_entryrdn_index_read",
+ "Done; DN %s => ID %d\n",
dn, id);
slapi_ch_free_string(&dn);
#endif
@@ -3277,9 +3203,9 @@ _entryrdn_index_read(backend *be,
if (rc) {
char *dn = NULL;
slapi_rdn_get_dn(srdn, &dn);
- 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_log_error(SLAPI_LOG_ERR, "_entryrdn_index_read",
+ "Partial dup of %s (idx %d) failed (%d)\n",
+ dn, rdnidx, rc);
slapi_ch_free_string(&dn);
goto bail;
}
@@ -3288,9 +3214,8 @@ _entryrdn_index_read(backend *be,
if (NULL == tmpelem) {
char *dn = NULL;
slapi_rdn_get_dn(tmpsrdn, &dn);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_index_read: Failed to generate a new elem: "
- "dn: %s\n", dn);
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_index_read",
+ "Failed to generate a new elem: dn: %s\n", dn);
slapi_ch_free_string(&dn);
if (tmpsrdn != srdn) {
slapi_rdn_free(&tmpsrdn);
@@ -3315,8 +3240,8 @@ _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, LOG_DEBUG, ENTRYRDN_TAG,
- "_entryrdn_index_read: Suffix \"%s\" cursor get fails: "
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "_entryrdn_index_read",
+ "Suffix \"%s\" cursor get fails: "
"%s(%d)\n", nrdn, dblayer_strerror(rc), rc);
if (tmpsrdn != srdn) {
slapi_rdn_free(&tmpsrdn);
@@ -3336,8 +3261,8 @@ _entryrdn_index_read(backend *be,
if (rc || (NULL == tmpelem)) {
slapi_ch_free((void **)&tmpelem);
if (DB_NOTFOUND != rc) {
- slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ENTRYRDN_TAG,
- "_entryrdn_index_read: Child link \"%s\" of "
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "_entryrdn_index_read",
+ "Child link \"%s\" of "
"key \"%s\" not found: %s(%d)\n",
childnrdn, keybuf, dblayer_strerror(rc), rc);
rc = DB_NOTFOUND;
@@ -3351,9 +3276,8 @@ _entryrdn_index_read(backend *be,
} else {
slapi_ch_free((void **)&tmpelem);
if (DB_NOTFOUND != rc) {
- slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, ENTRYRDN_TAG,
- "_entryrdn_index_read: Child link \"%s\" of "
- "key \"%s\" not found: %s(%d)\n",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "_entryrdn_index_read",
+ "Child link \"%s\" of key \"%s\" not found: %s(%d)\n",
childnrdn, keybuf, dblayer_strerror(rc), rc);
rc = DB_NOTFOUND;
}
@@ -3377,17 +3301,16 @@ _entryrdn_index_read(backend *be,
}
*elem = tmpelem;
#ifdef LDAP_DEBUG_ENTRYRDN
- 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);
+ slapi_log_error(SLAPI_LOG_DEBUG, "_entryrdn_index_read",
+ "%s matched normalized child rdn %s\n",
+ (*elem)->rdn_elem_nrdn_rdn, childnrdn);
#endif
id = id_stored_to_internal((*elem)->rdn_elem_id);
nrdn = childnrdn;
if (0 == id) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_index_read: Child %s of %s not found\n",
- childnrdn, nrdn);
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_index_read",
+ "Child %s of %s not found\n", childnrdn, nrdn);
break;
}
} while (rdnidx >= 0);
@@ -3412,8 +3335,8 @@ _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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_index_read: cursor get deadlock\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_index_read",
+ "Cursor get deadlock\n");
if (db_txn) {
goto bail;
} else {
@@ -3457,8 +3380,8 @@ 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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_index_read: retry cursor get deadlock\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_index_read",
+ "Retry cursor get deadlock\n");
if (db_txn) {
goto bail;
@@ -3482,7 +3405,7 @@ bail:
slapi_ch_free((void **)childelems);
}
slapi_ch_free_string(&keybuf);
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, ENTRYRDN_TAG,
+ slapi_log_error(SLAPI_LOG_TRACE, "_entryrdn_index_read",
"<-- _entryrdn_index_read\n");
return rc;
}
@@ -3516,8 +3439,8 @@ 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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_append_childidl: cursor get deadlock\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_append_childidl",
+ "Cursor get deadlock\n");
if (db_txn) {
goto bail;
} else {
@@ -3551,9 +3474,8 @@ 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, LOG_ERR, ENTRYRDN_TAG,
- "_entryrdn_append_childidl: Appending %d to "
- "affectedidl failed (%d)\n", myid, rc);
+ slapi_log_error(SLAPI_LOG_ERR, "_entryrdn_append_childidl",
+ "Appending %d to affected idl failed (%d)\n", myid, rc);
goto bail;
}
rc = _entryrdn_append_childidl(cursor,
@@ -3567,8 +3489,8 @@ 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_SEVLEVEL(rc), ENTRYRDN_TAG,
- "_entryrdn_append_childidl: retry cursor get deadlock\n");
+ slapi_log_error(ENTRYRDN_LOGLEVEL(rc), "_entryrdn_append_childidl",
+ "Retry cursor get deadlock\n");
if (db_txn) {
goto bail;
} else {
@@ -3595,13 +3517,13 @@ _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, LOG_ERR, ENTRYRDN_TAG,
- "%s: Entryrdn index is corrupt; data item for key %s "
+ slapi_log_error(SLAPI_LOG_ERR, NULL,
+ "%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, LOG_ERR, ENTRYRDN_TAG,
- "%s: Failed to position cursor at "
+ slapi_log_error(SLAPI_LOG_ERR, NULL,
+ "%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 532a190..73eff33 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, LOG_ERR, "Warning: malformed index entry %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_index_parse_entry - Malformed index entry %s\n",
slapi_entry_get_dn(e), 0, 0);
return LDAP_OPERATIONS_ERROR;
}
@@ -42,8 +42,8 @@ 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, LOG_ERR,
- "Warning: malformed index entry %s -- empty index name\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_index_parse_entry - Malformed index entry %s -- empty index name\n",
slapi_entry_get_dn(e), 0, 0);
return LDAP_OPERATIONS_ERROR;
}
@@ -58,8 +58,8 @@ 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, LOG_ERR,
- "Warning: malformed index entry %s -- empty nsIndexType\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_index_parse_entry - Malformed index entry %s -- empty nsIndexType\n",
slapi_entry_get_dn(e), 0, 0);
slapi_ch_free_string(index_name);
return LDAP_OPERATIONS_ERROR;
@@ -198,8 +198,8 @@ 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, LOG_ERR,
- "Warning: malformed index entry %s - missing cn attribute\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_instance_index_config_modify_callback - Malformed index entry %s - missing cn attribute\n",
slapi_entry_get_dn(entryAfter), 0, 0);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
return SLAPI_DSE_CALLBACK_ERROR;
@@ -208,8 +208,8 @@ 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, LOG_ERR,
- "Warning: malformed index entry %s, missing index name\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_instance_index_config_modify_callback - Malformed index entry %s, missing index name\n",
slapi_entry_get_dn(e), 0, 0);
*returncode = LDAP_UNWILLING_TO_PERFORM;
return SLAPI_DSE_CALLBACK_ERROR;
@@ -217,16 +217,16 @@ 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, LOG_ERR,
- "Warning: malformed index entry %s - missing cn attribute info\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_instance_index_config_modify_callback - Malformed index entry %s - missing cn attribute info\n",
slapi_entry_get_dn(e), 0, 0);
*returncode = LDAP_UNWILLING_TO_PERFORM;
return SLAPI_DSE_CALLBACK_ERROR;
}
if(slapi_entry_attr_find(entryAfter, "nsIndexType", &attr) != 0){
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Warning: malformed index entry %s - missing nsIndexType attribute\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_instance_index_config_modify_callback - Malformed index entry %s - missing nsIndexType attribute\n",
slapi_entry_get_dn(entryAfter), 0, 0);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
return SLAPI_DSE_CALLBACK_ERROR;
@@ -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, LOG_ERR, "Warning: malformed index entry %s, missing cn attrbiute\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_instance_config_add_index_entry - Malformed index entry %s, missing cn attrbiute\n",
slapi_entry_get_dn(e), 0, 0);
return -1;
}
@@ -267,8 +267,8 @@ 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, LOG_ERR,
- "Warning: malformed index entry %s, missing index name\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_instance_config_add_index_entry - Malformed index entry %s, missing index name\n",
slapi_entry_get_dn(e), 0, 0);
return -1;
}
@@ -277,9 +277,9 @@ 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, LOG_ERR,
- "ldbm_instance_config_add_index_entry: "
- "failed create index dn with type %s for plugin %s, "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_instance_config_add_index_entry - "
+ "Failed create index dn with type %s for plugin %s, "
"instance %s\n",
basetype, inst->inst_li->li_plugin->plg_name,
inst->inst_name);
@@ -304,9 +304,9 @@ int ldbm_instance_config_add_index_entry(
eBuf = PR_sprintf_append(eBuf, "nsIndexType: %s\n", attrValue->bv_val);
}
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm_instance_config_add_index_entry: "
- "failed create index dn with type %s for plugin %s, "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_instance_config_add_index_entry - "
+ "Failed create index dn with type %s for plugin %s, "
"instance %s. Missing nsIndexType\n",
basetype, inst->inst_li->li_plugin->plg_name,
inst->inst_name);
@@ -377,8 +377,9 @@ int ldbm_instance_create_default_user_indexes(ldbm_instance *inst)
int flags = LDBM_INSTANCE_CONFIG_DONT_WRITE;
if (NULL == inst) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Warning: can't initialize default user indexes (invalid instance).\n", 0,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_instance_create_default_user_indexes - "
+ "Can't initialize default user indexes (invalid instance).\n", 0,0,0);
return -1;
}
@@ -388,9 +389,9 @@ 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, LOG_ERR,
- "ldbm_instance_create_default_user_indexes: "
- "failed create default index dn for plugin %s\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "ldbm_instance_create_default_user_indexes - "
+ "Failed create default index dn for plugin %s\n",
inst->inst_li->li_plugin->plg_name);
return -1;
}
@@ -409,7 +410,8 @@ 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, LOG_ERR,"Warning: malformed index entry %s. Index ignored.\n",
+ LDAPDebug(LDAP_DEBUG_ERR,"ldbm_instance_create_default_user_indexes - "
+ "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 30ae832..ebbdce8 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, LOG_ERR, "Error: cachememsize value is too large.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "ldbm_instance_config_cachememsize_set - cachememsize value is too large.\n");
return LDAP_UNWILLING_TO_PERFORM;
}
}
@@ -151,8 +151,10 @@ ldbm_instance_config_dncachememsize_set(void *arg, void *value, char *errorbuf,
if (val > inst->inst_dncache.c_maxsize) {
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, LOG_ERR,"Error: dncachememsize value is too large.\n");
+ slapi_create_errormsg(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE,
+ "Error: dncachememsize value is too large.");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,"ldbm_instance_config_dncachememsize_set - "
+ "dncachememsize value is too large.\n");
return LDAP_UNWILLING_TO_PERFORM;
}
}
@@ -350,9 +352,9 @@ 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, LOG_ERR,
- "read_instance_index_entries: "
- "failed create index dn for plugin %s, instance %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_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);
return 1;
}
@@ -394,9 +396,9 @@ 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, LOG_ERR,
- "read_instance_attrcrypt_entries: "
- "failed create encrypted attributes dn for plugin %s, "
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "read_instance_attrcrypt_entries - "
+ "Failed create encrypted attributes dn for plugin %s, "
"instance %s\n",
inst->inst_li->li_plugin->plg_name, inst->inst_name);
return 1;
@@ -469,8 +471,9 @@ 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, LOG_ERR, "Error with config attribute %s : %s\n",
- attr_name, err_buf, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "parse_ldbm_instance_config_entry - "
+ "Error with config attribute %s : %s\n",
+ attr_name, err_buf, 0);
return 1;
}
}
@@ -511,9 +514,9 @@ 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, LOG_ERR,
- "ldbm_instance_config_load_dse_info: "
- "failed create instance dn %s for plugin %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_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);
rval = 1;
goto bail;
@@ -521,8 +524,8 @@ ldbm_instance_config_load_dse_info(ldbm_instance *inst)
search_pb = slapi_pblock_new();
if (!search_pb) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm_instance_config_load_dse_info: Out of memory\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_instance_config_load_dse_info - Out of memory\n",
0, 0, 0);
rval = 1;
goto bail;
@@ -535,7 +538,8 @@ 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, LOG_ERR, "Error accessing the config DSE\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_instance_config_load_dse_info - "
+ "Error accessing the config DSE entry (%s), error %d\n", dn, rval, 0);
rval = 1;
goto bail;
} else {
@@ -544,15 +548,15 @@ 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, LOG_ERR, "Error accessing the config DSE\n",
- 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_instance_config_load_dse_info - "
+ "No entries found in config DSE entry (%s)\n", dn, 0, 0);
rval = 1;
goto bail;
}
if (0 != parse_ldbm_instance_config_entry(inst, entries[0],
ldbm_instance_config)) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error parsing the config DSE\n",
- 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_instance_config_load_dse_info - "
+ "Error parsing the config DSE\n", 0, 0, 0);
rval = 1;
goto bail;
}
@@ -591,8 +595,8 @@ 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, LOG_ERR,
- "ldbm_instance_config_load_dse_info: "
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "ldbm_instance_config_load_dse_info - "
"failed create monitor instance dn for plugin %s, "
"instance %s\n",
inst->inst_li->li_plugin->plg_name, inst->inst_name);
@@ -616,8 +620,8 @@ 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, LOG_ERR,
- "ldbm_instance_config_load_dse_info: "
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "ldbm_instance_config_load_dse_info - "
"failed create index instance dn for plugin %s, "
"instance %s\n",
inst->inst_li->li_plugin->plg_name, inst->inst_name);
@@ -639,8 +643,8 @@ 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, LOG_ERR,
- "ldbm_instance_config_load_dse_info: "
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "ldbm_instance_config_load_dse_info - "
"failed create encrypted attribute instance dn "
"for plugin %s, instance %s\n",
inst->inst_li->li_plugin->plg_name, inst->inst_name);
@@ -759,10 +763,9 @@ ldbm_instance_modify_config_entry_callback(Slapi_PBlock *pb, Slapi_Entry* entryB
if (!returntext) {
rc = LDAP_OPERATIONS_ERROR;
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm_instance_modify_config_entry_callback: "
- "NULL return text\n",
- 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_instance_modify_config_entry_callback - "
+ "NULL return text\n", 0, 0, 0);
goto out;
}
@@ -781,10 +784,10 @@ 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, LOG_ERR,
- "ldbm: modify attempted to change the root suffix "
- "of a backend (which is not allowed)\n",
- 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_instance_modify_config_entry_callback - Modify attempted to "
+ "change the root suffix of a backend (which is not allowed)\n",
+ 0, 0, 0);
continue;
}
@@ -836,8 +839,9 @@ 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, LOG_ERR,
- "Internal Error: Error setting instance config attr %s to %s: %s\n",
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "ldbm_instance_config_internal_set - "
+ "Internal error setting instance config attr %s to %s: %s\n",
attrname, value, err_buf);
exit(1);
}
@@ -902,8 +906,8 @@ 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, LOG_ERR,
- "ldbm_instance_postadd_instance_entry_callback: "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_instance_postadd_instance_entry_callback - "
"ldbm_instance_generate (%s) failed (%d)\n",
instance_name, rval, 0);
}
@@ -922,8 +926,8 @@ ldbm_instance_postadd_instance_entry_callback(Slapi_PBlock *pb, Slapi_Entry* ent
rval = ldbm_instance_start(be);
if (0 != rval)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm_instance_postadd_instance_entry_callback: "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_instance_postadd_instance_entry_callback - "
"ldbm_instnace_start (%s) failed (%d)\n",
instance_name, rval, 0);
}
@@ -949,8 +953,8 @@ 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, LOG_ERR, "WARNING: ldbm instance %s already exists\n",
- instance_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_WARNING, "ldbm_instance_add_instance_entry_callback: "
+ " 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",
instance_name);
@@ -992,9 +996,9 @@ 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, LOG_ERR,
- "ldbm_instance_unregister_callbacks: "
- "failed create instance dn for plugin %s, "
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "ldbm_instance_unregister_callbacks - "
+ "Failed create instance dn for plugin %s, "
"instance %s\n",
inst->inst_li->li_plugin->plg_name, inst->inst_name);
goto bail;
@@ -1017,9 +1021,9 @@ 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, LOG_ERR,
- "ldbm_instance_unregister_callbacks: "
- "failed create monitor instance dn for plugin %s, "
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "ldbm_instance_unregister_callbacks - "
+ "Failed create monitor instance dn for plugin %s, "
"instance %s\n",
inst->inst_li->li_plugin->plg_name, inst->inst_name);
goto bail;
@@ -1036,9 +1040,9 @@ 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, LOG_ERR,
- "ldbm_instance_unregister_callbacks: "
- "failed create index dn for plugin %s, "
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "ldbm_instance_unregister_callbacks - "
+ "Failed create index dn for plugin %s, "
"instance %s\n",
inst->inst_li->li_plugin->plg_name, inst->inst_name);
goto bail;
@@ -1058,8 +1062,8 @@ 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, LOG_ERR,
- "ldbm_instance_unregister_callbacks: "
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "ldbm_instance_unregister_callbacks - "
"failed create encrypted attributes dn for plugin %s, "
"instance %s\n",
inst->inst_li->li_plugin->plg_name, inst->inst_name);
@@ -1092,10 +1096,10 @@ 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, LOG_ERR, "ldbm: instance '%s' does not exist! (2)\n",
- instance_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_instance_post_delete_instance_entry_callback - "
+ "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' (2)\n",
+ PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "No ldbm instance exists with the name '%s'\n",
instance_name);
}
if (returncode) {
@@ -1105,7 +1109,8 @@ ldbm_instance_post_delete_instance_entry_callback(Slapi_PBlock *pb, Slapi_Entry*
return SLAPI_DSE_CALLBACK_ERROR;
}
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm: removing '%s'.\n", instance_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_instance_post_delete_instance_entry_callback - "
+ "Removing '%s'.\n", instance_name, 0, 0);
cache_destroy_please(&inst->inst_cache, CACHE_TYPE_ENTRY);
if (entryrdn_get_switch()) { /* subtree-rename: on */
@@ -1140,9 +1145,9 @@ 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, LOG_ERR,
- "ldbm_instance_post_delete_instance_entry_callback:"
- " failed to generate db path: %s/%s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_instance_post_delete_instance_entry_callback - "
+ "Failed to generate db path: %s/%s\n",
inst_dirp, direntry->name, 0);
break;
}
@@ -1156,9 +1161,9 @@ ldbm_instance_post_delete_instance_entry_callback(Slapi_PBlock *pb, Slapi_Entry*
}
PR_ASSERT(rc == 0);
if (rc != 0) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm_instance_post_delete_instance_entry_callback:"
- " failed to delete %s\n", dbp);
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "ldbm_instance_post_delete_instance_entry_callback - "
+ "Failed to delete %s, error %d\n", dbp, rc);
}
PR_smprintf_free(dbp);
}
@@ -1201,8 +1206,8 @@ 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, LOG_ERR, "ldbm: instance '%s' does not exist!\n",
- instance_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_instance_delete_instance_entry_callback - "
+ "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",
instance_name);
@@ -1217,9 +1222,9 @@ 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, 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);
+ LDAPDebug(LDAP_DEBUG_WARNING, "ldbm_instance_delete_instance_entry_callback - "
+ "'%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) {
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "ldbm instance '%s' is in the middle of a "
"task. Cancel the task or wait for it to finish, "
@@ -1233,8 +1238,8 @@ 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, LOG_ERR, "ldbm: Bringing %s offline...\n",
- instance_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_INFO, "ldbm_instance_delete_instance_entry_callback - "
+ "Bringing %s offline...\n", instance_name, 0, 0);
slapi_mtn_be_stopping(inst->inst_be);
dblayer_instance_close(inst->inst_be);
slapi_ch_free((void **)&instance_name);
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modify.c b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
index ff8b255..30b83b8 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, LOG_DEBUG, "modify_switch_entries: replacing %s with %s failed (%d)\n",
+ LDAPDebug(LDAP_DEBUG_CACHE, "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, LOG_DEBUG, "modify_unswitch_entries: replacing %s with %s failed (%d)\n",
+ LDAPDebug(LDAP_DEBUG_CACHE, "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);
}
@@ -431,8 +431,8 @@ ldbm_back_modify( Slapi_PBlock *pb )
if (inst && inst->inst_ref_count) {
slapi_counter_increment(inst->inst_ref_count);
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm_modify: instance \"%s\" does not exist.\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "ldbm_back_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, LOG_DEBUG,
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM,
"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, LOG_ERR, "ldbm_back_modify",
+ slapi_log_error(SLAPI_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,8 +617,9 @@ 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, LOG_ERR, "ldbm_back_modify: SLAPI_PLUGIN_BE_PRE_MODIFY_FN "
- "returned error but did not set SLAPI_RESULT_CODE\n");
+ LDAPDebug0Args(LDAP_DEBUG_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;
}
if (SLAPI_PLUGIN_NOOP == opreturn) {
@@ -659,7 +660,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, LOG_DEBUG, "SLAPI_PLUGIN_BE_TXN_PRE_MODIFY_FN plugin "
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "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,11 +684,12 @@ 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, 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",
- mod_count, new_mod_count );
+ LDAPDebug2Args(LDAP_DEBUG_ANY, "ldbm_back_modify - "
+ "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",
+ mod_count, new_mod_count );
} else if (new_mod_count > mod_count) { /* apply the new betxnpremod mods */
/* apply the mods, check for syntax, schema problems, etc. */
if (modify_apply_check_expand(pb, operation, &mods[mod_count], e, ec, &postentry,
@@ -708,8 +710,9 @@ ldbm_back_modify( Slapi_PBlock *pb )
continue;
}
if (0 != retval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "id2entry_add failed, err=%d %s\n",
- retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_modify - "
+ "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);
goto error_return;
@@ -721,8 +724,9 @@ ldbm_back_modify( Slapi_PBlock *pb )
continue;
}
if (0 != retval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "index_add_mods failed, err=%d %s\n",
- retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_modify - "
+ "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);
goto error_return;
@@ -740,7 +744,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
continue;
}
if (0 != retval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_modify - "
"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,9 +758,8 @@ 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, LOG_ERR,
- "ldbm_back_modify: ldbm_txn_ruv_modify_context "
- "failed to construct RUV modify context\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_modify - "
+ "ldbm_txn_ruv_modify_context failed to construct RUV modify context\n",
0, 0, 0);
ldap_result_code= LDAP_OPERATIONS_ERROR;
retval = 0;
@@ -771,7 +774,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
continue;
}
if (0 != retval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_modify - "
"modify_update_all failed, err=%d %s\n", retval,
(msg = dblayer_strerror( retval )) ? msg : "", 0 );
if (LDBM_OS_ERR_IS_DISKFULL(retval))
@@ -786,7 +789,8 @@ ldbm_back_modify( Slapi_PBlock *pb )
}
}
if (retry_count == RETRY_TIMES) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Retry count exceeded in modify\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_modify - "
+ "Retry count exceeded in modify\n", 0, 0, 0 );
ldap_result_code= LDAP_BUSY;
goto error_return;
}
@@ -794,8 +798,8 @@ 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, LOG_ERR,
- "ldbm_back_modify: modify_switch_entries failed\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_modify - "
+ "modify_switch_entries failed\n", 0, 0, 0);
goto error_return;
}
}
@@ -830,8 +834,9 @@ 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, LOG_DEBUG, "SLAPI_PLUGIN_BE_TXN_POST_MODIFY_FN plugin "
- "returned error code %d\n", retval );
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "ldbm_back_modify - "
+ "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 +900,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, LOG_DEBUG, "SLAPI_PLUGIN_BE_TXN_POST_MODIFY_FN plugin "
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "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 +927,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, LOG_DEBUG, "ldbm_modify: CACHE_ADD %s failed\n",
+ LDAPDebug1Arg(LDAP_DEBUG_CACHE, "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 e7058be..7165531 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, LOG_DEBUG, "ldbm_back_modrdn", "enter conn=%" NSPRIu64 " op=%d\n",
+ slapi_log_error(SLAPI_LOG_TRACE, "ldbm_back_modrdn", "enter conn=%" NSPRIu64 " op=%d\n",
pb->pb_conn->c_connid, operation->o_opid);
}
@@ -188,9 +188,9 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
if (inst && inst->inst_ref_count) {
slapi_counter_increment(inst->inst_ref_count);
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm_modrdn: instance \"%s\" does not exist.\n",
- inst ? inst->inst_name : "null instance");
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "ldbm_back_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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_CACHE,
"ldbm_back_modrdn: CACHE_ADD %s to cache failed\n",
slapi_entry_get_dn_const(e->ep_entry));
}
@@ -287,8 +287,8 @@ 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, LOG_ERR,
- "ldbm_back_modrdn: adding %s to cache failed\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "ldbm_back_modrdn - "
+ "Adding %s to cache failed\n",
slapi_entry_get_dn_const(ec->ep_entry));
ldap_result_code = LDAP_OPERATIONS_ERROR;
goto error_return;
@@ -312,7 +312,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
ruv_c_init = 0;
}
/* We're re-trying */
- LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM,
"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, LOG_ERR, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_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;
@@ -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, LOG_DEBUG, "ldbm_back_modrdn: New superior "
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "No 'moddn' access to new superior.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "No 'add' access to new superior.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "Parent does not exist matched %s, parentdn = %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "Parent does not exist matched %s, parentdn = %s\n",
ldap_result_matcheddn, slapi_sdn_get_ndn(&dn_parentdn), 0 );
goto error_return;
}
@@ -680,14 +680,14 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
}
if(is_resurect_operation) {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_REPL, "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);
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, LOG_DEBUG, "Resurrection of %s - Couldn't remove %s\n",
+ LDAPDebug(LDAP_DEBUG_REPL, "Resurrection of %s - Couldn't remove %s\n",
slapi_entry_get_dn(ec->ep_entry), SLAPI_ATTR_NSCP_ENTRYDN, 0);
}
@@ -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, LOG_DEBUG, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_CACHE, "ldbm_back_modrdn",
"conn=%lu op=%d cache_add_tentative failed: %s\n",
conn_id, op_id, slapi_entry_get_dn(ec->ep_entry));
}
@@ -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, LOG_DEBUG, "ldbm_modrdn: entry_apply_mods failed for entry %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "ldbm_modrdn: entry_apply_mods_wsi failed for entry %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "ldbm_modrdn: entry_apply_mods_wsi (operational attributes) failed for entry %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "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;
}
@@ -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, LOG_DEBUG, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "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, LOG_DEBUG, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "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, LOG_DEBUG, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "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),
@@ -939,11 +939,12 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
}
}
}
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "parent_update_on_childchange parent %s of %s numsub=%d\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_modrdn - "
+ "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
- slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "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 +960,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, LOG_ERR, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_modrdn",
"%s has NO children\n", slapi_entry_get_dn(e->ep_entry));
}
@@ -986,7 +987,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, LOG_DEBUG, "SLAPI_PLUGIN_BE_TXN_PRE_MODRDN_FN plugin "
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "SLAPI_PLUGIN_BE_TXN_PRE_MODRDN_FN plugin "
"returned error code %d\n", retval );
if (SLAPI_PLUGIN_NOOP == retval) {
not_an_error = 1;
@@ -1016,8 +1017,9 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
}
if (retval)
{
- 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);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_modrdn - "
+ "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);
goto error_return;
@@ -1039,8 +1041,8 @@ 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, LOG_ERR, "modrdn: rdn2typeval (%s) failed\n",
- rdns[i], 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_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,
LDAP_OPERATIONS_ERROR, retry_count);
@@ -1056,8 +1058,9 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
}
else if (retval != 0 )
{
- 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 );
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_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,
LDAP_OPERATIONS_ERROR, retry_count);
@@ -1083,8 +1086,8 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
}
else if (0 != retval)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "modrdn: "
- "could not update parent, err=%d %s\n", retval,
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_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;
MOD_SET_ERROR(ldap_result_code,
@@ -1095,7 +1098,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, LOG_DEBUG, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "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)
@@ -1105,7 +1108,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
}
if (0 != retval)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "modrdn: "
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_modrdn - "
"could not update parent, err=%d %s\n", retval,
(msg = dblayer_strerror( retval )) ? msg : "",
0 );
@@ -1147,7 +1150,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, LOG_ERR, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_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));
@@ -1179,9 +1182,8 @@ 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, LOG_ERR,
- "ldbm_back_modrdn: ldbm_txn_ruv_modify_context "
- "failed to construct RUV modify context\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_modrdn - "
+ "ldbm_txn_ruv_modify_context failed to construct RUV modify context\n",
0, 0, 0);
ldap_result_code = LDAP_OPERATIONS_ERROR;
retval = 0;
@@ -1196,7 +1198,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
continue;
}
if (0 != retval) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_modrdn - "
"modify_update_all failed, err=%d %s\n", retval,
(msg = dblayer_strerror( retval )) ? msg : "", 0 );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) {
@@ -1212,7 +1214,8 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
if (retry_count == RETRY_TIMES)
{
/* Failed */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Retry count exceeded in modrdn\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_modrdn - "
+ "Retry count exceeded in modrdn\n", 0, 0, 0 );
ldap_result_code= LDAP_BUSY;
goto error_return;
}
@@ -1226,7 +1229,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
if(newparententry!=NULL)
{
myrc = modify_switch_entries( &newparent_modify_context,be);
- slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "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,14 +1237,15 @@ 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, LOG_DEBUG, "SLAPI_PLUGIN_BE_TXN_POST_MODRDN_FN plugin "
- "returned error code %d\n", retval );
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "ldbm_back_modrdn - "
+ "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, LOG_ERR, "SLAPI_PLUGIN_BE_TXN_POST_MODRDN_FN plugin "
- "returned error but did not set SLAPI_RESULT_CODE\n" );
+ LDAPDebug0Args(LDAP_DEBUG_ANY, "ldbm_back_modrdn - "
+ "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 +1284,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, LOG_DEBUG, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_CACHE, "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);
@@ -1310,8 +1314,8 @@ 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, LOG_ERR,
- "ldbm_back_modrdn: modify_switch_entries failed\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_modrdn - "
+ "modify_switch_entries failed\n", 0, 0, 0);
goto error_return;
}
}
@@ -1391,8 +1395,9 @@ 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, LOG_DEBUG, "SLAPI_PLUGIN_BE_TXN_POST_MODRDN_FN plugin "
- "returned error code %d\n", retval );
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "ldbm_back_modrdn - "
+ "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 +1432,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, LOG_DEBUG, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_REPL, "ldbm_back_modrdn",
"Resurrecting an entry %s: result: %d, %d\n",
slapi_entry_get_dn(ec->ep_entry), ldap_result_code, retval);
}
@@ -1443,7 +1448,7 @@ common_return:
if (bdn) {
CACHE_ADD( &inst->inst_dncache, bdn, NULL );
CACHE_RETURN(&inst->inst_dncache, &bdn);
- slapi_log_error(SLAPI_LOG_CACHE, LOG_DEBUG, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_CACHE, "ldbm_back_modrdn",
"set %s to dn cache\n", slapi_sdn_get_dn(sdn));
}
}
@@ -1503,13 +1508,13 @@ common_return:
slapi_sdn_done(&dn_newdn);
slapi_sdn_done(&dn_newrdn);
slapi_sdn_done(&dn_parentdn);
- slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "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, LOG_DEBUG, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_back_modrdn",
"conn=%lu op=%d modify_term: rc=%d\n", conn_id, op_id, myrc);
- slapi_log_error(SLAPI_LOG_BACKLDBM, LOG_DEBUG, "ldbm_back_modrdn",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "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 +1539,8 @@ common_return:
}
if (pb->pb_conn)
{
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "ldbm_back_modrdn", "leave conn=%" NSPRIu64 " op=%d\n",
+ slapi_log_error(SLAPI_LOG_TRACE, "ldbm_back_modrdn",
+ "leave conn=%" NSPRIu64 " op=%d\n",
pb->pb_conn->c_connid, operation->o_opid);
}
return retval;
@@ -1736,7 +1742,7 @@ moddn_newrdn_mods(Slapi_PBlock *pb, const char *olddn, struct backentry *ec, Sla
if ( baddn || badrdn )
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "moddn_newrdn_mods failed: olddn=%s baddn=%d badrdn=%d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "moddn_newrdn_mods- Failed: olddn=%s baddn=%d badrdn=%d\n",
olddn, baddn, badrdn);
return LDAP_OPERATIONS_ERROR;
}
@@ -1766,7 +1772,7 @@ moddn_newrdn_mods(Slapi_PBlock *pb, const char *olddn, struct backentry *ec, Sla
}
else
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "moddn_newrdn_mods failed: could not parse new rdn %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "moddn_newrdn_mods - Failed: could not parse new rdn %s\n",
newrdn, 0, 0);
return LDAP_OPERATIONS_ERROR;
}
@@ -1817,19 +1823,22 @@ 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, LOG_DEBUG,
- "modrdn_rename_entry_update_indexes: adding %s failed to add to the cache (rc: %d, cache_rc: %d)\n",
+ LDAPDebug(LDAP_DEBUG_CACHE,
+ "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);
}
if (DB_LOCK_DEADLOCK == retval)
{
/* Retry txn */
- LDAPDebug0Args( LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "modrdn_rename_entry_update_indexes: id2entry_add deadlock\n" );
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, "modrdn_rename_entry_update_indexes - id2entry_add deadlock\n" );
goto error_return;
}
if (retval != 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 );
+ LDAPDebug(LDAP_DEBUG_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)
@@ -1841,12 +1850,14 @@ modrdn_rename_entry_update_indexes(back_txn *ptxn, Slapi_PBlock *pb, struct ldbm
if (DB_LOCK_DEADLOCK == retval)
{
/* Retry txn */
- LDAPDebug0Args( LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "modrdn_rename_entry_update_indexes: index_add_mods1 deadlock\n" );
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, "modrdn_rename_entry_update_indexes - index_add_mods1 deadlock\n" );
goto error_return;
}
if (retval != 0)
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "index_add_mods 1 failed, err=%d %s\n", retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "modrdn_rename_entry_update_indexes - "
+ "index_add_mods 1 failed, err=%d %s\n",
+ retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
goto error_return;
}
}
@@ -1865,12 +1876,15 @@ modrdn_rename_entry_update_indexes(back_txn *ptxn, Slapi_PBlock *pb, struct ldbm
if (DB_LOCK_DEADLOCK == retval)
{
/* Retry txn */
- LDAPDebug0Args( LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "modrdn_rename_entry_update_indexes: index_add_mods2 deadlock\n" );
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, "modrdn_rename_entry_update_indexes - "
+ "index_add_mods2 deadlock\n" );
goto error_return;
}
if (retval != 0)
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "index_add_mods 2 failed, err=%d %s\n", retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "modrdn_rename_entry_update_indexes - "
+ "index_add_mods 2 failed, err=%d %s\n",
+ retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
goto error_return;
}
}
@@ -1883,12 +1897,15 @@ modrdn_rename_entry_update_indexes(back_txn *ptxn, Slapi_PBlock *pb, struct ldbm
if (DB_LOCK_DEADLOCK == retval)
{
/* Retry txn */
- LDAPDebug0Args( LDAP_DEBUG_BACKLDBM, LOG_DEBUG, "modrdn_rename_entry_update_indexes: index_add_mods3 deadlock\n" );
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, "modrdn_rename_entry_update_indexes - "
+ "index_add_mods3 deadlock\n" );
goto error_return;
}
if (retval != 0)
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "index_add_mods 3 failed, err=%d %s\n", retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "modrdn_rename_entry_update_indexes - "
+ "index_add_mods 3 failed, err=%d %s\n",
+ retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
goto error_return;
}
}
@@ -1903,18 +1920,21 @@ 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, LOG_DEBUG, "modrdn_rename_entry_update_indexes: vlv_update_all_indexes deadlock\n" );
+ LDAPDebug0Args(LDAP_DEBUG_BACKLDBM, "modrdn_rename_entry_update_indexes -"
+ "vlv_update_all_indexes deadlock\n" );
goto error_return;
}
if (retval != 0)
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "vlv_update_all_indexes failed, err=%d %s\n", retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "modrdn_rename_entry_update_indexes - "
+ "vlv_update_all_indexes failed, err=%d %s\n",
+ retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
goto error_return;
}
}
if (cache_replace( &inst->inst_cache, e, *ec ) != 0 ) {
- LDAPDebug2Args(LDAP_DEBUG_CACHE, LOG_DEBUG,
- "modrdn_rename_entry_update_indexes cache_replace %s -> %s failed\n",
+ LDAPDebug2Args(LDAP_DEBUG_CACHE,
+ "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;
goto error_return;
@@ -2155,7 +2175,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, LOG_ERR, "moddn_get_children: "
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, "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 d4c88b3..2c58114 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, LOG_ERR, "ldbm_search_compile_filter: re_comp (%s) failed (%s): %s\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG, "ldbm_search_compile_filter: re_comp (%s)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "ldbm_search_compile_filter - re_comp (%s)\n",
escape_string(p, ebuf), 0, 0);
f->f_un.f_un_sub.sf_private = (void *)re;
}
@@ -365,8 +365,8 @@ ldbm_back_search( Slapi_PBlock *pb )
if (inst && inst->inst_ref_count) {
slapi_counter_increment(inst->inst_ref_count);
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm_search: instance \"%s\" does not exist.\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "ldbm_back_search - Instance \"%s\" does not exist.\n",
inst ? inst->inst_name : "null instance");
return( -1 );
}
@@ -406,8 +406,8 @@ 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, LOG_ERR,
- "Warning: Sort control ignored for conn=%d op=%d\n",
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "ldbm_back_search - Sort control ignored for conn=%d op=%d\n",
conn_id, op_id, 0);
}
} else {
@@ -441,8 +441,8 @@ 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, LOG_ERR,
- "Warning: VLV control ignored for conn=%d op=%d\n",
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "ldbm_back_search - VLV control ignored for conn=%d op=%d\n",
conn_id, op_id, 0);
}
@@ -511,8 +511,8 @@ ldbm_back_search( Slapi_PBlock *pb )
if (print_once)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: %s "
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "ldbm_back_search - %s "
"when more than one backend is involved. "
"VLV indexes that will never be used should be removed.\n",
ctrlstr, 0, 0);
@@ -954,8 +954,8 @@ 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, LOG_ERR,
- "ERROR: could not pre-compile the search filter - error %d %d\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "ldbm_back_search - Could not pre-compile the search filter - error %d %d\n",
rc, filt_errs);
if (rc == SLAPI_FILTER_SCAN_ERROR) {
tmp_err = LDAP_OPERATIONS_ERROR;
@@ -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, LOG_ERR, "database error %d\n", err, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "build_candidate_list - 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, LOG_DEBUG, "candidate list has %lu ids\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "build_candidate_list - Candidate list has %lu ids\n",
*candidates ? (*candidates)->b_nids : 0L, 0, 0);
return r;
@@ -1632,7 +1632,8 @@ ldbm_back_next_search_entry_ext( Slapi_PBlock *pb, int use_extension )
{
if ( err != 0 && err != DB_NOTFOUND )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "next_search_entry db err %d\n", err, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_next_search_entry_ext - 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 +1644,8 @@ ldbm_back_next_search_entry_ext( Slapi_PBlock *pb, int use_extension )
goto bail;
}
}
- LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "candidate %lu not found\n", (u_long)id, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, "ldbm_back_next_search_entry_ext - 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 +1672,8 @@ 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, LOG_ERR, "null ref in (%s)\n", backentry_get_ndn(e), 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_next_search_entry_ext - 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 +1724,8 @@ 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, LOG_DEBUG, "Bypassing filter test\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "ldbm_back_next_search_entry_ext - "
+ "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 +1734,13 @@ 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, LOG_DEBUG, "Checking bypass\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_ERR, "Filter bypass ERROR on entry %s\n", backentry_get_ndn(e), 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_next_search_entry_ext - "
+ "Filter bypass ERROR on entry %s\n", backentry_get_ndn(e), 0, 0 );
filter_test = ft_rc; /* Fix the error */
}
}
@@ -1853,22 +1858,22 @@ ldbm_back_prev_search_results( Slapi_PBlock *pb )
slapi_pblock_get( pb, SLAPI_BACKEND, &be );
if (!be) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm_back_prev_search_results: no backend\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "ldbm_back_prev_search_results - no backend\n");
return;
}
inst = (ldbm_instance *) be->be_instance_info;
if (!inst) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm_back_prev_search_results: no backend instance\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "ldbm_back_prev_search_results - no backend instance\n");
return;
}
slapi_pblock_get( pb, SLAPI_SEARCH_RESULT_SET, &sr );
if (sr) {
if (sr->sr_entry) {
/* The last entry should be returned to cache */
- LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
- "ldbm_back_prev_search_results: returning: %s\n",
+ LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM,
+ "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));
sr->sr_entry = NULL;
@@ -1913,8 +1918,8 @@ 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, LOG_ERR,
- "ERROR: could not free the pre-compiled regexes in the search filter - error %d %d\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "delete_search_result_set - Could not free the pre-compiled regexes in the search filter - error %d %d\n",
rc, filt_errs);
}
slapi_filter_free((*sr)->sr_norm_filter, 1);
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_usn.c b/ldap/servers/slapd/back-ldbm/ldbm_usn.c
index eab4ba8..a78038e 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, LOG_DEBUG, "ldbm_usn_init",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_usn_init",
"backend: %s%s\n", be->be_name,
isglobal?" (global mode)":"");
if (isglobal) {
@@ -114,17 +114,16 @@ 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, LOG_ERR, "usn_get_last_usn",
- "WARNING: failed to open the entryusn index: %d; "
- "Creating it...\n", rc);
+ slapi_log_error(SLAPI_LOG_ERR, "usn_get_last_usn",
+ "Failed to open the entryusn index: %d; Creating it...\n", rc);
goto bail;
}
/* Get a cursor */
rc = db->cursor(db, NULL, &dbc, 0);
if (0 != rc) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "usn_get_last_usn",
- "failed to create a cursor: %d", rc);
+ slapi_log_error(SLAPI_LOG_ERR, "usn_get_last_usn",
+ "Failed to create a cursor: %d", rc);
goto bail;
}
@@ -182,7 +181,7 @@ ldbm_set_last_usn(Slapi_Backend *be)
int rc = -1;
if (NULL == be) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldbm_set_last_usn",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_set_last_usn",
"Empty backend\n");
return rc;
}
@@ -193,7 +192,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, LOG_DEBUG, "ldbm_set_last_usn",
+ slapi_log_error(SLAPI_LOG_BACKLDBM, "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 109af67..b68bf1e 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, LOG_ERR, "database error %d\n", err );
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, "add_op_attrs - 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, LOG_ERR, "database error %d\n", err );
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, "add_op_attrs - database error %d\n", err );
slapi_ch_free_string( &pdn );
return( -1 );
}
@@ -535,7 +535,8 @@ int update_subordinatecounts(backend *be, ImportJob *job, DB_TXN *txn)
}
/* check if we need to abort */
if(job->flags & FLAG_ABORT){
- import_log_notice(job, "numsubordinate generation aborted.");
+ import_log_notice(job, SLAPI_LOG_ERR, "update_subordinatecounts",
+ "numsubordinate generation aborted.");
break;
}
/*
@@ -543,7 +544,8 @@ int update_subordinatecounts(backend *be, ImportJob *job, DB_TXN *txn)
*/
key_count++;
if(!(key_count % PROGRESS_INTERVAL)){
- import_log_notice(job, "numsubordinate generation: processed %d entries...",
+ import_log_notice(job, SLAPI_LOG_INFO, "update_subordinatecounts",
+ "numsubordinate generation: processed %d entries...",
key_count);
started_progress_logging = 1;
}
@@ -599,7 +601,8 @@ int update_subordinatecounts(backend *be, ImportJob *job, DB_TXN *txn)
}
if(started_progress_logging){
/* Finish what we started... */
- import_log_notice(job, "numsubordinate generation: processed %d entries.",
+ import_log_notice(job, SLAPI_LOG_INFO, "update_subordinatecounts",
+ "numsubordinate generation: processed %d entries.",
key_count);
job->numsubordinates = key_count;
}
@@ -663,8 +666,8 @@ int ldbm_back_ldif2ldbm( Slapi_PBlock *pb )
0 /* use single thread mode */);
slapi_sdn_free (&sdn);
if (rc != UID_SUCCESS) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Fatal Error---Failed to initialize uniqueid generator; error = %d. "
+ LDAPDebug(LDAP_DEBUG_EMERG,
+ "ldbm_back_ldif2ldbm - Failed to initialize uniqueid generator; error = %d. "
"Exiting now.\n", rc, 0, 0 );
return -1;
}
@@ -676,15 +679,15 @@ 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, LOG_ERR, "Unknown ldbm instance %s\n", instance_name,
- 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldif2ldbm - Unknown ldbm instance %s\n",
+ instance_name, 0, 0);
return -1;
}
/* 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, LOG_ERR, "ldbm: '%s' is already in the middle of "
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldif2ldbm - ldbm: '%s' is already in the middle of "
"another task and cannot be disturbed.\n",
inst->inst_name, 0, 0);
return -1;
@@ -692,8 +695,8 @@ 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, LOG_ERR,
- "ldbm_back_ldif2ldbm: failed to write import file\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "ldbm_back_ldif2ldbm - Failed to write import file\n");
return -1;
}
}
@@ -702,7 +705,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, LOG_ERR, "Bringing %s offline...\n",
+ LDAPDebug(LDAP_DEBUG_INFO, "ldbm_back_ldif2ldbm - Bringing %s offline...\n",
instance_name, 0, 0);
slapi_mtn_be_disable(inst->inst_be);
@@ -723,8 +726,8 @@ int ldbm_back_ldif2ldbm( Slapi_PBlock *pb )
ret = dblayer_start(li,
DBLAYER_NORMAL_MODE|DBLAYER_NO_DBTHREADS_MODE);
if (ret) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm_back_ldif2ldbm: dblayer_start failed! %s (%d)\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "ldbm_back_ldif2ldbm - dblayer_start failed! %s (%d)\n",
dblayer_strerror(ret), ret);
goto fail;
}
@@ -732,25 +735,25 @@ 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, LOG_ERR,
- "ldbm_back_ldif2ldbm: dblayer_close failed! %s (%d)\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "ldbm_back_ldif2ldbm - dblayer_close failed! %s (%d)\n",
dblayer_strerror(ret), ret);
}
}
if (0 != (ret = dblayer_start(li, DBLAYER_IMPORT_MODE)) ) {
if (LDBM_OS_ERR_IS_DISKFULL(ret)) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: Failed to init database. "
+ LDAPDebug(LDAP_DEBUG_ALERT, "ldbm_back_ldif2ldbm - 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, LOG_ERR,"Please check that\n"
+ LDAPDebug(LDAP_DEBUG_ALERT,"ldbm_back_ldif2ldbm - 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);
+ 0, 0, 0);
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: Failed to init database "
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldif2ldbm - Failed to init database "
"(error %d: %s)\n", ret, dblayer_strerror(ret), 0);
}
goto fail;
@@ -872,15 +875,15 @@ 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, LOG_ERR,
- "info: entryrdn not indexed on '%s'; "
+ LDAPDebug2Args(LDAP_DEBUG_INFO,
+ "ldbm_fetch_subtrees - 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, LOG_ERR,
- "Reading %s failed on entryrdn; %d\n",
- include[i], *err );
+ LDAPDebug2Args(LDAP_DEBUG_ANY,
+ "ldbm_fetch_subtrees - Reading %s failed on entryrdn; %d\n",
+ include[i], *err );
}
slapi_sdn_done(&sdn);
continue;
@@ -891,13 +894,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, LOG_ERR,
- "info: entrydn not indexed on '%s'; "
+ LDAPDebug2Args(LDAP_DEBUG_INFO,
+ "ldbm_fetch_subtrees - 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, LOG_ERR,
+ LDAPDebug2Args(LDAP_DEBUG_ANY,
"Reading %s failed on entrydn; %d\n",
include[i], *err );
}
@@ -919,14 +922,14 @@ 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, LOG_DEBUG,
- "Info: Entry id %lu has no descendants according to %s. "
+ LDAPDebug2Args(LDAP_DEBUG_BACKLDBM,
+ "ldbm_fetch_subtrees - 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");
*err = 0; /* not a problem */
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "warning: %s not indexed on %lu\n",
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "ldbm_fetch_subtrees - %s not indexed on %lu\n",
entryrdn_get_noancestorid()?"entryrdn":"ancestorid",
id, 0);
}
@@ -994,7 +997,7 @@ export_one_entry(struct ldbminfo *li,
/* Decrypt in place */
rc = attrcrypt_decrypt_entry(be, expargs->ep);
if (rc) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"Failed to decrypt entry [%s] : %d\n",
+ LDAPDebug(LDAP_DEBUG_ERR,"export_one_entry - Failed to decrypt entry [%s] : %d\n",
slapi_sdn_get_dn(&expargs->ep->ep_entry->e_sdn), rc, 0);
}
}
@@ -1016,8 +1019,8 @@ export_one_entry(struct ldbminfo *li,
rc = slapi_entry_attr_replace(expargs->ep->ep_entry,
"userpassword", vals);
if (rc) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: Failed to add clear password storage scheme: %d\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "export_one_entry - %s: Failed to add clear password storage scheme: %d\n",
slapi_sdn_get_dn(&expargs->ep->ep_entry->e_sdn), rc);
}
slapi_ch_free_string(&val.bv_val);
@@ -1056,7 +1059,7 @@ export_one_entry(struct ldbminfo *li,
"%s: Processed %d entries (%d%%).",
inst->inst_name, *expargs->cnt, percent);
}
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "export %s: Processed %d entries (%d%%).\n",
+ LDAPDebug(LDAP_DEBUG_INFO, "export %s: Processed %d entries (%d%%).\n",
inst->inst_name, *expargs->cnt, percent);
*expargs->lastcnt = *expargs->cnt;
}
@@ -1115,7 +1118,7 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
int server_running;
export_args eargs = {0};
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ldbm_back_ldbm2ldif\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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,11 +1150,11 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
if (run_from_cmdline && li->li_dblayer_private->dblayer_private_mem
&& server_running)
{
- 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);
- return_value = -1;
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2ldif - 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);
+ return_value = -1;
goto bye;
}
@@ -1162,7 +1165,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, LOG_ERR, "Unknown ldbm instance %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldbm2ldif - Unknown backend instance %s\n",
instance_name, 0, 0);
return_value = -1;
goto bye;
@@ -1170,7 +1173,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, LOG_ERR, "instance %s is busy\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldbm2ldif - backend instance %s is busy\n",
instance_name, 0, 0);
return_value = -1;
goto bye;
@@ -1182,20 +1185,20 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
} else {
slapi_pblock_get(pb, SLAPI_BACKEND, &be);
if (!be) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "No backend\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "ldbm_back_ldbm2ldif - No backend\n");
return_value = -1;
goto bye;
}
inst = (ldbm_instance *)be->be_instance_info;
if (!inst) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "Unknown ldbm instance\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "ldbm_back_ldbm2ldif - Unknown backend instance\n");
return_value = -1;
goto bye;
}
/* check if an import/restore is already ongoing... */
if (instance_set_busy(inst) != 0) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ldbm: '%s' is already in the middle"
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldbm2ldif - Backend instance '%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 +1242,7 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
options |= SLAPI_DUMP_STATEINFO;
if (fname == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "db2ldif: no LDIF filename supplied\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldbm2ldif - db2ldif: no LDIF filename supplied\n",
0, 0, 0);
return_value = -1;
goto bye;
@@ -1260,7 +1263,7 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
SLAPD_DEFAULT_FILE_MODE);
}
if (fd < 0) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "db2ldif: can't open %s: %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldbm2ldif - db2ldif: can't open %s: %d (%s)\n",
fname, errno, dblayer_strerror(errno));
return_value = -1;
goto bye;
@@ -1271,14 +1274,14 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
if ( we_start_the_backends ) {
if (0 != dblayer_start(li,DBLAYER_EXPORT_MODE)) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "db2ldif: Failed to init database\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldbm2ldif - 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, LOG_ERR, "db2ldif: Failed to init instance\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldbm2ldif - db2ldif: Failed to init instance\n",
0, 0, 0);
return_value = -1;
goto bye;
@@ -1290,7 +1293,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, LOG_ERR, "Could not open/create id2entry\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldbm2ldif - Could not open/create id2entry\n",
0, 0, 0 );
return_value = -1;
goto bye;
@@ -1311,8 +1314,8 @@ 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, LOG_ERR,
- "Failed to get cursor for db2ldif; %s (%d)\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2ldif - Failed to get cursor for db2ldif; %s (%d)\n",
dblayer_strerror(return_value), return_value);
return_value = -1;
goto bye;
@@ -1336,14 +1339,14 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
if (NULL == idl) {
if (err) {
/* most likely, indexes are bad. */
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
- "Failed to fetch subtree lists (error %d) %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2ldif - Failed to fetch subtree lists (error %d) %s\n",
err, dblayer_strerror(err));
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
- "Possibly the entrydn/entryrdn or ancestorid index is "
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2ldif - Possibly the entrydn/entryrdn or ancestorid index is "
"corrupted or does not exist.\n");
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
- "Attempting direct unindexed export instead.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2ldif - Attempting direct unindexed export instead.\n");
}
ok_index = 0;
idl = NULL;
@@ -1407,7 +1410,7 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
if (return_value != DB_LOCK_DEADLOCK) break;
}
if (return_value) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "db2ldif: failed to read "
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldbm2ldif - db2ldif: failed to read "
"entry %lu, err %d\n", (u_long)idl->b_ids[idindex],
return_value, 0);
return_value = -1;
@@ -1508,8 +1511,8 @@ 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, LOG_DEBUG,
- "ldbm2ldif: entryrdn is not available; "
+ LDAPDebug2Args(LDAP_DEBUG_TRACE,
+ "ldbm_back_ldbm2ldif - entryrdn is not available; "
"composing dn (rdn: %s, ID: %d)\n",
rdn, temp_id);
if (NOID != pid) { /* if not a suffix */
@@ -1520,8 +1523,8 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
&psrdn, NULL, 0,
run_from_cmdline, NULL);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm2ldif: Skip ID %d\n", pid);
+ LDAPDebug1Arg(LDAP_DEBUG_WARNING,
+ "ldbm_back_ldbm2ldif - Skip ID %d\n", pid);
slapi_ch_free_string(&rdn);
slapi_rdn_done(&psrdn);
backentry_free(&ep);
@@ -1531,8 +1534,8 @@ 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, LOG_ERR,
- "ldbm2ldif: Failed to compose dn for "
+ LDAPDebug2Args(LDAP_DEBUG_WARNING,
+ "ldbm_back_ldbm2ldif - Failed to compose dn for "
"(rdn: %s, ID: %d) from Slapi_RDN\n",
rdn, temp_id);
slapi_ch_free_string(&rdn);
@@ -1554,12 +1557,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, LOG_DEBUG, "ldbm2ldif",
+ slapi_log_error(SLAPI_LOG_CACHE, "ldbm_back_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, LOG_DEBUG, "ldbm2ldif",
+ slapi_log_error(SLAPI_LOG_CACHE, "ldbm_back_ldbm2ldif",
"entryrdn_lookup_dn returned: %s, "
"and set to dn cache\n", dn);
}
@@ -1576,7 +1579,7 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
if ( (ep->ep_entry) != NULL ) {
ep->ep_id = temp_id;
} else {
- LDAPDebug1Arg( LDAP_DEBUG_ANY, LOG_ERR, "ldbm_back_ldbm2ldif: skipping "
+ LDAPDebug1Arg(LDAP_DEBUG_WARNING, "ldbm_back_ldbm2ldif - skipping "
"badly formatted entry with id %lu\n", (u_long)temp_id);
backentry_free( &ep );
continue;
@@ -1603,9 +1606,9 @@ ldbm_back_ldbm2ldif( Slapi_PBlock *pb )
"%s: Processed %d entries (100%%).",
inst->inst_name, cnt);
}
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "export %s: Processed %d entries (100%%).\n",
- inst->inst_name, cnt, 0);
+ LDAPDebug(LDAP_DEBUG_INFO,
+ "export %s: Processed %d entries (100%%).\n",
+ inst->inst_name, cnt, 0);
}
bye:
if (idl) {
@@ -1621,17 +1624,17 @@ bye:
close(fd);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ldbm_back_ldbm2ldif\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= ldbm_back_ldbm2ldif\n", 0, 0, 0 );
if (we_start_the_backends && NULL != li) {
if (0 != dblayer_flush(li)) {
- LDAPDebug0Args( LDAP_DEBUG_ANY, LOG_ERR,
- "db2ldif: Failed to flush database\n" );
+ LDAPDebug0Args(LDAP_DEBUG_ANY,
+ "ldbm_back_ldbm2ldif - db2ldif: Failed to flush database\n" );
}
if (0 != dblayer_close(li,DBLAYER_EXPORT_MODE)) {
- LDAPDebug0Args( LDAP_DEBUG_ANY, LOG_ERR,
- "db2ldif: Failed to close database\n" );
+ LDAPDebug0Args(LDAP_DEBUG_ANY,
+ "ldbm_back_ldbm2ldif - db2ldif: Failed to close database\n" );
}
}
@@ -1659,10 +1662,10 @@ 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, LOG_ERR,
- "ldbm2index: Unknown VLV Index named '%s'\n", index, 0, 0);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm2index: Known VLV Indexes are: %s\n", text, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm2index_bad_vlv: Unknown VLV Index named '%s'\n", index, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm2index_bad_vlv: Known VLV Indexes are: %s\n", text, 0, 0);
slapi_ch_free_string(&text);
}
@@ -1705,7 +1708,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
Slapi_Value **nstombstone_vals = NULL;
int istombstone = 0;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ldbm_back_ldbm2index\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> ldbm_back_ldbm2index\n", 0, 0, 0 );
if ( g_get_shutdown() || c_get_shutdown() ) {
return return_value;
}
@@ -1728,7 +1731,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
slapi_task_log_notice(task, "Unknown ldbm instance %s",
instance_name);
}
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Unknown ldbm instance %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldbm2index - Unknown ldbm instance %s\n",
instance_name, 0, 0);
return return_value;
}
@@ -1743,14 +1746,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, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "db2ldif: Failed to init instance\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldbm2index - db2ldif: Failed to init instance\n",
0, 0, 0);
return return_value;
}
@@ -1761,14 +1764,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, LOG_ERR, "ldbm: '%s' is already in the middle of "
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldbm2index - 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, LOG_ERR, "Could not open/create id2entry\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldbm2index - Could not open/create id2entry\n",
0, 0, 0 );
goto err_min;
}
@@ -1776,8 +1779,8 @@ 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, LOG_ERR,
- "Failed to get cursor for ldbm2index\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2index - Failed to get cursor for ldbm2index\n", 0, 0, 0 );
goto err_min;
}
@@ -1794,8 +1797,8 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
slapi_ch_free(&(data.data));
isfirst = 1;
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Failed to seek within id2entry (BAD %d)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2index - Failed to seek within id2entry (BAD %d)\n",
return_value, 0 ,0);
goto err_out;
}
@@ -1826,7 +1829,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, LOG_ERR, "%s: Indexing %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_INFO, "ldbm_back_ldbm2index - %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 +1838,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, LOG_ERR, "%s: Indexing %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_INFO, "ldbm_back_ldbm2index - %s: Indexing %s\n",
inst->inst_name, LDBM_ENTRYRDN_STR);
index_ext |= DB2INDEX_ENTRYRDN;
} else {
@@ -1845,8 +1848,8 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
inst->inst_name, LDBM_ENTRYRDN_STR,
CONFIG_ENTRYRDN_SWITCH);
}
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: Requested to index %s, but %s is off\n",
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "ldbm_back_ldbm2index - %s: Requested to index %s, but %s is off\n",
inst->inst_name, LDBM_ENTRYRDN_STR,
CONFIG_ENTRYRDN_SWITCH);
goto err_out;
@@ -1859,8 +1862,8 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
inst->inst_name, LDBM_ENTRYDN_STR,
CONFIG_ENTRYRDN_SWITCH);
}
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: Requested to index %s, but %s is on\n",
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "ldbm_back_ldbm2index - %s: Requested to index %s, but %s is on\n",
inst->inst_name, LDBM_ENTRYDN_STR,
CONFIG_ENTRYRDN_SWITCH);
goto err_out;
@@ -1872,8 +1875,8 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
"%s: Indexing attribute: %s",
inst->inst_name, attrs[i]+1);
}
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: Indexing attribute: %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_INFO,
+ "ldbm_back_ldbm2index - %s: Indexing attribute: %s\n",
inst->inst_name, attrs[i] + 1);
}
} else {
@@ -1886,8 +1889,8 @@ 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, LOG_ERR,
- "%s: Indexing attribute: %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_INFO,
+ "ldbm_back_ldbm2index - %s: Indexing attribute: %s\n",
inst->inst_name, attrs[i]+1);
}
dblayer_erase_index_file(be, ai, i/* chkpt; 1st time only */);
@@ -1913,7 +1916,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, LOG_ERR, "%s: Indexing VLV: %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_INFO, "ldbm_back_ldbm2index - %s: Indexing VLV: %s\n",
inst->inst_name, attrs[i]+1);
}
break;
@@ -1941,18 +1944,18 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
if (! idl) {
/* most likely, indexes are bad if err is set. */
if (0 != err) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: WARNING: Failed to fetch subtree lists: (%d) %s\n",
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "ldbm_back_ldbm2index - %s: Failed to fetch subtree lists: (%d) %s\n",
inst->inst_name, err, dblayer_strerror(err));
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: Possibly the entrydn/entryrdn or ancestorid index "
+ LDAPDebug1Arg(LDAP_DEBUG_WARNING,
+ "ldbm_back_ldbm2index - %s: Possibly the entrydn/entryrdn or ancestorid index "
"is corrupted or does not exist.\n", inst->inst_name);
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug1Arg(LDAP_DEBUG_WARNING,
"%s: Attempting brute-force method instead.\n",
inst->inst_name);
if (task) {
slapi_task_log_notice(task,
- "%s: WARNING: Failed to fetch subtree lists (err %d) -- "
+ "ldbm_back_ldbm2index - %s: WARNING: Failed to fetch subtree lists (err %d) -- "
"attempting brute-force method instead.",
inst->inst_name, err);
}
@@ -1984,7 +1987,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
rc = db->get(db, NULL, &key, &data, 0);
if (rc) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: Failed "
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldbm2index - %s: Failed "
"to read database, errno=%d (%s)\n",
inst->inst_name, rc, dblayer_strerror(rc));
if (task) {
@@ -2009,7 +2012,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
if (DB_NOTFOUND == rc) {
break;
} else if (0 != rc) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: Failed to read database, "
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldbm2index - %s: Failed to read database, "
"errno=%d (%s)\n", inst->inst_name, rc,
dblayer_strerror(rc));
if (task) {
@@ -2093,7 +2096,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, LOG_DEBUG,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE,
"ldbm2index: entryrdn is not available; "
"composing dn (rdn: %s, ID: %d)\n",
rdn, temp_id);
@@ -2105,14 +2108,14 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
&psrdn, NULL, 0,
run_from_cmdline, NULL);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm2index: Skip ID %d\n", pid);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Parent entry (ID %d) of entry. "
+ LDAPDebug1Arg(LDAP_DEBUG_WARNING,
+ "ldbm_back_ldbm2index - Skip ID %d\n", pid);
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "ldbm_back_ldbm2index - Parent entry (ID %d) of entry. "
"(ID %d, rdn: %s) does not exist.\n",
pid, temp_id, rdn);
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "We recommend to export the backend "
+ LDAPDebug1Arg(LDAP_DEBUG_WARNING,
+ "ldbm_back_ldbm2index - We recommend to export the backend "
"instance %s and reimport it.\n",
instance_name);
slapi_ch_free_string(&rdn);
@@ -2124,8 +2127,8 @@ 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, LOG_ERR,
- "ldbm2ldif: Failed to compose dn for "
+ LDAPDebug2Args(LDAP_DEBUG_ANY,
+ "ldbm_back_ldbm2index - Failed to compose dn for "
"(rdn: %s, ID: %d) from Slapi_RDN\n",
rdn, temp_id);
slapi_ch_free_string(&rdn);
@@ -2146,12 +2149,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, LOG_DEBUG, "ldbm2index",
+ slapi_log_error(SLAPI_LOG_CACHE, "ldbm_back_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, LOG_DEBUG, "ldbm2index",
+ slapi_log_error(SLAPI_LOG_CACHE, "ldbm_back_ldbm2index",
"entryrdn_lookup_dn returned: %s, "
"and set to dn cache\n", dn);
}
@@ -2174,8 +2177,8 @@ 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, LOG_ERR,
- "%s: WARNING: skipping badly formatted entry (id %lu)\n",
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "ldbm_back_ldbm2index - %s: Skipping badly formatted entry (id %lu)\n",
inst->inst_name, (u_long)temp_id, 0);
backentry_free( &ep );
continue;
@@ -2197,8 +2200,8 @@ 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, LOG_ERR, "ldbm_back_ldbm2index",
- "%s: ERROR: failed to begin txn for update index '%s' (err %d: %s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_ldbm2index",
+ "%s: 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) {
slapi_task_log_notice(task, "%s: ERROR: failed to begin txn for "
@@ -2215,8 +2218,8 @@ 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, LOG_ERR, "ldbm_back_ldbm2index",
- "%s: ERROR: failed to update index '%s' (err %d: %s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_ldbm2index",
+ "%s: Failed to update index '%s' (err %d: %s)\n",
inst->inst_name, SLAPI_ATTR_TOMBSTONE_CSN, rc, dblayer_strerror(rc));
if (task) {
slapi_task_log_notice(task, "%s: ERROR: failed to update index '%s' "
@@ -2233,8 +2236,8 @@ 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, LOG_ERR, "ldbm_back_ldbm2index",
- "%s: ERROR: failed to commit txn for update index '%s' (err %d: %s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_ldbm2index",
+ "%s: 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) {
slapi_task_log_notice(task,"%s: ERROR: failed to commit txn for "
@@ -2285,12 +2288,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, LOG_ERR,
- "%s: ERROR: failed to begin txn for update "
- "index '%s'\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2index - %s: Failed to begin txn for update index '%s'\n",
inst->inst_name, indexAttrs[j], 0);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: Error %d: %s\n", inst->inst_name, rc,
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2index - %s: Error %d: %s\n", inst->inst_name, rc,
dblayer_strerror(rc));
if (task) {
slapi_task_log_notice(task,
@@ -2309,11 +2311,11 @@ 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, LOG_ERR,
- "%s: ERROR: failed to update index '%s'\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2index - %s: Failed to update index '%s'\n",
inst->inst_name, indexAttrs[j], 0);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: Error %d: %s\n", inst->inst_name, rc,
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2index - %s: Error %d: %s\n", inst->inst_name, rc,
dblayer_strerror(rc));
if (task) {
slapi_task_log_notice(task,
@@ -2330,12 +2332,12 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
if (!run_from_cmdline) {
rc = dblayer_txn_commit(be, &txn);
if (0 != rc) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: ERROR: failed to commit txn for "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2index - %s: Failed to commit txn for "
"update index '%s'\n",
inst->inst_name, indexAttrs[j], 0);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: Error %d: %s\n", inst->inst_name, rc,
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2index - %s: Error %d: %s\n", inst->inst_name, rc,
dblayer_strerror(rc));
if (task) {
slapi_task_log_notice(task,
@@ -2369,11 +2371,11 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
rc = dblayer_txn_begin(be, NULL, &txn);
if (0 != rc) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: ERROR: failed to begin txn for update index '%s'\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2index - %s: Failed to begin txn for update index '%s'\n",
inst->inst_name, ai, 0);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: Error %d: %s\n", inst->inst_name, rc,
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2index - %s: Error %d: %s\n", inst->inst_name, rc,
dblayer_strerror(rc));
if (task) {
slapi_task_log_notice(task,
@@ -2396,11 +2398,11 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
{
rc = dblayer_txn_commit(be, &txn);
if (0 != rc) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: ERROR: failed to commit txn for update index '%s'\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2index - %s: Failed to commit txn for update index '%s'\n",
inst->inst_name, ai, 0);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: Error %d: %s\n", inst->inst_name, rc,
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2index - %s: Error %d: %s\n", inst->inst_name, rc,
dblayer_strerror(rc));
if (task) {
slapi_task_log_notice(task,
@@ -2420,11 +2422,11 @@ 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, LOG_ERR,
- "%s: ERROR: failed to update index 'ancestorid'\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2index - %s: Failed to update index 'ancestorid'\n",
inst->inst_name, 0, 0);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: Error %d: %s\n", inst->inst_name, rc,
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2index - %s: Error %d: %s\n", inst->inst_name, rc,
dblayer_strerror(rc));
if (task) {
slapi_task_log_notice(task,
@@ -2441,12 +2443,11 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
if (!run_from_cmdline) {
rc = dblayer_txn_begin(be, NULL, &txn);
if (0 != rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: ERROR: failed to begin txn for update "
- "index 'entryrdn'\n",
- inst->inst_name);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: Error %d: %s\n",
- inst->inst_name, rc, dblayer_strerror(rc));
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2index - %s: ERROR: failed to begin txn for update index 'entryrdn'\n",
+ inst->inst_name);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldbm2index - %s: Error %d: %s\n",
+ inst->inst_name, rc, dblayer_strerror(rc));
if (task) {
slapi_task_log_notice(task,
"%s: ERROR: failed to begin txn for "
@@ -2459,11 +2460,11 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
}
rc = entryrdn_index_entry(be, ep, BE_INDEX_ADD, &txn);
if (rc) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: ERROR: failed to update index 'entryrdn'\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2index - %s: Failed to update index 'entryrdn'\n",
inst->inst_name, 0, 0);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: Error %d: %s\n", inst->inst_name, rc,
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2index - %s: Error %d: %s\n", inst->inst_name, rc,
dblayer_strerror(rc));
if (task) {
slapi_task_log_notice(task,
@@ -2480,11 +2481,11 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
if (!run_from_cmdline) {
rc = dblayer_txn_commit(be, &txn);
if (0 != rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: ERROR: failed to commit txn for "
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2index - %s: Failed to commit txn for "
"update index 'entryrdn'\n",
inst->inst_name);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: Error %d: %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_ldbm2index - %s: Error %d: %s\n",
inst->inst_name, rc, dblayer_strerror(rc));
if (task) {
slapi_task_log_notice(task,
@@ -2519,7 +2520,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, LOG_ERR, "%s: Indexed %d entries (%d%%).\n",
+ LDAPDebug(LDAP_DEBUG_INFO, "ldbm_back_ldbm2index - %s: Indexed %d entries (%d%%).\n",
inst->inst_name, count, percent);
}
@@ -2546,7 +2547,7 @@ ldbm_back_ldbm2index(Slapi_PBlock *pb)
slapi_task_log_notice(task, "%s: Finished indexing.",
inst->inst_name);
}
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: Finished indexing.\n",
+ LDAPDebug(LDAP_DEBUG_INFO, "ldbm_back_ldbm2index - %s: Finished indexing.\n",
inst->inst_name, 0, 0);
return_value = 0; /* success */
err_out:
@@ -2571,13 +2572,13 @@ err_min:
if (run_from_cmdline) {
if (0 != dblayer_flush(li)) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: Failed to flush database\n", inst->inst_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2index - %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, LOG_ERR,
- "%s: Failed to close database\n", inst->inst_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_ldbm2index - %s: Failed to close database\n", inst->inst_name, 0, 0);
}
}
@@ -2589,7 +2590,7 @@ err_min:
slapi_ch_free((void **)&pvlv);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ldbm_back_ldbm2index\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= ldbm_back_ldbm2index\n", 0, 0, 0 );
return return_value;
}
@@ -2741,7 +2742,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, LOG_DEBUG, "upgrade DB", "Reindexing all...\n");
+ slapi_log_error(SLAPI_LOG_TRACE, "ldbm_back_upgradedb", "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 +2766,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, LOG_DEBUG, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_TRACE, "ldbm_back_upgradedb",
"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 +2777,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, LOG_ERR, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_upgradedb",
"ldbm: '%s' is already in the middle of "
"another task and cannot be disturbed.\n",
inst->inst_name);
@@ -2810,7 +2811,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, LOG_ERR, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_upgradedb",
"DN2RDN option (-r) is given, but %s is off in "
"dse.ldif. Please change the value to on.\n",
CONFIG_ENTRYRDN_SWITCH);
@@ -2838,7 +2839,7 @@ int ldbm_back_upgradedb(Slapi_PBlock *pb)
}
if (!need_upgrade)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_INFO, "ldbm_back_upgradedb",
"Index version is up-to-date\n");
return 0;
}
@@ -2846,8 +2847,8 @@ int ldbm_back_upgradedb(Slapi_PBlock *pb)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
- "upgrade DB", "No instance to be upgraded\n");
+ slapi_log_error(SLAPI_LOG_WARNING,
+ "ldbm_back_upgradedb", "No instance to be upgraded\n");
return -1;
}
@@ -2859,7 +2860,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, LOG_ERR, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_ERR, "upgrade DB",
"Backup directory is not specified.\n");
return -1;
}
@@ -2898,8 +2899,8 @@ 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, LOG_ERR, "upgrade DB",
- "upgradedb: Failed to init database\n");
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_upgradedb",
+ "Failed to init database\n");
goto fail1;
}
}
@@ -2918,9 +2919,8 @@ int ldbm_back_upgradedb(Slapi_PBlock *pb)
slapi_ch_free_string(&inst_dirp);
if (backup_rval < 0)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
- "Warning: Failed to backup index files (instance %s).\n",
- inst_dirp);
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_upgradedb",
+ "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, LOG_ERR, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_WARNING, "ldbm_back_upgradedb",
"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, LOG_ERR, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_WARNING, "ldbm_back_upgradedb",
"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, LOG_ERR, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_upgradedb",
"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, LOG_ERR, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_upgradedb",
"Failed to flush database\n");
}
if (0 != dblayer_close(li,DBLAYER_IMPORT_MODE))
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_upgradedb",
"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, LOG_ERR, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_upgradedb",
"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, LOG_ERR, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_upgradedb",
"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, LOG_ERR, "upgradedb_copy_logfiles: "
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "upgradedb_copy_logfiles - "
"NULL src directory\n");
return -1;
}
if (NULL == dest || '\0' == *dest) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "upgradedb_copy_logfiles: "
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "upgradedb_copy_logfiles - "
"NULL dest directory\n");
return -1;
}
@@ -3173,13 +3173,13 @@ 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, LOG_DEBUG, "upgrade DB",
- "upgradedb_delete_indices_4cmd: %s\n", inst_dir);
+ slapi_log_error(SLAPI_LOG_TRACE, "upgradedb_delete_indices_4cmd",
+ "%s\n", inst_dir);
dirhandle = PR_OpenDir(inst_dirp);
if (!dirhandle)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "upgrade DB",
- "upgradedb_delete_indices_4cmd: PR_OpenDir failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, "upgradedb_delete_indices_4cmd",
+ "PR_OpenDir failed\n");
if (inst_dirp != inst_dir)
slapi_ch_free_string(&inst_dirp);
return -1;
@@ -3207,8 +3207,8 @@ 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, LOG_DEBUG, "upgrade DB",
- "upgradedb_delete_indices_4cmd: %s deleted\n", fullpath);
+ slapi_log_error(SLAPI_LOG_TRACE, "upgradedb_delete_indices_4cmd",
+ "%s deleted\n", fullpath);
}
if (fullpathp != fullpath)
slapi_ch_free_string(&fullpathp);
@@ -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, LOG_ERR, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_ERR, "upgradedb_core",
"%s: Start upgradedb.\n", inst->inst_name);
if (!run_from_cmdline)
{
/* shutdown this instance of the db */
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "upgrade DB",
+ slapi_log_error(SLAPI_LOG_TRACE, "upgradedb_core",
"Bringing %s offline...\n", inst->inst_name);
slapi_mtn_be_disable(inst->inst_be);
@@ -3253,8 +3253,8 @@ 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, LOG_ERR, "upgrade DB",
- "upgradedb: Failed to init instance %s\n", inst->inst_name);
+ slapi_log_error(SLAPI_LOG_ERR, "upgradedb_core",
+ "Failed to init instance %s\n", inst->inst_name);
return -1;
}
@@ -3297,9 +3297,8 @@ _get_and_add_parent_rdns(backend *be,
}
if (NULL == be || NULL == srdn) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
- "_get_and_add_parent_rdns: Empty %s\n",
- NULL==be?"be":"srdn");
+ slapi_log_error(SLAPI_LOG_ERR, "_get_and_add_parent_rdns",
+ "Empty %s\n", NULL==be?"be":"srdn");
return rc;
}
@@ -3314,8 +3313,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, LOG_ERR, "ldif2dbm",
- "_get_and_add_parent_rdns: "
+ slapi_log_error(SLAPI_LOG_ERR, "_get_and_add_parent_rdns",
"Failed to convert DN %s to RDN\n",
slapi_rdn_get_rdn(&mysrdn));
slapi_rdn_done(&mysrdn);
@@ -3324,8 +3322,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, LOG_ERR, "ldif2dbm",
- "_get_and_add_parent_rdns: "
+ slapi_log_error(SLAPI_LOG_ERR, "_get_and_add_parent_rdns",
"Failed to merge Slapi_RDN %s to RDN\n",
slapi_sdn_get_dn(bdn->dn_sdn));
}
@@ -3333,8 +3330,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, LOG_ERR, "ldif2dbm",
- "_get_and_add_parent_rdns: "
+ slapi_log_error(SLAPI_LOG_ERR, "_get_and_add_parent_rdns",
"Failed to convert DN %s to RDN\n",
slapi_sdn_get_dn(bdn->dn_sdn));
CACHE_RETURN(&inst->inst_dncache, &bdn);
@@ -3348,8 +3344,8 @@ _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, LOG_ERR, "ldif2dbm",
- "_get_and_add_parent_rdns: Empty db\n");
+ slapi_log_error(SLAPI_LOG_ERR, "_get_and_add_parent_rdns",
+ "Empty db\n");
goto bail;
}
id_internal_to_stored(id, (char *)&storedid);
@@ -3361,24 +3357,21 @@ _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, LOG_ERR, "ldif2dbm",
- "_get_and_add_parent_rdns: Failed to position "
- "cursor at ID " ID_FMT "\n", id);
+ slapi_log_error(SLAPI_LOG_ERR, "_get_and_add_parent_rdns",
+ "Failed to position cursor at ID " ID_FMT "\n", id);
goto bail;
}
/* 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, LOG_ERR, "ldif2dbm",
- "_get_and_add_parent_rdns: "
+ slapi_log_error(SLAPI_LOG_ERR, "_get_and_add_parent_rdns",
"Failed to get rdn of entry " ID_FMT "\n", id);
goto bail;
}
/* 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, LOG_ERR, "ldif2dbm",
- "_get_and_add_parent_rdns: "
+ slapi_log_error(SLAPI_LOG_ERR, "_get_and_add_parent_rdns",
"Failed to add rdn %s of entry " ID_FMT "\n", rdn, id);
goto bail;
}
@@ -3406,8 +3399,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, LOG_ERR, "ldif2dbm",
- "_get_and_add_parent_rdns: "
+ slapi_log_error(SLAPI_LOG_ERR, "_get_and_add_parent_rdns",
"Failed to merge Slapi_RDN %s to RDN\n",
slapi_rdn_get_rdn(&mysrdn));
goto bail;
@@ -3419,8 +3411,8 @@ _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, LOG_ERR, "ldif2dbm",
- "ldbm2index: Failed to compose dn for "
+ slapi_log_error(SLAPI_LOG_ERR, "_get_and_add_parent_rdns",
+ "Failed to compose dn for "
"(rdn: %s, ID: %d) from Slapi_RDN\n", rdn, id);
goto bail;
}
@@ -3434,11 +3426,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, LOG_ERR, "ldif2dbm",
- "%s: ERROR: failed to begin txn for update "
+ slapi_log_error(SLAPI_LOG_ERR, "_get_and_add_parent_rdns",
+ "%s: Failed to begin txn for update "
"index 'entryrdn'\n",
inst->inst_name);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_ERR, "_get_and_add_parent_rdns",
"%s: Error %d: %s\n",
inst->inst_name, rc, dblayer_strerror(rc));
goto bail;
@@ -3446,10 +3438,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, LOG_ERR, "ldif2dbm",
- "%s: ERROR: failed to update index 'entryrdn'\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_get_and_add_parent_rdns",
+ "%s: Failed to update index 'entryrdn'\n",
inst->inst_name);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_ERR, "_get_and_add_parent_rdns",
"%s: Error %d: %s\n", inst->inst_name, rc,
dblayer_strerror(rc));
if (txn && !run_from_cmdline) {
@@ -3460,11 +3452,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, LOG_ERR, "ldif2dbm",
- "%s: ERROR: failed to commit txn for "
+ slapi_log_error(SLAPI_LOG_ERR, "_get_and_add_parent_rdns",
+ "%s: Failed to commit txn for "
"update index 'entryrdn'\n",
inst->inst_name);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
+ slapi_log_error(SLAPI_LOG_ERR, "_get_and_add_parent_rdns",
"%s: Error %d: %s\n",
inst->inst_name, rc, dblayer_strerror(rc));
goto bail;
@@ -3472,24 +3464,22 @@ _get_and_add_parent_rdns(backend *be,
}
} else if (index_ext & DB2LDIF_ENTRYRDN) {
if (NULL == eargs) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
- "_get_and_add_parent_rdns: Empty export args\n");
+ slapi_log_error(SLAPI_LOG_ERR, "_get_and_add_parent_rdns",
+ "Empty export args\n");
rc = -1;
goto bail;
}
eargs->ep = ep;
rc = export_one_entry(li, inst, eargs);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
- "_get_and_add_parent_rdns: "
+ slapi_log_error(SLAPI_LOG_ERR, "_get_and_add_parent_rdns",
"Failed to export an entry %s\n",
slapi_sdn_get_dn(slapi_entry_get_sdn(ep->ep_entry)));
goto bail;
}
rc = idl_append_extend(&(eargs->pre_exported_idl), id);
if (rc) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "ldif2dbm",
- "_get_and_add_parent_rdns: "
+ slapi_log_error(SLAPI_LOG_ERR, "_get_and_add_parent_rdns",
"Failed add %d to exported idl\n", id);
}
}
@@ -3535,17 +3525,18 @@ _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, LOG_ERR, "_export_or_index_parents: "
+ LDAPDebug1Arg(LDAP_DEBUG_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, LOG_ERR, "_export_or_index_parents: "
+ LDAPDebug2Args(LDAP_DEBUG_WARNING, "_export_or_index_parents - "
"parentid conflict found between entryrdn (%d) and "
"id2entry (%d)\n", temp_pid, pid);
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "Ignoring entryrdn\n");
+ LDAPDebug0Args(LDAP_DEBUG_WARNING, "_export_or_index_parents - "
+ "Ignoring entryrdn\n");
} else {
struct backdn *bdn = NULL;
char *pdn = NULL;
@@ -3564,13 +3555,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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_CACHE,
"_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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_CACHE,
"_export_or_index_parents",
"entryrdn_lookup_dn returned: %s, "
"and set to dn cache\n", pdn);
@@ -3585,7 +3576,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, LOG_ERR, "_export_or_index_parents: "
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "_export_or_index_parents - "
"Failed to get the parent of ID %d\n", pid);
goto bail;
}
@@ -3604,8 +3595,8 @@ _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, LOG_ERR,
- "_export_or_index_parents: Failed to get rdn for ID: %d\n", pid);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "_export_or_index_parents - Failed to get rdn for ID: %d\n", pid);
slapi_rdn_done(psrdn);
}
bail:
@@ -3676,7 +3667,7 @@ int ldbm_back_upgradednformat(Slapi_PBlock *pb)
return -1;
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_upgradednformat",
" Online mode is not supported. "
"Shutdown the server and run the tool\n");
goto bail;
@@ -3685,11 +3676,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, LOG_ERR, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_upgradednformat",
"Unknown ldbm instance %s\n", instance_name);
goto bail;
}
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_INFO, "ldbm_back_upgradednformat",
"%s: Start upgrade dn format.\n", inst->inst_name);
slapi_pblock_set(pb, SLAPI_BACKEND, inst->inst_be);
@@ -3698,7 +3689,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, LOG_ERR, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_upgradednformat",
"Working DB instance dir %s is not a directory\n",
rawworkdbdir);
goto bail;
@@ -3706,7 +3697,7 @@ int ldbm_back_upgradednformat(Slapi_PBlock *pb)
dirhandle = PR_OpenDir(rawworkdbdir);
if (!dirhandle)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_upgradednformat",
"Failed to open working DB instance dir %s\n",
rawworkdbdir);
goto bail;
@@ -3723,7 +3714,7 @@ int ldbm_back_upgradednformat(Slapi_PBlock *pb)
PR_CloseDir(dirhandle);
if (!found) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_upgradednformat",
"Working DB instance dir %s does not include %s file\n",
rawworkdbdir, ID2ENTRY);
goto bail;
@@ -3756,7 +3747,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, LOG_ERR, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_INFO, "ldbm_back_upgradednformat",
"Instance %s in %s is up-to-date\n",
instance_name, workdbdir);
rc = 0; /* 0: up-to-date */
@@ -3769,7 +3760,7 @@ int ldbm_back_upgradednformat(Slapi_PBlock *pb)
rc = 1; /* 0: need upgrade (both) */
}
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_upgradednformat",
"Failed to get DBVERSION (Instance name: %s, dir %s)\n",
instance_name, workdbdir);
rc = -1; /* error */
@@ -3778,7 +3769,7 @@ int ldbm_back_upgradednformat(Slapi_PBlock *pb)
sep = PL_strrchr(workdbdir, '/');
if (!sep) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_upgradednformat",
"Working DB instance dir %s does not include %s file\n",
workdbdir, ID2ENTRY);
goto bail;
@@ -3790,7 +3781,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, LOG_ERR, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_upgradednformat",
"Failed to init database\n");
goto bail;
}
@@ -3800,7 +3791,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, LOG_ERR, "Upgrade DB Format",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_upgradednformat",
"Failed to init instance %s\n", inst->inst_name);
goto bail;
}
@@ -3814,11 +3805,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, LOG_ERR, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_upgradednformat",
"Failed to flush database\n");
}
if (0 != dblayer_close(li,DBLAYER_IMPORT_MODE)) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "Upgrade DN Format",
+ slapi_log_error(SLAPI_LOG_ERR, "ldbm_back_upgradednformat",
"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 95be888..29643f0 100644
--- a/ldap/servers/slapd/back-ldbm/misc.c
+++ b/ldap/servers/slapd/back-ldbm/misc.c
@@ -24,15 +24,15 @@ 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, LOG_DEBUG,"%s, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_BACKLDBM,"%s, err=%d %s\n",
buffer,err,(msg = dblayer_strerror( err )) ? msg : "");
} else if (err == DB_RUNRECOVERY) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR, "FATAL ERROR at %s (%d); "
+ LDAPDebug2Args(LDAP_DEBUG_ERR, "%s (%d); "
"server stopping as database recovery needed.\n", str, c);
exit(1);
} else {
PR_snprintf(buffer,200,"%s BAD %d",str,c);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "%s, err=%d %s\n",
buffer, err, (msg = dblayer_strerror( err )) ? msg : "");
}
}
@@ -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, LOG_DEBUG, "could not set instance [%s] as busy, probably already busy\n",
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "could not set instance [%s] as busy, probably already busy\n",
inst->inst_name);
}
}
@@ -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, LOG_ERR, "mkdir_p %s: error %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "mkdir_p %s: error %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "Error: ldbm_txn_ruv_modify_context failed to retrieve and lock RUV entry\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "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, LOG_ERR, "Error: ldbm_txn_ruv_modify_context failed to apply updates to RUV entry\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_txn_ruv_modify_context - Failed to apply updates to RUV entry\n",
0, 0, 0 );
rc = -1;
modify_term( mc, be );
@@ -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, LOG_ERR, "get_value_from_string", "parse "
+ slapi_log_error(SLAPI_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, LOG_ERR, "get_value_from_string", "type "
+ slapi_log_error(SLAPI_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, LOG_ERR, "get_values_from_string",
+ slapi_log_error(SLAPI_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, LOG_ERR, "get_values_from_string",
+ slapi_log_error(SLAPI_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/nextid.c b/ldap/servers/slapd/back-ldbm/nextid.c
index c5d2573..ca4ba8e 100644
--- a/ldap/servers/slapd/back-ldbm/nextid.c
+++ b/ldap/servers/slapd/back-ldbm/nextid.c
@@ -26,14 +26,13 @@ next_id(backend *be)
/*Test if nextid hasn't been initialized. */
if (inst->inst_nextid < 1) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm backend instance: nextid not initialized... exiting.\n", 0,0,0);
- exit(1);
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "next_id - nextid not initialized... exiting.\n", 0,0,0);
+ exit(1);
}
/*Increment the in-memory nextid*/
inst->inst_nextid++;
-
id = inst->inst_nextid - 1;
/*unlock*/
@@ -41,17 +40,16 @@ 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, 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, LOG_ERR,
- "ldbm backend instance: WARNING: backend '%s' may run out "
+ if ( id >= MAXID ) {
+ LDAPDebug(LDAP_DEBUG_ALERT,
+ "next_id - FATAL ERROR: backend '%s' has no"
+ "IDs left. DATABASE MUST BE REBUILT.\n", be->be_name, 0, 0);
+ id = MAXID;
+ } else {
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "next_id - Backend '%s' may run out "
"of IDs. Please, rebuild database.\n", be->be_name, 0, 0);
- }
+ }
}
return( id );
}
@@ -66,9 +64,9 @@ next_id_return( backend *be, ID id )
/*Test if nextid hasn't been initialized. */
if (inst->inst_nextid < 1) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm backend instance: nextid not initialized... exiting\n", 0,0,0);
- exit(1);
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "next_id_return - nextid not initialized... exiting\n", 0,0,0);
+ exit(1);
}
if ( id != inst->inst_nextid - 1 ) {
@@ -86,23 +84,23 @@ next_id_return( backend *be, ID id )
ID
next_id_get( backend *be )
{
- ldbm_instance *inst = (ldbm_instance *) be->be_instance_info;
- ID id;
-
- /*lock*/
- PR_Lock( inst->inst_nextid_mutex );
-
- /*Test if nextid hasn't been initialized.*/
- if (inst->inst_nextid < 1) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ldbm backend instance: nextid not initialized... exiting\n", 0,0,0);
- exit(1);
- }
-
- id = inst->inst_nextid;
- PR_Unlock( inst->inst_nextid_mutex );
-
- return( id );
+ ldbm_instance *inst = (ldbm_instance *) be->be_instance_info;
+ ID id;
+
+ /*lock*/
+ PR_Lock( inst->inst_nextid_mutex );
+
+ /*Test if nextid hasn't been initialized.*/
+ if (inst->inst_nextid < 1) {
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "next_id_get - nextid not initialized... exiting\n", 0,0,0);
+ exit(1);
+ }
+
+ id = inst->inst_nextid;
+ PR_Unlock( inst->inst_nextid_mutex );
+
+ return( id );
}
/*
diff --git a/ldap/servers/slapd/back-ldbm/parents.c b/ldap/servers/slapd/back-ldbm/parents.c
index 42f7b3e..eabfc1f 100644
--- a/ldap/servers/slapd/back-ldbm/parents.c
+++ b/ldap/servers/slapd/back-ldbm/parents.c
@@ -99,7 +99,8 @@ 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, LOG_ERR, "Parent %s has no children. (op 0x%x, repl_op 0x%x)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "parent_update_on_childchange - "
+ "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 bd0930a..05311d2 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"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 faed008..48ce1d2 100644
--- a/ldap/servers/slapd/back-ldbm/seq.c
+++ b/ldap/servers/slapd/back-ldbm/seq.c
@@ -87,12 +87,12 @@ ldbm_back_seq( Slapi_PBlock *pb )
/* get a database */
ainfo_get( be, attrname, &ai );
- LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG,
- " seq: indextype: %s indexmask: 0x%x seek type: %d\n",
+ LDAPDebug(LDAP_DEBUG_ARGS,
+ " ldbm_back_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, LOG_DEBUG,
- "seq: caller specified un-indexed attribute %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE,
+ "ldbm_back_seq - caller specified un-indexed attribute %s\n",
attrname ? attrname : "", 0, 0 );
slapi_send_ldap_result( pb, LDAP_UNWILLING_TO_PERFORM, NULL,
"Unindexed seq access type", 0, NULL );
@@ -100,8 +100,8 @@ ldbm_back_seq( Slapi_PBlock *pb )
}
if ( (return_value = dblayer_get_index_file( be, ai, &db, DBOPEN_CREATE )) != 0 ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "<= ldbm_back_seq NULL (could not open index file for attribute %s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldbm_back_seq - Could not open index file for attribute %s\n",
attrname, 0, 0 );
slapi_send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL, NULL, 0, NULL );
return -1;
@@ -238,7 +238,7 @@ retry:
dblayer_read_txn_abort(be, &txn);
}
if (DB_LOCK_DEADLOCK == return_value) {
- ldbm_nasty("ldbm_back_seq deadlock retry", 1601, err);
+ ldbm_nasty("ldbm_back_seq - deadlock retry", 1601, err);
/* just in case */
slapi_ch_free(&(data.data));
if ((key.data != little_buffer) && (key.data != &keystring)) {
@@ -248,9 +248,9 @@ retry:
}
}
if(retry_count == IDL_FETCH_RETRY_COUNT) {
- ldbm_nasty("ldbm_back_seq retry count exceeded",1645,err);
+ ldbm_nasty("ldbm_back_seq - retry count exceeded",1645,err);
} else if ( err != 0 && err != DB_NOTFOUND ) {
- ldbm_nasty("ldbm_back_seq database error", 1650, err);
+ ldbm_nasty("ldbm_back_seq - database error", 1650, err);
}
slapi_ch_free( &(data.data) );
if ( key.data != little_buffer && key.data != &keystring ) {
@@ -275,10 +275,10 @@ retry:
{
if ( err != LDAP_SUCCESS )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "seq id2entry err %d\n", err, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_seq - id2entry err %d\n", err, 0, 0 );
}
- LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG,
- "ldbm_back_seq: candidate %lu not found\n",
+ LDAPDebug(LDAP_DEBUG_ARGS,
+ "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 e3ebe07..9cdc51a 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, LOG_DEBUG, "Asked to sort ALLIDS candidate list, refusing\n",0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "Attempting to sort a non-ordered attribute (%s)\n",this_s->type, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "<= Sorting done\n",0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG,"compare_entries_sv db err %d\n",err,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"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, LOG_DEBUG,"compare_entries_sv db err %d\n",err,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"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 99a1b53..898a95d 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, LOG_DEBUG, "ldbm backend starting\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "ldbm_back_start - 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, LOG_ERR, "start: Loading database configuration failed\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_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, LOG_ERR, "start: Resource limit registration failed for lookthroughlimit\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_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, LOG_ERR, "start: Resource limit registration failed for allidslimit\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_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, LOG_ERR, "start: Resource limit registration failed for pagedlookthroughlimit\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_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, LOG_ERR, "start: Resource limit registration failed for pagedallidslimit\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_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, LOG_ERR, "start: Resource limit registration failed for rangelookthroughlimit\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_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, LOG_ERR, "cache autosizing: bad settings, "
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_start - 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, LOG_ERR, "start: Unable to determine system page limits\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_start - Unable to determine system page limits\n",
0, 0, 0 );
return SLAPI_FAIL_GENERAL;
}
@@ -157,28 +157,29 @@ 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, 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);
+ LDAPDebug(LDAP_DEBUG_NOTICE,
+ "ldbm_back_start - "
+ "%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, LOG_DEBUG,
- "%s: entry cache size: %llu B; db size: %llu B\n",
+ LDAPDebug(LDAP_DEBUG_BACKLDBM,
+ "ldbm_back_start - %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, LOG_DEBUG,
- "total cache size: %llu B; \n",
+ LDAPDebug(LDAP_DEBUG_BACKLDBM,
+ "ldbm_back_start - total cache size: %llu B; \n",
total_cache_size, 0 ,0 );
}
- LDAPDebug(LDAP_DEBUG_BACKLDBM, LOG_DEBUG,
- "Total entry cache size: %llu B; "
+ LDAPDebug(LDAP_DEBUG_BACKLDBM,
+ "ldbm_back_start - Total entry cache size: %llu B; "
"dbcache size: %llu B; "
- "available memory size: %llu B; \n",
+ "available memory size: %llu B;\n",
#ifdef LINUX
(PRUint64)total_cache_size, (PRUint64)li->li_dbcachesize, availpages * pagesize
#else
@@ -195,8 +196,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, 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);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_start - Your autosized cache values have been reduced. Likely your nsslapd-cache-autosize percentage is too high.\n", 0,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_start - %s", msg,0,0);
}
/* It's valid, lets divide it up and set according to user prefs */
zone_pages = zone_size / pagesize;
@@ -205,11 +206,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, LOG_ERR, "cache autosizing. found %dk physical memory\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_start - cache autosizing. found %dk physical memory\n",
pages*(pagesize/1024), 0, 0);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cache autosizing. found %dk avaliable\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_start - cache autosizing. found %dk avaliable\n",
zone_pages*(pagesize/1024), 0, 0);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "cache autosizing: db cache: %dk, "
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_start - 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 +248,14 @@ ldbm_back_start( Slapi_PBlock *pb )
import_size = import_pages * pagesize;
issane = util_is_cachesize_sane(&import_size);
if (!issane) {
- 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);
+ LDAPDebug(LDAP_DEBUG_NOTICE, "ldbm_back_start - "
+ "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, LOG_ERR, "cache autosizing: import cache: %dk \n",
+ LDAPDebug(LDAP_DEBUG_NOTICE, "ldbm_back_start - cache autosizing: import cache: %dk\n",
import_pages*(pagesize/1024), NULL, NULL);
sprintf(s, "%lu", (unsigned long)(import_pages * pagesize));
@@ -266,10 +270,10 @@ 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, 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; "
+ LDAPDebug(LDAP_DEBUG_CRIT, "ldbm_back_start - It is highly likely your memory configuration of all backends will EXCEED your systems memory.\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_CRIT, "ldbm_back_start - In a future release this WILL prevent server start up. You MUST alter your configuration.\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "ldbm_back_start - Total entry cache size: %llu B; "
"dbcache size: %llu B; "
"available memory size: %llu B; \n",
#ifdef LINUX
@@ -278,7 +282,7 @@ ldbm_back_start( Slapi_PBlock *pb )
(PRUint64)total_cache_size, (PRUint64)li->li_dbcachesize, memsize
#endif
);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, msg, 0,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_start - %s\n", msg,0,0);
/* WB 2016 - This should be UNCOMMENTED in a future release */
/* return SLAPI_FAIL_GENERAL; */
}
@@ -288,7 +292,7 @@ ldbm_back_start( Slapi_PBlock *pb )
retval = check_db_version(li, &action);
if (0 != retval)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "start: db version is not supported\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_start - db version is not supported\n",
0, 0, 0);
return SLAPI_FAIL_GENERAL;
}
@@ -304,7 +308,7 @@ ldbm_back_start( Slapi_PBlock *pb )
}
if (0 != retval) {
char *msg;
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "start: Failed to init database, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_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 +318,12 @@ ldbm_back_start( Slapi_PBlock *pb )
retval = ldbm_instance_startall(li);
if (0 != retval) {
char *msg;
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "start: Failed to start databases, err=%d %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_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, LOG_ERR, "Failed to allocate %d byte dbcache. "
+ LDAPDebug(LDAP_DEBUG_ERR, "ldbm_back_start - 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 +352,7 @@ ldbm_back_start( Slapi_PBlock *pb )
/* initialize the USN counter */
ldbm_usn_init(li);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ldbm backend done starting\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "ldbm_back_start - 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 00972ca..8169077 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, LOG_DEBUG, "=> uniqueid2entry \"%s\"\n", uniqueid,
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= uniqueid2entry %p\n", e, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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 762065b..c1616d1 100644
--- a/ldap/servers/slapd/back-ldbm/upgrade.c
+++ b/ldap/servers/slapd/back-ldbm/upgrade.c
@@ -147,8 +147,8 @@ check_db_version( struct ldbminfo *li, int *action )
value = lookup_dbversion( ldbmversion, DBVERSION_TYPE | DBVERSION_ACTION );
if ( !value )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: Database version mismatch (expecting "
+ LDAPDebug(LDAP_DEBUG_ERR, "check_db_version - "
+ "Database version mismatch (expecting "
"'%s' but found '%s' in directory %s)\n",
LDBM_VERSION, ldbmversion, li->li_directory );
/*
@@ -231,8 +231,8 @@ check_db_inst_version( ldbm_instance *inst )
value = lookup_dbversion( ldbmversion, DBVERSION_TYPE | DBVERSION_ACTION );
if ( !value )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: Database version mismatch (expecting "
+ LDAPDebug(LDAP_DEBUG_ERR, "check_db_inst_version -"
+ "Database version mismatch (expecting "
"'%s' but found '%s' in directory %s)\n",
LDBM_VERSION, ldbmversion, inst->inst_dir_name );
/*
@@ -307,8 +307,8 @@ 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, LOG_ERR,
- "Warning: Dbversion %s does not meet nsslapd-idl-switch: \"old\"; "
+ LDAPDebug(LDAP_DEBUG_WARNING, "adjust_idl_switch - "
+ "Dbversion %s does not meet nsslapd-idl-switch: \"old\"; "
"nsslapd-idl-switch is updated to \"new\"\n", ldbmversion, 0, 0);
}
}
@@ -320,16 +320,16 @@ 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, LOG_ERR,
- "Warning: Dbversion %s does not meet nsslapd-idl-switch: \"new\"; "
+ LDAPDebug(LDAP_DEBUG_WARNING, "adjust_idl_switch - "
+ "Dbversion %s does not meet nsslapd-idl-switch: \"new\"; "
"nsslapd-idl-switch is updated to \"old\"\n",
ldbmversion, 0, 0);
}
}
else
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Warning: Dbversion %s is not supported\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "adjust_idl_switch - "
+ "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, LOG_ERR, "ldbm_upgrade: "
+ LDAPDebug(LDAP_DEBUG_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,8 @@ static int upgrade_db_3x_40(backend *be)
static char* indexes_modified[] = {"parentid", "numsubordinates", NULL};
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "WARNING: Detected a database older than this server, upgrading data...\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_WARNING, "upgrade_db_3x_40 - "
+ "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 +431,9 @@ error:
}
}
if (0 == ret) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "...upgrade complete.\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_INFO, "upgrade_db_3x_40 - ...upgrade complete.\n",0,0,0);
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: Attempt to upgrade the older database FAILED.\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "upgrade_db_3x_40 - 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 569ba9e..caf7e36 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_BACKLDBM,
"vlv_AddIndexEntry: %s is already in vlvSearchList\n",
slapi_entry_get_dn_const(entryBefore));
} else {
@@ -107,8 +107,8 @@ int vlv_DeleteSearchEntry(Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entr
if (instance_set_busy(inst) != 0)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Backend instance: '%s' is already in the middle of "
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "vlv_DeleteSearchEntry - 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;
@@ -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, LOG_ERR, "Deleted Virtual List View Search (%s).\n", p->vlv_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_INFO, "vlv_DeleteSearchEntry - 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,14 +134,14 @@ 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, LOG_ERR,
- "Backend instance: '%s' is already in the middle of "
- "another task and cannot be disturbed.\n",
- inst->inst_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "vlv_DeleteIndexEntry - 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, LOG_ERR,
- "Deleted Virtual List View Index.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_INFO,
+ "vlv_DeleteIndexEntry - Deleted Virtual List View Index.\n", 0, 0, 0);
return SLAPI_DSE_CALLBACK_OK;
}
}
@@ -158,7 +158,8 @@ 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, LOG_ERR, "Modified Virtual List View Search (%s), which will be enabled when the database is rebuilt.\n", p->vlv_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_INFO, "vlv_ModifySearchEntry - 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 +170,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, LOG_ERR, "Modified Virtual List View Index.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_INFO, "vlv_ModifyIndexEntry - Modified Virtual List View Index.\n", 0, 0, 0);
return SLAPI_DSE_CALLBACK_DO_NOT_APPLY;
}
@@ -185,7 +186,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, LOG_ERR, "Modified Virtual List View Search (%s), which will be enabled when the database is rebuilt.\n", p->vlv_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_INFO, "vlv_ModifyRDNSearchEntry - 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 +197,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, LOG_ERR, "Modified Virtual List View Index.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_INFO, "vlv_ModifyRDNIndexEntry - Modified Virtual List View Index.\n", 0, 0, 0);
return SLAPI_DSE_CALLBACK_DO_NOT_APPLY;
}
@@ -244,7 +245,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, LOG_ERR, "Parent doesn't exist for entry %s.\n",
+ LDAPDebug(LDAP_DEBUG_WARNING, "vlv_init_index_entry - Parent doesn't exist for entry %s.\n",
slapi_entry_get_dn(entryBefore), 0, 0);
vlvIndex_delete(&newVlvIndex);
}
@@ -339,7 +340,7 @@ vlv_init(ldbm_instance *inst)
backend *be = NULL;
if (!inst) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "vlv_init: invalid instance.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "vlv_init - Invalid instance.\n", 0, 0, 0);
return_value = LDAP_OPERATIONS_ERROR;
goto out;
}
@@ -372,8 +373,8 @@ 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, LOG_ERR,
- "vlv_init: failed to create vlv dn for plugin %s, instance %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_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;
return return_value;
@@ -447,8 +448,8 @@ 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, LOG_ERR,
- "vlv_remove_callbacks: failed to create vlv dn for plugin %s, "
+ LDAPDebug2Args(LDAP_DEBUG_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);
return_value = LDAP_PARAM_ERROR;
@@ -738,7 +739,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, LOG_ERR, "VLV: can't get index file '%s' (err %d)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "do_vlv_update_index - Can't get index file '%s' (err %d)\n",
pIndex->vlv_attrinfo->ai_type, rc, 0);
return rc;
}
@@ -756,8 +757,8 @@ 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, LOG_DEBUG,
- "vlv_update_index: %s Insert %s ID=%lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE,
+ "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);
} else if (rc == DB_RUNRECOVERY) {
@@ -765,13 +766,13 @@ 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, LOG_DEBUG,
- "vlv_update_index: %s Insert %s ID=%lu FAILED\n",
+ LDAPDebug(LDAP_DEBUG_TRACE,
+ "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, LOG_DEBUG,
- "vlv_update_index: %s Delete %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE,
+ "vlv_update_index - %s Delete %s\n",
pIndex->vlv_name, key->key.data, 0);
rc = db->del(db, db_txn, &key->key, 0);
if (rc == 0) {
@@ -779,8 +780,8 @@ 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, LOG_DEBUG,
- "vlv_update_index: %s Delete %s FAILED\n",
+ LDAPDebug(LDAP_DEBUG_TRACE,
+ "vlv_update_index - %s Delete %s FAILED\n",
pIndex->vlv_name, key->key.data, 0);
}
}
@@ -916,7 +917,7 @@ determine_result_range(const struct vlv_request *vlv_request_control, PRUint32 i
*pstop= length - 1;
}
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= vlv_determine_result_range: Result Range %lu-%lu\n", *pstart, *pstop, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "vlv_determine_result_range - Result Range %lu-%lu\n", *pstart, *pstop, 0 );
}
/*
@@ -1016,7 +1017,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, LOG_DEBUG, "<= vlv_build_candidate_list_byvalue: Found. Index=%lu\n",si,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "vlv_build_candidate_list_byvalue - Found. Index=%lu\n",si,0,0);
}
else
{
@@ -1037,7 +1038,7 @@ vlv_build_candidate_list_byvalue( struct vlvIndex* p, DBC *dbc, PRUint32 length,
{
si = length - 1;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= vlv_build_candidate_list_byvalue: Not Found. Index=%lu\n",si,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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 +1087,10 @@ int vlv_build_idl(PRUint32 start, PRUint32 stop, DB *db, DBC *dbc,
}
if (err != 0) {
/* some db error...? */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "vlv_build_idl: can't follow db cursor "
+ LDAPDebug(LDAP_DEBUG_ERR, "vlv_build_idl - can't follow db cursor "
"(err %d)\n", err, 0, 0);
if (err == ENOMEM)
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, " nomem: wants %d key, %d data\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "vlv_build_idl - nomem: wants %d key, %d data\n",
key.size, data.size, 0);
rc = LDAP_OPERATIONS_ERROR;
goto error;
@@ -1195,8 +1196,8 @@ 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, LOG_DEBUG,
- "=> vlv_build_candidate_list: %s %s Using VLV Index %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE,
+ "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));
if (!vlvIndex_online(p)) {
@@ -1208,7 +1209,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, LOG_ERR, "VLV: can't get index file '%s' (err %d)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "vlv_build_candidate_list - 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 +1231,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, LOG_ERR, "VLV: couldn't get cursor (err %d)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "vlv_build_candidate_list - Couldn't get cursor (err %d)\n",
rc, 0, 0);
return -1;
}
@@ -1304,7 +1305,7 @@ vlv_filter_candidates(backend *be, Slapi_PBlock *pb, const IDList *candidates, c
return LDAP_UNWILLING_TO_PERFORM;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> vlv_filter_candidates: Filtering %lu Candidates\n",(u_long)candidates->b_nids, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "vlv_filter_candidates - Filtering %lu Candidates\n",(u_long)candidates->b_nids, 0, 0 );
if (0 == return_value && candidates->b_nids>0)
{
@@ -1335,7 +1336,7 @@ vlv_filter_candidates(backend *be, Slapi_PBlock *pb, const IDList *candidates, c
*/
if(!(ALLIDS(candidates) && err==DB_NOTFOUND))
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "vlv_filter_candidates: Candidate %lu not found err=%d\n", (u_long)id, err, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "vlv_filter_candidates - Candidate %lu not found err=%d\n", (u_long)id, err, 0 );
}
}
else
@@ -1346,7 +1347,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, LOG_DEBUG, "vlv_filter_candidates: Candidate %lu Passed Filter\n", (u_long)id, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "vlv_filter_candidates - Candidate %lu Passed Filter\n", (u_long)id, 0, 0 );
idl_append(resultIdl,id);
}
}
@@ -1377,7 +1378,7 @@ vlv_filter_candidates(backend *be, Slapi_PBlock *pb, const IDList *candidates, c
}
*filteredCandidates= resultIdl;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= vlv_filter_candidates: Filtering done\n",0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "vlv_filter_candidates -Filtering done\n",0, 0, 0 );
return return_value;
}
@@ -1449,12 +1450,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, LOG_DEBUG, "vlv_trim_candidates: Include ID %lu\n",(u_long)candidates->b_ids[cursor], 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "<= vlv_trim_candidates: Trimmed list contains %lu entries.\n", (u_long)(resultIdl ? resultIdl->b_nids : 0), 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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 +1477,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, LOG_DEBUG, "=> vlv_trim_candidates_byindex: length=%u index=%d size=%d\n",length, vlv_request_control->index, vlv_request_control->contentCount );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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 +1524,7 @@ vlv_trim_candidates_byindex(PRUint32 length, const struct vlv_request *vlv_reque
}
}
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= vlv_trim_candidates_byindex: Selected Index %lu\n",si, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "vlv_trim_candidates_byindex - Selected Index %lu\n",si, 0, 0 );
return si;
}
@@ -1553,8 +1554,8 @@ 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, LOG_ERR, "vlv_trim_candidates_byvalue: "
- "attempt to compare an unordered attribute [%s]\n",
+ LDAPDebug1Arg(LDAP_DEBUG_WARNING, "vlv_trim_candidates_byvalue - "
+ "Attempt to compare an unordered attribute [%s]\n",
sort_control->type);
compare_fn = slapi_berval_cmp;
}
@@ -1565,8 +1566,8 @@ 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, LOG_ERR, "vlv_trim_candidates_byvalue: "
- "attempt to compare an unordered attribute",
+ LDAPDebug(LDAP_DEBUG_WARNING, "vlv_trim_candidates_byvalue - "
+ "Attempt to compare an unordered attribute",
0, 0, 0);
compare_fn = slapi_berval_cmp;
}
@@ -1582,7 +1583,7 @@ retry:
* Perform a binary search over the candidate list
*/
if (0 == candidates->b_nids) { /* idlist is empty */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "vlv_trim_candidates_byvalue: Candidate ID List is empty.\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_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 +1605,7 @@ retry:
if ( e == NULL )
{
int rval;
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "vlv_trim_candidates_byvalue: "
+ LDAPDebug(LDAP_DEBUG_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 +1699,12 @@ retry:
if(si==candidates->b_nids && !match)
{
/* Couldn't find an entry which matches the value, so return contentCount */
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= vlv_trim_candidates_byvalue: Not Found. Index %lu\n",si, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "vlv_trim_candidates_byvalue - Not Found. Index %lu\n",si, 0, 0 );
si= candidates->b_nids;
}
else
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= vlv_trim_candidates_byvalue: Found. Index %lu\n",si, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "vlv_trim_candidates_byvalue - Found. Index %lu\n",si, 0, 0 );
}
}
CACHE_RETURN(&(((ldbm_instance *)be->be_instance_info)->inst_cache),
@@ -1771,7 +1772,7 @@ vlv_make_response_control (Slapi_PBlock *pb, const struct vlv_response* vlvp)
ber_bvfree(bvp);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= vlv_make_response_control: Index=%d Size=%d Result=%d\n", vlvp->targetPosition, vlvp->contentCount, vlvp->result );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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 +1878,7 @@ vlv_parse_request_control( backend *be, struct berval *vlv_spec_ber,struct vlv_r
}
else
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "vlv_parse_request_control: Before=%d After=%d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "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 +1906,7 @@ vlv_parse_request_control( backend *be, struct berval *vlv_spec_ber,struct vlv_r
{
vlvp->index--;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "vlv_parse_request_control: Index=%d Content=%d\n", vlvp->index, vlvp->contentCount, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "vlv_parse_request_control - Index=%d Content=%d\n", vlvp->index, vlvp->contentCount, 0 );
}
break;
case LDAP_TAG_VLV_BY_VALUE:
@@ -1924,7 +1925,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, LOG_DEBUG, "vlv_parse_request_control: Value=%s\n", p, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "vlv_parse_request_control - Value=%s\n", p, 0, 0 );
slapi_ch_free( (void**)&p);
}
break;
@@ -1988,7 +1989,7 @@ IDList *vlv_find_index_by_filter_txn(struct backend *be, const char *base,
}
if (!vi) {
/* no match */
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "vlv: no index online for %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "vlv_find_index_by_filter_txn - No index online for %s\n",
t->vlv_filter, 0, 0);
slapi_rwlock_unlock(be->vlvSearchList_lock);
return NULL;
@@ -2001,7 +2002,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, LOG_DEBUG, "vlv: index %s is empty\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "vlv_find_index_by_filter_txn - Index %s is empty\n",
t->vlv_filter, 0, 0);
idl = NULL;
}
@@ -2015,7 +2016,7 @@ IDList *vlv_find_index_by_filter_txn(struct backend *be, const char *base,
if (err == 0) {
return idl;
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "vlv find index: err %d\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "vlv_find_index_by_filter_txn - vlv find index: err %d\n",
err, 0, 0);
return NULL;
}
@@ -2077,7 +2078,8 @@ int vlv_delete_search_entry(Slapi_PBlock *pb, Slapi_Entry* e, ldbm_instance *ins
if (instance_set_busy(inst) != 0)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "vlv_delete_search_entry - "
"Backend instance: '%s' is already in the middle of "
"another task and cannot be disturbed.\n",
inst->inst_name, 0, 0);
@@ -2087,8 +2089,8 @@ 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, LOG_ERR,
- "vlv_delete_search_entry: "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "vlv_delete_search_entry - "
"failed to craete vlv search entry dn (rdn: cn=MCC %s) for "
"plugin %s, instance %s\n",
tag1, inst->inst_li->li_plugin->plg_name, inst->inst_name);
@@ -2101,12 +2103,12 @@ 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, LOG_ERR, "Deleted Virtual List View Search (%s).\n", p->vlv_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR,
- "vlv_delete_search_entry: failed to create "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "vlv_delete_search_entry - Failed to create "
"vlv search entry dn (rdn: cn=by MCC %s) for "
"plugin %s, instance %s\n",
tag2, inst->inst_li->li_plugin->plg_name, inst->inst_name);
@@ -2125,7 +2127,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, LOG_ERR, "vlv_delete_search_entry:can't delete dse entry '%s'\n", base2, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "vlv_delete_search_entry - Can't delete dse entry '%s' error %d\n", base2, rc, 0);
}
pblock_done(tmppb);
pblock_init(tmppb);
@@ -2134,7 +2136,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, LOG_ERR, "vlv_delete_search_entry:can't delete dse entry '%s'\n", base1, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "vlv_delete_search_entry - Can't delete dse entry '%s' error %d\n", base1, rc, 0);
}
slapi_pblock_destroy(tmppb);
slapi_ch_free((void **)&tag2);
@@ -2153,13 +2155,13 @@ bail:
void
vlv_acquire_lock(backend *be)
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "vlv_acquire_lock => trying to acquire the lock\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "vlv_release_lock => trying to release the lock\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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 b9ea148..8a995f3 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, LOG_ERR, "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_ERR, "vlvIndex_createfilename - 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 7ffa29e..17abf9e 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, LOG_DEBUG, "=> ldif_back_add\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "entry failed schema check\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "entry failed syntax_check\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "parent does not exist\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "no access to parent\n", 0,0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "no parent & not root\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "<= ldif_back_add\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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 26ad44f..422913c 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, LOG_DEBUG, "=> ldif_back_bind\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= ldif_back_bind\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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 617c9ec..2989889 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, LOG_DEBUG, "ldif backend syncing\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "ldif backend syncing\n", 0, 0, 0 );
slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &db );
ldif_free_db(db);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ldif backend done syncing\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "ldif backend flushing\n", 0, 0, 0 );
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ldif backend done flushing\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "ldif backend flushing\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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 3d22371..76b7d14 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, LOG_DEBUG, "=> ldif_back_compare\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= ldif_back_compare\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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 adccb05..bf5738d 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, LOG_DEBUG, "=> ldif_back_config\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_ERR, "Ldif Backend: unable to get data from front end\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "Ldif Backend: Unable to configure; invalid ldif input file specification line format (file: %s, line: %d)\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "Ldif Backend: unable to configure; invalid parameter \"%s\" in config file (file: %s, line: %d)\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "Ldif Backend: unable to read ldif file %s\n", argv[1], 0, 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "Ldif Backend: unable to create ldif file %s\n", argv[1], 0, 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "Ldif Backend: out of memory\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "Ldif Backend: unable to read in ldif file; out of memory\n",0 ,0 ,0 );
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG, "<= ldif_back_config\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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 52da14c..265d67f 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, LOG_DEBUG, "=> ldif_back_delete\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "entry for delete does not exist\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "<= ldif_back_delete\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> has_children\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= has_children %d\n", has_kid, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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 31eabee..ef3bcdf 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, LOG_DEBUG, "=> ldif_back_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_ERR, "Ldif Backend: unable to initialize; out of memory\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "Ldif Backend: Lock creation failed\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "Ldif Backend: unable to pass database information to front end\n",0 ,0 ,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "Ldif Backend: unable to pass database information to front end\n",0 ,0 ,0);
return(-1);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= ldif_back_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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 73c51e9..eb98d85 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, LOG_DEBUG, "=> ldif_back_modify\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= ldif_back_modify\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> apply_mods\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, " add: %s\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, " 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, LOG_DEBUG, " delete: %s\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, " 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, LOG_DEBUG, " replace: %s\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, " 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, LOG_DEBUG, " %s: %s\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, " %s: %s\n",
mods[j]->mod_type, mods[j]->mod_bvalues[i]->bv_val,
0 );
}
- LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " -\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, " -\n", 0, 0, 0 );
if ( err != LDAP_SUCCESS ) {
break;
}
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= apply_mods %d\n", err, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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 720e97e..ec97631 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, LOG_DEBUG, "=> ldif_back_modrdn\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_ERR,"malloc failed", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG, "<= ldif_back_modrdn\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_ERR, "realloc failed", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "realloc failed", 0, 0, 0 );
exit(1);
}
(*modlist)[i] = (LDAPMod *) malloc( sizeof(LDAPMod) );
if ((*modlist)[i] == NULL){
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,"malloc failed", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR,"strdup failed", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR,"malloc failed",0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_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 07a0936..4b2af56 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, LOG_DEBUG, "=> ldif_back_search\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= ldif_back_search\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= ldif_back_search\n", 0, 0, 0 );
return( -1 );
}
diff --git a/ldap/servers/slapd/backend.c b/ldap/servers/slapd/backend.c
index a68f255..dcdd827 100644
--- a/ldap/servers/slapd/backend.c
+++ b/ldap/servers/slapd/backend.c
@@ -29,22 +29,22 @@ 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, LOG_ERR,
- "be_init: failed create instance dn for plugin %s, "
+ LDAPDebug2Args(LDAP_DEBUG_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, LOG_ERR,
- "be_init: failed create instance config dn for "
+ LDAPDebug2Args(LDAP_DEBUG_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, LOG_ERR,
- "be_init: failed create instance monitor dn for "
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "be_init - Failed create instance monitor dn for "
"plugin %s, instance %s\n", type, name);
}
be->be_sizelimit = sizelimit;
@@ -465,8 +465,8 @@ 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, LOG_ERR, NULL,
- "slapi_be_getentrypoint: unknown entry point %d\n", entrypoint);
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_be_getentrypoint",
+ "Unknown entry point %d\n", entrypoint);
return -1;
}
return 0;
@@ -576,8 +576,8 @@ 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, LOG_ERR, NULL,
- "slapi_be_setentrypoint: unknown entry point %d\n", entrypoint);
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_be_setentrypoint",
+ "Unknown entry point %d\n", entrypoint);
return -1;
}
return 0;
diff --git a/ldap/servers/slapd/backend_manager.c b/ldap/servers/slapd/backend_manager.c
index aab7ec3..5fb0374 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, LOG_DEBUG, "slapi_be_new",
+ slapi_log_error(SLAPI_LOG_TRACE, "slapi_be_new",
"Added new backend name [%s] type [%s] nbackends [%d]\n",
name, type, nbackends);
return( be );
@@ -155,7 +155,7 @@ slapi_get_next_backend (char *cookie)
int i, last_be;
if (cookie == NULL)
{
- LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "slapi_get_next_backend: NULL argument\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, "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, LOG_DEBUG, "slapi_get_next_backend: argument out of range\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, "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 a287cc0..a6de858 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, LOG_DEBUG, "do_bind\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "do_bind\n", 0, 0, 0 );
/*
* Parse the bind request. It looks like this:
@@ -133,8 +133,8 @@ do_bind( Slapi_PBlock *pb )
ber_rc = ber_scanf( ber, "{iat", &version, &rawdn, &method );
if ( ber_rc == LBER_ERROR ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ber_scanf failed (op=Bind; params=Version,DN,Method)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "do_bind - ber_scanf failed (op=Bind; params=Version,DN,Method)\n",
0, 0, 0 );
log_bind_access (pb, "???", method, version, saslmech, "decoding error");
send_ldap_result( pb, LDAP_PROTOCOL_ERROR, NULL,
@@ -165,7 +165,7 @@ do_bind( Slapi_PBlock *pb )
slapi_sdn_free(&sdn);
return;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "BIND dn=\"%s\" method=%" BERTAG_T " version=%d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "do_bind - 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,8 +174,8 @@ do_bind( Slapi_PBlock *pb )
switch ( method ) {
case LDAP_AUTH_SASL:
if ( version < LDAP_VERSION3 ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "got SASL credentials from LDAPv2 client\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "do_bind - 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");
send_ldap_result( pb, LDAP_PROTOCOL_ERROR, NULL,
@@ -205,7 +205,7 @@ do_bind( Slapi_PBlock *pb )
static char *kmsg =
"LDAPv2-style kerberos authentication received "
"on LDAPv3 connection.";
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, kmsg, 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_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,8 +225,8 @@ do_bind( Slapi_PBlock *pb )
goto free_and_return;
}
if ( ber_rc == LBER_ERROR ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ber_scanf failed (op=Bind; params=Credentials)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "do_bind - ber_scanf failed (op=Bind; params=Credentials)\n",
0, 0, 0 );
log_bind_access (pb, dn?dn:"empty", method, version, saslmech, "decoding error");
send_ldap_result( pb, LDAP_PROTOCOL_ERROR, NULL,
@@ -324,14 +324,14 @@ do_bind( Slapi_PBlock *pb )
}
break;
default:
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "bind: unknown LDAP protocol version %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "do_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, LOG_DEBUG, "do_bind: version %d method 0x%x dn %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "do_bind - version %d method 0x%x dn %s\n",
version, method, dn );
pb->pb_conn->c_ldapversion = version;
@@ -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, LOG_DEBUG, "do_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "do_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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 706d095..bf84cfb 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, LOG_ERR, NULL, "process_bulk_import_op: NULL pblock\n");
+ slapi_log_error(SLAPI_LOG_ERR, "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, LOG_ERR, NULL, "process_bulk_import_op: NULL entry\n");
+ slapi_log_error(SLAPI_LOG_ERR, "process_bulk_import_op", "NULL entry\n");
return LDAP_OPERATIONS_ERROR;
}
@@ -100,8 +100,8 @@ 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, LOG_ERR, NULL,
- "process_bulk_import_op: NULL target sdn\n");
+ slapi_log_error(SLAPI_LOG_ERR, "process_bulk_import_op",
+ "NULL target sdn\n");
return LDAP_OPERATIONS_ERROR;
}
}
@@ -111,23 +111,23 @@ 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, LOG_ERR, NULL,
- "process_bulk_import_op: wrong backend suffix\n");
+ slapi_log_error(SLAPI_LOG_ERR, "process_bulk_import_op",
+ "Wrong backend suffix\n");
return LDAP_OPERATIONS_ERROR;
}
slapi_pblock_set (pb, SLAPI_BACKEND, be);
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "process_bulk_import_op: NULL backend\n");
+ slapi_log_error(SLAPI_LOG_ERR, "process_bulk_import_op", "NULL backend\n");
return LDAP_OPERATIONS_ERROR;
}
}
if (be->be_wire_import == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "slapi_start_bulk_import: "
- "bulk import is not supported by this (%s) backend\n",
+ slapi_log_error(SLAPI_LOG_ERR, "process_bulk_import_op",
+ "Bulk import is not supported by this (%s) backend\n",
be->be_type);
return LDAP_NOT_SUPPORTED;
}
@@ -142,8 +142,8 @@ 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, LOG_ERR, NULL, "slapi_start_bulk_import: "
- "failed; error = %d\n", rc);
+ slapi_log_error(SLAPI_LOG_ERR, "process_bulk_import_op",
+ "Failed; error = %d\n", rc);
return LDAP_OPERATIONS_ERROR;
}
if (state == SLAPI_BI_STATE_DONE) {
diff --git a/ldap/servers/slapd/ch_malloc.c b/ldap/servers/slapd/ch_malloc.c
index b833993..debac74 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, LOG_ERR, SLAPD_MODULE,
+ slapi_log_error(SLAPI_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, LOG_ERR, SLAPD_MODULE,
+ slapi_log_error(SLAPI_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, LOG_ERR, SLAPD_MODULE,
+ slapi_log_error(SLAPI_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, LOG_ERR, SLAPD_MODULE,
+ slapi_log_error(SLAPI_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, LOG_ERR, SLAPD_MODULE,
+ slapi_log_error(SLAPI_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, LOG_ERR, SLAPD_MODULE,
+ slapi_log_error(SLAPI_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 f9d7eed..ac83685 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, LOG_ERR, "Invalid dn: \"%s\" %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR, "charray_normdn_add - Invalid dn: \"%s\" %s\n",
dn, errstr?errstr:"");
return rc;
} else if (0 == rc) {
diff --git a/ldap/servers/slapd/compare.c b/ldap/servers/slapd/compare.c
index d206ba8..46360f8 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, LOG_DEBUG, "do_compare\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "do_compare\n", 0, 0, 0 );
/* count the compare request */
slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsCompareOps);
@@ -65,8 +65,8 @@ do_compare( Slapi_PBlock *pb )
if ( ber_scanf( ber, "{a{ao}}", &rawdn, &ava.ava_type,
&ava.ava_value ) == LBER_ERROR ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ber_scanf failed (op=Compare; params=DN,Type,Value)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "do_compare - ber_scanf failed (op=Compare; params=DN,Type,Value)\n",
0, 0, 0 );
send_ldap_result( pb, LDAP_PROTOCOL_ERROR, NULL, NULL, 0,
NULL );
@@ -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, LOG_DEBUG, "do_compare: dn (%s) attr (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, "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 eb736d4..ccd7b4b 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, LOG_ERR, "bootstrap config",
+ slapi_log_error(SLAPI_LOG_ERR, "bootstrap config",
"Ignoring extremely large value for"
" configuration attribute %s"
" (length=%ld, value=%40.40s...)\n",
@@ -129,8 +129,8 @@ slapd_bootstrap_config(const char *configdir)
char tmpfile[MAXPATHLEN+1];
if (NULL == configdir) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR,
- "startup", "Passed null config directory\n");
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_bootstrap_config",
+ "Passed null config directory\n");
return rc; /* Fail */
}
PR_snprintf(configfile, sizeof(configfile), "%s/%s", configdir,
@@ -146,16 +146,18 @@ slapd_bootstrap_config(const char *configdir)
if ( (rc = PR_GetFileInfo64( configfile, &prfinfo )) != PR_SUCCESS )
{
PRErrorCode prerr = PR_GetError();
- 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));
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_bootstrap_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;
}
else if (( prfd = PR_Open( configfile, PR_RDONLY,
SLAPD_DEFAULT_FILE_MODE )) == NULL )
{
PRErrorCode prerr = PR_GetError();
- 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));
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_bootstrap_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 */
}
else
@@ -164,8 +166,9 @@ 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, LOG_ERR, "config", "Could only read %d of %ld bytes from config file %s\n",
- nr, (long int)prfinfo.size, configfile);
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_bootstrap_config",
+ "Could only read %d of %ld bytes from config file %s\n",
+ nr, (long int)prfinfo.size, configfile);
rc = 0; /* Fail */
done= 1;
}
@@ -210,8 +213,9 @@ slapd_bootstrap_config(const char *configdir)
SLAPI_STR2ENTRY_NOT_WELL_FORMED_LDIF);
if (e == NULL)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "The entry [%s] in the configfile %s was empty or could not be parsed\n",
- entrystr, configfile, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - "
+ "The entry [%s] in the configfile %s was empty or could not be parsed\n",
+ entrystr, configfile, 0);
continue;
}
/* increase file descriptors */
@@ -224,8 +228,8 @@ slapd_bootstrap_config(const char *configdir)
maxdescriptors, errorbuf, CONFIG_APPLY)
!= LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
- CONFIG_MAXDESCRIPTORS_ATTRIBUTE, errorbuf);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - "
+ "%s: %s: %s\n", configfile, CONFIG_MAXDESCRIPTORS_ATTRIBUTE, errorbuf);
}
}
@@ -240,8 +244,8 @@ slapd_bootstrap_config(const char *configdir)
logenabled, SLAPD_ERROR_LOG, errorbuf, CONFIG_APPLY)
!= LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
- CONFIG_ERRORLOG_LOGGING_ENABLED_ATTRIBUTE, errorbuf);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - %s: %s: %s\n",
+ configfile, CONFIG_ERRORLOG_LOGGING_ENABLED_ATTRIBUTE, errorbuf);
}
}
@@ -253,8 +257,8 @@ slapd_bootstrap_config(const char *configdir)
if (config_set_localuser(CONFIG_LOCALUSER_ATTRIBUTE,
_localuser, errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s. \n", configfile,
- CONFIG_LOCALUSER_ATTRIBUTE, errorbuf);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - %s: %s: %s. \n",
+ configfile, CONFIG_LOCALUSER_ATTRIBUTE, errorbuf);
}
}
@@ -267,8 +271,8 @@ slapd_bootstrap_config(const char *configdir)
if (config_set_errorlog(CONFIG_ERRORLOG_ATTRIBUTE,
workpath, errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s. \n", configfile,
- CONFIG_ERRORLOG_ATTRIBUTE, errorbuf);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - %s: %s: %s. \n",
+ configfile, CONFIG_ERRORLOG_ATTRIBUTE, errorbuf);
}
}
/* set the error log level */
@@ -281,17 +285,16 @@ slapd_bootstrap_config(const char *configdir)
if (config_set_errorlog_level(CONFIG_LOGLEVEL_ATTRIBUTE,
loglevel, errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s. \n", configfile,
+ LDAPDebug(LDAP_DEBUG_ERR, "%s: %s: %s. \n", configfile,
CONFIG_LOGLEVEL_ATTRIBUTE, errorbuf);
}
}
else
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "%s: ignoring %s (since -d %d was given on "
- "the command line)\n",
- CONFIG_LOGLEVEL_ATTRIBUTE, loglevel,
- config_get_errorlog_level());
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapd_bootstrap_config - %s: ignoring %s (since -d %d was given on "
+ "the command line)\n",
+ CONFIG_LOGLEVEL_ATTRIBUTE, loglevel, config_get_errorlog_level());
}
}
@@ -303,8 +306,8 @@ slapd_bootstrap_config(const char *configdir)
if (config_set_certdir(CONFIG_CERTDIR_ATTRIBUTE,
workpath, errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s. \n", configfile,
- CONFIG_CERTDIR_ATTRIBUTE, errorbuf);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - %s: %s: %s. \n",
+ configfile, CONFIG_CERTDIR_ATTRIBUTE, errorbuf);
}
}
@@ -316,8 +319,8 @@ slapd_bootstrap_config(const char *configdir)
if (config_set_saslpath(CONFIG_SASLPATH_ATTRIBUTE,
workpath, errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s. \n", configfile,
- CONFIG_SASLPATH_ATTRIBUTE, errorbuf);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - %s: %s: %s. \n",
+ configfile, CONFIG_SASLPATH_ATTRIBUTE, errorbuf);
}
}
#if defined(ENABLE_LDAPI)
@@ -329,8 +332,8 @@ 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, LOG_ERR, "%s: %s: %s. \n", configfile,
- CONFIG_LDAPI_FILENAME_ATTRIBUTE, errorbuf);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - %s: %s: %s. \n",
+ configfile, CONFIG_LDAPI_FILENAME_ATTRIBUTE, errorbuf);
}
}
@@ -342,8 +345,8 @@ 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, LOG_ERR, "%s: %s: %s. \n", configfile,
- CONFIG_LDAPI_SWITCH_ATTRIBUTE, errorbuf);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - %s: %s: %s. \n",
+ configfile, CONFIG_LDAPI_SWITCH_ATTRIBUTE, errorbuf);
}
}
#endif
@@ -361,7 +364,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, LOG_ERR, "The plugin entry [%s] in the configfile %s was invalid. %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - 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);
@@ -371,8 +374,7 @@ slapd_bootstrap_config(const char *configdir)
}
/* see if the entry is a grand child of the plugin base dn */
- if (slapi_sdn_isgrandparent(&plug_dn,
- slapi_entry_get_sdn_const(e)))
+ if (slapi_sdn_isgrandparent(&plug_dn, slapi_entry_get_sdn_const(e)))
{
if (entry_has_attr_and_value(e, "objectclass",
"nsSlapdPlugin", 0) &&
@@ -384,7 +386,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, LOG_ERR, "The plugin entry [%s] in the configfile %s was invalid. %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - 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,8 +404,8 @@ slapd_bootstrap_config(const char *configdir)
schemacheck, errorbuf, CONFIG_APPLY)
!= LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
- CONFIG_SCHEMACHECK_ATTRIBUTE, errorbuf);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - %s: %s: %s\n",
+ configfile, CONFIG_SCHEMACHECK_ATTRIBUTE, errorbuf);
}
}
@@ -416,22 +418,22 @@ slapd_bootstrap_config(const char *configdir)
plugintracking, errorbuf, CONFIG_APPLY)
!= LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
- CONFIG_PLUGIN_BINDDN_TRACKING_ATTRIBUTE, errorbuf);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - %s: %s: %s\n",
+ configfile, CONFIG_PLUGIN_BINDDN_TRACKING_ATTRIBUTE, errorbuf);
}
}
- /* see if we allow moddn aci */
- if (!moddn_aci[0] &&
+ /* see if we allow moddn aci */
+ if (!moddn_aci[0] &&
entry_has_attr_and_value(e, CONFIG_MODDN_ACI_ATTRIBUTE,
- moddn_aci, sizeof(moddn_aci)))
+ moddn_aci, sizeof(moddn_aci)))
{
if (config_set_moddn_aci(CONFIG_MODDN_ACI_ATTRIBUTE,
moddn_aci, errorbuf, CONFIG_APPLY)
!= LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
- CONFIG_MODDN_ACI_ATTRIBUTE, errorbuf);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - %s: %s: %s\n",
+ configfile, CONFIG_MODDN_ACI_ATTRIBUTE, errorbuf);
}
}
@@ -444,8 +446,8 @@ slapd_bootstrap_config(const char *configdir)
syntaxcheck, errorbuf, CONFIG_APPLY)
!= LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
- CONFIG_SYNTAXCHECK_ATTRIBUTE, errorbuf);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - %s: %s: %s\n",
+ configfile, CONFIG_SYNTAXCHECK_ATTRIBUTE, errorbuf);
}
}
@@ -458,8 +460,8 @@ slapd_bootstrap_config(const char *configdir)
syntaxlogging, errorbuf, CONFIG_APPLY)
!= LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
- CONFIG_SYNTAXLOGGING_ATTRIBUTE, errorbuf);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - %s: %s: %s\n",
+ configfile, CONFIG_SYNTAXLOGGING_ATTRIBUTE, errorbuf);
}
}
@@ -472,8 +474,8 @@ slapd_bootstrap_config(const char *configdir)
dn_validate_strict, errorbuf, CONFIG_APPLY)
!= LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
- CONFIG_DN_VALIDATE_STRICT_ATTRIBUTE, errorbuf);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - %s: %s: %s\n",
+ configfile, CONFIG_DN_VALIDATE_STRICT_ATTRIBUTE, errorbuf);
}
}
@@ -485,8 +487,8 @@ slapd_bootstrap_config(const char *configdir)
CONFIG_ENQUOTE_SUP_OC_ATTRIBUTE, val, errorbuf,
CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
- CONFIG_ENQUOTE_SUP_OC_ATTRIBUTE, errorbuf);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - %s: %s: %s\n",
+ configfile, CONFIG_ENQUOTE_SUP_OC_ATTRIBUTE, errorbuf);
}
val[0] = 0;
}
@@ -499,8 +501,8 @@ slapd_bootstrap_config(const char *configdir)
CONFIG_RETURN_EXACT_CASE_ATTRIBUTE, val,
errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
- CONFIG_RETURN_EXACT_CASE_ATTRIBUTE, errorbuf);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - %s: %s: %s\n",
+ configfile, CONFIG_RETURN_EXACT_CASE_ATTRIBUTE, errorbuf);
}
val[0] = 0;
}
@@ -514,9 +516,8 @@ slapd_bootstrap_config(const char *configdir)
CONFIG_ATTRIBUTE_NAME_EXCEPTION_ATTRIBUTE, val,
errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
- CONFIG_ATTRIBUTE_NAME_EXCEPTION_ATTRIBUTE,
- errorbuf);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - %s: %s: %s\n",
+ configfile, CONFIG_ATTRIBUTE_NAME_EXCEPTION_ATTRIBUTE, errorbuf);
}
val[0] = 0;
}
@@ -529,9 +530,8 @@ slapd_bootstrap_config(const char *configdir)
CONFIG_DS4_COMPATIBLE_SCHEMA_ATTRIBUTE, val,
errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
- CONFIG_DS4_COMPATIBLE_SCHEMA_ATTRIBUTE,
- errorbuf);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - %s: %s: %s\n",
+ configfile, CONFIG_DS4_COMPATIBLE_SCHEMA_ATTRIBUTE, errorbuf);
}
val[0] = 0;
}
@@ -544,9 +544,8 @@ slapd_bootstrap_config(const char *configdir)
CONFIG_SCHEMA_IGNORE_TRAILING_SPACES, val,
errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
- CONFIG_SCHEMA_IGNORE_TRAILING_SPACES,
- errorbuf);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - %s: %s: %s\n",
+ configfile, CONFIG_SCHEMA_IGNORE_TRAILING_SPACES, errorbuf);
}
val[0] = 0;
}
@@ -558,10 +557,8 @@ 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, LOG_ERR, "%s: %s: %s\n",
- configfile,
- CONFIG_REWRITE_RFC1274_ATTRIBUTE,
- errorbuf);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - %s: %s: %s\n",
+ configfile, CONFIG_REWRITE_RFC1274_ATTRIBUTE, errorbuf);
}
val[0] = 0;
}
@@ -574,8 +571,8 @@ slapd_bootstrap_config(const char *configdir)
CONFIG_LOCALHOST_ATTRIBUTE, val, errorbuf,
CONFIG_APPLY) != LDAP_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s: %s: %s\n", configfile,
- CONFIG_LOCALHOST_ATTRIBUTE, errorbuf);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_bootstrap_config - %s: %s: %s\n",
+ configfile, CONFIG_LOCALHOST_ATTRIBUTE, errorbuf);
}
val[0] = 0;
}
@@ -587,9 +584,9 @@ 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, 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);
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_bootstrap_config",
+ "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);
}
else {
diff --git a/ldap/servers/slapd/configdse.c b/ldap/servers/slapd/configdse.c
index b6d9951..0cf2217 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, LOG_ERR, NULL, "Config Warning: - %s\n", returntext);
+ slapi_log_error(SLAPI_LOG_WARNING, "load_config_dse", "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, LOG_ERR, NULL,
+ slapi_log_error(SLAPI_LOG_ERR, "load_plugin_entry",
"Unable to load plugin \"%s\"\n",
slapi_entry_get_dn_const( e ));
exit(1);
@@ -367,8 +367,8 @@ 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, LOG_ERR, NULL,
- "Warning: Adding configuration attribute \"%s\"\n",
+ slapi_log_error(SLAPI_LOG_WARNING, "modify_config_dse",
+ "Adding configuration attribute \"%s\"\n",
config_attr);
}
rc = config_set(config_attr, mods[i]->mod_bvalues,
@@ -385,8 +385,8 @@ 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, LOG_ERR, NULL,
- "Warning: Deleting configuration attribute \"%s\"\n",
+ slapi_log_error(SLAPI_LOG_WARNING, "modify_config_dse",
+ "Deleting configuration attribute \"%s\"\n",
config_attr);
}
} else {
@@ -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, LOG_ERR, NULL, "%s\n", returntext);
+ slapi_log_error(SLAPI_LOG_INFO, "postop_modify_config_dse", "%s\n", returntext);
break;
}
}
diff --git a/ldap/servers/slapd/connection.c b/ldap/servers/slapd/connection.c
index bf167fc..568eef3 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, LOG_DEBUG, "new %sconnection on %d\n", pTmp, conn->c_sd, 0 );
+ LDAPDebug(LDAP_DEBUG_CONNS, "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,15 +431,15 @@ init_op_threads()
if ((work_q_lock = PR_NewLock()) == NULL ) {
errorCode = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "init_op_threads: PR_NewLock failed for work_q_lock, " SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_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);
}
if ((work_q_cv = PR_NewCondVar( work_q_lock )) == NULL) {
errorCode = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "init_op_threads: PR_NewCondVar failed for work_q_cv, " SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "PR_CreateThread failed, " SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "init_op_threads - 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, LOG_ERR, "Failed to set TCP_CORK on connection %" NSPRIu64 "\n",conn->c_connid, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "connection_dispatch_operation - 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, LOG_ERR, "Failed to clear TCP_CORK on connection %" NSPRIu64 "\n",conn->c_connid, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "connection_dispatch_operation - Failed to clear TCP_CORK on connection %" NSPRIu64 "\n",conn->c_connid, 0, 0);
}
}
#endif
@@ -681,8 +681,8 @@ connection_dispatch_operation(Connection *conn, Operation *op, Slapi_PBlock *pb)
break;
default:
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ignoring unknown LDAP request (conn=%" NSPRIu64 ", tag=0x%lx)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "connection_dispatch_operation - Ignoring unknown LDAP request (conn=%" NSPRIu64 ", tag=0x%lx)\n",
conn->c_connid, op->o_tag, 0 );
break;
}
@@ -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, LOG_ERR, "connection",
+ slapi_log_error(SLAPI_LOG_ERR, "connection_release_nolock_ext",
"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, LOG_ERR, "connection",
+ slapi_log_error(SLAPI_LOG_ERR, "connection_acquire_nolock_ext",
"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, LOG_DEBUG, "connection_wait_for_new_work: shutdown\n" );
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "connection_wait_for_new_work: no work to do\n" );
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "connection_wait_for_new_work: no work to do\n" );
ret = CONN_NOWORK;
} else {
/* make new pb */
@@ -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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_CONNS,
"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, LOG_DEBUG,"ioblock timeout expired on connection %" NSPRIu64 "\n", conn->c_connid, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_CONNS,"connection_read_operation - 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,20 +1243,20 @@ 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, LOG_ERR,
- "PR_Poll for connection %" NSPRIu64 " returns %d (%s)\n", conn->c_connid, err, slapd_pr_strerror( err ) );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "connection_read_operation - 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, LOG_DEBUG,
- "connection %" NSPRIu64 " waited %d times for read to be ready\n", conn->c_connid, waits_done, 0 );
+ LDAPDebug(LDAP_DEBUG_CONNS,
+ "connection_read_operation - 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, LOG_DEBUG,
- "PR_Recv for connection %" NSPRIu64 " returns %d (%s)\n", conn->c_connid, err, slapd_pr_strerror( err ) );
+ LDAPDebug(LDAP_DEBUG_CONNS,
+ "connection_read_operation - 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 );
ret = CONN_DONE;
@@ -1276,8 +1276,8 @@ int connection_read_operation(Connection *conn, Operation *op, ber_tag_t *tag, i
goto done;
}
}
- LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
- "connection %" NSPRIu64 " read %d bytes\n", conn->c_connid, ret, 0 );
+ LDAPDebug(LDAP_DEBUG_CONNS,
+ "connection_read_operation - connection %" NSPRIu64 " read %d bytes\n", conn->c_connid, ret, 0 );
new_operation = 0;
ret = CONN_FOUND_WORK_TO_DO;
@@ -1297,8 +1297,8 @@ 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, LOG_ERR,
- "conn=%" NSPRIu64 " received a non-LDAP message (tag 0x%lx, expected 0x%lx)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "connection_read_operation - 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,
SLAPD_DISCONNECT_BAD_BER_TAG, EPROTO );
@@ -1309,8 +1309,8 @@ 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, LOG_ERR,
- "conn=%" NSPRIu64 " unable to read tag for incoming request\n", conn->c_connid, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "connection_read_operation - 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;
goto done;
@@ -1327,8 +1327,8 @@ 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, LOG_ERR,
- "conn=%" NSPRIu64 " ber_peek_tag returns 0x%lx\n", conn->c_connid, *tag, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "connection_read_operation - 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;
goto done;
@@ -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, LOG_DEBUG, "making readable conn %" NSPRIu64 " fd=%d\n",
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, "connection_make_readable_nolock - 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 */
@@ -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, LOG_DEBUG,"conn %" NSPRIu64 " activity level = %d\n",conn->c_connid,delta_count,0);
+ LDAPDebug(LDAP_DEBUG_CONNS,"connection_check_activity_level - 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, LOG_DEBUG,"conn %" NSPRIu64 " turbo rank = %d out of %d conns\n",conn->c_connid,our_rank,connection_count);
+ LDAPDebug(LDAP_DEBUG_CONNS,"connection_enter_leave_turbo - 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, LOG_DEBUG,"conn %" NSPRIu64 " leaving turbo mode\n",conn->c_connid,0,0);
+ LDAPDebug(LDAP_DEBUG_CONNS,"connection_enter_leave_turbo - conn %" NSPRIu64 " leaving turbo mode\n",conn->c_connid,0,0);
} else {
- LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,"conn %" NSPRIu64 " entering turbo mode\n",conn->c_connid,0,0);
+ LDAPDebug(LDAP_DEBUG_CONNS,"connection_enter_leave_turbo - conn %" NSPRIu64 " entering turbo mode\n",conn->c_connid,0,0);
}
}
*new_turbo_flag = new_mode;
@@ -1523,8 +1523,8 @@ connection_threadmain()
time_t curtime = 0;
if( op_shutdown ) {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
- "op_thread received shutdown signal\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE,
+ "connection_threadmain - op_thread received shutdown signal\n", 0, 0, 0 );
g_decr_active_threadcnt();
return;
}
@@ -1540,8 +1540,8 @@ 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, LOG_DEBUG,
- "op_thread received shutdown signal\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE,
+ "connection_threadmain - op_thread received shutdown signal\n", 0, 0, 0 );
g_decr_active_threadcnt();
return;
case CONN_FOUND_WORK_TO_DO:
@@ -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, LOG_ERR, "Error: could not add/remove IO layers from connection\n" );
+ LDAPDebug0Args(LDAP_DEBUG_ANY, "connection_threadmain - 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, LOG_ERR, "Error: could not add/remove IO layers from connection\n" );
+ LDAPDebug0Args(LDAP_DEBUG_ANY, "connection_threadmain - 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, LOG_DEBUG, "connection_threadmain",
+ slapi_log_error(SLAPI_LOG_CONNS, "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, LOG_DEBUG, "connection_threadmain",
+ slapi_log_error(SLAPI_LOG_CONNS, "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, LOG_DEBUG,"conn %" NSPRIu64 " leaving turbo mode - pb_q is not empty %d\n",
+ LDAPDebug2Args(LDAP_DEBUG_CONNS,"connection_threadmain - conn %" NSPRIu64 " leaving turbo mode - pb_q is not empty %d\n",
conn->c_connid,work_q_size);
}
#endif
@@ -1661,11 +1661,11 @@ connection_threadmain()
* should call connection_make_readable after the op is removed
* connection_make_readable(conn);
*/
- LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,"conn %" NSPRIu64 " leaving turbo mode due to %d\n",
+ LDAPDebug(LDAP_DEBUG_CONNS,"connection_threadmain - conn %" NSPRIu64 " leaving turbo mode due to %d\n",
conn->c_connid,ret,0);
goto done;
case CONN_SHUTDOWN:
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"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, LOG_DEBUG,"conn %" NSPRIu64 " queued because more_data\n",
+ LDAPDebug(LDAP_DEBUG_CONNS,"connection_threadmain - 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, LOG_ERR, "Attempted operation %d "
+ LDAPDebug(LDAP_DEBUG_ERR, "connection_threadmain - 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, LOG_DEBUG,"conn %" NSPRIu64 " check more_data %d thread_turbo_flag %d\n",
+ LDAPDebug(LDAP_DEBUG_CONNS,"connection_threadmain - 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,8 +1849,8 @@ connection_activity(Connection *conn, int maxthreads)
struct Slapi_op_stack *op_stack_obj;
if (connection_acquire_nolock (conn) == -1) {
- LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
- "could not acquire lock in connection_activity as conn %" NSPRIu64 " closing fd=%d\n",
+ LDAPDebug(LDAP_DEBUG_CONNS,
+ "connection_activity - 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? */
/* MAB: 25 Jan 01: let's return on error and pray this won't leak */
@@ -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, LOG_DEBUG, "add_work_q \n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "add_work_q \n", 0, 0, 0 );
new_work_q = create_work_q();
new_work_q->work_item = wqitem;
@@ -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, LOG_DEBUG, "get_work_q \n" );
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "get_work_q\n" );
if (head_work_q == NULL) {
- LDAPDebug0Args( LDAP_DEBUG_TRACE, LOG_DEBUG, "get_work_q: the work queue is empty.\n" );
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "get_work_q -The work queue is empty.\n" );
return NULL;
}
@@ -1953,7 +1953,7 @@ get_work_q(struct Slapi_op_stack **op_stack_obj)
void
op_thread_cleanup()
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_INFO,
"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);
@@ -1993,7 +1993,7 @@ connection_post_shutdown_cleanup()
}
PR_DestroyStack(op_stack);
op_stack = NULL;
- LDAPDebug2Args( LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug2Args(LDAP_DEBUG_INFO,
"slapd shutting down - freed %d work q stack objects - freed %d op stack objects\n",
work_cnt, stack_cnt);
}
@@ -2033,7 +2033,7 @@ connection_remove_operation( Connection *conn, Operation *op )
if ( *tmp == NULL )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "connection_remove_operation: can't find op %d for conn %" NSPRIu64 "\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "connection_remove_operation - Can't find op %d for conn %" NSPRIu64 "\n",
(int)op->o_msgid, conn->c_connid, 0 );
}
else
@@ -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, LOG_ERR, "connection",
+ slapi_log_error(SLAPI_LOG_ERR, "log_ber_too_big_error",
"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, LOG_ERR, "connection",
+ slapi_log_error(SLAPI_LOG_ERR, "log_ber_too_big_error",
"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",
@@ -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, LOG_DEBUG, "setting conn %" NSPRIu64 " fd=%d "
+ LDAPDebug(LDAP_DEBUG_CONNS, "disconnect_server_nomutex_ext - 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
@@ -2288,7 +2288,7 @@ disconnect_server_nomutex_ext( Connection *conn, PRUint64 opconnid, int opid, PR
}
} else {
- LDAPDebug2Args(LDAP_DEBUG_CONNS, LOG_DEBUG, "not setting conn %d to be disconnected: %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, "disconnect_server_nomutex_ext - 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 a170be5..c275c7e 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, LOG_ERR,"PR_NewLock failed\n",0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,"connection_table_get_connection - 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, LOG_DEBUG, "max open connections reached\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_CONNS, "connection_table_get_connection - Max open connections reached\n", 0, 0, 0);
}
return 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, LOG_ERR, "connection", "conn=%p fd=%d refcnt=%d c_flags=%d\n"
+ slapi_log_error(SLAPI_LOG_DEBUG, "connection_table_dump_active_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, LOG_ERR, "connection", "********** BEGIN DUMP ************\n");
+ slapi_log_error(SLAPI_LOG_DEBUG, "connection_table_dump_active_connections", "********** 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, LOG_ERR, "connection", "********** END DUMP ************\n");
+ slapi_log_error(SLAPI_LOG_DEBUG, "connection_table_dump_active_connections", "********** 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, LOG_ERR, "connection", "Moving connection out of active list\n");
+ slapi_log_error(SLAPI_LOG_DEBUG, "connection_table_move_connection_out_of_active_list", "Moving connection out of active list\n");
connection_table_dump_active_connection (c);
#endif
@@ -256,8 +256,9 @@ 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, LOG_DEBUG,
- "not moving conn %d out of active list because refcnt is %d\n",
+ LDAPDebug2Args(LDAP_DEBUG_CONNS,
+ "connection_table_move_connection_out_of_active_list - "
+ "not moving conn %d out of active list because refcnt is %d\n",
c_sd, c->c_refcnt);
return 1; /* failed */
}
@@ -278,7 +279,8 @@ connection_table_move_connection_out_of_active_list(Connection_Table *ct,Connect
PR_Unlock(ct->table_mutex);
- LDAPDebug1Arg(LDAP_DEBUG_CONNS, LOG_DEBUG, "moved conn %d out of active list and freed\n", c_sd);
+ LDAPDebug1Arg(LDAP_DEBUG_CONNS, "connection_table_move_connection_out_of_active_list - "
+ "Moved conn %d out of active list and freed\n", c_sd);
#ifdef FOR_DEBUGGING
connection_table_dump_active_connections (ct);
@@ -305,7 +307,8 @@ connection_table_move_connection_on_to_active_list(Connection_Table *ct,Connecti
}
#ifdef FOR_DEBUGGING
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "connection", "Moving connection into active list\n");
+ slapi_log_error(SLAPI_LOG_DEBUG, "connection_table_move_connection_on_to_active_list",
+ "Moving connection into active list\n");
connection_table_dump_active_connection (c);
#endif
@@ -473,7 +476,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, LOG_DEBUG,"activity on %d%s\n", i, r ? "r" : "",0 );
+ LDAPDebug(LDAP_DEBUG_CONNS,"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 1721d38..8715361 100644
--- a/ldap/servers/slapd/control.c
+++ b/ldap/servers/slapd/control.c
@@ -39,8 +39,8 @@ init_controls( void )
supported_controls_lock = slapi_new_rwlock();
if (NULL == supported_controls_lock) {
/* Out of resources */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "startup",
- "init_controls: failed to create lock.\n");
+ slapi_log_error(SLAPI_LOG_ERR, "init_controls",
+ "Failed to create lock.\n");
exit (1);
}
@@ -197,10 +197,10 @@ get_ldapmessage_controls_ext(
* }
*/
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> get_ldapmessage_controls\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> get_ldapmessage_controls\n", 0, 0, 0 );
if (!pb) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "<= get_ldapmessage_controls NULL PBlock\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"<= get_ldapmessage_controls LDAP_OPERATIONS_ERROR\n",
0, 0, 0 );
return( LDAP_OPERATIONS_ERROR ); /* unexpected error */
}
if ( len == 0 ) {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"<= 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"<= 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"<= get_ldapmessage_controls ignoring unrecognized data in request (tag 0x%x)\n",
tag, 0, 0 );
return( LDAP_SUCCESS );
@@ -249,8 +249,8 @@ get_ldapmessage_controls_ext(
*/
if ( pb->pb_conn != NULL
&& pb->pb_conn->c_ldapversion < LDAP_VERSION3 ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "connection",
- "received control(s) on an LDAPv%d connection\n",
+ slapi_log_error(SLAPI_LOG_ERR, "get_ldapmessage_controls_ext",
+ "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, LOG_DEBUG, "connection", "Warning: conn=%" NSPRIu64 " op=%d contains an empty list of controls\n",
+ slapi_log_error(SLAPI_LOG_CONNS, "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. */
@@ -376,13 +376,13 @@ get_ldapmessage_controls_ext(
}
#endif /* SLAPD_ECHO_CONTROL */
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"<= get_ldapmessage_controls %d controls\n", curcontrols, 0, 0 );
return( LDAP_SUCCESS );
free_and_return:;
ldap_controls_free( ctrls );
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"<= 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"=> 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"<= 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"<= slapi_control_present 1 (FOUND)\n", 0, 0, 0 );
return( 1 );
}
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"<= 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 1aa3390..b71c214 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, LOG_ERR, "Counter Dump - %s\n",text, 0, 0);
+ LDAPDebug(LDAP_DEBUG_DEBUG, "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, LOG_ERR, "%s %s\n",type, value, 0);
+ LDAPDebug(LDAP_DEBUG_DEBUG, "%s %s\n",type, value, 0);
free(type);
}
#endif
diff --git a/ldap/servers/slapd/csn.c b/ldap/servers/slapd/csn.c
index ddf8404..e8ac8d0 100644
--- a/ldap/servers/slapd/csn.c
+++ b/ldap/servers/slapd/csn.c
@@ -356,9 +356,8 @@ int csn_increment_subsequence (CSN *csn)
}
else if (csn->subseqnum == maxsubseq)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
- "csn_increment_subsequence: subsequence overflow\n");
-
+ slapi_log_error(SLAPI_LOG_ERR, "csn_increment_subsequence",
+ "subsequence overflow\n");
return -1;
}
else
diff --git a/ldap/servers/slapd/csngen.c b/ldap/servers/slapd/csngen.c
index aba2ff6..9583d3b 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, LOG_ERR, NULL, "csngen_new: memory allocation failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, "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, LOG_ERR, NULL, "csngen_new: failed to create lock\n");
+ slapi_log_error(SLAPI_LOG_ERR, "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, LOG_ERR, NULL, "csngen_new_csn: invalid argument\n");
+ slapi_log_error(SLAPI_LOG_ERR, "csngen_new_csn", "Invalid argument\n");
return CSN_INVALID_PARAMETER;
}
*csn = csn_new ();
if (*csn == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "csngen_new_csn: memory allocation failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, "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, LOG_ERR, "csngen_new_csn", "Warning: too much time skew (%d secs). Current seqnum=%0x\n", delta, gen->state.seq_num );
+ slapi_log_error(SLAPI_LOG_WARNING, "csngen_new_csn", "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,8 +236,8 @@ csngen_new_csn (CSNGen *gen, CSN **csn, PRBool notify)
if (gen->state.seq_num == CSN_MAX_SEQNUM)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "csngen_new_csn: sequence rollover; "
- "local offset updated.\n");
+ slapi_log_error(SLAPI_LOG_INFO, "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, LOG_DEBUG, NULL, "csngen_adjust_time: "
+ slapi_log_error(SLAPI_LOG_REPL, "csngen_adjust_time",
"gen state before %08lx%04x:%ld:%ld:%ld\n",
cur_time, gen->state.seq_num,
gen->state.sampled_time,
@@ -352,8 +352,8 @@ int csngen_adjust_time(CSNGen *gen, const CSN* csn)
}
else /* remote_offset > CSN_MAX_TIME_ADJUST */
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "csngen_adjust_time: "
- "adjustment limit exceeded; value - %ld, limit - %ld\n",
+ slapi_log_error(SLAPI_LOG_ERR, "csngen_adjust_time",
+ "Adjustment limit exceeded; value - %ld, limit - %ld\n",
remote_offset, (long)CSN_MAX_TIME_ADJUST);
slapi_rwlock_unlock (gen->lock);
csngen_dump_state(gen);
@@ -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, LOG_DEBUG, NULL, "csngen_adjust_time: "
+ slapi_log_error(SLAPI_LOG_REPL, "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, 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_log_error(SLAPI_LOG_DEBUG, "csngen_dump_state", "CSN generator's state:\n");
+ slapi_log_error(SLAPI_LOG_DEBUG, "csngen_dump_state", "\treplica id: %d\n", gen->state.rid);
+ slapi_log_error(SLAPI_LOG_DEBUG, "csngen_dump_state", "\tsampled time: %ld\n", gen->state.sampled_time);
+ slapi_log_error(SLAPI_LOG_DEBUG, "csngen_dump_state", "\tlocal offset: %ld\n", gen->state.local_offset);
+ slapi_log_error(SLAPI_LOG_DEBUG, "csngen_dump_state", "\tremote offset: %ld\n", gen->state.remote_offset);
+ slapi_log_error(SLAPI_LOG_DEBUG, "csngen_dump_state", "\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, LOG_ERR, NULL, "staring csn generator test ...");
+ slapi_log_error(SLAPI_LOG_DEBUG, "csngen_test", "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, LOG_ERR, NULL, "csn generator test is complete...");
+ slapi_log_error(SLAPI_LOG_DEBUG, "csngen_test", "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, LOG_ERR, NULL, "_csngen_parse_state: invalid state format\n");
+ slapi_log_error(SLAPI_LOG_ERR, "_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, LOG_ERR, NULL, "_csngen_parse_state: replica id"
+ slapi_log_error(SLAPI_LOG_ERR, "_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, LOG_DEBUG, NULL, "_csngen_adjust_local_time: "
+ slapi_log_error(SLAPI_LOG_REPL, "_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, LOG_DEBUG, NULL, "_csngen_adjust_local_time: "
+ slapi_log_error(SLAPI_LOG_REPL, "_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, LOG_DEBUG, NULL, "_csngen_adjust_local_time: "
+ slapi_log_error(SLAPI_LOG_REPL, "_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,8 +684,8 @@ _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, LOG_ERR, NULL, "_csngen_adjust_local_time: "
- "adjustment limit exceeded; value - %ld, limit - %d\n",
+ slapi_log_error(SLAPI_LOG_ERR, "_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, LOG_DEBUG, NULL, "_csngen_adjust_local_time: "
+ slapi_log_error(SLAPI_LOG_REPL, "_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,8 +737,8 @@ _csngen_start_test_threads(CSNGen *gen)
DEFAULT_THREAD_STACKSIZE) == NULL)
{
PRErrorCode prerr = PR_GetError();
- 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",
+ slapi_log_error(SLAPI_LOG_ERR, "_csngen_start_test_threads",
+ "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,8 +752,8 @@ _csngen_start_test_threads(CSNGen *gen)
DEFAULT_THREAD_STACKSIZE) == NULL)
{
PRErrorCode prerr = PR_GetError();
- 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",
+ slapi_log_error(SLAPI_LOG_ERR, "_csngen_start_test_threads",
+ "Failed to create the remote CSN tester thread; " SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr));
return -1;
}
@@ -767,8 +767,8 @@ _csngen_start_test_threads(CSNGen *gen)
{
PRErrorCode prerr = PR_GetError();
- 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",
+ slapi_log_error(SLAPI_LOG_ERR, "_csngen_start_test_threads",
+ "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, LOG_ERR, NULL,
+ slapi_log_error(SLAPI_LOG_ERR, "_csngen_gen_tester_main",
"failed to generate csn; csn error - %d\n", rc);
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "generate csn %s\n",
+ slapi_log_error(SLAPI_LOG_INFO, "_csngen_gen_tester_main", "generate csn %s\n",
csn_as_string(csn, PR_FALSE, buff));
}
csn_free(&csn);
@@ -840,8 +840,8 @@ _csngen_remote_tester_main (void *data)
rc = csngen_new_csn (gen, &csn, PR_FALSE);
if (rc != CSN_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
- "failed to generate csn; csn error - %d\n", rc);
+ slapi_log_error(SLAPI_LOG_ERR, "_csngen_remote_tester_main",
+ "Failed to generate csn; csn error - %d\n", rc);
}
else
{
@@ -851,8 +851,8 @@ _csngen_remote_tester_main (void *data)
rc = csngen_adjust_time (gen, csn);
if (rc != CSN_SUCCESS)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
- "failed to adjust generator's time; csn error - %d\n", rc);
+ slapi_log_error(SLAPI_LOG_ERR, "_csngen_remote_tester_main",
+ "Failed to adjust generator's time; csn error - %d\n", rc);
}
csngen_dump_state (gen);
diff --git a/ldap/servers/slapd/daemon.c b/ldap/servers/slapd/daemon.c
index 69a0429..8061f3b 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, LOG_ERR, "PR_Accept() failed, "
+ LDAPDebug(LDAP_DEBUG_ERR, "accept_and_configure - PR_Accept() failed, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0 );
return(SLAPD_INVALID_SOCKET);
@@ -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, LOG_ERR, "TestAndEnterMonitor",
+ slapi_log_error(SLAPI_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, LOG_ERR,"TestAndEnterMonitor",
+ slapi_log_error(SLAPI_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, LOG_ERR,"TestAndEnterMonitor",
+ slapi_log_error(SLAPI_LOG_ERR,"TestAndEnterMonitor",
"Failed to release monitor mutex, error (%d)\n", rv);
rc = PR_FALSE;
}
@@ -570,7 +570,7 @@ disk_monitoring_thread(void *nothing)
*/
if(passed_threshold){
if(logs_disabled){
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Disk space is now within acceptable levels. "
+ LDAPDebug(LDAP_DEBUG_INFO, "disk_monitoring_thread - 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, LOG_ERR, "Disk space is now within acceptable levels.\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_INFO, "disk_monitoring_thread - Disk space is now within acceptable levels.\n",0,0,0);
}
deleted_rotated_logs = 0;
passed_threshold = 0;
@@ -597,8 +597,8 @@ disk_monitoring_thread(void *nothing)
* Check if we are already critical
*/
if(disk_space < 4096){ /* 4 k */
- 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);
+ LDAPDebug(LDAP_DEBUG_ALERT, "disk_monitoring_thread - 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,8 +607,8 @@ disk_monitoring_thread(void *nothing)
* if logging is not critical
*/
if(verbose_logging != 0 && verbose_logging != LDAP_DEBUG_ANY){
- 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,
+ LDAPDebug(LDAP_DEBUG_ALERT, "disk_monitoring_thread - 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 */
config_set_errorlog_level(CONFIG_LOGLEVEL_ATTRIBUTE,
@@ -621,8 +621,8 @@ disk_monitoring_thread(void *nothing)
* access/audit logs, log another error, and continue.
*/
if(!logs_disabled && !logging_critical){
- 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);
+ LDAPDebug(LDAP_DEBUG_ALERT, "disk_monitoring_thread - 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);
config_set_auditfaillog_enabled(LOGGING_OFF);
@@ -634,8 +634,8 @@ 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, LOG_ERR, "Disk space is too low on disk (%s), remaining space: %" NSPRIu64 " Kb, "
- "deleting rotated logs.\n", dirstr, (disk_space / 1024), 0);
+ LDAPDebug(LDAP_DEBUG_ALERT, "disk_monitoring_thread - 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;
continue;
@@ -644,8 +644,8 @@ 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, LOG_ERR, "Disk space is too low on disk (%s), remaining space: %" NSPRIu64 " Kb\n",
- dirstr, (disk_space / 1024), 0);
+ LDAPDebug(LDAP_DEBUG_ALERT, "disk_monitoring_thread - 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, LOG_ERR, "Disk space on (%s) is too far below the threshold(%" NSPRIu64 " bytes). "
+ LDAPDebug(LDAP_DEBUG_ALERT, "disk_monitoring_thread - 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,8 +678,9 @@ disk_monitoring_thread(void *nothing)
/*
* Excellent, we are back to acceptable levels, reset everything...
*/
- 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);
+ LDAPDebug(LDAP_DEBUG_INFO, "disk_monitoring_thread - 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,8 +702,9 @@ disk_monitoring_thread(void *nothing)
/*
* Disk space is critical, log an error, and shut it down now!
*/
- 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);
+ LDAPDebug(LDAP_DEBUG_ALERT, "disk_monitoring_thread - 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,8 +720,8 @@ 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, LOG_ERR, "Disk space is still too low (%" NSPRIu64 " Kb). Signaling slapd for shutdown...\n",
- (disk_space / 1024), 0, 0);
+ LDAPDebug(LDAP_DEBUG_ALERT, "disk_monitoring_thread - Disk space is still too low "
+ "(%" NSPRIu64 " Kb). Signaling slapd for shutdown...\n", (disk_space / 1024), 0, 0);
g_set_shutdown( SLAPI_SHUTDOWN_DISKFULL );
return;
@@ -741,7 +743,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, LOG_DEBUG, "Error accepting new connection listenfd=%d\n",
+ LDAPDebug1Arg(LDAP_DEBUG_CONNS, "Error accepting new connection listenfd=%d\n",
PR_FileDesc2NativeHandle(listenfd));
continue;
}
@@ -806,7 +808,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, LOG_DEBUG, "convert_pbe_des_to_aes",
+ slapi_log_error(SLAPI_LOG_HOUSE, "convert_pbe_des_to_aes",
"Converting DES passwords to AES...\n");
for (i = 0; attrs && attrs[i]; i++){
@@ -835,7 +837,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, LOG_ERR,"convert_pbe_des_to_aes",
+ slapi_log_error(SLAPI_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 +847,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, LOG_ERR, "convert_pbe_des_to_aes",
+ slapi_log_error(SLAPI_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 +871,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, LOG_ERR, "convert_pbe_des_to_aes"
+ slapi_log_error(SLAPI_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, LOG_DEBUG, "convert_pbe_des_to_aes",
+ slapi_log_error(SLAPI_LOG_HOUSE, "convert_pbe_des_to_aes",
"Successfully converted password for (%s)\n",
slapi_entry_get_dn(entries[ii]));
converted_des_passwd = 1;
@@ -892,7 +894,7 @@ convert_pbe_des_to_aes(void)
slapi_ch_free_string(&filter);
}
if (!converted_des_passwd){
- slapi_log_error(SLAPI_LOG_HOUSE, LOG_DEBUG, "convert_pbe_des_to_aes",
+ slapi_log_error(SLAPI_LOG_HOUSE, "convert_pbe_des_to_aes",
"No DES passwords found to convert.\n");
}
}
@@ -914,7 +916,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, LOG_ERR, "ns_disable_listener: "
+ LDAPDebug2Args(LDAP_DEBUG_ERR, "ns_disable_listener - "
"disabling listener for fd [%d]: [%d] now disabled\n",
PR_FileDesc2NativeHandle(listener->listenfd),
num_disabled_listeners);
@@ -937,7 +939,7 @@ ns_enable_listeners()
num_enabled++;
}
if (num_enabled) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "ns_enable_listeners: "
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "ns_enable_listeners - "
"enabled [%d] listeners\n", num_enabled);
}
#endif
@@ -948,18 +950,18 @@ ns_enable_listeners()
* Nunc stans logging function.
*/
static void
-nunc_stans_logging(int priority, const char *format, va_list varg)
+nunc_stans_logging(int severity, const char *format, va_list varg)
{
va_list varg_copy;
- int severity = SLAPI_LOG_FATAL;
+ int loglevel = SLAPI_LOG_ERR;
- if (priority == LOG_DEBUG){
- severity = SLAPI_LOG_NUNCSTANS;
- } else if(priority == LOG_INFO){
- severity = SLAPI_LOG_CONNS;
+ if (severity == LOG_DEBUG){
+ loglevel = SLAPI_LOG_NUNCSTANS;
+ } else if(severity == LOG_INFO){
+ loglevel = SLAPI_LOG_CONNS;
}
va_copy(varg_copy, varg);
- slapi_log_error_ext(severity, "nunc-stans", (char *)format, varg, varg_copy);
+ slapi_log_error_ext(loglevel, "nunc-stans", (char *)format, varg, varg_copy);
va_end(varg_copy);
}
@@ -1051,7 +1053,7 @@ void slapd_daemon( daemon_ports_t *ports )
(i_unix == NULL) &&
#endif /* ENABLE_LDAPI */
(s_tcps == NULL) ) { /* nothing to do */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_ERR,
"no port to listen on\n", 0, 0, 0 );
exit( 1 );
}
@@ -1066,7 +1068,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, LOG_ERR, "Unable to create time thread - Shutting Down ("
+ LDAPDebug(LDAP_DEBUG_EMERG, "slapd_daemon - 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 );
@@ -1078,7 +1080,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, LOG_ERR, NULL,
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_daemon",
"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 +1088,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, LOG_ERR, NULL,
+ slapi_log_error(SLAPI_LOG_EMERG, "slapd_daemon",
"Cannot create new condition variable for disk space monitoring. "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
PR_GetError(), slapd_pr_strerror( PR_GetError() ));
@@ -1101,7 +1103,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, LOG_ERR, "Unable to create disk monitoring thread - Shutting Down ("
+ LDAPDebug(LDAP_DEBUG_EMERG, "slapd_daemon - 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 );
@@ -1118,7 +1120,7 @@ void slapd_daemon( daemon_ports_t *ports )
PRErrorCode prerr = PR_GetError();
char addrbuf[ 256 ];
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_daemon",
+ slapi_log_error(SLAPI_LOG_EMERG, "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 +1139,7 @@ void slapd_daemon( daemon_ports_t *ports )
PRErrorCode prerr = PR_GetError();
char addrbuf[ 256 ];
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_daemon",
+ slapi_log_error(SLAPI_LOG_EMERG, "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 +1157,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, LOG_ERR, "slapd_daemon",
+ slapi_log_error(SLAPI_LOG_EMERG, "slapd_daemon",
"listen() on %s failed: error %d (%s)\n",
(*iap)->local.path,
prerr,
@@ -1227,8 +1229,8 @@ void slapd_daemon( daemon_ports_t *ports )
#ifdef ENABLE_NUNC_STANS
if (enable_nunc_stans && ns_thrpool_wait(tp)) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ns_thrpool_wait failed errno %d (%s)\n", errno,
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapd-daemon - ns_thrpool_wait failed errno %d (%s)\n", errno,
slapd_system_strerror(errno), 0 );
}
#endif
@@ -1246,7 +1248,7 @@ void slapd_daemon( daemon_ports_t *ports )
break;
case -1: /* Error */
prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "PR_Poll() failed, "
+ LDAPDebug(LDAP_DEBUG_TRACE, "slapd_daemon - PR_Poll() failed, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_system_strerror(prerr), 0 );
break;
@@ -1318,7 +1320,7 @@ void slapd_daemon( daemon_ports_t *ports )
threads = g_get_active_threadcnt();
if ( threads > 0 ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_INFO,
"slapd shutting down - waiting for %d thread%s to terminate\n",
threads, ( threads > 1 ) ? "s" : "", 0 );
}
@@ -1340,14 +1342,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, LOG_ERR, "listener could not clear signal pipe, "
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_daemon - 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, LOG_ERR, "PR_Poll() failed, "
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_daemon - PR_Poll() failed, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_system_strerror(prerr), 0 );
break;
@@ -1357,21 +1359,21 @@ void slapd_daemon( daemon_ports_t *ports )
}
DS_Sleep(PR_INTERVAL_NO_WAIT);
if ( threads != g_get_active_threadcnt() ) {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"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, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_INFO,
"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, LOG_DEBUG,"slapd shutting down - waiting for backends to close down\n", 0, 0,0 );
+ LDAPDebug(LDAP_DEBUG_TRACE,"slapd shutting down - waiting for backends to close down\n", 0, 0,0 );
eq_stop();
if ( ! in_referral_mode ) {
@@ -1412,7 +1414,7 @@ void slapd_daemon( daemon_ports_t *ports )
be_cleanupall ();
plugin_dependency_freeall();
connection_post_shutdown_cleanup();
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "slapd shutting down - backends closed down\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "slapd shutting down - backends closed down\n",
0, 0, 0 );
referrals_free();
schema_destroy_dse_lock();
@@ -1424,7 +1426,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, LOG_ERR, "Failed to remove pid file %s\n", get_pid_file(), 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_daemon - Failed to remove pid file %s\n", get_pid_file(), 0, 0 );
}
}
}
@@ -1439,8 +1441,8 @@ int signal_listner()
/* this now means that the pipe is full
* this is not a problem just go-on
*/
- LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
- "listener could not write to signal pipe %d\n",
+ LDAPDebug(LDAP_DEBUG_CONNS,
+ "signal_listner - Listener could not write to signal pipe %d\n",
errno, 0, 0 );
}
return( 0 );
@@ -1454,9 +1456,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, LOG_DEBUG, "listener got signaled\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_CONNS, "clear_signal - Listener got signaled\n", 0, 0, 0 );
if ( read( readsignalpipe, buf, 200 ) < 1 ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "listener could not clear signal pipe\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "clear_signal - Listener could not clear signal pipe\n",
0, 0, 0 );
}
}
@@ -1483,7 +1485,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, LOG_ERR, "Not listening for new "
+ LDAPDebug(LDAP_DEBUG_ERR, "setup_pr_read_pds - 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 +1493,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, LOG_ERR, "Listening for new "
+ LDAPDebug(LDAP_DEBUG_ERR, "setup_pr_read_pds - 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,8 +1531,8 @@ 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, LOG_DEBUG,
- "listening for connections on %d\n", socketdesc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_HOUSE,
+ "setup_pr_read_pds - Listening for connections on %d\n", socketdesc, 0, 0 );
}
} else {
ct->fd[count].fd = NULL;
@@ -1551,8 +1553,8 @@ 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, LOG_DEBUG,
- "listening for SSL connections on %d\n", socketdesc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_HOUSE,
+ "setup_pr_read_pds - Listening for SSL connections on %d\n", socketdesc, 0, 0 );
}
} else {
ct->fd[count].fd = NULL;
@@ -1575,8 +1577,8 @@ 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, LOG_DEBUG,
- "listening for LDAPI connections on %d\n", socketdesc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_HOUSE,
+ "setup_pr_read_pds - Listening for LDAPI connections on %d\n", socketdesc, 0, 0 );
}
} else {
ct->fd[count].fd = NULL;
@@ -1770,8 +1772,8 @@ handle_pr_read_ready(Connection_Table *ct, PRIntn num_poll)
if ( !readready && out_flags )
{
/* some error occured */
- LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
- "POLL_FN() says connection on sd %d is bad "
+ LDAPDebug(LDAP_DEBUG_CONNS,
+ "handle_pr_read_ready - POLL_FN() says connection on sd %d is bad "
"(closing)\n", c->c_sd, 0, 0 );
disconnect_server_nomutex( c, c->c_connid, -1,
SLAPD_DISCONNECT_POLL, EPIPE );
@@ -1779,8 +1781,8 @@ handle_pr_read_ready(Connection_Table *ct, PRIntn num_poll)
else if ( readready )
{
/* read activity */
- LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
- "read activity on %d\n", c->c_ci, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_CONNS,
+ "handle_pr_read_ready - read activity on %d\n", c->c_ci, 0, 0 );
c->c_idlesince = curtime;
/* This is where the work happens ! */
@@ -1789,9 +1791,9 @@ 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, LOG_ERR,
- "connection_activity: abandoning conn %" NSPRIu64 " as fd=%d is already closing\n",
- c->c_connid,c->c_sd,0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "handle_pr_read_ready - 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,
* as the connection c should be already set to CLOSING */
disconnect_server_nomutex( c, c->c_connid, -1,
@@ -1848,7 +1850,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, LOG_ERR, "ns_handle_closure: Attempt to close outside of event loop thread %" NSPRIu64 " for fd=%d\n",
+ LDAPDebug2Args(LDAP_DEBUG_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,8 +1889,8 @@ 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, LOG_DEBUG, "already a close job in progress on conn %" NSPRIu64 " for fd=%d\n",
- conn->c_connid, conn->c_sd);
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, "ns_connection_post_io_or_closing - already a close "
+ "job in progress on conn %" NSPRIu64 " for fd=%d\n", conn->c_connid, conn->c_sd);
return;
} else {
/* just make sure we schedule the event to be closed in a timely manner */
@@ -1898,8 +1900,9 @@ 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, LOG_DEBUG, "post closure job for conn %" NSPRIu64 " for fd=%d\n",
- conn->c_connid, conn->c_sd);
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, "ns_connection_post_io_or_closing - post closure job "
+ "for conn %" NSPRIu64 " for fd=%d\n", conn->c_connid, conn->c_sd);
+
}
} else {
/* process event normally - wait for I/O until idletimeout */
@@ -1920,8 +1923,8 @@ 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, LOG_DEBUG, "post I/O job for conn %" NSPRIu64 " for fd=%d\n",
- conn->c_connid, conn->c_sd);
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, "ns_connection_post_io_or_closing - post I/O job for "
+ "conn %" NSPRIu64 " for fd=%d\n", conn->c_connid, conn->c_sd);
}
#endif
}
@@ -1943,14 +1946,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, LOG_ERR, "ns_handle_pr_read_ready: Attempt to handle read ready outside of event loop thread %" NSPRIu64 " for fd=%d\n",
+ LDAPDebug2Args(LDAP_DEBUG_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, LOG_DEBUG, "activity on conn %" NSPRIu64 " for fd=%d\n",
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, "ns_handle_pr_read_ready - 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,17 +1961,17 @@ 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, LOG_DEBUG, "socket is closed conn %" NSPRIu64 " for fd=%d\n",
- c->c_connid, c->c_sd);
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, "ns_handle_pr_read_ready - socket is closed conn"
+ " %" NSPRIu64 " for fd=%d\n", c->c_connid, c->c_sd);
} else if (rc > 0) {
- LDAPDebug2Args(LDAP_DEBUG_CONNS, LOG_DEBUG, "socket read data available for conn %" NSPRIu64 " for fd=%d\n",
- c->c_connid, c->c_sd);
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, "ns_handle_pr_read_ready - 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, LOG_DEBUG, "socket has no data available conn %" NSPRIu64 " for fd=%d\n",
- c->c_connid, c->c_sd);
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, "ns_handle_pr_read_ready - 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",
- errno, c->c_connid, c->c_sd);
+ LDAPDebug(LDAP_DEBUG_CONNS, "ns_handle_pr_read_ready - socket has error [%d] "
+ "conn %" NSPRIu64 " for fd=%d\n", errno, c->c_connid, c->c_sd);
}
}
connection_release_nolock_ext(c, 1); /* release ref acquired when job was added */
@@ -1984,8 +1987,8 @@ 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, LOG_ERR, "connection_activity: abandoning conn %" NSPRIu64
- " as fd=%d is already closing\n", c->c_connid, c->c_sd);
+ LDAPDebug2Args(LDAP_DEBUG_ERR, "ns_handle_pr_read_ready - 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 */
disconnect_server_nomutex_ext(c, c->c_connid, -1,
@@ -1993,7 +1996,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, LOG_DEBUG, "queued conn %" NSPRIu64 " for fd=%d\n",
+ LDAPDebug2Args(LDAP_DEBUG_CONNS, "ns_handle_pr_read_ready - queued conn %" NSPRIu64 " for fd=%d\n",
c->c_connid, c->c_sd);
}
PR_ExitMonitor(c->c_mutex);
@@ -2032,7 +2035,7 @@ slapd_poll( void *handle, int output )
if (rc < 0) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "slapd_poll(%d) "
+ LDAPDebug(LDAP_DEBUG_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 +2046,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, LOG_ERR, "slapd_poll(%d) timed out\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "slapd_poll(%d) - Timed out\n",
ihandle, 0, 0);
PR_SetError(PR_IO_TIMEOUT_ERROR, EAGAIN); /* timeout */
rc = -1;
@@ -2080,27 +2083,27 @@ 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, LOG_DEBUG, "PR_Write(%d) "
+ LDAPDebug(LDAP_DEBUG_CONNS, "write_function - 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, LOG_ERR, "PR_Write(%d) "
+ LDAPDebug(LDAP_DEBUG_ERR, "write_function - PR_Write(%d) "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
fd, prerr, slapd_pr_strerror( prerr ));
}
if (sentbytes < count) {
- LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
- "PR_Write(%d) - wrote only %d bytes (expected %d bytes) - 0 (EOF)\n", /* disconnected */
+ LDAPDebug(LDAP_DEBUG_CONNS,
+ "write_function - PR_Write(%d) - wrote only %d bytes (expected %d bytes) - 0 (EOF)\n", /* disconnected */
fd, sentbytes, count);
}
break; /* fatal error */
}
} else if (bytes == 0) { /* disconnect */
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
- "PR_Write(%d) - 0 (EOF) %d:%s\n", /* disconnected */
+ LDAPDebug(LDAP_DEBUG_CONNS,
+ "write_function - PR_Write(%d) - 0 (EOF) %d:%s\n", /* disconnected */
fd, prerr, slapd_pr_strerror(prerr));
PR_SetError(PR_PIPE_ERROR, EPIPE);
break;
@@ -2109,8 +2112,8 @@ 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, LOG_ERR,
- "PR_Write(%d) overflow - sent %d bytes (expected %d bytes) - error\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "write_function - PR_Write(%d) overflow - sent %d bytes (expected %d bytes) - error\n",
fd, sentbytes, count);
PR_SetError(PR_BUFFER_OVERFLOW_ERROR, EMSGSIZE);
break;
@@ -2560,7 +2563,7 @@ handle_new_connection(Connection_Table *ct, int tcps, PRFileDesc *pr_acceptfd, i
if (rv < 0) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "SSL_HandshakeCallback() %d "
+ LDAPDebug(LDAP_DEBUG_ERR, "handle_new_connection - SSL_HandshakeCallback() %d "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
rv, prerr, slapd_pr_strerror( prerr ));
}
@@ -2568,7 +2571,7 @@ handle_new_connection(Connection_Table *ct, int tcps, PRFileDesc *pr_acceptfd, i
if (rv < 0) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "SSL_BadCertHook(%i) %i "
+ LDAPDebug(LDAP_DEBUG_ERR, "handle_new_connection - SSL_BadCertHook(%i) %i "
SLAPI_COMPONENT_NAME_NSPR " error %d\n",
conn->c_sd, rv, prerr);
}
@@ -2641,9 +2644,10 @@ ns_handle_new_connection(struct ns_job_t *job)
*/
ns_disable_listener(li);
} else {
- LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG, "Error accepting new connection listenfd=%d [%d:%s]\n",
- PR_FileDesc2NativeHandle(li->listenfd), prerr,
- slapd_pr_strerror(prerr));
+ LDAPDebug(LDAP_DEBUG_CONNS, "ns_handle_new_connection - Error accepting"
+ " new connection listenfd=%d [%d:%s]\n",
+ PR_FileDesc2NativeHandle(li->listenfd), prerr,
+ slapd_pr_strerror(prerr));
}
return;
}
@@ -2671,10 +2675,10 @@ static int init_shutdown_detect(void)
int rc;
sigset_t proc_mask;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "Reseting signal mask....\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "init_shutdown_detect - Reseting signal mask....\n", 0, 0, 0);
(void)sigemptyset( &proc_mask );
rc = pthread_sigmask( SIG_SETMASK, &proc_mask, NULL );
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, " %s \n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "init_shutdown_detect - %s \n",
rc ? "Failed to reset signal mask":"....Done (signal mask reset)!!", 0, 0 );
}
@@ -2722,8 +2726,8 @@ unfurl_banners(Connection_Table *ct,daemon_ports_t *ports, PRFileDesc **n_tcps,
int isfirsttime = 1;
if ( ct->size <= slapdFrontendConfig->reservedescriptors ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: Not enough descriptors to accept any connections. "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "Not enough descriptors to accept any connections. "
"This may be because the maxdescriptors configuration "
"directive is too small, the hard limit on descriptors is "
"too small (see limit(1)), or the reservedescriptors "
@@ -2748,13 +2752,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, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_INFO,
"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, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_INFO,
"Listening on %s port %d for LDAP requests\n",
netaddr2string(*nap, addrbuf, sizeof(addrbuf)),
ports->n_port, 0 );
@@ -2767,13 +2771,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, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_INFO,
"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, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_INFO,
"Listening on %s port %d for LDAPS requests\n",
netaddr2string(*sap, addrbuf, sizeof(addrbuf)),
ports->s_port, 0 );
@@ -2785,7 +2789,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, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_INFO,
"%sListening on %s for LDAPI requests\n", isfirsttime?"slapd started. ":"",
(*iap)->local.path, 0 );
}
@@ -2823,7 +2827,7 @@ set_shutdown (int sig)
* yourself).
*/
#if 0
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "slapd got shutdown signal\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_INFO, "slapd got shutdown signal\n", 0, 0, 0 );
#endif
g_set_shutdown( SLAPI_SHUTDOWN_SIGNAL );
#ifndef LINUX
@@ -2868,7 +2872,7 @@ slapd_do_nothing (int sig)
* yourself).
*/
#if 0
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "slapd got SIGUSR1\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "slapd got SIGUSR1\n", 0, 0, 0 );
#endif
(void) SIGNAL( SIGUSR1, slapd_do_nothing );
@@ -2893,7 +2897,7 @@ slapd_wait4child(int sig)
* yourself).
*/
#if 0
- LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "listener: catching SIGCHLD\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, "listener: catching SIGCHLD\n", 0, 0, 0 );
#endif
#ifdef USE_WAITPID
while (waitpid ((pid_t) -1, 0, WAIT_FLAGS) > 0)
@@ -2932,7 +2936,7 @@ createprlistensockets(PRUint16 port, PRNetAddr **listenaddr,
}
if (0 == sockcnt) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
+ slapi_log_error(SLAPI_LOG_ERR, logname,
"There is no address to listen\n");
goto failed;
}
@@ -2954,7 +2958,7 @@ createprlistensockets(PRUint16 port, PRNetAddr **listenaddr,
}
if ((sock[i] = PR_OpenTCPSocket(socktype)) == SLAPD_INVALID_SOCKET) {
prerr = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
+ slapi_log_error(SLAPI_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 +2967,7 @@ createprlistensockets(PRUint16 port, PRNetAddr **listenaddr,
if ( PR_SetSocketOption(sock[i], &pr_socketoption ) == PR_FAILURE) {
prerr = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
+ slapi_log_error(SLAPI_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 +2983,7 @@ createprlistensockets(PRUint16 port, PRNetAddr **listenaddr,
prerr = PR_GetError();
if(!local)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
+ slapi_log_error(SLAPI_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 +2991,7 @@ createprlistensockets(PRUint16 port, PRNetAddr **listenaddr,
#if defined(ENABLE_LDAPI)
else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
+ slapi_log_error(SLAPI_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 +3007,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, LOG_ERR, logname, "err: %d", errno);
+ slapi_log_error(SLAPI_LOG_ERR, logname, "err: %d", errno);
}
}
#endif /* ENABLE_LDAPI */
@@ -3037,7 +3041,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, LOG_ERR, logname,
+ slapi_log_error(SLAPI_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 +3067,7 @@ slapd_listenhost2addr(const char *listenhost, PRNetAddr ***addr)
addrcnt++;
}
if ( 0 == addrcnt ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
+ slapi_log_error(SLAPI_LOG_ERR, logname,
"PR_EnumerateAddrInfo for %s failed - %s error %d (%s)\n",
listenhost, SLAPI_COMPONENT_NAME_NSPR, prerr,
slapd_pr_strerror(prerr));
@@ -3096,13 +3100,13 @@ slapd_listenhost2addr(const char *listenhost, PRNetAddr ***addr)
}
}
if (charray_inlist(strnetaddrs, abp)) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
- "slapd_listenhost2addr: "
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "slapd_listenhost2addr - "
"detected duplicated address %s "
"[%s]\n", abuf, abp);
} else {
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG,
- "slapd_listenhost2addr: "
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
+ "slapd_listenhost2addr - "
"registering address %s\n", abp);
slapi_ch_array_add(&strnetaddrs, slapi_ch_strdup(abp));
(*addr)[i] = netaddr;
@@ -3115,7 +3119,7 @@ slapd_listenhost2addr(const char *listenhost, PRNetAddr ***addr)
}
PR_FreeAddrInfo( infop );
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
+ slapi_log_error(SLAPI_LOG_ERR, logname,
"PR_GetAddrInfoByName(%s) failed - %s error %d (%s)\n",
listenhost, SLAPI_COMPONENT_NAME_NSPR, prerr,
slapd_pr_strerror(prerr));
@@ -3168,7 +3172,7 @@ createsignalpipe( void )
}
if ( PR_CreatePipe( &signalpipe[0], &signalpipe[1] ) != 0 ) {
PRErrorCode prerr = PR_GetError();
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "PR_CreatePipe() failed, "
+ LDAPDebug(LDAP_DEBUG_ERR, "createsignalpipe - PR_CreatePipe() failed, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), SLAPD_DEFAULT_THREAD_STACKSIZE );
return( -1 );
@@ -3176,11 +3180,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, LOG_ERR,"createsignalpipe: failed to set FD for write pipe (%d).\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR,"createsignalpipe: failed to set FD for read pipe (%d).\n",
+ LDAPDebug(LDAP_DEBUG_ERR,"createsignalpipe - Failed to set FD for read pipe (%d).\n",
errno, 0, 0);
}
return( 0 );
@@ -3215,11 +3219,11 @@ catch_signals()
(void)sigprocmask( SIG_BLOCK, &caught_signals, NULL );
if (( sig = sigwait( &caught_signals )) < 0 ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "catch_signals: sigwait returned -1\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "catch_signals - sigwait returned -1\n",
0, 0, 0 );
continue;
} else {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "catch_signals: detected signal %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "catch_signals - detected signal %d\n",
sig, 0, 0 );
switch ( sig ) {
case SIGUSR1:
@@ -3233,8 +3237,8 @@ catch_signals()
slapd_wait4child( sig );
break;
default:
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "catch_signals: unknown signal (%d) received\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "catch_signals - Unknown signal (%d) received\n",
sig, 0, 0 );
}
}
@@ -3292,7 +3296,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, LOG_ERR, "configure_pr_socket",
+ slapi_log_error(SLAPI_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 +3308,7 @@ int configure_pr_socket( PRFileDesc **pr_socket, int secure, int local )
}
} else {
int oserr = errno;
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "configure_pr_socket",
+ slapi_log_error(SLAPI_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 ) );
@@ -3316,8 +3320,8 @@ 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, LOG_ERR,
- "PR_SetSocketOption(PR_SockOpt_Keepalive failed, "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "configure_pr_socket - PR_SetSocketOption(PR_SockOpt_Keepalive failed, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0 );
}
@@ -3327,8 +3331,8 @@ 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, LOG_ERR,
- "PR_SetSocketOption(PR_SockOpt_Nonblocking) failed, "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "configure_pr_socket - PR_SetSocketOption(PR_SockOpt_Nonblocking) failed, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0 );
}
@@ -3338,8 +3342,8 @@ 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, LOG_ERR,
- "PR_SetSocketOption(PR_SockOpt_Nonblocking) failed, "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "configure_pr_socket - PR_SetSocketOption(PR_SockOpt_Nonblocking) failed, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0 );
}
@@ -3350,8 +3354,8 @@ 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, LOG_ERR,
- "PR_SetSocketOption(PR_SockOpt_NoDelay) failed, "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "configure_pr_socket - PR_SetSocketOption(PR_SockOpt_NoDelay) failed, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror( prerr ), 0 );
}
@@ -3360,8 +3364,8 @@ 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, LOG_ERR,
- "PR_SetSocketOption(PR_SockOpt_NoDelay) failed, "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "configure_pr_socket - PR_SetSocketOption(PR_SockOpt_NoDelay) failed, "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror( prerr ), 0 );
}
@@ -3389,7 +3393,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, LOG_ERR,"configure_ns_socket: Failed to configure socket (%d).\n", rc, 0, 0);
+ LDAPDebug(LDAP_DEBUG_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 120a35f..e69399a 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, LOG_DEBUG, "defbackend_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_ERR, "defbackend_init: failed (%s)\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG, "defbackend_default\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "defbackend_noop\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "defbackend_abandon\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "defbackend_bind\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "defbackend_next_search_entry\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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 eb7887a..451d5bd 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, LOG_DEBUG, "do_delete\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "do_delete\n", 0, 0, 0 );
slapi_pblock_get( pb, SLAPI_OPERATION, &operation);
ber = operation->o_ber;
@@ -58,8 +58,8 @@ do_delete( Slapi_PBlock *pb )
*/
if ( ber_scanf( pb->pb_op->o_ber, "a", &rawdn ) == LBER_ERROR ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ber_scanf failed (op=Delete; params=DN)\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "do_delete - 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,
NULL );
@@ -89,7 +89,7 @@ do_delete( Slapi_PBlock *pb )
goto free_and_return;
}
- LDAPDebug1Arg( LDAP_DEBUG_ARGS, LOG_DEBUG, "do_delete: dn (%s)\n", rawdn );
+ LDAPDebug1Arg(LDAP_DEBUG_ARGS, "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,8 +166,8 @@ slapi_delete_internal_set_pb (Slapi_PBlock *pb,
PR_ASSERT (pb != NULL);
if (pb == NULL || rawdn == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
- "slapi_delete_internal_set_pb: NULL parameter\n");
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_delete_internal_set_pb",
+ "NULL parameter\n");
return;
}
diff --git a/ldap/servers/slapd/detach.c b/ldap/servers/slapd/detach.c
index cd27993..350df23 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, LOG_ERR, "detach: set workingdir failed with \"%s\"\n", errorbuf);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "detach: set workingdir failed with \"%s\"\n", errorbuf);
}
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "detach: failed to chdir to %s\n", "/");
+ LDAPDebug1Arg(LDAP_DEBUG_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, LOG_ERR, "detach: set workingdir failed with \"%s\"\n", errorbuf);
+ LDAPDebug1Arg(LDAP_DEBUG_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, LOG_ERR, "detach: set workingdir failed with \"%s\"\n", errorbuf);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "detach: set workingdir failed with \"%s\"\n", errorbuf);
}
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "detach: failed to chdir to %s\n", "/");
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "detach: failed to chdir to %s\n", "/");
}
}
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "detach: failed to chdir to %s\n", errorlog);
+ LDAPDebug1Arg(LDAP_DEBUG_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, LOG_ERR, "detach: set workingdir failed with \"%s\"\n", errorbuf);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "detach: set workingdir failed with \"%s\"\n", errorbuf);
}
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "detach: failed to chdir to %s\n", "/");
+ LDAPDebug1Arg(LDAP_DEBUG_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, LOG_ERR, "detach: set workingdir failed with \"%s\"\n", errorbuf);
+ LDAPDebug1Arg(LDAP_DEBUG_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, LOG_ERR, "detach: set workingdir failed with \"%s\"\n", errorbuf);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "detach: set workingdir failed with \"%s\"\n", errorbuf);
}
} else {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "detach: failed to chdir to %s\n", "/");
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "detach: failed to chdir to %s\n", "/");
}
} else {
rc = chdir(workingdir);
if (rc) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR, "detach: failed to chdir to %s\n", workingdir);
+ LDAPDebug1Arg(LDAP_DEBUG_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, LOG_ERR, "detach: set_workingdir failed.\n");
+ LDAPDebug0Args(LDAP_DEBUG_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, LOG_ERR, "detach: set_workingdir failed.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "detach: set_workingdir failed.\n");
}
}
@@ -225,7 +225,7 @@ static void raise_process_fd_limits(void)
if ( getrlimit( RLIMIT_NOFILE, &rl ) != 0 ) {
int oserr = errno;
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "setrlimit of descriptor "
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG, "descriptor limit changed from %d to %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG,"setrlimit(RLIMIT_DATA) failed %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE,"setrlimit(RLIMIT_DATA) failed %d\n",
errno,0,0);
}
} else {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"getrlimit(RLIMIT_DATA) failed %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE,"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, LOG_DEBUG,"setrlimit(RLIMIT_VMEM) failed %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE,"setrlimit(RLIMIT_VMEM) failed %d\n",
errno,0,0);
}
} else {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"getrlimit(RLIMIT_VMEM) failed %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE,"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 a5d0e84..855fe70 100644
--- a/ldap/servers/slapd/dn.c
+++ b/ldap/servers/slapd/dn.c
@@ -340,8 +340,8 @@ substr_dn_normalize_orig( char *dn, char *end )
} else if ( *s == '"' ) {
state = B4SEPARATOR;
if (!value) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "slapi_dn_normalize - missing value\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "substr_dn_normalize_orig - missing value\n", 0, 0, 0 );
break;
}
if ( value_separator == dn /* 2 or more separators */
@@ -390,8 +390,8 @@ substr_dn_normalize_orig( char *dn, char *end )
}
break;
default:
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "slapi_dn_normalize - unknown state %d\n", state, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "substr_dn_normalize_orig - unknown state %d\n", state, 0, 0 );
break;
}
if ( *s == '\\' ) {
@@ -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, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG, "=> slapi_dn_normalize \"%s\"\n", dn, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_TRACE, "=> slapi_dn_normalize \"%s\"\n", dn, 0, 0 ); */
*(substr_dn_normalize_orig( dn, dn + strlen( dn ))) = '\0';
- /* LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= slapi_dn_normalize \"%s\"\n", dn, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> slapi_dn_normalize \"%s\"\n", dn, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_TRACE, "=> slapi_dn_normalize \"%s\"\n", dn, 0, 0 ); */
*(substr_dn_normalize_orig( dn, dn + strlen( dn ))) = '\0';
- /* LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= slapi_dn_normalize \"%s\"\n", dn, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> slapi_dn_normalize \"%s\"\n", dn, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_TRACE, "=> slapi_dn_normalize \"%s\"\n", dn, 0, 0 ); */
*(substr_dn_normalize( dn, dn + strlen( dn ))) = '\0';
- /* LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= slapi_dn_normalize \"%s\"\n", dn, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_ERR, "SDN %s ptr=%lx dn=%s\n", text, sdn, (sdn->dn==NULL?"NULL":sdn->dn));
+ LDAPDebug(LDAP_DEBUG_DEBUG, "SDN %s ptr=%lx dn=%s\n", text, sdn, (sdn->dn==NULL?"NULL":sdn->dn));
}
#endif
@@ -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, LOG_ERR, "ndn_cache_init", "Failed to create locks. Disabling cache.\n" );
+ slapi_log_error(SLAPI_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, LOG_ERR, "ndn_cache_add", "Failed to allocate new lru node.\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, "ndn_cache_add", "Failed to allocate new hash entry.\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, "ndn_cache_add", "Failed to add new entry to hash(%s)\n",dn);
+ slapi_log_error(SLAPI_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, LOG_DEBUG, "ndn_cache_flush","Flushed cache.\n");
+ slapi_log_error(SLAPI_LOG_CACHE, "ndn_cache_flush","Flushed cache.\n");
}
static void
diff --git a/ldap/servers/slapd/dse.c b/ldap/servers/slapd/dse.c
index 410cd6c..2199d07 100644
--- a/ldap/servers/slapd/dse.c
+++ b/ldap/servers/slapd/dse.c
@@ -448,7 +448,7 @@ dse_destroy(struct dse *pdse)
slapi_destroy_rwlock(pdse->dse_rwlock);
}
slapi_ch_free((void **)&pdse);
- LDAPDebug( SLAPI_DSE_TRACELEVEL, LOG_DEBUG, "Removed [%d] entries from the dse tree.\n",
+ LDAPDebug(SLAPI_DSE_TRACELEVEL, "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, LOG_ERR, "dse",
+ slapi_log_error(SLAPI_LOG_ERR, "dse_updateNumSubordinates",
"numsubordinates assertion failure\n" );
return;
}
@@ -644,28 +644,28 @@ dse_check_file(char *filename, char *backupname)
PRFileInfo64 prfinfo;
if (PR_GetFileInfo64( filename, &prfinfo ) == PR_SUCCESS) {
- if ( prfinfo.size > 0)
- return (1);
- else {
- rc = PR_Delete (filename);
- }
+ if ( prfinfo.size > 0)
+ return (1);
+ else {
+ rc = PR_Delete (filename);
+ }
}
if (backupname)
- rc = PR_Rename (backupname, filename);
+ rc = PR_Rename (backupname, filename);
else
- return (0);
+ return (0);
if ( PR_GetFileInfo64( filename, &prfinfo ) == PR_SUCCESS && prfinfo.size > 0 ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "dse",
- "The configuration file %s was restored from backup %s\n", filename, backupname);
- return (1);
+ slapi_log_error(SLAPI_LOG_INFO, "dse_check_file",
+ "The configuration file %s was restored from backup %s\n", filename, backupname);
+ return (1);
} else {
- 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);
- }
+ slapi_log_error(SLAPI_LOG_ERR, "dse_check_file",
+ "The configuration file %s was not restored from backup %s, error %d\n",
+ filename, backupname, rc);
+ return (0);
+ }
}
static int
dse_read_one_file(struct dse *pdse, const char *filename, Slapi_PBlock *pb,
@@ -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, LOG_ERR, "dse",
+ slapi_log_error(SLAPI_LOG_ERR, "dse_read_one_file",
"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, LOG_ERR, "dse",
+ slapi_log_error(SLAPI_LOG_ERR, "dse_read_one_file",
"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, LOG_ERR, "dse",
+ slapi_log_error(SLAPI_LOG_ERR, "dse_read_one_file",
"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, LOG_DEBUG, "dse_read_one_file",
+ slapi_log_error(SLAPI_LOG_TRACE, "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, LOG_ERR,
+ slapi_log_error(SLAPI_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, LOG_ERR, "dse_read_one_file",
+ slapi_log_error(SLAPI_LOG_ERR, "dse_read_one_file",
"Parsing entry (lineno: %d) "
"in file %s failed.\n",
lineno, filename );
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "dse_read_one_file",
+ slapi_log_error(SLAPI_LOG_ERR, "dse_read_one_file",
"Invalid section [%s%s]\n",
errbuf, cpylen==estrlen?"":" ..." );
rc = 0; /* failure */
@@ -909,9 +909,9 @@ dse_rw_permission_to_one_file(const char *name, int loglevel)
}
if ( prerr != 0 ) {
- 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));
+ slapi_log_error( loglevel,
+ "dse_rw_permission_to_one_file", "Unable to %s \"%s\": "SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
+ accesstype, name, prerr, slapd_pr_strerror(prerr));
return 0; /* insufficient permission */
} else {
return 1; /* sufficient permission */
@@ -957,11 +957,11 @@ 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, LOG_ERR, "dse",
+ slapi_log_error(SLAPI_LOG_ERR, "dse_check_for_readonly_error",
"The DSE database stored in \"%s\" is not writeable\n",
pdse->dse_filename );
/* log the details too */
- (void)dse_permission_to_write(pdse, SLAPI_LOG_FATAL);
+ (void)dse_permission_to_write(pdse, SLAPI_LOG_ERR);
}
pdse->dse_readonly_error_reported = 1;
}
@@ -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, LOG_ERR, "dse", "Cannot open "
+ slapi_log_error(SLAPI_LOG_ERR, "dse_write_file_nolock", "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, LOG_ERR, "dse", "Cannot write "
+ slapi_log_error(SLAPI_LOG_ERR, "dse_write_file_nolock", "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, LOG_ERR, "dse", "Cannot backup"
+ slapi_log_error(SLAPI_LOG_ERR, "dse_write_file_nolock", "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, LOG_ERR, "dse", "Cannot rename"
+ slapi_log_error(SLAPI_LOG_ERR, "dse_write_file_nolock", "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, LOG_DEBUG,"dse_search", "node %s was not found\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN,"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, LOG_DEBUG,
+ LDAPDebug(SLAPI_DSE_TRACELEVEL,
"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, LOG_DEBUG,
+ LDAPDebug(SLAPI_DSE_TRACELEVEL,
"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, LOG_DEBUG,
+ LDAPDebug0Args(SLAPI_DSE_TRACELEVEL,
"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, LOG_ERR,"dse_pre_modify_plugin",
+ slapi_log_error(SLAPI_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, LOG_DEBUG,"dse_modify_plugin", "Disabled plugin (%s)\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN,"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, LOG_DEBUG,"dse_modify_plugin", "Enabled plugin (%s)\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN,"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, LOG_DEBUG,
+ LDAPDebug(SLAPI_DSE_TRACELEVEL,
"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, LOG_DEBUG,
+ LDAPDebug(SLAPI_DSE_TRACELEVEL,
"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, LOG_DEBUG," dse_add: parent does not exist\n", 0, 0, 0 );
+ LDAPDebug(SLAPI_DSE_TRACELEVEL," 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, LOG_DEBUG, "dse_add: no access to parent\n", 0, 0, 0 );
+ LDAPDebug(SLAPI_DSE_TRACELEVEL, "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, LOG_DEBUG, "dse_add: no parent and not root\n", 0, 0, 0 );
+ LDAPDebug(SLAPI_DSE_TRACELEVEL, "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 */
@@ -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, LOG_ERR, "dse_add: DSE PREOP callback returned error but did not set returncode\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_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 d112564..4b8630e 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, LOG_ERR, SLAPI_COMPONENT_NAME_NSPR " error %d: %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, SLAPI_COMPONENT_NAME_NSPR " error %d: %s\n",
PR_GetError(), errtext, 0 );
}
slapi_ch_free( (void **)&errtext );
}
if ( libopen ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_ERR,
"Could not load symbol \"%s\" from \"%s\" for plugin %s\n",
symbol, libpath, plugin );
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_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 1b006cb..1d04105 100644
--- a/ldap/servers/slapd/entry.c
+++ b/ldap/servers/slapd/entry.c
@@ -22,7 +22,6 @@
#include <prcountr.h>
#include "slap.h"
-
#undef ENTRY_DEBUG
#define DELETED_ATTR_STRING ";deletedattribute"
@@ -245,7 +244,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, LOG_DEBUG, "=> str2entry_fast\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> str2entry_fast\n", 0, 0, 0 );
e = slapi_entry_alloc();
slapi_entry_init(e,NULL,NULL);
@@ -274,7 +273,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, LOG_DEBUG, "<= str2entry_fast NULL (parse_line)\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "<= str2entry_fast NULL (parse_line)\n");
continue;
}
@@ -325,7 +324,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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"str2entry_fast: Invalid DN: %s\n", rawdn);
slapi_entry_free( e );
if (freeval) slapi_ch_free_string(&value.bv_val);
@@ -354,7 +353,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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"str2entry_fast: Invalid DN: %s\n", rawdn);
slapi_entry_free( e );
if (freeval)
@@ -375,7 +374,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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"str2entry_fast: entry has multiple dns \"%s\" and "
"\"%s\" (second ignored)\n",
slapi_entry_get_dn_const(e),
@@ -392,7 +391,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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"str2entry_fast: Invalid DN: %s\n",
escape_string( value.bv_val, ebuf ));
slapi_entry_free( e );
@@ -427,7 +426,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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"str2entry_fast: entry has multiple uniqueids %s "
"and %s (second ignored)\n",
e->e_uniqueid, value.bv_val, 0);
@@ -459,7 +458,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, LOG_ERR, "str2entry_fast: Error. Non-contiguous attribute values for %s\n", type.bv_val, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "str2entry_fast - Non-contiguous attribute values for %s\n", type.bv_val, 0, 0);
PR_ASSERT(0);
continue;
}
@@ -467,13 +466,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, LOG_ERR, "str2entry_fast: Error. Non-contiguous deleted attribute values for %s\n", type.bv_val, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "str2entry_fast - 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, LOG_ERR, "str2entry_fast: Error. Non-contiguous deleted attribute values for %s\n", type.bv_val, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "str2entry_fast - Non-contiguous deleted attribute values for %s\n", type.bv_val, 0, 0);
PR_ASSERT(0);
continue;
/* break; ??? */
@@ -490,7 +489,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, LOG_DEBUG,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE,
"str2entry_fast: strict: Invalid DN value: %s: %s\n",
type.bv_val, value.bv_val);
slapi_entry_free( e );
@@ -560,8 +559,8 @@ 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, LOG_ERR,
- "str2entry_fast: entry %s exceeded max attribute value cound %ld\n",
+ LDAPDebug(LDAP_DEBUG_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 );
}
@@ -580,7 +579,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, LOG_DEBUG, "str2entry_fast: "
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "str2entry_fast: "
"tombstone entry has badly formatted dn: %s\n",
slapi_entry_get_dn_const(e) );
slapi_entry_free( e ); e = NULL;
@@ -591,7 +590,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, LOG_ERR, "str2entry_fast: entry has no dn\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "str2entry_fast - entry has no dn\n",
0, 0, 0 );
slapi_entry_free( e );
e = NULL;
@@ -601,7 +600,7 @@ done:
csnset_free(&valuecsnset);
csn_free(&attributedeletioncsn);
csn_free(&maxcsn);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= str2entry_fast 0x%x\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= str2entry_fast 0x%x\n",
e, 0, 0 );
return( e );
}
@@ -798,7 +797,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, LOG_DEBUG, "=> str2entry_dupcheck\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "=> str2entry_dupcheck\n");
e = slapi_entry_alloc();
slapi_entry_init(e,NULL,NULL);
@@ -825,8 +824,8 @@ 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, LOG_ERR,
- "Warning: Entry (%s), ignoring invalid line \"%s\"...\n",
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "Entry (%s), ignoring invalid line \"%s\"...\n",
rawdn ? rawdn : "", s, 0);
continue;
}
@@ -864,7 +863,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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"str2entry_dupcheck: Invalid DN: %s\n", rawdn);
slapi_entry_free( e );
if (freeval) slapi_ch_free_string(&bvvalue.bv_val);
@@ -887,7 +886,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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"str2entry_dupcheck: Invalid DN: %s\n", rawdn);
slapi_entry_free( e );
if (freeval) slapi_ch_free_string(&bvvalue.bv_val);
@@ -908,7 +907,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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"str2entry_dupcheck: entry has multiple dns \"%s\" "
"and \"%s\" (second ignored)\n",
slapi_entry_get_dn_const(e),
@@ -919,7 +918,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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"str2entry_dupcheck: Invalid DN: %s\n", valuecharptr);
slapi_entry_free( e ); e = NULL;
if (freeval) slapi_ch_free_string(&bvvalue.bv_val);
@@ -951,7 +950,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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"str2entry_dupcheck: entry has multiple uniqueids %s "
"and %s (second ignored)\n",
e->e_uniqueid, valuecharptr, 0);
@@ -1076,8 +1075,8 @@ 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, LOG_ERR,
- "str2entry_dupcheck: strict: Invalid DN value: %s: %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "str2entry_dupcheck - strict: Invalid DN value: %s: %s\n",
type, valuecharptr);
slapi_entry_free( e ); e = NULL;
if (freeval) slapi_ch_free_string(&bvvalue.bv_val);
@@ -1138,7 +1137,7 @@ str2entry_dupcheck( const char *rawdn, char *s, int flags, int read_stateinfo )
else
{
/* Failure adding to value tree */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "str2entry_dupcheck: unexpected failure %d adding value\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_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 +1151,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, LOG_ERR, "str2entry_dupcheck: entry has no dn\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "str2entry_dupcheck - entry has no dn\n",
0, 0, 0 );
slapi_entry_free( e ); e = NULL;
goto free_and_return;
@@ -1173,11 +1172,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, LOG_ERR, "str2entry_dupcheck: %d duplicate values for attribute "
+ LDAPDebug(LDAP_DEBUG_WARNING, "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, LOG_ERR, "str2entry_dupcheck: Duplicate value for attribute "
+ LDAPDebug(LDAP_DEBUG_WARNING, "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 );
}
@@ -1238,7 +1237,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, LOG_DEBUG, "str2entry_dupcheck: "
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "str2entry_dupcheck: "
"tombstone entry has badly formatted dn: %s\n",
slapi_entry_get_dn_const(e) );
slapi_entry_free( e ); e = NULL;
@@ -1249,7 +1248,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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"str2entry_dupcheck: entry has badly formatted dn\n",
0, 0, 0 );
slapi_entry_free( e ); e = NULL;
@@ -1281,7 +1280,7 @@ free_and_return:
csn_free(&attributedeletioncsn);
csn_free(&maxcsn);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= str2entry_dupcheck 0x%x \"%s\"\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= str2entry_dupcheck 0x%x \"%s\"\n",
e, slapi_sdn_get_dn (slapi_entry_get_sdn_const(e)), 0 );
return e;
}
@@ -1332,7 +1331,7 @@ slapi_str2entry( char *s, int flags )
Slapi_Entry *e;
int read_stateinfo= ~( flags & SLAPI_STR2ENTRY_IGNORE_STATE );
- LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_ARGS,
"slapi_str2entry: flags=0x%x, entry=\"%.50s...\"\n",
flags, s, 0 );
@@ -1393,7 +1392,7 @@ slapi_str2entry_ext( const char *normdn, const Slapi_RDN *srdn, char *s, int fla
return slapi_str2entry( s, flags );
}
- LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_ARGS,
"slapi_str2entry_ext: flags=0x%x, dn=\"%s\", entry=\"%.50s...\"\n",
flags, normdn, s );
@@ -1766,7 +1765,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, LOG_ERR, NULL,
+ slapi_log_error(SLAPI_LOG_NOTICE, "entry2str_internal",
"entry2str_internal: array boundary wrote: bufsize=%ld wrote=%ld\n",
(long int)elen, (long int)(ecur - ebuf + 1));
}
@@ -1860,9 +1859,8 @@ 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, LOG_ERR, NULL,
- "entry2str_internal_ext: array boundary wrote: "
- "bufsize=%ld wrote=%ld\n",
+ slapi_log_error(SLAPI_LOG_NOTICE, "entry2str_internal_ext",
+ "Array boundary wrote: bufsize=%ld wrote=%ld\n",
(long int)elen, (long int)(ecur - ebuf + 1));
}
@@ -2173,7 +2171,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, LOG_ERR, "Entry %s ptr=%lx dn=%s\n", text, e, (dn==NULL?"NULL":dn));
+ LDAPDebug(LDAP_DEBUG_DEBUG, "Entry %s ptr=%lx dn=%s\n", text, e, (dn==NULL?"NULL":dn));
}
#endif
@@ -2439,7 +2437,8 @@ 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, LOG_ERR, "entry_vattr_lookup_nolock", "unable to retrieve attribute name %s\n", attr_name);
+ slapi_log_error(SLAPI_LOG_NOTICE, "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 +2733,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, LOG_ERR, "slapi_entry_vattrcache_merge_sv",
+ slapi_log_error(SLAPI_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));
}
@@ -3281,7 +3280,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, LOG_DEBUG, "RDN value is not identical to entry value for type %s in entry %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "RDN value is not identical to entry value for type %s in entry %s\n",
type, dn ? dn : "<null>", 0 );
#if 0
/*
@@ -3327,7 +3326,7 @@ slapi_entry_has_children_ext(const Slapi_Entry *entry, int include_tombstone)
Slapi_Attr *attr;
int count = 0;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> slapi_has_children( %s )\n", slapi_entry_get_dn_const(entry), 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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)
@@ -3342,7 +3341,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, LOG_DEBUG, "<= slapi_has_children %d\n", count);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "<= slapi_has_children %d\n", count);
return count;
}
}
@@ -3361,13 +3360,13 @@ 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, LOG_DEBUG, "<= slapi_has_tombstone_children %d\n", count);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "<= slapi_has_tombstone_children %d\n", count);
return count;
}
}
}
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= slapi_has_children 0\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= slapi_has_children 0\n", 0, 0, 0 );
return(0);
}
@@ -3388,7 +3387,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, LOG_DEBUG, "=> slapi_entry_rename\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> slapi_entry_rename\n", 0, 0, 0 );
slapi_sdn_init(&newsrdn);
/* Check if entry or newrdn are NULL. */
@@ -3462,7 +3461,7 @@ done:
slapi_mods_free(&smods);
slapi_sdn_done(&newsrdn);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= slapi_entry_rename\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= slapi_entry_rename\n", 0, 0, 0 );
return err;
}
@@ -3495,7 +3494,7 @@ entry_apply_mods_ignore_error( Slapi_Entry *e, LDAPMod **mods, int ignore_error
int err;
LDAPMod **mp = NULL;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> entry_apply_mods\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> entry_apply_mods\n", 0, 0, 0 );
err = LDAP_SUCCESS;
for ( mp = mods; mp && *mp; mp++ )
@@ -3508,7 +3507,7 @@ entry_apply_mods_ignore_error( Slapi_Entry *e, LDAPMod **mods, int ignore_error
}
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= entry_apply_mods %d\n", err, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= entry_apply_mods %d\n", err, 0, 0 );
return( err );
}
@@ -3548,14 +3547,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, LOG_ERR, "entry_apply_mod",
+ slapi_log_error(SLAPI_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, LOG_ERR, "entry_apply_mod",
+ slapi_log_error(SLAPI_LOG_ERR, "entry_apply_mod",
"ADD: %s has no values\n",
aiep->ext_type);
goto bail;
@@ -3566,7 +3565,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, LOG_ERR, "entry_apply_mod",
+ slapi_log_error(SLAPI_LOG_ERR, "entry_apply_mod",
"DEL: Failed to get %s from extension\n",
aiep->ext_type);
goto bail;
@@ -3585,7 +3584,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, LOG_ERR,
+ slapi_log_error(SLAPI_LOG_ERR,
"entry_apply_mod",
"DEL: Failed to set %s "
"to extension\n",
@@ -3599,7 +3598,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, LOG_ERR, "entry_apply_mod",
+ slapi_log_error(SLAPI_LOG_ERR, "entry_apply_mod",
"DEL: Failed to set %s to extension\n",
aiep->ext_type);
goto bail;
@@ -3614,14 +3613,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, LOG_ERR, "entry_apply_mod",
+ slapi_log_error(SLAPI_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, LOG_ERR, "entry_apply_mod",
+ slapi_log_error(SLAPI_LOG_ERR, "entry_apply_mod",
"REPLACE: %s has no values\n",
aiep->ext_type);
goto bail;
@@ -3660,7 +3659,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, LOG_DEBUG, " %s: %s\n", mod->mod_type, mod->mod_bvalues[i]->bv_val, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, " %s: %s\n", mod->mod_type, mod->mod_bvalues[i]->bv_val, 0 );
}
bvcnt = i;
@@ -3682,24 +3681,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, LOG_DEBUG, " add: %s\n", mod->mod_type, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, " 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, LOG_DEBUG, " delete: %s\n", mod->mod_type, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, " 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, LOG_DEBUG, " replace: %s\n", mod->mod_type, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, " 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, LOG_DEBUG, " -\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, " -\n", 0, 0, 0 );
return( err );
}
@@ -3823,7 +3822,7 @@ delete_values_sv_internal(
/* delete the entire attribute */
if ( valuestodelete == NULL || valuestodelete[0] == NULL ){
- LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "removing entire attribute %s\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, "removing entire attribute %s\n",
type, 0, 0 );
retVal = attrlist_delete( &e->e_attrs, type);
if (flags & SLAPI_VALUE_FLAG_IGNOREERROR) {
@@ -3835,7 +3834,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, LOG_DEBUG, "could not find attribute %s\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, "could not find attribute %s\n",
type, 0, 0 );
if (flags & SLAPI_VALUE_FLAG_IGNOREERROR) {
return LDAP_SUCCESS;
@@ -3864,7 +3863,7 @@ delete_values_sv_internal(
*/
if ( retVal==LDAP_OPERATIONS_ERROR )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Possible existing duplicate "
+ LDAPDebug(LDAP_DEBUG_ERR, "delete_values_sv_internal - 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 +4030,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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"slapi_entry_diff: attr-val of %s is not in e2; "
"add it\n",
e1_attr_name, 0, 0);
@@ -4043,7 +4042,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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"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 +4076,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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"slapi_entry_diff: attr-val of %s is not in e1; "
"delete it\n",
e2_attr_name, 0, 0);
@@ -4089,7 +4088,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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"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 +4183,7 @@ slapi_entries_diff(Slapi_Entry **old_entries, Slapi_Entry **curr_entries,
rval = 1;
if (isfirst)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%sEntry %s\n", my_logging_prestr,
+ LDAPDebug(LDAP_DEBUG_INFO, "slapi_entries_diff - %sEntry %s\n", my_logging_prestr,
slapi_entry_get_dn_const(*oep), 0);
isfirst = 0;
}
@@ -4192,24 +4191,24 @@ 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, LOG_ERR,
- " Del Attribute %s Value %s\n",
+ LDAPDebug(LDAP_DEBUG_INFO,
+ "slapi_entries_diff - 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, LOG_ERR,
- " Add Attribute %s Value %s\n",
+ LDAPDebug(LDAP_DEBUG_INFO,
+ "slapi_entries_diff - 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, LOG_ERR,
- " Rep Attribute %s Value %s\n",
+ LDAPDebug(LDAP_DEBUG_INFO,
+ "slapi_entries_diff - Rep Attribute %s Value %s\n",
mod->mod_type, mod->mod_bvalues[0]->bv_val, 0);
break;
default:
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- " Unknown op %d Attribute %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_entries_diff - Unknown op %d Attribute %s\n",
mod->mod_op & ~LDAP_MOD_BVALUES,
mod->mod_type, 0);
break;
@@ -4245,7 +4244,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, LOG_ERR, "Add %sEntry %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "slapi_entries_diff - Add %sEntry %s\n",
my_logging_prestr, slapi_entry_get_dn_const(*oep), 0);
if (testall)
{
@@ -4274,7 +4273,7 @@ slapi_entries_diff(Slapi_Entry **old_entries, Slapi_Entry **curr_entries,
} else {
rval = 1;
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Del %sEntry %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "slapi_entries_diff - Del %sEntry %s\n",
my_logging_prestr, slapi_entry_get_dn_const(*cep), 0);
if (testall)
@@ -4319,7 +4318,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, LOG_ERR, "_entry_set_tombstone_rdn",
+ slapi_log_error(SLAPI_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 a784d7d..2e85a29 100644
--- a/ldap/servers/slapd/entrywsi.c
+++ b/ldap/servers/slapd/entrywsi.c
@@ -664,7 +664,7 @@ entry_delete_present_values_wsi(Slapi_Entry *e, const char *type, struct berval
retVal = LDAP_SUCCESS;
} else {
if (!urp) {
- LDAPDebug1Arg(LDAP_DEBUG_ARGS, LOG_DEBUG, "could not find attribute %s\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ARGS, "could not find attribute %s\n",
type);
}
retVal = LDAP_NO_SUCH_ATTRIBUTE;
@@ -694,7 +694,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, LOG_DEBUG, "removing entire attribute %s\n", type, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, "removing entire attribute %s\n", type, 0, 0 );
const CSN *adcsn = attr_get_deletion_csn(a);
if (csn_compare(csn, adcsn)<0) {
/* the attribute was deleted with an adcsn
@@ -772,7 +772,8 @@ entry_delete_present_values_wsi_single_valued(Slapi_Entry *e, const char *type,
*/
if ( retVal==LDAP_OPERATIONS_ERROR )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Possible existing duplicate "
+ LDAPDebug(LDAP_DEBUG_ERR, "entry_delete_present_values_wsi_single_valued - "
+ "Possible existing duplicate "
"value for attribute type %s found in "
"entry %s\n", a->a_type, slapi_entry_get_dn_const(e), 0 );
}
@@ -792,7 +793,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, LOG_DEBUG, "removing entire attribute %s\n", type, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, "Removing entire attribute %s\n", type, 0, 0 );
const CSN *adcsn = attr_get_deletion_csn(a);
if (csn_compare(csn, adcsn)<0) {
/* the attribute was deleted with an adcsn
@@ -889,9 +890,10 @@ entry_delete_present_values_wsi_multi_valued(Slapi_Entry *e, const char *type, s
*/
if ( retVal==LDAP_OPERATIONS_ERROR )
{
- 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 );
+ LDAPDebug(LDAP_DEBUG_ERR, "entry_delete_present_values_wsi_multi_valued - "
+ "Possible existing duplicate "
+ "value for attribute type %s found in "
+ "entry %s\n", a->a_type, slapi_entry_get_dn_const(e), 0 );
}
}
valuearray_free(&valuestodelete);
@@ -936,17 +938,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, LOG_DEBUG, " add: %s\n", mod->mod_type, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, " 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, LOG_DEBUG, " delete: %s\n", mod->mod_type, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, " 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, LOG_DEBUG, " replace: %s\n", mod->mod_type, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, " replace: %s\n", mod->mod_type, 0, 0 );
retVal = entry_replace_present_values_wsi( e, mod->mod_type, mod->mod_bvalues, csn, urp );
break;
}
@@ -954,10 +956,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, LOG_DEBUG, " %s: %s\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, " %s: %s\n",
mod->mod_type, mod->mod_bvalues[i]->bv_val, 0 );
}
- LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, " -\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, " -\n", 0, 0, 0 );
}
/*
@@ -1010,7 +1012,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, LOG_DEBUG, "=> entry_apply_mods_wsi\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> entry_apply_mods_wsi\n", 0, 0, 0 );
mod = slapi_mods_get_first_mod(smods);
while(NULL!=mod && retVal==LDAP_SUCCESS)
@@ -1034,7 +1036,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, LOG_DEBUG, "<= entry_apply_mods_wsi %d\n", retVal, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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 250d7d6..47cceea 100644
--- a/ldap/servers/slapd/errormap.c
+++ b/ldap/servers/slapd/errormap.c
@@ -153,12 +153,12 @@ SECU_Strerror(PRErrorCode errNum) {
for (i = low + 1; i <= high; ++i) {
num = errStrings[i].errNum;
if (num <= lastNum) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "sequence error in error strings at item %d\n"
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "SECU_Strerror - Sequence error in error strings at item %d\n"
"error %d (%s)\n",
i, lastNum, errStrings[i-1].errString );
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "should come after \n"
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "SECU_Strerror - Should come after \n"
"error %d (%s)\n",
num, errStrings[i].errString, 0 );
}
diff --git a/ldap/servers/slapd/eventq.c b/ldap/servers/slapd/eventq.c
index e301254..5eb601a 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, LOG_DEBUG, NULL,
+ slapi_log_error(SLAPI_LOG_HOUSE, 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, LOG_DEBUG, NULL,
+ slapi_log_error(SLAPI_LOG_HOUSE, 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, LOG_DEBUG, NULL,
+ slapi_log_error(SLAPI_LOG_HOUSE, 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, LOG_DEBUG, NULL,
+ slapi_log_error(SLAPI_LOG_HOUSE, 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, LOG_ERR, NULL, "eq_start PR_NewLock failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, "eq_create", "PR_NewLock failed\n");
exit(1);
}
if ((eq->eq_cv = PR_NewCondVar(eq->eq_lock)) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "eq_start PR_NewCondVar failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, "eq_create", "PR_NewCondVar failed\n");
exit(1);
}
if ((ss_lock = PR_NewLock()) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "eq_start PR_NewLock failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, "eq_create", "PR_NewLock failed\n");
exit(1);
}
if ((ss_cv = PR_NewCondVar(ss_lock)) == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "eq_start PR_NewCondVar failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, "eq_create", "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, LOG_ERR, NULL, "eq_init PR_CreateThread failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, "eq_start", "eq_loop PR_CreateThread failed\n");
exit(1);
}
- slapi_log_error(SLAPI_LOG_HOUSE, LOG_DEBUG, NULL, "event queue services have started\n");
+ slapi_log_error(SLAPI_LOG_HOUSE, 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, LOG_ERR, NULL, "eq_init - eq_create failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, "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, LOG_DEBUG, NULL, "event queue services have shut down\n");
+ slapi_log_error(SLAPI_LOG_HOUSE, NULL, "event queue services have shut down\n");
}
/*
diff --git a/ldap/servers/slapd/extendop.c b/ldap/servers/slapd/extendop.c
index 19377a6..6544434 100644
--- a/ldap/servers/slapd/extendop.c
+++ b/ldap/servers/slapd/extendop.c
@@ -32,8 +32,8 @@ static void extop_handle_import_start(Slapi_PBlock *pb, char *extoid,
int ret;
if (extval == NULL || extval->bv_val == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "extop_handle_import_start: no data supplied\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_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);
return;
@@ -46,8 +46,8 @@ 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, LOG_ERR,
- "extop_handle_import_start: strict: invalid suffix\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "extop_handle_import_start - strict: invalid suffix\n",
orig);
send_ldap_result(pb, LDAP_INVALID_DN_SYNTAX, NULL,
"invalid suffix", 0, NULL);
@@ -56,8 +56,8 @@ static void extop_handle_import_start(Slapi_PBlock *pb, char *extoid,
}
sdn = slapi_sdn_new_dn_passin(orig);
if (!sdn) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "extop_handle_import_start: out of memory\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_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,8 +69,8 @@ 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, LOG_ERR,
- "bulk import: invalid suffix or instance name '%s'\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "extop_handle_import_start - invalid suffix or instance name '%s'\n",
suffix, 0, 0);
send_ldap_result(pb, LDAP_NO_SUCH_OBJECT, NULL,
"invalid suffix or instance name", 0, NULL);
@@ -112,8 +112,8 @@ 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, LOG_ERR,
- "bulk import attempted on '%s' (not supported)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "extop_handle_import_start - bulk import attempted on '%s' (not supported)\n",
suffix, 0, 0);
send_ldap_result(pb, LDAP_NOT_SUPPORTED, NULL, NULL, 0, NULL);
goto out;
@@ -125,8 +125,8 @@ 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, LOG_ERR,
- "extop_handle_import_start: error starting import (%d)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "extop_handle_import_start - error starting import (%d)\n",
ret, 0, 0);
send_ldap_result(pb, LDAP_OPERATIONS_ERROR, NULL, NULL, 0, NULL);
goto out;
@@ -145,8 +145,8 @@ 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, LOG_ERR,
- "Bulk import: begin import on '%s'.\n", suffix, 0, 0);
+ LDAPDebug(LDAP_DEBUG_INFO,
+ "extop_handle_import_start - Bulk import begin import on '%s'.\n", suffix, 0, 0);
out:
slapi_sdn_free(&sdn);
@@ -168,8 +168,8 @@ 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, LOG_ERR,
- "extop_handle_import_done: backend not supported\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "extop_handle_import_done - backend not supported\n",
0, 0, 0);
send_ldap_result(pb, LDAP_NOT_SUPPORTED, NULL, NULL, 0, NULL);
return;
@@ -182,8 +182,8 @@ 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, LOG_ERR,
- "bulk import: error ending import (%d)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "extop_handle_import_done - bulk import error ending import (%d)\n",
ret, 0, 0);
send_ldap_result(pb, LDAP_OPERATIONS_ERROR, NULL, NULL, 0, NULL);
return;
@@ -195,8 +195,8 @@ 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, LOG_ERR,
- "Bulk import completed successfully.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_INFO,
+ "extop_handle_import_done - 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, LOG_DEBUG, "do_extended\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "do_extended\n", 0, 0, 0 );
/*
* Parse the extended request. It looks like this:
@@ -225,8 +225,8 @@ do_extended( Slapi_PBlock *pb )
if ( ber_scanf( pb->pb_op->o_ber, "{a", &extoid )
== LBER_ERROR ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ber_scanf failed (op=extended; params=OID)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "do_extended - 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");
send_ldap_result( pb, LDAP_PROTOCOL_ERROR, NULL, "decoding error", 0,
@@ -251,12 +251,12 @@ do_extended( Slapi_PBlock *pb )
}
}
if ( NULL == ( name = extended_op_oid2string( extoid ))) {
- LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "do_extended: oid (%s)\n", extoid, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, "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, LOG_DEBUG, "do_extended: oid (%s-%s)\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, "do_extended - oid (%s-%s)\n",
extoid, name, 0 );
slapi_log_access( LDAP_DEBUG_STATS,
@@ -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, LOG_DEBUG, NULL, "exendop.c plugin_determine_exop_plugins rc %d\n", rc);
+ slapi_log_error(SLAPI_LOG_TRACE, "do_extended", "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, LOG_DEBUG, NULL, "extendop.c calling plugin ... \n");
+ slapi_log_error(SLAPI_LOG_TRACE, "do_extended", "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, LOG_DEBUG, NULL, "extendop.c called exop, got %d \n", rc);
+ slapi_log_error(SLAPI_LOG_TRACE, "do_extended", "Called exop, got %d \n", rc);
} else if (rc == SLAPI_PLUGIN_BETXNEXTENDEDOP && p != NULL) {
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, NULL, "extendop.c calling betxn plugin ... \n");
+ slapi_log_error(SLAPI_LOG_TRACE, "do_extended", "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, LOG_ERR, NULL, "extendop.c plugin_extended_op_getbackend was unable to retrieve a backend!!!\n");
+ slapi_log_error(SLAPI_LOG_ERR, "do_extended", "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, LOG_ERR, NULL, "exendop.c Failed to start be_txn for plugin_call_exop_plugins %d\n", txn_rc);
+ slapi_log_error(SLAPI_LOG_ERR, "do_extended", "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, LOG_DEBUG, NULL, "extendop.c called betxn exop, got %d \n", rc);
+ slapi_log_error(SLAPI_LOG_TRACE, "do_extended", "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, LOG_DEBUG, NULL, "extendop.c commit with result %d \n", txn_rc);
+ slapi_log_error(SLAPI_LOG_TRACE, "do_extended", "Commit with result %d \n", txn_rc);
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, "extendop.c Unable to commit commit with result %d \n", txn_rc);
+ slapi_log_error(SLAPI_LOG_ERR, "do_extended", "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, LOG_ERR, NULL, "extendop.c abort with result %d \n", txn_rc);
+ slapi_log_error(SLAPI_LOG_ERR, "do_extended", "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, LOG_ERR, NULL, "extendop.c failed with result %d \n", rc);
+ slapi_log_error(SLAPI_LOG_ERR, "do_extended", "Failed with result %d \n", rc);
}
errmsg = NULL;
lderr = rc;
diff --git a/ldap/servers/slapd/factory.c b/ldap/servers/slapd/factory.c
index 146e7a4..b55562e 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, LOG_ERR, "ERROR: factory.c: Registration of %s extension by %s failed.\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "factory_type_add_extension - Registration of %s extension by %s failed.\n",
ft->name, fe->pluginname, 0);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: factory.c: %d extensions already registered. Max is %d\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "factory_type_add_extension - %d extensions already registered. Max is %d\n",
ft->extension_count, MAX_EXTENSIONS, 0);
}
@@ -193,7 +193,8 @@ factory_type_decrement_existence(struct factory_type *ft)
if(ft->existence_count<0)
{
/* This just shouldn't happen */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: factory.c: %lu %s object extensions in existence.\n", ft->extension_count, ft->name, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "factory_type_decrement_existence - %lu %s object extensions in existence.\n",
+ ft->extension_count, ft->name, 0);
}
}
@@ -274,8 +275,8 @@ factory_register_type(const char *name, size_t offset)
}
else
{
- 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);
+ LDAPDebug(LDAP_DEBUG_ERR, "factory_register_type - Registration of %s object failed.\n", name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "factory_register_type - %d objects already registered. Max is %d\n", number_of_types, MAX_TYPES, 0);
type= -1;
}
PR_Unlock(factory_type_store_lock);
@@ -323,7 +324,7 @@ factory_create_extension(int type,void *object,void *parent)
else
{
/* The type wasn't registered. Programming error? */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: factory.c: Object type handle %d not valid. Object not registered?\n", type, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "factory_create_extension - Object type handle %d not valid. Object not registered?\n", type, 0, 0);
}
return (void*)extension;
}
@@ -364,7 +365,7 @@ factory_destroy_extension(int type,void *object,void *parent,void **extension)
else
{
/* The type wasn't registered. Programming error? */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: factory.c: Object type handle %d not valid. Object not registered?\n", type, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "factory_destroy_extension - Object type handle %d not valid. Object not registered?\n", type, 0, 0);
}
slapi_ch_free(extension);
}
@@ -429,7 +430,7 @@ slapi_register_object_extension(
}
else
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: factory.c: Plugin %s failed to register extension for object %s.\n", pluginname, objectname, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "slapi_register_object_extension - 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/features.c b/ldap/servers/slapd/features.c
index af6dd4e..d2fa69a 100644
--- a/ldap/servers/slapd/features.c
+++ b/ldap/servers/slapd/features.c
@@ -25,8 +25,8 @@ init_features( void )
{
supported_features_lock = slapi_new_rwlock();
if (supported_features_lock == NULL) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "startup",
- "init_features: failed to create lock.\n");
+ slapi_log_error(SLAPI_LOG_ERR, "startup",
+ "init_features - failed to create lock.\n");
exit(1);
}
slapi_register_supported_feature( LDAP_FEATURE_ALL_OP_ATTRS );
diff --git a/ldap/servers/slapd/fedse.c b/ldap/servers/slapd/fedse.c
index b579769..a7c2a0e 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, LOG_ERR, "dse",
+ slapi_log_error(SLAPI_LOG_ERR, "init_dse_file",
"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, LOG_ERR, "dse",
+ slapi_log_error(SLAPI_LOG_ERR, "setup_internal_backends",
"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, LOG_ERR, "dse", "Cannot copy"
+ slapi_log_error(SLAPI_LOG_ERR, "fedse_create_startOK", "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 bf5fb69..5e05472 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, LOG_ERR, "get_filter", "before optimize: %s\n",
+ slapi_log_error(SLAPI_LOG_DEBUG, "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, LOG_ERR, "get_filter", " after optimize: %s\n",
+ slapi_log_error(SLAPI_LOG_DEBUG, "get_filter", " after optimize: %s\n",
slapi_filter_to_string(*filt, logbuf, logbufsize));
slapi_ch_free_string( &logbuf );
}
@@ -153,7 +153,7 @@ get_filter_internal( Connection *conn, BerElement *ber,
struct slapi_filter *f;
char *ftmp, *type = NULL;
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> get_filter_internal\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> 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, LOG_DEBUG, "<= get_filter_internal %d"
+ LDAPDebug(LDAP_DEBUG_FILTER, "<= 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, LOG_DEBUG, "EQUALITY\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "SUBSTRINGS\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "SUBSTRINGS\n", 0, 0, 0 );
err = get_substring_filter( conn, ber, f, fstr );
break;
case LDAP_FILTER_GE:
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "GE\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "LE\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "PRESENT\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "APPROX\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "EXTENDED\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "EXTENDED\n", 0, 0, 0 );
if ( conn->c_ldapversion < 3 ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "extensible filter received from v2 client\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "get_filter_internal - 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, LOG_DEBUG, "%s\n", *fstr, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, "%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, LOG_DEBUG, "AND\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "OR\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "NOT\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_ERR, "get_filter_internal: unknown type 0x%lX\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG, "<= get_filter_internal %d\n", err, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "<= 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, LOG_DEBUG, "=> get_filter_list\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> 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, LOG_ERR, " error parsing filter list\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "get_filter_list - Error parsing filter list\n", 0, 0, 0 );
slapi_ch_free((void**)fstr );
}
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= get_filter_list\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "<= 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, LOG_DEBUG, "=> get_substring_filter\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> 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, LOG_DEBUG, " INITIAL\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_DEBUG, " ANY\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_DEBUG, " FINAL\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_DEBUG, " unknown tag 0x%lX\n", tag, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " unknown tag 0x%lX\n", tag, 0, 0 );
return( LDAP_PROTOCOL_ERROR );
}
}
if ( (tag != LBER_END_OF_SEQORSET) && (len != -1) ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, " error reading substring filter\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "get_substring_filter - 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, LOG_DEBUG, "<= get_substring_filter\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "<= 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, LOG_DEBUG, "=> get_extensible_filter\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> 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, LOG_DEBUG, "<= get_extensible_filter %i\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "<= get_extensible_filter %i\n", rc, 0, 0 );
return rc;
parsing_error:;
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "error parsing extensible filter\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "get_extensible_filter - 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, LOG_ERR, "slapi_filter_dup: memory allocation error\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG, "slapi_filter_dup type 0x%lX\n", f->f_choice, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "slapi_filter_dup type 0x%lX\n", f->f_choice, 0, 0 );
switch ( f->f_choice ) {
case LDAP_FILTER_EQUALITY:
case LDAP_FILTER_GE:
@@ -718,12 +718,12 @@ 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, LOG_DEBUG, "slapi_filter_dup plugin_mr_filter_create returned %d\n", rc );
+ LDAPDebug1Arg(LDAP_DEBUG_FILTER, "slapi_filter_dup plugin_mr_filter_create returned %d\n", rc );
}
break;
default:
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "slapi_filter_dup: unknown type 0x%lX\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "slapi_filter_free type 0x%lX\n", f->f_choice, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_ERR, "slapi_filter_free: unknown type 0x%lX\n",
+ LDAPDebug(LDAP_DEBUG_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 fe8c2ee..a749ed3 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, LOG_ERR, "$$$ out of memory !\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "filter_compute_hash - Out of memory !\n", 0, 0, 0);
return;
}
if (outval && outval[0]) {
@@ -207,8 +207,8 @@ void filter_compute_hash(struct slapi_filter *f)
STIR(h);
break;
default:
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "$$$ can't handle filter type %d !\n",
- f->f_choice, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "filter_compute_hash - Can't handle filter type %d !\n",
+ f->f_choice, 0, 0);
}
f->f_hash = h;
@@ -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, LOG_DEBUG, "=> filter compare\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> slapi_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, LOG_ERR, "ERR can't handle filter %d\n", f1->f_choice,
+ LDAPDebug(LDAP_DEBUG_ERR, "slapi_filter_compare - Can't handle filter %d\n", f1->f_choice,
0, 0);
ret = 1;
}
done:
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= filter compare: %d\n", ret, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= slapi_filter_compare: %d\n", ret, 0, 0);
return ret;
}
diff --git a/ldap/servers/slapd/filterentry.c b/ldap/servers/slapd/filterentry.c
index 657b4a8..922c75b 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, LOG_DEBUG, "=> slapi_filter_test_ext\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> slapi_filter_test_ext_internal\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, LOG_DEBUG, " EQUALITY\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_DEBUG, " SUBSTRINGS\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_DEBUG, " GE\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_DEBUG, " LE\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_DEBUG, " PRESENT\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_DEBUG, " APPROX\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_DEBUG, " EXTENDED\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_DEBUG, " AND\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_DEBUG, " OR\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_DEBUG, " NOT\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_ERR, " unknown filter type 0x%lX\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "slapi_filter_test_ext_internal - unknown filter type 0x%lX\n",
f->f_choice, 0, 0 );
rc = -1;
}
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= slapi_filter_test %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "<= slapi_filter_test_ext_internal %d\n", rc, 0, 0 );
return( rc );
}
@@ -275,7 +275,7 @@ int test_ava_filter(
{
int rc;
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> test_ava_filter\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> 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, LOG_DEBUG, "<= test_ava_filter %d\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, "<= test_ava_filter %d\n",
rc, 0, 0 );
return( rc );
}
@@ -331,7 +331,7 @@ int test_ava_filter(
}
}
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= test_ava_filter %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "<= test_ava_filter %d\n", rc, 0, 0 );
return( rc );
}
@@ -462,7 +462,7 @@ test_extensible_filter(
*/
int rc;
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> test_extensible_filter\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> test_extensible_filter\n", 0, 0, 0 );
*access_check_done = 0;
@@ -580,7 +580,7 @@ test_extensible_filter(
}
}
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= test_extensible_filter %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "<= 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, LOG_DEBUG, "=> test_filter_list\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> 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, LOG_DEBUG, "<= test_filter_list %d\n", nomatch, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "<= 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, LOG_DEBUG, "=> test_substring_filter\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> test_substring_filter\n", 0, 0, 0 );
*access_check_done = 0;
@@ -737,7 +737,7 @@ int test_substring_filter(
}
}
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= test_substring_filter %d\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, "<= 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, LOG_DEBUG, "=> slapi_vattr_filter_test_ext\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> slapi_vattr_filter_test_ext_internal\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, LOG_DEBUG, "=> test_substring_filter\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> test_substring_filter\n", 0, 0, 0 );
switch ( f->f_choice ) {
case LDAP_FILTER_EQUALITY:
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, " EQUALITY\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_DEBUG, " SUBSTRINGS\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_DEBUG, " GE\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_DEBUG, " LE\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_DEBUG, " PRESENT\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_DEBUG, " APPROX\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_DEBUG, " EXTENDED\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_DEBUG, " AND\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_DEBUG, " OR\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_DEBUG, " NOT\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, " 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, LOG_ERR, " unknown filter type 0x%lX\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "slapi_vattr_filter_test_ext_internal - Unknown filter type 0x%lX\n",
f->f_choice, 0, 0 );
rc = -1;
}
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "<= slapi_vattr_filter_test %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "<= slapi_vattr_filter_test_ext_internal %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, LOG_DEBUG, "=> vattr_test_filter_list_and\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> 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, LOG_DEBUG, "<= test_filter_list_and %d\n", nomatch, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "<= 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, LOG_DEBUG, "=> vattr_test_filter_list_or\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> 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, LOG_DEBUG, "<= test_filter_list_or %d\n", nomatch, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "<= test_filter_list_or %d\n", nomatch, 0, 0 );
if (nomatch == 1) return undefined;
return( nomatch );
diff --git a/ldap/servers/slapd/house.c b/ldap/servers/slapd/house.c
index 564011e..be3b35b 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, LOG_ERR, NULL,
+ slapi_log_error(SLAPI_LOG_ERR, "housekeeping_start",
"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, LOG_ERR, NULL,
+ slapi_log_error(SLAPI_LOG_ERR, "housekeeping_start",
"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, LOG_ERR, NULL,
+ slapi_log_error(SLAPI_LOG_ERR, "housekeeping_start",
"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 ff6e180..84551de 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, LOG_ERR, subsystem, "before: %s\n",
+ slapi_log_error(SLAPI_LOG_DEBUG, 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, LOG_ERR, subsystem, " after: %s\n",
+ slapi_log_error(SLAPI_LOG_DEBUG, subsystem, " after: %s\n",
slapi_filter_to_string(f, logbuf, sizeof(logbuf)));
}
diff --git a/ldap/servers/slapd/init.c b/ldap/servers/slapd/init.c
index 5ccdea8..42f9e42 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, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_CRIT,
"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, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_CRIT,
"init: PR_NewLock failed\n", 0, 0, 0 );
exit(-1);
}
diff --git a/ldap/servers/slapd/ldaputil.c b/ldap/servers/slapd/ldaputil.c
index efa64f6..ae83e8f 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, LOG_ERR, "internal_ol_init_init", "PR_NewLock failed %d:%s\n",
+ slapi_log_error(SLAPI_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, LOG_ERR, "convert_to_openldap_uri",
+ slapi_log_error(SLAPI_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, LOG_ERR, "convert_to_openldap_uri",
+ slapi_log_error(SLAPI_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, LOG_ERR, "setup_ol_tls_conn",
+ slapi_log_error(SLAPI_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, LOG_ERR, "setup_ol_tls_conn",
+ slapi_log_error(SLAPI_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, LOG_ERR, "setup_ol_tls_conn",
+ slapi_log_error(SLAPI_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, LOG_ERR, "setup_ol_tls_conn",
+ slapi_log_error(SLAPI_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, LOG_ERR, "setup_ol_tls_conn",
+ slapi_log_error(SLAPI_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, LOG_ERR, "setup_ol_tls_conn",
+ slapi_log_error(SLAPI_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, LOG_ERR, "setup_ol_tls_conn",
+ slapi_log_error(SLAPI_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, LOG_DEBUG, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_LOG_SHELL, "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, LOG_DEBUG, "slapi_ldap_init_ext", "putenv(%s)\n", util_sasl_path);
+ slapi_log_error(SLAPI_LOG_SHELL, "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, LOG_ERR, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_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, LOG_ERR, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_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, LOG_ERR, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_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, LOG_ERR, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_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, LOG_ERR, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_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, LOG_ERR, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_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, LOG_ERR, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_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, LOG_ERR, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_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, LOG_ERR, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_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, LOG_ERR, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_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, LOG_DEBUG, "slapi_ldap_init_ext",
+ slapi_log_error(SLAPI_LOG_SHELL, "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, LOG_ERR, "slapi_ldap_bind",
+ slapi_log_error(SLAPI_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, LOG_DEBUG, "slapi_ldap_bind",
+ slapi_log_error(SLAPI_LOG_SHELL, "slapi_ldap_bind",
"Set up conn to use client auth\n");
}
bvcreds.bv_val = NULL; /* ignore username and passed in creds */
@@ -1109,13 +1109,22 @@ 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, 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));
+ if (errno != 0){
+ /* Log the system errno */
+ slapi_log_error(SLAPI_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));
+ } else {
+ /* Only LDAP error, no system error */
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_ldap_bind",
+ "Error: could not send startTLS request: "
+ "error %d (%s)\n", rc, ldap_err2string(rc));
+ }
goto done;
}
- slapi_log_error(SLAPI_LOG_SHELL, LOG_DEBUG, "slapi_ldap_bind",
+ slapi_log_error(SLAPI_LOG_SHELL, "slapi_ldap_bind",
"startTLS started on connection\n");
}
@@ -1125,7 +1134,7 @@ slapi_ldap_bind(
!strcmp(mech, LDAP_SASL_EXTERNAL)) {
int mymsgid = 0;
- slapi_log_error(SLAPI_LOG_SHELL, LOG_DEBUG, "slapi_ldap_bind",
+ slapi_log_error(SLAPI_LOG_SHELL, "slapi_ldap_bind",
"attempting %s bind with id [%s] creds [%s]\n",
mech ? mech : "SIMPLE",
bindid, creds);
@@ -1154,8 +1163,8 @@ slapi_ldap_bind(
}
}
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapi_ldap_bind",
- "Error: could not send bind request for id "
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_ldap_bind",
+ "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",
bindid ? bindid : "(anon)",
@@ -1188,16 +1197,27 @@ 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, 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)",
- mech ? mech : "SIMPLE",
- rc, ldap_err2string(rc), errno, slapd_system_strerror(errno));
+ if (errno != 0){
+ /* Log the system errno and message */
+ slapi_log_error(SLAPI_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)",
+ mech ? mech : "SIMPLE",
+ rc, ldap_err2string(rc), errno, slapd_system_strerror(errno));
+ } else {
+ /* Only LDAP error, no system error */
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_ldap_bind",
+ "Error reading bind response for id "
+ "[%s] authentication mechanism [%s]: error %d (%s)\n",
+ bindid ? bindid : "(anon)",
+ mech ? mech : "SIMPLE",
+ rc, ldap_err2string(rc));
+ }
goto done;
} else if (rc == 0) { /* timeout */
rc = LDAP_TIMEOUT;
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapi_ldap_bind",
+ slapi_log_error(SLAPI_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,33 +1231,60 @@ slapi_ldap_bind(
*/
if ((rc = ldap_parse_result(ld, result, &err, NULL, NULL,
NULL, returnedctrls, 0)) != LDAP_SUCCESS) {
- 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));
+ if (errno != 0){
+ /* Log the system errno and message */
+ slapi_log_error(SLAPI_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));
+ } else {
+ /* Only LDAP error, no system error */
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_ldap_bind",
+ "Error: could not parse bind result: error %d (%s)\n",
+ rc, ldap_err2string(rc));
+ }
goto done;
}
/* check the result code from the bind operation */
if(err){
- rc = err;
- 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)",
- mech ? mech : "SIMPLE",
- rc, ldap_err2string(rc), errno, slapd_system_strerror(errno));
+ rc = err;
+ if (errno != 0){
+ /* Log the system errno and message */
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_ldap_bind",
+ "Error: could not bind id "
+ "[%s] authentication mechanism [%s]: error %d (%s) errno %d (%s)\n",
+ bindid ? bindid : "(anon)", mech ? mech : "SIMPLE",
+ rc, ldap_err2string(rc), errno, slapd_system_strerror(errno));
+ } else {
+ /* Only LDAP error, no system error */
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_ldap_bind",
+ "Error: could not bind id "
+ "[%s] authentication mechanism [%s]: error %d (%s)\n",
+ bindid ? bindid : "(anon)",
+ mech ? mech : "SIMPLE",
+ rc, ldap_err2string(rc));
+ }
goto done;
}
/* 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, 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)",
- mech ? mech : "SIMPLE",
- rc, ldap_err2string(rc), errno, slapd_system_strerror(errno));
+ if (errno != 0){
+ slapi_log_error(SLAPI_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)",
+ mech ? mech : "SIMPLE",
+ rc, ldap_err2string(rc), errno, slapd_system_strerror(errno));
+ } else {
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_ldap_bind",
+ "Error: could not read bind results for id "
+ "[%s] authentication mechanism [%s]: error %d (%s)\n",
+ bindid ? bindid : "(anon)",
+ mech ? mech : "SIMPLE",
+ rc, ldap_err2string(rc));
+ }
goto done;
}
}
@@ -1255,7 +1302,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, LOG_DEBUG, "slapi_ldap_bind",
+ slapi_log_error(SLAPI_LOG_CONNS, "slapi_ldap_bind",
"Error: could not perform interactive bind for id "
"[%s] authentication mechanism [%s]: error %d (%s)\n",
bindid ? bindid : "(anon)",
@@ -1355,8 +1402,8 @@ 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, LOG_ERR, "bind",
- "unable to add authentication response control" );
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_add_auth_response_control",
+ "Unable to add authentication response control" );
}
if ( NULL != dnbuf_dynamic ) {
@@ -1478,25 +1525,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, LOG_DEBUG, "ldap_sasl_get_val",
+ slapi_log_error(authtracelevel, "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, LOG_DEBUG, "ldap_sasl_get_val",
+ slapi_log_error(authtracelevel, "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, LOG_DEBUG, "ldap_sasl_get_val",
+ slapi_log_error(authtracelevel, "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, LOG_DEBUG, "ldap_sasl_get_val",
+ slapi_log_error(authtracelevel, "ldap_sasl_get_val",
"Using value [%s] for SASL_CB_GETREALM\n",
defvalue ? defvalue : "(null)");
break;
@@ -1582,7 +1629,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, LOG_DEBUG, "slapd_ldap_sasl_interactive_bind",
+ slapi_log_error(SLAPI_LOG_CONNS, "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 +1670,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, LOG_ERR, logname,
+ slapi_log_error(SLAPI_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, LOG_ERR, logname,
+ slapi_log_error(SLAPI_LOG_ERR, logname,
"Could not get server name from credential: %d (%s)\n",
rc, error_message(rc));
goto cleanup;
@@ -1644,7 +1691,7 @@ show_one_credential(int authtracelevel,
krb5_timestamp_to_sfstring((krb5_timestamp)cred->times.renew_till,
renewts, sizeof(renewts), NULL);
- slapi_log_error(authtracelevel, LOG_DEBUG, logname,
+ slapi_log_error(authtracelevel, 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 +1719,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, LOG_ERR, logname,
+ slapi_log_error(SLAPI_LOG_ERR, logname,
"Could not get principal name from principal: %d (%s)\n",
rc, error_message(rc));
goto cleanup;
}
- slapi_log_error(authtracelevel, LOG_DEBUG, logname,
+ slapi_log_error(authtracelevel, 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, LOG_ERR, logname,
+ slapi_log_error(SLAPI_LOG_ERR, logname,
"Could not get cursor to iterate cached credentials: "
"%d (%s)\n", rc, error_message(rc));
goto cleanup;
@@ -1696,7 +1743,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, LOG_ERR, logname,
+ slapi_log_error(SLAPI_LOG_ERR, logname,
"Could not close cached credentials cursor: "
"%d (%s)\n", rc, error_message(rc));
goto cleanup;
@@ -1758,7 +1805,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, LOG_ERR, logname,
+ slapi_log_error(SLAPI_LOG_ERR, logname,
"Could parse principal [%s]: %d (%s)\n",
tgs_princ_name, *rc, error_message(*rc));
goto cleanup;
@@ -1775,14 +1822,14 @@ credentials_are_valid(
/* have the creds - now look at the timestamp */
if ((*rc = krb5_timeofday(ctx, ¤ttime))) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
+ slapi_log_error(SLAPI_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, LOG_DEBUG, logname,
+ slapi_log_error(authtracelevel, logname,
"Credentials for [%s] have expired or will soon "
"expire - now [%d] endtime [%d]\n", princ_name,
currenttime, creds.times.endtime);
@@ -1809,7 +1856,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, LOG_ERR, NULL, "internal_krb5_init PR_NewLock failed %d:%s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "internal_krb5_init", "PR_NewLock failed %d:%s\n",
errorCode, slapd_pr_strerror(errorCode));
return PR_FAILURE;
}
@@ -1864,7 +1911,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, LOG_ERR, logname,
+ slapi_log_error(SLAPI_LOG_ERR, logname,
"Could not perform internal krb5 init\n");
rc = -1;
goto cleanup;
@@ -1874,7 +1921,7 @@ set_krb5_creds(
/* initialize the kerberos context */
if ((rc = krb5_init_context(&ctx))) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
+ slapi_log_error(SLAPI_LOG_ERR, logname,
"Could not init Kerberos context: %d (%s)\n",
rc, error_message(rc));
goto cleanup;
@@ -1884,7 +1931,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, LOG_ERR, logname,
+ slapi_log_error(SLAPI_LOG_ERR, logname,
"Could not get default Kerberos ccache: %d (%s)\n",
rc, error_message(rc));
goto cleanup;
@@ -1898,7 +1945,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, LOG_DEBUG, logname,
+ slapi_log_error(authtracelevel, 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 +1954,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, LOG_ERR, logname,
+ slapi_log_error(SLAPI_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, LOG_ERR, logname,
+ slapi_log_error(SLAPI_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, LOG_DEBUG, logname,
+ slapi_log_error(authtracelevel, logname,
"Using principal [%s] from ccache [%s]\n",
princ_name, cc_name);
}
@@ -1936,7 +1983,7 @@ set_krb5_creds(
NOTE: cc types are case sensitive and always upper case */
if (cc && strcmp(cc_type, krb5_cc_get_type(ctx, cc))) {
static int errmsgcounter = 0;
- int loglevel = SLAPI_LOG_FATAL;
+ int loglevel = SLAPI_LOG_ERR;
if (errmsgcounter) {
loglevel = authtracelevel;
}
@@ -1945,7 +1992,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, loglevel==SLAPI_LOG_FATAL?LOG_ERR:LOG_DEBUG, logname,
+ slapi_log_error(loglevel, logname,
"The server will use the external SASL/GSSAPI "
"credentials cache [%s:%s]. If you want the "
"server to automatically authenticate with its "
@@ -1964,8 +2011,8 @@ set_krb5_creds(
*/
if (!princ && looks_like_a_princ_name(username) &&
(rc = krb5_parse_name(ctx, username, &princ))) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
- "Error: could not convert [%s] into a kerberos "
+ slapi_log_error(SLAPI_LOG_ERR, logname,
+ "Could not convert [%s] into a kerberos "
"principal: %d (%s)\n", username,
rc, error_message(rc));
goto cleanup;
@@ -1973,8 +2020,8 @@ set_krb5_creds(
if (getenv("HACK_PRINCIPAL_NAME") &&
(rc = krb5_parse_name(ctx, getenv("HACK_PRINCIPAL_NAME"), &princ))) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
- "Error: could not convert [%s] into a kerberos "
+ slapi_log_error(SLAPI_LOG_ERR, logname,
+ "Could not convert [%s] into a kerberos "
"principal: %d (%s)\n", getenv("HACK_PRINCIPAL_NAME"),
rc, error_message(rc));
goto cleanup;
@@ -1985,8 +2032,8 @@ 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, LOG_ERR, logname,
- "Error: could not construct ldap service "
+ slapi_log_error(SLAPI_LOG_ERR, logname,
+ "Could not construct ldap service "
"principal from hostname [%s]: %d (%s)\n",
hostname ? hostname : "NULL", rc, error_message(rc));
}
@@ -1998,26 +2045,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, LOG_ERR, logname,
+ slapi_log_error(SLAPI_LOG_ERR, logname,
"Unable to get name of principal: "
"%d (%s)\n", rc, error_message(rc));
goto cleanup;
}
- slapi_log_error(authtracelevel, LOG_DEBUG, logname,
+ slapi_log_error(authtracelevel, 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, LOG_DEBUG, logname,
+ slapi_log_error(authtracelevel, 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, LOG_ERR, logname,
+ slapi_log_error(SLAPI_LOG_ERR, logname,
"Unable to verify cached credentials for "
"principal [%s]: %d (%s)\n", princ_name,
rc, error_message(rc));
@@ -2026,7 +2073,7 @@ set_krb5_creds(
/* find our default keytab */
if ((rc = krb5_kt_default(ctx, &kt))) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, logname,
+ slapi_log_error(SLAPI_LOG_ERR, logname,
"Unable to get default keytab: %d (%s)\n",
rc, error_message(rc));
goto cleanup;
@@ -2034,13 +2081,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, LOG_ERR, logname,
+ slapi_log_error(SLAPI_LOG_ERR, logname,
"Unable to get name of default keytab: %d (%s)\n",
rc, error_message(rc));
goto cleanup;
}
- slapi_log_error(authtracelevel, LOG_DEBUG, logname,
+ slapi_log_error(authtracelevel, logname,
"Using keytab named [%s]\n", ktname);
/* now do the actual kerberos authentication using
@@ -2048,7 +2095,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, LOG_ERR, logname,
+ slapi_log_error(SLAPI_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 +2115,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, LOG_ERR, logname,
+ slapi_log_error(SLAPI_LOG_ERR, logname,
"Could not create new unique memory ccache: "
"%d (%s)\n",
rc, error_message(rc));
@@ -2081,18 +2128,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, LOG_ERR, logname,
+ slapi_log_error(SLAPI_LOG_ERR, logname,
"Could create Kerberos memory ccache: "
"out of memory\n");
rc = 1;
goto cleanup;
}
#endif
- slapi_log_error(authtracelevel, LOG_DEBUG, logname,
+ slapi_log_error(authtracelevel, logname,
"Generated new memory ccache [%s]\n", cc_name);
new_ccache = 1; /* need to set this in env. */
} else {
- slapi_log_error(authtracelevel, LOG_DEBUG, logname,
+ slapi_log_error(authtracelevel, logname,
"Using existing ccache [%s]\n", cc_name);
}
@@ -2104,7 +2151,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, LOG_ERR, logname,
+ slapi_log_error(SLAPI_LOG_ERR, logname,
"Could not create ccache [%s]: %d (%s)\n",
cc_name, rc, error_message(rc));
goto cleanup;
@@ -2112,7 +2159,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, LOG_ERR, logname,
+ slapi_log_error(SLAPI_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 +2168,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, LOG_ERR, logname,
+ slapi_log_error(SLAPI_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 +2187,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, LOG_DEBUG, logname,
+ slapi_log_error(authtracelevel, logname,
"Set new env for ccache: [%s]\n",
cc_env_name);
}
@@ -2182,22 +2229,22 @@ clear_krb5_ccache(void)
/* initialize the kerberos context */
if ((rc = krb5_init_context(&ctx))) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "clear_krb5_ccache", "Could not initialize kerberos context: %d (%s)\n",
+ slapi_log_error(SLAPI_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, LOG_ERR, "clear_krb5_ccache", "Could not get default kerberos ccache: %d (%s)\n",
+ slapi_log_error(SLAPI_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, LOG_ERR, "clear_krb5_ccache", "Could not destroy kerberos ccache: %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, "clear_krb5_ccache", "Could not destroy kerberos ccache: %d (%s)\n",
rc, error_message(rc));
} else {
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG,"clear_krb5_ccache", "Successfully cleared kerberos ccache\n");
+ slapi_log_error(SLAPI_LOG_TRACE,"clear_krb5_ccache", "Successfully cleared kerberos ccache\n");
}
done:
diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c
index 5915fbb..d063540 100644
--- a/ldap/servers/slapd/libglobs.c
+++ b/ldap/servers/slapd/libglobs.c
@@ -52,7 +52,7 @@
#define REMOVE_CHANGELOG_CMD "remove"
-int slapd_ldap_debug = LDAP_DEBUG_ANY;
+int slapd_ldap_debug = SLAPD_DEFAULT_ERRORLOG_LEVEL;
char *ldap_srvtab = "";
/* Note that the 'attrname' arguments are used only for log messages */
@@ -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, LOG_ERR, "FrontendConfig_init: "
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "FrontendConfig_init: "
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "Information: Non-Secure Port Disabled\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_NOTICE, "config_set_port - Information: Non-Secure Port Disabled\n", 0, 0, 0 );
}
if ( apply ) {
@@ -4470,7 +4470,7 @@ config_set_errorlog_level( const char *attrname, char *value, char *errorbuf, in
if ( apply ) {
CFG_LOCK_WRITE(slapdFrontendConfig);
- level |= LDAP_DEBUG_ANY;
+ level |= SLAPD_DEFAULT_ERRORLOG_LEVEL; /* Always apply the new default error levels for now */
slapd_ldap_debug = level;
slapdFrontendConfig->errorloglevel = level;
CFG_UNLOCK_WRITE(slapdFrontendConfig);
@@ -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, LOG_ERR, "config",
+ slapi_log_error(SLAPI_LOG_ERR, "config_set_allowed_to_delete_attrs",
"%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, LOG_ERR, "config",
+ slapi_log_error(SLAPI_LOG_ERR, "config_set_allowed_to_delete_attrs",
"%s: Given attributes are all invalid. No effects.\n",
CONFIG_ALLOWED_TO_DELETE_ATTRIBUTE);
slapi_ch_array_free(allowed);
@@ -7181,9 +7181,10 @@ config_set_allowed_sasl_mechs(const char *attrname, char *value, char *errorbuf,
remove_commas(value);
if(invalid_sasl_mech(value)){
- 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);
+ LDAPDebug(LDAP_DEBUG_ERR,"config_set_allowed_sasl_mechs - "
+ "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;
}
@@ -7578,7 +7579,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, LOG_ERR, "config_set", "Unknown attribute %s will be ignored", attr);
+ slapi_log_error(SLAPI_LOG_ERR, "config_set", "Unknown attribute %s will be ignored", attr);
return LDAP_NO_SUCH_ATTRIBUTE;
}
@@ -7613,8 +7614,8 @@ 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, LOG_ERR,
- "config_set: the attribute %s is read only; "
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "config_set - The attribute %s is read only; "
"ignoring setting NULL value\n", attr);
}
}
@@ -7628,8 +7629,8 @@ 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, LOG_ERR,
- "config_set: the attribute %s is read only; ignoring new value %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "config_set - The attribute %s is read only; ignoring new value %s\n",
attr, values[ii]->bv_val, 0);
}
values[ii]->bv_len = strlen((char *)values[ii]->bv_val);
@@ -7954,7 +7955,7 @@ config_set_accesslog_enabled(int value)
}
CFG_ONOFF_UNLOCK_WRITE(slapdFrontendConfig);
if (errorbuf[0] != '\0') {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "config", "config_set_accesslog_enabled: %s\n", errorbuf);
+ slapi_log_error(SLAPI_LOG_ERR, "config_set_accesslog_enabled", "%s\n", errorbuf);
}
}
@@ -7973,7 +7974,7 @@ config_set_auditlog_enabled(int value){
}
CFG_ONOFF_UNLOCK_WRITE(slapdFrontendConfig);
if (errorbuf[0] != '\0') {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "config", "config_set_auditlog_enabled: %s\n", errorbuf);
+ slapi_log_error(SLAPI_LOG_ERR, "config_set_auditlog_enabled", "%s\n", errorbuf);
}
}
@@ -7992,7 +7993,7 @@ config_set_auditfaillog_enabled(int value){
}
CFG_ONOFF_UNLOCK_WRITE(slapdFrontendConfig);
if (errorbuf[0] != '\0') {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "config", "config_set_auditfaillog_enabled: %s\n", errorbuf);
+ slapi_log_error(SLAPI_LOG_ERR, "config_set_auditlog_enabled", "%s\n", errorbuf);
}
}
@@ -8083,7 +8084,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, LOG_ERR, "config",
+ slapi_log_error(SLAPI_LOG_ERR, "config_set_malloc_mxfast",
"%s: Invalid value %d will be ignored\n",
CONFIG_MALLOC_MXFAST, mxfast);
}
@@ -8125,7 +8126,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, LOG_ERR, "config",
+ slapi_log_error(SLAPI_LOG_ERR, "config_set_malloc_trim_threshold",
"%s: Invalid value %d will be ignored\n",
CONFIG_MALLOC_TRIM_THRESHOLD, trim_threshold);
}
@@ -8174,7 +8175,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, LOG_ERR, "config",
+ slapi_log_error(SLAPI_LOG_ERR, "config_set_malloc_mmap_threshold",
"%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 c19bf5a..8903f53 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, LOG_ERR, "gethostname() failed, error %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "find_localhost_DNS - 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, LOG_ERR,
- "gethostbyname(\"%s\") failed, error %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "find_localhost_DNS - gethostbyname(\"%s\") failed, error %d (%s)\n",
hostname, oserr, slapd_system_strerror( oserr ));
return NULL;
}
if (hp->h_name == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "gethostbyname(\"%s\")->h_name == NULL\n", hostname, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "find_localhost_DNS - gethostbyname(\"%s\")->h_name == NULL\n", hostname, 0, 0);
return NULL;
}
if (strchr (hp->h_name, '.') != NULL) {
- LDAPDebug(LDAP_DEBUG_CONFIG, LOG_DEBUG, "h_name == %s\n", hp->h_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_CONFIG, "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, LOG_DEBUG, "h_alias == %s\n", *alias, 0, 0);
+ LDAPDebug(LDAP_DEBUG_CONFIG, "find_localhost_DNS - 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, LOG_DEBUG, "%s: %s\n", _PATH_RESCONF, line, 0);
+ LDAPDebug(LDAP_DEBUG_CONFIG, "find_localhost_DNS - %s: %s\n", _PATH_RESCONF, line, 0);
for (cp = &line[7]; *cp && isspace(*cp); ++cp);
if (*cp) {
domain = cp;
@@ -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, LOG_ERR, "localhost_DNS", "getdomainname failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, "find_localhost_DNS", "getdomainname failed\n");
} else {
- slapi_log_error(SLAPI_LOG_CONFIG, LOG_DEBUG, "localhost_DNS", "getdomainname(%s)\n", line);
+ slapi_log_error(SLAPI_LOG_CONFIG, "find_localhost_DNS", "getdomainname(%s)\n", line);
}
if (line[0] != '\0') {
domain = &line[0];
@@ -138,7 +138,7 @@ find_localhost_DNS(void)
PL_strcatn (hostname, sizeof(hostname), ".");
PL_strcatn (hostname, sizeof(hostname), domain);
}
- LDAPDebug(LDAP_DEBUG_CONFIG, LOG_DEBUG, "hostname == %s\n", hostname, 0, 0);
+ LDAPDebug(LDAP_DEBUG_CONFIG, "find_localhost_DNS - 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, LOG_DEBUG, "DNS %s -> DN %s\n", localhost_DNS, localhost_DN, 0);
+ LDAPDebug(LDAP_DEBUG_CONFIG, "set_localhost_DN - 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, LOG_DEBUG, "get_locahost_DN() returned \"\"\n",
+ LDAPDebug(LDAP_DEBUG_CONFIG, "get_config_DN - 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 b74c420..925a2a5 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, LOG_ERR, "could not open \"%s\"\n", buf, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "lock_fopen - 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, LOG_ERR, "could not open \"%s\"\n", fname, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "lock_fopen - 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 b478e98..564d7c7 100644
--- a/ldap/servers/slapd/log.c
+++ b/ldap/servers/slapd/log.c
@@ -65,13 +65,23 @@ static int slapi_log_map[] = {
LDAP_DEBUG_TIMING, /* SLAPI_LOG_TIMING */
LDAP_DEBUG_BACKLDBM, /* SLAPI_LOG_BACKLDBM */
LDAP_DEBUG_ACLSUMMARY, /* SLAPI_LOG_ACLSUMMARY */
- LDAP_DEBUG_NUNCSTANS /* SLAPI_LOG_NUNCSTANS */
+ LDAP_DEBUG_NUNCSTANS, /* SLAPI_LOG_NUNCSTANS */
+ LDAP_DEBUG_EMERG, /* SLAPI_LOG_EMERG */
+ LDAP_DEBUG_ALERT, /* SLAPI_LOG_ALERT */
+ LDAP_DEBUG_CRIT, /* SLAPI_LOG_CRIT */
+ LDAP_DEBUG_ERR, /* SLAPI_LOG_ERR */
+ LDAP_DEBUG_WARNING, /* SLAPI_LOG_WARNING */
+ LDAP_DEBUG_NOTICE, /* SLAPI_LOG_NOTICE */
+ LDAP_DEBUG_INFO, /* SLAPI_LOG_INFO */
+ LDAP_DEBUG_DEBUG /* SLAPI_LOG_DEBUG */
+
};
-#define SLAPI_LOG_MIN SLAPI_LOG_FATAL /* from slapi-plugin.h */
-#define SLAPI_LOG_MAX SLAPI_LOG_NUNCSTANS /* from slapi-plugin.h */
-#define TBUFSIZE 50 /* size for time buffers */
-#define SLAPI_LOG_BUFSIZ 2048 /* size for data buffers */
+#define SLAPI_LOG_MIN SLAPI_LOG_FATAL /* from slapi-plugin.h */
+#define SLAPI_LOG_MAX SLAPI_LOG_DEBUG /* from slapi-plugin.h */
+#define TBUFSIZE 50 /* size for time buffers */
+#define SLAPI_LOG_BUFSIZ 2048 /* size for data buffers */
+
/**************************************************************************
* PROTOTYPES
*************************************************************************/
@@ -104,11 +114,48 @@ static void log_flush_buffer(LogBufferInfo *lbi, int type, int sync_now);
static void log_write_title(LOGFD fp);
static void log__error_emergency(const char *errstr, int reopen, int locked);
static void vslapd_log_emergency_error(LOGFD fp, const char *msg, int locked);
+static int get_syslog_loglevel(int loglevel);
+
+static int
+get_syslog_loglevel(int loglevel)
+{
+ int default_level = LOG_DEBUG;
+
+ if (loglevel == SLAPI_LOG_EMERG || loglevel == LDAP_DEBUG_EMERG) {
+ return LOG_EMERG;
+ }
+ if (loglevel == SLAPI_LOG_ALERT || loglevel == LDAP_DEBUG_ALERT) {
+ return LOG_ALERT;
+ }
+ if (loglevel == SLAPI_LOG_CRIT || loglevel == LDAP_DEBUG_CRIT) {
+ return LOG_CRIT;
+ }
+ if (loglevel == SLAPI_LOG_ERR ||
+ loglevel == SLAPI_LOG_FATAL ||
+ loglevel == LDAP_DEBUG_ANY)
+ {
+ return LOG_ERR;
+ }
+ if (loglevel == SLAPI_LOG_WARNING || loglevel == LDAP_DEBUG_WARNING) {
+ return LOG_WARNING;
+ }
+ if (loglevel == SLAPI_LOG_NOTICE || loglevel == LDAP_DEBUG_NOTICE) {
+ return LOG_NOTICE;
+ }
+ if (loglevel == SLAPI_LOG_INFO || loglevel == LDAP_DEBUG_INFO) {
+ return LOG_INFO;
+ }
+ if (loglevel == SLAPI_LOG_DEBUG || loglevel == LDAP_DEBUG_DEBUG) {
+ return LOG_DEBUG;
+ }
+
+ return default_level;
+}
static int
slapd_log_error_proc_internal(
+ int loglevel,
char *subsystem, /* omitted if NULL */
- int sev_level,
char *fmt,
va_list ap_err,
va_list ap_file);
@@ -477,7 +524,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, LOG_ERR, "WARNING: can't open file %s. "
+ LDAPDebug(LDAP_DEBUG_WARNING, "log_update_accesslogdir - Can't open file %s. "
"errno %d (%s)\n",
pathname, errno, slapd_system_strerror(errno));
/* stay with the current log file */
@@ -498,7 +545,7 @@ log_update_accesslogdir(char *pathname, int apply)
if (loginfo.log_access_fdes) {
LogFileInfo *logp, *d_logp;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"LOGINFO:Closing the access log file. "
"Moving to a new access log file (%s)\n", pathname,0,0);
@@ -632,7 +679,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, LOG_ERR, "WARNING: can't open file %s. "
+ LDAPDebug(LDAP_DEBUG_WARNING, "log_update_auditlogdir - Can't open file %s. "
"errno %d (%s)\n",
pathname, errno, slapd_system_strerror(errno));
/* stay with the current log file */
@@ -652,7 +699,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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"LOGINFO:Closing the audit log file. "
"Moving to a new audit file (%s)\n", pathname,0,0);
@@ -710,7 +757,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, LOG_ERR, "WARNING: can't open file %s. "
+ LDAPDebug(LDAP_DEBUG_WARNING, "log_update_auditfaillogdir - Can't open file %s. "
"errno %d (%s)\n",
pathname, errno, slapd_system_strerror(errno));
/* stay with the current log file */
@@ -730,7 +777,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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"LOGINFO:Closing the auditfail log file. "
"Moving to a new auditfail file (%s)\n", pathname,0,0);
@@ -883,8 +930,8 @@ log_set_numlogsperdir(const char *attrname, char *numlogs_str, int logtype, char
break;
default:
rv = LDAP_OPERATIONS_ERROR;
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "log_set_numlogsperdir: invalid log type %d", logtype,0,0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "log_set_numlogsperdir - Invalid log type %d", logtype,0,0 );
}
}
return rv;
@@ -979,8 +1026,8 @@ log_set_logsize(const char *attrname, char *logsize_str, int logtype, char *retu
}
/* logsize is in MB */
if (rv == 2) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Invalid value for Maximum log size:"
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "log_set_logsize - Invalid value for Maximum log size:"
"Maxlogsize:%d (MB) exceeds Maxdisksize:%d (MB)\n",
logsize, mdiskspace/LOG_MB_IN_BYTES,0);
@@ -2016,8 +2063,8 @@ 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, LOG_ERR,
- "LOGINFO: Unable to open audit file:%s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapd_log_audit_internal - Unable to open audit file:%s\n",
loginfo.log_audit_file,0,0);
LOG_AUDIT_UNLOCK_WRITE();
return 0;
@@ -2075,8 +2122,8 @@ 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, LOG_ERR,
- "LOGINFO: Unable to open auditfail file:%s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapd_log_auditfail_internal - Unable to open auditfail file:%s\n",
loginfo.log_auditfail_file,0,0);
LOG_AUDITFAIL_UNLOCK_WRITE();
return 0;
@@ -2100,8 +2147,8 @@ slapd_log_auditfail_internal (
******************************************************************************/
int
slapd_log_error_proc(
- char *subsystem, /* omitted if NULL */
int sev_level,
+ char *subsystem, /* omitted if NULL */
char *fmt,
... )
{
@@ -2112,7 +2159,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, sev_level, fmt, ap_err, ap_file );
+ rc = slapd_log_error_proc_internal( sev_level, subsystem, fmt, ap_err, ap_file );
va_end(ap_file);
va_end(ap_err);
}
@@ -2144,8 +2191,8 @@ slapd_log_error_proc(
static int
slapd_log_error_proc_internal(
- char *subsystem, /* omitted if NULL */
int sev_level,
+ char *subsystem, /* omitted if NULL */
char *fmt,
va_list ap_err,
va_list ap_file)
@@ -2244,9 +2291,11 @@ strToUpper(char *str, char *upper)
}
static char*
-get_log_sev_name(int sev_level, char *sev_name)
+get_log_sev_name(int loglevel, char *sev_name)
{
int i;
+ int sev_level = get_syslog_loglevel(loglevel);
+
for (i = 0; prioritynames[i].c_val != -1; i++){
if ( prioritynames[i].c_val == sev_level ){
memset(sev_name, '\0', 10);
@@ -2326,8 +2375,8 @@ vslapd_log_error(
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, get_log_sev_name(sev_level, sev_name), vbuf);
+ PR_snprintf (buffer+blen, sizeof(buffer)-blen, "- %s - %s - %s",
+ get_log_sev_name(sev_level, sev_name), subsystem, vbuf);
}
buffer[sizeof(buffer)-1] = '\0';
@@ -2371,7 +2420,7 @@ vslapd_log_error(
* severity - LOG_ERR, LOG_WARNING, LOG_INFO, etc
*/
int
-slapi_log_error( int loglevel, int severity, char *subsystem, char *fmt, ... )
+slapi_log_error( int loglevel, char *subsystem, char *fmt, ... )
{
va_list ap_err;
va_list ap_file;
@@ -2379,8 +2428,8 @@ 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, severity,
- "slapi_log_error: invalid severity %d (message %s)\n",
+ (void)slapd_log_error_proc(loglevel, subsystem,
+ "slapi_log_error: invalid log level %d (message %s)\n",
loglevel, fmt );
return( -1 );
}
@@ -2389,7 +2438,7 @@ slapi_log_error( int loglevel, int severity, char *subsystem, char *fmt, ... )
if (lbackend & LOGGING_BACKEND_INTERNAL) {
va_start( ap_err, fmt );
va_start( ap_file, fmt );
- rc = slapd_log_error_proc_internal( subsystem, severity, fmt, ap_err, ap_file );
+ rc = slapd_log_error_proc_internal( loglevel, subsystem, fmt, ap_err, ap_file );
va_end(ap_file);
va_end(ap_err);
}
@@ -2400,7 +2449,7 @@ slapi_log_error( int loglevel, 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(severity, fmt, ap_err);
+ vsyslog(get_syslog_loglevel(loglevel), fmt, ap_err);
/* vsyslog(LOG_ERROR, fmt, ap_file); */
/* va_end(ap_file); */
va_end(ap_err);
@@ -2410,7 +2459,7 @@ slapi_log_error( int loglevel, 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(severity, fmt, ap_err);
+ rc = sd_journal_printv(get_syslog_level(loglevel), fmt, ap_err);
/* rc = sd_journal_printv(LOG_ERROR, fmt, ap_file); */
/* va_end(ap_file); */
va_end(ap_err);
@@ -2424,19 +2473,19 @@ slapi_log_error( int loglevel, int severity, char *subsystem, char *fmt, ... )
}
int
-slapi_log_error_ext(int severity, char *subsystem, char *fmt, va_list varg1, va_list varg2)
+slapi_log_error_ext(int loglevel, char *subsystem, char *fmt, va_list varg1, va_list varg2)
{
int rc = 0;
- if ( severity < SLAPI_LOG_MIN || severity > SLAPI_LOG_MAX ) {
- (void)slapd_log_error_proc( subsystem, severity, "slapi_log_error: invalid severity %d (message %s)\n",
- severity, fmt );
+ if ( loglevel < SLAPI_LOG_MIN || loglevel > SLAPI_LOG_MAX ) {
+ (void)slapd_log_error_proc( loglevel, subsystem, "slapi_log_error: invalid severity %d (message %s)\n",
+ loglevel, fmt );
return( -1 );
}
- if ( slapd_ldap_debug & slapi_log_map[ severity ] )
+ if ( slapd_ldap_debug & slapi_log_map[ loglevel ] )
{
- rc = slapd_log_error_proc_internal( subsystem, severity, fmt, varg1, varg2 );
+ rc = slapd_log_error_proc_internal( loglevel, subsystem, fmt, varg1, varg2 );
} else {
rc = 0; /* nothing to be logged --> always return success */
}
@@ -2678,7 +2727,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, LOG_ERR, "access file open %s failed errno %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "log__open_accesslogfile - Access file open %s failed errno %d (%s)\n",
loginfo.log_access_file, oserr, slapd_system_strerror(oserr));
return LOG_UNABLE_TO_OPENFILE;
}
@@ -2695,7 +2744,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, LOG_ERR, "accessinfo file open %s failed errno %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "log__open_accesslogfile - accessinfo file open %s failed errno %d (%s)\n",
loginfo.log_accessinfo_file,
oserr, slapd_system_strerror(oserr));
return LOG_UNABLE_TO_OPENFILE;
@@ -2848,12 +2897,12 @@ log_rotate:
if (logtype!=SLAPD_ERROR_LOG)
{
if (type == LOG_SIZE_EXCEEDED) {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"LOGINFO:End of Log because time exceeded(Max:%d secs) (Is:%ld secs)\n",
rotationtime_secs, curr_time - log_createtime,0);
}
@@ -2896,9 +2945,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, LOG_DEBUG, "LOGINFO", "File %s already removed\n", loginfo.log_access_file);
+ slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already removed\n", loginfo.log_access_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to remove file:%s error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Unable to remove file:%s error %d (%s)\n",
loginfo.log_access_file, prerr, slapd_pr_strerror(prerr));
}
}
@@ -2908,9 +2957,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, LOG_DEBUG, "LOGINFO", "File %s already removed\n", loginfo.log_access_file);
+ slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already removed\n", loginfo.log_access_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to remove file:%s.rotationinfo error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Unable to remove file:%s.rotationinfo error %d (%s)\n",
loginfo.log_access_file, prerr, slapd_pr_strerror(prerr));
}
}
@@ -3016,13 +3065,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, LOG_DEBUG, "LOGINFO", "File %s already removed\n", loginfo.log_access_file);
+ slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already removed\n", loginfo.log_access_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to remove file:%s.%s error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, "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, LOG_DEBUG, "LOGINFO", "Removed file:%s.%s because of (%s)\n", loginfo.log_access_file, tbuf, logstr);
+ slapi_log_error(SLAPI_LOG_TRACE, "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--;
@@ -3052,7 +3101,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, LOG_ERR,"Deleted Rotated Log: %s\n",buffer,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR,"log__delete_rotated_logs - Deleted Rotated Log: %s\n",buffer,0,0);
if (PR_Delete(buffer) != PR_SUCCESS) {
logp = logp->l_next;
@@ -3651,9 +3700,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, LOG_DEBUG, "LOGINFO", "File %s already removed\n", loginfo.log_error_file);
+ slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already removed\n", loginfo.log_error_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to remove file:%s error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Unable to remove file:%s error %d (%s)\n",
loginfo.log_error_file, prerr, slapd_pr_strerror(prerr));
}
}
@@ -3666,9 +3715,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, LOG_DEBUG, "LOGINFO", "File %s already removed\n", loginfo.log_error_file);
+ slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already removed\n", loginfo.log_error_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to remove file:%s.rotationinfo error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Unable to remove file:%s.rotationinfo error %d (%s)\n",
loginfo.log_error_file, prerr, slapd_pr_strerror(prerr));
}
}
@@ -3765,7 +3814,7 @@ delete_logfile:
if (!locked) {
/* if locked, we should not call LDAPDebug,
which tries to get a lock internally. */
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"LOGINFO:Removing file:%s.%s because of (%s)\n",
loginfo.log_error_file, tbuf,
logstr);
@@ -3828,9 +3877,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, LOG_DEBUG, "LOGINFO", "File %s already removed\n", loginfo.log_audit_file);
+ slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already removed\n", loginfo.log_audit_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to remove file:%s error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Unable to remove file:%s error %d (%s)\n",
loginfo.log_audit_file, prerr, slapd_pr_strerror(prerr));
}
}
@@ -3840,9 +3889,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, LOG_DEBUG, "LOGINFO", "File %s already removed\n", loginfo.log_audit_file);
+ slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already removed\n", loginfo.log_audit_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to remove file:%s.rotatoininfo error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Unable to remove file:%s.rotatoininfo error %d (%s)\n",
loginfo.log_audit_file, prerr, slapd_pr_strerror(prerr));
}
}
@@ -3947,13 +3996,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, LOG_DEBUG, "LOGINFO", "File %s already removed\n", loginfo.log_audit_file);
+ slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already removed\n", loginfo.log_audit_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to remove file:%s.%s error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, "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, LOG_DEBUG, "LOGINFO", "Removed file:%s.%s because of (%s)\n", loginfo.log_audit_file, tbuf, logstr);
+ slapi_log_error(SLAPI_LOG_TRACE, "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--;
@@ -3995,9 +4044,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, LOG_DEBUG, "LOGINFO", "File %s already removed\n", loginfo.log_auditfail_file);
+ slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already removed\n", loginfo.log_auditfail_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to remove file:%s error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Unable to remove file:%s error %d (%s)\n",
loginfo.log_auditfail_file, prerr, slapd_pr_strerror(prerr));
}
}
@@ -4007,9 +4056,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, LOG_DEBUG, "LOGINFO", "File %s already removed\n", loginfo.log_auditfail_file);
+ slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already removed\n", loginfo.log_auditfail_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to remove file:%s.rotatoininfo error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "Unable to remove file:%s.rotatoininfo error %d (%s)\n",
loginfo.log_auditfail_file, prerr, slapd_pr_strerror(prerr));
}
}
@@ -4114,13 +4163,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, LOG_DEBUG, "LOGINFO", "File %s already removed\n", loginfo.log_auditfail_file);
+ slapi_log_error(SLAPI_LOG_TRACE, "LOGINFO", "File %s already removed\n", loginfo.log_auditfail_file);
} else {
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "LOGINFO", "Unable to remove file:%s.%s error %d (%s)\n",
+ slapi_log_error(SLAPI_LOG_TRACE, "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, LOG_DEBUG, "LOGINFO", "Removed file:%s.%s because of (%s)\n", loginfo.log_auditfail_file, tbuf, logstr);
+ slapi_log_error(SLAPI_LOG_TRACE, "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--;
@@ -4661,7 +4710,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, LOG_ERR, "WARNING: can't open file %s. "
+ LDAPDebug(LDAP_DEBUG_ERR, "log__open_auditlogfile - can't open file %s. "
"errno %d (%s)\n",
loginfo.log_audit_file, errno, slapd_system_strerror(errno));
if (!locked) LOG_AUDIT_UNLOCK_WRITE();
@@ -4682,7 +4731,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, LOG_ERR, "WARNING: can't open file %s. "
+ LDAPDebug(LDAP_DEBUG_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();
@@ -4787,7 +4836,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, LOG_ERR, "WARNING: can't open file %s. "
+ LDAPDebug(LDAP_DEBUG_ERR, "log__open_auditlogfile - Can't open file %s. "
"errno %d (%s)\n",
loginfo.log_auditfail_file, errno, slapd_system_strerror(errno));
if (!locked) LOG_AUDITFAIL_UNLOCK_WRITE();
@@ -4808,7 +4857,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, LOG_ERR, "WARNING: can't open file %s. "
+ LDAPDebug(LDAP_DEBUG_ERR, "log__open_auditlogfile - Can't open file %s. "
"errno %d (%s)\n",
loginfo.log_auditfailinfo_file, errno, slapd_system_strerror(errno));
if (!locked) LOG_AUDITFAIL_UNLOCK_WRITE();
@@ -4955,8 +5004,8 @@ 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, LOG_ERR,
- "LOGINFO: Unable to open access file:%s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "log_flush_buffer - 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 */
return;
diff --git a/ldap/servers/slapd/log.h b/ldap/servers/slapd/log.h
index ff791e1..948fdb0 100644
--- a/ldap/servers/slapd/log.h
+++ b/ldap/servers/slapd/log.h
@@ -43,6 +43,9 @@
#include "slap.h"
#include "slapi-plugin.h"
+/* Use the syslog level names (prioritynames) */
+#define SYSLOG_NAMES 1
+
#define LOG_MB_IN_BYTES (1024 * 1024)
#define LOG_SUCCESS 0 /* fine & dandy */
diff --git a/ldap/servers/slapd/main.c b/ldap/servers/slapd/main.c
index 00a5a54..b9ec6b7 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, LOG_DEBUG, "Reseting signal mask....\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "Reseting signal mask....\n", 0, 0, 0);
(void)sigemptyset( &proc_mask );
rc = pthread_sigmask( SIG_SETMASK, &proc_mask, NULL );
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, " %s \n",
+ LDAPDebug(LDAP_DEBUG_TRACE, " %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, LOG_ERR, "Caution changing ownership of ./%s \n",name,0,0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "chown_dir_files: file (%s) chown failed (%d) %s.\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "Caution changing ownership of / directory and its contents to %s\n",pw->pw_name,0,0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "chown_dir_files: file (%s) chown failed (%d) %s.\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "getpwnam(%s) == NULL, error %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "setgid(%li) != 0, error %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "setuid(%li) != 0, error %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "setuid(%li) != 0, error %d (%s)\n",
(long)pw->pw_uid, oserr, slapd_system_strerror(oserr));
return -1;
}
@@ -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, LOG_ERR, "startup",
+ slapi_log_error(SLAPI_LOG_EMERG, "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, LOG_ERR, "startup",
+ slapi_log_error(SLAPI_LOG_EMERG, "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);
@@ -757,13 +757,13 @@ 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, LOG_ERR, "Initialization Failed 0 %d\n",return_value,0,0);
+ LDAPDebug(LDAP_DEBUG_EMERG, "Initialization Failed 0 %d\n",return_value,0,0);
exit (1);
}
entry_computed_attr_init();
if (0 == setup_internal_backends(slapdFrontendConfig->configdir)) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "startup",
+ slapi_log_error(SLAPI_LOG_EMERG, "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);
@@ -777,7 +777,7 @@ main( int argc, char **argv)
#ifdef PUMPKIN_HOUR
if ( time( NULL ) > (PUMPKIN_HOUR - 10) ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "Failed to init daemon\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "Failed to change user and group identity to that of %s\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_ALERT,
"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, LOG_ERR, "Unable to access " CONFIG_RUNDIR_ATTRIBUTE ": %s\n",
+ LDAPDebug(LDAP_DEBUG_EMERG, "Unable to access " CONFIG_RUNDIR_ATTRIBUTE ": %s\n",
slapd_system_strerror(errno), 0, 0);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Ensure that user \"%s\" has read and write "
+ LDAPDebug(LDAP_DEBUG_EMERG, "Ensure that user \"%s\" has read and write "
"permissions on %s\n",
slapdFrontendConfig->localuser, rundir, 0);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Shutting down.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_EMERG, "Shutting down.\n", 0, 0, 0);
slapi_ch_free_string(&rundir);
return_value = 1;
goto cleanup;
@@ -987,8 +987,9 @@ 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, LOG_ERR,
+ skip_db_protect_check) == -1 ))
+ {
+ LDAPDebug(LDAP_DEBUG_CRIT,
"Shutting down due to possible conflicts with other slapd processes\n",
0, 0, 0 );
return_value = 1;
@@ -1004,7 +1005,7 @@ main( int argc, char **argv)
if (1) {
char *versionstring = config_get_versionstring();
char *buildnum = config_get_buildnum();
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "%s B%s starting up\n",
+ LDAPDebug(LDAP_DEBUG_INFO, "%s B%s starting up\n",
versionstring, buildnum, 0 );
slapi_ch_free((void **)&buildnum);
slapi_ch_free((void **)&versionstring);
@@ -1032,7 +1033,7 @@ main( int argc, char **argv)
if (mapping_tree_init())
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to init mapping tree\n",
+ LDAPDebug(LDAP_DEBUG_EMERG, "Failed to init mapping tree\n",
0, 0, 0 );
return_value = 1;
goto cleanup;
@@ -1047,7 +1048,7 @@ main( int argc, char **argv)
slapi_sdn_free (&sdn);
if (rc != UID_SUCCESS)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_EMERG,
"Fatal Error---Failed to initialize uniqueid generator; error = %d. "
"Exiting now.\n", rc, 0, 0 );
return_value = 1;
@@ -1057,11 +1058,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, LOG_DEBUG, "Start TLS plugin registered.\n",
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "Start TLS plugin registered.\n",
0, 0, 0 );
}
passwd_modify_register_plugin();
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_PLUGIN,
"Password Modify plugin registered.\n", 0, 0, 0 );
/* Cleanup old tasks that may still be in the DSE from a previous
@@ -1107,7 +1108,7 @@ main( int argc, char **argv)
} else if (i_port) {
} else if ( config_get_security()) {
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_EMERG,
"Fatal Error---No ports specified. "
"Exiting now.\n", 0, 0, 0 );
@@ -1125,7 +1126,7 @@ main( int argc, char **argv)
pw_init();
/* Initialize the sasl mapping code */
if (sasl_map_init()) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to initialize sasl mapping code\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_CRIT, "Failed to initialize sasl mapping code\n", 0, 0, 0 );
}
}
@@ -1148,7 +1149,7 @@ main( int argc, char **argv)
time( &starttime );
slapd_daemon(&ports_info);
}
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "slapd stopped.\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_INFO, "slapd stopped.\n", 0, 0, 0 );
reslimit_cleanup();
compute_terminate();
vattr_cleanup();
@@ -2012,8 +2013,8 @@ slapd_exemode_ldif2db(void)
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
if ( ldif_file == NULL ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: Required argument -i <ldiffile> missing\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldif2db - Required argument -i <ldiffile> missing\n",
0, 0, 0 );
usage( myname, extraname );
return 1;
@@ -2034,8 +2035,8 @@ slapd_exemode_ldif2db(void)
if (lookup_instance_name_by_suffixes(db2ldif_include, db2ldif_exclude,
&instances) < 0) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: backend instances name [-n <name>] or "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldif2db - backend instances name [-n <name>] or "
"included suffix [-s <suffix>] need to be specified.\n",
0, 0, 0);
return 1;
@@ -2046,27 +2047,27 @@ slapd_exemode_ldif2db(void)
;
if (counter == 0) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR 1: There is no backend instance to import to.\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldif2db - There is no backend instance to import to.\n",
0, 0, 0);
return 1;
} else if (counter > 1) {
int i;
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: There are multiple backend instances specified:\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldif2db - There are multiple backend instances specified:\n",
0, 0, 0);
for (i = 0; i < counter; i++)
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, " : %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, " : %s\n",
instances[i], 0, 0);
return 1;
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Backend Instance: %s\n",
+ LDAPDebug(LDAP_DEBUG_INFO, "ldif2db - Backend Instance: %s\n",
*instances, 0, 0);
cmd_line_instance_name = *instances;
}
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR 2: There is no backend instance to import to.\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldif2db: There is no backend instances to import to.\n",
0, 0, 0);
return 1;
}
@@ -2074,8 +2075,8 @@ slapd_exemode_ldif2db(void)
plugin = lookup_plugin_by_instance_name(cmd_line_instance_name);
if (plugin == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: Could not find backend '%s'.\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldif2db - Could not find backend '%s'.\n",
cmd_line_instance_name, 0, 0);
return 1;
}
@@ -2087,14 +2088,14 @@ slapd_exemode_ldif2db(void)
if ( add_new_slapd_process(slapd_exemode, db2ldif_dump_replica,
skip_db_protect_check) == -1 ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Shutting down due to possible conflicts with other slapd processes\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldif2db - 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, LOG_ERR, "ERROR: %s is too old to reindex all.\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ldif2db - %s is too old to reindex all.\n",
plugin->plg_name, 0, 0);
return 1;
}
@@ -2121,8 +2122,8 @@ slapd_exemode_ldif2db(void)
if ( plugin->plg_ldif2db != NULL ) {
return_value = (*plugin->plg_ldif2db)( &pb );
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: no ldif2db function defined for "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "ldif2db - no ldif2db function defined for "
"%s\n", plugin->plg_name, 0, 0 );
return_value = -1;
}
@@ -2157,8 +2158,8 @@ slapd_exemode_db2ldif(int argc, char** argv)
if (lookup_instance_name_by_suffixes(db2ldif_include, db2ldif_exclude,
&instances) < 0) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: backend instances name [-n <name>] or "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "db2ldif - backend instances name [-n <name>] or "
"included suffix [-s <suffix>] need to be specified.\n",
0, 0, 0);
return 1;
@@ -2169,20 +2170,20 @@ slapd_exemode_db2ldif(int argc, char** argv)
;
if (counter == 0) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR 1: There is no backend instance to export from.\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "db2ldif - There is no backend instance to export from.\n",
0, 0, 0);
return 1;
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Backend Instance(s): \n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_INFO, "db2ldif - Backend Instance(s): \n", 0, 0, 0);
for (ip = instances, counter = 0; ip && *ip; ip++, counter++) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "\t%s\n", *ip, 0, 0);
+ LDAPDebug(LDAP_DEBUG_INFO, "db2ldif - %s\n", *ip, 0, 0);
}
cmd_line_instance_names = instances;
}
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR 2: There is no backend instance to export from.\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "db2ldif: There is no backend instances to export from.\n",
0, 0, 0);
return 1;
}
@@ -2196,14 +2197,14 @@ slapd_exemode_db2ldif(int argc, char** argv)
plugin = lookup_plugin_by_instance_name(*instp);
if (plugin == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: Could not find backend '%s'.\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "db2ldif - Could not find backend '%s'.\n",
*instp, 0, 0);
return 1;
}
if (plugin->plg_db2ldif == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: no db2ldif function defined for "
+ LDAPDebug(LDAP_DEBUG_ERR, "db2ldif - No db2ldif function defined for "
"backend %s - cannot export\n", *instp, 0, 0);
return 1;
}
@@ -2214,15 +2215,15 @@ 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, LOG_ERR,
- "Shutting down due to possible conflicts "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "db2ldif - Shutting down due to possible conflicts "
"with other slapd processes\n",
0, 0, 0 );
return 1;
}
if (! (SLAPI_PLUGIN_IS_V2(plugin))) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: %s is too old to do exports.\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "db2ldif - %s is too old to do exports.\n",
plugin->plg_name, 0, 0);
return 1;
}
@@ -2374,8 +2375,8 @@ static int slapd_exemode_db2index(void)
if (lookup_instance_name_by_suffixes(db2ldif_include, db2ldif_exclude,
&instances) < 0) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: backend instances name [-n <name>] or "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "db2index - Backend instances name [-n <name>] or "
"included suffix [-s <suffix>] need to be specified.\n",
0, 0, 0);
return 1;
@@ -2386,27 +2387,27 @@ static int slapd_exemode_db2index(void)
;
if (counter == 0) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR 1: There is no backend instance to import to.\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "db2index - There is no backend instance to import to.\n",
0, 0, 0);
return 1;
} else if (counter > 1) {
int i;
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: There are multiple backend instances specified:\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "db2index - There are multiple backend instances specified:\n",
0, 0, 0);
for (i = 0; i < counter; i++)
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, " : %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "db2index - %s\n",
instances[i], 0, 0);
return 1;
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Backend Instance: %s\n",
+ LDAPDebug(LDAP_DEBUG_INFO, "db2index - Backend Instance: %s\n",
*instances, 0, 0);
cmd_line_instance_name = *instances;
}
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR 2: There is no backend instance to import to.\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "db2index - There is no backend instances to import to.\n",
0, 0, 0);
return 1;
}
@@ -2414,8 +2415,8 @@ static int slapd_exemode_db2index(void)
plugin = lookup_plugin_by_instance_name(cmd_line_instance_name);
if (plugin == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: Could not find backend '%s'.\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "db2index - Could not find backend '%s'.\n",
cmd_line_instance_name, 0, 0);
return 1;
}
@@ -2423,15 +2424,15 @@ 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, LOG_ERR,
- "Shutting down due to possible conflicts with other "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "db2index - Shutting down due to possible conflicts with other "
"slapd processes.\n", 0, 0, 0);
return 1;
}
if ( db2index_attrs == NULL ) {
- usage( myname, extraname );
- return 1;
+ usage( myname, extraname );
+ return 1;
}
memset( &pb, '\0', sizeof(pb) );
pb.pb_backend = NULL;
@@ -2456,14 +2457,14 @@ slapd_exemode_db2archive(void)
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
if ((backend_plugin = plugin_get_by_name("ldbm database")) == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: Could not find the ldbm backend plugin.\n",
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "db2bak - Could not find the ldbm backend plugin.\n",
0, 0, 0);
return 1;
}
if (NULL == archive_name) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: no archive directory supplied\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "db2bak - no archive directory supplied\n",
0, 0, 0 );
return 1;
}
@@ -2474,13 +2475,13 @@ slapd_exemode_db2archive(void)
*/
if ( add_new_slapd_process(slapd_exemode, db2ldif_dump_replica,
skip_db_protect_check) == -1 ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Shutting down due to possible conflicts with other slapd processes\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "db2bak - Shutting down due to possible conflicts with other slapd processes\n",
0, 0, 0 );
return 1;
}
if (compute_init()) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Initialization Failed 0 %d\n",return_value,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "db2bak - Initialization Failed 0 %d\n",return_value,0,0);
return 1;
}
if (!is_quiet) {
@@ -2510,14 +2511,14 @@ slapd_exemode_archive2db(void)
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
if ((backend_plugin = plugin_get_by_name("ldbm database")) == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: Could not find the ldbm backend plugin.\n",
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "bak2db - Could not find the ldbm backend plugin.\n",
0, 0, 0);
return 1;
}
if (NULL == archive_name) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: no archive directory supplied\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "bak2db - no archive directory supplied\n",
0, 0, 0 );
return 1;
}
@@ -2528,13 +2529,13 @@ slapd_exemode_archive2db(void)
*/
if ( add_new_slapd_process(slapd_exemode, db2ldif_dump_replica,
skip_db_protect_check) == -1 ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Shutting down due to possible conflicts with other slapd processes\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "bak2db - Shutting down due to possible conflicts with other slapd processes\n",
0, 0, 0 );
return 1;
}
if (compute_init()) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Initialization Failed 0 %d\n",return_value,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "bak2db - Initialization Failed 0 %d\n",return_value,0,0);
return 1;
}
@@ -2569,8 +2570,8 @@ slapd_exemode_upgradedb(void)
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
if ( archive_name == NULL ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: Required argument -a <backup_dir> missing\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "upgradedb - Required argument -a <backup_dir> missing\n",
0, 0, 0 );
usage( myname, extraname );
return 1;
@@ -2582,8 +2583,8 @@ slapd_exemode_upgradedb(void)
mapping_tree_init();
if ((backend_plugin = plugin_get_by_name("ldbm database")) == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: Could not find the ldbm backend plugin.\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "upgradedb - Could not find the ldbm backend plugin.\n",
0, 0, 0);
return 1;
}
@@ -2593,14 +2594,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, LOG_ERR,
- "Shutting down due to possible conflicts with other slapd processes\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "upgradedb -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, LOG_ERR, "ERROR: %s is too old to do convert idl.\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "upgradedb - %s is too old to do convert idl.\n",
backend_plugin->plg_name, 0, 0);
return 1;
}
@@ -2620,8 +2621,8 @@ slapd_exemode_upgradedb(void)
if ( backend_plugin->plg_upgradedb != NULL ) {
return_value = (*backend_plugin->plg_upgradedb)( &pb );
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: no upgradedb function defined for "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "upgradedb - no upgradedb function defined for "
"%s\n", backend_plugin->plg_name, 0, 0 );
return_value = -1;
}
@@ -2639,7 +2640,7 @@ slapd_exemode_upgradednformat(void)
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
if ( archive_name == NULL ) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: Required argument "
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "upgradednformat - Required argument "
"\"-a <path to work db instance dir>\" is missing\n");
usage( myname, extraname );
goto bail;
@@ -2651,8 +2652,8 @@ slapd_exemode_upgradednformat(void)
mapping_tree_init();
if ((backend_plugin = plugin_get_by_name("ldbm database")) == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: Could not find the ldbm backend plugin.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "upgradednformat - Could not find the ldbm backend plugin.\n");
goto bail;
}
@@ -2663,14 +2664,14 @@ slapd_exemode_upgradednformat(void)
*/
if (add_new_slapd_process(slapd_exemode, 0, skip_db_protect_check)
== -1) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "Shutting down due to possible "
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "upgradednformat - 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, LOG_ERR,
- "ERROR: %s is too old to upgrade dn format.\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "upgradednformat - %s is too old to upgrade dn format.\n",
backend_plugin->plg_name);
goto bail;
}
@@ -2695,8 +2696,8 @@ slapd_exemode_upgradednformat(void)
if ( backend_plugin->plg_upgradednformat != NULL ) {
rc = (*backend_plugin->plg_upgradednformat)( &pb );
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: no upgradednformat function defined for "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "upgradednformat - no upgradednformat function defined for "
"%s\n", backend_plugin->plg_name, 0, 0 );
}
bail:
@@ -2719,15 +2720,15 @@ slapd_exemode_dbverify(void)
*/
mapping_tree_init();
if ((backend_plugin = plugin_get_by_name("ldbm database")) == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: Could not find the ldbm backend plugin.\n",
+ LDAPDebug(LDAP_DEBUG_CRIT,
+ "dbverify - Could not find the ldbm backend plugin.\n",
0, 0, 0);
return 1;
}
/* check for slapi v2 support */
if (! SLAPI_PLUGIN_IS_V2(backend_plugin)) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR: %s is too old to do dbverify.\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "dbverify - %s is too old to do dbverify.\n",
backend_plugin->plg_name, 0, 0);
return 1;
}
@@ -2743,8 +2744,8 @@ slapd_exemode_dbverify(void)
if ( backend_plugin->plg_dbverify != NULL ) {
return_value = (*backend_plugin->plg_dbverify)( &pb );
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: no db verify function defined for "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "dbverify - no db verify function defined for "
"%s\n", backend_plugin->plg_name, 0, 0 );
return_value = -1;
}
@@ -2885,7 +2886,7 @@ slapd_debug_level_log( int level )
}
}
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPD_VERSION_STR,
+ slapi_log_error(SLAPI_LOG_INFO, SLAPD_VERSION_STR,
"%s: %s (%d)\n", "debug level", msg, level );
slapi_ch_free( (void **)&msg );
}
@@ -2928,12 +2929,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, LOG_ERR, "ERROR: %s Initialization Failed. Disabling %s.\n", what, what);
+ LDAPDebug2Args(LDAP_DEBUG_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, LOG_ERR, "ERROR: Failed to disable %s: \"%s\".\n",
+ LDAPDebug2Args(LDAP_DEBUG_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 ea83129..1989703 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, LOG_DEBUG, "mapping_tree",
+ slapi_log_error(SLAPI_LOG_TRACE, "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",
@@ -429,8 +429,8 @@ 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, LOG_ERR,
- "Warning: Unknown state, %s, for mapping tree node %s."
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "Unknown state, %s, for mapping tree node %s."
" Defaulting to DISABLED\n",
state_string, slapi_entry_get_dn(entry), 0);
return MTN_DISABLED;
@@ -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, LOG_ERR, "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_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,12 +517,12 @@ 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, 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",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "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);
- tmp_be = NULL;
- return -1;
+ tmp_be = NULL;
+ return -1;
}
if(tmp_be!=NULL)
{
@@ -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, LOG_ERR, "Warning: Unable to determine the subtree represented by the mapping tree node %s\n",
+ LDAPDebug(LDAP_DEBUG_WARNING, "Unable to determine the subtree represented by the mapping tree node %s\n",
slapi_entry_get_dn(entry), 0, 0);
return lderr;
}
@@ -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, LOG_DEBUG, "mapping_tree_entry_add", "NULL suffix\n" );
+ slapi_log_error(SLAPI_LOG_ARGS, "mapping_tree_entry_add", "NULL suffix\n" );
parent_node = NULL;
}
@@ -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, LOG_ERR, "Warning: a mapping tree node for the"
+ LDAPDebug(LDAP_DEBUG_WARNING, "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,8 +665,8 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node **newnodep )
if (NULL == be_list)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Warning: The nsslapd-backend attribute has no value for the mapping tree node %s\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "Warning: Can't determine the state of the mapping tree node %s\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "Warning: The nsslapd-distribution-plugin attribute has no value for the mapping tree node %s\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "Warning: The nsslapd-distribution-plugin attribute has no value for the mapping tree node %s\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "Warning: The nsslapd-distribution-plugin attribute has no value for the mapping tree node %s\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "Warning: The nsslapd-distribution-root-update attribute has undefined value (%s) for the mapping tree node %s\n",
+ LDAPDebug(LDAP_DEBUG_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,8 +729,8 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node **newnodep )
if (parent_node == NULL)
{
parent_node = mapping_tree_root;
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Warning: could not find parent for %s defaulting to root\n",
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "Could not find parent for %s defaulting to root\n",
slapi_entry_get_dn(entry), 0, 0);
}
slapi_sdn_free(&parent_node_dn);
@@ -745,8 +745,8 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node **newnodep )
be = defbackend_get_backend();
if(be == NULL)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: default container has not been created for the NULL SUFFIX node.\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "Default container has not been created for the NULL SUFFIX node.\n",
0, 0, 0);
slapi_sdn_free(&subtree);
return -1;
@@ -778,8 +778,8 @@ 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, LOG_ERR,
- "ERROR: node %s must define a backend\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "Node %s must define a backend\n",
slapi_entry_get_dn(entry), 0, 0);
slapi_sdn_free(&subtree);
free_mapping_tree_node_arrays(&be_list, &be_names, &be_states, &be_list_count);
@@ -788,8 +788,8 @@ 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, LOG_ERR,
- "ERROR: node %s must define referrals to be in referral state\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "Node %s must define referrals to be in referral state\n",
slapi_entry_get_dn(entry), 0, 0);
slapi_sdn_free(&subtree);
free_mapping_tree_node_arrays(&be_list, &be_names, &be_states, &be_list_count);
@@ -802,8 +802,8 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node **newnodep )
"Entry Distribution", 1);
if (plugin == NULL)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: node %s cannot find distribution plugin. "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "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()));
slapi_sdn_free(&subtree);
@@ -821,8 +821,8 @@ mapping_tree_entry_add(Slapi_Entry *entry, mapping_tree_node **newnodep )
else
{
/* only one parameter configured -> ERROR */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: node %s must define both lib and funct"
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "Node %s must define both lib and funct"
" for distribution plugin\n",
slapi_entry_get_dn(entry), 0, 0);
slapi_sdn_free(&subtree);
@@ -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, LOG_DEBUG, "mapping_tree_entry_add", "fix up NULL suffix\n" );
+ slapi_log_error(SLAPI_LOG_ARGS, "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;
@@ -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, LOG_ERR, "WARNING: Mapping tree unable to read %s: %d\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "WARNING: No mapping tree node entries found under %s\n",
+ LDAPDebug(LDAP_DEBUG_WARNING, "No mapping tree node entries found under %s\n",
MAPPING_TREE_BASE_DN, 0, 0);
result = -1;
goto done;
@@ -950,8 +950,8 @@ 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, LOG_ERR,
- "ERROR: could not add mapping tree node %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "Could not add mapping tree node %s\n",
slapi_entry_get_dn(entries[x]), 0, 0);
result = -1;
goto done;
@@ -1009,8 +1009,8 @@ 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, LOG_ERR,
- "Warning: Invalid mapping tree. %s can not be a child of %s\n",
+ LDAPDebug(LDAP_DEBUG_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,8 +1099,8 @@ 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, LOG_ERR,
- "Error: could not find parent for %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "Could not find parent for %s\n",
slapi_entry_get_dn(entryAfter), 0, 0);
slapi_sdn_free(&subtree);
slapi_ch_free_string(&plugin_fct);
@@ -1300,8 +1300,8 @@ 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, LOG_ERR,
- "Warning: The nsslapd-distribution-funct attribute"
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "The nsslapd-distribution-funct attribute"
" has no value for the mapping tree node %s\n",
slapi_entry_get_dn(entryAfter), 0, 0);
}
@@ -1324,8 +1324,8 @@ 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, LOG_ERR,
- "Warning: The nsslapd-distribution-plugin attribute"
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "The nsslapd-distribution-plugin attribute"
" has no value for the mapping tree node %s\n",
slapi_entry_get_dn(entryAfter), 0, 0);
}
@@ -1348,8 +1348,8 @@ 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, LOG_ERR,
- "Warning: The nsslapd-distribution-root-update attribute"
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "The nsslapd-distribution-root-update attribute"
" has no value for the mapping tree node %s\n",
slapi_entry_get_dn(entryAfter), 0, 0);
plugin_rootmode = CHAIN_ROOT_UPDATE_REJECT;
@@ -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, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_ERR,
"mapping_tree_entry_add_callback: "
"setting %s to %s failed: RC=%d\n",
escaped, CONFIG_DEFAULT_NAMING_CONTEXT, rc);
@@ -1594,7 +1594,7 @@ done:
CONFIG_DEFAULT_NAMING_CONTEXT,
NULL);
if (rc) {
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug2Args(LDAP_DEBUG_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, LOG_ERR, "mapping_tree",
+ slapi_log_error(SLAPI_LOG_ERR, "mapping_tree",
"mapping_tree_entry_delete_callback: setting NULL to %s failed. %s\n",
CONFIG_DEFAULT_NAMING_CONTEXT, errorbuf);
}
@@ -2268,7 +2268,8 @@ 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, LOG_ERR, NULL, "Error: Null target DN");
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_mapping_tree_select_all",
+ "Null target DN");
return LDAP_OPERATIONS_ERROR;
}
slapi_pblock_get(pb, SLAPI_OPERATION, &op);
@@ -2324,7 +2325,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, LOG_DEBUG, NULL,
+ slapi_log_error(SLAPI_LOG_ARGS, NULL,
"mapping tree release backend : %s\n",
slapi_be_get_name(be));
slapi_be_Unlock(be);
@@ -2337,8 +2338,8 @@ 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, LOG_ERR, "mapping_tree",
- "Error: too many backends match search request - cannot proceed");
+ slapi_log_error(SLAPI_LOG_ERR, "mapping_tree",
+ "Too many backends match search request - cannot proceed");
ret_code = LDAP_ADMINLIMIT_EXCEEDED;
break;
} else {
@@ -2404,7 +2405,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, LOG_DEBUG, NULL, "mapping tree release backend : %s\n", slapi_be_get_name(be));
+ slapi_log_error(SLAPI_LOG_ARGS, NULL, "mapping tree release backend : %s\n", slapi_be_get_name(be));
slapi_be_Unlock(be);
}
}
@@ -2572,8 +2573,8 @@ 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, LOG_ERR,
- "Warning: distribution plugin returned wrong backend"
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "Distribution plugin returned wrong backend"
" : %d for entry %s at node %s\n",
index, slapi_sdn_get_ndn(target_sdn),
slapi_sdn_get_ndn(target_node->mtn_subtree));
@@ -2592,9 +2593,9 @@ 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, LOG_ERR,
- "Warning: distribution plugin not configured at node : %s\n",
- slapi_sdn_get_ndn(target_node->mtn_subtree), 0, 0);
+ LDAPDebug(LDAP_DEBUG_WARNING,
+ "Distribution plugin not configured at node : %s\n",
+ slapi_sdn_get_ndn(target_node->mtn_subtree), 0, 0);
index = 0;
}
@@ -2712,7 +2713,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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_BACKLDBM,
"Warning: Mapping tree node entry for %s "
"point to an unknown backend : %s\n",
slapi_sdn_get_dn(target_node->mtn_subtree),
@@ -2727,7 +2728,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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"Warning: Operation attempted on backend in OFFLINE "
"state : %s\n",
target_node->mtn_backend_names[*index], 0, 0);
@@ -2778,12 +2779,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, LOG_DEBUG, NULL,
+ slapi_log_error(SLAPI_LOG_ARGS, 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, LOG_DEBUG, NULL,
+ slapi_log_error(SLAPI_LOG_ARGS, NULL,
"mapping tree selected referral at node : %s\n",
slapi_sdn_get_dn(target_node->mtn_subtree));
}
@@ -2979,7 +2980,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, LOG_ERR,
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
"slapi_get_mapping_tree_node_configdn: "
"failed to crate mapping tree dn for %s\n",
slapi_sdn_get_dn(root));
@@ -3006,7 +3007,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, LOG_ERR,
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
"slapi_get_mapping_tree_node_configsdn: "
"failed to crate mapping tree dn for %s\n",
slapi_sdn_get_dn(root));
@@ -3092,7 +3093,7 @@ slapi_be_select_exact(const Slapi_DN *sdn)
mapping_tree_node *node = NULL;
if (!sdn) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "slapi_be_select_exact: Empty Slapi_DN is given.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "slapi_be_select_exact: Empty Slapi_DN is given.\n");
return NULL;
}
node = slapi_get_mapping_tree_node_by_dn(sdn);
@@ -3596,7 +3597,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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"Warning: backend %s is not declared in mapping tree\n",
be_name, 0 ,0);
goto done;
@@ -3619,7 +3620,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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"Warning: backend %s is not declared in mapping node entry\n",
be_name, 0 ,0);
goto done;
@@ -3757,7 +3758,7 @@ void mtn_wlock(void)
slapi_rwlock_wrlock(myLock);
#ifdef DEBUG
lock_count--;
- LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "mtn_wlock : lock count : %d\n", lock_count, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ARGS, "mtn_wlock : lock count : %d\n", lock_count, 0, 0);
#endif
}
@@ -3766,7 +3767,7 @@ void mtn_lock(void)
slapi_rwlock_rdlock(myLock);
#ifdef DEBUG
lock_count++;
- LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "mtn_lock : lock count : %d\n", lock_count, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ARGS, "mtn_lock : lock count : %d\n", lock_count, 0, 0);
#endif
}
@@ -3780,7 +3781,7 @@ void mtn_unlock(void)
lock_count++;
else
lock_count = (int) 11111111; /* this happening means problems */
- LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "mtn_unlock : lock count : %d\n", lock_count, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ARGS, "mtn_unlock : lock count : %d\n", lock_count, 0, 0);
#endif
slapi_rwlock_unlock(myLock);
}
@@ -3788,7 +3789,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, LOG_DEBUG, NULL,
+ slapi_log_error(SLAPI_LOG_ARGS, NULL,
"my_test_fnct1 : handle %d, be %s, old state %d, new state %d\n",
handle,be_name, old_state, new_state);
@@ -3798,7 +3799,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, LOG_DEBUG, NULL,
+ slapi_log_error(SLAPI_LOG_ARGS, NULL,
"my_test_fnct2 : handle %d, be %s, old state %d, new state %d\n",
handle, be_name, old_state, new_state);
}
@@ -3820,7 +3821,7 @@ static void dump_mapping_tree(mapping_tree_node *parent, int depth)
if (depth == 0)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "dump_mapping_tree\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_DEBUG, "dump_mapping_tree\n", 0, 0, 0);
}
dump_indent[0] = '\0';
for (i = 0; i < depth; i++)
@@ -3830,12 +3831,12 @@ static void dump_mapping_tree(mapping_tree_node *parent, int depth)
{
if (strlen(current->mtn_subtree->dn) == 0)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "MT_DUMP: %s%s (0x%x)\n",
+ LDAPDebug(LDAP_DEBUG_DEBUG, "MT_DUMP: %s%s (0x%x)\n",
dump_indent, "none", current);
}
else
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "MT_DUMP: %s%s (0x%x)\n",
+ LDAPDebug(LDAP_DEBUG_DEBUG, "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/mempool.c b/ldap/servers/slapd/mempool.c
index ad50bfa..f8451fc 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, LOG_ERR, "mempool", "mempool_init: "
+ slapi_log_error(SLAPI_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, LOG_ERR, SLAPD_MODULE,
+ slapi_log_error(SLAPI_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, LOG_ERR, SLAPD_MODULE,
+ slapi_log_error(SLAPI_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, LOG_ERR, SLAPD_MODULE,
+ slapi_log_error(SLAPI_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, LOG_ERR, SLAPD_MODULE,
+ slapi_log_error(SLAPI_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, LOG_ERR, SLAPD_MODULE,
+ slapi_log_error(SLAPI_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, LOG_ERR, SLAPD_MODULE,
+ slapi_log_error(SLAPI_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, LOG_ERR, SLAPD_MODULE,
+ slapi_log_error(SLAPI_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, LOG_ERR, SLAPD_MODULE,
+ slapi_log_error(SLAPI_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 75d9333..d961978 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, LOG_DEBUG, "do_modify\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "do_modify\n", 0, 0, 0 );
slapi_pblock_get( pb, SLAPI_OPERATION, &operation);
ber = operation->o_ber;
@@ -145,8 +145,8 @@ do_modify( Slapi_PBlock *pb )
int rc = 0;
if ( ber_scanf( ber, "{a", &rawdn ) == LBER_ERROR )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ber_scanf failed (op=Modify; params=DN)\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "do_modify - 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 );
slapi_ch_free_string(&rawdn);
@@ -167,7 +167,7 @@ do_modify( Slapi_PBlock *pb )
}
}
- LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "do_modify: dn (%s)\n", rawdn, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, "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, LOG_ERR,"Rejecting replicated password policy operation(conn=%d op=%d) for "
+ LDAPDebug(LDAP_DEBUG_ERR,"do_modify - 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, LOG_DEBUG, "modifications:\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS, "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, LOG_DEBUG, "\t%s: %s\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, "\t%s: %s\n",
mod_op_image( mod->mod_op ), mod->mod_type, 0 );
}
#endif
@@ -467,8 +467,8 @@ 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, LOG_ERR, NULL,
- "slapi_modify_internal_set_pb: NULL parameter\n");
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_modify_internal_set_pb",
+ "NULL parameter\n");
return;
}
@@ -496,8 +496,8 @@ 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, LOG_ERR, NULL,
- "slapi_modify_internal_set_pb_ext: NULL parameter\n");
+ slapi_log_error(SLAPI_LOG_ERR, "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 ea9d72f..b984c54 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, LOG_DEBUG, "do_modrdn\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "do_modrdn\n", 0, 0, 0 );
/* count the modrdn request */
slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsModifyRDNOps);
@@ -75,8 +75,8 @@ do_modrdn( Slapi_PBlock *pb )
*/
if (ber_scanf(ber, "{aab", &rawdn, &newrdn, &deloldrdn) == LBER_ERROR) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ber_scanf failed (op=ModRDN; params=DN,newRDN,deleteOldRDN)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "do_modrdn - ber_scanf failed (op=ModRDN; params=DN,newRDN,deleteOldRDN)\n",
0, 0, 0 );
op_shared_log_error_access (pb, "MODRDN", "???", "decoding error");
send_ldap_result( pb, LDAP_PROTOCOL_ERROR, NULL,
@@ -88,8 +88,8 @@ 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, LOG_ERR,
- "got newSuperior in LDAPv2 modrdn op\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "do_modrdn - got newSuperior in LDAPv2 modrdn op\n", 0, 0, 0 );
op_shared_log_error_access (pb, "MODRDN",
rawdn?rawdn:"", "decoding error");
send_ldap_result( pb, LDAP_PROTOCOL_ERROR, NULL,
@@ -99,8 +99,8 @@ do_modrdn( Slapi_PBlock *pb )
goto free_and_return;
}
if ( ber_scanf( ber, "a", &rawnewsuperior ) == LBER_ERROR ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ber_scanf failed (op=ModRDN; params=newSuperior)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "do_modrdn - ber_scanf failed (op=ModRDN; params=newSuperior)\n",
0, 0, 0 );
op_shared_log_error_access (pb, "MODRDN", rawdn, "decoding error");
send_ldap_result( pb, LDAP_PROTOCOL_ERROR, NULL,
@@ -209,7 +209,7 @@ do_modrdn( Slapi_PBlock *pb )
goto free_and_return;
}
- LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_ARGS,
"do_modrdn: dn (%s) newrdn (%s) deloldrdn (%d)\n", dn, newrdn,
deloldrdn );
@@ -312,8 +312,8 @@ 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, LOG_ERR, NULL,
- "slapi_rename_internal_set_pb: NULL parameter\n");
+ slapi_log_error(SLAPI_LOG_ERR, "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, LOG_ERR, "rename_internal_pb",
+ slapi_log_error(SLAPI_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, LOG_DEBUG, NULL,
+ slapi_log_error(SLAPI_LOG_ARGS, 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, LOG_DEBUG, NULL,
+ slapi_log_error(SLAPI_LOG_ARGS, 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, LOG_DEBUG, "Syntax check of newSuperior failed\n");
+ LDAPDebug0Args(LDAP_DEBUG_ARGS, "Syntax check of newSuperior failed\n");
if (!internal_op) {
- slapi_log_error(SLAPI_LOG_ARGS, LOG_DEBUG, NULL,
+ slapi_log_error(SLAPI_LOG_ARGS, 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, LOG_DEBUG, NULL,
+ slapi_log_error(SLAPI_LOG_ARGS, NULL,
"conn=%s op=%d MODRDN invalid new superior (\"%s\")",
LOG_INTERNAL_OP_CON_ID,
LOG_INTERNAL_OP_OP_ID,
@@ -552,7 +552,7 @@ op_shared_rename(Slapi_PBlock *pb, int passin_args)
if (newsuperior != NULL)
{
- LDAPDebug(LDAP_DEBUG_ARGS, LOG_DEBUG, "do_moddn: newsuperior (%s)\n", newsuperior, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ARGS, "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, LOG_DEBUG, "Invalid DN. RDN contains %s attribute\n", type[i], 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "Invalid DN. RDN contains %s attribute\n", type[i], 0, 0);
rc = 1;
break;
}
}
slapi_rdn_free(&rdn);
} else {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "check_rdn_for_created_attrs: Error allocating RDN\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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 dd00e18..1230abe 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, LOG_ERR, "smod - %s\n", text, 0, 0);
+ LDAPDebug(LDAP_DEBUG_DEBUG, "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, LOG_ERR, "smod %d - add: %s\n", n, mod->mod_type, 0);
+ LDAPDebug(LDAP_DEBUG_DEBUG, "smod %d - add: %s\n", n, mod->mod_type, 0);
break;
case LDAP_MOD_DELETE:
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "smod %d - delete: %s\n", n, mod->mod_type, 0);
+ LDAPDebug(LDAP_DEBUG_DEBUG, "smod %d - delete: %s\n", n, mod->mod_type, 0);
break;
case LDAP_MOD_REPLACE:
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "smod %d - replace: %s\n", n, mod->mod_type, 0);
+ LDAPDebug(LDAP_DEBUG_DEBUG, "smod %d - replace: %s\n", n, mod->mod_type, 0);
break;
case LDAP_MOD_IGNORE:
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "smod %d - ignore: %s\n", n, mod->mod_type, 0);
+ LDAPDebug(LDAP_DEBUG_DEBUG, "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, LOG_ERR, "smod %d - value: %s", n, buf, 0);
+ LDAPDebug(LDAP_DEBUG_DEBUG, "smod %d - value: %s", n, buf, 0);
slapi_ch_free( (void**)&buf );
}
}
}
else
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "smod - null\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_DEBUG, "smod - null\n", 0, 0, 0);
}
}
diff --git a/ldap/servers/slapd/operation.c b/ldap/servers/slapd/operation.c
index 1915c8f..0c1cd0e 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, LOG_ERR, "*** DISK FULL ***\n", 0, 0, 0);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Attempting to shut down gracefully.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "*** DISK FULL ***\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "Attempting to shut down gracefully.\n", 0, 0, 0);
g_set_shutdown( SLAPI_SHUTDOWN_DISKFULL );
}
@@ -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, LOG_ERR, "connection",
+ slapi_log_error(SLAPI_LOG_ERR, "connection",
"conn=%" NSPRIu64 " fd=%d Attempt to acquire connection in the closing state\n",
conn->c_connid, conn->c_sd);
rc = -1;
@@ -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, LOG_ERR, "connection_remove_operation: can't find op %d for conn %" NSPRIu64 "\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "connection_remove_operation: no operation provided\n",0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "connection_remove_operation: no operation provided\n",0, 0, 0);
}
} else {
*tmp = (*tmp)->o_next;
@@ -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, LOG_ERR, "connection",
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_connection_remove_operation",
"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 652b820..6c8c92b 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, LOG_DEBUG, "modify_update_last_modified_attr\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "modify_update_last_modified_attr\n", 0, 0, 0);
slapi_pblock_get(pb, SLAPI_OPERATION, &op);
bvals[0] = &bv;
@@ -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, LOG_ERR, "null ref in (%s)\n",
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "process_entry - null ref in (%s)\n",
slapi_entry_get_dn_const(e));
}
else
@@ -1379,9 +1379,9 @@ 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, LOG_ERR,
- "Failed to get effective rights for entry (%s), rc=%d\n",
- slapi_entry_get_dn_const(e), rc, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "iterate - 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 );
slapi_ch_free ( (void**)&errbuf );
if (gerentry)
@@ -1669,7 +1669,7 @@ compute_limits (Slapi_PBlock *pb)
}
slapi_pblock_set(pb, SLAPI_SEARCH_SIZELIMIT, &sizelimit);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"=> compute_limits: sizelimit=%d, timelimit=%d\n",
sizelimit, timelimit, 0 );
}
diff --git a/ldap/servers/slapd/pagedresults.c b/ldap/servers/slapd/pagedresults.c
index e9a6849..a208ca2 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, LOG_DEBUG, "--> pagedresults_parse_control_value\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "--> pagedresults_parse_control_value\n");
if ( NULL == conn || NULL == op || NULL == pagesize || NULL == index ) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug1Arg(LDAP_DEBUG_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, LOG_ERR,
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
"<-- pagedresults_parse_control_value: no control value\n");
return LDAP_PROTOCOL_ERROR;
}
ber = ber_init( psbvp );
if ( ber == NULL )
{
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug0Args(LDAP_DEBUG_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, LOG_ERR,
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
"<-- pagedresults_parse_control_value: corrupted control value\n");
return LDAP_PROTOCOL_ERROR;
}
if (!maxreqs)
{
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug1Arg(LDAP_DEBUG_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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"pagedresults_parse_control_value: simple paged results requests per conn exeeded the limit: %d\n",
maxreqs);
goto bail;
@@ -161,8 +161,8 @@ 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, LOG_ERR,
- "pagedresults_parse_control_value: invalid cookie: %d\n", *index);
+ LDAPDebug1Arg(LDAP_DEBUG_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, LOG_ERR, "pagedresults_parse_control_value: invalid cookie: %d\n", *index);
+ LDAPDebug1Arg(LDAP_DEBUG_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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"<-- 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"--> 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"<-- 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"--> 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, LOG_DEBUG, "pagedresults_free_one: "
+ LDAPDebug2Args(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "<-- pagedresults_free_one: %d\n", rc);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "<-- 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"--> 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"<-- 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"--> 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"<-- 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"--> 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"<-- 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, LOG_DEBUG,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE,
"--> 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"<-- 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, LOG_DEBUG,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE,
"--> 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"<-- 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"--> 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"<-- 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"--> 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"<-- 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"--> 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"<-- 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"--> 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"<-- 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"--> 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"<-- 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"--> 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, LOG_DEBUG, "<-- pagedresults_set_with_sort: %d\n", rc);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "<-- 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"--> 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"<-- 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"--> 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"<-- 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"--> 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"<-- 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"--> 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"<-- 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"--> 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, LOG_DEBUG, "<-- pagedresults_set_timelimit: %d\n", rc);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "<-- 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"--> pagedresults_set_sizelimit: idx=%d\n", index);
op->o_pagedresults_sizelimit = sizelimit;
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- pagedresults_set_sizelimit: %d\n", rc);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "<-- 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"--> pagedresults_get_sizelimit: idx=%d\n", index);
sizelimit = op->o_pagedresults_sizelimit;
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- pagedresults_get_sizelimit\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "<-- 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, LOG_DEBUG, "--> pagedresults_cleanup\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "--> pagedresults_cleanup\n");
if (NULL == conn) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- pagedresults_cleanup: -\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "<-- 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, LOG_DEBUG, "<-- pagedresults_cleanup: %d\n", rc);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "<-- 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, LOG_DEBUG, "--> pagedresults_cleanup_all\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "--> pagedresults_cleanup_all\n");
if (NULL == conn) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- pagedresults_cleanup_all: -\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "<-- 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, LOG_DEBUG, "<-- pagedresults_cleanup_all: %d\n", rc);
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "<-- 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"--> 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"<-- 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"--> 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"<-- 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, LOG_DEBUG, "--> pagedresults_is_timedout\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "--> pagedresults_is_timedout\n");
if (!conn || (0 == conn->c_pagedresults.prl_maxlen)) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- pagedresults_is_timedout: false\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "<-- 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, LOG_DEBUG, "<-- pagedresults_is_timedout: true\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "<-- pagedresults_is_timedout: true\n");
return 1;
}
}
}
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- pagedresults_is_timedout: false\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "<-- 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, LOG_DEBUG, "--> pagedresults_reset_timedout\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "--> 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, LOG_DEBUG, "<-- pagedresults_reset_timedout: 0\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "<-- 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, LOG_DEBUG, "--> pagedresults_in_use\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "--> pagedresults_in_use\n");
if (NULL == conn) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- pagedresults_in_use: -\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "<-- pagedresults_in_use: -\n");
return 0;
}
- LDAPDebug1Arg(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- pagedresults_in_use: %d\n",
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE, "<-- 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, LOG_DEBUG,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE,
"--> 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, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_TRACE,
"<-- 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 9f321f6..9a8b150 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, LOG_DEBUG, "=> passwd_check_pwd\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= passwd_check_pwd: %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> passwd_modify_getEntry\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "passwd_modify_getEntry: No such entry-(%s), err (%d)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "passwd_modify_getEntry: No such entry-(%s), err (%d)\n",
dn, search_result, 0);
}
slapi_sdn_done( &sdn );
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= passwd_modify_getEntry: %d\n", search_result, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> passwd_apply_mods\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "WARNING: passwordPolicy modify error %d on entry '%s'\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "WARNING: passwordPolicy modify error %d on entry '%s'\n",
ret, slapi_sdn_get_dn(sdn), 0);
}
pblock_done(&pb);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= passwd_apply_mods: %d\n", ret, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> passwd_modify_userpassword\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= passwd_modify_userpassword: %d\n", ret, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= passwd_modify_userpassword: %d\n", ret, 0, 0 );
return ret;
}
@@ -302,8 +302,8 @@ static int passwd_modify_generate_policy_passwd( passwdPolicy *pwpolicy,
}
if ( categories > 0 ) {
/* password generator does not support passwordMin8Bit */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Unable to generate a password that meets the current "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "passwd_modify_generate_policy_passwd - 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",
pwpolicy->pw_mincategories, 0, 0 );
@@ -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, LOG_ERR, "Unable to generate a password that meets "
+ LDAPDebug(LDAP_DEBUG_ERR, "passwd_modify_generate_passwd - 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, LOG_DEBUG, "=> passwd_modify_extop\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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
@@ -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, LOG_DEBUG, "passwd_modify_extop",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "passwd_modify_extop",
"%s", errMesg );
goto free_and_return;
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "passwd_modify_extop",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "passwd_modify_extop",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "passwd_modify_extop",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "passwd_modify_extop",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "passwd_modify_extop",
"%s", errMesg );
goto free_and_return;
}
@@ -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, LOG_ERR, "ber_scanf failed :{\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "passwd_modify_extop - 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, LOG_ERR, "ber_scanf failed :{\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "passwd_modify_extop - 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, LOG_ERR, "ber_scanf failed :{\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "passwd_modify_extop - 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, LOG_DEBUG, "passwd: dn (%s), oldPasswd (%s) ,newPasswd (%s)\n",
+ /* LDAPDebug(LDAP_DEBUG_ARGS, "passwd: dn (%s), oldPasswd (%s) ,newPasswd (%s)\n",
dn, oldPasswd, newPasswd); */
/* Get Bind DN */
@@ -806,11 +806,11 @@ parse_req_done:
slapi_pblock_set(pb, SLAPI_EXT_OP_RET_VALUE, gen_passwd);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= passwd_modify_extop: %d\n", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= passwd_modify_extop: %d\n", rc, 0, 0 );
/* Free anything that we allocated above */
free_and_return:
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "passwd_modify_extop",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "passwd_modify_init", "Could not get argv\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "passwd_modify_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "passwd_modify_init",
"OID is missing or is not %s\n", EXTOP_PASSWD_OID );
return( -1 );
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "passwd_modify_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "passwd_modify_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "passwd_modify_init",
"Failed to set plug-in version, function, and OID.\n" );
return( -1 );
}
diff --git a/ldap/servers/slapd/pblock.c b/ldap/servers/slapd/pblock.c
index 2916aa9..0cff834 100644
--- a/ldap/servers/slapd/pblock.c
+++ b/ldap/servers/slapd/pblock.c
@@ -157,8 +157,8 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value )
break;
case SLAPI_CONN_ID:
if (pblock->pb_conn == NULL) {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
- "Connection is NULL and hence cannot access SLAPI_CONN_ID \n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE,
+ "slapi_pblock_get - Connection is NULL and hence cannot access SLAPI_CONN_ID \n", 0, 0, 0 );
return (-1);
}
(*(PRUint64 *)value) = pblock->pb_conn->c_connid;
@@ -170,8 +170,8 @@ 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, LOG_ERR,
- "Connection is NULL and hence cannot access SLAPI_CONN_DN \n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_pblock_get - Connection is NULL and hence cannot access SLAPI_CONN_DN \n", 0, 0, 0 );
return (-1);
}
PR_EnterMonitor(pblock->pb_conn->c_mutex);
@@ -181,8 +181,8 @@ 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, LOG_ERR,
- "Connection is NULL and hence cannot access SLAPI_CONN_AUTHTYPE \n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_pblock_get - Connection is NULL and hence cannot access SLAPI_CONN_AUTHTYPE \n", 0, 0, 0 );
return (-1);
}
PR_EnterMonitor(pblock->pb_conn->c_mutex);
@@ -208,8 +208,8 @@ 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, LOG_ERR,
- "Connection is NULL and hence cannot access SLAPI_CONN_AUTHMETHOD \n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_pblock_get - Connection is NULL and hence cannot access SLAPI_CONN_AUTHMETHOD \n", 0, 0, 0 );
return (-1);
}
PR_EnterMonitor(pblock->pb_conn->c_mutex);
@@ -296,8 +296,8 @@ 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, LOG_ERR,
- "Connection is NULL and hence cannot access SLAPI_CONN_IS_REPLICATION_SESSION \n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_pblock_get - Connection is NULL and hence cannot access SLAPI_CONN_IS_REPLICATION_SESSION \n", 0, 0, 0 );
return (-1);
}
PR_EnterMonitor(pblock->pb_conn->c_mutex);
@@ -306,8 +306,8 @@ 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, LOG_ERR,
- "Connection is NULL and hence cannot access SLAPI_CONN_IS_SSL_SESSION \n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_pblock_get - Connection is NULL and hence cannot access SLAPI_CONN_IS_SSL_SESSION \n", 0, 0, 0 );
return (-1);
}
PR_EnterMonitor(pblock->pb_conn->c_mutex);
@@ -316,8 +316,8 @@ 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, LOG_ERR,
- "Connection is NULL and hence cannot access SLAPI_CONN_SASL_SSF \n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_pblock_get - Connection is NULL and hence cannot access SLAPI_CONN_SASL_SSF \n", 0, 0, 0 );
return (-1);
}
PR_EnterMonitor(pblock->pb_conn->c_mutex);
@@ -326,8 +326,8 @@ 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, LOG_ERR,
- "Connection is NULL and hence cannot access SLAPI_CONN_SSL_SSF \n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_pblock_get - Connection is NULL and hence cannot access SLAPI_CONN_SSL_SSF \n", 0, 0, 0 );
return (-1);
}
PR_EnterMonitor(pblock->pb_conn->c_mutex);
@@ -336,8 +336,8 @@ 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, LOG_ERR,
- "Connection is NULL and hence cannot access SLAPI_CONN_LOCAL_SSF \n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_pblock_get - Connection is NULL and hence cannot access SLAPI_CONN_LOCAL_SSF \n", 0, 0, 0 );
return (-1);
}
PR_EnterMonitor(pblock->pb_conn->c_mutex);
@@ -346,8 +346,8 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value )
break;
case SLAPI_CONN_CERT:
if (pblock->pb_conn == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Connection is NULL and hence cannot access SLAPI_CONN_CERT \n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_pblock_get - Connection is NULL and hence cannot access SLAPI_CONN_CERT \n", 0, 0, 0 );
return (-1);
}
( *(CERTCertificate **) value) = pblock->pb_conn->c_client_cert;
@@ -357,16 +357,16 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value )
break;
case SLAPI_OPERATION_TYPE:
if (pblock->pb_op == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Operation is NULL and hence cannot access SLAPI_OPERATION_TYPE \n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_pblock_get - Operation is NULL and hence cannot access SLAPI_OPERATION_TYPE \n", 0, 0, 0 );
return (-1);
}
(*(int *)value) = pblock->pb_op->o_params.operation_type;
break;
case SLAPI_OPINITIATED_TIME:
if (pblock->pb_op == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Operation is NULL and hence cannot access SLAPI_OPINITIATED_TIME \n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_pblock_get - Operation is NULL and hence cannot access SLAPI_OPINITIATED_TIME \n", 0, 0, 0 );
return (-1);
}
(*(time_t *)value) = pblock->pb_op->o_time;
@@ -1830,8 +1830,8 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value )
case SLAPI_CLIENT_DNS:
if (pblock->pb_conn == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Connection is NULL and hence cannot access SLAPI_CLIENT_DNS \n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_pblock_get - Connection is NULL and hence cannot access SLAPI_CLIENT_DNS \n", 0, 0, 0 );
return (-1);
}
(*(struct berval ***)value ) = pblock->pb_conn->c_domain;
@@ -1972,7 +1972,7 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value )
break;
default:
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_ERR,
"Unknown parameter block argument %d\n", arg, 0, 0 );
return( -1 );
}
@@ -2021,8 +2021,8 @@ slapi_pblock_set( Slapi_PBlock *pblock, int arg, void *value )
break;
case SLAPI_CONN_ID:
if (pblock->pb_conn == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Connection is NULL and hence cannot access SLAPI_CONN_ID \n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_pblock_set - Connection is NULL and hence cannot access SLAPI_CONN_ID \n", 0, 0, 0 );
return (-1);
}
pblock->pb_conn->c_connid = *((PRUint64 *) value);
@@ -2034,8 +2034,8 @@ slapi_pblock_set( Slapi_PBlock *pblock, int arg, void *value )
* free the current authtype.
*/
if (pblock->pb_conn == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Connection is NULL and hence cannot access SLAPI_CONN_DN \n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_pblock_set - Connection is NULL and hence cannot access SLAPI_CONN_DN \n", 0, 0, 0 );
return (-1);
}
slapi_pblock_get(pblock, SLAPI_CONN_AUTHMETHOD, &authtype);
@@ -2046,8 +2046,8 @@ 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, LOG_ERR,
- "Connection is NULL and hence cannot access SLAPI_CONN_AUTHMETHOD \n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_pblock_set - Connection is NULL and hence cannot access SLAPI_CONN_AUTHMETHOD \n", 0, 0, 0 );
return (-1);
}
PR_EnterMonitor(pblock->pb_conn->c_mutex);
@@ -2057,8 +2057,8 @@ 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, LOG_ERR,
- "Connection is NULL and hence cannot access SLAPI_CONN_IS_REPLICATION_SESSION \n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_pblock_set - Connection is NULL and hence cannot access SLAPI_CONN_IS_REPLICATION_SESSION \n", 0, 0, 0 );
return (-1);
}
PR_EnterMonitor(pblock->pb_conn->c_mutex);
@@ -3452,8 +3452,8 @@ slapi_pblock_set( Slapi_PBlock *pblock, int arg, void *value )
break;
case SLAPI_CLIENT_DNS:
if (pblock->pb_conn == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Connection is NULL and hence cannot access SLAPI_CLIENT_DNS \n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_pblock_set - Connection is NULL and hence cannot access SLAPI_CLIENT_DNS \n", 0, 0, 0 );
return (-1);
}
pblock->pb_conn->c_domain = *((struct berval ***) value );
@@ -3587,7 +3587,7 @@ slapi_pblock_set( Slapi_PBlock *pblock, int arg, void *value )
break;
default:
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_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 63cc49d..dae2184 100644
--- a/ldap/servers/slapd/plugin.c
+++ b/ldap/servers/slapd/plugin.c
@@ -99,7 +99,8 @@ void
global_plugin_init()
{
if((global_rwlock = slapi_new_rwlock()) == NULL){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "startup", "Failed to create global plugin rwlock.\n" );
+ slapi_log_error(SLAPI_LOG_ERR, "global_plugin_init",
+ "Failed to create global plugin rwlock.\n" );
exit (1);
}
}
@@ -310,7 +311,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, LOG_DEBUG, NULL,
+ slapi_log_error(SLAPI_LOG_PLUGIN, NULL,
"Plugin precedence (%s) reset to group precedence (%s): %d \n",
name ? name : "",
cid->sci_plugin->plg_name ? cid->sci_plugin->plg_name : "",
@@ -774,7 +775,7 @@ slapi_send_ldap_result( Slapi_PBlock *pb, int err, char *matched, char *text,
{
if (urls || nentries)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ERROR : urls or nentries set"
+ LDAPDebug(LDAP_DEBUG_ERR, "slapi_send_ldap_result - urls or nentries set"
"in sendldap_result while NO_SUCH_OBJECT returned\n",0,0,0);
}
@@ -1281,7 +1282,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, LOG_DEBUG, "Starting %s plugin %s\n" ,
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "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 +1298,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, LOG_ERR, "Failed to start %s plugin %s\n" ,
+ LDAPDebug(LDAP_DEBUG_ERR, "plugin_start - 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 +1344,14 @@ plugin_start(Slapi_Entry *entry, char *returntext)
if(plugins_started == 0){
/* a dependency was not resolved - error */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: Failed to resolve plugin dependencies\n" , 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "plugin_start - 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, LOG_ERR, "Error: %s plugin %s is not started\n" , config[i].type, config[i].name, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "plugin_start - %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 +1775,7 @@ plugin_dependency_startall(int argc, char** argv, char *errmsg, int operation, c
{
/* finally, perform the op on the plugin */
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Starting %s plugin %s\n" , config[plugin_index].type, config[plugin_index].name, 0 );
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "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 +1794,8 @@ 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, LOG_ERR, "Failed to start %s plugin %s\n" , config[plugin_index].type, config[plugin_index].name, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "plugin_dependency_startall - 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 +1843,8 @@ 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, LOG_ERR, "Error: Failed to resolve plugin dependencies\n" , 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "plugin_dependency_startall - Failed to resolve plugin dependencies\n",
+ 0, 0, 0 );
/* list the plugins yet to perform op */
i = 0;
@@ -1849,7 +1852,8 @@ plugin_dependency_startall(int argc, char** argv, char *errmsg, int operation, c
{
if(config[i].op_done == 0)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: %s plugin %s is not started\n" , config[i].type, config[i].name, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "plugin_dependency_startall - %s plugin %s is not started\n",
+ config[i].type, config[i].name, 0 );
}
i++;
}
@@ -2030,7 +2034,7 @@ plugin_call_func (struct slapdplugin *list, int operation, Slapi_PBlock *pb, int
{
char *n = list->plg_name;
- LDAPDebug( LDAP_DEBUG_TRACE , LOG_DEBUG, "Calling plugin '%s' #%d type %d\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "Calling plugin '%s' #%d type %d\n",
(n==NULL?"noname":n), count, operation );
/* counters_to_errors_log("before plugin call"); */
@@ -2143,8 +2147,8 @@ 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, LOG_ERR, "startup",
- "slapi_register_supported_saslmechanism: failed to create lock.\n");
+ slapi_log_error(SLAPI_LOG_ERR,
+ "slapi_register_supported_saslmechanism", "Failed to create lock.\n");
exit (1);
}
}
@@ -2193,8 +2197,8 @@ 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, LOG_ERR, "startup",
- "ldapi_init_extended_ops: failed to create lock.\n");
+ slapi_log_error(SLAPI_LOG_ERR, "ldapi_init_extended_ops",
+ "Failed to create lock.\n");
exit (1);
}
@@ -2423,7 +2427,7 @@ plugin_restart(Slapi_Entry *pentryBefore, Slapi_Entry *pentryAfter)
* be allowed
*/
if(plugin_is_critical(pentryBefore)){
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "plugin_restart: Plugin (%s) is critical "
+ LDAPDebug(LDAP_DEBUG_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;
@@ -2434,21 +2438,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, LOG_DEBUG, "plugin_restart: Plugin (%s) has been successfully "
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "plugin_restart: Plugin (%s) has been successfully "
"restarted after configuration change.\n",
slapi_entry_get_dn(pentryAfter),0,0);
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "plugin_restart: Plugin (%s) failed to restart after "
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "plugin_restart: Plugin (%s) failed to reload "
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR,"plugin_restart: failed to disable/stop the plugin (%s): %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,"plugin_restart - Failed to disable/stop the plugin (%s): %s\n",
slapi_entry_get_dn(pentryBefore), returntext, 0);
rc = 1;
}
@@ -2505,7 +2509,7 @@ set_plugin_config_from_entry(
{
if (plugin_config_set_action(&config->plgc_schema_check, value))
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Error: invalid value %s for attribute %s "
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "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;
@@ -2518,7 +2522,7 @@ set_plugin_config_from_entry(
{
if (plugin_config_set_action(&config->plgc_log_access, value))
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Error: invalid value %s for attribute %s "
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "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;
@@ -2531,7 +2535,7 @@ set_plugin_config_from_entry(
{
if (plugin_config_set_action(&config->plgc_log_audit, value))
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Error: invalid value %s for attribute %s "
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "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;
@@ -2544,7 +2548,7 @@ set_plugin_config_from_entry(
{
if (plugin_config_set_action(&config->plgc_invoke_for_replop, value))
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Error: invalid value %s for attribute %s "
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "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;
@@ -2558,7 +2562,7 @@ set_plugin_config_from_entry(
{
if (plugin_set_subtree_config(&(config->plgc_target_subtrees), values[i]))
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Error: invalid value %s for attribute %s "
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "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;
@@ -2577,7 +2581,7 @@ set_plugin_config_from_entry(
{
if (plugin_set_subtree_config(&(config->plgc_excluded_target_subtrees), values[i]))
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Error: invalid value %s for attribute %s "
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "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;
@@ -2592,7 +2596,7 @@ set_plugin_config_from_entry(
{
if (plugin_set_subtree_config(&(config->plgc_bind_subtrees), values[i]))
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Error: invalid value %s for attribute %s "
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "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;
@@ -2611,7 +2615,7 @@ set_plugin_config_from_entry(
{
if (plugin_set_subtree_config(&(config->plgc_excluded_bind_subtrees), values[i]))
{
- LDAPDebug(LDAP_DEBUG_PLUGIN, LOG_DEBUG, "Error: invalid value %s for attribute %s "
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "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;
@@ -2651,7 +2655,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, LOG_DEBUG, "Error: failed to add value %s to "
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "Error: failed to add value %s to "
"attribute %s of entry %s\n", val, attrname,
slapi_entry_get_dn_const(e));
status = 1;
@@ -2698,7 +2702,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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_PLUGIN,
"Warning: couldn't find plugin %s in global list. "
"Adding default descriptive values.\n",
slapi_entry_get_dn_const(e), 0, 0 );
@@ -2740,7 +2744,7 @@ plugin_add_descriptive_attributes( Slapi_Entry *e, struct slapdplugin *plugin )
static void
plugin_free(struct slapdplugin *plugin)
{
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, "plugin_free", "Freeing %s \n", plugin->plg_name );
+ slapi_log_error(SLAPI_LOG_TRACE, "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);
@@ -2829,14 +2833,14 @@ plugin_setup(Slapi_Entry *plugin_entry, struct slapi_componentid *group,
if (!slapi_entry_get_sdn_const(plugin_entry))
{
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "plugin_setup: DN is missing from the plugin.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "plugin_setup - DN is missing from the plugin.\n");
PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE,"Plugin is missing dn.");
return -1;
}
if ((existname = plugin_exists(slapi_entry_get_sdn_const(plugin_entry))) != NULL)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "plugin_setup: the plugin named %s already exists, "
+ LDAPDebug(LDAP_DEBUG_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);
@@ -2857,9 +2861,9 @@ plugin_setup(Slapi_Entry *plugin_entry, struct slapi_componentid *group,
ATTR_PLUGIN_TYPE)))
{
/* error: required attribute %s missing */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: required attribute %s is missing from entry \"%s\"\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "plugin_setup - 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",
+ PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE,"Required attribute %s is missing from entry",
ATTR_PLUGIN_TYPE);
status = -1;
goto PLUGIN_CLEANUP;
@@ -2871,9 +2875,9 @@ plugin_setup(Slapi_Entry *plugin_entry, struct slapi_componentid *group,
if ( status != 0 ) {
/* error: unknown plugin type */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: unknown plugin type \"%s\" in entry \"%s\"\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "plugin_setup - 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);
+ PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Unknown plugin type \"%s\" in entry", value);
slapi_ch_free_string(&value);
status = -1;
goto PLUGIN_CLEANUP;
@@ -2885,9 +2889,9 @@ 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, LOG_ERR, "Error: required attribute %s is missing from entry \"%s\"\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "plugin_setup - 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");
+ PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Required attribute \"cn\" is missing from entry");
status = -1;
goto PLUGIN_CLEANUP;
}
@@ -2917,10 +2921,10 @@ 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, LOG_ERR, "Error: value for attribute %s must be "
+ LDAPDebug(LDAP_DEBUG_ERR, "plugin_setup - 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 "
+ PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Value for attribute %s must be "
"an integer between %d and %d.", ATTR_PLUGIN_PRECEDENCE,
PLUGIN_MIN_PRECEDENCE, PLUGIN_MAX_PRECEDENCE);
status = -1;
@@ -2939,9 +2943,9 @@ plugin_setup(Slapi_Entry *plugin_entry, struct slapi_componentid *group,
if (!initfunc)
{
/* error: required attribute %s missing */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: required attribute %s is missing from entry \"%s\"\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "plugin_setup - 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.",
+ PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE,"Required attribute %s is missing from entry.",
ATTR_PLUGIN_INITFN);
status = -1;
goto PLUGIN_CLEANUP;
@@ -2961,9 +2965,9 @@ plugin_setup(Slapi_Entry *plugin_entry, struct slapi_componentid *group,
ATTR_PLUGIN_PATH)))
{
/* error: required attribute %s missing */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Error: required attribute %s is missing from entry \"%s\"\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "plugin_setup - 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.",
+ PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Required attribute %s is missing from entry.",
ATTR_PLUGIN_PATH);
status = -1;
goto PLUGIN_CLEANUP;
@@ -3072,7 +3076,7 @@ plugin_setup(Slapi_Entry *plugin_entry, struct slapi_componentid *group,
if (enabled && (*initfunc)(&pb) != 0)
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Init function \"%s\" for \"%s\" plugin in library \"%s\" failed\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "plugin_setup - 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);
@@ -3133,12 +3137,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, LOG_DEBUG, "plugin_add: plugin_setup failed for (%s)\n",slapi_entry_get_dn(entry), rc, 0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "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, LOG_DEBUG, "plugin_add: plugin_start failed for (%s)\n",slapi_entry_get_dn(entry), rc, 0);
+ LDAPDebug(LDAP_DEBUG_PLUGIN, "plugin_add - plugin_start failed for (%s)\n",slapi_entry_get_dn(entry), rc, 0);
goto done;
}
@@ -3276,7 +3280,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, LOG_ERR, "plugin_delete_check_dependency: can not disable plugin(%s) due "
+ LDAPDebug(LDAP_DEBUG_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;
@@ -3332,7 +3336,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, LOG_ERR, "plugin_delete_check_dependency: %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "plugin_delete_check_dependency - %s\n",
returntext, 0, 0);
slapi_ch_free_string(&plugins);
@@ -3507,7 +3511,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, LOG_ERR, "plugin_delete: plugin \"%s\" is critical to server operations, and can not be disabled\n",
+ LDAPDebug(LDAP_DEBUG_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));
@@ -3517,9 +3521,9 @@ 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, LOG_ERR, "plugin_delete: required attribute %s is missing from entry \"%s\"\n",
+ LDAPDebug(LDAP_DEBUG_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 "
+ PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Required attribute %s "
"is missing from entry.",ATTR_PLUGIN_TYPE);
rc = -1;
goto done;
@@ -3534,9 +3538,9 @@ 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, LOG_ERR, "plugin_delete: unknown plugin type \"%s\" in entry \"%s\"\n",
+ LDAPDebug(LDAP_DEBUG_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 "
+ PR_snprintf (returntext, SLAPI_DSE_RETURNTEXT_SIZE, "Unknown plugin type "
"\"%s\" in entry.",value);
rc = -1;
goto unlock;
@@ -3561,7 +3565,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, LOG_ERR, "plugin_delete: failed to disable/delete plugin (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "plugin_delete - Failed to disable/delete plugin (%s)\n",
plugin->plg_dn,0,0);
rc = -1;
break;
@@ -3584,7 +3588,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, LOG_ERR, "plugin_delete: did not find plugin(%s) in the global list.\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "plugin_delete - Did not find plugin (%s) in the global list.\n",
slapi_entry_get_dn_const(plugin_entry),0,0);
rc = -1;
}
@@ -3633,8 +3637,8 @@ plugin_config_set_action (int *action, char *value)
}
else
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
- "plugin_config_set_action: invalid action %s\n", value);
+ slapi_log_error(SLAPI_LOG_ERR, "plugin_config_set_action",
+ "Invalid action %s\n", value);
return -1;
}
@@ -3725,7 +3729,7 @@ plugin_invoke_plugin_sdn (struct slapdplugin *plugin, int operation, Slapi_PBloc
PR_ASSERT (plugin);
if (!pb) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "plugin_invoke_plugin_sdn: NULL pblock.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "plugin_invoke_plugin_sdn - NULL pblock.\n", 0, 0, 0);
return PR_FALSE;
}
@@ -3808,9 +3812,8 @@ 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, LOG_ERR, NULL,
- "plugin_get_dn: failed to create plugin dn "
- "(plugin name: %s)\n", plugin->plg_name);
+ slapi_log_error(SLAPI_LOG_ERR, "plugin_get_dn",
+ "Failed to create plugin dn (plugin name: %s)\n", plugin->plg_name);
return NULL;
}
return plugindn;
@@ -4037,7 +4040,7 @@ static void trace_plugin_invocation (Slapi_DN *target_spec, PluginTargetData *pt
Slapi_DN *sdn;
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
+ slapi_log_error(SLAPI_LOG_ERR, "default_plugin_init",
"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],
@@ -4046,11 +4049,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, LOG_ERR, NULL, "target_subtree%d: %s\n", i, slapi_sdn_get_ndn (sdn));
+ slapi_log_error(SLAPI_LOG_ERR, "default_plugin_init", "target_subtree%d: %s\n", i, slapi_sdn_get_ndn (sdn));
sdn = ptd_get_next_subtree (ptd, &cookie);
}
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL, invoked ? "Plugin is invoked\n" : "Plugin is not invoked\n");
+ slapi_log_error(SLAPI_LOG_ERR, "default_plugin_init", invoked ? "Plugin is invoked\n" : "Plugin is not invoked\n");
}
#endif
@@ -4241,11 +4244,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, LOG_DEBUG, NULL,
+ slapi_log_error(SLAPI_LOG_PLUGIN, NULL,
"---- Plugin List (type %d) ----\n", i);
for ( tmp = list; tmp; tmp = tmp->plg_next )
{
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, NULL, " %s (precedence: %d)\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, NULL, " %s (precedence: %d)\n",
tmp->plg_name, tmp->plg_precedence);
}
}
@@ -4567,7 +4570,7 @@ slapi_plugin_call_preop_be_plugins(Slapi_PBlock *pb, int function)
break;
default:
/* invalid function */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapi_plugin_call_preop_betxn_plugins",
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_plugin_call_preop_betxn_plugins",
"Invalid function specified - backend plugins will not be called.\n");
return 0;
}
@@ -4614,7 +4617,7 @@ slapi_plugin_call_postop_be_plugins(Slapi_PBlock *pb, int function)
break;
default:
/* invalid function */
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapi_plugin_call_postop_betxn_plugins",
+ slapi_log_error(SLAPI_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 2824c5d..d82fb18 100644
--- a/ldap/servers/slapd/plugin_acl.c
+++ b/ldap/servers/slapd/plugin_acl.c
@@ -152,8 +152,8 @@ plugin_call_acl_mods_update ( Slapi_PBlock *pb, int optype )
}
if (NULL == sdn) {
- LDAPDebug0Args ( LDAP_DEBUG_ANY, LOG_ERR,
- "plugin_call_acl_mods_update: Null target DN\n" );
+ LDAPDebug0Args(LDAP_DEBUG_ERR,
+ "plugin_call_acl_mods_update - Null target DN\n" );
return LDAP_INVALID_DN_SYNTAX;
}
@@ -194,7 +194,7 @@ plugin_call_acl_verify_syntax ( Slapi_PBlock *pb, Slapi_Entry *e, char **errbuf
}
if ( !plugin_called ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "The ACL plugin is not initialized. The aci syntax cannot be verified\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "plugin_call_acl_verify_syntax - 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_internal_op.c b/ldap/servers/slapd/plugin_internal_op.c
index 3531029..e1a1ab9 100644
--- a/ldap/servers/slapd/plugin_internal_op.c
+++ b/ldap/servers/slapd/plugin_internal_op.c
@@ -209,8 +209,8 @@ slapi_seq_callback( const char *ibase,
if (ibase == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, NULL,
- "slapi_seq_callback: NULL parameter\n");
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_seq_callback",
+ "NULL parameter\n");
return -1;
}
@@ -265,8 +265,8 @@ 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, LOG_ERR, NULL,
- "slapi_search_internal_set_pb: NULL parameter\n");
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_search_internal_set_pb",
+ "NULL parameter\n");
return;
}
@@ -299,8 +299,8 @@ 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, LOG_ERR, NULL,
- "slapi_search_internal_set_pb: NULL parameter\n");
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_search_internal_set_pb",
+ "NULL parameter\n");
return;
}
@@ -331,8 +331,8 @@ 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, LOG_ERR, NULL,
- "slapi_seq_internal_set_pb: NULL parameter\n");
+ slapi_log_error(SLAPI_LOG_ERR, "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, LOG_ERR, NULL, "allow_operation: component identity is NULL\n");
+ slapi_log_error(SLAPI_LOG_ERR, "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, LOG_ERR, NULL, "allow_operation: plugin identity is NULL\n");
+ slapi_log_error(SLAPI_LOG_ERR, "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 6e77e38..a1eb6d8 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, LOG_DEBUG, "plugin_mr_find",
+ slapi_log_error(SLAPI_LOG_CONFIG, "plugin_mr_find",
"Error: matching rule plugin for [%s] not found\n", nameoroid);
}
@@ -122,11 +122,11 @@ plugin_mr_find_registered (char* oid)
{
if (!strcasecmp (oid, i->oi_oid))
{
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "plugin_mr_find_registered(%s) != NULL\n", oid, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, "plugin_mr_find_registered(%s) != NULL\n", oid, 0, 0);
return i->oi_plugin;
}
}
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "plugin_mr_find_registered(%s) == NULL\n", oid, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "=> plugin_mr_bind(%s)\n", oid, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> 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, LOG_DEBUG, "<= plugin_mr_bind\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_FILTER, "<= plugin_mr_bind\n", 0, 0, 0);
}
int /* an LDAP error code, hopefully LDAP_SUCCESS */
@@ -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, LOG_ERR, "mr_wrap_mr_index_sv_fn: error - no plugin specified\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "mr_wrap_mr_index_sv_fn - no plugin specified\n");
} else if (!pi->plg_mr_values2keys) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "mr_wrap_mr_index_sv_fn: error - plugin has no plg_mr_values2keys function\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "mr_wrap_mr_index_sv_fn - 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, LOG_ERR, "default_mr_filter_index",
+ slapi_log_error(SLAPI_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, LOG_DEBUG, "=> default_mr_filter_create\n");
+ LDAPDebug0Args(LDAP_DEBUG_FILTER, "=> 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, LOG_DEBUG, "=> default_mr_filter_create(oid %s; type %s)\n",
+ LDAPDebug2Args(LDAP_DEBUG_FILTER, "=> 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, LOG_DEBUG,
+ LDAPDebug2Args(LDAP_DEBUG_FILTER,
"=> 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, LOG_DEBUG, "<= default_mr_filter_create - unsupported filter type %d\n",
+ LDAPDebug1Arg(LDAP_DEBUG_FILTER, "<= default_mr_filter_create - unsupported filter type %d\n",
ftype);
goto done;
}
@@ -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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_FILTER,
"default_mr_filter_create: missing parameter: %s%s%s\n",
mrOID ? "" : " oid",
mrTYPE ? "" : " attribute type",
@@ -537,7 +537,7 @@ default_mr_filter_create(Slapi_PBlock *pb)
}
done:
- LDAPDebug1Arg(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> default_mr_filter_create: %d\n", rc);
+ LDAPDebug1Arg(LDAP_DEBUG_FILTER, "=> 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, LOG_ERR, "default_mr_indexer_create: error - no plugin specified\n");
+ LDAPDebug0Args(LDAP_DEBUG_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, LOG_ERR, "default_mr_indexer_create: warning - plugin [%s] does not handle %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_WARNING, "default_mr_indexer_create - 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, LOG_ERR, "default_mr_indexer_create: error - plugin [%s] has no plg_mr_values2keys function\n",
+ LDAPDebug1Arg(LDAP_DEBUG_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 d35349e..e9bbad4 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, LOG_DEBUG, "=> plugin_syntax_find (%s)\n", nameoroid, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_FILTER, "=> 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, LOG_DEBUG, "<= plugin_syntax_find %d\n", pi, 0, 0 ); */
+ /* LDAPDebug(LDAP_DEBUG_FILTER, "<= plugin_syntax_find %d\n", pi, 0, 0 ); */
return ( pi );
}
@@ -60,8 +60,8 @@ slapi_get_global_syntax_plugins()
char *
plugin_syntax2oid( struct slapdplugin *pi )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "the function plugin_syntax2oid is deprecated - please use attr_get_syntax_oid instead\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_NOTICE,
+ "plugin_syntax2oid() - This function is deprecated - please use attr_get_syntax_oid() instead\n", 0, 0, 0);
PR_ASSERT(0);
return( NULL );
}
@@ -72,8 +72,8 @@ plugin_call_syntax_get_compare_fn(
value_compare_fn_type *compare_fn
)
{
- 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);
+ LDAPDebug(LDAP_DEBUG_NOTICE,
+ "plugin_call_syntax_get_compare_fn() - This function is deprecated - please use attr_get_value_cmp_fn() instead\n", 0, 0, 0);
PR_ASSERT(0);
return( 0 );
}
@@ -101,8 +101,8 @@ plugin_call_syntax_filter_ava_sv(
Slapi_PBlock pipb;
IFP ava_fn = NULL;
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
- "=> plugin_call_syntax_filter_ava %s=%s\n", ava->ava_type,
+ LDAPDebug(LDAP_DEBUG_FILTER,
+ "=> plugin_call_syntax_filter_ava_sv %s=%s\n", ava->ava_type,
ava->ava_value.bv_val, 0 );
if ( ( a->a_mr_eq_plugin == NULL ) && ( a->a_mr_ord_plugin == NULL ) && ( a->a_plugin == NULL ) ) {
@@ -112,8 +112,8 @@ 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, LOG_DEBUG,
- "<= plugin_call_syntax_filter_ava no plugin for attr (%s)\n",
+ LDAPDebug(LDAP_DEBUG_FILTER,
+ "<= plugin_call_syntax_filter_ava_sv 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_FILTER,
"<= 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_FILTER,
"<= plugin_call_syntax_filter_ava: attr (%s) has no ava filter function\n",
a->a_type, 0, 0 );
}
break;
default:
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "plugin_call_syntax_filter_ava: "
- "unknown filter type %d\n", ftype, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "plugin_call_syntax_filter_ava - "
+ "Unknown filter type %d\n", ftype, 0, 0 );
rc = LDAP_PROTOCOL_ERROR;
break;
}
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_FILTER,
"<= 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_FILTER,
"=> 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_FILTER,
"<= 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, LOG_DEBUG, "<= plugin_call_syntax_filter_sub_sv %d\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, "<= plugin_call_syntax_filter_sub_sv %d\n",
rc, 0, 0 );
return( rc );
}
@@ -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, LOG_ERR, "Syntax Check",
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_dn_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, LOG_ERR, "Syntax Check",
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_entry_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, LOG_ERR, "Syntax Check", "\"%s\": (%s) value #%d invalid per syntax\n",
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_mods_syntax_check", "\"%s\": (%s) value #%d invalid per syntax\n",
dn ? dn : "NULL", mod->mod_type, j );
}
@@ -562,7 +562,7 @@ slapi_call_syntax_values2keys_sv(
Slapi_PBlock pipb;
struct slapdplugin *pi = vpi;
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "=> slapi_call_syntax_values2keys\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_FILTER,
"<= 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, LOG_DEBUG, "=> slapi_attr_values2keys_sv\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> 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, LOG_ERR, "<= slapi_attr_values2keys_sv: ERROR: unsupported filter type %d\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "slapi_attr_values2keys_sv_pb: 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_FILTER,
"<= 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, LOG_DEBUG, "=> slapi_call_syntax_values2keys\n",
+ LDAPDebug(LDAP_DEBUG_FILTER, "=> 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_FILTER,
"<= 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_FILTER,
"=> 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_FILTER,
"<= 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_FILTER,
"=> 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, LOG_ERR, "<= slapi_attr_assertion2keys_ava_sv: ERROR: unsupported filter type %d\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "slapi_attr_assertion2keys_ava_sv - 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_FILTER,
"<= 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_FILTER,
"=> 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_FILTER,
"<= 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_FILTER,
"=> 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_FILTER,
"<= 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 8c22847..d5e6f4b 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, LOG_ERR, "poll convert nfds=%d, timeout=%d\n", nfds, timeout,0);
+ LDAPDebug(LDAP_DEBUG_DEBUG, "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, LOG_ERR, "poll events = %d for fd=%d\n", filed[a].events, filed[a].fd,0);
+ LDAPDebug(LDAP_DEBUG_DEBUG, "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, LOG_ERR, "Unhandled poll event type=0x%x on FD(%d)\n",filed[a].events,filed[a].fd,0);
+ LDAPDebug(LDAP_DEBUG_DEBUG, "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, LOG_ERR, "For\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_DEBUG, "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, LOG_ERR, " file des=%d, events=0x%x, revents=0x%x\n", filed[b].fd, filed[b].events ,filed[b].revents);
+ LDAPDebug(LDAP_DEBUG_DEBUG, " 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, LOG_ERR, "poll returns %d (converted poll)\n",retval,0,0);
+ LDAPDebug(LDAP_DEBUG_DEBUG, "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 12507a1..a43bde7 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, LOG_ERR, FILE_CREATE_ERROR, dir, prerr, slapd_pr_strerror(prerr));
+ LDAPDebug(LDAP_DEBUG_ERR, "make_sure_dir_exists " 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, LOG_ERR, CHOWN_WARNING, dir, 0, 0);
+ LDAPDebug(LDAP_DEBUG_WARNING, "make_sure_dir_exists " CHOWN_WARNING, dir, 0, 0);
return 1;
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, STAT_ERROR, dir, errno, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "make_sure_dir_exists " 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, LOG_ERR, FILE_CREATE_WARNING, file_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_WARNING, "add_this_process_to" 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, LOG_ERR, CHOWN_WARNING, file_name, 0, 0);
+ LDAPDebug(LDAP_DEBUG_WARNING, "add_this_process_to" 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, LOG_ERR, NO_SERVER_DUE_TO_SERVER, running, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "add_new_slapd_process" NO_SERVER_DUE_TO_SERVER, running, 0, 0);
} else if (importing) {
result = -1;
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, NO_SERVER_DUE_TO_IMPORT, importing, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "add_new_slapd_process" 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, LOG_ERR, NO_DB2LDIFR_DUE_TO_USE, 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "add_new_slapd_process" 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, LOG_ERR, NO_DB2LDIF_DUE_TO_IMPORT, importing, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "add_new_slapd_process" 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, LOG_ERR, NO_DB2BAK_DUE_TO_IMPORT, importing, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "add_new_slapd_process" 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, LOG_ERR, NO_IMPORT_DUE_TO_USE, 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "add_new_slapd_process" 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, LOG_ERR, NO_DB2INDEX_DUE_TO_USE, 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "add_new_slapd_process" 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, LOG_ERR, NO_UPGRADEDB_DUE_TO_USE, 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "add_new_slapd_process" 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, LOG_ERR, NO_UPGRADEDNFORMAT_DUE_TO_USE, 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "add_new_slapd_process" 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, LOG_ERR, NO_DBTEST_DUE_TO_USE, 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "add_new_slapd_process" NO_DBTEST_DUE_TO_USE, 0, 0, 0);
result = -1;
} else {
add_this_process_to(import_dir);
diff --git a/ldap/servers/slapd/proto-slap.h b/ldap/servers/slapd/proto-slap.h
index 87652f7..ed584a4 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, int sev_level, char *fmt, ... );
+int slapd_log_error_proc( int sev_level, char *subsystem, 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 b11e17c..8b36974 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, LOG_ERR, "init_psearch_list: cannot initialize lock structure. "
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "init_psearch_list: cannot create new lock. "
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "init_psearch_list: cannot create new condition variable. "
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR,"persistent search PR_CreateThread()failed in the "
+ LDAPDebug(LDAP_DEBUG_ERR,"ps_add - PR_CreateThread()failed in the "
"ps_add function: " SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
prerr, slapd_pr_strerror(prerr), 0);
@@ -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, LOG_DEBUG, "Persistent Search",
+ slapi_log_error(SLAPI_LOG_CONNS, "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, LOG_DEBUG, "Persistent Search",
+ slapi_log_error(SLAPI_LOG_CONNS, "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, LOG_DEBUG, "Persistent Search",
+ slapi_log_error(SLAPI_LOG_CONNS, "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, LOG_DEBUG, "Persistent Search",
+ slapi_log_error(SLAPI_LOG_CONNS, "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 */
@@ -438,7 +438,7 @@ psearch_alloc(void)
ps->ps_pblock = NULL;
if (( ps->ps_lock = PR_NewLock()) == NULL ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "psearch_add: cannot create new lock. "
+ LDAPDebug(LDAP_DEBUG_ERR, "psearch_alloc - Cannot create new lock. "
"Persistent search abandoned.\n", 0, 0, 0 );
slapi_ch_free((void **)&ps);
return( NULL );
@@ -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, LOG_DEBUG, "Persistent Search",
+ slapi_log_error(SLAPI_LOG_CONNS, "Persistent Search",
"conn=%" NSPRIu64 " op=%d entry %s with chgtype %d "
"matches the ps changetype %d\n",
ps->ps_pblock->pb_conn->c_connid,
@@ -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, LOG_ERR, "ps_service_persistent_searches:"
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG, "ps_service_persistent_searches: enqueued entry "
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "ps_service_persistent_searches: entry "
+ LDAPDebug(LDAP_DEBUG_TRACE, "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 e755028..b966dcb 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, LOG_ERR, "pwdpolicy", "pw_send_ldap_result: no operation\n");
+ slapi_log_error(SLAPI_LOG_ERR, "pw_send_ldap_result", "No operation\n");
return;
}
internal_op= operation_is_flag_set(operation, OP_FLAG_INTERNAL);
@@ -112,7 +112,7 @@ slapi_pw_find_sv(
char *valpwd;
int i;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> slapi_pw_find value: \"%s\"\n", slapi_value_get_string(v), 0, 0 ); /* JCM Innards */
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"<= 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, LOG_DEBUG, "<= slapi_pw_find no matching password\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= slapi_pw_find no matching password\n", 0, 0, 0 );
return( 1 ); /* no match */
}
@@ -171,8 +171,9 @@ char* slapi_encode_ext (Slapi_PBlock *pb, const Slapi_DN *sdn, char *value, char
if (pws_enc == NULL)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "pwdpolicy",
- "slapi_encode: no server scheme\n" );
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_encode_ext",
+ "no encoding password storage scheme found for %s\n",
+ pwpolicy->pw_storagescheme->pws_name );
return NULL;
}
}
@@ -183,13 +184,13 @@ 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, LOG_ERR, "pwdpolicy",
- "slapi_encode: invalid scheme - %s\n"
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_encode_ext",
+ "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, LOG_ERR, "pwdpolicy",
- "slapi_encode: invalid scheme - %s\n"
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_encode_ext",
+ "Invalid scheme - %s\n"
"no pwdstorage scheme plugin loaded", alg);
}
return NULL;
@@ -601,8 +602,8 @@ 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, LOG_ERR, "pwdpolicy",
- "update_pw_info: param error - no password entry/target dn/operation\n");
+ slapi_log_error(SLAPI_LOG_ERR, "update_pw_info",
+ "Param error - no password entry/target dn/operation\n");
return -1;
}
internal_op = slapi_operation_is_flag_set(operation, SLAPI_OP_FLAG_INTERNAL);
@@ -809,8 +810,8 @@ 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, LOG_ERR, "pwdpolicy",
- "check_pw_syntax_ext: no passwords to check\n" );
+ slapi_log_error(SLAPI_LOG_ERR, "check_pw_syntax_ext",
+ "No passwords to check\n" );
return -1;
}
@@ -820,7 +821,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, LOG_ERR, "pwdpolicy", "check_pw_syntax_ext: no operation\n");
+ slapi_log_error(SLAPI_LOG_ERR, "check_pw_syntax_ext", "No slapi operation\n");
return -1;
}
internal_op = slapi_operation_is_flag_set(operation, SLAPI_OP_FLAG_INTERNAL);
@@ -1228,8 +1229,8 @@ 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, LOG_ERR,
- "WARNING: passwordPolicy modify error %d on entry '%s'\n", res, dn);
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "update_pw_history - Modify error %d on entry '%s'\n", res, dn);
}
pblock_done(&mod_pb);
slapi_ch_free_string(&str);
@@ -1324,7 +1325,7 @@ slapi_add_pwd_control ( Slapi_PBlock *pb, char *arg, long time) {
LDAPControl new_ctrl;
char buf[12];
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> slapi_add_pwd_control\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> slapi_add_pwd_control\n", 0, 0, 0 );
sprintf( buf, "%ld", time );
new_ctrl.ldctl_oid = arg;
@@ -1353,7 +1354,7 @@ add_password_attrs( Slapi_PBlock *pb, Operation *op, Slapi_Entry *e )
int isShadowAccount = 0;
int has_shadowLastChange = 0;
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "add_password_attrs\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "add_password_attrs\n");
bvals[0] = &bv;
bvals[1] = NULL;
@@ -1597,7 +1598,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, LOG_ERR, "pw_get_admin_users: search failed for %s: error %d - "
+ LDAPDebug(LDAP_DEBUG_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;
@@ -1753,8 +1754,8 @@ new_passwdPolicy(Slapi_PBlock *pb, const char *dn)
slapi_entry_free( e );
if ( pw_entry == NULL ) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "loading global password policy for %s"
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "new_passwdPolicy - Loading global password policy for %s"
"--local policy entry not found\n", dn);
goto done;
}
@@ -1773,8 +1774,8 @@ 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, LOG_ERR,
- "Password Policy Entry%s: Invalid passwordMinAge: %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "new_passwdPolicy - %s - Invalid passwordMinAge: %s\n",
slapi_entry_get_dn_const(pw_entry),
slapi_value_get_string(*sval));
}
@@ -1785,8 +1786,8 @@ 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, LOG_ERR,
- "Password Policy Entry%s: Invalid passwordMaxAge: %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "new_passwdPolicy - %s - Invalid passwordMaxAge: %s\n",
slapi_entry_get_dn_const(pw_entry),
slapi_value_get_string(*sval));
}
@@ -1797,8 +1798,8 @@ 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, LOG_ERR,
- "Password Policy Entry%s: Invalid passwordWarning: %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "new_passwdPolicy - %s - Invalid passwordWarning: %s\n",
slapi_entry_get_dn_const(pw_entry),
slapi_value_get_string(*sval));
}
@@ -2077,7 +2078,7 @@ slapi_pwpolicy_make_response_control (Slapi_PBlock *pb, int seconds, int logins,
passwordInHistory (8) } }
*/
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> slapi_pwpolicy_make_response_control", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> slapi_pwpolicy_make_response_control", 0, 0, 0 );
if ( ( ber = ber_alloc()) == NULL )
{
return rc;
@@ -2123,7 +2124,7 @@ slapi_pwpolicy_make_response_control (Slapi_PBlock *pb, int seconds, int logins,
ber_bvfree(bvp);
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<= slapi_pwpolicy_make_response_control (%d)", rc, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= slapi_pwpolicy_make_response_control (%d)", rc, 0, 0 );
return (rc==-1?LDAP_OPERATIONS_ERROR:LDAP_SUCCESS);
}
@@ -2554,10 +2555,8 @@ 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, LOG_ERR, "pwdpolicy",
- "pw_entry_constructor: slapi_new_rwlock() failed\n");
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "pwdpolicy",
- "WARNING: the server cannot handle unhashed password.\n");
+ slapi_log_error(SLAPI_LOG_ERR, "pw_entry_constructor",
+ "slapi_new_rwlock() failed\n");
return NULL;
}
pw_extp = (struct slapi_pw_entry_ext *)slapi_ch_calloc(1,
@@ -2596,8 +2595,8 @@ pw_exp_init ( void )
pw_entry_destructor,
&pw_entry_objtype,
&pw_entry_handle) != 0) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "pwdpolicy",
- "pw_init: slapi_register_object_extension failed; "
+ slapi_log_error(SLAPI_LOG_ERR, "pw_exp_init",
+ "slapi_register_object_extension failed; "
"unhashed password is not able to access\n");
}
}
@@ -2612,16 +2611,15 @@ 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, LOG_ERR, "pwdpolicy",
- "slapi_pw_get_entry_ext: output param vals is NULL.\n");
+ slapi_log_error(SLAPI_LOG_ERR, "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, LOG_DEBUG, NULL,
- "slapi_pw_get_entry_ext: pw_entry_extension is not "
- "registered\n");
+ slapi_log_error(SLAPI_LOG_TRACE, "slapi_pw_get_entry_ext",
+ "pw_entry_extension is not registered\n");
return LDAP_OPERATIONS_ERROR;
}
@@ -2630,8 +2628,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, LOG_DEBUG, NULL,
- "slapi_pw_get_entry_ext: "
+ slapi_log_error(SLAPI_LOG_TRACE, "slapi_pw_get_entry_ext",
"pw_entry_extension is not set\n");
return LDAP_NO_SUCH_ATTRIBUTE;
}
@@ -2650,8 +2647,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, LOG_DEBUG, NULL,
- "slapi_pw_set_entry_ext: "
+ slapi_log_error(SLAPI_LOG_TRACE, "slapi_pw_set_entry_ext",
"pw_entry_extension is not registered\n");
return LDAP_OPERATIONS_ERROR;
}
@@ -2661,8 +2657,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, LOG_DEBUG, NULL,
- "slapi_pw_set_entry_ext: "
+ slapi_log_error(SLAPI_LOG_TRACE, "slapi_pw_set_entry_ext",
"pw_entry_extension is not set\n");
return LDAP_NO_SUCH_ATTRIBUTE;
}
@@ -2691,8 +2686,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, LOG_DEBUG, NULL,
- "pw_copy_entry_ext: "
+ slapi_log_error(SLAPI_LOG_TRACE, "pw_copy_entry_ext",
"pw_entry_extension is not registered\n");
return LDAP_OPERATIONS_ERROR;
}
@@ -2702,9 +2696,8 @@ 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, LOG_DEBUG, NULL,
- "pw_copy_entry_ext: source pw_entry_extension is "
- "not set\n");
+ slapi_log_error(SLAPI_LOG_TRACE, "pw_copy_entry_ext",
+ "Source pw_entry_extension is not set\n");
return LDAP_NO_SUCH_ATTRIBUTE;
}
@@ -2715,8 +2708,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, LOG_DEBUG, NULL,
- "pw_copy_entry_ext: "
+ slapi_log_error(SLAPI_LOG_TRACE, "pw_copy_entry_ext",
"dest pw_entry_extension is not set\n");
return LDAP_NO_SUCH_ATTRIBUTE;
}
@@ -2741,8 +2733,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, LOG_DEBUG, NULL,
- "slapi_get_first_clear_text_pw: "
+ slapi_log_error(SLAPI_LOG_TRACE, "slapi_get_first_clear_text_pw",
"pw_entry_extension is not registered\n");
return NULL;
}
@@ -2752,8 +2743,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, LOG_DEBUG, NULL,
- "slapi_get_first_clear_text_pw: "
+ slapi_log_error(SLAPI_LOG_TRACE, "slapi_get_first_clear_text_pw",
"pw_entry_extension is not set\n");
return NULL;
}
@@ -2858,7 +2848,7 @@ add_shadow_ext_password_attrs(Slapi_PBlock *pb, Slapi_Entry **e)
return rc;
}
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "--> add_shadow_password_attrs\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "--> add_shadow_password_attrs\n");
/* shadowMin - the minimum number of days required between password changes. */
if (pwpolicy->pw_minage > 0) {
@@ -2980,6 +2970,6 @@ add_shadow_ext_password_attrs(Slapi_PBlock *pb, Slapi_Entry **e)
*/
#endif
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- add_shadow_password_attrs\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "<-- add_shadow_password_attrs\n");
return rc;
}
diff --git a/ldap/servers/slapd/pw_retry.c b/ldap/servers/slapd/pw_retry.c
index 024b1c1..a5bc402 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, LOG_DEBUG,
+ LDAPDebug0Args(LDAP_DEBUG_TRACE,
"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, LOG_DEBUG,
+ LDAPDebug2Args(LDAP_DEBUG_TRACE,
"WARNING: 'get_entry' can't find entry '%s', err %d\n",
target_dn, search_result);
}
@@ -246,8 +246,8 @@ 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, LOG_ERR,
- "WARNING: passwordPolicy modify error %d on entry '%s'\n",
+ LDAPDebug2Args(LDAP_DEBUG_WARNING,
+ "pw_apply_mods - 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 fc26a65..2936575 100644
--- a/ldap/servers/slapd/referral.c
+++ b/ldap/servers/slapd/referral.c
@@ -46,8 +46,8 @@ g_get_global_referrals(void)
global_referrals.ra_rwlock = slapi_new_rwlock();
if (global_referrals.ra_rwlock == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ref_array_init: new lock creation failed\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "g_get_global_referrals - New lock creation failed\n", 0, 0, 0);
exit (-1);
}
@@ -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, LOG_ERR, "ref_adjust: referrals suppressed "
+ LDAPDebug0Args(LDAP_DEBUG_ANY, "ref_adjust - Referrals suppressed "
"(could not get target DN, operation, "
"or scope from pblock)\n" );
return( NULL );
@@ -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, LOG_DEBUG, "ref_adjust: \"%s\" -> \"%s\"\n",
+ LDAPDebug(LDAP_DEBUG_ARGS, "ref_adjust: \"%s\" -> \"%s\"\n",
urls[i]->bv_val, urlscopy[i]->bv_val, 0 );
}
}
diff --git a/ldap/servers/slapd/resourcelimit.c b/ldap/servers/slapd/resourcelimit.c
index 18527d6..422f05f 100644
--- a/ldap/servers/slapd/resourcelimit.c
+++ b/ldap/servers/slapd/resourcelimit.c
@@ -171,15 +171,15 @@ reslimit_init( void )
reslimit_connext_destructor,
&reslimit_connext_objtype, &reslimit_connext_handle )
!= 0 ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPI_RESLIMIT_MODULE,
- "reslimit_init: slapi_register_object_extension()"
+ slapi_log_error(SLAPI_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, LOG_ERR, SLAPI_RESLIMIT_MODULE,
- "reslimit_init: slapi_new_rwlock() failed\n" );
+ slapi_log_error(SLAPI_LOG_ERR, SLAPI_RESLIMIT_MODULE,
+ "reslimit_init - slapi_new_rwlock() failed\n" );
return( -1 );
}
@@ -232,8 +232,8 @@ reslimit_connext_constructor( void *object, void *parent )
Slapi_RWLock *rwlock;
if (( rwlock = slapi_new_rwlock()) == NULL ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, SLAPI_RESLIMIT_MODULE,
- "reslimit_connext_constructor: slapi_new_rwlock() failed\n" );
+ slapi_log_error(SLAPI_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, LOG_ERR, SLAPI_RESLIMIT_MODULE,
+ slapi_log_error(SLAPI_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, LOG_ERR, SLAPI_RESLIMIT_MODULE,
+ slapi_log_error(SLAPI_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, LOG_DEBUG, "=> %s conn=0x%x, entry=0x%x\n",
+ LDAPDebug(SLAPI_RESLIMIT_TRACELEVEL, "=> %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, LOG_DEBUG,
+ LDAPDebug(SLAPI_RESLIMIT_TRACELEVEL,
"%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, LOG_DEBUG,
+ LDAPDebug(SLAPI_RESLIMIT_TRACELEVEL,
"%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, LOG_ERR, SLAPI_RESLIMIT_MODULE,
+ slapi_log_error(SLAPI_LOG_WARNING, 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, LOG_DEBUG, "<= %s returning status %d\n",
+ LDAPDebug(SLAPI_RESLIMIT_TRACELEVEL, "<= %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, LOG_DEBUG, "=> %s attrname=%s\n",
+ LDAPDebug(SLAPI_RESLIMIT_TRACELEVEL, "=> %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, LOG_ERR, SLAPI_RESLIMIT_MODULE,
+ slapi_log_error(SLAPI_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, LOG_ERR, SLAPI_RESLIMIT_MODULE,
+ slapi_log_error(SLAPI_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, LOG_ERR, SLAPI_RESLIMIT_MODULE,
+ slapi_log_error(SLAPI_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, LOG_DEBUG,
+ LDAPDebug(SLAPI_RESLIMIT_TRACELEVEL,
"<= %s returning status=%d, handle=%d\n", fnname, rc,
(handlep == NULL) ? -1 : *handlep );
@@ -566,15 +566,15 @@ slapi_reslimit_get_integer_limit( Slapi_Connection *conn, int handle,
int rc;
SLAPIResLimitConnData *rlcdp;
- LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL, LOG_DEBUG, "=> %s conn=0x%x, handle=%d\n",
+ LDAPDebug(SLAPI_RESLIMIT_TRACELEVEL, "=> %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, LOG_ERR, SLAPI_RESLIMIT_MODULE,
- "%s: parameter error\n", fnname );
+ slapi_log_error(SLAPI_LOG_ERR, SLAPI_RESLIMIT_MODULE,
+ "slapi_reslimit_get_integer_limit - %s: parameter error\n", fnname );
rc = SLAPI_RESLIMIT_STATUS_PARAM_ERROR;
goto log_and_return;
}
@@ -595,8 +595,8 @@ 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, LOG_ERR, SLAPI_RESLIMIT_MODULE,
- "%s: unknown handle %d\n", fnname, handle );
+ slapi_log_error(SLAPI_LOG_ERR, SLAPI_RESLIMIT_MODULE,
+ "slapi_reslimit_get_integer_limit - %s: unknown handle %d\n", fnname, handle );
rc = SLAPI_RESLIMIT_STATUS_UNKNOWN_HANDLE;
} else if ( rlcdp->rlcd_integer_available[ handle ] ) {
*limitp = rlcdp->rlcd_integer_value[ 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, LOG_DEBUG,
+ LDAPDebug(SLAPI_RESLIMIT_TRACELEVEL,
"<= %s returning SUCCESS, value=%d\n", fnname, *limitp, 0 );
} else if ( rc == SLAPI_RESLIMIT_STATUS_NOVALUE ) {
- LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL, LOG_DEBUG, "<= %s returning NO VALUE\n",
+ LDAPDebug(SLAPI_RESLIMIT_TRACELEVEL, "<= %s returning NO VALUE\n",
fnname, 0, 0 );
} else {
- LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL, LOG_DEBUG, "<= %s returning ERROR %d\n",
+ LDAPDebug(SLAPI_RESLIMIT_TRACELEVEL, "<= %s returning ERROR %d\n",
fnname, rc, 0 );
}
}
diff --git a/ldap/servers/slapd/result.c b/ldap/servers/slapd/result.c
index bd3c81e..6cafa3a 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, LOG_DEBUG, "=> send_ldap_intermediate\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_ERR, "ber_alloc failed\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "send_ldap_intermediate - 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, LOG_ERR, "ber_printf failed 0\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "send_ldap_intermediate - 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, LOG_DEBUG, "<= send_ldap_intermediate\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= send_ldap_intermediate\n", 0, 0, 0 );
return rc;
}
@@ -385,7 +385,7 @@ send_ldap_result_ext(
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> send_ldap_result %d:%s:%s\n", err,
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_ERR, "ber_alloc failed\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "send_ldap_result_ext - 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, LOG_ERR, "ber_printf failed 1\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "send_ldap_result_ext - 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, LOG_DEBUG, "<= send_ldap_result\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_ERR, "process_read_entry_controls: Read Entry Controls "
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "process_read_entry_controls: Read Entry Controls "
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "process_read_entry_controls: unable to retrieve entry\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG, "process_read_entry_controls: access to entry not allowed (%s)\n",
+ LDAPDebug(LDAP_DEBUG_ACL, "process_read_entry_controls - Access to entry not allowed (%s)\n",
slapi_entry_get_dn_const(e), 0, 0 );
rc = -1;
goto done;
@@ -734,8 +734,8 @@ 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, LOG_ERR, "process_read_entry_controls: Error, both no attributes \"1.1\" and "
- "specific attributes were requeseted.\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "process_read_entry_controls - Both no attributes \"1.1\" and "
+ "specific attributes were requested.\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, LOG_ERR, "process_read_entry_controls: invalid control value.\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "process_read_entry_controls - Invalid control value.\n",0,0,0);
rc = -1;
goto free;
}
@@ -765,8 +765,8 @@ process_read_entry_controls(Slapi_PBlock *pb, char *oid)
ber_bvfree(res_value);
} else {
/* failed to encode the result entry */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to process READ ENTRY Control (%s), error encoding result entry\n",
- oid, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "process_read_entry_controls - Failed to process READ ENTRY"
+ " Control (%s), error encoding result entry\n", oid, 0, 0 );
rc = -1;
}
@@ -776,8 +776,8 @@ free:
}
if(rc != 0){
/* log an error */
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Failed to process READ ENTRY Control (%s) ber decoding error\n",
- oid, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "process_read_entry_controls - Failed to process READ ENTRY "
+ "Control (%s) ber decoding error\n", oid, 0, 0 );
}
}
done:
@@ -818,7 +818,7 @@ send_ldapv3_referral(
slapi_pblock_get (pb, SLAPI_OPERATION, &operation);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> send_ldapv3_referral\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_ERR, "ber_alloc failed\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "send_ldapv3_referral - 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, LOG_ERR, "ber_printf failed 2\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "send_ldapv3_referral - 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, LOG_ERR, "ber_printf failed 3\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "send_ldapv3_referral - 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, LOG_ERR, "ber_printf failed 4\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "encode_attr_2 - 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,8 +996,8 @@ encode_attr_2(
{
if ( ber_printf( ber, "o", v->bv.bv_val,v->bv.bv_len ) == -1 )
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ber_printf failed 5\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "encode_attr_2 - ber_printf failed 5\n", 0, 0, 0 );
ber_free( ber, 1 );
send_ldap_result( pb, LDAP_OPERATIONS_ERROR,
NULL, "ber_printf value", 0, NULL );
@@ -1008,7 +1008,7 @@ encode_attr_2(
}
if ( ber_printf( ber, "]}" ) == -1 ) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "ber_printf failed 6\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "encode_attr_2 - 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, LOG_DEBUG, "=> send_ldap_search_entry (%s)\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> send_ldap_search_entry_ext (%s)\n",
e ? slapi_entry_get_dn_const(e) : "null", 0, 0 );
/* set current entry */
@@ -1502,9 +1502,9 @@ 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, LOG_ERR,
- "error returned by pre entry plugins for entry %s\n",
- e?slapi_entry_get_dn_const(e):"null", 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "send_ldap_search_entry_ext - Error %d returned by pre entry plugins for entry %s\n",
+ rc, e?slapi_entry_get_dn_const(e):"null", 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, LOG_DEBUG, "acl: access to entry not allowed\n",
+ LDAPDebug(LDAP_DEBUG_ACL, "send_ldap_search_entry_ext - 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, LOG_ERR, "ber_alloc failed\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "send_ldap_search_entry_ext - 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, LOG_ERR, "ber_printf failed 7\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "send_ldap_search_entry_ext - ber_printf failed 7\n", 0, 0, 0 );
send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL,
"ber_printf dn", 0, NULL );
goto cleanup;
@@ -1594,8 +1594,8 @@ 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, LOG_DEBUG,
- "Accepting illegal other attributes specified with "
+ LDAPDebug(LDAP_DEBUG_TRACE,
+ "send_ldap_search_entry_ext - 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, LOG_ERR, "ber_printf failed 8\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "send_ldap_search_entry_ext - 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, LOG_DEBUG, "<= send_ldap_search_entry\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= send_ldap_search_entry_ext\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, LOG_DEBUG, "ber_flush skipped because the "
+ LDAPDebug(LDAP_DEBUG_CONNS, "flush_ber 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,8 +1796,8 @@ flush_ber(
* and the status needs to be updated to reflect it */
op->o_status = SLAPI_OP_STATUS_ABANDONED;
- LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
- "ber_flush failed, error %d (%s)\n",
+ LDAPDebug(LDAP_DEBUG_CONNS,
+ "flush_ber failed, error %d (%s)\n",
oserr, slapd_system_strerror( oserr ), 0 );
if (op->o_flags & OP_FLAG_PS) {
/* We need to tell disconnect_server() not to ding
@@ -1811,7 +1811,7 @@ flush_ber(
ber_free( ber, 1 );
} else {
PRUint64 b;
- LDAPDebug(LDAP_DEBUG_BER, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_BER,
"flush_ber() wrote %u bytes to socket %d\n",
bytes, conn->c_sd, 0 );
LL_I2L ( b, bytes ) ;
@@ -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, LOG_ERR, "Internal search" , "Unindexed search: source (%s) "
+ slapi_log_error(SLAPI_LOG_ERR, "log_result", "Internal 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);
@@ -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, LOG_ERR,"encode_read_entry: Error, both real and virtual attributes "
+ LDAPDebug(LDAP_DEBUG_ERR,"encode_read_entry - 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 f852061..57e5a5e 100644
--- a/ldap/servers/slapd/sasl_io.c
+++ b/ldap/servers/slapd/sasl_io.c
@@ -77,10 +77,10 @@ debug_print_layers(PRFileDesc *fd)
PRSocketOptionData sod;
PRInt32 err;
- LDAPDebug2Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
+ LDAPDebug2Args(LDAP_DEBUG_CONNS,
"debug_print_layers: fd %d sasl_io_recv = %p\n",
PR_FileDesc2NativeHandle(fd), sasl_io_recv );
- LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_CONNS,
"debug_print_layers: fd name %s type = %d recv = %p\n",
PR_GetNameForIdentity(fd->identity),
PR_GetDescType(fd),
@@ -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, LOG_DEBUG,
+ LDAPDebug2Args(LDAP_DEBUG_CONNS,
"debug_print_layers: error getting nonblocking option: %d %s\n",
err, slapd_pr_strerror(err) );
} else {
- LDAPDebug1Arg( LDAP_DEBUG_CONNS, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_CONNS,
"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, LOG_DEBUG,
+ LDAPDebug2Args(LDAP_DEBUG_CONNS,
"debug_print_layers: error getting reuseaddr option: %d %s\n",
err, slapd_pr_strerror(err) );
} else {
- LDAPDebug1Arg( LDAP_DEBUG_CONNS, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_CONNS,
"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, LOG_DEBUG,
+ LDAPDebug2Args(LDAP_DEBUG_CONNS,
"debug_print_layers: error getting recvbuffer option: %d %s\n",
err, slapd_pr_strerror(err) );
} else {
- LDAPDebug1Arg( LDAP_DEBUG_CONNS, LOG_DEBUG,
+ LDAPDebug1Arg(LDAP_DEBUG_CONNS,
"debug_print_layers: recvbuffer %d\n", sod.value.recv_buffer_size );
}
fd = fd->lower;
@@ -197,18 +197,18 @@ 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, LOG_DEBUG,
- "sasl_io_start_packet: read sasl packet length returned %d on connection %" NSPRIu64 "\n",
+ LDAPDebug(LDAP_DEBUG_CONNS,
+ "sasl_io_start_packet - read sasl packet length returned %d on connection %" NSPRIu64 "\n",
ret, c->c_connid, 0 );
if (ret <= 0) {
*err = PR_GetError();
if (ret == 0) {
- LDAPDebug1Arg( LDAP_DEBUG_CONNS, LOG_DEBUG,
- "sasl_io_start_packet: connection closed while reading sasl packet length on connection %" NSPRIu64 "\n",
+ LDAPDebug1Arg(LDAP_DEBUG_CONNS,
+ "sasl_io_start_packet - connection closed while reading sasl packet length on connection %" NSPRIu64 "\n",
c->c_connid );
} else {
- LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
- "sasl_io_start_packet: error reading sasl packet length on connection %" NSPRIu64 " %d:%s\n",
+ LDAPDebug(LDAP_DEBUG_CONNS,
+ "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;
@@ -224,8 +224,8 @@ 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, LOG_DEBUG,
- "sasl_io_start_packet: read only %d bytes of sasl packet "
+ LDAPDebug2Args(LDAP_DEBUG_CONNS,
+ "sasl_io_start_packet - read only %d bytes of sasl packet "
"length on connection %" NSPRIu64 "\n", ret, c->c_connid );
#if defined(EWOULDBLOCK)
errno = 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, LOG_DEBUG, "sasl_io_start_packet", "conn=%" NSPRIu64 " fd=%d "
+ slapi_log_error(SLAPI_LOG_CONNS, "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, LOG_ERR, "connection",
+ slapi_log_error(SLAPI_LOG_ERR, "sasl_io_start_packet",
"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",
@@ -303,8 +303,8 @@ 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, LOG_DEBUG,
- "Continued: read sasl packet length returned %d on connection %" NSPRIu64 "\n",
+ LDAPDebug(LDAP_DEBUG_CONNS,
+ "sasl_io_start_packet - 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){
sasl_io_resize_encrypted_buffer(sp, ret + sp->encrypted_buffer_offset);
@@ -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, LOG_DEBUG, "sasl_io_start_packet: error reading sasl packet length on connection "
+ LDAPDebug(LDAP_DEBUG_CONNS, "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;
}
@@ -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, LOG_DEBUG, "sasl_io_start_packet", "conn=%" NSPRIu64 " fd=%d "
+ slapi_log_error(SLAPI_LOG_CONNS, "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, LOG_DEBUG, "sasl_io_start_packet", "conn=%" NSPRIu64 " fd=%d "
+ slapi_log_error(SLAPI_LOG_CONNS, "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, LOG_DEBUG, "sasl_io_start_packet", "conn=%" NSPRIu64 " fd=%d "
+ slapi_log_error(SLAPI_LOG_CONNS, "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, LOG_DEBUG,
+ LDAPDebug2Args(LDAP_DEBUG_CONNS,
"read sasl packet length %ld on connection %" NSPRIu64 "\n",
packet_length, c->c_connid );
@@ -404,8 +404,8 @@ 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, LOG_ERR,
- "SASL encrypted packet length exceeds maximum allowed limit (length=%ld, limit=%ld)."
+ LDAPDebug2Args(LDAP_DEBUG_ANY,
+ "sasl_io_start_packet - 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() );
PR_SetError(PR_BUFFER_OVERFLOW_ERROR, 0);
@@ -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, LOG_DEBUG,
+ LDAPDebug2Args(LDAP_DEBUG_CONNS,
"sasl_io_read_packet: reading %d bytes for connection %" NSPRIu64 "\n",
bytes_remaining_to_read,
c->c_connid );
@@ -437,10 +437,10 @@ sasl_io_read_packet(PRFileDesc *fd, PRIntn flags, PRIntervalTime timeout, PRInt3
if (ret <= 0) {
*err = PR_GetError();
if (ret == 0) {
- LDAPDebug1Arg( LDAP_DEBUG_CONNS, LOG_DEBUG,
+ 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_CONNS,
"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,10 +461,10 @@ 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, 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, LOG_DEBUG,
- "sasl_io_recv for connection %" NSPRIu64 " len %d encrypted buffer count %d\n", c->c_connid, len, sp->encrypted_buffer_count );
+ LDAPDebug(LDAP_DEBUG_CONNS,
+ "sasl_io_recv - Connection %" NSPRIu64 " len %d bytes_in_buffer %d\n", c->c_connid, len, bytes_in_buffer );
+ LDAPDebug(LDAP_DEBUG_CONNS,
+ "sasl_io_recv - 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... */
if (!sasl_io_reading_packet(sp)) {
@@ -497,8 +497,8 @@ 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, LOG_DEBUG,
- "sasl_io_recv for connection %" NSPRIu64 " - not finished reading packet yet\n", c->c_connid, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_CONNS,
+ "sasl_io_recv - Connection %" NSPRIu64 " - not finished reading packet yet\n", c->c_connid, 0, 0 );
#if defined(EWOULDBLOCK)
errno = EWOULDBLOCK;
#elif defined(EAGAIN)
@@ -511,16 +511,16 @@ 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, LOG_DEBUG,
- "sasl_io_recv finished reading packet for connection %" NSPRIu64 "\n", c->c_connid );
+ LDAPDebug1Arg(LDAP_DEBUG_CONNS,
+ "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);
/* even if decode fails, need re-initialize the encrypted_buffer */
sp->encrypted_buffer_offset = 0;
sp->encrypted_buffer_count = 0;
if (SASL_OK == ret) {
- LDAPDebug2Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
- "sasl_io_recv decoded packet length %d for connection %" NSPRIu64 "\n", output_length, c->c_connid );
+ LDAPDebug2Args(LDAP_DEBUG_CONNS,
+ "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);
memcpy(sp->decrypted_buffer,output_buffer,output_length);
@@ -529,8 +529,8 @@ sasl_io_recv(PRFileDesc *fd, void *buf, PRInt32 len, PRIntn flags,
bytes_in_buffer = output_length;
}
} else {
- LDAPDebug1Arg( LDAP_DEBUG_ANY, LOG_ERR,
- "sasl_io_recv failed to decode packet for connection %" NSPRIu64 "\n", c->c_connid );
+ LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ "sasl_io_recv - Failed to decode packet for connection %" NSPRIu64 "\n", c->c_connid );
PR_SetError(PR_IO_ERROR, 0);
return PR_FAILURE;
}
@@ -547,12 +547,12 @@ 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, LOG_DEBUG,
- "sasl_io_recv all decrypted data returned for connection %" NSPRIu64 "\n", c->c_connid );
+ LDAPDebug1Arg(LDAP_DEBUG_CONNS,
+ "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, LOG_DEBUG,
- "sasl_io_recv returning %d bytes to caller %d bytes left to return for connection %" NSPRIu64 "\n",
+ LDAPDebug(LDAP_DEBUG_CONNS,
+ "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,
c->c_connid );
@@ -582,28 +582,28 @@ 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, LOG_DEBUG,
- "sasl_io_send writing %d bytes\n", amount );
+ LDAPDebug1Arg(LDAP_DEBUG_CONNS,
+ "sasl_io_send - Writing %d bytes\n", amount );
if (sp->send_encrypted) {
/* Get SASL to encrypt the buffer */
if (NULL == sp->send_buffer) {
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, LOG_DEBUG,
- "sasl_io_send could not encode %d bytes - sasl error %s\n",
+ LDAPDebug2Args(LDAP_DEBUG_ANY,
+ "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, LOG_DEBUG,
- "sasl_io_send encoded as %d bytes\n", sp->send_size );
+ LDAPDebug1Arg(LDAP_DEBUG_CONNS,
+ "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, LOG_DEBUG,
- "sasl_io_send - client requested to send %d bytes but we "
+ LDAPDebug2Args(LDAP_DEBUG_ANY,
+ "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);
PR_SetError(PR_BUFFER_OVERFLOW_ERROR, EMSGSIZE);
@@ -616,8 +616,8 @@ 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, LOG_DEBUG,
- "sasl_io_send error: only sent %d of %d encoded bytes\n", ret,
+ LDAPDebug2Args(LDAP_DEBUG_CONNS,
+ "sasl_io_send - error: only sent %d of %d encoded bytes\n", ret,
(sp->send_size - sp->send_offset) );
sp->send_offset += ret;
ret = PR_FAILURE;
@@ -656,8 +656,8 @@ sasl_pop_IO_layer(PRFileDesc* stack, int doclose)
/* see if stack has the sasl io layer */
if (!sasl_LayerID || !stack) {
- LDAPDebug0Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
- "sasl_pop_IO_layer: no SASL IO layer\n" );
+ LDAPDebug0Args(LDAP_DEBUG_CONNS,
+ "sasl_pop_IO_layer - No SASL IO layer\n" );
return PR_SUCCESS;
}
@@ -666,8 +666,8 @@ sasl_pop_IO_layer(PRFileDesc* stack, int doclose)
if (!doclose) {
id = sasl_LayerID;
if (!PR_GetIdentitiesLayer(stack, id)) {
- LDAPDebug0Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
- "sasl_pop_IO_layer: no SASL IO layer\n" );
+ LDAPDebug0Args(LDAP_DEBUG_CONNS,
+ "sasl_pop_IO_layer - No SASL IO layer\n" );
return PR_SUCCESS;
}
}
@@ -675,8 +675,8 @@ 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, LOG_DEBUG,
- "sasl_pop_IO_layer: error - could not pop SASL IO layer\n" );
+ LDAPDebug0Args(LDAP_DEBUG_CONNS,
+ "sasl_pop_IO_layer - error - could not pop SASL IO layer\n" );
return PR_FAILURE;
}
@@ -684,8 +684,8 @@ sasl_pop_IO_layer(PRFileDesc* stack, int doclose)
sp = sasl_get_io_private(layer);
if (sp) {
- LDAPDebug0Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
- "sasl_pop_IO_layer: removing SASL IO layer\n" );
+ LDAPDebug0Args(LDAP_DEBUG_CONNS,
+ "sasl_pop_IO_layer - removing SASL IO layer\n" );
/* Free the buffers */
slapi_ch_free_string(&sp->encrypted_buffer);
slapi_ch_free_string(&sp->decrypted_buffer);
@@ -709,12 +709,12 @@ static PRStatus PR_CALLBACK
closeLayer(PRFileDesc* stack)
{
PRStatus rv = 0;
- LDAPDebug0Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
- "closeLayer: closing SASL IO layer\n" );
+ LDAPDebug0Args(LDAP_DEBUG_CONNS,
+ "closeLayer - Closing SASL IO layer\n" );
rv = sasl_pop_IO_layer(stack, 1 /* do close */);
if (PR_SUCCESS != rv) {
- LDAPDebug0Args( LDAP_DEBUG_CONNS, LOG_DEBUG,
- "closeLayer: error closing SASL IO layer\n" );
+ LDAPDebug0Args(LDAP_DEBUG_CONNS,
+ "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, LOG_ERR, "sasl_io_enable",
+ slapi_log_error(SLAPI_LOG_ERR, "sasl_io_enable",
"Cannot enable SASL security on connection in CLOSING state\n");
return PR_FAILURE;
}
@@ -769,11 +769,11 @@ 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, LOG_ERR,
- "sasl_io_enable: error enabling sasl io on connection %" NSPRIu64 " %d:%s\n", c->c_connid, rv, slapd_pr_strerror(rv) );
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG,
- "sasl_io_enable: enabled sasl io on connection %" NSPRIu64 " \n", c->c_connid, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_CONNS,
+ "sasl_io_enable - Enabled sasl io on connection %" NSPRIu64 " \n", c->c_connid, 0, 0 );
debug_print_layers(c->c_prfd);
}
}
@@ -790,8 +790,8 @@ sasl_io_cleanup(Connection *c, void *data /* UNUSED */)
{
int ret = 0;
- LDAPDebug(LDAP_DEBUG_CONNS, LOG_DEBUG,
- "sasl_io_cleanup for connection %" NSPRIu64 "\n", c->c_connid, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_CONNS,
+ "sasl_io_cleanup - 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 6b67e1d..3c49d86 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, LOG_ERR, "sasl_map_config_parse_entry: failed to reset entry "
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "sasl_map_config_parse_entry: resetting invalid nsSaslMapPriority "
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG, "-> sasl_map_read_config_startup\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "-> 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, LOG_DEBUG, "sasl_map_read_config_startup - proceesing [%s]\n", *map_entry, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_CONFIG, "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, LOG_ERR, "sasl_map_read_config_startup failed to parse entry\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_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, LOG_ERR, "sasl_map_read_config_startup failed to insert entry\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_ERR, "sasl_map_read_config_startup - Failed to insert entry\n", 0, 0, 0 );
} else {
- LDAPDebug(LDAP_DEBUG_CONFIG, LOG_DEBUG, "sasl_map_read_config_startup - processed [%s]\n", *map_entry, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_CONFIG, "sasl_map_read_config_startup - processed [%s]\n", *map_entry, 0, 0 );
}
}
freeConfigEntry( &entry );
}
freeChildren( map_entry_list );
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<- sasl_map_read_config_startup\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<- 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, LOG_DEBUG, "-> sasl_map_config_add\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "-> 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, LOG_DEBUG, "<- sasl_map_config_add\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<- 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, LOG_DEBUG, "sasl_map_config_modify: could not find name of map\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "sasl_map_config_modify: failed to update map(%s)\n",map_name,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "-> sasl_map_config_delete\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "-> 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, LOG_DEBUG, "<- sasl_map_config_delete\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<- 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, LOG_DEBUG, "-> sasl_map_check\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "-> 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, LOG_ERR,
- "sasl_map_check: slapi_re_comp failed for expression (%s): %s\n",
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG, "regex: %s, id: %s, %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "regex: %s, id: %s, %s\n",
dp->regular_expression, sasl_user_and_realm,
matched ? "matched" : "didn't match" );
}
@@ -598,8 +598,8 @@ 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, LOG_ERR,
- "sasl_map_check: slapi_re_subs failed: "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "sasl_map_check - slapi_re_subs failed: "
"subject: %s, subst str: %s (%d)\n",
sasl_user_and_realm, dp->template_base_dn, rc);
slapi_ch_free_string(ldap_search_base);
@@ -610,8 +610,8 @@ 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, LOG_ERR,
- "sasl_map_check: slapi_re_subs failed: "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "sasl_map_check - slapi_re_subs failed: "
"subject: %s, subst str: %s (%d)\n",
sasl_user_and_realm, dp->template_search_filter, rc);
slapi_ch_free_string(ldap_search_base);
@@ -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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"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, LOG_ERR,
- "sasl_map_check: slapi_re_exec failed: "
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG, "<- sasl_map_check\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<- 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, LOG_DEBUG, "-> sasl_map_domap\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "-> sasl_map_domap\n", 0, 0, 0 );
if(map == NULL){
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<- sasl_map_domap: Internal error, mapping is NULL\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "<- 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, LOG_DEBUG, "sasl_map_domap - trying map [%s]\n", (*map)->name, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "<- sasl_map_domap (%s)\n", (1 == ret) ? "mapped" : "not mapped", 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<- 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 1172a45..9158f78 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, LOG_DEBUG, "ids_sasl_getopt: plugin=%s option=%s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "ids_sasl_getopt: plugin=%s option=%s\n",
plugin_name ? plugin_name : "", option, 0);
if (len == NULL) len = &tmplen;
@@ -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, LOG_ERR, "sasl", "%s\n", message);
+ slapi_log_error(SLAPI_LOG_ERR, "sasl", "%s\n", message);
break;
case SASL_LOG_FAIL: /* log all authentication failures */
@@ -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, LOG_DEBUG, "sasl(%d): %s\n", level, message, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "sasl user search basedn=\"%s\" filter=\"%s\"\n", basedn, filter, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "null pblock for search_internal_pb\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "sasl user search failed basedn=\"%s\" "
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "sasl user search found no entries\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "sasl user search found dn=%s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "sasl user search encountered a wildcard in "
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "sasl user search encountered a wildcard in "
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "sasl user search found this entry: dn:%s, "
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "sasl user search found no entries matching "
+ LDAPDebug(LDAP_DEBUG_TRACE, "sasl user search found no entries matching "
"filter=%s\n", filter, 0, 0);
} else {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl user search found more than one entry "
+ LDAPDebug(LDAP_DEBUG_TRACE, "sasl user search found more than one entry "
"matching filter=%s\n", filter, 0, 0);
if (entry) {
slapi_entry_free(entry);
@@ -378,13 +378,13 @@ static int ids_sasl_canon_user(
if (user == NULL) {
goto fail;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"ids_sasl_canon_user(user=%s, realm=%s)\n",
user, user_realm ? user_realm : "", 0);
sasl_getprop(conn, SASL_MECHNAME, (const void**)&mech);
if (mech == NULL) {
- LDAPDebug0Args(LDAP_DEBUG_TRACE, LOG_DEBUG, "Unable to read SASL mechanism while "
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "Unable to read SASL mechanism while "
"canonifying user.\n")
goto fail;
}
@@ -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, LOG_DEBUG, "prop_set(dn) failed\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "prop_set(dn) failed\n", 0, 0, 0);
goto fail;
}
} else if (prop_set(propctx, "dn", dn, -1) != 0) {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "prop_set(dn) failed\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "Warning: Detected a sasl bind attempt by an "
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "prop_set(userpassword) failed\n", 0, 0, 0);
+ /*LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "prop_set(userpassword) failed\n", 0, 0, 0);
+ /*LDAPDebug(LDAP_DEBUG_TRACE, "prop_set(userpassword) failed\n", 0, 0, 0);
goto fail */ ;
}
}
@@ -544,17 +544,17 @@ int ids_sasl_init(void)
static int inited = 0;
int result;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "=> ids_sasl_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> ids_sasl_init\n", 0, 0, 0 );
PR_ASSERT(inited == 0);
if (inited != 0) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "ids_sasl_init is called more than once.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ERR, "ids_sasl_init - called more than once.\n");
}
inited = 1;
serverfqdn = get_localhost_DNS();
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl service fqdn is: %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "ids_sasl_init - 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, LOG_DEBUG, "failed to initialize sasl library\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "ids_sasl_init - 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, LOG_DEBUG, "<= ids_sasl_init\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> ids_sasl_server_new (%s)\n", serverfqdn, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_ERR, "sasl_server_new: %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ids_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, LOG_ERR, "sasl_setprop: %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "ids_sasl_server_new - 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, LOG_DEBUG, "<= ids_sasl_server_new\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> ids_sasl_listmech\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "sasl library mechs: %s\n", str, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "ids_sasl_listmech - 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, LOG_DEBUG, "<= ids_sasl_listmech\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> ids_sasl_mech_supported\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "<= ids_sasl_mech_supported\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> ids_sasl_check_bind\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> 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, LOG_DEBUG, "could not get active sasl mechanism\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "ids_sasl_check_bind - could not get active sasl mechanism\n", 0, 0, 0);
goto sasl_start;
}
if (strcasecmp(activemech, mech) != 0) {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl mechanisms differ: active=%s current=%s\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "ids_sasl_check_bind - sasl mechanisms differ: active=%s current=%s\n", 0, 0, 0);
goto sasl_start;
}
@@ -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, LOG_DEBUG, "ids_sasl_check_bind",
+ slapi_log_error(SLAPI_LOG_CONNS, "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);
@@ -874,7 +874,7 @@ sasl_check_result:
break;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "sasl authenticated mech=%s user=%s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "ids_sasl_check_bind - 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, LOG_DEBUG, "sasl ssf=%u\n", (unsigned)*ssfp, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "ids_sasl_check_bind - 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, LOG_DEBUG, "<= ids_sasl_check_bind\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "<= 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, LOG_DEBUG, "=> ids_sasl_check_bind\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "=> ids_sasl_check_bind\n", 0, 0, 0 );
return;
}
diff --git a/ldap/servers/slapd/schema.c b/ldap/servers/slapd/schema.c
index 0e6bf82..164dd78 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, LOG_ERR, "schema_dse_mandatory_init",
+ slapi_log_error(SLAPI_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, LOG_ERR, "slapi_schema_load_repl_policies",
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_schema_load_repl_policies",
"slapi_new_rwlock() for schema replication policy lock failed\n");
return -1;
}
@@ -745,8 +745,8 @@ 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, LOG_ERR,
- "Entry \"%s\" required attribute \"objectclass\" missing\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_entry_schema_check_ext - Entry \"%s\" required attribute \"objectclass\" missing\n",
slapi_entry_get_dn_const(e), 0, 0 );
if (pb) {
PR_snprintf( errtext, sizeof( errtext ),
@@ -782,8 +782,8 @@ 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, LOG_ERR,
- "Entry \"%s\" \"objectclass\" value missing\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_entry_schema_check_ext - Entry \"%s\" \"objectclass\" value missing\n",
slapi_entry_get_dn_const(e), 0, 0 );
if (pb) {
PR_snprintf( errtext, sizeof( errtext ),
@@ -820,8 +820,8 @@ slapi_entry_schema_check_ext( Slapi_PBlock *pb, Slapi_Entry *e, int repl_check )
}
}
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Entry \"%s\" has unknown object class \"%s\"%s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_entry_schema_check_ext - Entry \"%s\" has unknown object class \"%s\"%s\n",
slapi_entry_get_dn_const(e),
escape_string(ocname, ebuf), extra_msg );
if (pb) {
@@ -883,8 +883,8 @@ 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, LOG_ERR,
- "Entry \"%s\" single-valued attribute \"%s\" has multiple values\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_entry_schema_check_ext - Entry \"%s\" single-valued attribute \"%s\" has multiple values\n",
slapi_entry_get_dn_const(e),
a->a_type, 0 );
if (pb) {
@@ -937,8 +937,8 @@ 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, LOG_ERR,
- "Entry \"%s\" missing attribute \"%s\" required"
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "oc_check_required - Entry \"%s\" missing attribute \"%s\" required"
" by object class \"%s\"\n",
slapi_entry_get_dn_const(e),
oc->oc_required[i], oc->oc_name);
@@ -1008,8 +1008,8 @@ 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, LOG_ERR,
- "Entry \"%s\" -- attribute \"%s\" not allowed\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "oc_check_allowed_sv - Entry \"%s\" -- attribute \"%s\" not allowed\n",
slapi_entry_get_dn_const(e),
escape_string( type, ebuf ),
0);
@@ -1558,8 +1558,8 @@ schema_attr_enum_callback(struct asyntaxinfo *asip, void *arg)
vals[0] = &val;
if (!asip) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "Error: no attribute types in schema_attr_enum_callback\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "schema_attr_enum_callback - 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, LOG_ERR, "Error: no OID found in"
+ LDAPDebug(LDAP_DEBUG_ERR, "schema_syntax_enum_callback - 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, LOG_ERR, "Error: no attribute types in schema_list_attributes_callback\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "schema_list_attributes_callback - Error: no attribute types in schema_list_attributes_callback\n",
0, 0, 0);
return ATTR_SYNTAX_ENUM_NEXT;
}
@@ -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, LOG_ERR, "schema",
+ slapi_log_error(SLAPI_LOG_ERR, "modify_schema_dse",
"[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, LOG_DEBUG, "schema", "modify_schema_dse: Replace is not allowed on the subschema subentry\n");
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "schema_delete_objectclasses: Remove all objectclass in Internal op\n");
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "schema_delete_objectclasses: Should not delete object class (%s) which has child object classes"
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "schema_delete_objectclasses: Cannot delete an object class (%s) which has child object classes\n",
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "schema_delete_objectclasses: Should not delete a standard object class (%s)"
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "schema_delete_objectclasses: Cannot delete a standard object class (%s)\n",
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "schema_delete_attributes: Remove all attributetypes in Internal op\n");
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "schema_delete_attributes: Should not delete a standard attribute type (%s)"
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "schema_delete_attributes: Cannot delete a standard attribute type (%s)\n",
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "schema_delete_attributes: Should not delete an attribute (%s) used in oc (%s)"
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "schema_delete_attributes: Could delete an attribute (%s) used in oc (%s)"
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "schema_delete_attributes: Should not delete an attribute used in oc"
+ slapi_log_error(SLAPI_LOG_REPL, "schema", "schema_delete_attributes: Should not delete an attribute used in oc"
". But accept it because it is internal operation\n");
} else {
@@ -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, LOG_DEBUG, "schema_replace_attributes:"
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "schema_replace_attributes:"
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "schema_replace_objectclasses:"
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "schema_replace_objectclasses:"
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_ERR, "NULL args passed to read_oc_ldif\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "read_oc_ldif - 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_PARSE,
"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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"Inheriting syntax %s from parent type %s\n",
pSyntax, pSuperior,NULL);
} else if (NULL == pSyntax) {
@@ -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, LOG_ERR, "schema", "Failed to enable %s: %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "parse_attr_str", "Failed to enable %s: %s\n",
CONFIG_ENQUOTE_SUP_OC_ATTRIBUTE, ebuf);
}
}
@@ -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, LOG_ERR, "NULL args passed to parse_attr_str\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "parse_attr_str - 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, LOG_ERR, "Cannot find parent attribute type \"%s\"\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "parse_attr_str - 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,8 +4261,8 @@ 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, LOG_DEBUG,
- "Inheriting syntax %s from parent type %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE,
+ "parse_attr_str - Inheriting syntax %s from parent type %s\n",
atype->at_syntax_oid, atype->at_sup_oid,NULL);
} else if (NULL == atype->at_syntax_oid) {
schema_create_errormsg( errorbuf, errorbufsize,
@@ -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, LOG_ERR, "schema", "Failed to enable %s: %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "parse_objclass_str", "Failed to enable %s: %s\n",
CONFIG_ENQUOTE_SUP_OC_ATTRIBUTE, ebuf);
}
}
@@ -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, LOG_ERR, "NULL args passed to read_oc_ldif\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "parse_objclass_str - 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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_PARSE,
"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, LOG_ERR, "NULL passed to schema_check_oid\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "schema_check_oid - NULL passed to schema_check_oid\n",0,0,0);
return 0;
}
@@ -5062,8 +5062,8 @@ 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, LOG_ERR,
- "Removed option \"%s\" from allowed attribute type "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "strip_oc_options - Removed option \"%s\" from allowed attribute type "
"\"%s\" in object class \"%s\".\n",
mod, poc->oc_allowed[i], poc->oc_name );
numRemoved++;
@@ -5072,8 +5072,8 @@ 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, LOG_ERR,
- "Removed option \"%s\" from required attribute type "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "strip_oc_options - Removed option \"%s\" from required attribute type "
"\"%s\" in object class \"%s\".\n",
mod, poc->oc_required[i], poc->oc_name );
numRemoved++;
@@ -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, LOG_ERR, "schema",
+ slapi_log_error(SLAPI_LOG_ERR, "init_schema_dse_ext",
"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, LOG_ERR, "schema", "Could not add"
+ slapi_log_error(SLAPI_LOG_ERR, "init_schema_dse_ext", "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, LOG_ERR, "init_schema_dse",
+ slapi_log_error(SLAPI_LOG_ERR, "init_schema_dse_ext",
"backend has not set internal schema\n" );
}
}
@@ -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, LOG_ERR, "no xstring values for xstring (%s) in (%s)\n", name, schema_value, 0 );
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"Entry \"%s\": added missing objectClass value %s\n",
dn, sup_oc->oc_name, 0 );
}
@@ -6128,8 +6128,8 @@ slapi_validate_schema_files(char *schemadir)
if (rc) {
return LDAP_SUCCESS;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schema_reload",
- "schema file validation failed\n" );
+ slapi_log_error(SLAPI_LOG_ERR, "schema_reload",
+ "slapi_validate_schema_files failed\n" );
return LDAP_OBJECT_CLASS_VIOLATION;
}
}
@@ -6153,8 +6153,8 @@ slapi_reload_schema_files(char *schemadir)
if (NULL == be)
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schema_reload",
- "schema file reload failed\n" );
+ slapi_log_error(SLAPI_LOG_ERR, "schema_reload",
+ "slapi_reload_schema_files failed\n" );
return LDAP_LOCAL_ERROR;
}
slapi_be_Wlock(be); /* be lock must be outer of schemafile lock */
@@ -6182,8 +6182,8 @@ slapi_reload_schema_files(char *schemadir)
} else {
reload_schemafile_unlock();
slapi_be_Unlock(be);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "schema_reload",
- "schema file reload failed\n" );
+ slapi_log_error(SLAPI_LOG_ERR, "schema_reload",
+ "slapi_reload_schema_files 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, LOG_ERR, "list objectclass attributes",
+ slapi_log_error(SLAPI_LOG_ERR, "slapi_schema_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, 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);
+ 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);
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, LOG_DEBUG, "schema", "%s objectclass prevents replication of the schema\n", oc_1->oc_name);
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "Local %s schema objectclasses is a superset of"
+ slapi_log_error(SLAPI_LOG_REPL, "schema", "Local %s schema objectclasses is a superset of"
" the received one.\n", oc_1->oc_name);
} else {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema", "Remote %s schema objectclasses is a superset of"
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "Fail to retrieve in the %s schema [%s or %s]\n",
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "schema_oc_to_string: replace (old[%d]=%s)\n",
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "Add that unknown/extended objectclass %s (%s)\n",
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_ERR, "schema", "Fail to Add (no memory) objectclass %s (%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, "schema_list_oc2learn", "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, LOG_DEBUG, "schema", "Add that unknown/extended attribute %s (%s)\n",
+ slapi_log_error(SLAPI_LOG_REPL, "schema_list_attr2learn", "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, LOG_ERR, "schema", "Fail to Add (no memory) attribute %s (%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, "schema_list_attr2learn", "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, LOG_DEBUG, "schema", "Attribute %s is no longer 'required' in '%s' of the %s schema but is now 'allowed'\n",
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "Attribute %s is not required in '%s' of the %s schema\n",
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "Attribute %s is not allowed in '%s' of the %s schema\n",
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "%s schema attribute [%s] is not "
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "%s schema attribute [%s] is not "
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "%s schema attribute [%s] syntax "
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "%s schema attribute [%s] syntax "
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "%s schema attribute [%s] matching "
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "%s schema attribute [%s] matching "
+ slapi_log_error(SLAPI_LOG_REPL, "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, 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);
+ 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);
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, LOG_DEBUG, "schema", "%s attribute prevents replication of the schema\n", at_1->asi_name);
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "Local %s schema attributetypes is a superset of"
+ slapi_log_error(SLAPI_LOG_REPL, "schema", "Local %s schema attributetypes is a superset of"
" the received one.\n", at_1->asi_name);
} else {
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema", "Remote %s schema attributetypes is a superset of"
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "Fail to retrieve in the %s schema [%s or %s]\n",
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_ERR, "schema",
+ slapi_log_error(SLAPI_LOG_ERR, "schema_berval_to_oclist",
"parse_oc_str returned error: %s\n",
errorbuf[0]?errorbuf:"unknown");
oc_free(&oc);
@@ -7236,8 +7236,8 @@ 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, LOG_ERR, "schema",
- "schema_berval_to_atlist: parse_at_str(%s) failed - %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "schema_berval_to_atlist",
+ "parse_at_str(%s) failed - %s\n",
at_berval[i]->bv_val, errorbuf[0]?errorbuf:"unknown");
attr_syntax_free(at);
break;
@@ -7383,7 +7383,7 @@ modify_schema_internal_mod(Slapi_DN *sdn, Slapi_Mods *smods)
} else {
type = "unknown";
}
- slapi_log_error(SLAPI_LOG_REPL, LOG_DEBUG, "schema", "modify_schema_internal_mod: successfully learn %s definitions\n", type);
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_ERR, "schema", "modify_schema_internal_mod: fail to learn schema definitions (%d) \n", op_result);
+ slapi_log_error(SLAPI_LOG_ERR, "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, LOG_DEBUG, "schema", "MOD[%d] del (%s): %s\n", i, type, object->old_value);
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_DEBUG, "schema", "MOD[%d] add (%s): %s\n", i, type, object->new_value);
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_ERR, "schema", "modify_schema_apply_new_definitions Out of memory \n");
+ slapi_log_error(SLAPI_LOG_ERR, "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, LOG_ERR, "schema",
+ slapi_log_error(SLAPI_LOG_ERR, "modify_schema_get_new_definitions",
"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, LOG_DEBUG, "schema", "take attributetypes: %s\n", at2learn->new_value);
+ slapi_log_error(SLAPI_LOG_REPL, "modify_schema_get_new_definitions", "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, LOG_ERR, "schema",
+ slapi_log_error(SLAPI_LOG_ERR, "modify_schema_get_new_definitions",
"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, LOG_DEBUG, "schema", "take objectclass: %s\n", oc2learn->new_value);
+ slapi_log_error(SLAPI_LOG_REPL, "modify_schema_get_new_definitions", "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, LOG_DEBUG, "schema", "supplier takes objectclass: %s\n", oc2learn->new_value);
+ slapi_log_error(SLAPI_LOG_REPL, "supplier_get_new_definitions", "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, LOG_ERR, "schema",
+ slapi_log_error(SLAPI_LOG_ERR, "supplier_get_new_definitions",
"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, LOG_DEBUG, "schema", "supplier takes attributetypes: %s\n", at2learn->new_value);
+ slapi_log_error(SLAPI_LOG_REPL, "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, LOG_ERR, "schema",
+ slapi_log_error(SLAPI_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 86ba757..673bb3e 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, LOG_ERR, "oc_init_lock",
+ slapi_log_error(SLAPI_LOG_ERR, "oc_init_lock",
"slapi_new_rwlock() for objectclass lock failed\n" );
return PR_FAILURE;
}
@@ -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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_PARSE,
"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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_PARSE,
"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 920d8fc..8896eb5 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, LOG_DEBUG, "do_search\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "do_search\n", 0, 0, 0 );
slapi_pblock_get( pb, SLAPI_OPERATION, &operation);
ber = operation->o_ber;
@@ -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, LOG_DEBUG, "do_search",
+ slapi_log_error(SLAPI_LOG_ARGS, "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, LOG_DEBUG, NULL, "SRCH base=\"%s\" "
+ slapi_log_error(SLAPI_LOG_ARGS, 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/slap.h b/ldap/servers/slapd/slap.h
index 804bdea..a03c6d4 100644
--- a/ldap/servers/slapd/slap.h
+++ b/ldap/servers/slapd/slap.h
@@ -21,7 +21,6 @@
#ifndef _SLDAPD_H_
#define _SLDAPD_H_
-
/* Used by SSL and DES plugin */
#ifdef NEED_TOK_PBE
static char tokPBE[34] = "Communicator Generic Crypto Svcs";
@@ -226,9 +225,14 @@ typedef void (*VFPV)(); /* takes undefined arguments */
#define SLAPD_INVALID_SOCKET_INDEX (-1)
+/* The default log levels:
+ * (LDAP_DEBUG_ANY | LDAP_DEBUG_EMERG | LDAP_DEBUG_ALERT | LDAP_DEBUG_CRIT | LDAP_DEBUG_ERR |
+ * LDAP_DEBUG_WARNING | LDAP_DEBUG_NOTICE | LDAP_DEBUG_INFO)
+ */
+#define SLAPD_DEFAULT_ERRORLOG_LEVEL 266354688
+
#define SLAPD_DEFAULT_FILE_MODE S_IRUSR | S_IWUSR
#define SLAPD_DEFAULT_DIR_MODE S_IRWXU
-#define SLAPD_DEFAULT_ERRORLOG_LEVEL 16384
#define SLAPD_DEFAULT_IDLE_TIMEOUT 0 /* seconds - 0 == never */
#define SLAPD_DEFAULT_SIZELIMIT 2000 /* use -1 for no limit */
#define SLAPD_DEFAULT_TIMELIMIT 3600 /* use -1 for no limit */
@@ -244,9 +248,7 @@ typedef void (*VFPV)(); /* takes undefined arguments */
#define SLAPD_DEFAULT_SCHEMA_IGNORE_TRAILING_SPACES LDAP_OFF
#define SLAPD_DEFAULT_LOCAL_SSF 71 /* assume local connections are secure */
#define SLAPD_DEFAULT_MIN_SSF 0 /* allow unsecured connections (no privacy or integrity) */
-
- /* We'd like this number to be prime for
- the hash into the Connection table */
+/* We'd like this number to be prime for the hash into the Connection table */
#define SLAPD_DEFAULT_CONNTABLESIZE 4093 /* connection table size */
#define SLAPD_MONITOR_DN "cn=monitor"
diff --git a/ldap/servers/slapd/slapi-plugin.h b/ldap/servers/slapd/slapi-plugin.h
index 88945ef..0d3277a 100644
--- a/ldap/servers/slapd/slapi-plugin.h
+++ b/ldap/servers/slapd/slapi-plugin.h
@@ -6062,34 +6062,43 @@ int slapi_register_plugin_ext( const char *plugintype, int enabled,
/*
* logging
*/
-int slapi_log_error( int loglevel, int severity, char *subsystem, char *fmt, ... )
+int slapi_log_error( int loglevel, char *subsystem, char *fmt, ... )
#ifdef __GNUC__
- __attribute__ ((format (printf, 4, 5)));
+ __attribute__ ((format (printf, 3, 4)));
#else
;
#endif
-int slapi_log_error_ext( int severity, char *subsystem, char *fmt, va_list varg1, va_list varg2);
+int slapi_log_error_ext( int loglevel, char *subsystem, char *fmt, va_list varg1, va_list varg2);
/* allowed values for the "severity" parameter */
-#define SLAPI_LOG_FATAL 0
-#define SLAPI_LOG_TRACE 1
-#define SLAPI_LOG_PACKETS 2
-#define SLAPI_LOG_ARGS 3
-#define SLAPI_LOG_CONNS 4
-#define SLAPI_LOG_BER 5
-#define SLAPI_LOG_FILTER 6
-#define SLAPI_LOG_CONFIG 7
-#define SLAPI_LOG_ACL 8
-#define SLAPI_LOG_SHELL 9
-#define SLAPI_LOG_PARSE 10
-#define SLAPI_LOG_HOUSE 11
-#define SLAPI_LOG_REPL 12
-#define SLAPI_LOG_CACHE 13
-#define SLAPI_LOG_PLUGIN 14
-#define SLAPI_LOG_TIMING 15
-#define SLAPI_LOG_BACKLDBM 16
-#define SLAPI_LOG_ACLSUMMARY 17
-#define SLAPI_LOG_NUNCSTANS 18 /* The last level must be set in log.c: SLAPI_LOG_MAX */
+#define SLAPI_LOG_FATAL 0
+#define SLAPI_LOG_TRACE 1
+#define SLAPI_LOG_PACKETS 2
+#define SLAPI_LOG_ARGS 3
+#define SLAPI_LOG_CONNS 4
+#define SLAPI_LOG_BER 5
+#define SLAPI_LOG_FILTER 6
+#define SLAPI_LOG_CONFIG 7
+#define SLAPI_LOG_ACL 8
+#define SLAPI_LOG_SHELL 9
+#define SLAPI_LOG_PARSE 10
+#define SLAPI_LOG_HOUSE 11
+#define SLAPI_LOG_REPL 12
+#define SLAPI_LOG_CACHE 13
+#define SLAPI_LOG_PLUGIN 14
+#define SLAPI_LOG_TIMING 15
+#define SLAPI_LOG_BACKLDBM 16
+#define SLAPI_LOG_ACLSUMMARY 17
+#define SLAPI_LOG_NUNCSTANS 18
+/* Severity levels */
+#define SLAPI_LOG_EMERG 19
+#define SLAPI_LOG_ALERT 20
+#define SLAPI_LOG_CRIT 21
+#define SLAPI_LOG_ERR 22
+#define SLAPI_LOG_WARNING 23
+#define SLAPI_LOG_NOTICE 24
+#define SLAPI_LOG_INFO 25
+#define SLAPI_LOG_DEBUG 26 /* The last level must be set in log.c: SLAPI_LOG_MAX */
int slapi_is_loglevel_set( const int loglevel );
diff --git a/ldap/servers/slapd/snmp_collator.c b/ldap/servers/slapd/snmp_collator.c
index 81f932c..4bc758b 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, LOG_ERR, "snmp collator", "Failed to open stats file (%s) "
+ slapi_log_error(SLAPI_LOG_EMERG, "snmp collator", "Failed to open stats file (%s) "
"(error %d): %s.\n", szStatsFile, err, slapd_system_strerror(err));
exit(1);
}
@@ -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, LOG_ERR, "Failed to delete old semaphore for stats file (%s). "
+ LDAPDebug(LDAP_DEBUG_EMERG, "snmp_collator_create_semaphore - 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, LOG_ERR, "Failed to create semaphore for stats file (%s). Error %d (%s).\n",
+ LDAPDebug(LDAP_DEBUG_EMERG, "snmp_collator_create_semaphore - 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, LOG_ERR, "Failed to create semaphore for stats file (%s). Error %d.(%s)\n",
+ LDAPDebug(LDAP_DEBUG_EMERG, "snmp_collator_create_semaphore - Failed to create semaphore for stats file (%s). Error %d.(%s)\n",
szStatsFile, errno, slapd_system_strerror(errno) );
exit(1);
}
@@ -494,8 +494,8 @@ snmp_collator_sem_wait(void)
int got_sem = 0;
if (SEM_FAILED == stats_sem) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "semaphore for stats file (%s) is not available.\n", szStatsFile);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "snmp_collator_sem_wait - 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 a57d68a..7649589 100644
--- a/ldap/servers/slapd/ssl.c
+++ b/ldap/servers/slapd/ssl.c
@@ -97,6 +97,7 @@ static char * configDN = "cn=encryption,cn=config";
#define MAGNUS_ERROR_LEN 1024
#define LOG_WARN 0
#define LOG_FAILURE 3
+#define LOG_MSG 4
#define FILE_PATHSEP '/'
/* ----------------------- Multiple cipher support ------------------------ */
@@ -266,10 +267,21 @@ static void
slapd_SSL_report(int degree, char *fmt, va_list args)
{
char buf[2048];
+ char *msg = NULL;
+ int sev;
+
+ if (degree == LOG_FAILURE){
+ sev = LDAP_DEBUG_ERR;
+ msg = "failure";
+ } else if (degree == LOG_WARN){
+ sev = LDAP_DEBUG_WARNING;
+ msg = "alert";
+ } else {
+ sev = LDAP_DEBUG_INFO;
+ msg = "info";
+ }
PR_vsnprintf( buf, sizeof(buf), fmt, args );
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "SSL %s: %s\n",
- (degree == LOG_FAILURE) ? "failure" : "alert",
- buf, 0 );
+ LDAPDebug(sev, "SSL %s: %s\n", msg,buf, 0 );
}
void
@@ -290,6 +302,15 @@ slapd_SSL_warn(char *fmt, ...)
va_end(args);
}
+void
+slapd_SSL_info(char *fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ slapd_SSL_report(LOG_MSG, fmt, args);
+ va_end(args);
+}
+
char **
getSupportedCiphers(void)
{
@@ -549,9 +570,9 @@ _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, LOG_ERR, "SSL Initialization",
- "Warning: failed to get the cipher suite info of cipher ID %d\n",
- implementedCiphers[x]);
+ slapi_log_error(SLAPI_LOG_ERR, "Security Initialization",
+ "_conf_init_ciphers - Failed to get the cipher suite info of cipher ID %d\n",
+ implementedCiphers[x]);
continue;
}
if (!_conf_ciphers[x].num) { /* initialize each cipher */
@@ -600,8 +621,8 @@ _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, LOG_ERR, "SSL Initialization",
- "Warning: failed to get the default state of cipher %s\n",
+ slapi_log_error(SLAPI_LOG_ERR, "Security Initialization",
+ "_conf_setallciphers - Failed to get the default state of cipher %s\n",
_conf_ciphers[x].name);
continue;
}
@@ -646,16 +667,16 @@ _conf_dumpciphers(void)
int x;
PRBool enabled;
/* {"SSL3","rc4", SSL_EN_RC4_128_WITH_MD5}, */
- slapd_SSL_warn("Configured NSS Ciphers");
+ slapd_SSL_info("Configured NSS Ciphers");
for (x = 0; _conf_ciphers[x].name; x++) {
SSL_CipherPrefGetDefault(_conf_ciphers[x].num, &enabled);
if (enabled) {
- slapd_SSL_warn("\t%s: enabled%s%s%s", _conf_ciphers[x].name,
+ slapd_SSL_info("\t%s: enabled%s%s%s", _conf_ciphers[x].name,
(_conf_ciphers[x].flags&CIPHER_IS_WEAK)?", (WEAK CIPHER)":"",
(_conf_ciphers[x].flags&CIPHER_IS_DEPRECATED)?", (DEPRECATED)":"",
(_conf_ciphers[x].flags&CIPHER_MUST_BE_DISABLED)?", (MUST BE DISABLED)":"");
} else if (slapi_is_loglevel_set(SLAPI_LOG_CONFIG)) {
- slapd_SSL_warn("\t%s: disabled%s%s%s", _conf_ciphers[x].name,
+ slapd_SSL_info("\t%s: disabled%s%s%s", _conf_ciphers[x].name,
(_conf_ciphers[x].flags&CIPHER_IS_WEAK)?", (WEAK CIPHER)":"",
(_conf_ciphers[x].flags&CIPHER_IS_DEPRECATED)?", (DEPRECATED)":"",
(_conf_ciphers[x].flags&CIPHER_MUST_BE_DISABLED)?", (MUST BE DISABLED)":"");
@@ -677,7 +698,7 @@ _conf_setciphers(char *ciphers, int flags)
/* Default is to activate all of them ==> none of them*/
if (!ciphers || (ciphers[0] == '\0') || !PL_strcasecmp(ciphers, "default")) {
_conf_setallciphers((CIPHER_SET_DEFAULT|flags), NULL, NULL);
- slapd_SSL_warn("Security Initialization: Enabling default cipher set.");
+ slapd_SSL_info("Security Initialization: Enabling default cipher set.");
_conf_dumpciphers();
return NULL;
}
@@ -954,8 +975,8 @@ 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, LOG_ERR, "SSL Initialization",
- "Warning: certificate DB file cert8.db nor cert7.db exists in [%s] - "
+ slapi_log_error(SLAPI_LOG_CRIT, "Security Initialization",
+ "warn_if_no_cert_file - Certificate DB file cert8.db nor cert7.db exists in [%s] - "
"SSL initialization will likely fail\n", dir);
}
}
@@ -976,8 +997,8 @@ 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, LOG_ERR, "SSL Initialization",
- "Warning: key DB file %s does not exist - SSL initialization will "
+ slapi_log_error(SLAPI_LOG_CRIT, "Security Initialization",
+ "warn_if_no_key_file - Key DB file %s does not exist - SSL initialization will "
"likely fail\n", filename);
}
}
@@ -1133,7 +1154,7 @@ restrict_SSLVersionRange(void)
;
}
} else {
- slapd_SSL_warn("Supported range: min: %s, max: %s; "
+ slapd_SSL_info("Supported range: min: %s, max: %s; "
"Respect the configured range.",
emin, emax);
/* nsTLS1 is explicitly set to off. */
@@ -1185,8 +1206,8 @@ 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, LOG_DEBUG, "SSL Initialization",
- "supported range by NSS: min: %s, max: %s\n",
+ slapi_log_error(SLAPI_LOG_CONFIG, "Security Initialization",
+ "slapd_nss_init - Supported range by NSS: min: %s, max: %s\n",
emin, emax);
#endif
@@ -1211,8 +1232,8 @@ slapd_nss_init(int init_ssl, int config_available)
char *serveruser = "unknown";
serveruser = config_get_localuser();
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "SSL Initialization",
- "Warning: The key/cert database directory [%s] is not writable by "
+ slapi_log_error(SLAPI_LOG_CRIT, "Security Initialization",
+ "slapd_nss_init - The key/cert database directory [%s] is not writable by "
"the server uid [%s]: initialization likely to fail.\n",
certdir, serveruser);
slapi_ch_free_string(&serveruser);
@@ -1235,7 +1256,7 @@ slapd_nss_init(int init_ssl, int config_available)
if (secStatus != SECSuccess) {
errorCode = PR_GetError();
- slapd_SSL_warn("Security Initialization: NSS initialization failed ("
+ slapd_SSL_error("Security Initialization: NSS initialization failed ("
SLAPI_COMPONENT_NAME_NSPR " error %d - %s): "
"certdir: %s",
errorCode, slapd_pr_strerror(errorCode), certdir);
@@ -1244,7 +1265,7 @@ slapd_nss_init(int init_ssl, int config_available)
if(SSLPLCY_Install() != PR_SUCCESS) {
errorCode = PR_GetError();
- slapd_SSL_warn("Security Initialization: Unable to set SSL export policy ("
+ slapd_SSL_error("Security Initialization: Unable to set SSL export policy ("
SLAPI_COMPONENT_NAME_NSPR " error %d - %s)",
errorCode, slapd_pr_strerror(errorCode));
return -1;
@@ -1260,15 +1281,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, LOG_ERR, "slapd_nss_init: chmod failed for file %s error (%d) %s.\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "Security Initialization - 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, LOG_ERR, "slapd_nss_init: chmod failed for file %s error (%d) %s.\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "Security Initialization - 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, LOG_ERR, "slapd_nss_init: chmod failed for file %s error (%d) %s.\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "Security Initialization - slapd_nss_init: chmod failed for file %s error (%d) %s.\n",
secmoddb_file_name, errno, slapd_system_strerror(errno));
}
}
@@ -1343,7 +1364,7 @@ slapd_ssl_init()
slapd_SSL_warn("notice, generating new WEAK DH param");
rv = SSL_EnableWeakDHEPrimeGroup(NULL, PR_TRUE);
if (rv != SECSuccess) {
- slapd_SSL_warn("Warning, unable to generate weak dh parameters");
+ slapd_SSL_error("Warning, unable to generate weak dh parameters");
}
}
#endif
@@ -1358,7 +1379,7 @@ slapd_ssl_init()
if(!val) {
errorCode = PR_GetError();
- slapd_SSL_warn("Security Initialization: Failed to retrieve SSL "
+ slapd_SSL_error("Security Initialization: Failed to retrieve SSL "
"configuration information ("
SLAPI_COMPONENT_NAME_NSPR " error %d - %s): "
"nssslSessionTimeout: %s ",
@@ -1420,7 +1441,7 @@ slapd_ssl_init()
}
} else {
errorCode = PR_GetError();
- slapd_SSL_warn("Security Initialization: Unable to get token ("
+ slapd_SSL_error("Security Initialization: Unable to get token ("
SLAPI_COMPONENT_NAME_NSPR " error %d - %s)",
errorCode, slapd_pr_strerror(errorCode));
freeChildren(family_list);
@@ -1430,7 +1451,7 @@ slapd_ssl_init()
if (!slot) {
errorCode = PR_GetError();
- slapd_SSL_warn("Security Initialization: Unable to find slot ("
+ slapd_SSL_error("Security Initialization: Unable to find slot ("
SLAPI_COMPONENT_NAME_NSPR " error %d - %s)",
errorCode, slapd_pr_strerror(errorCode));
freeChildren(family_list);
@@ -1445,8 +1466,8 @@ slapd_ssl_init()
#endif
if (slapd_pk11_authenticate(slot, PR_TRUE, NULL) != SECSuccess) {
errorCode = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_ssl_init",
- "Unable to authenticate (" SLAPI_COMPONENT_NAME_NSPR " error %d - %s)",
+ slapi_log_error(SLAPI_LOG_ERR, "Security Initialization",
+ "slapd_ssl_init - Unable to authenticate (" SLAPI_COMPONENT_NAME_NSPR " error %d - %s)\n",
errorCode, slapd_pr_strerror(errorCode));
freeChildren(family_list);
freeConfigEntry( &entry );
@@ -1716,7 +1737,7 @@ slapd_ssl_init2(PRFileDesc **fd, int startTLS)
*/
getConfigEntry(configDN, &e);
if (e == NULL) {
- slapd_SSL_warn("Security Initialization: Failed get config entry %s", configDN);
+ slapd_SSL_error("Security Initialization: Failed get config entry %s", configDN);
return 1;
}
val = slapi_entry_attr_get_charptr(e, "allowWeakCipher");
@@ -1769,7 +1790,7 @@ slapd_ssl_init2(PRFileDesc **fd, int startTLS)
PK11SlotInfo *slot = slapd_pk11_getInternalSlot();
if (!slot) {
errorCode = PR_GetError();
- slapd_SSL_warn("Security Initialization: Unable to get internal slot ("
+ slapd_SSL_error("Security Initialization: Unable to get internal slot ("
SLAPI_COMPONENT_NAME_NSPR " error %d - %s)",
errorCode, slapd_pr_strerror(errorCode));
return -1;
@@ -1778,9 +1799,9 @@ 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, LOG_ERR, "slapd_ssl_init2",
- "Unable to authenticate (" SLAPI_COMPONENT_NAME_NSPR " error %d - %s)\n",
- errorCode, slapd_pr_strerror(errorCode));
+ slapi_log_error(SLAPI_LOG_ERR, "Security Initialization",
+ "slapd_ssl_init2 - Unable to authenticate (" SLAPI_COMPONENT_NAME_NSPR " error %d - %s)\n",
+ errorCode, slapd_pr_strerror(errorCode));
return -1;
}
fipsMode = PR_TRUE;
@@ -1979,8 +2000,8 @@ slapd_ssl_init2(PRFileDesc **fd, int startTLS)
tmpDir = slapd_get_tmp_dir();
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG,
- "slapd_ssl_init2", "tmp dir = %s\n", tmpDir);
+ slapi_log_error(SLAPI_LOG_TRACE, "Security Initialization",
+ "slapd_ssl_init2 - tmp dir = %s\n", tmpDir);
rv = SSL_ConfigServerSessionIDCache(0, stimeout, stimeout, tmpDir);
slapi_ch_free_string(&tmpDir);
@@ -2001,7 +2022,7 @@ slapd_ssl_init2(PRFileDesc **fd, int startTLS)
sslStatus = SSL_OptionSet(pr_sock, SSL_SECURITY, PR_TRUE);
if (sslStatus != SECSuccess) {
errorCode = PR_GetError();
- slapd_SSL_warn("Security Initialization: Failed to enable security "
+ slapd_SSL_error("Security Initialization: Failed to enable security "
"on the imported socket (" SLAPI_COMPONENT_NAME_NSPR " error %d - %s)",
errorCode, slapd_pr_strerror(errorCode));
return -1;
@@ -2011,7 +2032,7 @@ slapd_ssl_init2(PRFileDesc **fd, int startTLS)
sslStatus = SSL_OptionSet(pr_sock, SSL_ENABLE_SSL2, enableSSL2);
if (sslStatus != SECSuccess) {
errorCode = PR_GetError();
- slapd_SSL_warn("Security Initialization: Failed to %s SSLv2 "
+ slapd_SSL_error("Security Initialization: Failed to %s SSLv2 "
"on the imported socket (" SLAPI_COMPONENT_NAME_NSPR " error %d - %s)",
enableSSL2 ? "enable" : "disable",
errorCode, slapd_pr_strerror(errorCode));
@@ -2125,15 +2146,15 @@ 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, LOG_ERR, "SSL Initialization",
- "Configured SSL version range: min: %s, max: %s\n",
+ slapi_log_error(SLAPI_LOG_INFO, "Security Initialization",
+ "slapd_ssl_init2 - Configured SSL version range: min: %s, max: %s\n",
mymin, mymax);
sslStatus = SSL_VersionRangeSet(pr_sock, &slapdNSSVersions);
if (sslStatus == SECSuccess) {
/* Set the restricted value to the cn=encryption entry */
} else {
- slapd_SSL_error("SSL Initialization 2: "
- "Failed to set SSL range: min: %s, max: %s\n",
+ slapd_SSL_error("Security Initialization - "
+ "slapd_ssl_init2 - Failed to set SSL range: min: %s, max: %s\n",
mymin, mymax);
}
} else {
@@ -2168,7 +2189,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, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_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 +2199,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, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_ERR,
"SSL_OptionSet(SSL_REQUEST_CERTIFICATE,PR_TRUE) %d "
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
err, prerr, slapd_pr_strerror(prerr));
@@ -2432,7 +2453,7 @@ slapd_SSL_client_auth (LDAP* ld)
rc = ldapssl_enable_clientauth (ld, SERVER_KEY_NAME, pw, cert_name);
if (rc != 0) {
errorCode = PR_GetError();
- slapd_SSL_warn("ldapssl_enable_clientauth(%s, %s) %i ("
+ slapd_SSL_error("ldapssl_enable_clientauth(%s, %s) %i ("
SLAPI_COMPONENT_NAME_NSPR " error %d - %s)",
SERVER_KEY_NAME, cert_name, rc,
errorCode, slapd_pr_strerror(errorCode));
@@ -2454,7 +2475,7 @@ slapd_SSL_client_auth (LDAP* ld)
slapi_ch_free_string(&pw);
slapi_ch_free_string(&finalpersonality);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "slapd_SSL_client_auth() %i\n", rc, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "slapd_SSL_client_auth() %i\n", rc, 0, 0);
return rc;
}
@@ -2494,8 +2515,7 @@ char* slapd_get_tmp_dir()
if((tmpdir = config_get_tmpdir()) == NULL)
{
slapi_log_error(
- SLAPI_LOG_FATAL,
- LOG_ERR,
+ SLAPI_LOG_NOTICE,
"slapd_get_tmp_dir",
"config_get_tmpdir returns NULL Setting tmp dir to default\n");
@@ -2508,14 +2528,12 @@ 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,
+ SLAPI_LOG_DEBUG,
"slapd_get_tmp_dir",
"mkdir(%s, 00770) Error: %s\n",
tmpdir, strerror(errno));
@@ -2535,8 +2553,8 @@ slapd_get_unlocked_key_for_cert(CERTCertificate *cert, void *pin_arg)
if (!slotlist) {
PRErrorCode errcode = PR_GetError();
- 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",
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_get_unlocked_key_for_cert",
+ "Cannot get slot list for certificate [%s] (%d: %s)\n",
certsubject, errcode, slapd_pr_strerror(errcode));
return key;
}
@@ -2546,33 +2564,33 @@ 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, LOG_DEBUG, "slapd_get_unlocked_key_for_cert",
+ slapi_log_error(SLAPI_LOG_TRACE, "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, LOG_DEBUG, "slapd_get_unlocked_key_for_cert",
+ slapi_log_error(SLAPI_LOG_TRACE, "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, LOG_ERR, "slapd_get_unlocked_key_for_cert",
+ slapi_log_error(SLAPI_LOG_NOTICE, "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, 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);
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_get_unlocked_key_for_cert",
+ "Could not find any unlocked slots for certificate [%s]. "
+ "Please review your TLS/SSL configuration. The following slots were found:\n",
+ certsubject);
for (sle = slotlist->head; sle; sle = sle->next) {
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, LOG_ERR, "slapd_get_unlocked_key_for_cert",
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_get_unlocked_key_for_cert",
"Slot [%s] token [%s] was locked.\n",
slotname, tokenname);
}
@@ -2621,18 +2639,18 @@ listCerts(CERTCertDBHandle *handle, CERTCertificate *cert, PK11SlotInfo *slot,
char *name = NULL;
if (!cert) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "listCerts", "No cert given\n");
+ slapi_log_error(SLAPI_LOG_ERR, "listCerts", "No cert given\n");
return rv;
}
name = cert->nickname;
if (!name) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "listCerts", "No cert nickname\n");
+ slapi_log_error(SLAPI_LOG_ERR, "listCerts", "No cert nickname\n");
return rv;
}
the_cert = CERT_FindCertByNicknameOrEmailAddr(handle, name);
if (!the_cert) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "listCerts", "Could not find cert: %s\n", name);
+ slapi_log_error(SLAPI_LOG_ERR, "listCerts", "Could not find cert: %s\n", name);
return SECFailure;
}
@@ -2647,7 +2665,7 @@ listCerts(CERTCertDBHandle *handle, CERTCertificate *cert, PK11SlotInfo *slot,
PR_Now(), PR_FALSE);
CERT_DestroyCertificate(the_cert);
if (!certs) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "listCerts", "problem printing certificates");
+ slapi_log_error(SLAPI_LOG_ERR, "listCerts", "Problem printing certificates\n");
return SECFailure;
}
for (node = CERT_LIST_HEAD(certs); !CERT_LIST_END(node,certs); node = CERT_LIST_NEXT(node)) {
@@ -2665,7 +2683,7 @@ listCerts(CERTCertDBHandle *handle, CERTCertificate *cert, PK11SlotInfo *slot,
CERT_DestroyCertList(certs);
}
if (rv) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "listCerts", "problem printing certificate nicknames");
+ slapi_log_error(SLAPI_LOG_ERR, "listCerts", "Problem printing certificate nicknames\n");
return SECFailure;
}
@@ -2720,7 +2738,7 @@ slapd_extract_cert(Slapi_Entry *entry, int isCA)
char *personality = NULL;
if (!entry) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_cert",
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_extract_cert",
"No entry is given for %s Cert.\n", isCA?"CA":"Server");
goto bail;
}
@@ -2750,7 +2768,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, LOG_ERR, "slapd_extract_cert", "CA CERT NAME: %s\n", cert->nickname);
+ slapi_log_error(SLAPI_LOG_INFO, "slapd_extract_cert", "CA CERT NAME: %s\n", cert->nickname);
if (!certfile) {
char buf[BUFSIZ];
certfile = slapi_ch_smprintf("%s/%s%s", certdir,
@@ -2762,14 +2780,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, LOG_ERR, "slapd_extract_cert",
+ slapi_log_error(SLAPI_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, LOG_ERR, "slapd_extract_cert", "listCerts failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_extract_cert", "listCerts failed\n");
break;
}
}
@@ -2777,7 +2795,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, LOG_ERR, "slapd_extract_cert", "SERVER CERT NAME: %s\n", cert->nickname);
+ slapi_log_error(SLAPI_LOG_INFO, "slapd_extract_cert", "SERVER CERT NAME: %s\n", cert->nickname);
if (!certfile) {
char buf[BUFSIZ];
certfile = slapi_ch_smprintf("%s/%s%s", certdir,
@@ -2787,14 +2805,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, LOG_ERR, "slapd_extract_cert",
+ slapi_log_error(SLAPI_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, LOG_ERR, "slapd_extract_cert", "listCerts failed\n");
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_extract_cert", "listCerts failed\n");
}
PR_Close(outFile);
outFile = NULL;
@@ -2845,7 +2863,7 @@ extractRSAKeysAndSubject(
CERTCertificate *cert = PK11_FindCertFromNickname((char *)nickname, NULL);
if (!cert) {
rv = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "extractRSAKeysAndSubject",
+ slapi_log_error(SLAPI_LOG_ERR, "extractRSAKeysAndSubject",
"Failed extract cert with %s, (%d-%s, %d).\n",
nickname, rv, slapd_pr_strerror(rv), PR_GetOSError());
goto bail;
@@ -2854,7 +2872,7 @@ extractRSAKeysAndSubject(
*pubkey = CERT_ExtractPublicKey(cert);
if (!*pubkey) {
rv = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "extractRSAKeysAndSubject",
+ slapi_log_error(SLAPI_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;
@@ -2863,13 +2881,13 @@ extractRSAKeysAndSubject(
*privkey = PK11_FindKeyByDERCert(slot, cert, pwdata);
if (!*privkey) {
rv = PR_GetError();
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "extractRSAKeysAndSubject",
+ slapi_log_error(SLAPI_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, LOG_ERR, "extractRSAKeysAndSubject",
+ slapi_log_error(SLAPI_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;
@@ -2880,7 +2898,7 @@ extractRSAKeysAndSubject(
*subject = CERT_AsciiToName(cert->subjectName);
if (!*subject) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "extractRSAKeysAndSubject",
+ slapi_log_error(SLAPI_LOG_ERR, "extractRSAKeysAndSubject",
"Improperly formatted name: \"%s\"\n",
cert->subjectName);
goto bail;
@@ -2999,25 +3017,25 @@ slapd_extract_key(Slapi_Entry *entry, char *token, PK11SlotInfo *slot)
#endif
if (!entry) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_key",
+ slapi_log_error(SLAPI_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, LOG_ERR, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_extract_key",
"No token is given.\n");
goto bail;
}
StdPinObj = (SVRCOREStdPinObj *)SVRCORE_GetRegisteredPinObj();
if (!StdPinObj) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_key",
+ slapi_log_error(SLAPI_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, LOG_ERR, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_extract_key",
"Failed to extract pw with token %s.\n", token);
goto bail;
}
@@ -3031,7 +3049,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, LOG_ERR, "slapd_extract_key", "Failed to generate random.\n");
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_extract_key", "Failed to generate random.\n");
goto bail;
}
pwitem.data = randomPassword;
@@ -3043,7 +3061,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, LOG_ERR, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_extract_key",
"nsSSLPersonalitySSL value not found.\n");
goto bail;
}
@@ -3056,7 +3074,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, LOG_ERR, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_extract_key",
"Unable to open \"%s\" for writing (%d, %d).\n",
keyfile, PR_GetError(), PR_GetOSError());
goto bail;
@@ -3064,10 +3082,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, LOG_ERR, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_extract_key",
"Failed to extract keys for \"%s\".\n", token);
#else
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_key", "Failed to extract keys for %s.\n", personality);
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_extract_key", "Failed to extract keys for %s.\n", personality);
#endif
goto bail;
}
@@ -3078,7 +3096,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, LOG_ERR, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_extract_key",
"Unable to export encrypted private key (%d, %d).\n",
PR_GetError(), PR_GetOSError());
goto bail;
@@ -3088,7 +3106,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, LOG_ERR, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_extract_key",
"SEC_ASN1EncodeItem failed. (%d, %d).\n", PR_GetError(), PR_GetOSError());
goto bail;
}
@@ -3096,7 +3114,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, LOG_ERR, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_extract_key",
"PORT_NewArena failed. (%d, %d).\n", PR_GetError(), PR_GetOSError());
goto bail;
}
@@ -3106,7 +3124,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, LOG_ERR, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_extract_key",
"DekryptKey failed. (%d, %d).\n", PR_GetError(), PR_GetOSError());
goto bail;
}
@@ -3119,7 +3137,7 @@ slapd_extract_key(Slapi_Entry *entry, char *token, PK11SlotInfo *slot)
b64 = BTOA_ConvertItemToAscii(&clearKeyDER);
#endif
if (!b64) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "slapd_extract_key",
+ slapi_log_error(SLAPI_LOG_ERR, "slapd_extract_key",
"Failed to conver to the ASCII (%d, %d).\n",
PR_GetError(), PR_GetOSError());
goto bail;
@@ -3134,7 +3152,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, LOG_ERR, "slapd_extract_key",
+ slapi_log_error(SLAPI_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 4401bd6..ae22dc9 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, LOG_ERR, "start_tls",
+ slapi_log_error(SLAPI_LOG_ERR, "start_tls_io_enable",
"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, LOG_ERR, "start_tls",
+ slapi_log_error(SLAPI_LOG_ERR, "start_tls_io_enable",
"SSL socket import failed.\n" );
goto done;
}
} else {
if ( slapd_ssl_init2( &c->c_prfd, 1 ) != 0 ) {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "start_tls",
+ slapi_log_error(SLAPI_LOG_ERR, "start_tls_io_enable",
"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, LOG_ERR, "start_tls",
+ slapi_log_error(SLAPI_LOG_ERR, "start_tls_io_enable",
"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, LOG_ERR, "start_tls",
+ slapi_log_error(SLAPI_LOG_ERR, "start_tls_io_enable",
"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, LOG_ERR, "start_tls",
+ slapi_log_error(SLAPI_LOG_ERR, "start_tls_io_enable",
"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, LOG_DEBUG, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "start_tls",
"Received extended operation request with OID %s\n", oid );
}
if ( strcasecmp( oid, START_TLS_OID ) != 0) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "start_tls",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "start_tls",
"Still %d operations to be completed before closing the SSL connection.\n",
c->c_refcnt - 1 );
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "start_tls_graceful_closure", "SSL_CLOSE_NOTIFY_ALERT\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "start_tls_init", "Could not get argv\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "start_tls_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "start_tls_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "start_tls_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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 2936719..3d7ef6f 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, LOG_DEBUG, "slapi_str2filter \"%s\"\n", str, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "slapi_str2filter \"%s\"\n", str, 0, 0 );
if ( str == NULL || *str == '\0' ) {
return( NULL );
@@ -47,28 +47,28 @@ slapi_str2filter( char *str )
str++;
switch ( *str ) {
case '&':
- LDAPDebug0Args(LDAP_DEBUG_FILTER, LOG_DEBUG, "slapi_str2filter: AND\n");
+ LDAPDebug0Args(LDAP_DEBUG_FILTER, "slapi_str2filter: AND\n");
str++;
f = str2list( str, LDAP_FILTER_AND );
break;
case '|':
- LDAPDebug0Args(LDAP_DEBUG_FILTER, LOG_DEBUG, "put_filter: OR\n");
+ LDAPDebug0Args(LDAP_DEBUG_FILTER, "put_filter: OR\n");
str++;
f = str2list( str, LDAP_FILTER_OR );
break;
case '!':
- LDAPDebug0Args(LDAP_DEBUG_FILTER, LOG_DEBUG, "put_filter: NOT\n");
+ LDAPDebug0Args(LDAP_DEBUG_FILTER, "put_filter: NOT\n");
str++;
f = str2list( str, LDAP_FILTER_NOT );
break;
default:
- LDAPDebug0Args(LDAP_DEBUG_FILTER, LOG_DEBUG, "slapi_str2filter: simple\n");
+ LDAPDebug0Args(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "slapi_str2filter: default\n");
+ LDAPDebug0Args(LDAP_DEBUG_FILTER, "slapi_str2filter: default\n");
f = str2simple( str , 1 /* unescape_filter */);
break;
@@ -98,7 +98,7 @@ str2list( char *str, unsigned long ftype )
char *next;
char save;
- LDAPDebug(LDAP_DEBUG_FILTER, LOG_DEBUG, "str2list \"%s\"\n", str, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "str2simple \"%s\"\n", str, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "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, LOG_DEBUG, "str2subvals \"%s\"\n", val, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_FILTER, "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 778552a..e3c9600 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, LOG_ERR,
+ LDAPDebug(LDAP_DEBUG_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 e785a7b..7a3c64a 100644
--- a/ldap/servers/slapd/task.c
+++ b/ldap/servers/slapd/task.c
@@ -471,8 +471,8 @@ 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, LOG_ERR,
- "slapi_task_register_handler: "
+ LDAPDebug1Arg(LDAP_DEBUG_ANY,
+ "slapi_task_register_handler - "
"failed to create task dn for %s\n", name);
return ret;
}
@@ -508,9 +508,9 @@ 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, LOG_ERR,
- "Can't create task node '%s' (error %d)\n",
- name, x, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_plugin_task_register_handler - Can't create task node '%s' (error %d)\n",
+ name, x, 0);
ret = x;
goto out;
}
@@ -571,8 +571,8 @@ new_task(const char *rawdn, void *plugin)
dn = slapi_create_dn_string("%s", rawdn);
if (NULL == dn) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, LOG_ERR,
- "new_task failed: invalid task dn: %s\n", rawdn);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR,
+ "new_task - Invalid task dn: %s\n", rawdn);
return NULL;
}
task = (Slapi_Task *)slapi_ch_calloc(1, sizeof(Slapi_Task));
@@ -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, LOG_ERR, "WARNING: can't find task entry '%s'\n",
+ LDAPDebug(LDAP_DEBUG_WARNING, "get_internal_entry - 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, LOG_ERR, "WARNING: can't find task entry '%s'\n",
+ LDAPDebug(LDAP_DEBUG_WARNING, "get_internal_entry - 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, LOG_ERR, "WARNING: can't modify task "
+ LDAPDebug(LDAP_DEBUG_WARNING, "modify_internal_entry - 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, LOG_ERR, "Cancelling task '%s'\n",
+ LDAPDebug(LDAP_DEBUG_INFO, "task_modify - Canceling task '%s'\n",
fetch_attr(eAfter, "cn", "?"), 0, 0);
}
}
@@ -886,8 +886,8 @@ 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, LOG_ERR,
- "ERROR: No backend instance is specified.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "task_import_add - No backend instance is specified.\n", 0, 0, 0);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
return SLAPI_DSE_CALLBACK_ERROR;
}
@@ -902,13 +902,13 @@ static int task_import_add(Slapi_PBlock *pb, Slapi_Entry *e,
}
else if (counter == 0) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: No backend instance is specified.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "task_import_add - No backend instance is specified.\n", 0, 0, 0);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
return SLAPI_DSE_CALLBACK_ERROR;
} else {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: Multiple backend instances are specified: "
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "task_import_add - Multiple backend instances are specified: "
"%s, %s, ...\n", instances[0], instances[1], 0);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
return SLAPI_DSE_CALLBACK_ERROR;
@@ -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, LOG_ERR, "can't import to nonexistent backend %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "task_import_add - 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, LOG_ERR, "can't perform an import with pre-V3 "
+ LDAPDebug(LDAP_DEBUG_ERR, "task_import_add - 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, LOG_ERR, "ERROR: no ldif2db function defined for "
+ LDAPDebug(LDAP_DEBUG_ERR, "task_import_add - 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, LOG_ERR, "unable to allocate new task!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "task_import_add - 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, LOG_ERR, "ldbm2ldif: backend '%s' is AWOL!\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "task_export_thread - Backend '%s' is missing\n",
(const char *)*inp, 0, 0);
continue;
}
@@ -1085,14 +1085,14 @@ static void task_export_thread(void *arg)
}
slapi_task_log_notice(task, "Beginning export of '%s'", *inp);
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Beginning export of '%s'\n", *inp, 0, 0);
+ LDAPDebug(LDAP_DEBUG_INFO, "task_export_thread - 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, LOG_ERR,
- "ldbm2ldif: backend '%s' export failed (%d)\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "task_export_thread - 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, LOG_ERR, "Export finished.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_INFO, "task_export_thread - Export finished.\n", 0, 0, 0);
} else {
slapi_task_log_notice(task, "Export failed.");
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Export failed.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "task_export_thread - Export failed.\n", 0, 0, 0);
}
slapi_task_finish(task, rv);
@@ -1199,8 +1199,8 @@ 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, LOG_ERR,
- "ERROR: No backend instance is specified.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "task_export_add - No backend instance is specified.\n", 0, 0, 0);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1212,15 +1212,15 @@ static int task_export_add(Slapi_PBlock *pb, Slapi_Entry *e,
;
if (instance_cnt == 0) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: No backend instance is specified.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "task_export_add - 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, LOG_ERR,
- "ERROR: No backend instance is specified.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "task_export_add - No backend instance is specified.\n", 0, 0, 0);
*returncode = LDAP_OBJECT_CLASS_VIOLATION;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1280,8 +1280,9 @@ 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, LOG_ERR,
- "can't export to nonexistent backend %s\n", *inp, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "task_export_add - Can't export to nonexistent backend %s\n",
+ *inp, 0, 0);
*returncode = LDAP_NO_SUCH_OBJECT;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1291,14 +1292,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, LOG_ERR, "can't perform an export with pre-V3 "
+ LDAPDebug(LDAP_DEBUG_ERR, "task_export_add - 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, LOG_ERR, "ERROR: no db2ldif function defined for "
+ LDAPDebug(LDAP_DEBUG_ERR, "task_export_add - 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 +1310,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, LOG_ERR, "unable to allocate new task!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "task_export_add - Unable to allocate new task!\n", 0, 0, 0);
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1340,8 +1341,8 @@ 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, LOG_ERR,
- "unable to create ldbm2ldif thread!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "task_export_add - Unable to create ldbm2ldif thread!\n", 0, 0, 0);
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
slapi_pblock_destroy(mypb);
@@ -1377,18 +1378,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, LOG_ERR, "Beginning backup of '%s'\n",
+ LDAPDebug(LDAP_DEBUG_INFO, "task_backup_thread - 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, LOG_ERR, "Backup failed (error %d)\n", rv, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "task_backup_thread - 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, LOG_ERR, "Backup finished.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_INFO, "task_backup_thread - Backup finished.\n", 0, 0, 0);
}
slapi_task_finish(task, rv);
@@ -1440,16 +1441,17 @@ 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, LOG_ERR,
- "ERROR: no db2archive function defined.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "task_backup_add - no db2archive function defined.\n", 0, 0, 0);
*returncode = LDAP_UNWILLING_TO_PERFORM;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
if (! SLAPI_PLUGIN_IS_V3(be->be_database)) {
- 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);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "task_backup_add - 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;
goto out;
@@ -1458,7 +1460,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, LOG_ERR, "unable to allocate new task!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "task_backup_add - Unable to allocate new task!\n", 0, 0, 0);
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1480,8 +1482,8 @@ 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, LOG_ERR,
- "unable to create backup thread!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "task_backup_add - Unable to create backup thread!\n", 0, 0, 0);
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
slapi_ch_free((void **)&mypb->pb_seq_val);
@@ -1511,18 +1513,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, LOG_ERR, "Beginning restore to '%s'\n",
+ LDAPDebug(LDAP_DEBUG_INFO, "task_restore_thread - 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, LOG_ERR, "Restore failed (error %d)\n", rv, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "task_restore_thread - 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, LOG_ERR, "Restore finished.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_INFO, "task_restore_thread - Restore finished.\n", 0, 0, 0);
}
slapi_task_finish(task, rv);
@@ -1578,8 +1580,8 @@ 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, LOG_ERR,
- "ERROR: no archive2db function defined.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "task_restore_add - No archive2db function defined.\n", 0, 0, 0);
*returncode = LDAP_UNWILLING_TO_PERFORM;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1589,7 +1591,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, LOG_ERR, "can't perform an restore with pre-V3 "
+ LDAPDebug(LDAP_DEBUG_ERR, "task_restore_add - 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 +1601,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, LOG_ERR, "unable to allocate new task!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "task_restore_add - Unable to allocate new task!\n", 0, 0, 0);
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1623,8 +1625,8 @@ 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, LOG_ERR,
- "unable to create restore thread!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "task_restore_add - Unable to create restore thread!\n", 0, 0, 0);
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
slapi_ch_free((void **)&mypb->pb_seq_val);
@@ -1657,7 +1659,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, LOG_ERR, "Index failed (error %d)\n", rv, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "task_index_thread - Index failed (error %d)\n", rv, 0, 0);
}
slapi_task_finish(task, rv);
@@ -1696,13 +1698,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, LOG_ERR, "can't import to nonexistent backend %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "task_index_add - 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, LOG_ERR, "ERROR: no db2index function defined for "
+ LDAPDebug(LDAP_DEBUG_ERR, "task_index_add - 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 +1737,7 @@ static int task_index_add(Slapi_PBlock *pb, Slapi_Entry *e,
}
if (NULL == indexlist) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "no index is specified!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "task_index_add - No index is specified!\n", 0, 0, 0);
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_OK;
goto out;
@@ -1744,7 +1746,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, LOG_ERR, "unable to allocate new task!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "task_index_add - Unable to allocate new task!\n", 0, 0, 0);
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1768,8 +1770,8 @@ 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, LOG_ERR,
- "unable to create index thread!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "task_index_add - Unable to create index thread!\n", 0, 0, 0);
rv = SLAPI_DSE_CALLBACK_ERROR;
slapi_ch_free((void **)&mypb->pb_instance_name);
slapi_pblock_destroy(mypb);
@@ -1835,16 +1837,16 @@ task_upgradedb_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter,
}
slapi_ch_free_string(&cookie);
if (NULL == be) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: no upgradedb is defined.\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "task_upgradedb_add - No upgradedb is defined.\n", 0, 0, 0);
*returncode = LDAP_UNWILLING_TO_PERFORM;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
}
if (NULL == be->be_database->plg_upgradedb ||
strcasecmp(database_type, be->be_database->plg_name)) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR,
- "ERROR: no upgradedb is defined in %s.\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "task_upgradedb_add - No upgradedb is defined in %s.\n",
be->be_database->plg_name, 0, 0);
*returncode = LDAP_UNWILLING_TO_PERFORM;
rv = SLAPI_DSE_CALLBACK_ERROR;
@@ -1854,7 +1856,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, LOG_ERR, "unable to allocate new task!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "task_upgradedb_add - Unable to allocate new task!\n", 0, 0, 0);
*returncode = LDAP_OPERATIONS_ERROR;
rv = SLAPI_DSE_CALLBACK_ERROR;
goto out;
@@ -1931,7 +1933,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, LOG_ERR, "sysconfig reload task: %s\n", returntext, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "task_sysconfig_reload_add - %s\n", returntext, 0, 0);
rc = SLAPI_DSE_CALLBACK_ERROR;
goto done;
}
@@ -1946,7 +1948,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, LOG_ERR, "sysconfig reload task: processing file (%s)\n",
+ LDAPDebug(LDAP_DEBUG_INFO, "task_sysconfig_reload_add - processing file (%s)\n",
filename, 0 , 0);
}
@@ -2059,12 +2061,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, LOG_ERR, "sysconfig reload task: %s\n",returntext,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "task_sysconfig_reload_add - %s\n",returntext,0,0);
rc = SLAPI_DSE_CALLBACK_ERROR;
break;
}
if(logchanges){
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "sysconfig reload task: set (%s) to (%s)\n",
+ LDAPDebug(LDAP_DEBUG_INFO, "task_sysconfig_reload_add - set (%s) to (%s)\n",
env_var, env_value , 0);
}
}
@@ -2075,7 +2077,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, LOG_ERR, "sysconfig reload task: %s\n", returntext, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "task_sysconfig_reload_add - %s\n", returntext, 0, 0);
rc = SLAPI_DSE_CALLBACK_ERROR;
}
@@ -2099,7 +2101,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, LOG_DEBUG, TASK_TOMBSTONE_FIXUP,
+ slapi_log_error(SLAPI_LOG_REPL, TASK_TOMBSTONE_FIXUP,
"Fixing tombstone (%s)\n", slapi_entry_get_dn(e));
/* We have an entry tombstone that needs fixing */
@@ -2141,7 +2143,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, LOG_DEBUG, TASK_TOMBSTONE_FIXUP,
+ slapi_log_error(SLAPI_LOG_REPL, TASK_TOMBSTONE_FIXUP,
"Stripping tombstone (%s)\n", slapi_entry_get_dn(e));
/* We have an entry tombstone that needs stripping */
@@ -2164,7 +2166,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, LOG_DEBUG, TASK_TOMBSTONE_FIXUP,
+ slapi_log_error(SLAPI_LOG_REPL, TASK_TOMBSTONE_FIXUP,
"Stripping tombstone (%s) failed, error %d\n", slapi_entry_get_dn(e), rc);
}
}
@@ -2194,11 +2196,11 @@ task_fixup_tombstone_thread(void *arg)
return; /* no task */
}
slapi_task_inc_refcount(task);
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, TASK_TOMBSTONE_FIXUP,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, TASK_TOMBSTONE_FIXUP,
+ slapi_log_error(SLAPI_LOG_REPL, TASK_TOMBSTONE_FIXUP,
"Beginning tombstone fixup task...\n");
if(task_data->stripcsn){
@@ -2228,7 +2230,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, LOG_DEBUG, TASK_TOMBSTONE_FIXUP,
+ slapi_log_error(SLAPI_LOG_REPL, TASK_TOMBSTONE_FIXUP,
"Failed to search backend for tombstones, error %d\n", rc);
slapi_pblock_destroy(search_pb);
goto bail;
@@ -2248,7 +2250,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, LOG_ERR, TASK_TOMBSTONE_FIXUP,
+ slapi_log_error(SLAPI_LOG_ERR, TASK_TOMBSTONE_FIXUP,
"Failed to update tombstone entry (%s) error %d\n",
slapi_entry_get_dn(entries[j]), rc);
}
@@ -2261,13 +2263,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, LOG_DEBUG, TASK_TOMBSTONE_FIXUP, "%s %d tombstones.\n",
+ slapi_log_error(SLAPI_LOG_REPL, 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, LOG_DEBUG, TASK_TOMBSTONE_FIXUP,
+ slapi_log_error(SLAPI_LOG_PLUGIN, TASK_TOMBSTONE_FIXUP,
"fixup_tombstone_task_thread <-- refcount decremented.\n" );
}
@@ -2389,8 +2391,8 @@ 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, LOG_ERR,
- "task_fixup_tombstones_add: unable to create index thread!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "task_fixup_tombstones_add - Unable to create index thread!\n", 0, 0, 0);
*returncode = LDAP_OPERATIONS_ERROR;
slapi_task_finish(task, *returncode);
slapi_ch_array_free(base);
@@ -2412,7 +2414,7 @@ done:
static void
fixup_tombstone_task_destructor(Slapi_Task *task)
{
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, TASK_TOMBSTONE_FIXUP,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 +2427,7 @@ fixup_tombstone_task_destructor(Slapi_Task *task)
slapi_ch_free((void **)&mydata);
}
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, TASK_TOMBSTONE_FIXUP,
+ slapi_log_error(SLAPI_LOG_PLUGIN, TASK_TOMBSTONE_FIXUP,
"fixup_tombstone_task_destructor <--\n" );
}
@@ -2503,8 +2505,8 @@ 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, LOG_ERR, TASK_DES2AES,
- "unable to create des2aes thread!\n");
+ slapi_log_error(SLAPI_LOG_ERR, TASK_DES2AES,
+ "Unable to create des2aes thread!\n");
*returncode = LDAP_OPERATIONS_ERROR;
slapi_task_finish(task, *returncode);
rc = SLAPI_DSE_CALLBACK_ERROR;
@@ -2576,7 +2578,7 @@ task_des2aes_thread(void *arg)
struct suffixlist *list;
char *cookie = NULL;
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, TASK_DES2AES,
+ slapi_log_error(SLAPI_LOG_INFO, 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 +2622,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, LOG_ERR, "convert_pbe_des_to_aes: ",
+ slapi_log_error(SLAPI_LOG_ERR, TASK_DES2AES,
"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 +2649,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, LOG_ERR, TASK_DES2AES,
+ slapi_log_error(SLAPI_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,8 +2662,8 @@ 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, LOG_ERR, TASK_DES2AES,
- "failed to encode AES password for (%s)\n",
+ slapi_log_error(SLAPI_LOG_ERR, TASK_DES2AES,
+ "Failed to encode AES password for (%s)\n",
slapi_entry_get_dn(entries[ii]));
slapi_task_log_notice(task,
"failed to encode AES password for (%s)\n",
@@ -2688,7 +2690,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, LOG_ERR, TASK_DES2AES,
+ slapi_log_error(SLAPI_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 +2698,7 @@ task_des2aes_thread(void *arg)
slapi_entry_get_dn(entries[ii]), result);
rc = 1;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, TASK_DES2AES,
+ slapi_log_error(SLAPI_LOG_ERR, TASK_DES2AES,
"Successfully converted password for (%s)\n",
slapi_entry_get_dn(entries[ii]));
slapi_task_log_notice(task,
@@ -2718,23 +2720,23 @@ task_des2aes_thread(void *arg)
slapi_ch_free_string(&filter);
}
if (!converted_des_passwd){
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, TASK_DES2AES,
+ slapi_log_error(SLAPI_LOG_INFO, 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, LOG_ERR, TASK_DES2AES,
+ slapi_log_error(SLAPI_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, LOG_ERR, TASK_DES2AES,
+ slapi_log_error(SLAPI_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, LOG_ERR, TASK_DES2AES,
+ slapi_log_error(SLAPI_LOG_ERR, TASK_DES2AES,
"Unable to convert passwords\n");
slapi_task_log_notice(task, "Unable to convert passwords\n");
rc = 1;
@@ -2751,7 +2753,7 @@ done:
static void
des2aes_task_destructor(Slapi_Task *task)
{
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, TASK_DES2AES,
+ slapi_log_error(SLAPI_LOG_TRACE, 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 +2766,7 @@ des2aes_task_destructor(Slapi_Task *task)
slapi_ch_free((void **)&task_data);
}
}
- slapi_log_error(SLAPI_LOG_TRACE, LOG_DEBUG, TASK_DES2AES,
+ slapi_log_error(SLAPI_LOG_TRACE, TASK_DES2AES,
"des2aes_task_destructor <--\n" );
}
@@ -2785,16 +2787,15 @@ 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, LOG_ERR, "WARNING: entire cn=tasks tree seems to "
- "be AWOL!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_WARNING, "task_cleanup - Failed to search for %s - error %d\n",
+ TASK_BASE_DN, ret, 0);
slapi_pblock_destroy(pb);
return;
}
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries);
if (NULL == entries) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "WARNING: entire cn=tasks tree seems to "
- "be AWOL!\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_WARNING, "task_cleanup - Entire cn=tasks tree is empty.\n", 0, 0, 0);
slapi_pblock_destroy(pb);
return;
}
@@ -2836,8 +2837,8 @@ void task_init(void)
{
global_task_lock = PR_NewLock();
if (global_task_lock == NULL) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "unable to create global tasks lock! "
- "(that's bad)\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_ERR, "task_init - Unable to create global tasks lock!\n",
+ 0, 0, 0);
return;
}
@@ -2866,7 +2867,7 @@ void task_shutdown(void)
(task->task_state != SLAPI_TASK_FINISHED)) {
task->task_state = SLAPI_TASK_CANCELLED;
if (task->cancel) {
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Cancelling task '%s'\n",
+ LDAPDebug(LDAP_DEBUG_INFO, "task_shutdown - Cancelling task '%s'\n",
task->task_dn, 0, 0);
(*task->cancel)(task);
found_any = 1;
diff --git a/ldap/servers/slapd/test-plugins/sampletask.c b/ldap/servers/slapd/test-plugins/sampletask.c
index 5e9d053..a618b1e 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, LOG_ERR, "sampletask", "Sample task starts (arg: %s) ...\n", myarg);
+ slapi_log_error(SLAPI_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, LOG_ERR, "sampletask", "Sample task finished.\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, "sampletask", "unable to allocate new task!\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, "sampletask",
+ slapi_log_error(SLAPI_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 2254e4a..928ab71 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, LOG_DEBUG, "test_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "test_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "test_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "test_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "test_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "test_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "test_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "test_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "test_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "test_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "test_search",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "test_search",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "test_search",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "test_search",
"Search requested by %s\n", reqdn );
} else {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "test_search",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "testbind_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "testbind_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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 7e2fc77..63c0f8c 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, LOG_DEBUG, PLUGIN_NAME, "nullsuffix_init\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PLUGIN_NAME, "nullsuffix_bind\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PLUGIN_NAME, "nullsuffix_add\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PLUGIN_NAME, "nullsuffix_modify\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PLUGIN_NAME, "nullsuffix_delete\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PLUGIN_NAME, "nullsuffix_modrdn\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PLUGIN_NAME, "nullsuffix_search\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, PLUGIN_NAME,
"could not get remaining search parameters\n" );
}
if ( slapi_pblock_get( pb, SLAPI_OPERATION, &op ) != 0 ) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PLUGIN_NAME, "nullsuffix_search:"
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, PLUGIN_NAME, "nullsuffix_close\n" );
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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 a324b33..be49ded 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, LOG_DEBUG, DB_PLUGIN_NAME,"generated key: %s\n", key_string);
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, DB_PLUGIN_NAME, "db: %s: key stored.\n", (char *)key.data);
+ slapi_log_error(SLAPI_LOG_PLUGIN, DB_PLUGIN_NAME, "db: %s: key stored.\n", (char *)key.data);
break;
case DB_KEYEXIST:
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, DB_PLUGIN_NAME, "db: %s: key previously stored.\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_DEBUG, DB_PLUGIN_NAME, "db: Error detected in db_put \n");
+ slapi_log_error(SLAPI_LOG_PLUGIN, 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, LOG_ERR, DB_PLUGIN_NAME,
+ slapi_log_error(SLAPI_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, LOG_DEBUG, DB_PLUGIN_NAME,
+ slapi_log_error(SLAPI_LOG_PLUGIN, DB_PLUGIN_NAME,
"db: %s: key stored.\n", data_dn);
ret = 0;
} else {
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, DB_PLUGIN_NAME,
+ slapi_log_error(SLAPI_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, LOG_ERR, DB_PLUGIN_NAME,
+ slapi_log_error(SLAPI_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 ca8b133..588ff9b 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, LOG_DEBUG, "testentry_scramble",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "testentry_unscramble",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "testentry_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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 6ccf71d..b209f11 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, LOG_DEBUG, "testexop_babs", "%s\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "testexop_babs",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "testexop_babs",
"Received extended operation request with OID %s\n",
oid );
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testexop_babs",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "testexop_babs", "%s\n",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "testexop_babs",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "testexop_babs",
"OID sent to client: %s\n", "5.6.7.8" );
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testexop_babs",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
"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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
"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, LOG_DEBUG, "testexop_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "testexop_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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 c4c28da..200cc15 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, LOG_DEBUG, "testgetip",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "testgetip",
"Could not get client IP.\n" );
} else if (( addrstr = netaddr2str( &client_addr, addrbuf,
sizeof(addrbuf))) != NULL ) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testgetip",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "testgetip",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "testgetip",
"Could not get server IP.\n" );
} else if (( addrstr = netaddr2str( &server_addr, addrbuf,
sizeof(addrbuf))) != NULL ) {
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testgetip",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_ERR, "testgetip_init",
+ slapi_log_error(SLAPI_LOG_ERR, "testgetip_init",
"Failed to set version and functions.\n" );
return( -1 );
}
- slapi_log_error(SLAPI_LOG_PLUGIN, LOG_DEBUG, "testgetip_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "testgetip",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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 abf845b..e036012 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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
"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, LOG_DEBUG, "testpostop_add",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
"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, LOG_DEBUG, "testpostop_mod",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
"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, LOG_DEBUG, "testpostop_del",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
"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, LOG_DEBUG, "testpostop_modrdn",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
"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, LOG_DEBUG, "testpostop_abandon",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "testpostop_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "write_changelog",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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 5450ee8..4d08c54 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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
"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, LOG_DEBUG, "testpreop_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
"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, LOG_ERR, "testpreop_search",
+ slapi_log_error(SLAPI_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, LOG_ERR, "SLAPI_SEARCH_TARGET",
+ slapi_log_error(SLAPI_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, LOG_ERR, "SLAPI_ORIGINAL_TARGET_DN",
+ slapi_log_error(SLAPI_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, LOG_DEBUG,
+ slapi_log_error(SLAPI_LOG_PLUGIN,
"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, LOG_DEBUG, "testpreop_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_ERR, "testpreop_init",
+ slapi_log_error(SLAPI_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 817735f..08c3830 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, LOG_DEBUG, "testsasl_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_ERR, "testsasl_bind",
+ slapi_log_error(SLAPI_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, LOG_ERR, "testsasl_bind",
+ slapi_log_error(SLAPI_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, LOG_DEBUG, "testsasl_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "testsasl_bind",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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, LOG_DEBUG, "testsasl_init",
+ slapi_log_error(SLAPI_LOG_PLUGIN, "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 9f02212..0ffdbae 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, LOG_ERR, "parse_duration: invalid duration (%s)\n", value?value:"null");
+ LDAPDebug1Arg(LDAP_DEBUG_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, LOG_ERR, "parse_duration_longlong: invalid duration (%s)\n", value?value:"null");
+ LDAPDebug1Arg(LDAP_DEBUG_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 5aad22d..ddfaf6c 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, LOG_DEBUG, "finger printing directory %d\n", i, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "finger printing directory %d\n", i, 0, 0);
while (TRUE) {
stat = readrec(&edfin[i], &attrib);
if (stat == IDDS_MM_ABSENT) {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "ignored: %s: %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "db%d: %s: %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"...data modified\n", key, 0, 0);
hashentry->flags = MODIFIED;
}
}
continue;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "overflow in key %u\n", key, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"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, LOG_DEBUG, "ignored: %s: %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "db%d: %s: %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "...hash entry not found\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "...hash entry not found\n", 0, 0, 0);
continue;
}
if (!(hashentry->flags & LOADED))
{
hashentry->first = newrecord(attrib);
hashentry->flags |= LOADED;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, " ...data loaded\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, " ...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, LOG_DEBUG, " ...winner data loaded\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, " ...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, LOG_DEBUG,
+ LDAPDebug(LDAP_DEBUG_TRACE,
"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, LOG_DEBUG, "ignored: %s: %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "db%d: %s: %s\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "...hash entry not found\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "...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, LOG_DEBUG, " ...deleted\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, " ...deleted\n", 0, 0, 0);
adddelete(edfout[i], attrib);
} else {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, " ...modified\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, " ...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, LOG_DEBUG, "scanning db for new entries\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, " ...add new\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, " ...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, LOG_DEBUG, "%s\n invalid input line\n",
+ LDAPDebug(LDAP_DEBUG_TRACE, "%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, LOG_DEBUG, "%s\n invalid input line\n", line, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "%s\n invalid input line\n", line, 0, 0);
continue; /* invalid line, but we'll just skip it */
}
toolong = FALSE;
@@ -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, LOG_DEBUG, "readrec: failed to read line\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "readrec: failed to read line\n");
break;
}
len = strlen(line);
@@ -788,14 +788,14 @@ readrec(edfFILE * edf1, attrib1_t ** attrib)
rc = Dec64(b64, (unsigned char *)line);
if (rc == -1)
{
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "%s\n invalid input line\n", line, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "%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, LOG_DEBUG, "%s\n line too long\n", line, 0, 0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "%s\n line too long\n", line, 0, 0);
}
continue;
}
@@ -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, LOG_DEBUG, "readrec: failed to read line\n");
+ LDAPDebug0Args(LDAP_DEBUG_TRACE, "readrec: failed to read line\n");
break;
}
len = strlen(line);
diff --git a/ldap/servers/slapd/unbind.c b/ldap/servers/slapd/unbind.c
index 580dfba..17d98cf 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, LOG_DEBUG, "do_unbind\n", 0, 0, 0 );
+ LDAPDebug(LDAP_DEBUG_TRACE, "do_unbind\n", 0, 0, 0 );
slapi_pblock_get( pb, SLAPI_OPERATION, &operation);
ber = operation->o_ber;
diff --git a/ldap/servers/slapd/uniqueid.c b/ldap/servers/slapd/uniqueid.c
index 6ef9366..3db7813 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, LOG_ERR, MODULE, "uniqueIDNew: "
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE, "uniqueIDCompare: "
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE, "uniqueIDFormat: "
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE, "uniqueIDFormat: "
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE, "uniqueIDScan: "
+ slapi_log_error(SLAPI_LOG_ERR, MODULE, "uniqueIDScan: "
"NULL argument passed to the function.\n");
return UID_BADDATA;
}
if (!isValidFormat (buff))
{
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, MODULE, "uniqueIDScan: "
+ slapi_log_error(SLAPI_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 b261543..f7896c0 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, LOG_ERR, MODULE, "uniqueIDGenInit: invalid arguments\n");
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE, "uniqueIDGenInit: "
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE, "uniqueIDGenerate: "
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE, "uniqueIDGenerate: "
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE, "uniqueIDGenerateMT: "
+ slapi_log_error(SLAPI_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 f14fcec..207c024 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, LOG_DEBUG, "slapi_filter_sprintf: failed to escape filter value(%s)\n",val,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "slapi_filter_sprintf: failed to escape filter value(%s)\n",val,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "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, LOG_DEBUG, "slapi_escape_filter_value: failed to escape filter value(%s)\n",filter_str,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "slapi_escape_filter_value: failed to escape filter value(%s)\n",filter_str,0,0);
return NULL;
} else {
return escaped_filter.bv_val;
@@ -612,8 +612,8 @@ int slapi_mods2entry (Slapi_Entry **e, const char *idn, LDAPMod **iattrs)
valuearray_free(&vals);
if (rc != LDAP_SUCCESS)
{
- LDAPDebug2Args(LDAP_DEBUG_ANY, LOG_ERR,
- "slapi_mods2entry: add_values for type %s failed (rc: %d)\n",
+ LDAPDebug2Args(LDAP_DEBUG_ERR,
+ "slapi_mods2entry - Add_values for type %s failed (rc: %d)\n",
normtype, rc );
slapi_entry_free (*e);
*e = NULL;
@@ -932,7 +932,7 @@ rel2abspath_ext( char *relpath, char *cwd )
if ( NULL == cwd ) {
if ( getcwd( abspath, MAXPATHLEN ) == NULL ) {
perror( "getcwd" );
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "Cannot determine current directory\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "rel2abspath_ext - 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, LOG_ERR, "Pathname \"%s" _PSEP "%s\" too long\n",
+ LDAPDebug(LDAP_DEBUG_ERR, "rel2abspath_ext - 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, LOG_ERR,"%s, err=%d %s\n",buffer,err,(msg = strerror( err )) ? msg : "");
+ LDAPDebug(LDAP_DEBUG_ERR,"%s, err=%d %s\n",buffer,err,(msg = strerror( err )) ? msg : "");
}
/* ***************************************************
@@ -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, LOG_ERR, "slapi_is_special_rdn: invalid flag %d\n", flag);
+ LDAPDebug1Arg(LDAP_DEBUG_ERR, "slapi_is_special_rdn - Invalid flag %d\n", flag);
return 0; /* not a special rdn/dn */
}
if (!rdn) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, LOG_ERR, "slapi_is_special_rdn: NULL rdn\n");
+ LDAPDebug0Args(LDAP_DEBUG_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, LOG_ERR,"util_getvirtualmemsize", "ERROR: getrlimit returned non-zero. errno=%u\n", errsrv);
+ slapi_log_error(SLAPI_LOG_ERR,"util_getvirtualmemsize", "getrlimit returned non-zero. errno=%u\n", errsrv);
return 0;
}
return rl.rlim_cur;
@@ -1503,8 +1503,8 @@ 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, LOG_ERR, "util_info_sys_pages",
- "ERROR: Null return variables are passed. Skip getting the system info.\n");
+ slapi_log_error(SLAPI_LOG_ERR, "util_info_sys_pages",
+ "Null return variables are passed. Skip getting the system info.\n");
return 1;
}
*pagesize = 0;
@@ -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, LOG_ERR,"util_info_sys_pages", "ERROR: Unable to open file /proc/%d/status. errno=%u\n", getpid(), errsrv);
+ slapi_log_error(SLAPI_LOG_ERR,"util_info_sys_pages", "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, LOG_ERR,"util_info_sys_pages", "ERROR: Unable to open file /proc/meminfo. errno=%u\n", errsrv);
+ slapi_log_error(SLAPI_LOG_ERR,"util_info_sys_pages", "Unable to open file /proc/meminfo. errno=%u\n", errsrv);
return 1;
}
while (! feof(fm)) {
@@ -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, LOG_DEBUG,"util_info_sys_pages pages=%lu, \n",
+ LDAPDebug(LDAP_DEBUG_TRACE,"util_info_sys_pages - pages=%lu, \n",
(unsigned long) *pages, 0,0);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"util_info_sys_pages using pages for pages \n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"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, LOG_DEBUG,"util_info_sys_pages pages=%lu, getrlim=RLIM_INFINITY, freesize=%lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE,"util_info_sys_pages - pages=%lu, getrlim=RLIM_INFINITY, freesize=%lu\n",
(unsigned long)*pages, (unsigned long)freesize, 0);
} else {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"util_info_sys_pages pages=%lu, getrlim=%lu, freesize=%lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE,"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, LOG_DEBUG,"util_info_sys_pages using getrlim for availpages \n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"util_info_sys_pages - using getrlim for availpages \n",0,0,0);
*availpages = rlimsize;
} else if (freesize < *pages && freesize > 0) {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"util_info_sys_pages using freesize for availpages \n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"util_info_sys_pages - using freesize for availpages \n",0,0,0);
*availpages = freesize;
} else {
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"util_info_sys_pages using pages for availpages \n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE,"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, 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",
+ LDAPDebug(LDAP_DEBUG_TRACE,"util_info_sys_pages - 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);
}
@@ -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, LOG_DEBUG,"util_info_sys_pages", "USING pages=%lu, procpages=%lu, availpages=%lu \n",
+ slapi_log_error(SLAPI_LOG_TRACE,"util_info_sys_pages", "USING pages=%lu, procpages=%lu, availpages=%lu \n",
(unsigned long)*pages, (unsigned long)*procpages, (unsigned long)*availpages);
return 0;
@@ -1782,13 +1782,13 @@ int util_is_cachesize_sane(size_t *cachesize)
*/
cachepages = *cachesize / pagesize;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"util_is_cachesize_sane cachesize=%lu / pagesize=%lu \n",
+ LDAPDebug(LDAP_DEBUG_TRACE,"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, LOG_DEBUG,"util_is_cachesize_sane cachepages=%lu <= availpages=%lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE,"util_is_cachesize_sane - cachepages=%lu <= availpages=%lu\n",
(unsigned long)cachepages,(unsigned long)availpages,0);
if (!issane) {
@@ -1799,28 +1799,28 @@ 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, 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);
+ 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);
}
#else
size_t freepages = 0;
freepages = pages - procpages;
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"util_is_cachesize_sane pages=%lu - procpages=%lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE,"util_is_cachesize_sane pages=%lu - procpages=%lu\n",
(unsigned long)pages,(unsigned long)procpages,0);
issane = (int)(cachepages <= freepages);
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG,"util_is_cachesize_sane cachepages=%lu <= freepages=%lu\n",
+ LDAPDebug(LDAP_DEBUG_TRACE,"util_is_cachesize_sane cachepages=%lu <= freepages=%lu\n",
(unsigned long)cachepages,(unsigned long)freepages,0);
if (!issane) {
*cachesize = (size_t)((pages - procpages) * pagesize);
- slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, "util_is_cachesize_sane", "util_is_cachesize_sane WARNING adjusted cachesize to %lu\n",
+ slapi_log_error(SLAPI_LOG_WARNING, "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, LOG_DEBUG,"util_is_cachesize_sane", "WARNING: Cachesize not sane \n");
+ slapi_log_error(SLAPI_LOG_TRACE,"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 1f90672..cbd85d5 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, LOG_ERR, MODULE,
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE,
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE, "uuid_init: "
+ slapi_log_error(SLAPI_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, 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");
+ slapi_log_error(SLAPI_LOG_WARNING, MODULE,
+ "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, LOG_ERR, MODULE, "uuid_init: "
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE, "uuid_create_mt: generator ran "
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE,
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE, "read_state: "
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE, "read_state: "
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE, "read_state: "
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE, "read_state: "
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE, "read_state_from_entry: "
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE, "read_state_from_entry: "
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE, "write_state: "
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE, "write_state: "
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE, "add_state_entry: "
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE, "add_state_entry: "
+ slapi_log_error(SLAPI_LOG_ERR, MODULE, "add_state_entry: "
"add operation failed; LDAP error - %d.\n", rt);
return UUID_LDAP_ERROR;
}
- slapi_log_error(SLAPI_LOG_HOUSE, LOG_DEBUG, MODULE, "add_state_entry: "
+ slapi_log_error(SLAPI_LOG_HOUSE, 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, LOG_ERR, MODULE, "modify_state_entry: "
+ slapi_log_error(SLAPI_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, LOG_ERR, MODULE, "modify_state_entry: "
+ slapi_log_error(SLAPI_LOG_ERR, MODULE, "modify_state_entry: "
"update operation failed; LDAP error - %d.\n", res);
return UUID_LDAP_ERROR;
}
- slapi_log_error(SLAPI_LOG_HOUSE, LOG_DEBUG, MODULE, "modify_state_entry: "
+ slapi_log_error(SLAPI_LOG_HOUSE, 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, LOG_ERR, MODULE, "update_time_mt: "
+ slapi_log_error(SLAPI_LOG_ERR, MODULE, "update_time_mt: "
"ran out of time sequence numbers; "
"uuid_update_state must be called\n");
diff --git a/ldap/servers/slapd/value.c b/ldap/servers/slapd/value.c
index 3c9ea02..e7888af 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, LOG_ERR, "Slapi_Value %s ptr=%lx\n", text, value, 0);
+ LDAPDebug(LDAP_DEBUG_DEBUG, "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 909c2d9..66b34ab 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, LOG_ERR, "valueset_value_syntax_cmp: "
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG,"could not find value %d for attr %s\n", i-1, a->a_type, 0 );
+ LDAPDebug(LDAP_DEBUG_ARGS,"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 ecc54a1..c128104 100644
--- a/ldap/servers/slapd/vattr.c
+++ b/ldap/servers/slapd/vattr.c
@@ -623,8 +623,8 @@ 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, LOG_ERR,
- "Detected virtual attribute loop in get on entry %s, attribute %s\n",
+ LDAPDebug(LDAP_DEBUG_ERR,
+ "slapi_vattr_values_get_sp - 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, LOG_ERR,"Detected virtual attribute loop in get on entry %s, attribute %s\n", slapi_entry_get_dn_const(e), type, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,"slapi_vattr_namespace_values_get_sp - 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, LOG_ERR,"Detected virtual attribute loop in compare on entry %s, attribute %s\n", slapi_entry_get_dn_const(e), type, 0);
+ LDAPDebug(LDAP_DEBUG_ERR,"slapi_vattr_namespace_value_compare_sp - 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, LOG_ERR, "slapi_vattr_list_attrs: invalid param\n", 0, 0, 0);
+ LDAPDebug(LDAP_DEBUG_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, LOG_DEBUG, "--> vattr_add_attrval\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "--> 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, LOG_ERR, "vattr_add_attrval: failed to allocate memory\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "vattr_add_attrval - Failed to allocate memory\n",0,0,0);
ret = -1;
}
}
else
{
- LDAPDebug(LDAP_DEBUG_ANY, LOG_ERR, "vattr_add_attrval: failed to allocate memory\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_ERR, "vattr_add_attrval - Failed to allocate memory\n",0,0,0);
ret = -1;
}
- LDAPDebug(LDAP_DEBUG_TRACE, LOG_DEBUG, "<-- vattr_add_attrval\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "<-- 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, LOG_DEBUG, "--> vattr_map_entry_build_schema\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "--> 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, LOG_DEBUG, "<-- vattr_map_entry_build_schema - schema off\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "<-- 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, LOG_DEBUG, "<-- vattr_map_entry_build_schema\n",0,0,0);
+ LDAPDebug(LDAP_DEBUG_TRACE, "<-- vattr_map_entry_build_schema\n",0,0,0);
return ret;
}
diff --git a/lib/base/ereport.cpp b/lib/base/ereport.cpp
index fa6ddcb..e409de0 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, LOG_DEBUG, ACL_PLUGIN_NAME, errstr);
+// slapi_log_error(SLAPI_LOG_PLUGIN, ACL_PLUGIN_NAME, errstr);
break;
case LOG_SECURITY:
-// slapi_log_error(SLAPI_LOG_ACL, LOG_DEBUG, ACL_PLUGIN_NAME, errstr);
+// slapi_log_error(SLAPI_LOG_ACL, ACL_PLUGIN_NAME, errstr);
break;
case LOG_CATASTROPHE:
-// slapi_log_error(SLAPI_LOG_FATAL, LOG_ERR, ACL_PLUGIN_NAME, errstr);
+// slapi_log_error(SLAPI_LOG_ERR, ACL_PLUGIN_NAME, errstr);
break;
default:
break;
7 years, 6 months
Branch '389-ds-base-1.3.5' - dirsrvtests/tests
by Mark Reynolds
dirsrvtests/tests/suites/password/pwdPolicy_attribute_test.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
New commits:
commit 89b33813b44bc8ebbbbfd6fc2b10a4ae21d4af5f
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Mon Sep 19 09:25:32 2016 -0400
Ticket 48832 - Fix CI test suite for password min age
Description: Need to add sleeps to test case
Reviewed by: mreynolds (one line commit rule)
(cherry picked from commit 2b45d58dac74e35f779a5df6256301cca4c80204)
diff --git a/dirsrvtests/tests/suites/password/pwdPolicy_attribute_test.py b/dirsrvtests/tests/suites/password/pwdPolicy_attribute_test.py
index d3be7e2..023f508 100644
--- a/dirsrvtests/tests/suites/password/pwdPolicy_attribute_test.py
+++ b/dirsrvtests/tests/suites/password/pwdPolicy_attribute_test.py
@@ -1,12 +1,10 @@
import os
-import sys
import time
import subprocess
import ldap
import logging
import pytest
-from lib389 import DirSrv, Entry, tools, tasks
-from lib389.tools import DirSrvTools
+from lib389 import DirSrv, Entry
from lib389._constants import *
from lib389.properties import *
from lib389.tasks import *
@@ -72,7 +70,6 @@ def topology(request):
request.addfinalizer(fin)
-
return TopologyStandalone(standalone)
@@ -208,6 +205,7 @@ def test_change_pwd(topology, test_user, password_policy,
'policy for {}: error {}'.format(PW_POLICY_CONT_USER,
e.message['desc']))
raise e
+ time.sleep(1)
try:
log.info('Bind as user and modify userPassword')
@@ -291,6 +289,7 @@ def test_pwd_min_age(topology, test_user, password_policy):
'policy for {}: error {}'.format(DN_CONFIG,
e.message['desc']))
raise e
+ time.sleep(1)
try:
log.info('Bind as user and modify userPassword')
@@ -302,7 +301,7 @@ def test_pwd_min_age(topology, test_user, password_policy):
log.error('Failed to change userpassword for {}: error {}'.format(
TEST_USER_DN, e.message['info']))
raise e
-
+ time.sleep(1)
log.info('Bind as user and modify userPassword straight away after previous change')
topology.standalone.simple_bind_s(TEST_USER_DN, 'new_pass')
7 years, 6 months
dirsrvtests/tests
by Mark Reynolds
dirsrvtests/tests/suites/password/pwdPolicy_attribute_test.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
New commits:
commit 2b45d58dac74e35f779a5df6256301cca4c80204
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Mon Sep 19 09:25:32 2016 -0400
Ticket 48832 - Fix CI test suite for password min age
Description: Need to add sleeps to test case
Reviewed by: mreynolds (one line commit rule)
diff --git a/dirsrvtests/tests/suites/password/pwdPolicy_attribute_test.py b/dirsrvtests/tests/suites/password/pwdPolicy_attribute_test.py
index d3be7e2..023f508 100644
--- a/dirsrvtests/tests/suites/password/pwdPolicy_attribute_test.py
+++ b/dirsrvtests/tests/suites/password/pwdPolicy_attribute_test.py
@@ -1,12 +1,10 @@
import os
-import sys
import time
import subprocess
import ldap
import logging
import pytest
-from lib389 import DirSrv, Entry, tools, tasks
-from lib389.tools import DirSrvTools
+from lib389 import DirSrv, Entry
from lib389._constants import *
from lib389.properties import *
from lib389.tasks import *
@@ -72,7 +70,6 @@ def topology(request):
request.addfinalizer(fin)
-
return TopologyStandalone(standalone)
@@ -208,6 +205,7 @@ def test_change_pwd(topology, test_user, password_policy,
'policy for {}: error {}'.format(PW_POLICY_CONT_USER,
e.message['desc']))
raise e
+ time.sleep(1)
try:
log.info('Bind as user and modify userPassword')
@@ -291,6 +289,7 @@ def test_pwd_min_age(topology, test_user, password_policy):
'policy for {}: error {}'.format(DN_CONFIG,
e.message['desc']))
raise e
+ time.sleep(1)
try:
log.info('Bind as user and modify userPassword')
@@ -302,7 +301,7 @@ def test_pwd_min_age(topology, test_user, password_policy):
log.error('Failed to change userpassword for {}: error {}'.format(
TEST_USER_DN, e.message['info']))
raise e
-
+ time.sleep(1)
log.info('Bind as user and modify userPassword straight away after previous change')
topology.standalone.simple_bind_s(TEST_USER_DN, 'new_pass')
7 years, 6 months
2 commits - dirsrvtests/tests ldap/admin rpm/389-ds-base.spec.in
by William Brown
dirsrvtests/tests/suites/basic/basic_test.py | 16 ---
dirsrvtests/tests/suites/clu/clu_test.py | 8 -
dirsrvtests/tests/suites/dynamic-plugins/test_dynamic_plugins.py | 8 -
dirsrvtests/tests/suites/memory_leaks/range_search_test.py | 12 +-
dirsrvtests/tests/suites/password/pwdPolicy_inherit_global_test.py | 8 -
dirsrvtests/tests/suites/schema/test_schema.py | 6 -
dirsrvtests/tests/tickets/finalizer.py | 12 --
dirsrvtests/tests/tickets/ticket47313_test.py | 7 -
dirsrvtests/tests/tickets/ticket47384_test.py | 7 -
dirsrvtests/tests/tickets/ticket47490_test.py | 7 -
dirsrvtests/tests/tickets/ticket47560_test.py | 7 -
dirsrvtests/tests/tickets/ticket47573_test.py | 7 -
dirsrvtests/tests/tickets/ticket47619_test.py | 7 -
dirsrvtests/tests/tickets/ticket47653_test.py | 7 -
dirsrvtests/tests/tickets/ticket47669_test.py | 7 -
dirsrvtests/tests/tickets/ticket47714_test.py | 7 -
dirsrvtests/tests/tickets/ticket47781_test.py | 7 -
dirsrvtests/tests/tickets/ticket47808_test.py | 7 -
dirsrvtests/tests/tickets/ticket47815_test.py | 7 -
dirsrvtests/tests/tickets/ticket47819_test.py | 7 -
dirsrvtests/tests/tickets/ticket47823_test.py | 6 -
dirsrvtests/tests/tickets/ticket47828_test.py | 7 -
dirsrvtests/tests/tickets/ticket47829_test.py | 7 -
dirsrvtests/tests/tickets/ticket47838_test.py | 7 -
dirsrvtests/tests/tickets/ticket47871_test.py | 7 -
dirsrvtests/tests/tickets/ticket47900_test.py | 7 -
dirsrvtests/tests/tickets/ticket47910_test.py | 12 +-
dirsrvtests/tests/tickets/ticket47920_test.py | 8 -
dirsrvtests/tests/tickets/ticket47937_test.py | 7 -
dirsrvtests/tests/tickets/ticket47950_test.py | 7 -
dirsrvtests/tests/tickets/ticket47953_test.py | 8 -
dirsrvtests/tests/tickets/ticket47970_test.py | 7 -
dirsrvtests/tests/tickets/ticket47973_test.py | 7 -
dirsrvtests/tests/tickets/ticket47980_test.py | 7 -
dirsrvtests/tests/tickets/ticket47981_test.py | 7 -
dirsrvtests/tests/tickets/ticket48005_test.py | 2
dirsrvtests/tests/tickets/ticket48214_test.py | 7 -
dirsrvtests/tests/tickets/ticket48226_test.py | 52 +++++-----
dirsrvtests/tests/tickets/ticket48228_test.py | 7 -
dirsrvtests/tests/tickets/ticket48252_test.py | 7 -
dirsrvtests/tests/tickets/ticket48294_test.py | 7 -
dirsrvtests/tests/tickets/ticket48295_test.py | 7 -
dirsrvtests/tests/tickets/ticket48366_test.py | 7 -
dirsrvtests/tests/tickets/ticket48759_test.py | 7 -
dirsrvtests/tests/tickets/ticket48784_test.py | 2
dirsrvtests/tests/tickets/ticket48891_test.py | 7 -
dirsrvtests/tests/tickets/ticket48906_test.py | 10 -
dirsrvtests/tests/tickets/ticket548_test.py | 6 -
ldap/admin/src/defaults.inf.in | 21 ++--
rpm/389-ds-base.spec.in | 4
50 files changed, 69 insertions(+), 356 deletions(-)
New commits:
commit da91421157f9e37112f2f014d899a487043f37bd
Author: William Brown <firstyear(a)redhat.com>
Date: Mon Sep 19 11:35:10 2016 +1000
Ticket 48984 - Add lib389 paths module
Bug Description: Lib389 needs a way to determine paths for DS when on other
platforms, or prefixed installs. This consumes the new defaults.inf that was
added in #48983
Fix Description: Use the new ds_paths apis from the instances. This fixes a
large number of tests that would fail on prefixed installs (ie /opt/dirsrv).
This means new tests should be more flexible and able to run on various
platforms. Additionally, we remove the installation prefix option, as it now
conflicts with the new paths module.
https://fedorahosted.org/389/ticket/48984
Author: wibrown
Review by: tbordaz, mreynolds (Thanks!)
diff --git a/dirsrvtests/tests/suites/basic/basic_test.py b/dirsrvtests/tests/suites/basic/basic_test.py
index 517ace6..8b0ad9b 100644
--- a/dirsrvtests/tests/suites/basic/basic_test.py
+++ b/dirsrvtests/tests/suites/basic/basic_test.py
@@ -24,8 +24,6 @@ from lib389.utils import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
# Globals
USER1_DN = 'uid=user1,' + DEFAULT_SUFFIX
USER2_DN = 'uid=user2,' + DEFAULT_SUFFIX
@@ -49,11 +47,6 @@ class TopologyStandalone(object):
def topology(request):
"""This fixture is used to standalone topology for the 'module'."""
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
@@ -688,10 +681,9 @@ def test_basic_ldapagent(topology, import_example_ldif):
log.info('Running test_basic_ldapagent...')
- var_dir = topology.standalone.prefix + '/var'
- config_file = topology.standalone.prefix + '/etc/dirsrv/config/agent.conf'
- cmd = 'sudo %s/ldap-agent %s' % (get_sbin_dir(prefix=topology.standalone.prefix),
- config_file)
+ var_dir = topology.standalone.get_local_state_dir()
+ config_file = os.path.join(topology.standalone.get_sysconf_dir(), 'dirsrv/config/agent.conf')
+ cmd = 'sudo %s %s' % (os.path.join(topology.standalone.get_sbin_dir(), 'ldap-agent'), config_file)
agent_config_file = open(config_file, 'w')
agent_config_file.write('agentx-master ' + var_dir + '/agentx/master\n')
@@ -701,7 +693,7 @@ def test_basic_ldapagent(topology, import_example_ldif):
rc = os.system(cmd)
if rc != 0:
- log.fatal('test_basic_ldapagent: Failed to start snmp ldap agent: error %d' % rc)
+ log.fatal('test_basic_ldapagent: Failed to start snmp ldap agent %s: error %d' % (cmd, rc))
assert False
log.info('snmp ldap agent started')
diff --git a/dirsrvtests/tests/suites/clu/clu_test.py b/dirsrvtests/tests/suites/clu/clu_test.py
index 231b011..e8bccb6 100644
--- a/dirsrvtests/tests/suites/clu/clu_test.py
+++ b/dirsrvtests/tests/suites/clu/clu_test.py
@@ -21,8 +21,6 @@ from lib389.utils import *
logging.getLogger(__name__).setLevel(logging.DEBUG)
log = logging.getLogger(__name__)
-installation1_prefix = None
-
class TopologyStandalone(object):
def __init__(self, standalone):
@@ -32,10 +30,6 @@ class TopologyStandalone(object):
@pytest.fixture(scope="module")
def topology(request):
- global installation1_prefix
- if installation1_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation1_prefix
-
# Creating standalone instance ...
standalone = DirSrv(verbose=False)
args_instance[SER_HOST] = HOST_STANDALONE
@@ -72,7 +66,7 @@ def test_clu_pwdhash(topology):
log.info('Running test_clu_pwdhash...')
- cmd = 'pwdhash -s ssha testpassword'
+ cmd = '%s -s ssha testpassword' % os.path.join(topology.standalone.get_bin_dir(), 'pwdhash')
p = os.popen(cmd)
result = p.readline()
diff --git a/dirsrvtests/tests/suites/dynamic-plugins/test_dynamic_plugins.py b/dirsrvtests/tests/suites/dynamic-plugins/test_dynamic_plugins.py
index fa980ec..2a038a9 100644
--- a/dirsrvtests/tests/suites/dynamic-plugins/test_dynamic_plugins.py
+++ b/dirsrvtests/tests/suites/dynamic-plugins/test_dynamic_plugins.py
@@ -28,9 +28,6 @@ from lib389.tasks import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
-
class TopologyStandalone(object):
def __init__(self, standalone):
standalone.open()
@@ -48,11 +45,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/suites/memory_leaks/range_search_test.py b/dirsrvtests/tests/suites/memory_leaks/range_search_test.py
index e3566a4..014ea51 100644
--- a/dirsrvtests/tests/suites/memory_leaks/range_search_test.py
+++ b/dirsrvtests/tests/suites/memory_leaks/range_search_test.py
@@ -56,8 +56,9 @@ def topology(request):
def fin():
standalone.delete()
- sbin_dir = get_sbin_dir(prefix=standalone.prefix)
- valgrind_disable(sbin_dir)
+ sbin_dir = standalone.get_sbin_dir()
+ if not standalone.has_asan():
+ valgrind_disable(sbin_dir)
request.addfinalizer(fin)
return TopologyStandalone(standalone)
@@ -81,7 +82,8 @@ def test_range_search_init(topology):
sbin_dir = get_sbin_dir(prefix=topology.standalone.prefix)
# Enable valgrind
- valgrind_enable(sbin_dir)
+ if not topology.standalone.has_asan():
+ valgrind_enable(sbin_dir)
# Now start the server with a longer timeout
topology.standalone.start()
@@ -119,7 +121,7 @@ def test_range_search(topology):
(RETROCL_SUFFIX, e.message('desc')))
success = False
- if success:
+ if success and not topology.standalone.has_asan():
# Get the results file, stop the server, and check for the leak
results_file = valgrind_get_results_file(topology.standalone)
topology.standalone.stop(timeout=30)
@@ -127,7 +129,7 @@ def test_range_search(topology):
log.fatal('test_range_search: Memory leak is still present!')
assert False
- log.info('test_range_search: PASSED')
+ log.info('test_range_search: PASSED')
if __name__ == '__main__':
diff --git a/dirsrvtests/tests/suites/password/pwdPolicy_inherit_global_test.py b/dirsrvtests/tests/suites/password/pwdPolicy_inherit_global_test.py
index 27d96c8..162efe7 100644
--- a/dirsrvtests/tests/suites/password/pwdPolicy_inherit_global_test.py
+++ b/dirsrvtests/tests/suites/password/pwdPolicy_inherit_global_test.py
@@ -22,8 +22,6 @@ from lib389.properties import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
CONFIG_DN = 'cn=config'
OU_PEOPLE = 'ou=People,' + DEFAULT_SUFFIX
PWP_CONTAINER = 'nsPwPolicyContainer'
@@ -49,12 +47,6 @@ class TopologyStandalone(object):
@pytest.fixture(scope="module")
def topology(request):
"""This fixture is used to standalone topology for the 'module'."""
-
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/suites/schema/test_schema.py b/dirsrvtests/tests/suites/schema/test_schema.py
index 2d4140d..6d790d8 100644
--- a/dirsrvtests/tests/suites/schema/test_schema.py
+++ b/dirsrvtests/tests/suites/schema/test_schema.py
@@ -29,8 +29,6 @@ from lib389.properties import *
logging.getLogger(__name__).setLevel(logging.DEBUG)
log = logging.getLogger(__name__)
-installation_prefix = None
-
attrclass = ldap.schema.models.AttributeType
occlass = ldap.schema.models.ObjectClass
syntax_len_supported = False
@@ -47,10 +45,6 @@ def topology(request):
'''
This fixture is used to create a DirSrv instance for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
schemainst = DirSrv(verbose=False)
# Args for the master instance
diff --git a/dirsrvtests/tests/tickets/finalizer.py b/dirsrvtests/tests/tickets/finalizer.py
index bfbeadd..f93ea5c 100644
--- a/dirsrvtests/tests/tickets/finalizer.py
+++ b/dirsrvtests/tests/tickets/finalizer.py
@@ -27,18 +27,9 @@ from lib389.properties import *
log = logging.getLogger(__name__)
-global installation_prefix
-installation_prefix=os.getenv('PREFIX')
-
def test_finalizer():
- global installation_prefix
-
# for each defined instance, remove it
for args_instance in ALL_INSTANCES:
- if installation_prefix:
- # overwrite the environment setting
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
instance = DirSrv(verbose=True)
instance.allocate(args_instance)
if instance.exists():
@@ -54,9 +45,6 @@ def run_isolated():
- set the installation prefix
- run this program
'''
- global installation_prefix
- installation_prefix = None
-
test_finalizer()
if __name__ == '__main__':
diff --git a/dirsrvtests/tests/tickets/ticket47313_test.py b/dirsrvtests/tests/tickets/ticket47313_test.py
index ad6550e..703ea42 100644
--- a/dirsrvtests/tests/tickets/ticket47313_test.py
+++ b/dirsrvtests/tests/tickets/ticket47313_test.py
@@ -20,8 +20,6 @@ from lib389.properties import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
ENTRY_NAME = 'test_entry'
@@ -36,11 +34,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket47384_test.py b/dirsrvtests/tests/tickets/ticket47384_test.py
index 3a0f515..17dfbaf 100644
--- a/dirsrvtests/tests/tickets/ticket47384_test.py
+++ b/dirsrvtests/tests/tickets/ticket47384_test.py
@@ -76,15 +76,14 @@ def test_ticket47384(topology):
os.system('setenforce 0')
PLUGIN_DN = 'cn=%s,cn=plugins,cn=config' % PLUGIN_WHOAMI
- tmp_dir = '/tmp'
- plugin_dir = get_plugin_dir(topology.standalone.prefix)
+ tmp_dir = topology.standalone.get_tmp_dir()
+ plugin_dir = topology.standalone.get_plugin_dir()
# Copy the library to our tmp directory
try:
shutil.copy('%s/libwhoami-plugin.so' % plugin_dir, tmp_dir)
except IOError as e:
- log.fatal('Failed to copy libwhoami-plugin.so to the tmp directory, error: '
- + e.strerror)
+ log.fatal('Failed to copy %s/libwhoami-plugin.so to the tmp directory %s, error: %s' % (plugin_dir, tmp_dir, e.strerror))
assert False
try:
shutil.copy('%s/libwhoami-plugin.la' % plugin_dir, tmp_dir)
diff --git a/dirsrvtests/tests/tickets/ticket47490_test.py b/dirsrvtests/tests/tickets/ticket47490_test.py
index 799e5f6..a4c2491 100644
--- a/dirsrvtests/tests/tickets/ticket47490_test.py
+++ b/dirsrvtests/tests/tickets/ticket47490_test.py
@@ -25,8 +25,6 @@ from lib389.properties import *
logging.getLogger(__name__).setLevel(logging.DEBUG)
log = logging.getLogger(__name__)
-installation_prefix = None
-
TEST_REPL_DN = "cn=test_repl, %s" % SUFFIX
ENTRY_DN = "cn=test_entry, %s" % SUFFIX
MUST_OLD = "(postalAddress $ preferredLocale)"
@@ -184,11 +182,6 @@ def topology(request):
This fixture is used to create a replicated topology for the 'module'.
The replicated topology is MASTER -> Consumer.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
master = DirSrv(verbose=False)
consumer = DirSrv(verbose=False)
diff --git a/dirsrvtests/tests/tickets/ticket47560_test.py b/dirsrvtests/tests/tickets/ticket47560_test.py
index 4354b38..c8424d6 100644
--- a/dirsrvtests/tests/tickets/ticket47560_test.py
+++ b/dirsrvtests/tests/tickets/ticket47560_test.py
@@ -19,8 +19,6 @@ from lib389.properties import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
class TopologyStandalone(object):
def __init__(self, standalone):
@@ -33,11 +31,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket47573_test.py b/dirsrvtests/tests/tickets/ticket47573_test.py
index 19ded31..ee47f46 100644
--- a/dirsrvtests/tests/tickets/ticket47573_test.py
+++ b/dirsrvtests/tests/tickets/ticket47573_test.py
@@ -26,8 +26,6 @@ from lib389.properties import *
logging.getLogger(__name__).setLevel(logging.DEBUG)
log = logging.getLogger(__name__)
-installation_prefix = None
-
TEST_REPL_DN = "cn=test_repl, %s" % SUFFIX
ENTRY_DN = "cn=test_entry, %s" % SUFFIX
@@ -131,11 +129,6 @@ def topology(request):
This fixture is used to create a replicated topology for the 'module'.
The replicated topology is MASTER -> Consumer.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
master = DirSrv(verbose=False)
consumer = DirSrv(verbose=False)
diff --git a/dirsrvtests/tests/tickets/ticket47619_test.py b/dirsrvtests/tests/tickets/ticket47619_test.py
index 87977f9..05c1b84 100644
--- a/dirsrvtests/tests/tickets/ticket47619_test.py
+++ b/dirsrvtests/tests/tickets/ticket47619_test.py
@@ -25,8 +25,6 @@ from lib389.properties import *
logging.getLogger(__name__).setLevel(logging.DEBUG)
log = logging.getLogger(__name__)
-installation_prefix = None
-
TEST_REPL_DN = "cn=test_repl, %s" % SUFFIX
ENTRY_DN = "cn=test_entry, %s" % SUFFIX
@@ -54,11 +52,6 @@ def topology(request):
This fixture is used to create a replicated topology for the 'module'.
The replicated topology is MASTER -> Consumer.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
master = DirSrv(verbose=False)
consumer = DirSrv(verbose=False)
diff --git a/dirsrvtests/tests/tickets/ticket47653_test.py b/dirsrvtests/tests/tickets/ticket47653_test.py
index 86d008f..8f42ade 100644
--- a/dirsrvtests/tests/tickets/ticket47653_test.py
+++ b/dirsrvtests/tests/tickets/ticket47653_test.py
@@ -19,8 +19,6 @@ from lib389.properties import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
OC_NAME = 'OCticket47653'
MUST = "(postalAddress $ postalCode)"
MAY = "(member $ street)"
@@ -58,11 +56,6 @@ class TopologyStandalone(object):
@pytest.fixture(scope="module")
def topology(request):
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket47669_test.py b/dirsrvtests/tests/tickets/ticket47669_test.py
index af05a82..0f1a643 100644
--- a/dirsrvtests/tests/tickets/ticket47669_test.py
+++ b/dirsrvtests/tests/tickets/ticket47669_test.py
@@ -22,8 +22,6 @@ from ldap.controls.simple import GetEffectiveRightsControl
log = logging.getLogger(__name__)
-installation_prefix = None
-
CHANGELOG = 'cn=changelog5,cn=config'
RETROCHANGELOG = 'cn=Retro Changelog Plugin,cn=plugins,cn=config'
@@ -45,11 +43,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket47714_test.py b/dirsrvtests/tests/tickets/ticket47714_test.py
index 2a7cd0f..83c5bef 100644
--- a/dirsrvtests/tests/tickets/ticket47714_test.py
+++ b/dirsrvtests/tests/tickets/ticket47714_test.py
@@ -20,8 +20,6 @@ from lib389.properties import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
ACCT_POLICY_CONFIG_DN = ('cn=config,cn=%s,cn=plugins,cn=config' %
PLUGIN_ACCT_POLICY)
ACCT_POLICY_DN = 'cn=Account Inactivation Policy,%s' % SUFFIX
@@ -44,11 +42,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket47781_test.py b/dirsrvtests/tests/tickets/ticket47781_test.py
index 9001ab4..fe65c89 100644
--- a/dirsrvtests/tests/tickets/ticket47781_test.py
+++ b/dirsrvtests/tests/tickets/ticket47781_test.py
@@ -20,8 +20,6 @@ from lib389.tasks import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
class TopologyStandalone(object):
def __init__(self, standalone):
@@ -34,11 +32,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket47808_test.py b/dirsrvtests/tests/tickets/ticket47808_test.py
index 09a9ffa..862333a 100644
--- a/dirsrvtests/tests/tickets/ticket47808_test.py
+++ b/dirsrvtests/tests/tickets/ticket47808_test.py
@@ -19,8 +19,6 @@ from lib389.properties import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
ATTRIBUTE_UNIQUENESS_PLUGIN = 'cn=attribute uniqueness,cn=plugins,cn=config'
ENTRY_NAME = 'test_entry'
@@ -36,11 +34,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket47815_test.py b/dirsrvtests/tests/tickets/ticket47815_test.py
index 5f15dc8..04201f1 100644
--- a/dirsrvtests/tests/tickets/ticket47815_test.py
+++ b/dirsrvtests/tests/tickets/ticket47815_test.py
@@ -19,8 +19,6 @@ from lib389.properties import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
class TopologyStandalone(object):
def __init__(self, standalone):
@@ -33,11 +31,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket47819_test.py b/dirsrvtests/tests/tickets/ticket47819_test.py
index 2168fe5..95c2ba5 100644
--- a/dirsrvtests/tests/tickets/ticket47819_test.py
+++ b/dirsrvtests/tests/tickets/ticket47819_test.py
@@ -20,8 +20,6 @@ from lib389.tasks import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
class TopologyStandalone(object):
def __init__(self, standalone):
@@ -34,11 +32,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket47823_test.py b/dirsrvtests/tests/tickets/ticket47823_test.py
index bcbf0cc..ba5d110 100644
--- a/dirsrvtests/tests/tickets/ticket47823_test.py
+++ b/dirsrvtests/tests/tickets/ticket47823_test.py
@@ -22,8 +22,6 @@ from lib389.properties import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
PROVISIONING_CN = "provisioning"
PROVISIONING_DN = "cn=%s,%s" % (PROVISIONING_CN, SUFFIX)
@@ -65,11 +63,7 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
standalone = DirSrv(verbose=False)
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
# Args for the standalone instance
args_instance[SER_HOST] = HOST_STANDALONE
args_instance[SER_PORT] = PORT_STANDALONE
diff --git a/dirsrvtests/tests/tickets/ticket47828_test.py b/dirsrvtests/tests/tickets/ticket47828_test.py
index 92e3178..4f48440 100644
--- a/dirsrvtests/tests/tickets/ticket47828_test.py
+++ b/dirsrvtests/tests/tickets/ticket47828_test.py
@@ -21,8 +21,6 @@ from lib389.properties import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
ACCT_POLICY_CONFIG_DN = 'cn=config,cn=%s,cn=plugins,cn=config' % PLUGIN_ACCT_POLICY
ACCT_POLICY_DN = 'cn=Account Inactivation Policy,%s' % SUFFIX
INACTIVITY_LIMIT = '9'
@@ -53,11 +51,6 @@ def topology(request):
At the beginning, It may exists a standalone instance.
It may also exists a backup for the standalone instance.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket47829_test.py b/dirsrvtests/tests/tickets/ticket47829_test.py
index a426ada..94a3a2e 100644
--- a/dirsrvtests/tests/tickets/ticket47829_test.py
+++ b/dirsrvtests/tests/tickets/ticket47829_test.py
@@ -56,8 +56,6 @@ INDIRECT_ACTIVE_GROUP_DN = "cn=%s,%s" % (INDIRECT_ACTIVE_GROUP_CN, ACTIVE_DN)
log = logging.getLogger(__name__)
-installation_prefix = None
-
class TopologyStandalone(object):
def __init__(self, standalone):
@@ -70,11 +68,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket47838_test.py b/dirsrvtests/tests/tickets/ticket47838_test.py
index a9d4307..6a3adb7 100644
--- a/dirsrvtests/tests/tickets/ticket47838_test.py
+++ b/dirsrvtests/tests/tickets/ticket47838_test.py
@@ -21,8 +21,6 @@ from lib389.properties import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
CONFIG_DN = 'cn=config'
ENCRYPTION_DN = 'cn=encryption,%s' % CONFIG_DN
MY_SECURE_PORT = '36363'
@@ -53,11 +51,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket47871_test.py b/dirsrvtests/tests/tickets/ticket47871_test.py
index bb6810c..6d19e8e 100644
--- a/dirsrvtests/tests/tickets/ticket47871_test.py
+++ b/dirsrvtests/tests/tickets/ticket47871_test.py
@@ -25,8 +25,6 @@ from lib389.properties import *
logging.getLogger(__name__).setLevel(logging.DEBUG)
log = logging.getLogger(__name__)
-installation_prefix = None
-
TEST_REPL_DN = "cn=test_repl, %s" % SUFFIX
ENTRY_DN = "cn=test_entry, %s" % SUFFIX
@@ -54,11 +52,6 @@ def topology(request):
This fixture is used to create a replicated topology for the 'module'.
The replicated topology is MASTER -> Consumer.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
master = DirSrv(verbose=False)
consumer = DirSrv(verbose=False)
diff --git a/dirsrvtests/tests/tickets/ticket47900_test.py b/dirsrvtests/tests/tickets/ticket47900_test.py
index 4de368b..404c91e 100644
--- a/dirsrvtests/tests/tickets/ticket47900_test.py
+++ b/dirsrvtests/tests/tickets/ticket47900_test.py
@@ -19,8 +19,6 @@ from lib389.properties import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
CONFIG_DN = 'cn=config'
ADMIN_NAME = 'passwd_admin'
ADMIN_DN = 'cn=%s,%s' % (ADMIN_NAME, SUFFIX)
@@ -41,11 +39,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket47910_test.py b/dirsrvtests/tests/tickets/ticket47910_test.py
index bb8ffc6..0455722 100644
--- a/dirsrvtests/tests/tickets/ticket47910_test.py
+++ b/dirsrvtests/tests/tickets/ticket47910_test.py
@@ -88,7 +88,7 @@ def format_time(local_datetime):
return formatted_time
-def execute_logconv(start_time_stamp, end_time_stamp, access_log):
+def execute_logconv(inst, start_time_stamp, end_time_stamp, access_log):
'''
This function will take start time and end time
as input parameter and
@@ -97,7 +97,7 @@ def execute_logconv(start_time_stamp, end_time_stamp, access_log):
'''
log.info("Executing logconv.pl with -S current time and -E end time")
- cmd = ['logconv.pl', '-S', start_time_stamp, '-E', end_time_stamp, access_log]
+ cmd = [os.path.join(inst.get_bin_dir(), 'logconv.pl'), '-S', start_time_stamp, '-E', end_time_stamp, access_log]
log.info(" ".join(cmd))
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = proc.communicate()
@@ -125,7 +125,7 @@ def test_ticket47910_logconv_start_end_positive(topology, log_dir):
formatted_end_time_stamp = format_time(end_time_stamp)
log.info("Executing logconv.pl with -S and -E")
- result = execute_logconv(formatted_start_time_stamp, formatted_end_time_stamp, log_dir)
+ result = execute_logconv(topology.standalone, formatted_start_time_stamp, formatted_end_time_stamp, log_dir)
assert result == 0
@@ -151,7 +151,7 @@ def test_ticket47910_logconv_start_end_negative(topology, log_dir):
formatted_end_time_stamp = format_time(end_time_stamp)
log.info("Executing logconv.pl with -S and -E")
- result = execute_logconv(formatted_start_time_stamp, formatted_end_time_stamp, log_dir)
+ result = execute_logconv(topology.standalone, formatted_start_time_stamp, formatted_end_time_stamp, log_dir)
assert result == 1
@@ -169,7 +169,7 @@ def test_ticket47910_logconv_start_end_invalid(topology, log_dir):
end_time_stamp = "invalid"
log.info("Executing logconv.pl with -S and -E")
- result = execute_logconv(start_time_stamp, end_time_stamp, log_dir)
+ result = execute_logconv(topology.standalone, start_time_stamp, end_time_stamp, log_dir)
assert result == 1
@@ -189,7 +189,7 @@ def test_ticket47910_logconv_noaccesslogs(topology, log_dir):
time_stamp = (datetime.now() - timedelta(minutes=2))
formatted_time_stamp = format_time(time_stamp)
log.info("Executing logconv.pl with -S current time")
- cmd = ['logconv.pl', '-S', formatted_time_stamp]
+ cmd = [os.path.join(topology.standalone.get_bin_dir(), 'logconv.pl'), '-S', formatted_time_stamp]
log.info(" ".join(cmd))
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = proc.communicate()
diff --git a/dirsrvtests/tests/tickets/ticket47920_test.py b/dirsrvtests/tests/tickets/ticket47920_test.py
index f031e1d..078cae1 100644
--- a/dirsrvtests/tests/tickets/ticket47920_test.py
+++ b/dirsrvtests/tests/tickets/ticket47920_test.py
@@ -60,9 +60,6 @@ FINAL_DESC = "final description"
log = logging.getLogger(__name__)
-installation_prefix = None
-
-
class TopologyStandalone(object):
def __init__(self, standalone):
standalone.open()
@@ -74,11 +71,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket47937_test.py b/dirsrvtests/tests/tickets/ticket47937_test.py
index 6eb4f8b..5a0f354 100644
--- a/dirsrvtests/tests/tickets/ticket47937_test.py
+++ b/dirsrvtests/tests/tickets/ticket47937_test.py
@@ -19,8 +19,6 @@ from lib389.properties import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
class TopologyStandalone(object):
def __init__(self, standalone):
@@ -33,11 +31,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket47950_test.py b/dirsrvtests/tests/tickets/ticket47950_test.py
index cb3076d..7dc8c60 100644
--- a/dirsrvtests/tests/tickets/ticket47950_test.py
+++ b/dirsrvtests/tests/tickets/ticket47950_test.py
@@ -20,8 +20,6 @@ from lib389.tasks import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
USER1_DN = "uid=user1,%s" % DEFAULT_SUFFIX
USER2_DN = "uid=user2,%s" % DEFAULT_SUFFIX
@@ -37,11 +35,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket47953_test.py b/dirsrvtests/tests/tickets/ticket47953_test.py
index 1bcc007..bebd76e 100644
--- a/dirsrvtests/tests/tickets/ticket47953_test.py
+++ b/dirsrvtests/tests/tickets/ticket47953_test.py
@@ -21,9 +21,6 @@ from lib389.tasks import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
-
class TopologyStandalone(object):
def __init__(self, standalone):
standalone.open()
@@ -35,11 +32,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket47970_test.py b/dirsrvtests/tests/tickets/ticket47970_test.py
index a957d49..6d224ba 100644
--- a/dirsrvtests/tests/tickets/ticket47970_test.py
+++ b/dirsrvtests/tests/tickets/ticket47970_test.py
@@ -21,8 +21,6 @@ from lib389.tasks import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
USER1_DN = "uid=user1,%s" % DEFAULT_SUFFIX
USER2_DN = "uid=user2,%s" % DEFAULT_SUFFIX
@@ -38,11 +36,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket47973_test.py b/dirsrvtests/tests/tickets/ticket47973_test.py
index 799c72a..c7048c0 100644
--- a/dirsrvtests/tests/tickets/ticket47973_test.py
+++ b/dirsrvtests/tests/tickets/ticket47973_test.py
@@ -18,8 +18,6 @@ from lib389.tasks import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
USER_DN = 'uid=user1,%s' % (DEFAULT_SUFFIX)
SCHEMA_RELOAD_COUNT = 10
@@ -35,11 +33,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket47980_test.py b/dirsrvtests/tests/tickets/ticket47980_test.py
index 09cbe2f..a4a49b7 100644
--- a/dirsrvtests/tests/tickets/ticket47980_test.py
+++ b/dirsrvtests/tests/tickets/ticket47980_test.py
@@ -21,8 +21,6 @@ from lib389.tasks import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
BRANCH1 = 'ou=level1,' + DEFAULT_SUFFIX
BRANCH2 = 'ou=level2,ou=level1,' + DEFAULT_SUFFIX
BRANCH3 = 'ou=level3,ou=level2,ou=level1,' + DEFAULT_SUFFIX
@@ -90,11 +88,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket47981_test.py b/dirsrvtests/tests/tickets/ticket47981_test.py
index fbd19d5..3920cfd 100644
--- a/dirsrvtests/tests/tickets/ticket47981_test.py
+++ b/dirsrvtests/tests/tickets/ticket47981_test.py
@@ -21,8 +21,6 @@ from lib389.tasks import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
BRANCH = 'ou=people,' + DEFAULT_SUFFIX
USER_DN = 'uid=user1,%s' % (BRANCH)
BRANCH_CONTAINER = 'cn=nsPwPolicyContainer,ou=people,dc=example,dc=com'
@@ -46,11 +44,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket48005_test.py b/dirsrvtests/tests/tickets/ticket48005_test.py
index 5fde541..39d9334 100644
--- a/dirsrvtests/tests/tickets/ticket48005_test.py
+++ b/dirsrvtests/tests/tickets/ticket48005_test.py
@@ -67,7 +67,7 @@ def test_ticket48005_setup(topology):
prefix = topology.standalone.prefix
else:
prefix = None
- sysconfig_dirsrv = prefix + ENV_SYSCONFIG_DIR + "/dirsrv"
+ sysconfig_dirsrv = os.path.join(topology.standalone.get_initconfig_dir(), 'dirsrv')
cmdline = 'egrep "ulimit -c unlimited" %s' % sysconfig_dirsrv
p = os.popen(cmdline, "r")
ulimitc = p.readline()
diff --git a/dirsrvtests/tests/tickets/ticket48214_test.py b/dirsrvtests/tests/tickets/ticket48214_test.py
index 7fc4bab..492a39c 100644
--- a/dirsrvtests/tests/tickets/ticket48214_test.py
+++ b/dirsrvtests/tests/tickets/ticket48214_test.py
@@ -13,8 +13,6 @@ from ldap.controls import SimplePagedResultsControl
log = logging.getLogger(__name__)
-installation_prefix = None
-
MYSUFFIX = 'dc=example,dc=com'
MYSUFFIXBE = 'userRoot'
@@ -30,11 +28,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket48226_test.py b/dirsrvtests/tests/tickets/ticket48226_test.py
index 939121b..90f4a21 100644
--- a/dirsrvtests/tests/tickets/ticket48226_test.py
+++ b/dirsrvtests/tests/tickets/ticket48226_test.py
@@ -113,8 +113,9 @@ def topology(request):
def fin():
master1.delete()
master2.delete()
- sbin_dir = get_sbin_dir(prefix=master2.prefix)
- valgrind_disable(sbin_dir)
+ sbin_dir = master2.get_sbin_dir()
+ if not master2.has_asan():
+ valgrind_disable(sbin_dir)
request.addfinalizer(fin)
# Check replication is working...
@@ -181,10 +182,11 @@ def test_ticket48226_1(topology):
topology.master1.stop(10)
# Get the sbin directory so we know where to replace 'ns-slapd'
- sbin_dir = get_sbin_dir(prefix=topology.master2.prefix)
+ sbin_dir = topology.master2.get_sbin_dir()
# Enable valgrind
- valgrind_enable(sbin_dir)
+ if not topology.master2.has_asan():
+ valgrind_enable(sbin_dir)
# start M2 to do the next updates
topology.master2.start()
@@ -207,31 +209,33 @@ def test_ticket48226_1(topology):
# Restart master1
#topology.master1.start(30)
- results_file = valgrind_get_results_file(topology.master2)
+ if not topology.master2.has_asan():
+ results_file = valgrind_get_results_file(topology.master2)
# Stop master2
topology.master2.stop(30)
# Check for leak
- if valgrind_check_file(results_file, VALGRIND_LEAK_STR, 'csnset_dup'):
- log.info('Valgrind reported leak in csnset_dup!')
- assert False
- else:
- log.info('Valgrind is happy!')
-
- # Check for invalid read/write
- if valgrind_check_file(results_file, VALGRIND_INVALID_STR, 'csnset_dup'):
- log.info('Valgrind reported invalid!')
- assert False
- else:
- log.info('Valgrind is happy!')
-
- # Check for invalid read/write
- if valgrind_check_file(results_file, VALGRIND_INVALID_STR, 'csnset_free'):
- log.info('Valgrind reported invalid!')
- assert False
- else:
- log.info('Valgrind is happy!')
+ if not topology.master2.has_asan():
+ if valgrind_check_file(results_file, VALGRIND_LEAK_STR, 'csnset_dup'):
+ log.info('Valgrind reported leak in csnset_dup!')
+ assert False
+ else:
+ log.info('Valgrind is happy!')
+
+ # Check for invalid read/write
+ if valgrind_check_file(results_file, VALGRIND_INVALID_STR, 'csnset_dup'):
+ log.info('Valgrind reported invalid!')
+ assert False
+ else:
+ log.info('Valgrind is happy!')
+
+ # Check for invalid read/write
+ if valgrind_check_file(results_file, VALGRIND_INVALID_STR, 'csnset_free'):
+ log.info('Valgrind reported invalid!')
+ assert False
+ else:
+ log.info('Valgrind is happy!')
log.info('Testcase PASSED')
diff --git a/dirsrvtests/tests/tickets/ticket48228_test.py b/dirsrvtests/tests/tickets/ticket48228_test.py
index d8f9334..851d776 100644
--- a/dirsrvtests/tests/tickets/ticket48228_test.py
+++ b/dirsrvtests/tests/tickets/ticket48228_test.py
@@ -20,8 +20,6 @@ from lib389.tasks import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
# Assuming DEFAULT_SUFFIX is "dc=example,dc=com", otherwise it does not work... :(
SUBTREE_CONTAINER = 'cn=nsPwPolicyContainer,' + DEFAULT_SUFFIX
SUBTREE_PWPDN = 'cn=nsPwPolicyEntry,' + DEFAULT_SUFFIX
@@ -45,11 +43,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket48252_test.py b/dirsrvtests/tests/tickets/ticket48252_test.py
index 44978fd..e4e0cbb 100644
--- a/dirsrvtests/tests/tickets/ticket48252_test.py
+++ b/dirsrvtests/tests/tickets/ticket48252_test.py
@@ -20,8 +20,6 @@ from lib389.tasks import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
# Assuming DEFAULT_SUFFIX is "dc=example,dc=com", otherwise it does not work... :(
USER_NUM = 10
TEST_USER = "test_user"
@@ -38,11 +36,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket48294_test.py b/dirsrvtests/tests/tickets/ticket48294_test.py
index 3e63759..567d5b8 100644
--- a/dirsrvtests/tests/tickets/ticket48294_test.py
+++ b/dirsrvtests/tests/tickets/ticket48294_test.py
@@ -21,8 +21,6 @@ from lib389.properties import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
LINKEDATTR_PLUGIN = 'cn=Linked Attributes,cn=plugins,cn=config'
MANAGER_LINK = 'cn=Manager Link,' + LINKEDATTR_PLUGIN
OU_PEOPLE = 'ou=People,' + DEFAULT_SUFFIX
@@ -41,11 +39,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket48295_test.py b/dirsrvtests/tests/tickets/ticket48295_test.py
index b636730..96ebaf2 100644
--- a/dirsrvtests/tests/tickets/ticket48295_test.py
+++ b/dirsrvtests/tests/tickets/ticket48295_test.py
@@ -21,8 +21,6 @@ from lib389.properties import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
LINKEDATTR_PLUGIN = 'cn=Linked Attributes,cn=plugins,cn=config'
MANAGER_LINK = 'cn=Manager Link,' + LINKEDATTR_PLUGIN
OU_PEOPLE = 'ou=People,' + DEFAULT_SUFFIX
@@ -41,11 +39,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket48366_test.py b/dirsrvtests/tests/tickets/ticket48366_test.py
index c785d30..578d5e9 100644
--- a/dirsrvtests/tests/tickets/ticket48366_test.py
+++ b/dirsrvtests/tests/tickets/ticket48366_test.py
@@ -20,8 +20,6 @@ from ldap.controls.simple import ProxyAuthzControl
log = logging.getLogger(__name__)
-installation_prefix = None
-
PROXY_USER_DN = 'cn=proxy,ou=people,%s' % SUFFIX
TEST_USER_DN = 'cn=test,ou=people,%s' % SUFFIX
USER_PW = 'password'
@@ -41,11 +39,6 @@ class TopologyStandalone(object):
@pytest.fixture(scope="module")
def topology(request):
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket48759_test.py b/dirsrvtests/tests/tickets/ticket48759_test.py
index 71c7c2f..3d8b026 100644
--- a/dirsrvtests/tests/tickets/ticket48759_test.py
+++ b/dirsrvtests/tests/tickets/ticket48759_test.py
@@ -20,8 +20,6 @@ from lib389.tasks import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
MEMBEROF_PLUGIN_DN = ('cn=' + PLUGIN_MEMBER_OF + ',cn=plugins,cn=config')
GROUP_DN = ("cn=group," + DEFAULT_SUFFIX)
MEMBER_DN_COMP = "uid=member"
@@ -38,11 +36,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket48784_test.py b/dirsrvtests/tests/tickets/ticket48784_test.py
index 3559a48..fca6d9e 100644
--- a/dirsrvtests/tests/tickets/ticket48784_test.py
+++ b/dirsrvtests/tests/tickets/ticket48784_test.py
@@ -426,7 +426,7 @@ def test_ticket48784(topology):
log.info('##### Searching for entries on master1...')
entries = topology.master1.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE, '(uid=*)')
- assert 11 == len(entries)
+ assert 12 == len(entries)
log.info('##### Searching for entries on master2...')
entries = topology.master2.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE, '(uid=*)')
diff --git a/dirsrvtests/tests/tickets/ticket48891_test.py b/dirsrvtests/tests/tickets/ticket48891_test.py
index a33b22a..dadd9d5 100644
--- a/dirsrvtests/tests/tickets/ticket48891_test.py
+++ b/dirsrvtests/tests/tickets/ticket48891_test.py
@@ -19,8 +19,6 @@ import fnmatch
log = logging.getLogger(__name__)
-installation_prefix = None
-
CONFIG_DN = 'cn=config'
RDN_VAL_SUFFIX = 'ticket48891.org'
MYSUFFIX = 'dc=%s' % RDN_VAL_SUFFIX
@@ -43,11 +41,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=False)
# Args for the standalone instance
diff --git a/dirsrvtests/tests/tickets/ticket48906_test.py b/dirsrvtests/tests/tickets/ticket48906_test.py
index b201b1f..e046469 100644
--- a/dirsrvtests/tests/tickets/ticket48906_test.py
+++ b/dirsrvtests/tests/tickets/ticket48906_test.py
@@ -24,8 +24,6 @@ import fnmatch
log = logging.getLogger(__name__)
-installation_prefix = None
-
CONFIG_DN = 'cn=config'
RDN_VAL_SUFFIX = 'ticket48906.org'
MYSUFFIX = 'dc=%s' % RDN_VAL_SUFFIX
@@ -63,11 +61,6 @@ def topology(request):
'''
This fixture is used to standalone topology for the 'module'.
'''
- global installation_prefix
-
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
standalone = DirSrv(verbose=True)
# Args for the standalone instance
@@ -349,9 +342,6 @@ def run_isolated():
- set the installation prefix
- run this program
'''
- global installation_prefix
- installation_prefix = None
-
topo = topology(True)
test_ticket48906_setup(topo)
test_ticket48906_dblock_default(topo)
diff --git a/dirsrvtests/tests/tickets/ticket548_test.py b/dirsrvtests/tests/tickets/ticket548_test.py
index a8562c2..5171dbb 100644
--- a/dirsrvtests/tests/tickets/ticket548_test.py
+++ b/dirsrvtests/tests/tickets/ticket548_test.py
@@ -21,8 +21,6 @@ from lib389.utils import *
log = logging.getLogger(__name__)
-installation_prefix = None
-
# Assuming DEFAULT_SUFFIX is "dc=example,dc=com", otherwise it does not work... :(
SUBTREE_CONTAINER = 'cn=nsPwPolicyContainer,' + DEFAULT_SUFFIX
SUBTREE_PWPDN = 'cn=nsPwPolicyEntry,' + DEFAULT_SUFFIX
@@ -44,10 +42,6 @@ class TopologyStandalone(object):
@pytest.fixture(scope="module")
def topology(request):
- global installation_prefix
- if installation_prefix:
- args_instance[SER_DEPLOYED_DIR] = installation_prefix
-
# Creating standalone instance ...
standalone = DirSrv(verbose=False)
args_instance[SER_HOST] = HOST_STANDALONE
diff --git a/rpm/389-ds-base.spec.in b/rpm/389-ds-base.spec.in
index e5d824e..94e0dac 100644
--- a/rpm/389-ds-base.spec.in
+++ b/rpm/389-ds-base.spec.in
@@ -121,6 +121,10 @@ Requires: libdb-utils
# This picks up libperl.so as a Requires, so we add this versioned one
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+# Needed by logconv.pl
+Requires: perl-DB_File
+Requires: perl-Archive-Tar
+
# for the init script
Requires(post): systemd-units
Requires(preun): systemd-units
commit 088fe3ad3dd098ba5f6799ca1a2392ecf07050b7
Author: William Brown <firstyear(a)redhat.com>
Date: Mon Sep 19 11:34:17 2016 +1000
Ticket 48983 - Configure and Makefile.in from new default paths work.
Bug Description: At configure time, this is the only time we know all the
resolved paths of a ds installation. However, external tools such as lib389
need to be able to discover and use these paths.
Fix Description: This updates defaults.inf with some extra paths that were
found to be needed as part of the lib389 tests.
https://fedorahosted.org/389/ticket/48983
Author: wibrown
Review by: tbordaz, mreynolds (Thanks!)
diff --git a/ldap/admin/src/defaults.inf.in b/ldap/admin/src/defaults.inf.in
index 9b02542..2bd94fe 100644
--- a/ldap/admin/src/defaults.inf.in
+++ b/ldap/admin/src/defaults.inf.in
@@ -14,26 +14,33 @@
; All format strings should be in python syntax IE {key}
[slapd]
+; These values should NOT be altered in an installation.
+; This is because the server itself depends on these locations and values
+; being known, and are set at compilation time.
product = @capbrand@ Directory Server
version = @PACKAGE_VERSION@
-user = dirsrv
-group = dirsrv
-root_dn = cn=Directory Manager
+asan_enabled = @enable_asan@
prefix = @prefixdir@
bin_dir = @bindir@
sbin_dir = @sbindir@
lib_dir = @libdir@
data_dir = @datadir@
tmp_dir = /tmp
-
sysconf_dir = @sysconfdir@
-initconfigdir = @initconfigdir@
+initconfig_dir = @initconfigdir@
config_dir = @instconfigdir@/slapd-{instance_name}
+local_state_dir = @localstatedir@
+run_dir = @localstatedir@/run/dirsrv
+plugin_dir = @serverplugindir@
+
+; These values can be altered in an installation of ds
+user = dirsrv
+group = dirsrv
+root_dn = cn=Directory Manager
+
schema_dir = @instconfigdir@/slapd-{instance_name}/schema
cert_dir = @instconfigdir@/slapd-{instance_name}
-local_state_dir = @localstatedir@
-run_dir = @localstatedir@/run/dirsrv
lock_dir = @localstatedir@/lock/dirsrv/slapd-{instance_name}
log_dir = @localstatedir@/log/dirsrv/slapd-{instance_name}
inst_dir = @localstatedir@/lib/dirsrv/slapd-{instance_name}
7 years, 6 months
Branch '389-ds-base-1.2.11' - configure.ac ldap/admin Makefile.am
by William Brown
Makefile.am | 10 +++++---
configure.ac | 3 ++
ldap/admin/src/defaults.inf.in | 51 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 61 insertions(+), 3 deletions(-)
New commits:
commit 90346683273ba64ce92582fd09edb838cf9d28f6
Author: William Brown <firstyear(a)redhat.com>
Date: Mon Sep 12 11:30:55 2016 +1000
Ticket 48983 - generate install path info from autotools scripts
Bug Description: At configure time, this is the only time we know all the
resolved paths of a ds installation. However, external tools such as lib389
need to be able to discover and use these paths.
Fix Description: Add a new file to share in a well-known location that well
provide all the paths of ds instance and install. This will allow discovery
of what settings should be used on the associated platform or installation.
https://fedorahosted.org/389/ticket/48983
Author: wibrown
Review by: mreynolds, tbordaz(Thanks)
diff --git a/Makefile.am b/Makefile.am
index bc40ea7..a808269 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -136,6 +136,7 @@ selinux-built/dirsrv.fc: selinux-built
#------------------------
# Install Paths
#------------------------
+prefixdir = @prefixdir@
configdir = $(sysconfdir)@configdir@
sampledatadir = $(datadir)@sampledatadir@
propertydir = $(datadir)@propertydir@
@@ -413,7 +414,8 @@ endif
inf_DATA = ldap/admin/src/slapd.inf \
ldap/admin/src/scripts/dscreate.map \
ldap/admin/src/scripts/dsupdate.map \
- ldap/admin/src/scripts/dsorgentries.map
+ ldap/admin/src/scripts/dsorgentries.map \
+ ldap/admin/src/defaults.inf
mib_DATA = ldap/servers/snmp/redhat-directory.mib
@@ -1475,7 +1477,8 @@ fixupcmd = sed \
-e 's,@ldaplib_defs\@,$(ldaplib_defs),g' \
-e 's,@systemdsystemunitdir\@,$(systemdsystemunitdir),g' \
-e 's,@systemdsystemconfdir\@,$(systemdsystemconfdir),g' \
- -e 's,@systemdgroupname\@,$(systemdgroupname),g'
+ -e 's,@systemdgroupname\@,$(systemdgroupname),g' \
+ -e 's,@prefixdir\@,$(prefixdir),g'
else
fixupcmd = sed \
-e 's,@bindir\@,$(bindir),g' \
@@ -1541,7 +1544,8 @@ fixupcmd = sed \
-e 's,@ldaplib_defs\@,$(ldaplib_defs),g' \
-e 's,@systemdsystemunitdir\@,$(systemdsystemunitdir),g' \
-e 's,@systemdsystemconfdir\@,$(systemdsystemconfdir),g' \
- -e 's,@systemdgroupname\@,$(systemdgroupname),g'
+ -e 's,@systemdgroupname\@,$(systemdgroupname),g' \
+ -e 's,@prefixdir\@,$(prefixdir),g'
endif
%: %.in
diff --git a/configure.ac b/configure.ac
index 8281d67..997a29c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -239,6 +239,7 @@ m4_include(m4/fhs.m4)
if test "$with_fhs_opt" = "yes"; then
# Override sysconfdir and localstatedir if FHS optional
# package was requested.
+ prefixdir=$prefix
sysconfdir='/etc/opt'
localstatedir='/var/opt'
# relative to datadir
@@ -271,6 +272,7 @@ else
dnl as opposed to the default /usr/var
localstatedir='/var'
fi
+ prefixdir=$prefix
# relative to datadir
sampledatadir=/$PACKAGE_NAME/data
# relative to datadir
@@ -390,6 +392,7 @@ if test -n "$with_systemdsystemunitdir" -o -n "$with_systemdsystemconfdir" ; the
AC_SUBST(with_systemdgroupname)
fi
+AC_SUBST(prefixdir)
AC_SUBST(configdir)
AC_SUBST(sampledatadir)
AC_SUBST(propertydir)
diff --git a/ldap/admin/src/defaults.inf.in b/ldap/admin/src/defaults.inf.in
new file mode 100644
index 0000000..e4ce74a
--- /dev/null
+++ b/ldap/admin/src/defaults.inf.in
@@ -0,0 +1,51 @@
+; --- BEGIN COPYRIGHT BLOCK ---
+; Copyright (C) 2016 Red Hat, Inc.
+; All rights reserved.
+;
+; License: GPL (version 3 or any later version).
+; See LICENSE for details.
+; --- END COPYRIGHT BLOCK ---
+
+; Author: firstyear at redhat.com
+
+; This is a set of default paths that tools consuming DS should search
+; for paths. This is the foundation of the version 2 ds setup inf
+;
+; All format strings should be in python syntax IE {key}
+
+[slapd]
+; These values should NOT be altered in an installation.
+; This is because the server itself depends on these locations and values
+; being known, and are set at compilation time.
+product = @capbrand@ Directory Server
+version = @PACKAGE_VERSION@
+; In 1.2.xx, this will never be true.
+asan_enabled = false
+prefix = @prefixdir@
+bin_dir = @bindir@
+sbin_dir = @sbindir@
+lib_dir = @libdir@
+data_dir = @datadir@
+tmp_dir = /tmp
+sysconf_dir = @sysconfdir@
+initconfig_dir = @initconfigdir@
+config_dir = @instconfigdir@/slapd-{instance_name}
+local_state_dir = @localstatedir@
+run_dir = @localstatedir@/run/dirsrv
+plugin_dir = @serverplugindir@
+
+; These values can be altered in an installation of ds
+user = dirsrv
+group = dirsrv
+root_dn = cn=Directory Manager
+
+schema_dir = @instconfigdir@/slapd-{instance_name}/schema
+cert_dir = @instconfigdir@/slapd-{instance_name}
+
+lock_dir = @localstatedir@/lock/dirsrv/slapd-{instance_name}
+log_dir = @localstatedir@/log/dirsrv/slapd-{instance_name}
+inst_dir = @localstatedir@/lib/dirsrv/slapd-{instance_name}
+db_dir = @localstatedir@/lib/dirsrv/slapd-{instance_name}/db
+backup_dir = @localstatedir@/lib/dirsrv/slapd-{instance_name}/bak
+ldif_dir = @localstatedir@/lib/dirsrv/slapd-{instance_name}/ldif
+
7 years, 6 months
Branch '389-ds-base-1.3.5' - 3 commits - configure configure.ac ldap/admin Makefile.am Makefile.in
by William Brown
Makefile.am | 10 +++++---
Makefile.in | 18 +++++++++-----
configure | 4 +++
configure.ac | 3 ++
ldap/admin/src/defaults.inf.in | 50 +++++++++++++++++++++++++++++++++++++++++
5 files changed, 75 insertions(+), 10 deletions(-)
New commits:
commit 966946453cf4d018dee6b4d5b6bcbdf394a24b49
Author: William Brown <firstyear(a)redhat.com>
Date: Mon Sep 19 11:34:17 2016 +1000
Ticket 48983 - Configure and Makefile.in from new default paths work.
Bug Description: At configure time, this is the only time we know all the
resolved paths of a ds installation. However, external tools such as lib389
need to be able to discover and use these paths.
Fix Description: This updates defaults.inf with some extra paths that were
found to be needed as part of the lib389 tests.
https://fedorahosted.org/389/ticket/48983
Author: wibrown
Review by: tbordaz, mreynolds (Thanks!)
diff --git a/ldap/admin/src/defaults.inf.in b/ldap/admin/src/defaults.inf.in
index 9b02542..2bd94fe 100644
--- a/ldap/admin/src/defaults.inf.in
+++ b/ldap/admin/src/defaults.inf.in
@@ -14,26 +14,33 @@
; All format strings should be in python syntax IE {key}
[slapd]
+; These values should NOT be altered in an installation.
+; This is because the server itself depends on these locations and values
+; being known, and are set at compilation time.
product = @capbrand@ Directory Server
version = @PACKAGE_VERSION@
-user = dirsrv
-group = dirsrv
-root_dn = cn=Directory Manager
+asan_enabled = @enable_asan@
prefix = @prefixdir@
bin_dir = @bindir@
sbin_dir = @sbindir@
lib_dir = @libdir@
data_dir = @datadir@
tmp_dir = /tmp
-
sysconf_dir = @sysconfdir@
-initconfigdir = @initconfigdir@
+initconfig_dir = @initconfigdir@
config_dir = @instconfigdir@/slapd-{instance_name}
+local_state_dir = @localstatedir@
+run_dir = @localstatedir@/run/dirsrv
+plugin_dir = @serverplugindir@
+
+; These values can be altered in an installation of ds
+user = dirsrv
+group = dirsrv
+root_dn = cn=Directory Manager
+
schema_dir = @instconfigdir@/slapd-{instance_name}/schema
cert_dir = @instconfigdir@/slapd-{instance_name}
-local_state_dir = @localstatedir@
-run_dir = @localstatedir@/run/dirsrv
lock_dir = @localstatedir@/lock/dirsrv/slapd-{instance_name}
log_dir = @localstatedir@/log/dirsrv/slapd-{instance_name}
inst_dir = @localstatedir@/lib/dirsrv/slapd-{instance_name}
commit 52605fde6ea9e5af13ffb34c24fd84b21805588c
Author: William Brown <firstyear(a)redhat.com>
Date: Wed Sep 14 13:02:03 2016 +1000
Ticket 48983 - Configure and Makefile.in from new default paths work.
Bug Description: At configure time, this is the only time we know all the
resolved paths of a ds installation. However, external tools such as lib389
need to be able to discover and use these paths.
Fix Description: This updates the configure and makefile based on the changes
to create the defaults.inf.
https://fedorahosted.org/389/ticket/48983
Author: wibrown
Review by: tbordaz, mreynolds (Thanks!)
diff --git a/Makefile.in b/Makefile.in
index 17b8d73..cd07f40 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1392,10 +1392,6 @@ build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
capbrand = @capbrand@
-
-#------------------------
-# Install Paths
-#------------------------
configdir = $(sysconfdir)@configdir@
datadir = @datadir@
datarootdir = @datarootdir@
@@ -1473,6 +1469,11 @@ perldir = $(libdir)@perldir@
perlexec = @perlexec@
plainldif_opts = @plainldif_opts@
prefix = @prefix@
+
+#------------------------
+# Install Paths
+#------------------------
+prefixdir = @prefixdir@
program_transform_name = @program_transform_name@
propertydir = $(datadir)@propertydir@
psdir = @psdir@
@@ -2142,7 +2143,8 @@ task_SCRIPTS = ldap/admin/src/scripts/template-bak2db \
inf_DATA = ldap/admin/src/slapd.inf \
ldap/admin/src/scripts/dscreate.map \
ldap/admin/src/scripts/dsupdate.map \
- ldap/admin/src/scripts/dsorgentries.map
+ ldap/admin/src/scripts/dsorgentries.map \
+ ldap/admin/src/defaults.inf
mib_DATA = ldap/servers/snmp/redhat-directory.mib
pkgconfig_DATA = $(PACKAGE_NAME).pc
@@ -3157,7 +3159,8 @@ rsearch_bin_LDADD = $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK) $(SASL_LINK) $(LIBS
@BUNDLE_FALSE@ -e 's,@ldaplib_defs\@,$(ldaplib_defs),g' \
@BUNDLE_FALSE@ -e 's,@systemdsystemunitdir\@,$(systemdsystemunitdir),g' \
@BUNDLE_FALSE@ -e 's,@systemdsystemconfdir\@,$(systemdsystemconfdir),g' \
-@BUNDLE_FALSE@ -e 's,@systemdgroupname\@,$(systemdgroupname),g'
+@BUNDLE_FALSE@ -e 's,@systemdgroupname\@,$(systemdgroupname),g' \
+@BUNDLE_FALSE@ -e 's,@prefixdir\@,$(prefixdir),g'
# these are for the config files and scripts that we need to generate and replace
@@ -3236,7 +3239,8 @@ rsearch_bin_LDADD = $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK) $(SASL_LINK) $(LIBS
@BUNDLE_TRUE@ -e 's,@ldaplib_defs\@,$(ldaplib_defs),g' \
@BUNDLE_TRUE@ -e 's,@systemdsystemunitdir\@,$(systemdsystemunitdir),g' \
@BUNDLE_TRUE@ -e 's,@systemdsystemconfdir\@,$(systemdsystemconfdir),g' \
-@BUNDLE_TRUE@ -e 's,@systemdgroupname\@,$(systemdgroupname),g'
+@BUNDLE_TRUE@ -e 's,@systemdgroupname\@,$(systemdgroupname),g' \
+@BUNDLE_TRUE@ -e 's,@prefixdir\@,$(prefixdir),g'
all: $(BUILT_SOURCES) config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
diff --git a/configure b/configure
index c2a4af6..734cbcb 100755
--- a/configure
+++ b/configure
@@ -745,6 +745,7 @@ schemadir
propertydir
sampledatadir
configdir
+prefixdir
with_tmpfiles_d
with_fhs_opt
enable_nunc_stans_FALSE
@@ -18145,6 +18146,7 @@ localrundir='/run'
if test "$with_fhs_opt" = "yes"; then
# Override sysconfdir and localstatedir if FHS optional
# package was requested.
+ prefixdir=$prefix
sysconfdir='/etc/opt'
localstatedir='/var/opt'
localrundir='/var/opt/run'
@@ -18179,6 +18181,7 @@ else
localstatedir='/var'
localrundir='/run'
fi
+ prefixdir=$prefix
# relative to datadir
sampledatadir=/$PACKAGE_NAME/data
# relative to datadir
@@ -18302,6 +18305,7 @@ fi
+
# check for --with-instconfigdir
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-instconfigdir" >&5
$as_echo_n "checking for --with-instconfigdir... " >&6; }
commit 8f6cce138b2ea23ff5b3f403944e338ae6542898
Author: William Brown <firstyear(a)redhat.com>
Date: Mon Sep 12 11:30:55 2016 +1000
Ticket 48983 - generate install path info from autotools scripts
Bug Description: At configure time, this is the only time we know all the
resolved paths of a ds installation. However, external tools such as lib389
need to be able to discover and use these paths.
Fix Description: Add a new file to share in a well-known location that well
provide all the paths of ds instance and install. This will allow discovery
of what settings should be used on the associated platform or installation.
https://fedorahosted.org/389/ticket/48983
Author: wibrown
Review by: ???
diff --git a/Makefile.am b/Makefile.am
index a2f834e..7458ab7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -175,6 +175,7 @@ selinux-built/dirsrv.fc: selinux-built
#------------------------
# Install Paths
#------------------------
+prefixdir = @prefixdir@
configdir = $(sysconfdir)@configdir@
sampledatadir = $(datadir)@sampledatadir@
propertydir = $(datadir)@propertydir@
@@ -724,7 +725,8 @@ endif
inf_DATA = ldap/admin/src/slapd.inf \
ldap/admin/src/scripts/dscreate.map \
ldap/admin/src/scripts/dsupdate.map \
- ldap/admin/src/scripts/dsorgentries.map
+ ldap/admin/src/scripts/dsorgentries.map \
+ ldap/admin/src/defaults.inf
mib_DATA = ldap/servers/snmp/redhat-directory.mib
@@ -1837,7 +1839,8 @@ fixupcmd = sed \
-e 's,@ldaplib_defs\@,$(ldaplib_defs),g' \
-e 's,@systemdsystemunitdir\@,$(systemdsystemunitdir),g' \
-e 's,@systemdsystemconfdir\@,$(systemdsystemconfdir),g' \
- -e 's,@systemdgroupname\@,$(systemdgroupname),g'
+ -e 's,@systemdgroupname\@,$(systemdgroupname),g' \
+ -e 's,@prefixdir\@,$(prefixdir),g'
else
fixupcmd = sed \
-e 's,@bindir\@,$(bindir),g' \
@@ -1906,7 +1909,8 @@ fixupcmd = sed \
-e 's,@ldaplib_defs\@,$(ldaplib_defs),g' \
-e 's,@systemdsystemunitdir\@,$(systemdsystemunitdir),g' \
-e 's,@systemdsystemconfdir\@,$(systemdsystemconfdir),g' \
- -e 's,@systemdgroupname\@,$(systemdgroupname),g'
+ -e 's,@systemdgroupname\@,$(systemdgroupname),g' \
+ -e 's,@prefixdir\@,$(prefixdir),g'
endif
%: %.in
diff --git a/configure.ac b/configure.ac
index c18d2d9..3e0f8aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -285,6 +285,7 @@ localrundir='/run'
if test "$with_fhs_opt" = "yes"; then
# Override sysconfdir and localstatedir if FHS optional
# package was requested.
+ prefixdir=$prefix
sysconfdir='/etc/opt'
localstatedir='/var/opt'
localrundir='/var/opt/run'
@@ -321,6 +322,7 @@ else
localstatedir='/var'
localrundir='/run'
fi
+ prefixdir=$prefix
# relative to datadir
sampledatadir=/$PACKAGE_NAME/data
# relative to datadir
@@ -414,6 +416,7 @@ else
with_pythonexec=/usr/bin/python2
fi
+AC_SUBST(prefixdir)
AC_SUBST(configdir)
AC_SUBST(sampledatadir)
AC_SUBST(propertydir)
diff --git a/ldap/admin/src/defaults.inf.in b/ldap/admin/src/defaults.inf.in
new file mode 100644
index 0000000..9b02542
--- /dev/null
+++ b/ldap/admin/src/defaults.inf.in
@@ -0,0 +1,43 @@
+; --- BEGIN COPYRIGHT BLOCK ---
+; Copyright (C) 2016 Red Hat, Inc.
+; All rights reserved.
+;
+; License: GPL (version 3 or any later version).
+; See LICENSE for details.
+; --- END COPYRIGHT BLOCK ---
+
+; Author: firstyear at redhat.com
+
+; This is a set of default paths that tools consuming DS should search
+; for paths. This is the foundation of the version 2 ds setup inf
+;
+; All format strings should be in python syntax IE {key}
+
+[slapd]
+product = @capbrand@ Directory Server
+version = @PACKAGE_VERSION@
+user = dirsrv
+group = dirsrv
+root_dn = cn=Directory Manager
+prefix = @prefixdir@
+bin_dir = @bindir@
+sbin_dir = @sbindir@
+lib_dir = @libdir@
+data_dir = @datadir@
+tmp_dir = /tmp
+
+sysconf_dir = @sysconfdir@
+initconfigdir = @initconfigdir@
+config_dir = @instconfigdir@/slapd-{instance_name}
+schema_dir = @instconfigdir@/slapd-{instance_name}/schema
+cert_dir = @instconfigdir@/slapd-{instance_name}
+
+local_state_dir = @localstatedir@
+run_dir = @localstatedir@/run/dirsrv
+lock_dir = @localstatedir@/lock/dirsrv/slapd-{instance_name}
+log_dir = @localstatedir@/log/dirsrv/slapd-{instance_name}
+inst_dir = @localstatedir@/lib/dirsrv/slapd-{instance_name}
+db_dir = @localstatedir@/lib/dirsrv/slapd-{instance_name}/db
+backup_dir = @localstatedir@/lib/dirsrv/slapd-{instance_name}/bak
+ldif_dir = @localstatedir@/lib/dirsrv/slapd-{instance_name}/ldif
+
7 years, 6 months
admserv/cfgstuff man/man8
by Noriko Hosoi
admserv/cfgstuff/ds_removal.in | 7 ++++++-
admserv/cfgstuff/ds_unregister.in | 7 ++++++-
man/man8/ds_removal.8 | 2 +-
man/man8/ds_unregister.8 | 2 +-
4 files changed, 14 insertions(+), 4 deletions(-)
New commits:
commit 97f4cb38b074ac14fede429ad56114cba357cfab
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Tue Sep 13 18:30:48 2016 -0700
Ticket #48988 - ds_removal and ds_unregister should support prompting for password
Description: Letting ds_removal and ds_unregieter accept '-w -' to
prompt for the Admin Password.
https://fedorahosted.org/389/ticket/48988
Reviewed by wibrown(a)redhat.com (Thanks, William!!)
diff --git a/admserv/cfgstuff/ds_removal.in b/admserv/cfgstuff/ds_removal.in
index c4c52cb..9c2a042 100755
--- a/admserv/cfgstuff/ds_removal.in
+++ b/admserv/cfgstuff/ds_removal.in
@@ -39,7 +39,7 @@
Usage()
{
- echo "Usage: $0 [-f] -s server_id -w admin_password"
+ echo "Usage: $0 [-f] -s server_id -w admin_password | -w -"
echo " server_id: Directory server identifier; slapd-<server_id>"
echo " admin_password: Administration user password"
echo " -f - force - optional - ignore errors and force removal of as much as possible"
@@ -60,6 +60,11 @@ do
elif [ "$1" = "-w" ]; then
shift
admin_pw=$1
+ if [ "$admin_pw" = "-" ]; then
+ echo -n "Enter Admin Password: "
+ read -s admin_pw
+ echo ""
+ fi
elif [ "$1" = "-f" ]; then
forceflag=1
elif [ "$1" = "-h" -o "$1" = "-H" -o "$1" = "--help" ]; then
diff --git a/admserv/cfgstuff/ds_unregister.in b/admserv/cfgstuff/ds_unregister.in
index 01b1bfd..f8458b7 100755
--- a/admserv/cfgstuff/ds_unregister.in
+++ b/admserv/cfgstuff/ds_unregister.in
@@ -39,7 +39,7 @@
Usage()
{
- echo "Usage: $0 -s server_id -w admin_password"
+ echo "Usage: $0 -s server_id -w admin_password | -w -"
echo " server_id: Directory server identifier; slapd-<server_id>"
echo " admin_password: Administration user password"
}
@@ -58,6 +58,11 @@ do
elif [ "$1" = "-w" ]; then
shift
admin_pw=$1
+ if [ "$admin_pw" = "-" ]; then
+ echo -n "Enter Admin Password: "
+ read -s admin_pw
+ echo ""
+ fi
elif [ "$1" = "-h" -o "$1" = "-H" -o "$1" = "--help" ]; then
Usage
exit 0
diff --git a/man/man8/ds_removal.8 b/man/man8/ds_removal.8
index 13824c4..f20f788 100644
--- a/man/man8/ds_removal.8
+++ b/man/man8/ds_removal.8
@@ -39,7 +39,7 @@ Optional \- Force removal \- ignore errors and remove everything
Required \- server_id \- the directory server identifier \- slapd\-\fIserver_id\fR
.TP
.B \fB\-w password\fR
-Required \- password \- the password for the console admin user
+Required \- password \- the password for the console admin user. If password is '-', prompt for the password.
.br
.SH AUTHOR
ds_removal was written by the 389 Project.
diff --git a/man/man8/ds_unregister.8 b/man/man8/ds_unregister.8
index bfe5f8b..f2bbece 100644
--- a/man/man8/ds_unregister.8
+++ b/man/man8/ds_unregister.8
@@ -33,7 +33,7 @@ A summary of options is included below:
Required \- server_id \- the directory server identifier \- slapd\-\fIserver_id\fR
.TP
.B \fB\-w password\fR
-Required \- password \- the password for the console admin user
+Required \- password \- the password for the console admin user. If password is '-', prompt for the password.
.br
.SH AUTHOR
ds_unregister was written by the 389 Project.
7 years, 6 months
Branch '389-ds-base-1.2.11' - ldap/servers
by Ludwig Krispenz
ldap/servers/plugins/replication/cl5_clcache.c | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
New commits:
commit 40d005465f0faa3e84c8515d6ccb591d3bf1e4b5
Author: Thierry Bordaz <tbordaz(a)redhat.com>
Date: Thu Sep 8 11:38:15 2016 +0200
use a consumer maxcsn only as anchor if supplier is more advanced
diff --git a/ldap/servers/plugins/replication/cl5_clcache.c b/ldap/servers/plugins/replication/cl5_clcache.c
index 0b8feee..f6c56a9 100644
--- a/ldap/servers/plugins/replication/cl5_clcache.c
+++ b/ldap/servers/plugins/replication/cl5_clcache.c
@@ -747,24 +747,22 @@ clcache_adjust_anchorcsn ( CLC_Buffer *buf, int *flag )
curr, conmaxcsn);
}
- if (csn_compare (cscb->local_maxcsn, cscb->prev_local_maxcsn) == 0 ||
- csn_compare (cscb->prev_local_maxcsn, buf->buf_current_csn) > 0 ) {
- if (csn_compare (cscb->local_maxcsn, cscb->consumer_maxcsn) > 0 ) {
+ if (csn_compare(cscb->local_maxcsn, cscb->consumer_maxcsn) > 0) {
+ /* We have something to send for this RID */
+
+ if (csn_compare(cscb->local_maxcsn, cscb->prev_local_maxcsn) == 0 ||
+ csn_compare(cscb->prev_local_maxcsn, buf->buf_current_csn) > 0) {
+ /* No new changes or it remains, in the buffer, updates to send */
rid_anchor = buf->buf_current_csn;
- }
- } else {
- /* prev local max csn < csnBuffer AND different from local maxcsn */
- if (cscb->prev_local_maxcsn == NULL) {
+ } else {
+ /* prev local max csn < csnBuffer AND different from local maxcsn */
if (cscb->consumer_maxcsn == NULL) {
/* the consumer hasn't seen changes for this RID */
rid_anchor = cscb->local_mincsn;
rid_flag = DB_SET;
- } else if ( csn_compare (cscb->local_maxcsn, cscb->consumer_maxcsn) > 0 ) {
+ } else {
rid_anchor = cscb->consumer_maxcsn;
}
- } else {
- /* csnPrevMaxSup > 0 */
- rid_anchor = cscb->consumer_maxcsn;
}
}
7 years, 6 months
Branch '389-ds-base-1.2.11' - ldap/servers
by Ludwig Krispenz
ldap/servers/slapd/entrywsi.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
New commits:
commit 2e98b9ecd575d4cf531a92df3bbbe3e4f021b0ca
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
Date: Wed Sep 14 11:39:33 2016 +0200
Ticket 48944 - backport 1.2.11 - on a read only replica invalid state info can accumulate
Bug Description: if internal mods are generated on a consumer (eg by Account Policy)
and changes for these attributes are als received via replication
the state information on the consumer can accumulate
Fix Description: Make sure replace operations are only applied if they
are newer than an existing attribute deletion csn.
https://fedorahosted.org/389/ticket/48944
Reviewed by: Noriko, thanks
diff --git a/ldap/servers/slapd/entrywsi.c b/ldap/servers/slapd/entrywsi.c
index 663d115..76286a1 100644
--- a/ldap/servers/slapd/entrywsi.c
+++ b/ldap/servers/slapd/entrywsi.c
@@ -430,6 +430,8 @@ entry_add_present_values_wsi(Slapi_Entry *e, const char *type, struct berval **b
Slapi_Attr *a= NULL;
long a_flags_orig;
int attr_state= entry_attr_find_wsi(e, type, &a);
+ const CSN *adcsn = NULL;
+
if (ATTRIBUTE_NOTFOUND == attr_state)
{
/* Create a new attribute */
@@ -437,6 +439,17 @@ entry_add_present_values_wsi(Slapi_Entry *e, const char *type, struct berval **b
slapi_attr_init(a, type);
attrlist_add(&e->e_attrs, a);
}
+
+ adcsn = attr_get_deletion_csn(a);
+ if (csn_compare(csn, adcsn) < 0) {
+ /* the attribute was deleted with an adcsn
+ * newer than the current csn.
+ * Nothing to do.
+ */
+ valuearray_free(&valuestoadd);
+ return retVal;
+ }
+
a_flags_orig = a->a_flags;
a->a_flags |= flags;
/* Check if the type of the to-be-added values has DN syntax or not. */
@@ -544,6 +557,14 @@ entry_delete_present_values_wsi(Slapi_Entry *e, const char *type, struct berval
{
/* delete the entire attribute */
LDAPDebug( LDAP_DEBUG_ARGS, "removing entire attribute %s\n", type, 0, 0 );
+ const CSN *adcsn = attr_get_deletion_csn(a);
+ if (csn_compare(csn, adcsn) < 0) {
+ /* the attribute was deleted with an adcsn
+ * newer than the current csn.
+ * Nothing to do.
+ */
+ return retVal;
+ }
attr_set_deletion_csn(a,csn);
if(urp)
{
7 years, 6 months
Branch '389-ds-base-1.3.5' - ldap/servers
by Ludwig Krispenz
ldap/servers/slapd/entrywsi.c | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
New commits:
commit 21f1b615239217d97afe133cb122f1e2cc3f3664
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
Date: Tue Aug 2 15:01:48 2016 +0200
Ticket 48944 - on a read only replica invalid state info can accumulate
Bug Description: if internal mods are generated on a consumer (eg by Account Policy)
and changes for these attributes are als received via replication
the state information on the consumer can accumulate
Fix Description: Make sure replace operations are only applied if they
are newer than an existing attribute deletion csn.
https://fedorahosted.org/389/ticket/48944
Reviewed by: Noriko, thanks
diff --git a/ldap/servers/slapd/entrywsi.c b/ldap/servers/slapd/entrywsi.c
index a8f8455..7445d98 100644
--- a/ldap/servers/slapd/entrywsi.c
+++ b/ldap/servers/slapd/entrywsi.c
@@ -432,6 +432,14 @@ entry_add_present_values_wsi_single_valued(Slapi_Entry *e, const char *type, str
Slapi_Attr *a= NULL;
long a_flags_orig;
int attr_state= entry_attr_find_wsi(e, type, &a);
+ const CSN *adcsn = attr_get_deletion_csn(a);
+ if (csn_compare(csn, adcsn)<0) {
+ /* the attribute was deleted with an adcsn
+ * newer than the current csn.
+ * Nothing to do.
+ */
+ goto done;
+ }
a_flags_orig = a->a_flags;
a->a_flags |= flags;
@@ -499,6 +507,7 @@ entry_add_present_values_wsi_single_valued(Slapi_Entry *e, const char *type, str
}
a->a_flags = a_flags_orig;
}
+done:
valuearray_free(&valuestoadd);
return(retVal);
@@ -517,6 +526,14 @@ entry_add_present_values_wsi_multi_valued(Slapi_Entry *e, const char *type, stru
long a_flags_orig;
int attr_state = entry_attr_find_wsi(e, type, &a);
+ const CSN *adcsn = attr_get_deletion_csn(a);
+ if (csn_compare(csn, adcsn)<0) {
+ /* the attribute was deleted with an adcsn
+ * newer than the current csn.
+ * Nothing to do.
+ */
+ goto done;
+ }
a_flags_orig = a->a_flags;
a->a_flags |= flags;
/* Check if the type of the to-be-added values has DN syntax or not. */
@@ -594,6 +611,7 @@ entry_add_present_values_wsi_multi_valued(Slapi_Entry *e, const char *type, stru
}
a->a_flags = a_flags_orig;
}
+done:
valuearray_free(&valuestoadd);
return(retVal);
@@ -677,6 +695,14 @@ entry_delete_present_values_wsi_single_valued(Slapi_Entry *e, const char *type,
{
/* delete the entire attribute */
LDAPDebug( LDAP_DEBUG_ARGS, "removing entire attribute %s\n", type, 0, 0 );
+ const CSN *adcsn = attr_get_deletion_csn(a);
+ if (csn_compare(csn, adcsn)<0) {
+ /* the attribute was deleted with an adcsn
+ * newer than the current csn.
+ * Nothing to do.
+ */
+ return LDAP_SUCCESS;
+ }
attr_set_deletion_csn(a,csn);
if(urp)
{
@@ -767,6 +793,14 @@ entry_delete_present_values_wsi_multi_valued(Slapi_Entry *e, const char *type, s
{
/* delete the entire attribute */
LDAPDebug( LDAP_DEBUG_ARGS, "removing entire attribute %s\n", type, 0, 0 );
+ const CSN *adcsn = attr_get_deletion_csn(a);
+ if (csn_compare(csn, adcsn)<0) {
+ /* the attribute was deleted with an adcsn
+ * newer than the current csn.
+ * Nothing to do.
+ */
+ return LDAP_SUCCESS;
+ }
attr_set_deletion_csn(a,csn);
if(urp)
{
7 years, 6 months