Handling Deprecation (4 to 5.2)

SLAPI_DEPRECATED has been defined in slapi-plugin.h to highlight what features have been superseded. If you cannot
change core plug-in code, you might decide to recompile after including slapi-plugin-compat4.h to access deprecated features in this release.

#include "slapi-plugin-compat4.h"

In general, you must at minimum recompile your
plug-ins so they work with Directory Server 5. Where possible, replace
deprecated code with new alternatives before recompiling and testing.

Plug-In Directive Changes (4 to 5.2)

Plug-in directives have been deprecated. Use configuration entries instead.
Refer to Plugging Libraries Into Directory Server for
details on using configuration entries to load and configure plug-ins.

Function Parameter Changes (4 to 5.2)

Many of the existing function parameters have become const to
reflect that parameter values are not changed when reading information.

Data Type Changes (4 to 5.2)

Plug-In Type Changes (4 to 5.2)

The SLAPI_PLUGIN_DATABASE plug-in type (database) has been deprecated.

Access Control Changes (4 to 5.2)

slapi_acl_verify_aci_syntax() now takes a pointer
to a Slapi_PBlock as its first parameter. You must modify
plug-in code to account for this change.

Attribute Handling Changes (4 to 5.2)

The following table shows deprecated functions and their replacements
for handling attributes.

Table 3–1 Replacement Functions
for Handling Attributes

Deprecated Function

Replacement Function

slapi_attr_get_values()

slapi_attr_get_bervals_copy()

slapi_attr_get_oid()

slapi_attr_get_oid_copy()

slapi_compute_add_search_rewriter()

slapi_compute_add_search_rewriter_ex()

Control Handling Changes (4 to 5.2)

slapi_get_supported_controls() is not thread-safe.
The function has been deprecated. Use slapi_get_supported_controls_copy() instead.

SLAPI_OPERATION_* identifiers have changed to unsigned
long values.

Entry Handling Changes (4 to 5.2)

The following table shows deprecated functions and their replacements
for handling entries.

Table 3–2 Replacement Functions for Handling
Entries

Deprecated Function

Replacement Function

slapi_entry_add_values()

slapi_entry_add_values_sv()

slapi_entry_add_valueset()

slapi_entry_attr_hasvalue()

slapi_entry_attr_has_syntax_value()

slapi_entry_attr_merge()

slapi_entry_attr_merge_sv()

slapi_entry_merge_values_sv()

slapi_entry_attr_replace()

slapi_entry_attr_replace_sv()

slapi_entry_delete_values()

slapi_entry_delete_values_sv()

Error Handling Changes (4 to 5.2)

slapi-plugin.h now includes ldap_msg.h,
which lists unique error numbers used by Directory Server.

Functions for dealing with back ends that return int error
codes can now also return SLAPI_FAIL_RETRY. The old values
are also still used.

Directory Server now distinguishes between two results. SLAPI_BIND_FAIL indicates that the bind failed and the server prepared a result
to send. SLAPI_BIND_ANONYMOUS indicates that the bind succeeded
as an anonymous bind.

Extended Operations Function Changes (4 to 5.2)

slapi_get_supported_extended_ops() is not thread-safe.
The function has been deprecated. Use slapi_get_supported_extended_ops_copy() instead.

Filter Handling Changes (4 to 5.2)

slapi_filter_get_type() has been deprecated.
Use slapi_filter_get_attribute_type() instead. The replacement
function works for all simple filter choices.

Internal Operation Changes (4 to 5.2)

The following table shows deprecated functions and their replacements
for handling internal operations.

Table 3–3 Replacement Functions for Handling
Internal Operations

Deprecated Function

Replacement Function

slapi_add_entry_internal()

slapi_add_internal_pb()

slapi_add_internal()

slapi_add_internal_pb()

slapi_delete_internal()

slapi_delete_internal_pb()

slapi_modify_internal()

slapi_modify_internal_pb()

slapi_modrdn_internal()

slapi_modrdn_internal_pb()

slapi_search_internal()

slapi_search_internal_pb()

slapi_search_internal_callback()

slapi_search_internal_callback_pb()

Logging Function Changes (4 to 5.2)

The following table shows deprecated functions and their replacements
for logging.

Table 3–4 Replacement Functions for Logging

Deprecated Function

Replacement Function

slapi_log_error()

slapi_log_error_ex()

slapi_log_info_ex()

slapi_log_warning_ex()

slapi_is_loglevel_set()

No replacement is available

Refer to Logging Plug-In Messages and
all example code delivered with the product for demonstrations of how to use
the new logging interface.

Parameter Block Argument Changes (4 to 5.2)

The following table shows deprecated parameter block arguments and their
replacement arguments.

Table 3–5 Replacement Parameter Block Arguments

Deprecated Argument

Replacement Argument

SLAPI_CHANGENUMBER

No replacement is available

SLAPI_CONN_AUTHTYPE

SLAPI_CONN_AUTHMETHOD

SLAPI_CONN_CLIENTIP

SLAPI_CONN_CLIENTNETADDR

SLAPI_CONN_SERVERIP

SLAPI_CONN_SERVERNETADDR

SLAPI_LOG_OPERATION

No replacement is available

SLAPI_PLUGIN_DB_ABANDON_FN

SLAPI_PLUGIN_DB_ABORT_FN

SLAPI_PLUGIN_DB_ADD_FN

SLAPI_PLUGIN_DB_ARCHIVE2DB_FN

SLAPI_PLUGIN_DB_BEGIN_FN

SLAPI_PLUGIN_DB_BIND_FN

SLAPI_PLUGIN_DB_COMMIT_FN

SLAPI_PLUGIN_DB_COMPARE_FN

SLAPI_PLUGIN_DB_CONFIG_FN

SLAPI_PLUGIN_DB_DB2ARCHIVE_FN

SLAPI_PLUGIN_DB_DB2INDEX_FN

SLAPI_PLUGIN_DB_DB2LDIF_FN

SLAPI_PLUGIN_DB_DELETE_FN

SLAPI_PLUGIN_DB_ENTRY_FN

SLAPI_PLUGIN_DB_ENTRY_RELEASE_FN

SLAPI_PLUGIN_DB_FLUSH_FN

SLAPI_PLUGIN_DB_FREE_RESULT_SET_FN

SLAPI_PLUGIN_DB_LDIF2DB_FN

SLAPI_PLUGIN_DB_MODIFY_FN

SLAPI_PLUGIN_DB_MODRDN_FN

SLAPI_PLUGIN_DB_NEXT_SEARCH_ENTRY_EXT_FN

SLAPI_PLUGIN_DB_NEXT_SEARCH_ENTRY_FN

SLAPI_PLUGIN_DB_NO_ACL

SLAPI_PLUGIN_DB_REFERRAL_FN

SLAPI_PLUGIN_DB_RESULT_FN

SLAPI_PLUGIN_DB_SEARCH_FN

SLAPI_PLUGIN_DB_SEQ_FN

SLAPI_PLUGIN_DB_SIZE_FN

SLAPI_PLUGIN_DB_TEST_FN

SLAPI_PLUGIN_DB_UNBIND_FN

No replacement, as the database plug-in type is deprecated

SLAPI_REQUESTOR_ISUPDATEDN

No replacement is available

Password Handling Changes (4 to 5.2)

slapi_pw_find() has been deprecated. Use slapi_pw_find_valueset() instead.

SASL Bind Changes (4 to 5.2)

slapi_get_supported_saslmechanisms() has been deprecated.
Use slapi_get_supported_saslmechanisms_copy() instead.