projects
/
virtual-ldap
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cleanup all encoding cruft since Koha mungles data
[virtual-ldap]
/
bin
/
ldap-rewrite.pl
diff --git
a/bin/ldap-rewrite.pl
b/bin/ldap-rewrite.pl
index
6d63f5d
..
dd781c8
100755
(executable)
--- a/
bin/ldap-rewrite.pl
+++ b/
bin/ldap-rewrite.pl
@@
-20,7
+20,7
@@
use YAML qw/LoadFile/;
my $config = {
yaml_dir => './yaml/',
my $config = {
yaml_dir => './yaml/',
- listen => 'localhost:
2
389',
+ listen => 'localhost:
1
389',
upstream_ldap => 'ldap.ffzg.hr',
upstream_ssl => 1,
overlay_prefix => 'ffzg-',
upstream_ldap => 'ldap.ffzg.hr',
upstream_ssl => 1,
overlay_prefix => 'ffzg-',
@@
-170,14
+170,12
@@
sub run_proxy {
}
}
-$ENV{LANG} = 'C'; # so we don't double-encode utf-8 if LANG is utf-8
-
my $listenersock = IO::Socket::INET->new(
Listen => 5,
Proto => 'tcp',
Reuse => 1,
LocalAddr => $config->{listen},
my $listenersock = IO::Socket::INET->new(
Listen => 5,
Proto => 'tcp',
Reuse => 1,
LocalAddr => $config->{listen},
-);
+)
|| die "can't open listen socket: $!"
;
my $targetsock = $config->{upstream_ssl}
my $targetsock = $config->{upstream_ssl}
@@
-187,7
+185,7
@@
my $targetsock = $config->{upstream_ssl}
PeerPort => 389,
)
: IO::Socket::SSL->new( $config->{upstream_ldap} . ':ldaps')
PeerPort => 389,
)
: IO::Socket::SSL->new( $config->{upstream_ldap} . ':ldaps')
- ;
+
|| die "can't open upstream socket: $!"
;
run_proxy($listenersock,$targetsock);
run_proxy($listenersock,$targetsock);