From 7c5d3dd7a419b6b9ba85e467ed0b1ec9d612bdec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Oudot?= Date: Mon, 15 Jun 2009 15:16:12 +0000 Subject: [PATCH] Force unbind in LDAP configuration backend --- .../lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/LDAP.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/LDAP.pm b/modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/LDAP.pm index 66e8946e6..e149e6864 100644 --- a/modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/LDAP.pm +++ b/modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/LDAP.pm @@ -44,6 +44,7 @@ sub available { my ($cfgNum) = ( $cn =~ /lmConf-(\d*)/ ); push @conf, $cfgNum; } + $self->ldap->unbind() && delete $self->{ldap}; return sort { $a <=> $b } @conf; } @@ -141,7 +142,7 @@ sub store { ); $self->logError($add) if ( $add->code ); - + $self->ldap->unbind() && delete $self->{ldap}; $self->unlock; return $fields->{cfgNum}; } @@ -170,6 +171,7 @@ sub load { $f->{$k} = $v; } } + $self->ldap->unbind() && delete $self->{ldap}; return $f; } @@ -178,6 +180,7 @@ sub delete { my $confDN = "cn=lmConf-" . $cfgNum . "," . $self->{ldapConfBase}; my $delete = $self->ldap->delete($confDN); + $self->ldap->unbind() && delete $self->{ldap}; $self->logError($delete) if ( $delete->code ); }