From: Kurt Zeilenga Date: Sat, 18 Dec 1999 19:54:22 +0000 (+0000) Subject: Remove DNS_DN experimental code. X-Git-Tag: UCDATA_2_4~67 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=da93ca8c5ec7e59a2aa958454c54761bb475e480;p=openldap Remove DNS_DN experimental code. --- diff --git a/servers/slapd/back-bdb2/modrdn.c b/servers/slapd/back-bdb2/modrdn.c index 8b136df3b7..b131edf13b 100644 --- a/servers/slapd/back-bdb2/modrdn.c +++ b/servers/slapd/back-bdb2/modrdn.c @@ -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", 0, 0, 0 ); @@ -367,20 +363,6 @@ bdb2i_back_modrdn_internal( }/* 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 ) { diff --git a/servers/slapd/back-ldbm/modrdn.c b/servers/slapd/back-ldbm/modrdn.c index ac9f17d699..20eef3ef1b 100644 --- a/servers/slapd/back-ldbm/modrdn.c +++ b/servers/slapd/back-ldbm/modrdn.c @@ -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", 0, 0, 0 ); @@ -403,22 +399,6 @@ ldbm_back_modrdn( 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 ) { diff --git a/servers/slapd/dn.c b/servers/slapd/dn.c index a8419c59a6..c968d5a02d 100644 --- a/servers/slapd/dn.c +++ b/servers/slapd/dn.c @@ -222,26 +222,6 @@ dn_parent( 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,... @@ -296,28 +276,6 @@ char * dn_rdn( 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++ ) { @@ -398,20 +356,6 @@ dn_issuffix( 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(). @@ -542,39 +486,7 @@ build_new_dn( char ** 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 - } diff --git a/servers/slapd/proto-slap.h b/servers/slapd/proto-slap.h index c56f87ba99..49d4c544e0 100644 --- a/servers/slapd/proto-slap.h +++ b/servers/slapd/proto-slap.h @@ -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_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 )); diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index b0e67a32ea..6ab1017b53 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -55,11 +55,6 @@ LDAP_BEGIN_DECL */ #define LDAP_MOD_SOFTADD 0x1000 -#ifdef DNS_DN -#define DN_DNS 0 -#define DN_X500 1 -#endif - #define ON 1 #define OFF (-1) #define UNDEFINED 0