]> git.sur5r.net Git - openldap/commitdiff
more cleanups
authorLuke Howard <lukeh@openldap.org>
Mon, 25 Jul 2005 13:17:15 +0000 (13:17 +0000)
committerLuke Howard <lukeh@openldap.org>
Mon, 25 Jul 2005 13:17:15 +0000 (13:17 +0000)
servers/slapd/slapi/TODO
servers/slapd/slapi/plugin.c

index ea50430773383cceacfaa96b9f2ef016755669c6..8916488119f55b146919f4b64129676a62667bce 100644 (file)
@@ -10,7 +10,7 @@
 - This is a very tough task: try to implement a sandbox to execute
   plugins in, trap deadly signals and possibly disable unsafe plugins
   without crashing slapd (fork from inside thread? trap signals
-  and longjump to next plugin execution? Brrr).
+  and longjump to next plugin execution? Brrr). 
 
 ---
 $OpenLDAP$
index 450bc7395a68aec40e1b007a8a068d25212c00ad..93809179d56d64cd29dcfa291de503bb341c2e5f 100644 (file)
@@ -70,9 +70,9 @@ plugin_pblock_new(
        Slapi_PluginDesc *pPluginDesc = NULL;
        lt_dlhandle     hdLoadHandle;
        int             rc;
-       char **av2 = NULL, **ppPluginArgv;
-       char *path = argv[2];
-       char *initfunc = argv[3];
+       char            **av2 = NULL, **ppPluginArgv;
+       char            *path = argv[2];
+       char            *initfunc = argv[3];
 
        pPlugin = slapi_pblock_new();
        if ( pPlugin == NULL ) {
@@ -146,9 +146,9 @@ slapi_int_register_plugin(
        Backend *be, 
        Slapi_PBlock *pPB )
 { 
-       Slapi_PBlock *pTmpPB;
-       Slapi_PBlock *pSavePB;
-       int    rc = LDAP_SUCCESS;
+       Slapi_PBlock    *pTmpPB;
+       Slapi_PBlock    *pSavePB;
+       int              rc = LDAP_SUCCESS;
 
        assert( be != NULL );
 
@@ -273,14 +273,12 @@ createExtendedOp()
 {
        ExtendedOp *ret;
 
-       ret = (ExtendedOp *)ch_malloc(sizeof(ExtendedOp));
-       if ( ret != NULL ) {
-               ret->ext_oid.bv_val = NULL;
-               ret->ext_oid.bv_len = 0;
-               ret->ext_func = NULL;
-               ret->ext_be = NULL;
-               ret->ext_next = NULL;
-       }
+       ret = (ExtendedOp *)slapi_ch_malloc(sizeof(ExtendedOp));
+       ret->ext_oid.bv_val = NULL;
+       ret->ext_oid.bv_len = 0;
+       ret->ext_func = NULL;
+       ret->ext_be = NULL;
+       ret->ext_next = NULL;
 
        return ret;
 }
@@ -600,12 +598,6 @@ slapi_int_call_plugins(
        }
 
        for ( pGetPlugin = tmpPlugin ; *pGetPlugin != NULL; pGetPlugin++ ) {
-               /*
-                * 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
-                * later executions ...
-                */
                rc = (*pGetPlugin)(pPB);
 
                /*
@@ -757,7 +749,7 @@ slapi_int_initialize(void)
                return -1;
        }
 
-       slapi_log_file = ch_strdup( LDAP_RUNDIR LDAP_DIRSEP "errors" );
+       slapi_log_file = slapi_ch_strdup( LDAP_RUNDIR LDAP_DIRSEP "errors" );
        if ( slapi_log_file == NULL ) {
                return -1;
        }