|
|
@ -319,7 +319,7 @@ DOMAIN: foreach my $domain ( keys $conf->{domains} ) { |
|
|
|
foreach my $attr ( keys $conf->{domains}->{$domain}->{users}->{attr_map} ) { |
|
|
|
foreach my $attr ( keys $conf->{domains}->{$domain}->{users}->{attr_map} ) { |
|
|
|
|
|
|
|
|
|
|
|
if ( not defined $ext_users->{$user}->{$attr} and |
|
|
|
if ( not defined $ext_users->{$user}->{$attr} and |
|
|
|
not defined $zim_users->{$user}->{$conf->{domains}->{$domain}->{users}->{attr_map}->{$attr}} ) { |
|
|
|
not defined $zim_users->{$user}->{$conf->{domains}->{$domain}->{users}->{attr_map}->{$attr}} ) { |
|
|
|
# Attr does not exist in external LDAP and in Zimbra, no need to continue comparing them |
|
|
|
# Attr does not exist in external LDAP and in Zimbra, no need to continue comparing them |
|
|
|
next; |
|
|
|
next; |
|
|
|
} |
|
|
|
} |
|
|
@ -368,6 +368,7 @@ DOMAIN: foreach my $domain ( keys $conf->{domains} ) { |
|
|
|
$attrs .= ' ' . $conf->{domains}->{$domain}->{users}->{attr_map}->{$attr} . " " . |
|
|
|
$attrs .= ' ' . $conf->{domains}->{$domain}->{users}->{attr_map}->{$attr} . " " . |
|
|
|
zim_attr_value( $ext_users->{$user}->{$attr} ); |
|
|
|
zim_attr_value( $ext_users->{$user}->{$attr} ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
$attrs .= " zimbraAuthLdapExternalDn " . zim_attr_value( $ext_users->{$user}->{dn} ); |
|
|
|
# The password won't be used because Zimbra is set to use external LDAP/AD auth |
|
|
|
# The password won't be used because Zimbra is set to use external LDAP/AD auth |
|
|
|
# But better to set it to a random value |
|
|
|
# But better to set it to a random value |
|
|
|
my $pass = $uuid->create_str; |
|
|
|
my $pass = $uuid->create_str; |
|
|
|