X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fsuffixalias.c;h=703d90ef8275330cbe983de12e90f2959cb160e5;hb=0445405299ebc97d0f11585031fb1abef031caf9;hp=1b11005a5daabf69e45e3dc416cf5e3c069058e1;hpb=c12547cf3bbae157b2588b686d17084b5699accd;p=openldap diff --git a/servers/slapd/suffixalias.c b/servers/slapd/suffixalias.c index 1b11005a5d..703d90ef82 100644 --- a/servers/slapd/suffixalias.c +++ b/servers/slapd/suffixalias.c @@ -1,5 +1,6 @@ +/* $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. @@ -31,7 +32,7 @@ char *suffix_alias( Backend *be, char *dn ) { - int i, dnLength; + int i, dnLength; if(dn == NULL) return NULL; if(be == NULL) return dn; @@ -49,7 +50,7 @@ char *suffix_alias( /* 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; } @@ -62,9 +63,16 @@ char *suffix_alias( 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; }