~ttx/openldap/lucid-gssapi-495418

« back to all changes in this revision

Viewing changes to servers/slapd/back-bdb/extended.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2008-07-10 14:45:49 UTC
  • Revision ID: james.westby@ubuntu.com-20080710144549-wck73med0e72gfyo
Tags: upstream-2.4.10
ImportĀ upstreamĀ versionĀ 2.4.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* extended.c - bdb backend extended routines */
 
2
/* $OpenLDAP: pkg/ldap/servers/slapd/back-bdb/extended.c,v 1.18.2.3 2008/02/11 23:26:45 kurt Exp $ */
 
3
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
 
4
 *
 
5
 * Copyright 2000-2008 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
#include <ac/string.h>
 
21
 
 
22
#include "back-bdb.h"
 
23
#include "lber_pvt.h"
 
24
 
 
25
static struct exop {
 
26
        struct berval *oid;
 
27
        BI_op_extended  *extended;
 
28
} exop_table[] = {
 
29
        { NULL, NULL }
 
30
};
 
31
 
 
32
int
 
33
bdb_extended( Operation *op, SlapReply *rs )
 
34
/*      struct berval           *reqoid,
 
35
        struct berval   *reqdata,
 
36
        char            **rspoid,
 
37
        struct berval   **rspdata,
 
38
        LDAPControl *** rspctrls,
 
39
        const char**    text,
 
40
        BerVarray       *refs 
 
41
) */
 
42
{
 
43
        int i;
 
44
 
 
45
        for( i=0; exop_table[i].extended != NULL; i++ ) {
 
46
                if( ber_bvcmp( exop_table[i].oid, &op->oq_extended.rs_reqoid ) == 0 ) {
 
47
                        return (exop_table[i].extended)( op, rs );
 
48
                }
 
49
        }
 
50
 
 
51
        rs->sr_text = "not supported within naming context";
 
52
        return LDAP_UNWILLING_TO_PERFORM;
 
53
}
 
54