1999-12-08 12:37:59 +08:00
|
|
|
/* extended.c - ldbm backend extended routines */
|
|
|
|
/* $OpenLDAP$ */
|
|
|
|
/*
|
2003-01-04 04:20:47 +08:00
|
|
|
* Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
|
1999-12-08 12:37:59 +08:00
|
|
|
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "portable.h"
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include <ac/socket.h>
|
|
|
|
#include <ac/string.h>
|
|
|
|
|
|
|
|
#include "slap.h"
|
|
|
|
#include "back-ldbm.h"
|
|
|
|
#include "proto-back-ldbm.h"
|
2003-02-16 14:15:28 +08:00
|
|
|
#include "lber_pvt.h"
|
1999-12-08 12:37:59 +08:00
|
|
|
|
|
|
|
struct exop {
|
2003-02-16 14:15:28 +08:00
|
|
|
struct berval *oid;
|
2001-12-26 16:17:44 +08:00
|
|
|
BI_op_extended *extended;
|
1999-12-08 12:37:59 +08:00
|
|
|
} exop_table[] = {
|
2003-02-16 14:15:28 +08:00
|
|
|
{ (struct berval *)&slap_EXOP_MODIFY_PASSWD, ldbm_back_exop_passwd },
|
1999-12-08 12:37:59 +08:00
|
|
|
{ NULL, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
int
|
|
|
|
ldbm_back_extended(
|
|
|
|
Backend *be,
|
|
|
|
Connection *conn,
|
|
|
|
Operation *op,
|
2003-02-16 14:15:28 +08:00
|
|
|
struct berval *reqoid,
|
1999-12-08 12:37:59 +08:00
|
|
|
struct berval *reqdata,
|
1999-12-16 07:22:47 +08:00
|
|
|
char **rspoid,
|
1999-12-08 12:37:59 +08:00
|
|
|
struct berval **rspdata,
|
1999-12-10 12:52:32 +08:00
|
|
|
LDAPControl *** rspctrls,
|
2000-05-22 11:46:57 +08:00
|
|
|
const char** text,
|
2002-01-14 09:43:17 +08:00
|
|
|
BerVarray *refs
|
1999-12-08 12:37:59 +08:00
|
|
|
)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
2003-02-16 14:15:28 +08:00
|
|
|
for( i=0; exop_table[i].extended != NULL; i++ ) {
|
|
|
|
if( ber_bvcmp( exop_table[i].oid, reqoid ) == 0 ) {
|
1999-12-08 12:37:59 +08:00
|
|
|
return (exop_table[i].extended)(
|
1999-12-16 07:22:47 +08:00
|
|
|
be, conn, op,
|
|
|
|
reqoid, reqdata,
|
2000-05-22 11:46:57 +08:00
|
|
|
rspoid, rspdata, rspctrls,
|
|
|
|
text, refs );
|
1999-12-08 12:37:59 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-09-29 10:50:34 +08:00
|
|
|
*text = "not supported within naming context";
|
2002-08-01 06:49:02 +08:00
|
|
|
return LDAP_UNWILLING_TO_PERFORM;
|
1999-12-08 12:37:59 +08:00
|
|
|
}
|
|
|
|
|