]> git.sur5r.net Git - openldap/blob - servers/slapd/back-ldbm/extended.c
Added bdb_attribute and bdb_group ACL support routines
[openldap] / servers / slapd / back-ldbm / extended.c
1 /* extended.c - ldbm backend extended routines */
2 /* $OpenLDAP$ */
3 /*
4  * Copyright 1998-2000 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
19 struct exop {
20         char *oid;
21         SLAP_EXTENDED_FN        extended;
22 } exop_table[] = {
23         { LDAP_EXOP_X_MODIFY_PASSWD, ldbm_back_exop_passwd },
24         { NULL, NULL }
25 };
26
27 int
28 ldbm_back_extended(
29     Backend             *be,
30     Connection          *conn,
31     Operation           *op,
32         const char              *reqoid,
33     struct berval       *reqdata,
34         char            **rspoid,
35     struct berval       **rspdata,
36         LDAPControl *** rspctrls,
37         const char**    text,
38     struct berval *** refs 
39 )
40 {
41         int i;
42
43         for( i=0; exop_table[i].oid != NULL; i++ ) {
44                 if( strcmp( exop_table[i].oid, reqoid ) == 0 ) {
45                         return (exop_table[i].extended)(
46                                 be, conn, op,
47                                 reqoid, reqdata,
48                                 rspoid, rspdata, rspctrls,
49                                 text, refs );
50                 }
51         }
52
53         *text = "not supported within naming context";
54         return LDAP_OPERATIONS_ERROR;
55 }
56