X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-ldbm%2Fextended.c;h=64a556b0f67b3bf8752432cd8be2380d20d176a6;hb=f8094912dca39dc65aec440daf00973792f5ba42;hp=8a56d65164ca42945671d87db8ea0b8d5d6edd35;hpb=14662be6923878e17b2092e754a0bbc06c634a20;p=openldap diff --git a/servers/slapd/back-ldbm/extended.c b/servers/slapd/back-ldbm/extended.c index 8a56d65164..64a556b0f6 100644 --- a/servers/slapd/back-ldbm/extended.c +++ b/servers/slapd/back-ldbm/extended.c @@ -1,8 +1,17 @@ /* extended.c - ldbm backend extended routines */ /* $OpenLDAP$ */ -/* - * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved. - * COPYING RESTRICTIONS APPLY, see COPYRIGHT file +/* This work is part of OpenLDAP Software . + * + * Copyright 1998-2006 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" @@ -15,42 +24,29 @@ #include "slap.h" #include "back-ldbm.h" #include "proto-back-ldbm.h" +#include "lber_pvt.h" struct exop { - char *oid; + struct berval *oid; BI_op_extended *extended; } exop_table[] = { - { LDAP_EXOP_MODIFY_PASSWD, ldbm_back_exop_passwd }, { NULL, NULL } }; int ldbm_back_extended( - Backend *be, - Connection *conn, - Operation *op, - const char *reqoid, - struct berval *reqdata, - char **rspoid, - struct berval **rspdata, - LDAPControl *** rspctrls, - const char** text, - BerVarray *refs -) + Operation *op, + SlapReply *rs ) { 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 LDAP_UNWILLING_TO_PERFORM; }