X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-bdb%2Fextended.c;h=1b72c0f830351c28e285df956f8d441bced35d5e;hb=54733bfc15fd7308c0780dca61f311d0f91f1157;hp=b35f4b05fc0b11167e56802f4b0f9945eab6de41;hpb=f52cc9bab51e427afa3ed5d28be012d8da27a7a8;p=openldap diff --git a/servers/slapd/back-bdb/extended.c b/servers/slapd/back-bdb/extended.c index b35f4b05fc..1b72c0f830 100644 --- a/servers/slapd/back-bdb/extended.c +++ b/servers/slapd/back-bdb/extended.c @@ -1,8 +1,17 @@ /* extended.c - bdb backend extended routines */ /* $OpenLDAP$ */ -/* - * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved. - * COPYING RESTRICTIONS APPLY, see COPYRIGHT file +/* This work is part of OpenLDAP Software . + * + * Copyright 2000-2014 The OpenLDAP Foundation. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted only as authorized by the OpenLDAP + * Public License. + * + * A copy of this license is available in the file LICENSE in the + * top-level directory of the distribution or, alternatively, at + * . */ #include "portable.h" @@ -11,43 +20,35 @@ #include #include "back-bdb.h" -#include "external.h" +#include "lber_pvt.h" static struct exop { - char *oid; + struct berval *oid; BI_op_extended *extended; } exop_table[] = { - { LDAP_EXOP_X_MODIFY_PASSWD, bdb_exop_passwd }, { NULL, NULL } }; int -bdb_extended( - Backend *be, - Connection *conn, - Operation *op, - const char *reqoid, +bdb_extended( Operation *op, SlapReply *rs ) +/* struct berval *reqoid, struct berval *reqdata, char **rspoid, struct berval **rspdata, LDAPControl *** rspctrls, const char** text, - BVarray *refs -) + BerVarray *refs +) */ { int i; - for( i=0; exop_table[i].oid != NULL; i++ ) { - if( strcmp( exop_table[i].oid, reqoid ) == 0 ) { - return (exop_table[i].extended)( - be, conn, op, - reqoid, reqdata, - rspoid, rspdata, rspctrls, - text, refs ); + for( i=0; exop_table[i].extended != NULL; i++ ) { + if( ber_bvcmp( exop_table[i].oid, &op->oq_extended.rs_reqoid ) == 0 ) { + return (exop_table[i].extended)( op, rs ); } } - *text = "not supported within naming context"; - return LDAP_OPERATIONS_ERROR; + rs->sr_text = "not supported within naming context"; + return rs->sr_err = LDAP_UNWILLING_TO_PERFORM; }