Only non-postoperation plugins should be able to abort processing of further

plugins.
This commit is contained in:
Luke Howard 2003-01-20 22:33:50 +00:00
parent b53eef9b81
commit 27dba2226f
2 changed files with 7 additions and 3 deletions

View file

@ -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;
}
}

View file

@ -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_ */