Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
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 =