]> git.sur5r.net Git - openldap/commitdiff
Only non-postoperation plugins should be able to abort processing of further
authorLuke Howard <lukeh@openldap.org>
Mon, 20 Jan 2003 22:33:50 +0000 (22:33 +0000)
committerLuke Howard <lukeh@openldap.org>
Mon, 20 Jan 2003 22:33:50 +0000 (22:33 +0000)
plugins.

servers/slapd/slapi/plugin.c
servers/slapd/slapi/plugin.h

index edf9a31c72d7da5049c209b3dd8f3ecfa20444ca..ec0b7477a33f010193451289030536849ead5e66 100644 (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;
                }
        }
index 8a470cfcba4a3da6333bf6683310125da87c2074..f334f69fa2be64cf2dcdf1f54c9012e3255e028f 100644 (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_ */