/* dn.c - routines for dealing with distinguished names */
+/* $OpenLDAP$ */
/*
- * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#include <stdio.h>
-#include <ac/ctype.h>
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
#include "ldap-int.h"
+#if 0
+/* this should wait for UTF-8 routines */
+
#define B4LEADTYPE 0
#define B4TYPE 1
#define INOIDTYPE 2
}
/*
- * 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,...
*/
return( LDAP_STRDUP( "" ) );
}
-char * ldap_dn_rdn(
+char * ldap_dn_relative(
const char *dn )
{
char *s;
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,...
*/
return( rdn );
}
+
+#endif