From: Luke Howard Date: Mon, 20 Jan 2003 22:33:50 +0000 (+0000) Subject: Only non-postoperation plugins should be able to abort processing of further X-Git-Tag: NO_SLAP_OP_BLOCKS~583 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=27dba2226fb6ccf76d34c369c7bd728f5675c1b9;p=openldap Only non-postoperation plugins should be able to abort processing of further plugins. --- diff --git a/servers/slapd/slapi/plugin.c b/servers/slapd/slapi/plugin.c index edf9a31c72..ec0b7477a3 100644 --- a/servers/slapd/slapi/plugin.c +++ b/servers/slapd/slapi/plugin.c @@ -571,8 +571,6 @@ doPluginFNs( for ( pGetPlugin = tmpPlugin ; *pGetPlugin != NULL; pGetPlugin++ ) { /* - * FIXME: operation stops at first non-success - * * FIXME: we should provide here a sort of sandbox, * to protect from plugin faults; e.g. trap signals * and longjump here, marking the plugin as unsafe for @@ -580,7 +578,11 @@ doPluginFNs( */ rc = (*pGetPlugin)(pPB); - if ( rc != LDAP_SUCCESS ) { + /* + * Only non-postoperation plugins abort processing on + * failure (confirmed with SLAPI specification). + */ + if ( !SLAPI_PLUGIN_IS_POST_FN( funcType ) && rc != 0 ) { break; } } diff --git a/servers/slapd/slapi/plugin.h b/servers/slapd/slapi/plugin.h index 8a470cfcba..f334f69fa2 100644 --- a/servers/slapd/slapi/plugin.h +++ b/servers/slapd/slapi/plugin.h @@ -24,5 +24,7 @@ int netscape_plugin(Backend *be, const char *fname, int lineno, int argc, char **argv ); int slapi_init(void); +#define SLAPI_PLUGIN_IS_POST_FN(x) ((x) >= SLAPI_PLUGIN_POST_BIND_FN && (x) <= SLAPI_PLUGIN_POST_RESULT_FN) + #endif /* _PLUGIN_H_ */