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