|
|
@ -562,16 +562,16 @@ DOMAIN: foreach my $domain ( keys $conf->{domains} ) { |
|
|
|
not defined $zim_dl->{$group}->{$conf->{domains}->{$domain}->{groups}->{attr_map}->{$attr}} ) { |
|
|
|
not defined $zim_dl->{$group}->{$conf->{domains}->{$domain}->{groups}->{attr_map}->{$attr}} ) { |
|
|
|
# Attr does not exist in external LDAP and in Zimbra, not need to continue |
|
|
|
# Attr does not exist in external LDAP and in Zimbra, not need to continue |
|
|
|
next; |
|
|
|
next; |
|
|
|
} elsif ( not defined $ext_groups->{$group}->{$attr} ) { |
|
|
|
} elsif ( not defined $ext_groups->{$group}->{$attr} and defined $conf->{domains}->{$domain}->{groups}->{attr_map}->{$attr} ) { |
|
|
|
# Attr doesn't exist in external LDAP, but exists in Zimbra. We must remove it |
|
|
|
# Attr doesn't exist in external LDAP, but exists in Zimbra. We must remove it |
|
|
|
$attrs = ' -' . $conf->{domains}->{$domain}->{groups}->{attr_map}->{$attr} . " " . |
|
|
|
$attrs = ' -' . $conf->{domains}->{$domain}->{groups}->{attr_map}->{$attr} . " " . |
|
|
|
zim_attr_value( $zim_dl->{$group}->{$conf->{domains}->{$domain}->{groups}->{attr_map}->{$attr}} ); |
|
|
|
zim_attr_value( $zim_dl->{$group}->{$conf->{domains}->{$domain}->{groups}->{attr_map}->{$attr}} ); |
|
|
|
} elsif ( $ext_groups->{$group}->{$attr} ne $zim_dl->{$group}->{$conf->{domains}->{$domain}->{groups}->{attr_map}->{$attr}} ) { |
|
|
|
} elsif ( ( $ext_groups->{$group}->{$attr} || '' ) ne ( $zim_dl->{$group}->{$conf->{domains}->{$domain}->{groups}->{attr_map}->{$attr}} || '' ) ) { |
|
|
|
# Attr exists in both but doesn't match |
|
|
|
# Attr exists in both but doesn't match |
|
|
|
$attrs .= " " . $conf->{domains}->{$domain}->{groups}->{attr_map}->{$attr} . " " . |
|
|
|
$attrs .= " " . ( $conf->{domains}->{$domain}->{groups}->{attr_map}->{$attr} || '' ) . " " . |
|
|
|
zim_attr_value( $ext_groups->{$group}->{$attr} ); |
|
|
|
zim_attr_value( $ext_groups->{$group}->{$attr} ); |
|
|
|
log_verbose( $ext_groups->{$group}->{$attr} . " vs " . |
|
|
|
log_verbose( "Attribute $attr for group $group changed from " . ( $ext_groups->{$group}->{$attr} || 'an empty value' ) . " to " . |
|
|
|
$zim_dl->{$group}->{$conf->{domains}->{$domain}->{groups}->{attr_map}->{$attr}} ); |
|
|
|
( $zim_dl->{$group}->{$conf->{domains}->{$domain}->{groups}->{attr_map}->{$attr}} || 'an empty value' ) ); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|