}
-#ifdef DNS_DN
- if ( dn_type( old_rdn ) == DN_X500 ) {
-#endif
-
Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: DN_X500\n",
0, 0, 0 );
}/* if (deleteoldrdn) */
-#ifdef DNS_DN
- } else {
-
-
- Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: DNS DN\n",
- 0, 0, 0 );
- /* XXXV3: not sure of what to do here */
- Debug( LDAP_DEBUG_TRACE,
- "ldbm_back_modrdn: not fully implemented...\n",
- 0, 0, 0 );
-
- }
-#endif
-
/* check for abandon */
ldap_pvt_thread_mutex_lock( &op->o_abandonmutex );
if ( op->o_abandon ) {
}
-#ifdef DNS_DN
- if ( dn_type( old_rdn ) == DN_X500 ) {
-#endif
-
Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: DN_X500\n",
0, 0, 0 );
old_rdn_val, 0, 0 );
}
-#ifdef DNS_DN
- } else {
- Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: DNS DN\n",
- 0, 0, 0 );
- /* XXXV3: not sure of what to do here */
- Debug( LDAP_DEBUG_TRACE,
- "ldbm_back_modrdn: not fully implemented...\n",
- 0, 0, 0 );
-
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- goto return_results;
-
- }
-#endif
-
/* check for abandon */
ldap_pvt_thread_mutex_lock( &op->o_abandonmutex );
if ( op->o_abandon ) {
return( NULL );
}
-#ifdef DNS_DN
- /*
- * no =, assume it is a dns name, like blah@some.domain.name
- * if the blah@ part is there, return some.domain.name. if
- * it's just some.domain.name, return domain.name.
- */
- if ( strchr( dn, '=' ) == NULL ) {
- if ( (s = strchr( dn, '@' )) == NULL ) {
- if ( (s = strchr( dn, '.' )) == NULL ) {
- return( NULL );
- }
- }
- if ( *(s + 1) == '\0' ) {
- return( NULL );
- } else {
- return( ch_strdup( &s[1] ) );
- }
- }
-#endif
-
/*
* else assume it is an X.500-style name, which looks like
* foo=bar,sha=baz,...
dn = ch_strdup( dn );
-#ifdef DNS_DN
- /*
- * no =, assume it is a dns name, like blah@some.domain.name
- * if the blah@ part is there, return some.domain.name. if
- * it's just some.domain.name, return domain.name.
- */
- if ( strchr( dn, '=' ) == NULL ) {
- if ( (s = strchr( dn, '@' )) == NULL ) {
- if ( (s = strchr( dn, '.' )) == NULL ) {
- return( dn );
- }
- }
- *s = '\0';
- return( dn );
- }
-#endif
-
- /*
- * else assume it is an X.500-style name, which looks like
- * foo=bar,sha=baz,...
- */
-
inquote = 0;
for ( s = dn; *s; s++ ) {
return( strcmp( dn + dnlen - suffixlen, suffix ) == 0 );
}
-#ifdef DNS_DN
-/*
- * dn_type - tells whether the given dn is an X.500 thing or DNS thing
- * returns (defined in slap.h): DN_DNS dns-style thing
- * DN_X500 x500-style thing
- */
-
-int
-dn_type( char *dn )
-{
- return( strchr( dn, '=' ) == NULL ? DN_DNS : DN_X500 );
-}
-#endif
-
/*
* get_next_substring(), rdn_attr_type(), rdn_attr_value(), and
* build_new_dn().
*new_dn = (char *) ch_malloc( strlen( p_dn ) + strlen( newrdn ) + 3 );
-#ifdef DNS_DN
- if ( dn_type( e_dn ) == DN_X500 ) {
-#endif
-
strcpy( *new_dn, newrdn );
strcat( *new_dn, "," );
strcat( *new_dn, p_dn );
-
-#ifdef DNS_DN
- } else {
-
- char *s;
- char sep[2];
-
- strcpy( *new_dn, newrdn );
- s = strchr( newrdn, '\0' );
- s--;
-
- if ( (*s != '.') && (*s != '@') ) {
-
- if ( (s = strpbrk( e_dn, ".@" )) != NULL ) {
-
- sep[0] = *s;
- sep[1] = '\0';
- strcat( *new_dn, sep );
-
- }
-
- }
-
- strcat( *new_dn, p_dn );
-
- }
-#endif
-
}
LIBSLAPD_F (char **) dn_subtree LDAP_P(( Backend *be, const char *dn ));
LIBSLAPD_F (char *) dn_rdn LDAP_P(( Backend *be, char *dn ));
LIBSLAPD_F (int) dn_issuffix LDAP_P(( char *dn, char *suffix ));
-#ifdef DNS_DN
-LIBSLAPD_F (int) dn_type LDAP_P(( char *dn ));
-#endif
LIBSLAPD_F (int) rdn_validate LDAP_P(( const char* str ));
LIBSLAPD_F (char *) rdn_attr_value LDAP_P(( char * rdn ));
LIBSLAPD_F (char *) rdn_attr_type LDAP_P(( char * rdn ));