https://bugs.openldap.org/show_bug.cgi?id=9812

--- Comment #1 from Howard Chu <[email protected]> ---
Unable to reproduce this problem. My local build invokes the plugin as
expected.

###
#include <slapi-plugin.h>

static const Slapi_PluginDesc desc = {
        "idm-id",
        "dummy",
        "0.0",
        "slapi test demo" };

static int modify_user(Slapi_PBlock *pb)
{
        Slapi_Entry *entry;
        slapi_log_error(SLAPI_LOG_TRACE, "idm-plugin", "now in
modify_user()\n");
        if (slapi_pblock_get(pb, SLAPI_SEARCH_TARGET, &entry) != LDAP_SUCCESS)
{
        slapi_log_error(SLAPI_LOG_FATAL, "idm-plugin",
            "entry modified, but couldn't get entry");
        return -1;
    }
        return 0;
}

int idm_init(Slapi_PBlock *pb)
{
        int rc = LDAP_SUCCESS;

        slapi_log_error(SLAPI_LOG_TRACE, "idm-plugin", "now in idm_init()\n");
        rc |= slapi_pblock_set( /* Plug-in API version */ pb,
                             SLAPI_PLUGIN_VERSION,
                             SLAPI_PLUGIN_CURRENT_VERSION);
        rc |= slapi_pblock_set( /* Plug-in description */ pb,
                             SLAPI_PLUGIN_DESCRIPTION, (void *) &desc);
        rc |= slapi_pblock_set( /* Modify function */ pb,
                             SLAPI_PLUGIN_POST_MODIFY_FN,
                             (void *) modify_user);
//      rc |= read_arguments(pb);
        slapi_log_error(SLAPI_LOG_TRACE, "idm-plugin", "idm_init() return
rc:%d\n", rc);
        return rc;
}
###


config:
###

include     ./schema/core.schema
include     ./schema/cosine.schema
include     ./schema/inetorgperson.schema
include     ./schema/openldap.schema
include     ./schema/nis.schema
include     ./testdata/test.schema

pidfile     /home/hyc/OD/hobj/tests/testrun/slapd.1.pid
argsfile    /home/hyc/OD/hobj/tests/testrun/slapd.1.args

sockbuf_max_incoming 4194303



database    mdb
suffix      "dc=example,dc=com"
rootdn      "cn=Manager,dc=example,dc=com"
rootpw      secret
directory   /home/hyc/OD/hobj/tests/testrun/db.1.a
index       objectClass eq
index       cn,sn,uid   pres,eq,sub
maxsize 33554432

plugin postoperation /tmp/dummy.so idm_init "IDM plugin" 127.0.0.1 3001

database    monitor
###

-- 
You are receiving this mail because:
You are on the CC list for the issue.

Reply via email to