1999-12-08 12:37:59 +08:00
|
|
|
/* extended.c - ldbm backend extended routines */
|
|
|
|
/* $OpenLDAP$ */
|
|
|
|
/*
|
2002-01-05 05:17:25 +08:00
|
|
|
* Copyright 1998-2002 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"
|
|
|
|
|
|
|
|
struct exop {
|
|
|
|
char *oid;
|
2001-12-26 16:17:44 +08:00
|
|
|
BI_op_extended *extended;
|
1999-12-08 12:37:59 +08:00
|
|
|
} exop_table[] = {
|
2002-01-29 04:25:30 +08:00
|
|
|
{ LDAP_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,
|
2000-05-22 11:46:57 +08:00
|
|
|
const char *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;
|
|
|
|
|
|
|
|
for( i=0; exop_table[i].oid != NULL; i++ ) {
|
1999-12-16 07:22:47 +08:00
|
|
|
if( strcmp( 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
|
|
|
}
|
|
|
|
|