Skip to content
Snippets Groups Projects
Commit c6744aea authored by John Quillan's avatar John Quillan
Browse files

fixed problem in which we didn't statically link in the dynamic

loader, there for not allowing any modules with shared libraries
to be loaded.
parent 9f7b1160
Branches
Tags
No related merge requests found
=head1 Introduction
This is a sample Perl module for the OpenLDAP server slapd.
......@@ -142,13 +143,16 @@ above.
package SampleLDAP;
use POSIX;
sub new
{
my $class = shift;
my $this = {};
bless $this, $class;
print STDERR "Here in new\n";
print STDERR "Posix Var " . BUFSIZ . " and " . FILENAME_MAX . "\n";
return $this;
}
......@@ -156,7 +160,7 @@ sub search
{
my $this = shift;
my( $filterStr, $sizeLim, $timeLim, $attrOnly, @attrs ) = @_;
print STDERR "====$filterStr====\n";
$filterStr =~ s/\(|\)//g;
$filterStr =~ s/=/: /;
......@@ -256,6 +260,7 @@ sub delete
my ( $dn ) = @_;
print STDERR "XXXXXX $dn XXXXXXX\n";
delete $this->{$dn};
}
......@@ -264,8 +269,10 @@ sub config
my $this = shift;
my ( @args ) = @_;
return 1;
local $, = " - ";
print STDERR @args;
print STDERR "\n";
return 0;
}
1;
......
......@@ -25,6 +25,10 @@
#include "perl_back.h"
LDAP_F( void )
perl_back_xs_init LDAP_P((void));
LDAP_F( void )
boot_DynaLoader LDAP_P((CV* cv));
PerlInterpreter *perl_interpreter = NULL;
ldap_pvt_thread_mutex_t perl_interpreter_mutex;
......@@ -68,7 +72,7 @@ perl_back_initialize(
perl_interpreter = perl_alloc();
perl_construct(perl_interpreter);
perl_parse(perl_interpreter, NULL, 3, embedding, (char **)NULL);
perl_parse(perl_interpreter, perl_back_xs_init, 3, embedding, (char **)NULL);
perl_run(perl_interpreter);
bi->bi_open = perl_back_open;
......@@ -122,3 +126,11 @@ perl_back_db_init(
return 0;
}
static void
perl_back_xs_init()
{
char *file = __FILE__;
dXSUB_SYS;
newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment