X-Git-Url: http://git.rot13.org/?p=virtual-ldap;a=blobdiff_plain;f=bin%2Fldap-rewrite.pl;h=8c35ebb94efc5561c698785cbd2fec942d3c6057;hp=5199c85549b5c4ec1d3d7436f729334923a06e94;hb=2b0deecf4e04a468229c83049ca0db5426a931fc;hpb=45be35d4fde12df37bfbcb3816f7c0840b179d58 diff --git a/bin/ldap-rewrite.pl b/bin/ldap-rewrite.pl index 5199c85..8c35ebb 100755 --- a/bin/ldap-rewrite.pl +++ b/bin/ldap-rewrite.pl @@ -103,7 +103,7 @@ sub log_request { if ( $request->{bindRequest}->{name} =~ m{@} ) { my $old = $request->{bindRequest}->{name}; $request->{bindRequest}->{name} =~ s/[@\.]/,dc=/g; - $request->{bindRequest}->{name} =~ s/^/uid=/ unless $request->{bindRequest}->{name} =~ m/^uid=/; + $request->{bindRequest}->{name} =~ s/^/uid=/; warn "rewrite bind cn $old -> ", $request->{bindRequest}->{name}; Convert::ASN1::asn_hexdump(\*STDOUT,$pdu) if $debug; $pdu = $LDAPRequest->encode($request);