]> git.sur5r.net Git - openldap/blob - servers/slapd/back-ldbm/extended.c
#unifdef -DSLAP_NVALUES_ON_DISK
[openldap] / servers / slapd / back-ldbm / extended.c
1 /* extended.c - ldbm backend extended routines */
2 /* $OpenLDAP$ */
3 /*
4  * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
5  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
6  */
7
8 #include "portable.h"
9
10 #include <stdio.h>
11
12 #include <ac/socket.h>
13 #include <ac/string.h>
14
15 #include "slap.h"
16 #include "back-ldbm.h"
17 #include "proto-back-ldbm.h"
18 #include "lber_pvt.h"
19
20 struct exop {
21         struct berval *oid;
22         BI_op_extended  *extended;
23 } exop_table[] = {
24         { (struct berval *)&slap_EXOP_MODIFY_PASSWD, ldbm_back_exop_passwd },
25         { NULL, NULL }
26 };
27
28 int
29 ldbm_back_extended(
30         Operation       *op,
31         SlapReply       *rs )
32 {
33         int i;
34
35         for( i=0; exop_table[i].extended != NULL; i++ ) {
36                 if( ber_bvcmp( exop_table[i].oid, &op->oq_extended.rs_reqoid ) == 0 ) {
37                         return exop_table[i].extended( op, rs );
38                 }
39         }
40
41         rs->sr_text = "not supported within naming context";
42         return LDAP_UNWILLING_TO_PERFORM;
43 }
44