I’am
writing an extended operation with slapi plugin, successfully
registered through the initialization function:
…
char** oids = (char**) slapi_ch_malloc( 2 * sizeof( char * ) );
oids[0] = 1.3.6.1.4.1.35746.2.11.1";
oids[1] = NULL;
…
i_ret
= slapi_pblock_set(pb, SLAPI_PLUGIN_EXT_OP_OIDLIST, oids );
if( i_ret == 0 )
i_ret = slapi_pblock_set(pb, SLAPI_PLUGIN_EXT_OP_FN, (void*) extop1_start );
if( i_ret != 0 )
slapi_log_error( SLAPI_LOG_PLUGIN, "extop1_init",
"[ERROR] registrazione %s\n", pluginDescription.spd_description );
slapd.conf
look like this:
...
pluginlog
/var/log/caronte/plugin.log
plugin
extendedop /opt/ldap/slapi/libextop1-plugin.so extop1_init
...
The
log file plugin.log tell me that the plugin was successfully registered:
...
06/17/10
10:43:53 plugin_pblock_new: Registered plugin my-plugin 0.1 [mycompany]
(description plugin)
...
After
server restart, the rootDSE object contains information about my extended
operation,
an
'ldapsearch -x -s base -b "" "(objectclass=*)" +' output
like this:
...
supportedControl:
1.3.6.1.1.12
supportedExtension:
1.3.6.1.4.1.35746.2.11.1
supportedExtension:
1.3.6.1.4.1.4203.1.11.1
supportedExtension:
1.3.6.1.4.1.4203.1.11.3
supportedExtension:
1.3.6.1.1.8
But,
when i perform the extended operation then i get the error code 2 and the slapd
log file look like this:
Jun
17 09:53:03 linux-setup slapd[11969]: conn=1000 op=1 EXT
oid=1.3.6.1.4.1.35746.2.11.1
Jun
17 09:57:33 linux-setup slapd[11969]: conn=1000 op=1 do_extended: unsupported
operation "1.3.6.1.4.1.35746.2.11.1"
Jun
17 09:57:33 linux-setup slapd[11969]: conn=1000 op=1 RESULT tag=120 err=2
text=unsupported extended operation
Is
it a bug or a lack of implementation?
Any helps is appreciated.
Gianluigi
nigro