+/* $OpenLDAP$ */
/*
- * Copyright 1999 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1999-2000 The OpenLDAP Foundation, All Rights Reserved.
*
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file in the top level
* directory of this package.
Backend *be,
char *dn )
{
- int i, dnLength;
+ int i, dnLength;
if(dn == NULL) return NULL;
if(be == NULL) return dn;
/* alias is longer than dn */
continue;
} else if ( diff > 0 ) {
- if ( ! DNSEPARATOR(dn[diff-1]) ) {
+ if ( ! DN_SEPARATOR(dn[diff-1]) ) {
/* boundary is not at a DN separator */
continue;
}
dn = ch_malloc( diff + strlen(be->be_suffixAlias[i+1]) + 1 );
strncpy( dn, oldDN, diff );
strcpy( &dn[diff], be->be_suffixAlias[i+1] );
+#ifdef NEW_LOGGING
+ LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ "suffix_alias: converted \"%s\" to \"%s\"\n",
+ oldDN, dn ));
+#else
Debug( LDAP_DEBUG_ARGS,
"suffix_alias: converted \"%s\" to \"%s\"\n",
oldDN, dn, 0);
+#endif
+
free (oldDN);
break;
}