projects
/
virtual-ldap
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ba90bc9
)
split homePostalAddress
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 25 Jan 2021 12:52:57 +0000
(13:52 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 25 Jan 2021 12:52:57 +0000
(13:52 +0100)
bin/ldap-rewrite.pl
patch
|
blob
|
history
diff --git
a/bin/ldap-rewrite.pl
b/bin/ldap-rewrite.pl
index
e9be738
..
b6f726f
100755
(executable)
--- a/
bin/ldap-rewrite.pl
+++ b/
bin/ldap-rewrite.pl
@@
-157,6
+157,14
@@
sub log_response {
foreach my $i ( 0 .. $#{ $attr->{vals} } ) {
$attr->{vals}->[$i] =~ s/^u2010/p2010/gs && warn "FIXME group";
}
foreach my $i ( 0 .. $#{ $attr->{vals} } ) {
$attr->{vals}->[$i] =~ s/^u2010/p2010/gs && warn "FIXME group";
}
+ } elsif ( $attr->{type} eq 'homePostalAddress' ) {
+ foreach my $val ( @{ $attr->{vals} } ) {
+ next if $val !~ m{^(.+)\s*,\s*(\d+)\s+(.+)};
+ push @attrs,
+ { type => 'homePostalAddress_address', vals => [ $1 ] },
+ { type => 'homePostalAddress_zipcode', vals => [ $2 ] },
+ { type => 'homePostalAddress_city', vals => [ $3 ] };
+ }
} elsif ( $attr->{type} eq 'mail' ) {
my @emails;
foreach my $i ( 0 .. $#{ $attr->{vals} } ) {
} elsif ( $attr->{type} eq 'mail' ) {
my @emails;
foreach my $i ( 0 .. $#{ $attr->{vals} } ) {