From 309870fa9c06a53260db67fe1ec269db179c9747 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 26 Jan 2002 07:32:13 +0000 Subject: [PATCH] Remove deprecated routines and a little lint. --- servers/slapd/dn.c | 36 ------------------------------------ servers/slapd/proto-slap.h | 5 +++-- 2 files changed, 3 insertions(+), 38 deletions(-) diff --git a/servers/slapd/dn.c b/servers/slapd/dn.c index 7d836a630e..9fa1b4a746 100644 --- a/servers/slapd/dn.c +++ b/servers/slapd/dn.c @@ -635,41 +635,6 @@ dn_normalize( char *dn ) return dn; } -/* - * dn_parent - return the dn's parent, in-place - * FIXME: should be replaced by dnParent() - */ -char * -dn_parent( - Backend *be, - const char *dn ) -{ - struct berval bv, pdn; - - if ( dn == NULL ) { - return NULL; - } - - while ( dn[ 0 ] != '\0' && ASCII_SPACE( dn[ 0 ] ) ) { - dn++; - } - - if ( dn[ 0 ] == '\0' ) { - return NULL; - } - - bv.bv_val = (char *)dn; - bv.bv_len = strlen(bv.bv_val); - if ( be != NULL && be_issuffix( be, &bv ) ) { - return NULL; - } - - if ( dnParent( &bv, &pdn ) != LDAP_SUCCESS ) { - return NULL; - } - - return pdn.bv_val; -} #endif /* SLAP_DN_MIGRATION */ @@ -711,7 +676,6 @@ dn_rdnlen( Backend *be, struct berval *dn_in ) { - int rc; const char *p; assert( dn_in ); diff --git a/servers/slapd/proto-slap.h b/servers/slapd/proto-slap.h index 038094c259..7465a0de30 100644 --- a/servers/slapd/proto-slap.h +++ b/servers/slapd/proto-slap.h @@ -406,11 +406,12 @@ LDAP_SLAPD_F (void) build_new_dn LDAP_P(( LDAP_SLAPD_F (int) dnParent LDAP_P(( struct berval *dn, struct berval *pdn )); -#define SLAP_DN_MIGRATION +#ifdef HAVE_CYRUS_SASL +#define SLAP_DN_MIGRATION 1 +#endif #ifdef SLAP_DN_MIGRATION /* These routines are deprecated!!! */ LDAP_SLAPD_F (char *) dn_normalize LDAP_P(( char *dn )); -LDAP_SLAPD_F (char *) dn_parent LDAP_P(( Backend *be, const char *dn )); #endif /* -- 2.39.5