2001-10-05 09:19:58 +08:00
|
|
|
/* extended.c - bdb backend extended routines */
|
2000-09-28 06:28:59 +08:00
|
|
|
/* $OpenLDAP$ */
|
|
|
|
/*
|
|
|
|
* Copyright 1998-2000 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"
|
|
|
|
|
2001-12-24 14:36:44 +08:00
|
|
|
static struct exop {
|
2000-09-28 06:28:59 +08:00
|
|
|
char *oid;
|
2001-12-26 16:17:44 +08:00
|
|
|
BI_op_extended *extended;
|
2000-09-28 06:28:59 +08:00
|
|
|
} exop_table[] = {
|
|
|
|
{ LDAP_EXOP_X_MODIFY_PASSWD, bdb_exop_passwd },
|
|
|
|
{ NULL, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
int
|
|
|
|
bdb_extended(
|
|
|
|
Backend *be,
|
|
|
|
Connection *conn,
|
|
|
|
Operation *op,
|
|
|
|
const char *reqoid,
|
|
|
|
struct berval *reqdata,
|
|
|
|
char **rspoid,
|
|
|
|
struct berval **rspdata,
|
|
|
|
LDAPControl *** rspctrls,
|
|
|
|
const char** text,
|
2002-01-02 19:00:36 +08:00
|
|
|
BVarray *refs
|
2000-09-28 06:28:59 +08:00
|
|
|
)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for( i=0; exop_table[i].oid != NULL; i++ ) {
|
|
|
|
if( strcmp( exop_table[i].oid, reqoid ) == 0 ) {
|
|
|
|
return (exop_table[i].extended)(
|
|
|
|
be, conn, op,
|
|
|
|
reqoid, reqdata,
|
|
|
|
rspoid, rspdata, rspctrls,
|
|
|
|
text, refs );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
*text = "not supported within naming context";
|
|
|
|
return LDAP_OPERATIONS_ERROR;
|
2001-10-05 09:19:58 +08:00
|
|
|
}
|
|
|
|
|