X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Fdn.c;h=d60edd0cec6e60234a63e36e5f65289d14802a83;hb=2b0819c4a9209784f762ec154ce4721038522a8a;hp=b658bed7698baf661299fc29de85f4b08d477244;hpb=29d9fa20a2823c827f098d78f1ea8539d86bf4cf;p=openldap diff --git a/libraries/libldap/dn.c b/libraries/libldap/dn.c index b658bed769..d60edd0cec 100644 --- a/libraries/libldap/dn.c +++ b/libraries/libldap/dn.c @@ -9,7 +9,6 @@ #include -#include #include #include #include @@ -217,25 +216,7 @@ ldap_dn_parent( } /* - * 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( LDAP_STRDUP( &s[1] ) ); - } - } - - /* - * else assume it is an X.500-style name, which looks like + * assume it is an X.500-style name, which looks like * foo=bar,sha=baz,... */ @@ -263,7 +244,7 @@ ldap_dn_parent( return( LDAP_STRDUP( "" ) ); } -char * ldap_dn_rdn( +char * ldap_dn_relative( const char *dn ) { char *s; @@ -288,25 +269,8 @@ char * ldap_dn_rdn( 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( rdn, '=' ) == NULL ) { - if ( (s = strchr( rdn, '@' )) == NULL ) { - if ( (s = strchr( rdn, '.' )) == NULL ) { - return( rdn ); - } - } - *s = '\0'; - return( rdn ); - } -#endif - /* - * else assume it is an X.500-style name, which looks like + * assume it is an X.500-style name, which looks like * foo=bar,sha=baz,... */