openldap/servers/slapd/back-ldbm/extended.c
Kurt Zeilenga 431dad371c Fix slapd SASL/ExternalOps encoding
Add controls to extended ops API signatures, need impl.
Update password to support optional server side generation of
new password, verification of old password, and changing of
non-bound user's passwords.
1999-12-10 04:52:32 +00:00

53 lines
1005 B
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 *oid,
struct berval *reqdata,
struct berval **rspdata,
LDAPControl *** rspctrls,
char** text
)
{
int i;
for( i=0; exop_table[i].oid != NULL; i++ ) {
if( strcmp( exop_table[i].oid, oid ) == 0 ) {
return (exop_table[i].extended)(
be, conn, op, oid,
reqdata, rspdata, rspctrls, text );
}
}
*text = ch_strdup("not supported within naming context");
return LDAP_OPERATIONS_ERROR;
}