]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/suffixalias.c
if continuation line starts with a tab, rewrite it to a space
[openldap] / servers / slapd / suffixalias.c
index 1b11005a5daabf69e45e3dc416cf5e3c069058e1..703d90ef8275330cbe983de12e90f2959cb160e5 100644 (file)
@@ -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;
                }