]> git.sur5r.net Git - openldap/blob - servers/slapd/back-ldbm/extended.c
3318f4704427bb3094421644d483706a308670d5
[openldap] / servers / slapd / back-ldbm / extended.c
1 /* extended.c - ldbm backend extended routines */
2 /* $OpenLDAP$ */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4  *
5  * Copyright 1998-2003 The OpenLDAP Foundation.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted only as authorized by the OpenLDAP
10  * Public License.
11  *
12  * A copy of this license is available in the file LICENSE in the
13  * top-level directory of the distribution or, alternatively, at
14  * <http://www.OpenLDAP.org/license.html>.
15  */
16
17 #include "portable.h"
18
19 #include <stdio.h>
20
21 #include <ac/socket.h>
22 #include <ac/string.h>
23
24 #include "slap.h"
25 #include "back-ldbm.h"
26 #include "proto-back-ldbm.h"
27 #include "lber_pvt.h"
28
29 struct exop {
30         struct berval *oid;
31         BI_op_extended  *extended;
32 } exop_table[] = {
33         { (struct berval *)&slap_EXOP_MODIFY_PASSWD, ldbm_back_exop_passwd },
34         { NULL, NULL }
35 };
36
37 int
38 ldbm_back_extended(
39         Operation       *op,
40         SlapReply       *rs )
41 {
42         int i;
43
44         for( i=0; exop_table[i].extended != NULL; i++ ) {
45                 if( ber_bvcmp( exop_table[i].oid, &op->oq_extended.rs_reqoid ) == 0 ) {
46                         return exop_table[i].extended( op, rs );
47                 }
48         }
49
50         rs->sr_text = "not supported within naming context";
51         return LDAP_UNWILLING_TO_PERFORM;
52 }
53