]> git.sur5r.net Git - openldap/blob - servers/slapd/search.c
notices
[openldap] / servers / slapd / search.c
1 /* $OpenLDAP$ */
2 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
3  *
4  * Copyright 1998-2003 The OpenLDAP Foundation.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted only as authorized by the OpenLDAP
9  * Public License.
10  *
11  * A copy of this license is available in the file LICENSE in the
12  * top-level directory of the distribution or, alternatively, at
13  * <http://www.OpenLDAP.org/license.html>.
14  */
15 /* Portions Copyright (c) 1995 Regents of the University of Michigan.
16  * All rights reserved.
17  *
18  * Redistribution and use in source and binary forms are permitted
19  * provided that this notice is preserved and that due credit is given
20  * to the University of Michigan at Ann Arbor. The name of the University
21  * may not be used to endorse or promote products derived from this
22  * software without specific prior written permission. This software
23  * is provided ``as is'' without express or implied warranty.
24  */
25
26 #include "portable.h"
27
28 #include <stdio.h>
29
30 #include <ac/string.h>
31 #include <ac/socket.h>
32
33 #include "ldap_pvt.h"
34 #include "lutil.h"
35 #include "slap.h"
36
37 #ifdef LDAP_SLAPI
38 #include "slapi.h"
39 static char **anlist2charray( Operation *op, AttributeName *an );
40 static void initSearchPlugin( Operation *op, char **attrs, int managedsait );
41 static int doPreSearchPluginFNs( Operation *op );
42 static int doSearchRewriteFNs( Operation *op );
43 static void doPostSearchPluginFNs( Operation *op );
44 #endif /* LDAPI_SLAPI */
45
46 int
47 do_search(
48     Operation   *op,    /* info about the op to which we're responding */
49     SlapReply   *rs     /* all the response data we'll send */
50 ) {
51         struct berval base = { 0, NULL };
52         ber_len_t       siz, off, i;
53         int                     manageDSAit;
54         int                     be_manageDSAit;
55 #ifdef LDAP_SLAPI
56         char            **attrs = NULL;
57 #endif
58
59 #ifdef NEW_LOGGING
60         LDAP_LOG( OPERATION, ENTRY, "do_search: conn %d\n", op->o_connid, 0, 0 );
61 #else
62         Debug( LDAP_DEBUG_TRACE, "do_search\n", 0, 0, 0 );
63 #endif
64
65         /*
66          * Parse the search request.  It looks like this:
67          *
68          *      SearchRequest := [APPLICATION 3] SEQUENCE {
69          *              baseObject      DistinguishedName,
70          *              scope           ENUMERATED {
71          *                      baseObject      (0),
72          *                      singleLevel     (1),
73          *                      wholeSubtree    (2)
74          *              },
75          *              derefAliases    ENUMERATED {
76          *                      neverDerefaliases       (0),
77          *                      derefInSearching        (1),
78          *                      derefFindingBaseObj     (2),
79          *                      alwaysDerefAliases      (3)
80          *              },
81          *              sizelimit       INTEGER (0 .. 65535),
82          *              timelimit       INTEGER (0 .. 65535),
83          *              attrsOnly       BOOLEAN,
84          *              filter          Filter,
85          *              attributes      SEQUENCE OF AttributeType
86          *      }
87          */
88
89         /* baseObject, scope, derefAliases, sizelimit, timelimit, attrsOnly */
90         if ( ber_scanf( op->o_ber, "{miiiib" /*}*/,
91                 &base, &op->ors_scope, &op->ors_deref, &op->ors_slimit,
92             &op->ors_tlimit, &op->ors_attrsonly ) == LBER_ERROR )
93         {
94                 send_ldap_discon( op, rs, LDAP_PROTOCOL_ERROR, "decoding error" );
95                 rs->sr_err = SLAPD_DISCONNECT;
96                 goto return_results;
97         }
98
99         switch( op->ors_scope ) {
100         case LDAP_SCOPE_BASE:
101         case LDAP_SCOPE_ONELEVEL:
102         case LDAP_SCOPE_SUBTREE:
103                 break;
104         default:
105                 send_ldap_error( op, rs, LDAP_PROTOCOL_ERROR, "invalid scope" );
106                 goto return_results;
107         }
108
109         switch( op->ors_deref ) {
110         case LDAP_DEREF_NEVER:
111         case LDAP_DEREF_FINDING:
112         case LDAP_DEREF_SEARCHING:
113         case LDAP_DEREF_ALWAYS:
114                 break;
115         default:
116                 send_ldap_error( op, rs, LDAP_PROTOCOL_ERROR, "invalid deref" );
117                 goto return_results;
118         }
119
120         rs->sr_err = dnPrettyNormal( NULL, &base, &op->o_req_dn, &op->o_req_ndn, op->o_tmpmemctx );
121         if( rs->sr_err != LDAP_SUCCESS ) {
122 #ifdef NEW_LOGGING
123                 LDAP_LOG( OPERATION, ERR, 
124                         "do_search: conn %d  invalid dn (%s)\n",
125                         op->o_connid, base.bv_val, 0 );
126 #else
127                 Debug( LDAP_DEBUG_ANY,
128                         "do_search: invalid dn (%s)\n", base.bv_val, 0, 0 );
129 #endif
130                 send_ldap_error( op, rs, LDAP_INVALID_DN_SYNTAX, "invalid DN" );
131                 goto return_results;
132         }
133
134 #ifdef NEW_LOGGING
135         LDAP_LOG( OPERATION, ARGS, "SRCH \"%s\" %d %d",
136                 base.bv_val, op->ors_scope, op->ors_deref );
137         LDAP_LOG( OPERATION, ARGS, "    %d %d %d\n",
138                 op->ors_slimit, op->ors_tlimit, op->ors_attrsonly);
139 #else
140         Debug( LDAP_DEBUG_ARGS, "SRCH \"%s\" %d %d",
141                 base.bv_val, op->ors_scope, op->ors_deref );
142         Debug( LDAP_DEBUG_ARGS, "    %d %d %d\n",
143                 op->ors_slimit, op->ors_tlimit, op->ors_attrsonly);
144 #endif
145
146         /* filter - returns a "normalized" version */
147         rs->sr_err = get_filter( op, op->o_ber, &op->ors_filter, &rs->sr_text );
148         if( rs->sr_err != LDAP_SUCCESS ) {
149                 if( rs->sr_err == SLAPD_DISCONNECT ) {
150                         rs->sr_err = LDAP_PROTOCOL_ERROR;
151                         send_ldap_disconnect( op, rs );
152                 } else {
153                         send_ldap_result( op, rs );
154                 }
155                 goto return_results;
156         }
157         filter2bv_x( op, op->ors_filter, &op->ors_filterstr );
158
159 #ifdef NEW_LOGGING
160         LDAP_LOG( OPERATION, ARGS, 
161                 "do_search: conn %d     filter: %s\n", 
162                 op->o_connid, op->ors_filterstr.bv_len ? op->ors_filterstr.bv_val : "empty", 0 );
163 #else
164         Debug( LDAP_DEBUG_ARGS, "    filter: %s\n",
165                 op->ors_filterstr.bv_len ? op->ors_filterstr.bv_val : "empty", 0, 0 );
166 #endif
167
168         /* attributes */
169         siz = sizeof(AttributeName);
170         off = offsetof(AttributeName,an_name);
171         if ( ber_scanf( op->o_ber, "{M}}", &op->ors_attrs, &siz, off ) == LBER_ERROR ) {
172                 send_ldap_discon( op, rs, LDAP_PROTOCOL_ERROR, "decoding attrs error" );
173                 rs->sr_err = SLAPD_DISCONNECT;
174                 goto return_results;
175         }
176         for ( i=0; i<siz; i++ ) {
177                 const char *dummy;      /* ignore msgs from bv2ad */
178                 op->ors_attrs[i].an_desc = NULL;
179                 op->ors_attrs[i].an_oc = NULL;
180                 slap_bv2ad(&op->ors_attrs[i].an_name, &op->ors_attrs[i].an_desc, &dummy);
181         }
182
183         if( get_ctrls( op, rs, 1 ) != LDAP_SUCCESS ) {
184 #ifdef NEW_LOGGING
185                 LDAP_LOG( OPERATION, INFO, 
186                         "do_search: conn %d  get_ctrls failed (%d)\n",
187                         op->o_connid, rs->sr_err, 0 );
188 #else
189                 Debug( LDAP_DEBUG_ANY, "do_search: get_ctrls failed\n", 0, 0, 0 );
190 #endif
191
192                 goto return_results;
193         }
194
195 #ifdef NEW_LOGGING
196         LDAP_LOG( OPERATION, ARGS, 
197                 "do_search: conn %d     attrs:", op->o_connid, 0, 0 );
198 #else
199         Debug( LDAP_DEBUG_ARGS, "    attrs:", 0, 0, 0 );
200 #endif
201
202         if ( siz != 0 ) {
203                 for ( i = 0; i<siz; i++ ) {
204 #ifdef NEW_LOGGING
205                         LDAP_LOG( OPERATION, ARGS, 
206                                 "do_search: %s", op->ors_attrs[i].an_name.bv_val, 0, 0 );
207 #else
208                         Debug( LDAP_DEBUG_ARGS, " %s", op->ors_attrs[i].an_name.bv_val, 0, 0 );
209 #endif
210                 }
211         }
212
213 #ifdef NEW_LOGGING
214         LDAP_LOG( OPERATION, ARGS, "\n" , 0, 0, 0 );
215 #else
216         Debug( LDAP_DEBUG_ARGS, "\n", 0, 0, 0 );
217 #endif
218
219         if ( StatslogTest( LDAP_DEBUG_STATS ) ) {
220                 char abuf[BUFSIZ/2], *ptr = abuf;
221                 int len = 0, alen;
222
223                 sprintf(abuf, "scope=%d deref=%d", op->ors_scope, op->ors_deref);
224                 Statslog( LDAP_DEBUG_STATS,
225                         "conn=%lu op=%lu SRCH base=\"%s\" %s filter=\"%s\"\n",
226                         op->o_connid, op->o_opid, op->o_req_dn.bv_val, abuf,
227                         op->ors_filterstr.bv_val );
228
229                 for ( i = 0; i<siz; i++ ) {
230                         alen = op->ors_attrs[i].an_name.bv_len;
231                         if (alen >= sizeof(abuf)) {
232                                 alen = sizeof(abuf)-1;
233                         }
234                         if (len && (len + 1 + alen >= sizeof(abuf))) {
235                                 Statslog( LDAP_DEBUG_STATS, "conn=%lu op=%lu SRCH attr=%s\n",
236                                     op->o_connid, op->o_opid, abuf, 0, 0 );
237                                 len = 0;
238                                 ptr = abuf;
239                         }
240                         if (len) {
241                                 *ptr++ = ' ';
242                                 len++;
243                         }
244                         ptr = lutil_strncopy(ptr, op->ors_attrs[i].an_name.bv_val, alen);
245                         len += alen;
246                         *ptr = '\0';
247                 }
248                 if (len) {
249                         Statslog( LDAP_DEBUG_STATS, "conn=%lu op=%lu SRCH attr=%s\n",
250                                 op->o_connid, op->o_opid, abuf, 0, 0 );
251                 }
252         }
253
254         manageDSAit = get_manageDSAit( op );
255
256         /* fake while loop to allow breaking out */
257         while ( op->ors_scope == LDAP_SCOPE_BASE ) {
258                 Entry *entry = NULL;
259
260                 if ( op->o_req_ndn.bv_len == 0 ) {
261 #ifdef LDAP_CONNECTIONLESS
262                         /* Ignore LDAPv2 CLDAP Root DSE queries */
263                         if (op->o_protocol == LDAP_VERSION2 && op->o_conn->c_is_udp) {
264                                 goto return_results;
265                         }
266 #endif
267                         /* check restrictions */
268                         if( backend_check_restrictions( op, rs, NULL ) != LDAP_SUCCESS ) {
269                                 send_ldap_result( op, rs );
270                                 goto return_results;
271                         }
272
273 #ifdef LDAP_SLAPI
274                         if ( op->o_pb ) {
275                                 attrs = anlist2charray( op, op->ors_attrs );
276                                 initSearchPlugin( op, attrs, manageDSAit );
277                                 rs->sr_err = doPreSearchPluginFNs( op );
278                                 if ( rs->sr_err ) break;
279                                 doSearchRewriteFNs( op );
280                         }
281 #endif /* LDAP_SLAPI */
282                         rs->sr_err = root_dse_info( op->o_conn, &entry, &rs->sr_text );
283
284                 } else if ( bvmatch( &op->o_req_ndn, &global_schemandn ) ) {
285                         /* check restrictions */
286                         if( backend_check_restrictions( op, rs, NULL ) != LDAP_SUCCESS ) {
287                                 send_ldap_result( op, rs );
288                                 goto return_results;
289                         }
290
291 #ifdef LDAP_SLAPI
292                         if ( op->o_pb ) {
293                                 attrs = anlist2charray( op, op->ors_attrs );
294                                 initSearchPlugin( op, attrs, manageDSAit );
295                                 rs->sr_err = doPreSearchPluginFNs( op );
296                                 if ( rs->sr_err ) break;
297                                 doSearchRewriteFNs( op );
298                         }
299 #endif /* LDAP_SLAPI */
300                         rs->sr_err = schema_info( &entry, &rs->sr_text );
301                 }
302
303                 if( rs->sr_err != LDAP_SUCCESS ) {
304                         send_ldap_result( op, rs );
305 #ifdef LDAP_SLAPI
306                         if ( op->o_pb ) doPostSearchPluginFNs( op );
307 #endif /* LDAP_SLAPI */
308                         goto return_results;
309
310                 } else if ( entry != NULL ) {
311                         rs->sr_err = test_filter( op, entry, op->ors_filter );
312
313                         if( rs->sr_err == LDAP_COMPARE_TRUE ) {
314                                 rs->sr_entry = entry;
315                                 rs->sr_attrs = op->ors_attrs;
316                                 send_search_entry( op, rs );
317                                 rs->sr_entry = NULL;
318                         }
319                         entry_free( entry );
320
321                         rs->sr_err = LDAP_SUCCESS;
322                         send_ldap_result( op, rs );
323 #ifdef LDAP_SLAPI
324                         if ( op->o_pb ) doPostSearchPluginFNs( op );
325 #endif /* LDAP_SLAPI */
326                         goto return_results;
327                 }
328                 break;
329         }
330
331         if( !op->o_req_ndn.bv_len && default_search_nbase.bv_len ) {
332                 sl_free( op->o_req_dn.bv_val, op->o_tmpmemctx );
333                 sl_free( op->o_req_ndn.bv_val, op->o_tmpmemctx );
334
335                 ber_dupbv_x( &op->o_req_dn, &default_search_base, op->o_tmpmemctx );
336                 ber_dupbv_x( &op->o_req_ndn, &default_search_nbase, op->o_tmpmemctx );
337         }
338
339         /*
340          * We could be serving multiple database backends.  Select the
341          * appropriate one, or send a referral to our "referral server"
342          * if we don't hold it.
343          */
344
345         /* Sync control overrides manageDSAit */
346
347         if ( manageDSAit != SLAP_NO_CONTROL ) {
348                 if ( op->o_sync_mode & SLAP_SYNC_REFRESH ) {
349                         be_manageDSAit = SLAP_NO_CONTROL;
350                 } else {
351                         be_manageDSAit = manageDSAit;
352                 }
353         } else {
354                 be_manageDSAit = manageDSAit;
355         }
356
357         if ( (op->o_bd = select_backend( &op->o_req_ndn, be_manageDSAit, 1 )) == NULL ) {
358                 rs->sr_ref = referral_rewrite( default_referral,
359                         NULL, &op->o_req_dn, op->ors_scope );
360
361                 if (!rs->sr_ref) rs->sr_ref = default_referral;
362                 rs->sr_err = LDAP_REFERRAL;
363                 send_ldap_result( op, rs );
364
365                 if (rs->sr_ref != default_referral)
366                 ber_bvarray_free( rs->sr_ref );
367                 rs->sr_ref = NULL;
368                 goto return_results;
369         }
370
371         /* check restrictions */
372         if( backend_check_restrictions( op, rs, NULL ) != LDAP_SUCCESS ) {
373                 send_ldap_result( op, rs );
374                 goto return_results;
375         }
376
377         /* check for referrals */
378         if( backend_check_referrals( op, rs ) != LDAP_SUCCESS ) {
379                 goto return_results;
380         }
381
382 #ifdef LDAP_SLAPI
383         if ( op->o_pb ) {
384                 attrs = anlist2charray( op, op->ors_attrs );
385                 initSearchPlugin( op, attrs, manageDSAit );
386                 rs->sr_err = doPreSearchPluginFNs( op );
387                 if ( rs->sr_err != LDAP_SUCCESS ) {
388                         goto return_results;
389                 }
390
391                 doSearchRewriteFNs( op );
392         }
393 #endif /* LDAP_SLAPI */
394
395         /* actually do the search and send the result(s) */
396         if ( op->o_bd->be_search ) {
397                 (op->o_bd->be_search)( op, rs );
398         } else {
399                 send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
400                         "operation not supported within namingContext" );
401         }
402
403 #ifdef LDAP_SLAPI
404         if ( op->o_pb ) doPostSearchPluginFNs( op );
405 #endif /* LDAP_SLAPI */
406
407 return_results:;
408
409         if ( ( op->o_sync_mode & SLAP_SYNC_PERSIST ) )
410                 return rs->sr_err;
411
412         if ( ( op->o_sync_slog_size != -1 ) )
413                 return rs->sr_err;
414
415         if( op->o_req_dn.bv_val != NULL) sl_free( op->o_req_dn.bv_val, op->o_tmpmemctx );
416         if( op->o_req_ndn.bv_val != NULL) sl_free( op->o_req_ndn.bv_val, op->o_tmpmemctx );
417
418         if( op->ors_filterstr.bv_val != NULL) op->o_tmpfree( op->ors_filterstr.bv_val, op->o_tmpmemctx );
419         if( op->ors_filter != NULL) filter_free_x( op, op->ors_filter );
420         if( op->ors_attrs != NULL ) op->o_tmpfree( op->ors_attrs, op->o_tmpmemctx );
421 #ifdef LDAP_SLAPI
422         if( attrs != NULL) op->o_tmpfree( attrs, op->o_tmpmemctx );
423 #endif /* LDAP_SLAPI */
424
425         return rs->sr_err;
426 }
427
428 #ifdef LDAP_SLAPI
429
430 static char **anlist2charray( Operation *op, AttributeName *an )
431 {
432         char **attrs;
433         int i;
434
435         if ( an != NULL ) {
436                 for ( i = 0; an[i].an_name.bv_val != NULL; i++ )
437                         ;
438                 attrs = (char **)op->o_tmpalloc( (i + 1) * sizeof(char *), op->o_tmpmemctx );
439                 for ( i = 0; an[i].an_name.bv_val != NULL; i++ ) {
440                         attrs[i] = an[i].an_name.bv_val;
441                 }
442                 attrs[i] = NULL;
443         } else {
444                 attrs = NULL;
445         }
446
447         return attrs;
448 }
449
450 static void initSearchPlugin( Operation *op,
451         char **attrs, int managedsait )
452 {
453         slapi_x_pblock_set_operation( op->o_pb, op );
454         slapi_pblock_set( op->o_pb, SLAPI_SEARCH_TARGET, (void *)op->o_req_dn.bv_val );
455         slapi_pblock_set( op->o_pb, SLAPI_SEARCH_SCOPE, (void *)op->ors_scope );
456         slapi_pblock_set( op->o_pb, SLAPI_SEARCH_DEREF, (void *)op->ors_deref );
457         slapi_pblock_set( op->o_pb, SLAPI_SEARCH_SIZELIMIT, (void *)op->ors_slimit );
458         slapi_pblock_set( op->o_pb, SLAPI_SEARCH_TIMELIMIT, (void *)op->ors_tlimit );
459         slapi_pblock_set( op->o_pb, SLAPI_SEARCH_FILTER, (void *)op->ors_filter );
460         slapi_pblock_set( op->o_pb, SLAPI_SEARCH_STRFILTER, (void *)op->ors_filterstr.bv_val );
461         slapi_pblock_set( op->o_pb, SLAPI_SEARCH_ATTRS, (void *)attrs );
462         slapi_pblock_set( op->o_pb, SLAPI_SEARCH_ATTRSONLY, (void *)op->ors_attrsonly );
463         slapi_pblock_set( op->o_pb, SLAPI_MANAGEDSAIT, (void *)managedsait );
464 }
465
466 static int doPreSearchPluginFNs( Operation *op )
467 {
468         int rc;
469
470         rc = doPluginFNs( op->o_bd, SLAPI_PLUGIN_PRE_SEARCH_FN, op->o_pb );
471         if ( rc < 0 ) {
472                 /*
473                  * A preoperation plugin failure will abort the
474                  * entire operation.
475                  */
476 #ifdef NEW_LOGGING
477                 LDAP_LOG( OPERATION, INFO, "doPreSearchPluginFNs: search preoperation plugin "
478                                 "returned %d\n", rc, 0, 0 );
479 #else
480                 Debug(LDAP_DEBUG_TRACE, "doPreSearchPluginFNs: search preoperation plugin "
481                                 "returned %d.\n", rc, 0, 0);
482 #endif
483                 if ( ( slapi_pblock_get( op->o_pb, SLAPI_RESULT_CODE, (void *)&rc ) != 0 ) ||
484                      rc == LDAP_SUCCESS ) {
485                         rc = LDAP_OTHER;
486                 }
487         } else {
488                 rc = LDAP_SUCCESS;
489         }
490
491         return rc;
492 }
493
494 static int doSearchRewriteFNs( Operation *op )
495 {
496         if ( doPluginFNs( op->o_bd, SLAPI_PLUGIN_COMPUTE_SEARCH_REWRITER_FN, op->o_pb ) == 0 ) {
497                 int rc;
498
499                 /*
500                  * The plugin can set the SLAPI_SEARCH_FILTER.
501                  * SLAPI_SEARCH_STRFILER is not normative.
502                  */
503                 slapi_pblock_get( op->o_pb, SLAPI_SEARCH_FILTER, (void *)&op->ors_filter );
504                 op->o_tmpfree( op->ors_filterstr.bv_val, op->o_tmpmemctx );
505                 filter2bv_x( op, op->ors_filter, &op->ors_filterstr );
506
507                 /*
508                  * Also permit other search parameters to be reset. One thing
509                  * this doesn't (yet) deal with is plugins that change a root
510                  * DSE search to a non-root DSE search...
511                  */
512                 slapi_pblock_get( op->o_pb, SLAPI_SEARCH_TARGET, (void **)&op->o_req_dn.bv_val );
513                 op->o_req_dn.bv_len = strlen( op->o_req_dn.bv_val );
514
515                 if( op->o_req_ndn.bv_val != NULL) {
516                         sl_free( op->o_req_ndn.bv_val, op->o_tmpmemctx );
517                 }
518                 rc = dnNormalize( 0, NULL, NULL, &op->o_req_dn, &op->o_req_ndn,
519                         op->o_tmpmemctx );
520                 if ( rc != LDAP_SUCCESS ) {
521                         return rc;
522                 }
523
524                 slapi_pblock_get( op->o_pb, SLAPI_SEARCH_SCOPE, (void **)&op->ors_scope );
525                 slapi_pblock_get( op->o_pb, SLAPI_SEARCH_DEREF, (void **)&op->ors_deref );
526
527 #ifdef NEW_LOGGING
528                 LDAP_LOG( OPERATION, ARGS, 
529                         "doSearchRewriteFNs: after compute_rewrite_search filter: %s\n", 
530                         op->ors_filterstr.bv_len ? op->ors_filterstr.bv_val : "empty", 0, 0 );
531 #else
532                 Debug( LDAP_DEBUG_ARGS, "    after compute_rewrite_search filter: %s\n",
533                         op->ors_filterstr.bv_len ? op->ors_filterstr.bv_val : "empty", 0, 0 );
534 #endif
535         }
536
537         return LDAP_SUCCESS;
538 }
539
540 static void doPostSearchPluginFNs( Operation *op )
541 {
542         if ( doPluginFNs( op->o_bd, SLAPI_PLUGIN_POST_SEARCH_FN, op->o_pb ) < 0 ) {
543 #ifdef NEW_LOGGING
544                 LDAP_LOG( OPERATION, INFO, "doPostSearchPluginFNs: search postoperation plugins "
545                                 "failed\n", 0, 0, 0 );
546 #else
547                 Debug(LDAP_DEBUG_TRACE, "doPostSearchPluginFNs: search postoperation plugins "
548                                 "failed.\n", 0, 0, 0);
549 #endif
550         }
551 }
552
553 void dummy(void)
554 {
555         /*
556          * XXX slapi_search_internal() was no getting pulled
557          * in; all manner of linker flags failed to link it.
558          * FIXME
559          */
560         slapi_search_internal( NULL, 0, NULL, NULL, NULL, 0 );
561 }
562 #endif /* LDAP_SLAPI */
563