From: John Quillan Date: Thu, 11 Nov 1999 06:14:41 +0000 (+0000) Subject: fixed problem in which we didn't statically link in the dynamic X-Git-Tag: UCDATA_2_4~216 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c6744aea36b6d07821c5fdee3aed63b32f0b7894;p=openldap 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. --- diff --git a/servers/slapd/back-perl/SampleLDAP.pm b/servers/slapd/back-perl/SampleLDAP.pm index 4f78bfb8a3..e8925fbc14 100644 --- a/servers/slapd/back-perl/SampleLDAP.pm +++ b/servers/slapd/back-perl/SampleLDAP.pm @@ -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; diff --git a/servers/slapd/back-perl/init.c b/servers/slapd/back-perl/init.c index e215acd2e6..c62391f468 100644 --- a/servers/slapd/back-perl/init.c +++ b/servers/slapd/back-perl/init.c @@ -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); +}