From 556172241b5e14b50e96a05c7733f43bd4b57a33 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 17 Jul 2019 09:05:10 +0200 Subject: [PATCH] Do not use attr_maps defaults when some are provided in the config --- zmldapsync/zmldapsync.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zmldapsync/zmldapsync.pl b/zmldapsync/zmldapsync.pl index ac8b455..75ccd66 100644 --- a/zmldapsync/zmldapsync.pl +++ b/zmldapsync/zmldapsync.pl @@ -968,5 +968,10 @@ sub get_default_conf { } }; } + # If some attribute mapping is defined in the provided conf + # do not use defaults + foreach my $type ( qw( users groups ) ) { + $defaults->{$type}->{attr_map} = {} if ( defined $conf->{$type}->{attr_map} ); + } return merge $defaults, $conf; }