Remove DNS_DN experimental code.

This commit is contained in:
Kurt Zeilenga 1999-12-18 19:54:22 +00:00
parent f3a650b8af
commit da93ca8c5e
5 changed files with 0 additions and 134 deletions

View File

@ -303,10 +303,6 @@ bdb2i_back_modrdn_internal(
} }
#ifdef DNS_DN
if ( dn_type( old_rdn ) == DN_X500 ) {
#endif
Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: DN_X500\n", Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: DN_X500\n",
0, 0, 0 ); 0, 0, 0 );
@ -367,20 +363,6 @@ bdb2i_back_modrdn_internal(
}/* if (deleteoldrdn) */ }/* 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 */ /* check for abandon */
ldap_pvt_thread_mutex_lock( &op->o_abandonmutex ); ldap_pvt_thread_mutex_lock( &op->o_abandonmutex );
if ( op->o_abandon ) { if ( op->o_abandon ) {

View File

@ -344,10 +344,6 @@ ldbm_back_modrdn(
} }
#ifdef DNS_DN
if ( dn_type( old_rdn ) == DN_X500 ) {
#endif
Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: DN_X500\n", Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: DN_X500\n",
0, 0, 0 ); 0, 0, 0 );
@ -403,22 +399,6 @@ ldbm_back_modrdn(
old_rdn_val, 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 */ /* check for abandon */
ldap_pvt_thread_mutex_lock( &op->o_abandonmutex ); ldap_pvt_thread_mutex_lock( &op->o_abandonmutex );
if ( op->o_abandon ) { if ( op->o_abandon ) {

View File

@ -222,26 +222,6 @@ dn_parent(
return( NULL ); 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 * else assume it is an X.500-style name, which looks like
* foo=bar,sha=baz,... * foo=bar,sha=baz,...
@ -296,28 +276,6 @@ char * dn_rdn(
dn = ch_strdup( dn ); 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; inquote = 0;
for ( s = dn; *s; s++ ) { for ( s = dn; *s; s++ ) {
@ -398,20 +356,6 @@ dn_issuffix(
return( strcmp( dn + dnlen - suffixlen, suffix ) == 0 ); 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 * get_next_substring(), rdn_attr_type(), rdn_attr_value(), and
* build_new_dn(). * build_new_dn().
@ -542,39 +486,7 @@ build_new_dn( char ** new_dn,
*new_dn = (char *) ch_malloc( strlen( p_dn ) + strlen( newrdn ) + 3 ); *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 ); strcpy( *new_dn, newrdn );
strcat( *new_dn, "," ); strcat( *new_dn, "," );
strcat( *new_dn, p_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
} }

View File

@ -214,9 +214,6 @@ LIBSLAPD_F (char *) dn_parent LDAP_P(( Backend *be, const char *dn ));
LIBSLAPD_F (char **) dn_subtree LDAP_P(( Backend *be, const char *dn )); 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 (char *) dn_rdn LDAP_P(( Backend *be, char *dn ));
LIBSLAPD_F (int) dn_issuffix LDAP_P(( char *dn, char *suffix )); 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 (int) rdn_validate LDAP_P(( const char* str ));
LIBSLAPD_F (char *) rdn_attr_value LDAP_P(( char * rdn )); LIBSLAPD_F (char *) rdn_attr_value LDAP_P(( char * rdn ));
LIBSLAPD_F (char *) rdn_attr_type LDAP_P(( char * rdn )); LIBSLAPD_F (char *) rdn_attr_type LDAP_P(( char * rdn ));

View File

@ -55,11 +55,6 @@ LDAP_BEGIN_DECL
*/ */
#define LDAP_MOD_SOFTADD 0x1000 #define LDAP_MOD_SOFTADD 0x1000
#ifdef DNS_DN
#define DN_DNS 0
#define DN_X500 1
#endif
#define ON 1 #define ON 1
#define OFF (-1) #define OFF (-1)
#define UNDEFINED 0 #define UNDEFINED 0