Commit 7c5d3dd7 authored by Clément OUDOT's avatar Clément OUDOT

Force unbind in LDAP configuration backend

parent 36c9aa24
......@@ -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 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment