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