From a8a23932e6dc74ecffa3ee672d14db0a6a1642ce Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 18 Jul 2019 20:14:23 +0200 Subject: [PATCH] Spacing issues --- zmldapsync/zmldapsync.pl | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/zmldapsync/zmldapsync.pl b/zmldapsync/zmldapsync.pl index fa28bd8..444beeb 100644 --- a/zmldapsync/zmldapsync.pl +++ b/zmldapsync/zmldapsync.pl @@ -129,10 +129,8 @@ DOMAIN: foreach my $domain ( keys $conf->{domains} ) { my $domain_entry = ldap2hashref( $zim_domain_search, 'zimbraDomainName' )->{$domain}; # Check if auth is set to ad or ldap - if ( - not defined $domain_entry->{zimbraAuthMech} or - $domain_entry->{zimbraAuthMech} !~ m/^ad|ldap$/i - ) { + if ( not defined $domain_entry->{zimbraAuthMech} or + $domain_entry->{zimbraAuthMech} !~ m/^ad|ldap$/i ) { if ( yaml_bool( $conf->{domains}->{$domain}->{zimbra}->{setup_ldap_auth} ) ) { send_zmprov_cmd( "modifyDomain $domain " . build_domain_attrs( $conf->{domains}->{$domain} ) ); } else { @@ -165,7 +163,7 @@ DOMAIN: foreach my $domain ( keys $conf->{domains} ) { } log_verbose( "Trying to connect to " . - join( ' or ', @{ $conf->{domains}->{$domain}->{ldap}->{servers} } ) ); + join( ' or ', @{ $conf->{domains}->{$domain}->{ldap}->{servers} } ) ); my $ext_ldap = Net::LDAP->new( [ @{ $conf->{domains}->{$domain}->{ldap}->{servers} } ] ); if ( not $ext_ldap ) { @@ -186,7 +184,8 @@ DOMAIN: foreach my $domain ( keys $conf->{domains} ) { log_verbose( "StartTLS succeeded" ); } - if ( defined $conf->{domains}->{$domain}->{ldap}->{bind_dn} and defined $conf->{domains}->{$domain}->{ldap}->{bind_pass} ) { + if ( defined $conf->{domains}->{$domain}->{ldap}->{bind_dn} and + defined $conf->{domains}->{$domain}->{ldap}->{bind_pass} ) { log_verbose( "Trying to bind as " . $conf->{domains}->{$domain}->{ldap}->{bind_dn} ); my $bind = $ext_ldap->bind( $conf->{domains}->{$domain}->{ldap}->{bind_dn}, @@ -267,7 +266,7 @@ DOMAIN: foreach my $domain ( keys $conf->{domains} ) { my $zim_user_search = $zim_ldap->ldap->search( base => 'ou=people,' . $domain_entry->{dn}, filter => '(&(objectClass=zimbraAccount)(!(zimbraIsSystemAccount=TRUE))(!(zimbraIsSystemResource=TRUE)))', - attrs => [ + attrs => [ ( map { $conf->{domains}->{$domain}->{users}->{attr_map}->{$_} } keys $conf->{domains}->{$domain}->{users}->{attr_map} ), ( 'uid',