projects
/
virtual-ldap
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
9321cb2
)
rewrite DN from login@domain.com into uid=login,dc=domain,dc=com
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 21 Oct 2009 18:17:38 +0000
(18:17 +0000)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 21 Oct 2009 18:17:38 +0000
(18:17 +0000)
lib/LDAP/Virtual.pm
patch
|
blob
|
history
diff --git
a/lib/LDAP/Virtual.pm
b/lib/LDAP/Virtual.pm
index
32df546
..
4ee090e
100644
(file)
--- a/
lib/LDAP/Virtual.pm
+++ b/
lib/LDAP/Virtual.pm
@@
-156,6
+156,14
@@
sub bind {
my $bind;
$bind->{dn} = $req->{name} if $req->{name};
+
+ if ( $bind->{dn} =~ m{@} ) {
+
+ $bind->{dn} =~ s/[@\.]/,dc=/g;
+ $bind->{dn} =~ s/^/uid=/;
+
+ }
+
$bind->{password} = $req->{authentication}->{simple} if $req->{authentication}->{simple};
warn "# bind ",dump( $bind );
$msg = $self->{upstream}->bind( %$bind );