From 70e7d58c7d075f89650e6bf2c60fffa25ecbcfac Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 27 Dec 2001 15:15:30 +0000 Subject: [PATCH] small improvement and prototyping --- servers/slapd/dn.c | 7 ++++--- servers/slapd/proto-slap.h | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/servers/slapd/dn.c b/servers/slapd/dn.c index 3f58041f36..449808b3d1 100644 --- a/servers/slapd/dn.c +++ b/servers/slapd/dn.c @@ -819,7 +819,6 @@ rdn_attrs( const char * rdn, char ***types, char ***values) int rc; assert( rdn ); - assert( types ); assert( values ); rc = ldap_str2rdn( rdn, &tmpRDN, &p, LDAP_DN_FORMAT_LDAP ); @@ -834,8 +833,10 @@ rdn_attrs( const char * rdn, char ***types, char ***values) assert( ava->la_attr ); assert( ava->la_value ); - charray_add_n( types, ava->la_attr->bv_val, - ava->la_attr->bv_len ); + if ( types ) { + charray_add_n( types, ava->la_attr->bv_val, + ava->la_attr->bv_len ); + } charray_add_n( values, ava->la_value->bv_val, ava->la_value->bv_len ); } diff --git a/servers/slapd/proto-slap.h b/servers/slapd/proto-slap.h index 2402070bd4..15cde0736d 100644 --- a/servers/slapd/proto-slap.h +++ b/servers/slapd/proto-slap.h @@ -373,6 +373,9 @@ LDAP_SLAPD_F (int) dnMatch LDAP_P(( LDAP_SLAPD_F (int) dnIsSuffix LDAP_P(( const struct berval *dn, const struct berval *suffix )); +LDAP_SLAPD_F (int) dnExtractRdn LDAP_P(( + const char *dn, struct berval **rdn )); + LDAP_SLAPD_F (int) rdnValidate LDAP_P(( struct berval * rdn )); #define SLAP_DN_MIGRATION -- 2.39.5