/[virtual-ldap]/bin/ldap-rewrite.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /bin/ldap-rewrite.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 18 by dpavlin, Sun Mar 15 22:00:24 2009 UTC revision 19 by dpavlin, Mon Mar 16 09:46:47 2009 UTC
# Line 84  sub log_response { Line 84  sub log_response {
84                  my $uid = $response->{protocolOp}->{searchResEntry}->{objectName};                  my $uid = $response->{protocolOp}->{searchResEntry}->{objectName};
85                  warn "## SEARCH $uid";                  warn "## SEARCH $uid";
86    
87  if(0) {                  my @attrs;
88    
89                  map {                  map {
90                          if ( $_->{type} eq 'postalAddress' ) {                          if ( $_->{type} eq 'hrEduPersonUniqueNumber' ) {
91                                  $_->{vals} = [ 'foobar' ];                                  foreach my $val ( @{ $_->{vals} } ) {
92                                            next if $val !~ m{.+:.+};
93                                            my ( $n, $v ) = split(/\s*:\s*/, $val );
94                                            push @attrs, { type => $_->{type} . '_' . $n, vals => [ $v ] };
95                                    }
96                          }                          }
97                  } @{ $response->{protocolOp}->{searchResEntry}->{attributes} };                  } @{ $response->{protocolOp}->{searchResEntry}->{attributes} };
98  }  
99                    warn "# ++ attrs ",dump( @attrs );
100    
101                    push @{ $response->{protocolOp}->{searchResEntry}->{attributes} }, $_ foreach @attrs;
102    
103                  my $path = $config->{yaml_dir} . "$uid.yaml";                  my $path = $config->{yaml_dir} . "$uid.yaml";
104                  if ( -e $path ) {                  if ( -e $path ) {

Legend:
Removed from v.18  
changed lines
  Added in v.19

  ViewVC Help
Powered by ViewVC 1.1.26