openldap/servers/slapd/back-bdb/extended.c
Howard Chu e8c58b4e7f Major API change - (SLAP_OP_BLOCKS) All request parameters are
consolidated into the Operation structure. All reply parameters
are consolidated into the new SlapReply structure. Most operations
now have identical call signatures... Changes are not #ifdef'd,
revert to -r NO_SLAP_OP_BLOCKS if necessary to back out.
2003-03-30 09:03:54 +00:00

48 lines
995 B
C

/* extended.c - bdb backend extended routines */
/* $OpenLDAP$ */
/*
* Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#include "portable.h"
#include <stdio.h>
#include <ac/string.h>
#include "back-bdb.h"
#include "external.h"
#include "lber_pvt.h"
static struct exop {
struct berval *oid;
BI_op_extended *extended;
} exop_table[] = {
{ (struct berval *)&slap_EXOP_MODIFY_PASSWD, bdb_exop_passwd },
{ NULL, NULL }
};
int
bdb_extended( Operation *op, SlapReply *rs )
/* struct berval *reqoid,
struct berval *reqdata,
char **rspoid,
struct berval **rspdata,
LDAPControl *** rspctrls,
const char** text,
BerVarray *refs
) */
{
int i;
for( i=0; exop_table[i].extended != NULL; i++ ) {
if( ber_bvcmp( exop_table[i].oid, &op->oq_extended.rs_reqoid ) == 0 ) {
return (exop_table[i].extended)( op, rs );
}
}
rs->sr_text = "not supported within naming context";
return LDAP_UNWILLING_TO_PERFORM;
}