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