1999-12-08 12:37:59 +08:00
|
|
|
/* extended.c - ldbm backend extended routines */
|
|
|
|
/* $OpenLDAP$ */
|
|
|
|
/*
|
|
|
|
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
|
|
|
|
* 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,
|
1999-12-16 07:22:47 +08:00
|
|
|
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,
|
1999-12-16 07:22:47 +08:00
|
|
|
char** text,
|
|
|
|
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,
|
|
|
|
rspoid, rspdata, rspctrls, text, refs );
|
1999-12-08 12:37:59 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
*text = ch_strdup("not supported within naming context");
|
|
|
|
return LDAP_OPERATIONS_ERROR;
|
|
|
|
}
|
|
|
|
|