]> git.sur5r.net Git - openldap/blob - servers/slapd/back-ldap/search.c
Search limit updates and other misc cleanup
[openldap] / servers / slapd / back-ldap / search.c
1 /* search.c - ldap backend search function */
2 /* $OpenLDAP$ */
3 /*
4  * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
5  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
6  */
7 /* This is an altered version */
8 /*
9  * Copyright 1999, Howard Chu, All rights reserved. <hyc@highlandsun.com>
10  * 
11  * Permission is granted to anyone to use this software for any purpose
12  * on any computer system, and to alter it and redistribute it, subject
13  * to the following restrictions:
14  * 
15  * 1. The author is not responsible for the consequences of use of this
16  *    software, no matter how awful, even if they arise from flaws in it.
17  * 
18  * 2. The origin of this software must not be misrepresented, either by
19  *    explicit claim or by omission.  Since few users ever read sources,
20  *    credits should appear in the documentation.
21  * 
22  * 3. Altered versions must be plainly marked as such, and must not be
23  *    misrepresented as being the original software.  Since few users
24  *    ever read sources, credits should appear in the documentation.
25  * 
26  * 4. This notice may not be removed or altered.
27  *
28  *
29  *
30  * Copyright 2000, Pierangelo Masarati, All rights reserved. <ando@sys-net.it>
31  * 
32  * This software is being modified by Pierangelo Masarati.
33  * The previously reported conditions apply to the modified code as well.
34  * Changes in the original code are highlighted where required.
35  * Credits for the original code go to the author, Howard Chu.
36  */
37
38 #include "portable.h"
39
40 #include <stdio.h>
41
42 #include <ac/socket.h>
43 #include <ac/string.h>
44 #include <ac/time.h>
45
46 #include "slap.h"
47 #include "back-ldap.h"
48 #undef ldap_debug       /* silence a warning in ldap-int.h */
49 #include "../../../libraries/libldap/ldap-int.h"
50
51 static int ldap_send_entry( Backend *be, Operation *op, struct ldapconn *lc,
52                              LDAPMessage *e, AttributeName *attrs, int attrsonly );
53
54 int
55 ldap_back_search(
56     Backend     *be,
57     Connection  *conn,
58     Operation   *op,
59     struct berval       *base,
60     struct berval       *nbase,
61     int         scope,
62     int         deref,
63     int         slimit,
64     int         tlimit,
65     Filter      *filter,
66     struct berval       *filterstr,
67     AttributeName       *attrs,
68     int         attrsonly
69 )
70 {
71         struct ldapinfo *li = (struct ldapinfo *) be->be_private;
72         struct ldapconn *lc;
73         struct timeval  tv;
74         LDAPMessage             *res, *e;
75         int     count, rc = 0, msgid, sres = LDAP_SUCCESS; 
76         char *match = NULL, *err = NULL;
77         char *mapped_filter = NULL, **mapped_attrs = NULL;
78         struct berval mbase;
79 #ifdef ENABLE_REWRITE
80         char *mmatch = NULL;
81         struct berval mfilter = { 0, NULL };
82 #endif /* ENABLE_REWRITE */
83         struct slap_limits_set *limit = NULL;
84         int isroot = 0;
85         BerVarray v2refs = NULL;
86
87         lc = ldap_back_getconn(li, conn, op);
88         if ( !lc ) {
89                 return( -1 );
90         }
91
92         /*
93          * controls are set in ldap_back_dobind()
94          * 
95          * FIXME: in case of values return filter, we might want
96          * to map attrs and maybe rewrite value
97          */
98         if ( !ldap_back_dobind( lc, op ) ) {
99                 return( -1 );
100         }
101
102         /* if not root, get appropriate limits */
103         if ( be_isroot( be, &op->o_ndn ) ) {
104                 isroot = 1;
105         } else {
106                 ( void ) get_limits( be, &op->o_ndn, &limit );
107         }
108         
109         /* if no time limit requested, rely on remote server limits */
110         /* if requested limit higher than hard limit, abort */
111         if ( !isroot && tlimit > limit->lms_t_hard ) {
112                 /* no hard limit means use soft instead */
113                 if ( limit->lms_t_hard == 0
114                                 && limit->lms_t_soft > -1
115                                 && tlimit > limit->lms_t_soft ) {
116                         tlimit = limit->lms_t_soft;
117                         
118                 /* positive hard limit means abort */
119                 } else if ( limit->lms_t_hard > 0 ) {
120                         send_ldap_result( conn, op, LDAP_ADMINLIMIT_EXCEEDED,
121                                         NULL, NULL, NULL, NULL );
122                         rc = 0;
123                         goto finish;
124                 }
125                 
126                 /* negative hard limit means no limit */
127         }
128         
129         /* if no size limit requested, rely on remote server limits */
130         /* if requested limit higher than hard limit, abort */
131         if ( !isroot && slimit > limit->lms_s_hard ) {
132                 /* no hard limit means use soft instead */
133                 if ( limit->lms_s_hard == 0
134                                 && limit->lms_s_soft > -1
135                                 && slimit > limit->lms_s_soft ) {
136                         slimit = limit->lms_s_soft;
137                         
138                 /* positive hard limit means abort */
139                 } else if ( limit->lms_s_hard > 0 ) {
140                         send_ldap_result( conn, op, LDAP_ADMINLIMIT_EXCEEDED,
141                                         NULL, NULL, NULL, NULL );
142                         rc = 0;
143                         goto finish;
144                 }
145                 
146                 /* negative hard limit means no limit */
147         }
148
149         /* should we check return values? */
150         if (deref != -1)
151                 ldap_set_option( lc->ld, LDAP_OPT_DEREF, (void *)&deref);
152         if (tlimit != -1)
153                 ldap_set_option( lc->ld, LDAP_OPT_TIMELIMIT, (void *)&tlimit);
154         if (slimit != -1)
155                 ldap_set_option( lc->ld, LDAP_OPT_SIZELIMIT, (void *)&slimit);
156
157         /*
158          * Rewrite the search base, if required
159          */
160 #ifdef ENABLE_REWRITE
161         switch ( rewrite_session( li->rwinfo, "searchBase",
162                                 base->bv_val, conn, &mbase.bv_val ) ) {
163         case REWRITE_REGEXEC_OK:
164                 if ( mbase.bv_val == NULL ) {
165                         mbase = *base;
166                 }
167 #ifdef NEW_LOGGING
168                 LDAP_LOG( BACK_LDAP, DETAIL1, 
169                         "[rw] searchBase: \"%s\" -> \"%s\"\n", 
170                         base->bv_val, mbase.bv_val, 0 );
171 #else /* !NEW_LOGGING */
172                 Debug( LDAP_DEBUG_ARGS, "rw> searchBase: \"%s\" -> \"%s\"\n%s",
173                                 base->bv_val, mbase.bv_val, "" );
174 #endif /* !NEW_LOGGING */
175                 break;
176                 
177         case REWRITE_REGEXEC_UNWILLING:
178                 send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
179                                 NULL, "Operation not allowed", NULL, NULL );
180                 rc = -1;
181                 goto finish;
182
183         case REWRITE_REGEXEC_ERR:
184                 send_ldap_result( conn, op, LDAP_OTHER,
185                                 NULL, "Rewrite error", NULL, NULL );
186                 rc = -1;
187                 goto finish;
188         }
189         
190         /*
191          * Rewrite the search filter, if required
192          */
193         switch ( rewrite_session( li->rwinfo, "searchFilter",
194                                 filterstr->bv_val, conn, &mfilter.bv_val ) ) {
195         case REWRITE_REGEXEC_OK:
196                 if ( mfilter.bv_val == NULL || mfilter.bv_val[0] == '\0') {
197                         if ( mfilter.bv_val != NULL ) {
198                                 free( mfilter.bv_val );
199                         }
200                         mfilter = *filterstr;
201                 } else {
202                         mfilter.bv_len = strlen( mfilter.bv_val );
203                 }
204
205 #ifdef NEW_LOGGING
206                 LDAP_LOG( BACK_LDAP, DETAIL1, 
207                         "[rw] searchFilter: \"%s\" -> \"%s\"\n",
208                         filterstr->bv_val, mfilter.bv_val, 0 );
209 #else /* !NEW_LOGGING */
210                 Debug( LDAP_DEBUG_ARGS,
211                                 "rw> searchFilter: \"%s\" -> \"%s\"\n%s",
212                                 filterstr->bv_val, mfilter.bv_val, "" );
213 #endif /* !NEW_LOGGING */
214                 break;
215                 
216         case REWRITE_REGEXEC_UNWILLING:
217                 send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
218                                 NULL, "Operation not allowed", NULL, NULL );
219                 rc = -1;
220                 goto finish;
221
222         case REWRITE_REGEXEC_ERR:
223                 send_ldap_result( conn, op, LDAP_OTHER,
224                                 NULL, "Rewrite error", NULL, NULL );
225                 rc = -1;
226                 goto finish;
227         }
228 #else /* !ENABLE_REWRITE */
229         ldap_back_dn_massage( li, base, &mbase, 0, 1 );
230 #endif /* !ENABLE_REWRITE */
231
232         mapped_filter = ldap_back_map_filter(&li->at_map, &li->oc_map,
233 #ifdef ENABLE_REWRITE
234                         &mfilter,
235 #else /* !ENABLE_REWRITE */
236                         filterstr,
237 #endif /* !ENABLE_REWRITE */
238                         0);
239         if ( mapped_filter == NULL ) {
240 #ifdef ENABLE_REWRITE
241                 mapped_filter = mfilter.bv_val;
242 #else /* !ENABLE_REWRITE */
243                 mapped_filter = filterstr->bv_val;
244 #endif /* !ENABLE_REWRITE */
245         }
246
247 #ifdef ENABLE_REWRITE
248         if ( mfilter.bv_val != filterstr->bv_val ) {
249                 free( mfilter.bv_val );
250         }
251 #endif /* ENABLE_REWRITE */
252
253         mapped_attrs = ldap_back_map_attrs(&li->at_map, attrs, 0);
254         if ( mapped_attrs == NULL && attrs) {
255                 for (count=0; attrs[count].an_name.bv_val; count++);
256                 mapped_attrs = ch_malloc( (count+1) * sizeof(char *));
257                 for (count=0; attrs[count].an_name.bv_val; count++) {
258                         mapped_attrs[count] = attrs[count].an_name.bv_val;
259                 }
260                 mapped_attrs[count] = NULL;
261         }
262
263         msgid = ldap_search(lc->ld, mbase.bv_val, scope, mapped_filter,
264                         mapped_attrs, attrsonly);
265         if ( msgid == -1 ) {
266 fail:;
267                 rc = ldap_back_op_result(lc, op);
268                 goto finish;
269         }
270
271         /* We pull apart the ber result, stuff it into a slapd entry, and
272          * let send_search_entry stuff it back into ber format. Slow & ugly,
273          * but this is necessary for version matching, and for ACL processing.
274          */
275         
276         for (   count=0, rc=0;
277                         rc != -1;
278                         rc = ldap_result(lc->ld, msgid, 0, &tv, &res))
279         {
280                 /* check for abandon */
281                 if (op->o_abandon) {
282                         ldap_abandon(lc->ld, msgid);
283                         rc = 0;
284                         goto finish;
285                 }
286
287                 if (rc == 0) {
288                         tv.tv_sec = 0;
289                         tv.tv_usec = 100000;
290                         ldap_pvt_thread_yield();
291
292                 } else if (rc == LDAP_RES_SEARCH_ENTRY) {
293                         e = ldap_first_entry(lc->ld,res);
294                         if ( ldap_send_entry(be, op, lc, e, attrs, attrsonly) 
295                                         == LDAP_SUCCESS ) {
296                                 count++;
297                         }
298                         ldap_msgfree(res);
299
300                 } else if ( rc == LDAP_RES_SEARCH_REFERENCE ) {
301                         char            **references = NULL;
302                         LDAPControl     **ctrls = NULL;
303                         BerVarray       refs;
304                         int             cnt;
305
306                         rc = ldap_parse_reference( lc->ld, res,
307                                         &references, &ctrls, 1 );
308
309                         if ( rc != LDAP_SUCCESS ) {
310                                 continue;
311                         }
312
313                         if ( references == NULL ) {
314                                 continue;
315                         }
316
317                         for ( cnt = 0; references[ cnt ]; cnt++ )
318                                 /* NO OP */ ;
319                                 
320                         refs = ch_calloc( cnt + 1, sizeof( struct berval ) );
321
322                         for ( cnt = 0; references[ cnt ]; cnt++ ) {
323                                 refs[ cnt ].bv_val = references[ cnt ];
324                                 refs[ cnt ].bv_len = strlen( references[ cnt ] );
325                         }
326
327                         /* ignore return value by now */
328                         ( void )send_search_reference( be, conn, op, 
329                                         NULL, refs, ctrls, &v2refs );
330
331                         /* cleanup */
332                         if ( references ) {
333                                 ldap_value_free( references );
334                                 ch_free( refs );
335                         }
336
337                         if ( ctrls ) {
338                                 ldap_controls_free( ctrls );
339                         }
340
341                 } else {
342                         sres = ldap_result2error(lc->ld, res, 1);
343                         sres = ldap_back_map_result(sres);
344                         ldap_get_option(lc->ld, LDAP_OPT_ERROR_STRING, &err);
345                         ldap_get_option(lc->ld, LDAP_OPT_MATCHED_DN, &match);
346                         rc = 0;
347                         break;
348                 }
349         }
350
351         if (rc == -1)
352                 goto fail;
353
354 #ifdef ENABLE_REWRITE
355         /*
356          * Rewrite the matched portion of the search base, if required
357          */
358         if ( match != NULL ) {
359                 switch ( rewrite_session( li->rwinfo, "matchedDn",
360                                 match, conn, &mmatch ) ) {
361                 case REWRITE_REGEXEC_OK:
362                         if ( mmatch == NULL ) {
363                                 mmatch = ( char * )match;
364                         }
365 #ifdef NEW_LOGGING
366                         LDAP_LOG( BACK_LDAP, DETAIL1, 
367                                 "[rw]  matchedDn:" " \"%s\" -> \"%s\"\n", match, mmatch, 0 );
368 #else /* !NEW_LOGGING */
369                         Debug( LDAP_DEBUG_ARGS, "rw> matchedDn:"
370                                         " \"%s\" -> \"%s\"\n%s",
371                                         match, mmatch, "" );
372 #endif /* !NEW_LOGGING */
373                         break;
374                         
375                 case REWRITE_REGEXEC_UNWILLING:
376                         
377                 case REWRITE_REGEXEC_ERR:
378                         /* FIXME: no error, but no matched ... */
379                         mmatch = NULL;
380                         break;
381                 }
382         }
383
384         if ( v2refs ) {
385                 sres = LDAP_REFERRAL;
386         }
387
388         send_search_result( conn, op, sres,
389                 mmatch, err, v2refs, NULL, count );
390
391 #else /* !ENABLE_REWRITE */
392         if ( v2refs ) {
393                 sres = LDAP_REFERRAL;
394         }
395         send_search_result( conn, op, sres,
396                 match, err, v2refs, NULL, count );
397 #endif /* !ENABLE_REWRITE */
398
399 finish:;
400         if ( match ) {
401 #ifdef ENABLE_REWRITE
402                 if ( mmatch != match ) {
403                         free( mmatch );
404                 }
405 #endif /* ENABLE_REWRITE */
406                 LDAP_FREE(match);
407         }
408         if ( err ) {
409                 LDAP_FREE( err );
410         }
411         if ( mapped_attrs ) {
412                 ch_free( mapped_attrs );
413         }
414         if ( mapped_filter != filterstr->bv_val ) {
415                 ch_free( mapped_filter );
416         }
417         if ( mbase.bv_val != base->bv_val ) {
418                 free( mbase.bv_val );
419         }
420         
421         return rc;
422 }
423
424 static int
425 ldap_send_entry(
426         Backend *be,
427         Operation *op,
428         struct ldapconn *lc,
429         LDAPMessage *e,
430         AttributeName *attrs,
431         int attrsonly
432 )
433 {
434         struct ldapinfo *li = (struct ldapinfo *) be->be_private;
435         struct berval a, mapped;
436         Entry ent;
437         BerElement ber = *e->lm_ber;
438         Attribute *attr, **attrp;
439         struct berval dummy = { 0, NULL };
440         struct berval *bv, bdn;
441         const char *text;
442
443         if ( ber_scanf( &ber, "{m{", &bdn ) == LBER_ERROR ) {
444                 return LDAP_DECODING_ERROR;
445         }
446 #ifdef ENABLE_REWRITE
447
448         /*
449          * Rewrite the dn of the result, if needed
450          */
451         switch ( rewrite_session( li->rwinfo, "searchResult",
452                                 bdn.bv_val, lc->conn, &ent.e_name.bv_val ) ) {
453         case REWRITE_REGEXEC_OK:
454                 if ( ent.e_name.bv_val == NULL ) {
455                         ent.e_name = bdn;
456                 } else {
457 #ifdef NEW_LOGGING
458                         LDAP_LOG( BACK_LDAP, DETAIL1, 
459                                 "[rw] searchResult: \"%s\"" " -> \"%s\"\n", 
460                                 bdn.bv_val, ent.e_dn, 0 );
461 #else /* !NEW_LOGGING */
462                         Debug( LDAP_DEBUG_ARGS, "rw> searchResult: \"%s\""
463                                         " -> \"%s\"\n%s", bdn.bv_val, ent.e_dn, "" );
464 #endif /* !NEW_LOGGING */
465                         ent.e_name.bv_len = strlen( ent.e_name.bv_val );
466                 }
467                 break;
468                 
469         case REWRITE_REGEXEC_ERR:
470         case REWRITE_REGEXEC_UNWILLING:
471                 return LDAP_OTHER;
472         }
473 #else /* !ENABLE_REWRITE */
474         ldap_back_dn_massage( li, &bdn, &ent.e_name, 0, 0 );
475 #endif /* !ENABLE_REWRITE */
476
477         /*
478          * Note: this may fail if the target host(s) schema differs
479          * from the one known to the meta, and a DN with unknown
480          * attributes is returned.
481          * 
482          * FIXME: should we log anything, or delegate to dnNormalize2?
483          */
484         if ( dnNormalize2( NULL, &ent.e_name, &ent.e_nname ) != LDAP_SUCCESS ) {
485                 return LDAP_INVALID_DN_SYNTAX;
486         }
487         
488         ent.e_id = 0;
489         ent.e_attrs = 0;
490         ent.e_private = 0;
491         attrp = &ent.e_attrs;
492
493         while ( ber_scanf( &ber, "{m", &a ) != LBER_ERROR ) {
494                 ldap_back_map(&li->at_map, &a, &mapped, 1);
495                 if (mapped.bv_val == NULL)
496                         continue;
497                 attr = (Attribute *)ch_malloc( sizeof(Attribute) );
498                 if (attr == NULL)
499                         continue;
500                 attr->a_flags = 0;
501                 attr->a_next = 0;
502                 attr->a_desc = NULL;
503                 if (slap_bv2ad(&mapped, &attr->a_desc, &text) != LDAP_SUCCESS) {
504                         if (slap_bv2undef_ad(&mapped, &attr->a_desc, &text) 
505                                         != LDAP_SUCCESS) {
506 #ifdef NEW_LOGGING
507                                 LDAP_LOG( BACK_LDAP, DETAIL1, 
508                                         "slap_bv2undef_ad(%s):  %s\n", mapped.bv_val, text, 0 );
509 #else /* !NEW_LOGGING */
510                                 Debug( LDAP_DEBUG_ANY, 
511                                                 "slap_bv2undef_ad(%s):  "
512                                                 "%s\n%s", mapped.bv_val, text, "" );
513 #endif /* !NEW_LOGGING */
514                                 ch_free(attr);
515                                 continue;
516                         }
517                 }
518
519                 /* no subschemaSubentry */
520                 if ( attr->a_desc == slap_schema.si_ad_subschemaSubentry ) {
521                         ch_free(attr);
522                         continue;
523                 }
524                 
525                 if ( ber_scanf( &ber, "[W]", &attr->a_vals ) == LBER_ERROR
526                                 || attr->a_vals == NULL ) {
527                         /*
528                          * Note: attr->a_vals can be null when using
529                          * values result filter
530                          */
531                         attr->a_vals = &dummy;
532
533                 } else if ( attr->a_desc == slap_schema.si_ad_objectClass
534                                 || attr->a_desc == slap_schema.si_ad_structuralObjectClass ) {
535                         int i, last;
536
537                         for ( last = 0; attr->a_vals[last].bv_val; last++ ) ;
538                         for ( i = 0, bv = attr->a_vals; bv->bv_val; bv++, i++ ) {
539                                 ldap_back_map(&li->oc_map, bv, &mapped, 1);
540                                 if (mapped.bv_val == NULL) {
541                                         LBER_FREE(bv->bv_val);
542                                         bv->bv_val = NULL;
543                                         if (--last < 0)
544                                                 break;
545                                         *bv = attr->a_vals[last];
546                                         attr->a_vals[last].bv_val = NULL;
547                                         i--;
548                                 } else if ( mapped.bv_val != bv->bv_val ) {
549                                         /*
550                                          * FIXME: after LBER_FREEing
551                                          * the value is replaced by
552                                          * ch_alloc'ed memory
553                                          */
554                                         LBER_FREE(bv->bv_val);
555                                         ber_dupbv( bv, &mapped );
556                                 }
557                         }
558
559                 /*
560                  * It is necessary to try to rewrite attributes with
561                  * dn syntax because they might be used in ACLs as
562                  * members of groups; since ACLs are applied to the
563                  * rewritten stuff, no dn-based subject clause could
564                  * be used at the ldap backend side (see
565                  * http://www.OpenLDAP.org/faq/data/cache/452.html)
566                  * The problem can be overcome by moving the dn-based
567                  * ACLs to the target directory server, and letting
568                  * everything pass thru the ldap backend.
569                  */
570                 } else if ( strcmp( attr->a_desc->ad_type->sat_syntax->ssyn_oid,
571                                         SLAPD_DN_SYNTAX ) == 0 ) {
572                         int i;
573                         for ( i = 0, bv = attr->a_vals; bv->bv_val; bv++, i++ ) {
574                                 struct berval newval;
575                                 
576 #ifdef ENABLE_REWRITE
577                                 switch ( rewrite_session( li->rwinfo,
578                                                         "searchResult",
579                                                         bv->bv_val,
580                                                         lc->conn, 
581                                                         &newval.bv_val )) {
582                                 case REWRITE_REGEXEC_OK:
583                                         /* left as is */
584                                         if ( newval.bv_val == NULL ) {
585                                                 break;
586                                         }
587                                         newval.bv_len = strlen( newval.bv_val );
588 #ifdef NEW_LOGGING
589                                         LDAP_LOG( BACK_LDAP, DETAIL1, 
590                                                 "[rw] searchResult on attr=%s: \"%s\" -> \"%s\"\n",
591                                                 attr->a_desc->ad_type->sat_cname.bv_val,
592                                                 bv->bv_val, newval.bv_val );
593 #else /* !NEW_LOGGING */
594                                         Debug( LDAP_DEBUG_ARGS,
595                 "rw> searchResult on attr=%s: \"%s\" -> \"%s\"\n",
596                                                 attr->a_desc->ad_type->sat_cname.bv_val,
597                                                 bv->bv_val, newval.bv_val );
598 #endif /* !NEW_LOGGING */
599                                         free( bv->bv_val );
600                                         *bv = newval;
601                                         break;
602                                         
603                                 case REWRITE_REGEXEC_UNWILLING:
604                                         
605                                 case REWRITE_REGEXEC_ERR:
606                                         /*
607                                          * FIXME: better give up,
608                                          * skip the attribute
609                                          * or leave it untouched?
610                                          */
611                                         break;
612                                 }
613 #else /* !ENABLE_REWRITE */
614                                 ldap_back_dn_massage( li, bv, &newval, 0, 0 );
615                                 *bv = newval;
616 #endif /* !ENABLE_REWRITE */
617                         }
618                 }
619
620                 *attrp = attr;
621                 attrp = &attr->a_next;
622         }
623         send_search_entry( be, lc->conn, op, &ent, attrs, attrsonly, NULL );
624         while (ent.e_attrs) {
625                 attr = ent.e_attrs;
626                 ent.e_attrs = attr->a_next;
627                 if (attr->a_vals != &dummy)
628                         ber_bvarray_free(attr->a_vals);
629                 ch_free(attr);
630         }
631         
632         if ( ent.e_dn && ( ent.e_dn != bdn.bv_val ) )
633                 free( ent.e_dn );
634         if ( ent.e_ndn )
635                 free( ent.e_ndn );
636
637         return LDAP_SUCCESS;
638 }