projects
/
virtual-ldap
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
put categorycode also in department attribute
[virtual-ldap]
/
bin
/
ldap-rewrite.pl
diff --git
a/bin/ldap-rewrite.pl
b/bin/ldap-rewrite.pl
index
db97950
..
9c57242
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:1389',
+ listen =>
shift @ARGV ||
'localhost:1389',
upstream_ldap => 'ldap.ffzg.hr',
upstream_ssl => 1,
overlay_prefix => 'ffzg-',
upstream_ldap => 'ldap.ffzg.hr',
upstream_ssl => 1,
overlay_prefix => 'ffzg-',
@@
-99,7
+99,7
@@
sub log_response {
if ( defined $response->{protocolOp}->{searchResEntry} ) {
my $uid = $response->{protocolOp}->{searchResEntry}->{objectName};
if ( defined $response->{protocolOp}->{searchResEntry} ) {
my $uid = $response->{protocolOp}->{searchResEntry}->{objectName};
- warn "##
SEARCH
$uid";
+ warn "##
objectName
$uid";
my @attrs;
my @attrs;
@@
-170,8
+170,6
@@
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',
my $listenersock = IO::Socket::INET->new(
Listen => 5,
Proto => 'tcp',
@@
-189,9
+187,6
@@
my $targetsock = $config->{upstream_ssl}
: IO::Socket::SSL->new( $config->{upstream_ldap} . ':ldaps')
|| die "can't open upstream socket: $!";
: IO::Socket::SSL->new( $config->{upstream_ldap} . ':ldaps')
|| die "can't open upstream socket: $!";
-binmode( $listenersock );
-binmode( $targetsock );
-
run_proxy($listenersock,$targetsock);
1;
run_proxy($listenersock,$targetsock);
1;