1999-12-08 12:37:59 +08:00
|
|
|
/* extended.c - ldbm backend extended routines */
|
|
|
|
/* $OpenLDAP$ */
|
|
|
|
/*
|
2000-05-13 10:47:56 +08:00
|
|
|
* Copyright 1998-2000 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;
|
|
|
|
SLAP_EXTENDED_FN extended;
|
|
|
|
} exop_table[] = {
|
|
|
|
{ LDAP_EXOP_X_MODIFY_PASSWD, ldbm_back_exop_passwd },
|
|
|
|
{ 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,
|
1999-12-16 07:22:47 +08:00
|
|
|
struct berval *** 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";
|
1999-12-08 12:37:59 +08:00
|
|
|
return LDAP_OPERATIONS_ERROR;
|
|
|
|
}
|
|
|
|
|