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