2001-10-04 21:19:58 -04:00
|
|
|
/* extended.c - bdb backend extended routines */
|
2000-09-27 18:28:59 -04:00
|
|
|
/* $OpenLDAP$ */
|
2003-11-28 16:08:20 -05:00
|
|
|
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
|
|
|
|
*
|
2009-01-21 19:40:04 -05:00
|
|
|
* Copyright 2000-2009 The OpenLDAP Foundation.
|
2003-11-28 16:08:20 -05:00
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
|
* modification, are permitted only as authorized by the OpenLDAP
|
|
|
|
|
* Public License.
|
|
|
|
|
*
|
|
|
|
|
* A copy of this license is available in the file LICENSE in the
|
|
|
|
|
* top-level directory of the distribution or, alternatively, at
|
|
|
|
|
* <http://www.OpenLDAP.org/license.html>.
|
2000-09-27 18:28:59 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "portable.h"
|
|
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <ac/string.h>
|
|
|
|
|
|
|
|
|
|
#include "back-bdb.h"
|
2003-02-16 01:15:28 -05:00
|
|
|
#include "lber_pvt.h"
|
2000-09-27 18:28:59 -04:00
|
|
|
|
2001-12-24 01:36:44 -05:00
|
|
|
static struct exop {
|
2003-02-16 01:15:28 -05:00
|
|
|
struct berval *oid;
|
2001-12-26 03:17:44 -05:00
|
|
|
BI_op_extended *extended;
|
2000-09-27 18:28:59 -04:00
|
|
|
} exop_table[] = {
|
|
|
|
|
{ NULL, NULL }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
int
|
2003-03-30 04:03:54 -05:00
|
|
|
bdb_extended( Operation *op, SlapReply *rs )
|
|
|
|
|
/* struct berval *reqoid,
|
2000-09-27 18:28:59 -04:00
|
|
|
struct berval *reqdata,
|
|
|
|
|
char **rspoid,
|
|
|
|
|
struct berval **rspdata,
|
|
|
|
|
LDAPControl *** rspctrls,
|
|
|
|
|
const char** text,
|
2002-01-13 20:43:17 -05:00
|
|
|
BerVarray *refs
|
2003-03-30 04:03:54 -05:00
|
|
|
) */
|
2000-09-27 18:28:59 -04:00
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
|
2003-02-16 01:15:28 -05:00
|
|
|
for( i=0; exop_table[i].extended != NULL; i++ ) {
|
2003-03-30 04:03:54 -05:00
|
|
|
if( ber_bvcmp( exop_table[i].oid, &op->oq_extended.rs_reqoid ) == 0 ) {
|
|
|
|
|
return (exop_table[i].extended)( op, rs );
|
2000-09-27 18:28:59 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2003-03-30 04:03:54 -05:00
|
|
|
rs->sr_text = "not supported within naming context";
|
2002-07-31 18:49:02 -04:00
|
|
|
return LDAP_UNWILLING_TO_PERFORM;
|
2001-10-04 21:19:58 -04:00
|
|
|
}
|
|
|
|
|
|