Error with PPolicy + CleanupHandler not launched

environments/ppa-mbqj77/deployments/1
Xavier Guimard 16 years ago
parent c40c13734e
commit 294e35cbeb
  1. 7
      build/lemonldap-ng/Makefile
  2. 5
      modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/CGI.pm
  3. 5
      modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf.pm
  4. 12
      modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm
  5. 2
      modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/AuthLDAP.pm
  6. 2
      modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_LDAP.pm

@ -487,3 +487,10 @@ manager_clean:
- $(MAKE) -C ${SRCMANAGERDIR} distclean
@rm -vf manager*
debian-packages: debian-dist
mv lemonldap-ng_$(VERSION).orig.tar.gz /tmp/
version=$(VERSION) && \
cd /tmp/ && \
tar xzf lemonldap-ng_$$version.orig.tar.gz && \
cd lemonldap-ng-$$version && \
debuild

@ -174,7 +174,10 @@ sub abort {
sub startSyslog {
my $self = shift;
return if ( $self->{_syslog} );
eval "use Sys::Syslog; openlog('lemonldap-ng','ndelay','$self->{syslog}');";
eval {
use Sys::Syslog;
openlog( 'lemonldap-ng', 'ndelay', '$self->{syslog}' );
};
$self->abort( "Unable to use syslog", $@ ) if ($@);
$self->{_syslog} = 1;
}

@ -238,10 +238,11 @@ sub getDBConf {
/^(?:exportedVars|locationRules|groups|exportedHeaders|macros|globalStorageOptions)$/
)
{
if ( $v !~ /^\$/ ) {
$conf->{$k} = {};
if ( defined($v) and $v !~ /^\$/ ) {
print STDERR
"Lemonldap::NG : Warning: configuration is in old format, you've to migrate !\n";
eval 'require Storable;require MIME::Base64;';
eval { require Storable; require MIME::Base64; };
if ($@) {
$msg = "Error : $@";
return 0;

@ -409,17 +409,11 @@ sub childInit {
if ( MP() == 2 ) {
Apache2::ServerUtil->server->push_handlers( PerlChildInitHandler =>
sub { return $class->initLocalStorage( $_[1], $_[0] ); } );
Apache2::ServerUtil->server->push_handlers(
PerlCleanupHandler => sub { return $class->cleanLocalStorage(@_); }
);
}
elsif ( MP() == 1 ) {
Apache->push_handlers(
PerlChildInitHandler => sub { return $class->initLocalStorage(@_); }
);
Apache->push_handlers(
PerlCleanupHandler => sub { return $class->cleanLocalStorage(@_); }
);
}
1;
}
@ -863,7 +857,6 @@ sub fetchId {
sub run ($$) {
my $class;
( $class, $apacheRequest ) = @_;
return DECLINED unless ( $apacheRequest->is_initial_req );
my $uri = $apacheRequest->uri
. ( $apacheRequest->args ? "?" . $apacheRequest->args : "" );
@ -925,6 +918,11 @@ sub run ($$) {
# Hide Lemonldap::NG cookie
$class->hideCookie;
# Cleanup
$apacheRequest->push_handlers(
PerlCleanupHandler => sub { return $class->cleanLocalStorage(@_); }
);
if ( defined( $transform->{$uri} ) ) {
return &{ $transform->{$uri} };
}

@ -21,7 +21,7 @@ use base qw(Lemonldap::NG::Portal::_WebForm);
# @return Lemonldap::NG::Portal constant
sub authInit {
my $self = shift;
if ( $self->{portal}->{ldapPpolicyControl} and not $self->Lemonldap::NG::Portal::_LDAP::loadPP) {
if ( $self->{ldapPpolicyControl} and not $self->ldap->loadPP()) {
return PE_LDAPERROR;
}
PE_OK;

@ -98,7 +98,7 @@ sub loadPP {
return 1 if ($ppLoaded);
# require Perl module
eval 'require Net::LDAP::Control::PasswordPolicy';
eval {require Net::LDAP::Control::PasswordPolicy};
if ($@) {
$self->lmLog(
"Module Net::LDAP::Control::PasswordPolicy not found in @INC",

Loading…
Cancel
Save