SPAGAIN;
if (count != 1) {
- croak("Big trouble in back_search\n");
+ croak("Big trouble in back_add\n");
}
return_code = POPi;
NULL, NULL, NULL, NULL );
}
- Debug( LDAP_DEBUG_ANY, "Here ADD\n", 0, 0, 0 );
+ Debug( LDAP_DEBUG_ANY, "Perl ADD\n", 0, 0, 0 );
return( 0 );
}
return ( return_code );
}
-
-
Backend *be,
Connection *conn,
Operation *op,
- const char *dn,
- const char *ndn,
- Ava *ava
+ struct berval *dn,
+ struct berval *ndn,
+ AttributeAssertion *ava
)
{
int return_code;
/* XPUSHs(sv_2mortal(newSVpv( cred->bv_val , cred->bv_len))); */
PUTBACK;
- count = perl_call_method("bind", G_SCALAR);
+ count = perl_call_method("compare", G_SCALAR);
SPAGAIN;
if (count != 1) {
- croak("Big trouble in back_search\n");
+ croak("Big trouble in back_compare\n");
}
return_code = POPi;
}
#endif
- Debug( LDAP_DEBUG_ANY, "Here BIND\n", 0, 0, 0 );
+ Debug( LDAP_DEBUG_ANY, "Perl COMPARE\n", 0, 0, 0 );
return (0);
}
/* if the module rejected it then we should reject it */
if ( return_code != 0 ) {
fprintf( stderr,
- "Unknown perl backeng config: %s\n", argv[0]);
+ "Unknown perl backend config: %s\n", argv[0]);
exit( EXIT_FAILURE );
}
}
Backend *be,
Connection *conn,
Operation *op,
- const char *dn,
- const char *ndn
+ struct berval *dn,
+ struct berval *ndn
)
{
int len;
PUSHMARK(sp);
XPUSHs( perl_back->pb_obj_ref );
- XPUSHs(sv_2mortal(newSVpv( dn , 0 )));
+ XPUSHs(sv_2mortal(newSVpv( dn->bv_val , 0 )));
PUTBACK;
NULL, NULL, NULL, NULL );
}
- Debug( LDAP_DEBUG_ANY, "Here DELETE\n", 0, 0, 0 );
+ Debug( LDAP_DEBUG_ANY, "Perl DELETE\n", 0, 0, 0 );
return( 0 );
}
extern BI_init perl_back_initialize;
extern BI_open perl_back_open;
-extern BI_close perl_back_close:
+extern BI_close perl_back_close;
extern BI_destroy perl_back_destroy;
extern BI_db_init perl_back_db_init;
bi->bi_db_destroy = perl_back_db_destroy;
bi->bi_op_bind = perl_back_bind;
- bi->bi_op_unbind = perl_back_unbind;
+ bi->bi_op_unbind = 0;
bi->bi_op_search = perl_back_search;
bi->bi_op_compare = perl_back_compare;
bi->bi_op_modify = perl_back_modify;
Backend *be,
Connection *conn,
Operation *op,
- const char *dn,
- const char *ndn,
- LDAPModList *modlist
+ struct berval *dn,
+ struct berval *ndn,
+ Modifications *modlist
)
{
char test[500];
PUSHMARK(sp);
XPUSHs( perl_back->pb_obj_ref );
- XPUSHs(sv_2mortal(newSVpv( dn , 0)));
+ XPUSHs(sv_2mortal(newSVpv( dn->bv_val , 0)));
- for (; modlist != NULL; modlist = modlist->ml_next ) {
- LDAPMod *mods = &modlist->ml_mod;
+ for (; modlist != NULL; modlist = modlist->sml_next ) {
+ Modification *mods = &modlist->sml_mod;
- switch ( mods->mod_op & ~LDAP_MOD_BVALUES ) {
+ switch ( mods->sm_op & ~LDAP_MOD_BVALUES ) {
case LDAP_MOD_ADD:
XPUSHs(sv_2mortal(newSVpv("ADD", 0 )));
break;
}
- XPUSHs(sv_2mortal(newSVpv( mods->mod_type, 0 )));
+ XPUSHs(sv_2mortal(newSVpv( mods->sm_type.bv_val, 0 )));
for ( i = 0;
- mods->mod_bvalues != NULL && mods->mod_bvalues[i] != NULL;
+ mods->sm_bvalues != NULL && mods->sm_bvalues[i].bv_val != NULL;
i++ )
{
- XPUSHs(sv_2mortal(newSVpv( mods->mod_bvalues[i]->bv_val, 0 )));
+ XPUSHs(sv_2mortal(newSVpv( mods->sm_bvalues[i].bv_val, 0 )));
}
}
SPAGAIN;
if (count != 1) {
- croak("Big trouble in back_search\n");
+ croak("Big trouble in back_modify\n");
}
return_code = POPi;
Backend *be,
Connection *conn,
Operation *op,
- const char *dn,
- const char *ndn,
- const char *newrdn,
+ struct berval *dn,
+ struct berval *ndn,
+ struct berval *newrdn,
+ struct berval *nnewrdn,
int deleteoldrdn,
- const char *newSuperior
+ struct berval *newSuperior,
+ struct berval *nnewSuperior
)
{
int len;
PUSHMARK(sp) ;
XPUSHs( perl_back->pb_obj_ref );
- XPUSHs(sv_2mortal(newSVpv( dn , 0 )));
- XPUSHs(sv_2mortal(newSVpv( newrdn , 0 )));
+ XPUSHs(sv_2mortal(newSVpv( dn->bv_val , 0 )));
+ XPUSHs(sv_2mortal(newSVpv( newrdn->bv_val , 0 )));
XPUSHs(sv_2mortal(newSViv( deleteoldrdn )));
if ( newSuperior != NULL ) {
- XPUSHs(sv_2mortal(newSVpv( newSuperior , 0 )));
+ XPUSHs(sv_2mortal(newSVpv( newSuperior->bv_val , 0 )));
}
PUTBACK ;
SPAGAIN ;
if (count != 1) {
- croak("Big trouble in back_search\n") ;
+ croak("Big trouble in back_modrdn\n") ;
}
return_code = POPi;
Debug( LDAP_DEBUG_ANY, "Perl MODRDN\n", 0, 0, 0 );
return( 0 );
}
-
-
Backend *be,
Connection *conn,
Operation *op,
- const char *base,
- const char *nbase,
+ struct berval *base,
+ struct berval *nbase,
int scope,
int deref,
int sizelimit,
int timelimit,
Filter *filter,
- const char *filterstr,
+ struct berval *filterstr,
AttributeName *attrs,
int attrsonly
)
PUSHMARK(sp) ;
XPUSHs( perl_back->pb_obj_ref );
- XPUSHs(sv_2mortal(newSVpv( filterstr , 0)));
+ XPUSHs(sv_2mortal(newSVpv( filterstr->bv_val , 0)));
XPUSHs(sv_2mortal(newSViv( sizelimit )));
XPUSHs(sv_2mortal(newSViv( timelimit )));
XPUSHs(sv_2mortal(newSViv( attrsonly )));