From 3513978e907b4cadd1f3f324f3fa11103b725d68 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 17 Jul 2019 12:53:21 +0200 Subject: [PATCH] Fix membership handling for rfc2307 style schema --- zmldapsync/zmldapsync.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zmldapsync/zmldapsync.pl b/zmldapsync/zmldapsync.pl index 5cb93c4..7a8be89 100644 --- a/zmldapsync/zmldapsync.pl +++ b/zmldapsync/zmldapsync.pl @@ -597,7 +597,11 @@ DOMAIN: foreach my $domain ( keys $conf->{domains} ) { if ( not yaml_bool( $conf->{domains}->{$domain}->{groups}->{members_as_dn} ) ) { # If members are not listed as full DN, but by uid, simply concat it with the domain - foreach my $member ( $ext_groups->{$group}->{$conf->{domains}->{$domain}->{groups}->{members_attr}} ) { + foreach my $member ( @{ $ext_groups->{$group}->{$conf->{domains}->{$domain}->{groups}->{members_attr}} } ) { + if ( not defined $ext_users->{$member} ) { + log_verbose( "Skiping member $member of group $group as it doesn't match a Zimbra user" ); + next; + } next if ( not defined $ext_users->{$member} and not defined $ext_groups->{$member} ); push @ext_members, $member . '@' . $domain;