.B rwm-suffixmassage "<virtual naming context>" "<real naming context>"
Shortcut to implement naming context rewriting; the trailing part
of the DN is rewritten from the virtual to the real naming context
-in the bindDN, searchBase, searchFilterAttrDN, compareDN, compareAttrDN,
+in the bindDN, searchDN, searchFilterAttrDN, compareDN, compareAttrDN,
addDN, addAttrDN, modifyDN, modifyAttrDN, modrDN, newSuperiorDN,
deleteDN, exopPasswdDN, and from the real to the virtual naming context
-in the searchResult, searchAttrDN and matchedDN rewrite contexts.
+in the searchEntryDN, searchAttrDN and matchedDN rewrite contexts.
By default no rewriting occurs for the searchFilter rewrite context.
This directive implies setting the
.B rwm-rewriteEngine
(default) if defined and no specific context
is available
bindDN bind
-searchBase search
+searchDN search
searchFilter search
searchFilterAttrDN search
compareDN compare
.LP
.RS
.nf
-searchResult search (only if defined; no default;
- acts on DN and DN-syntax attributes
- of search results)
-searchAttrDN search AVA
-matchedDN all ops (only if applicable)
+searchEntryDN search (only if defined; no default;
+ acts on DN of search entries)
+searchAttrDN search AVA (only if defined; defaults
+ to searchEntryDN; acts on DN-syntax
+ attributes of search results)
+matchedDN all ops (only if applicable; defaults
+ to searchEntryDN)
.fi
.RE
.LP
# empty filter rule
rwm-rewriteContext searchFilter
# all dataflow from server to client
-rwm-rewriteContext searchResult
+rwm-rewriteContext searchEntryDN
rwm-rewriteRule "(.*)<realnamingcontext>$" "$1<virtualnamingcontext>" ":"
-rwm-rewriteContext searchAttrDN alias searchResult
-rwm-rewriteContext matchedDN alias searchResult
+rwm-rewriteContext searchAttrDN alias searchEntryDN
+rwm-rewriteContext matchedDN alias searchEntryDN
# Everything defined here goes into the `default' context.
# This rule changes the naming context of anything sent
.\" rwm-rewriteRule ".*" "${>addBlanks(${>uid2Gecos($0)})}" ":"
.\"
# Rewrite the search base according to `default' rules.
-rwm-rewriteContext searchBase alias default
+rwm-rewriteContext searchDN alias default
# Search results with OpenLDAP DN are rewritten back with
# `dc=home,dc=net' naming context, with spaces eaten.
-rwm-rewriteContext searchResult
+rwm-rewriteContext searchEntryDN
rwm-rewriteRule "(.*[^ ],)?[ ]?dc=OpenLDAP,[ ]?dc=org$"
"${>eatBlanks($1)}dc=home,dc=net" ":"
# in case of match stops rewriting; in case of error,
# it is ignored. In case we are mapping virtual
# to real naming contexts, we also need to rewrite
-# regular DNs, because the definition of a bindDn
+# regular DNs, because the definition of a bindDN
# rewrite context overrides the default definition.
rwm-rewriteContext bindDN
rwm-rewriteRule "^mail=[^,]+@[^,]+$" "${attr2dn($0)}" ":@I"
# in case of match the rewriting exits successfully.
# The second rule matches everything else and causes
# the value to be rejected.
-rwm-rewriteContext searchResult
+rwm-rewriteContext searchEntryDN
rwm-rewriteRule ".*,ou=People,dc=example,dc=com$" "$0" ":@"
rwm-rewriteRule ".*" "" "#"
.fi
char *olddn = op->o_req_dn.bv_val;
#ifdef ENABLE_REWRITE
- rc = rwm_op_dn_massage( op, rs, "addDn" );
+ rc = rwm_op_dn_massage( op, rs, "addDN" );
#else
rc = 1;
rc = rwm_op_dn_massage( op, rs, &rc );
#endif
if ( rc != LDAP_SUCCESS ) {
op->o_bd->bd_info = (BackendInfo *)on->on_info;
- send_ldap_error( op, rs, rc, "addDn massage error" );
+ send_ldap_error( op, rs, rc, "addDN massage error" );
return -1;
}
* the operation should give up, right?
*/
#ifdef ENABLE_REWRITE
- rc = rwm_dnattr_rewrite( op, rs, "addAttrDn",
+ rc = rwm_dnattr_rewrite( op, rs, "addAttrDN",
(*ap)->a_vals,
(*ap)->a_nvals ? &(*ap)->a_nvals : NULL );
#else
( void )rewrite_session_delete( rwmap->rwm_rw, op->o_conn );
( void )rewrite_session_init( rwmap->rwm_rw, op->o_conn );
- rc = rwm_op_dn_massage( op, rs, "bindDn" );
+ rc = rwm_op_dn_massage( op, rs, "bindDN" );
#else
rc = 1;
rc = rwm_op_dn_massage( op, rs, &rc );
#endif
if ( rc != LDAP_SUCCESS ) {
op->o_bd->bd_info = (BackendInfo *)on->on_info;
- send_ldap_error( op, rs, rc, "bindDn massage error" );
+ send_ldap_error( op, rs, rc, "bindDN massage error" );
return -1;
}
mapped_vals[2] = { BER_BVNULL, BER_BVNULL };
#ifdef ENABLE_REWRITE
- rc = rwm_op_dn_massage( op, rs, "compareDn" );
+ rc = rwm_op_dn_massage( op, rs, "compareDN" );
#else
rc = 1;
rc = rwm_op_dn_massage( op, rs, &rc );
#endif
if ( rc != LDAP_SUCCESS ) {
op->o_bd->bd_info = (BackendInfo *)on->on_info;
- send_ldap_error( op, rs, rc, "compareDn massage error" );
+ send_ldap_error( op, rs, rc, "compareDN massage error" );
return -1;
}
int rc;
#ifdef ENABLE_REWRITE
- rc = rwm_op_dn_massage( op, rs, "deleteDn" );
+ rc = rwm_op_dn_massage( op, rs, "deleteDN" );
#else
rc = 1;
rc = rwm_op_dn_massage( op, rs, &rc );
#endif
if ( rc != LDAP_SUCCESS ) {
op->o_bd->bd_info = (BackendInfo *)on->on_info;
- send_ldap_error( op, rs, rc, "deleteDn massage error" );
+ send_ldap_error( op, rs, rc, "deleteDN massage error" );
return -1;
}
int rc;
#ifdef ENABLE_REWRITE
- rc = rwm_op_dn_massage( op, rs, "modifyDn" );
+ rc = rwm_op_dn_massage( op, rs, "modifyDN" );
#else
rc = 1;
rc = rwm_op_dn_massage( op, rs, &rc );
#endif
if ( rc != LDAP_SUCCESS ) {
op->o_bd->bd_info = (BackendInfo *)on->on_info;
- send_ldap_error( op, rs, rc, "modifyDn massage error" );
+ send_ldap_error( op, rs, rc, "modifyDN massage error" );
return -1;
}
slap_schema.si_syn_distinguishedName )
{
#ifdef ENABLE_REWRITE
- rc = rwm_dnattr_rewrite( op, rs, "modifyDn",
+ rc = rwm_dnattr_rewrite( op, rs, "modifyDN",
(*mlp)->sml_values,
(*mlp)->sml_nvalues ? &(*mlp)->sml_nvalues : NULL );
#else
}
#ifdef ENABLE_REWRITE
- rc = rwm_op_dn_massage( op, rs, "renameDn" );
+ rc = rwm_op_dn_massage( op, rs, "renameDN" );
#else
rc = 1;
rc = rwm_op_dn_massage( op, rs, &rc );
#endif
if ( rc != LDAP_SUCCESS ) {
op->o_bd->bd_info = (BackendInfo *)on->on_info;
- send_ldap_error( op, rs, rc, "renameDn massage error" );
+ send_ldap_error( op, rs, rc, "renameDN massage error" );
return -1;
}
char *text = NULL;
#ifdef ENABLE_REWRITE
- rc = rwm_op_dn_massage( op, rs, "searchDn" );
+ rc = rwm_op_dn_massage( op, rs, "searchDN" );
#else
rc = 1;
rc = rwm_op_dn_massage( op, rs, &rc );
#endif
if ( rc != LDAP_SUCCESS ) {
- text = "searchDn massage error";
+ text = "searchDN massage error";
goto error_return;
}
int rc;
#ifdef ENABLE_REWRITE
- rc = rwm_op_dn_massage( op, rs, "extendedDn" );
+ rc = rwm_op_dn_massage( op, rs, "extendedDN" );
#else
rc = 1;
rc = rwm_op_dn_massage( op, rs, &rc );
#endif
if ( rc != LDAP_SUCCESS ) {
op->o_bd->bd_info = (BackendInfo *)on->on_info;
- send_ldap_error( op, rs, rc, "extendedDn massage error" );
+ send_ldap_error( op, rs, rc, "extendedDN massage error" );
return -1;
}
#ifdef ENABLE_REWRITE
dc.conn = op->o_conn;
dc.rs = NULL;
- dc.ctx = "searchResult";
+ dc.ctx = "searchEntryDN";
#else
dc.tofrom = 0;
dc.normalized = 0;