Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / external / bsd / openldap / dist / servers / slapd / back-bdb / extended.c
bloba2b94d8e5b7e9355b430bd589c1030959d76c235
1 /* extended.c - bdb backend extended routines */
2 /* $OpenLDAP: pkg/ldap/servers/slapd/back-bdb/extended.c,v 1.18.2.3 2008/02/11 23:26:45 kurt Exp $ */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 2000-2008 The OpenLDAP Foundation.
6 * All rights reserved.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted only as authorized by the OpenLDAP
10 * Public License.
12 * A copy of this license is available in the file LICENSE in the
13 * top-level directory of the distribution or, alternatively, at
14 * <http://www.OpenLDAP.org/license.html>.
17 #include "portable.h"
19 #include <stdio.h>
20 #include <ac/string.h>
22 #include "back-bdb.h"
23 #include "lber_pvt.h"
25 static struct exop {
26 struct berval *oid;
27 BI_op_extended *extended;
28 } exop_table[] = {
29 { NULL, NULL }
32 int
33 bdb_extended( Operation *op, SlapReply *rs )
34 /* struct berval *reqoid,
35 struct berval *reqdata,
36 char **rspoid,
37 struct berval **rspdata,
38 LDAPControl *** rspctrls,
39 const char** text,
40 BerVarray *refs
41 ) */
43 int i;
45 for( i=0; exop_table[i].extended != NULL; i++ ) {
46 if( ber_bvcmp( exop_table[i].oid, &op->oq_extended.rs_reqoid ) == 0 ) {
47 return (exop_table[i].extended)( op, rs );
51 rs->sr_text = "not supported within naming context";
52 return LDAP_UNWILLING_TO_PERFORM;