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.
This commit is contained in:
John Quillan 1999-11-11 06:14:41 +00:00
parent 9f7b1160dd
commit c6744aea36
2 changed files with 24 additions and 5 deletions

View File

@ -1,3 +1,4 @@
=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;

View File

@ -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);
}