openldap/servers/slapd/back-ldbm/extended.c
Kurt Zeilenga 6253e7c278 Updated sasl response to support returning of referrals.
Updates to extended operation framework to support arbitrary
referrals and extended results without OIDs.
Updated passwd extended operation to support returning update_refs
as needed.  Needs replog support.
1999-12-15 23:22:47 +00:00

56 lines
1.1 KiB
C

/* 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,
char *reqoid,
struct berval *reqdata,
char **rspoid,
struct berval **rspdata,
LDAPControl *** rspctrls,
char** text,
struct berval *** refs
)
{
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 = ch_strdup("not supported within naming context");
return LDAP_OPERATIONS_ERROR;
}