[pmg-devel] [PATCH pmg-api 1/3] show all errors when we get an ldap connection error

Dietmar Maurer dietmar at proxmox.com
Thu Mar 14 07:23:58 CET 2019


> LDAP->new can also set $@

What happens if $@ is undefined?? I don't want those warnings about undefined values ...

> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  PMG/LDAPCache.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/PMG/LDAPCache.pm b/PMG/LDAPCache.pm
> index b151ea7..0d36019 100755
> --- a/PMG/LDAPCache.pm
> +++ b/PMG/LDAPCache.pm
> @@ -358,7 +358,7 @@ sub ldap_connect_and_bind {
>       my ($self) = @_;
>  
>       my $ldap = $self->ldap_connect() ||
> -	 die "Can't bind to ldap server '$self->{id}': $!\n";
> +	 die "Can't bind to ldap server '$self->{id}': $! $@\n";
>  
>       my $mesg;
>  
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> pmg-devel mailing list
> pmg-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel



More information about the pmg-devel mailing list